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({
originalWindowWidth: window.innerWidth,
originalWindowHeight: window.innerHeight,
}));
const initialApplication = new Lazy(() => new BaseApplication());
// temp for backcompatibility
export type Config = {
originalWindowWidth: number;
originalWindowHeight: number;
};
const defaultConfig: Config = {
originalWindowWidth: 800,
originalWindowHeight: 800,
};
export type BaseApplicationProps = {
args?: Partial<Config>,
gameStateUpdaters: UpdaterGeneratorType2<GameState>, // aka updaters
type Props = {
args: {
fireBatch: () => void,
isSecondConstructorCall: boolean
},
updaters: UpdaterGeneratorType2<GameState>, // aka updaters
public static appSizeFromWindowSize(window?: DeepReadonly<Vector2>): Vector2 {
return new Vector2({
x: Math.min(1280, window?.x || Infinity - 8),
y: Math.min(720, window?.y || Infinity - 8),
});
}
this.config = Object.assign({}, defaultConfig, args);
let appSize = BaseApplication.appSizeFromWindowSize(
props.pixiComponentState && new Vector2(props.pixiComponentState.innerWidth, props.pixiComponentState.innerHeight)
);
// jlet appSize = appSizeFromWindowSize(
// j props.pixiComponentState && new Vector2(props.pixiComponentState.innerWidth, props.pixiComponentState.innerHeight)
// j);
let appSize = new Vector2(800, 600);
updateSelf(props: BaseApplicationProps) {
this.state.appSize = BaseApplication.appSizeFromWindowSize(new Vector2(props.pixiComponentState.innerWidth, props.pixiComponentState.innerHeight));
updateSelf(props: Props) {
this.state.appSize = appSizeFromWindowSize(new Vector2(props.pixiComponentState.innerWidth, props.pixiComponentState.innerHeight));