@zylem/game-lib 0.3.17 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/.vite/manifest.json +64 -58
- package/dist/api/actions.d.ts +5 -0
- package/dist/api/actions.d.ts.map +1 -0
- package/dist/api/behaviors.d.ts +4 -0
- package/dist/api/behaviors.d.ts.map +1 -0
- package/dist/api/camera.d.ts +4 -0
- package/dist/api/camera.d.ts.map +1 -0
- package/dist/api/core.d.ts +6 -0
- package/dist/api/core.d.ts.map +1 -0
- package/dist/api/entities.d.ts +9 -0
- package/dist/api/entities.d.ts.map +1 -0
- package/dist/api/main.d.ts +32 -0
- package/dist/api/main.d.ts.map +1 -0
- package/dist/api/stage.d.ts +7 -0
- package/dist/api/stage.d.ts.map +1 -0
- package/dist/core.js +4 -4
- package/dist/lib/actions/behaviors/actions.d.ts +1 -0
- package/dist/lib/actions/behaviors/actions.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/behavior.d.ts +1 -0
- package/dist/lib/actions/behaviors/behavior.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/boundaries/boundary.d.ts +1 -0
- package/dist/lib/actions/behaviors/boundaries/boundary.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/character-controller.d.ts +1 -0
- package/dist/lib/actions/behaviors/character-controller.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/debug/debug-collision.d.ts +1 -0
- package/dist/lib/actions/behaviors/debug/debug-collision.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/debug/debug-update.d.ts +1 -0
- package/dist/lib/actions/behaviors/debug/debug-update.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/debug/debug.d.ts +1 -0
- package/dist/lib/actions/behaviors/debug/debug.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/movement/movement-sequence-2d.d.ts +1 -0
- package/dist/lib/actions/behaviors/movement/movement-sequence-2d.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-collision.d.ts +1 -0
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-collision.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-in-bounds.d.ts +1 -0
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-in-bounds.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/ricochet/ricochet.d.ts +1 -0
- package/dist/lib/actions/behaviors/ricochet/ricochet.d.ts.map +1 -0
- package/dist/lib/actions/behaviors/zylem-behavior.d.ts +1 -0
- package/dist/lib/actions/behaviors/zylem-behavior.d.ts.map +1 -0
- package/dist/lib/actions/capabilities/moveable.d.ts +1 -0
- package/dist/lib/actions/capabilities/moveable.d.ts.map +1 -0
- package/dist/lib/actions/capabilities/rotatable.d.ts +1 -0
- package/dist/lib/actions/capabilities/rotatable.d.ts.map +1 -0
- package/dist/lib/actions/capabilities/transformable.d.ts +1 -0
- package/dist/lib/actions/capabilities/transformable.d.ts.map +1 -0
- package/dist/lib/actions/global-change.d.ts +1 -0
- package/dist/lib/actions/global-change.d.ts.map +1 -0
- package/dist/lib/camera/camera.d.ts +1 -0
- package/dist/lib/camera/camera.d.ts.map +1 -0
- package/dist/lib/camera/fixed-2d.d.ts +1 -0
- package/dist/lib/camera/fixed-2d.d.ts.map +1 -0
- package/dist/lib/camera/perspective.d.ts +1 -0
- package/dist/lib/camera/perspective.d.ts.map +1 -0
- package/dist/lib/camera/third-person.d.ts +1 -0
- package/dist/lib/camera/third-person.d.ts.map +1 -0
- package/dist/lib/camera/zylem-camera.d.ts +27 -0
- package/dist/lib/camera/zylem-camera.d.ts.map +1 -0
- package/dist/lib/camera/zylem-camera.js +100 -37
- package/dist/lib/collision/collision-builder.d.ts +1 -0
- package/dist/lib/collision/collision-builder.d.ts.map +1 -0
- package/dist/lib/collision/collision-delegate.d.ts +1 -0
- package/dist/lib/collision/collision-delegate.d.ts.map +1 -0
- package/dist/lib/collision/collision-group.d.ts +1 -0
- package/dist/lib/collision/collision-group.d.ts.map +1 -0
- package/dist/lib/collision/collision-mask.d.ts +1 -0
- package/dist/lib/collision/collision-mask.d.ts.map +1 -0
- package/dist/lib/collision/collision.d.ts +1 -0
- package/dist/lib/collision/collision.d.ts.map +1 -0
- package/dist/lib/collision/utils.d.ts +1 -0
- package/dist/lib/collision/utils.d.ts.map +1 -0
- package/dist/lib/collision/world.d.ts +1 -0
- package/dist/lib/collision/world.d.ts.map +1 -0
- package/dist/lib/core/asset-manager.d.ts +1 -0
- package/dist/lib/core/asset-manager.d.ts.map +1 -0
- package/dist/lib/core/base-node-life-cycle.d.ts +1 -0
- package/dist/lib/core/base-node-life-cycle.d.ts.map +1 -0
- package/dist/lib/core/base-node.d.ts +1 -0
- package/dist/lib/core/base-node.d.ts.map +1 -0
- package/dist/lib/core/base-node.js +1 -1
- package/dist/lib/core/entity-asset-loader.d.ts +1 -0
- package/dist/lib/core/entity-asset-loader.d.ts.map +1 -0
- package/dist/lib/core/errors.d.ts +1 -0
- package/dist/lib/core/errors.d.ts.map +1 -0
- package/dist/lib/core/flags.d.ts +1 -0
- package/dist/lib/core/flags.d.ts.map +1 -0
- package/dist/lib/core/index.d.ts +1 -0
- package/dist/lib/core/index.d.ts.map +1 -0
- package/dist/lib/core/lazy-loader.d.ts +1 -0
- package/dist/lib/core/lazy-loader.d.ts.map +1 -0
- package/dist/lib/core/lifecycle-base.d.ts +1 -0
- package/dist/lib/core/lifecycle-base.d.ts.map +1 -0
- package/dist/lib/core/preset-shader.d.ts +1 -0
- package/dist/lib/core/preset-shader.d.ts.map +1 -0
- package/dist/lib/core/three-addons/Timer.d.ts +1 -0
- package/dist/lib/core/three-addons/Timer.d.ts.map +1 -0
- package/dist/lib/core/utility/nodes.d.ts +5 -3
- package/dist/lib/core/utility/nodes.d.ts.map +1 -0
- package/dist/lib/core/utility/nodes.js +20 -16
- package/dist/lib/core/utility/strings.d.ts +1 -0
- package/dist/lib/core/utility/strings.d.ts.map +1 -0
- package/dist/lib/core/utility/vector.d.ts +1 -0
- package/dist/lib/core/utility/vector.d.ts.map +1 -0
- package/dist/lib/core/vector.d.ts +1 -0
- package/dist/lib/core/vector.d.ts.map +1 -0
- package/dist/lib/core/vessel.d.ts +1 -0
- package/dist/lib/core/vessel.d.ts.map +1 -0
- package/dist/lib/debug/console/console-state.d.ts +1 -0
- package/dist/lib/debug/console/console-state.d.ts.map +1 -0
- package/dist/lib/debug/console/console-store.d.ts +1 -0
- package/dist/lib/debug/console/console-store.d.ts.map +1 -0
- package/dist/lib/debug/debug-state.d.ts +1 -0
- package/dist/lib/debug/debug-state.d.ts.map +1 -0
- package/dist/lib/debug/debug-store.d.ts +1 -0
- package/dist/lib/debug/debug-store.d.ts.map +1 -0
- package/dist/lib/debug/state-based-debug-loader.d.ts +1 -0
- package/dist/lib/debug/state-based-debug-loader.d.ts.map +1 -0
- package/dist/lib/device/aspect-ratio.d.ts +1 -0
- package/dist/lib/device/aspect-ratio.d.ts.map +1 -0
- package/dist/lib/device/desktop.d.ts +1 -0
- package/dist/lib/device/desktop.d.ts.map +1 -0
- package/dist/lib/device/mobile.d.ts +1 -0
- package/dist/lib/device/mobile.d.ts.map +1 -0
- package/dist/lib/device/tablet.d.ts +1 -0
- package/dist/lib/device/tablet.d.ts.map +1 -0
- package/dist/lib/entities/actor.d.ts +1 -0
- package/dist/lib/entities/actor.d.ts.map +1 -0
- package/dist/lib/entities/box.d.ts +1 -0
- package/dist/lib/entities/box.d.ts.map +1 -0
- package/dist/lib/entities/builder.d.ts +1 -0
- package/dist/lib/entities/builder.d.ts.map +1 -0
- package/dist/lib/entities/create.d.ts +1 -0
- package/dist/lib/entities/create.d.ts.map +1 -0
- package/dist/lib/entities/delegates/animation.d.ts +1 -0
- package/dist/lib/entities/delegates/animation.d.ts.map +1 -0
- package/dist/lib/entities/delegates/debug.d.ts +1 -0
- package/dist/lib/entities/delegates/debug.d.ts.map +1 -0
- package/dist/lib/entities/delegates/loader.d.ts +1 -0
- package/dist/lib/entities/delegates/loader.d.ts.map +1 -0
- package/dist/lib/entities/destroy.d.ts +1 -0
- package/dist/lib/entities/destroy.d.ts.map +1 -0
- package/dist/lib/entities/entity.d.ts +1 -0
- package/dist/lib/entities/entity.d.ts.map +1 -0
- package/dist/lib/entities/index.d.ts +1 -0
- package/dist/lib/entities/index.d.ts.map +1 -0
- package/dist/lib/entities/plane.d.ts +1 -0
- package/dist/lib/entities/plane.d.ts.map +1 -0
- package/dist/lib/entities/rect.d.ts +1 -0
- package/dist/lib/entities/rect.d.ts.map +1 -0
- package/dist/lib/entities/sphere.d.ts +1 -0
- package/dist/lib/entities/sphere.d.ts.map +1 -0
- package/dist/lib/entities/sprite.d.ts +1 -0
- package/dist/lib/entities/sprite.d.ts.map +1 -0
- package/dist/lib/entities/text.d.ts +8 -0
- package/dist/lib/entities/text.d.ts.map +1 -0
- package/dist/lib/entities/text.js +77 -48
- package/dist/lib/entities/zone.d.ts +1 -0
- package/dist/lib/entities/zone.d.ts.map +1 -0
- package/dist/lib/game/game-blueprint.d.ts +5 -11
- package/dist/lib/game/game-blueprint.d.ts.map +1 -0
- package/dist/lib/game/game-canvas.d.ts +1 -0
- package/dist/lib/game/game-canvas.d.ts.map +1 -0
- package/dist/lib/game/game-canvas.js +9 -9
- package/dist/lib/game/game-config.d.ts +17 -1
- package/dist/lib/game/game-config.d.ts.map +1 -0
- package/dist/lib/game/game-config.js +50 -24
- package/dist/lib/game/game-default.d.ts +5 -4
- package/dist/lib/game/game-default.d.ts.map +1 -0
- package/dist/lib/game/game-interfaces.d.ts +3 -2
- package/dist/lib/game/game-interfaces.d.ts.map +1 -0
- package/dist/lib/game/game-retro-resolutions.d.ts +24 -0
- package/dist/lib/game/game-retro-resolutions.d.ts.map +1 -0
- package/dist/lib/game/game-retro-resolutions.js +81 -0
- package/dist/lib/game/game-state.d.ts +6 -5
- package/dist/lib/game/game-state.d.ts.map +1 -0
- package/dist/lib/game/game.d.ts +7 -8
- package/dist/lib/game/game.d.ts.map +1 -0
- package/dist/lib/game/game.js +46 -70
- package/dist/lib/game/zylem-game.d.ts +4 -3
- package/dist/lib/game/zylem-game.d.ts.map +1 -0
- package/dist/lib/game/zylem-game.js +39 -31
- package/dist/lib/graphics/geometries/XZPlaneGeometry.d.ts +1 -0
- package/dist/lib/graphics/geometries/XZPlaneGeometry.d.ts.map +1 -0
- package/dist/lib/graphics/material.d.ts +1 -0
- package/dist/lib/graphics/material.d.ts.map +1 -0
- package/dist/lib/graphics/mesh.d.ts +1 -0
- package/dist/lib/graphics/mesh.d.ts.map +1 -0
- package/dist/lib/graphics/render-pass.d.ts +1 -0
- package/dist/lib/graphics/render-pass.d.ts.map +1 -0
- package/dist/lib/graphics/zylem-scene.d.ts +1 -0
- package/dist/lib/graphics/zylem-scene.d.ts.map +1 -0
- package/dist/lib/input/gamepad-provider.d.ts +1 -0
- package/dist/lib/input/gamepad-provider.d.ts.map +1 -0
- package/dist/lib/input/input-manager.d.ts +1 -0
- package/dist/lib/input/input-manager.d.ts.map +1 -0
- package/dist/lib/input/input-provider.d.ts +1 -0
- package/dist/lib/input/input-provider.d.ts.map +1 -0
- package/dist/lib/input/input.d.ts +1 -0
- package/dist/lib/input/input.d.ts.map +1 -0
- package/dist/lib/input/keyboard-provider.d.ts +1 -0
- package/dist/lib/input/keyboard-provider.d.ts.map +1 -0
- package/dist/lib/interfaces/entity.d.ts +1 -0
- package/dist/lib/interfaces/entity.d.ts.map +1 -0
- package/dist/lib/sounds/index.d.ts +1 -0
- package/dist/lib/sounds/index.d.ts.map +1 -0
- package/dist/lib/sounds/ping-pong-sound.d.ts +1 -0
- package/dist/lib/sounds/ping-pong-sound.d.ts.map +1 -0
- package/dist/lib/sounds/ricochet-sound.d.ts +1 -0
- package/dist/lib/sounds/ricochet-sound.d.ts.map +1 -0
- package/dist/lib/stage/debug-entity-cursor.d.ts +1 -0
- package/dist/lib/stage/debug-entity-cursor.d.ts.map +1 -0
- package/dist/lib/stage/entity-spawner.d.ts +1 -0
- package/dist/lib/stage/entity-spawner.d.ts.map +1 -0
- package/dist/lib/stage/stage-blueprint.d.ts +1 -0
- package/dist/lib/stage/stage-blueprint.d.ts.map +1 -0
- package/dist/lib/stage/stage-camera-debug-delegate.d.ts +14 -0
- package/dist/lib/stage/stage-camera-debug-delegate.d.ts.map +1 -0
- package/dist/lib/stage/stage-debug-delegate.d.ts +1 -0
- package/dist/lib/stage/stage-debug-delegate.d.ts.map +1 -0
- package/dist/lib/stage/stage-default.d.ts +1 -0
- package/dist/lib/stage/stage-default.d.ts.map +1 -0
- package/dist/lib/stage/stage-state.d.ts +1 -0
- package/dist/lib/stage/stage-state.d.ts.map +1 -0
- package/dist/lib/stage/stage.d.ts +2 -1
- package/dist/lib/stage/stage.d.ts.map +1 -0
- package/dist/lib/stage/stage.js +27 -27
- package/dist/lib/stage/zylem-stage.d.ts +4 -1
- package/dist/lib/stage/zylem-stage.d.ts.map +1 -0
- package/dist/lib/stage/zylem-stage.js +25 -24
- package/dist/lib/systems/test-system.d.ts +1 -0
- package/dist/lib/systems/test-system.d.ts.map +1 -0
- package/dist/lib/systems/transformable.system.d.ts +1 -0
- package/dist/lib/systems/transformable.system.d.ts.map +1 -0
- package/dist/lib/types/entity-types.d.ts +1 -0
- package/dist/lib/types/entity-types.d.ts.map +1 -0
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/index.d.ts.map +1 -0
- package/dist/lib/types/stage-types.d.ts +1 -0
- package/dist/lib/types/stage-types.d.ts.map +1 -0
- package/dist/lib/ui/Debug.d.ts +1 -0
- package/dist/lib/ui/Debug.d.ts.map +1 -0
- package/dist/lib/ui/console/Console.d.ts +1 -0
- package/dist/lib/ui/console/Console.d.ts.map +1 -0
- package/dist/lib/ui/debug-panel/AccordionMenu.d.ts +1 -0
- package/dist/lib/ui/debug-panel/AccordionMenu.d.ts.map +1 -0
- package/dist/lib/ui/debug-panel/Menu.d.ts +1 -0
- package/dist/lib/ui/debug-panel/Menu.d.ts.map +1 -0
- package/dist/lib/ui/debug-panel/sections/EntitiesSection.d.ts +1 -0
- package/dist/lib/ui/debug-panel/sections/EntitiesSection.d.ts.map +1 -0
- package/dist/lib/ui/debug-panel/sections/GameSection.d.ts +1 -0
- package/dist/lib/ui/debug-panel/sections/GameSection.d.ts.map +1 -0
- package/dist/lib/ui/debug-panel/sections/StagesSection.d.ts +1 -0
- package/dist/lib/ui/debug-panel/sections/StagesSection.d.ts.map +1 -0
- package/dist/lib/ui/debug-panel/sections/all.d.ts +1 -0
- package/dist/lib/ui/debug-panel/sections/all.d.ts.map +1 -0
- package/dist/lib/ui/toolbar/Toolbar.d.ts +1 -0
- package/dist/lib/ui/toolbar/Toolbar.d.ts.map +1 -0
- package/dist/main.js +10 -10
- package/dist/tests/unit/collision/collision.spec.d.ts +2 -0
- package/dist/tests/unit/collision/collision.spec.d.ts.map +1 -0
- package/dist/tests/unit/core/game.spec.d.ts +2 -0
- package/dist/tests/unit/core/game.spec.d.ts.map +1 -0
- package/dist/tests/unit/core/stage.spec.d.ts +2 -0
- package/dist/tests/unit/core/stage.spec.d.ts.map +1 -0
- package/dist/tests/unit/core/vessel.spec.d.ts +2 -0
- package/dist/tests/unit/core/vessel.spec.d.ts.map +1 -0
- package/dist/tests/unit/stage/stage-blueprint.spec.d.ts +2 -0
- package/dist/tests/unit/stage/stage-blueprint.spec.d.ts.map +1 -0
- package/package.json +11 -9
- package/dist/actions.d.ts +0 -4
- package/dist/behaviors.d.ts +0 -3
- package/dist/camera.d.ts +0 -3
- package/dist/core.d.ts +0 -5
- package/dist/entities.d.ts +0 -8
- package/dist/main.d.ts +0 -31
- package/dist/stage.d.ts +0 -6
- package/dist/tests/collision/collision.spec.d.ts +0 -1
- package/dist/tests/core/game.spec.d.ts +0 -1
- package/dist/tests/core/stage.spec.d.ts +0 -1
- package/dist/tests/core/vessel.spec.d.ts +0 -1
- package/dist/tests/stage/stage-blueprint.spec.d.ts +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StageInterface } from "../types";
|
|
2
2
|
import { GameInputConfig } from "./game-interfaces";
|
|
3
3
|
import { AspectRatio, AspectRatioValue } from "../device/aspect-ratio";
|
|
4
|
+
import { RetroPresetKey } from "./game-retro-resolutions";
|
|
4
5
|
export type GameConfigLike = Partial<{
|
|
5
6
|
id: string;
|
|
6
7
|
globals: Record<string, any>;
|
|
@@ -10,6 +11,13 @@ export type GameConfigLike = Partial<{
|
|
|
10
11
|
input: GameInputConfig;
|
|
11
12
|
/** numeric value or key in AspectRatio */
|
|
12
13
|
aspectRatio: AspectRatioValue | keyof typeof AspectRatio;
|
|
14
|
+
/** console/display preset to derive aspect ratio */
|
|
15
|
+
preset: RetroPresetKey;
|
|
16
|
+
/** lock internal render buffer to this resolution (e.g., '256x240' or { width, height }) */
|
|
17
|
+
resolution: string | {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
13
21
|
fullscreen: boolean;
|
|
14
22
|
/** CSS background value for document body */
|
|
15
23
|
bodyBackground: string;
|
|
@@ -28,12 +36,19 @@ export declare class GameConfig {
|
|
|
28
36
|
time: number;
|
|
29
37
|
input: GameInputConfig | undefined;
|
|
30
38
|
aspectRatio: number;
|
|
39
|
+
internalResolution: {
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
} | undefined;
|
|
31
43
|
fullscreen: boolean;
|
|
32
44
|
bodyBackground: string | undefined;
|
|
33
45
|
container: HTMLElement;
|
|
34
46
|
containerId?: string | undefined;
|
|
35
47
|
canvas?: HTMLCanvasElement | undefined;
|
|
36
|
-
constructor(id: string, globals: Record<string, any>, stages: StageInterface[], debug: boolean, time: number, input: GameInputConfig | undefined, aspectRatio: number,
|
|
48
|
+
constructor(id: string, globals: Record<string, any>, stages: StageInterface[], debug: boolean, time: number, input: GameInputConfig | undefined, aspectRatio: number, internalResolution: {
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
} | undefined, fullscreen: boolean, bodyBackground: string | undefined, container: HTMLElement, containerId?: string | undefined, canvas?: HTMLCanvasElement | undefined);
|
|
37
52
|
}
|
|
38
53
|
export declare function createDefaultGameConfig(base?: Partial<Pick<GameConfig, 'id' | 'debug' | 'time' | 'input'>> & {
|
|
39
54
|
stages?: StageInterface[];
|
|
@@ -45,3 +60,4 @@ export declare function resolveGameConfig(user?: GameConfigLike): GameConfig;
|
|
|
45
60
|
* Returns a plain object that can be passed to `game(...)`.
|
|
46
61
|
*/
|
|
47
62
|
export declare function gameConfig(config: GameConfigLike): GameConfigLike;
|
|
63
|
+
//# sourceMappingURL=game-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-config.d.ts","sourceRoot":"","sources":["../../../src/lib/game/game-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAA0D,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAElH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,0CAA0C;IAC1C,WAAW,EAAE,gBAAgB,GAAG,MAAM,OAAO,WAAW,CAAC;IACzD,oDAAoD;IACpD,MAAM,EAAE,cAAc,CAAC;IACvB,4FAA4F;IAC5F,UAAU,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,UAAU,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,cAA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G,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,GAAG,UAAU,CAkBtL;AAED,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,UAAU,CAoEnE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAEjE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AspectRatio as
|
|
2
|
-
|
|
1
|
+
import { AspectRatio as p } from "../device/aspect-ratio.js";
|
|
2
|
+
import { getDisplayAspect as b, parseResolution as y, getPresetResolution as R } from "./game-retro-resolutions.js";
|
|
3
|
+
class f {
|
|
3
4
|
id;
|
|
4
5
|
globals;
|
|
5
6
|
stages;
|
|
@@ -7,47 +8,72 @@ class g {
|
|
|
7
8
|
time;
|
|
8
9
|
input;
|
|
9
10
|
aspectRatio;
|
|
11
|
+
internalResolution;
|
|
10
12
|
fullscreen;
|
|
11
13
|
bodyBackground;
|
|
12
14
|
container;
|
|
13
15
|
containerId;
|
|
14
16
|
canvas;
|
|
15
|
-
constructor(
|
|
16
|
-
this.id =
|
|
17
|
+
constructor(i, o, n, e, l, d, r, a, g, c, s, h, m) {
|
|
18
|
+
this.id = i, this.globals = o, this.stages = n, this.debug = e, this.time = l, this.input = d, this.aspectRatio = r, this.internalResolution = a, this.fullscreen = g, this.bodyBackground = c, this.container = s, this.containerId = h, this.canvas = m;
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
21
|
+
function u(t, i) {
|
|
22
|
+
if (i)
|
|
23
|
+
return i;
|
|
22
24
|
if (t) {
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
25
|
+
const e = document.getElementById(t);
|
|
26
|
+
if (e)
|
|
27
|
+
return e;
|
|
26
28
|
}
|
|
27
|
-
const o = t || "zylem-root",
|
|
28
|
-
return
|
|
29
|
+
const o = t || "zylem-root", n = document.createElement("main");
|
|
30
|
+
return n.setAttribute("id", o), n.style.position = "relative", n.style.width = "100%", n.style.height = "100%", document.body.appendChild(n), n;
|
|
29
31
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
return new
|
|
32
|
+
function B(t) {
|
|
33
|
+
const i = t?.id ?? "zylem", o = u(i);
|
|
34
|
+
return new f(i, t?.globals ?? {}, t?.stages ?? [], !!t?.debug, t?.time ?? 0, t?.input, p.SixteenByNine, void 0, !0, "#000000", o, i, void 0);
|
|
33
35
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
+
function C(t) {
|
|
37
|
+
const i = B({
|
|
36
38
|
id: t?.id ?? "zylem",
|
|
37
39
|
debug: !!t?.debug,
|
|
38
40
|
time: t?.time ?? 0,
|
|
39
41
|
input: t?.input,
|
|
40
42
|
stages: t?.stages ?? [],
|
|
41
43
|
globals: t?.globals ?? {}
|
|
42
|
-
}), o = t?.containerId ??
|
|
43
|
-
|
|
44
|
+
}), o = t?.containerId ?? i.containerId, n = u(o, t?.container ?? null), e = t?.aspectRatio;
|
|
45
|
+
let l = i.aspectRatio;
|
|
46
|
+
if (typeof e == "number" || e && typeof e == "string")
|
|
47
|
+
l = typeof e == "number" ? e : p[e] ?? i.aspectRatio;
|
|
48
|
+
else if (t?.preset)
|
|
49
|
+
try {
|
|
50
|
+
l = b(t.preset) || i.aspectRatio;
|
|
51
|
+
} catch {
|
|
52
|
+
l = i.aspectRatio;
|
|
53
|
+
}
|
|
54
|
+
const d = t?.fullscreen ?? i.fullscreen, r = t?.bodyBackground ?? i.bodyBackground;
|
|
55
|
+
let a;
|
|
56
|
+
if (t?.resolution) {
|
|
57
|
+
if (typeof t.resolution == "string") {
|
|
58
|
+
const c = y(t.resolution);
|
|
59
|
+
if (c && (a = c), !a && t.preset) {
|
|
60
|
+
const s = R(t.preset, t.resolution);
|
|
61
|
+
s && (a = { width: s.width, height: s.height });
|
|
62
|
+
}
|
|
63
|
+
} else if (typeof t.resolution == "object") {
|
|
64
|
+
const c = t.resolution.width, s = t.resolution.height;
|
|
65
|
+
Number.isFinite(c) && Number.isFinite(s) && (a = { width: c, height: s });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const g = t?.canvas ?? void 0;
|
|
69
|
+
return new f(t?.id ?? i.id, t?.globals ?? i.globals, t?.stages ?? i.stages, !!(t?.debug ?? i.debug), t?.time ?? i.time, t?.input ?? i.input, l, a, d, r, n, o, g);
|
|
44
70
|
}
|
|
45
|
-
function
|
|
71
|
+
function k(t) {
|
|
46
72
|
return { ...t };
|
|
47
73
|
}
|
|
48
74
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
75
|
+
f as GameConfig,
|
|
76
|
+
B as createDefaultGameConfig,
|
|
77
|
+
k as gameConfig,
|
|
78
|
+
C as resolveGameConfig
|
|
53
79
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Stage } from '../stage/stage';
|
|
2
|
-
import type { BasicTypes,
|
|
3
|
-
export declare const gameDefaultsState: Partial<ZylemGameConfig<Stage, any,
|
|
2
|
+
import type { BasicTypes, BaseGlobals, ZylemGameConfig, GameInputConfig } from './game-interfaces';
|
|
3
|
+
export declare const gameDefaultsState: Partial<ZylemGameConfig<Stage, any, BaseGlobals>>;
|
|
4
4
|
/** Replace multiple defaults at once (shallow merge). */
|
|
5
|
-
export declare function setGameDefaults(partial: Partial<ZylemGameConfig<Stage, any,
|
|
5
|
+
export declare function setGameDefaults(partial: Partial<ZylemGameConfig<Stage, any, BaseGlobals>>): void;
|
|
6
6
|
/** Reset defaults back to library defaults. */
|
|
7
7
|
export declare function resetGameDefaults(): void;
|
|
8
8
|
/**
|
|
9
9
|
* Get a plain object copy of the current defaults.
|
|
10
10
|
*/
|
|
11
|
-
export declare function getGameDefaultConfig<TGlobals extends Record<string, BasicTypes> =
|
|
11
|
+
export declare function getGameDefaultConfig<TGlobals extends Record<string, BasicTypes> = BaseGlobals>(): {
|
|
12
12
|
id: string;
|
|
13
13
|
globals: TGlobals;
|
|
14
14
|
stages: Stage[];
|
|
@@ -16,3 +16,4 @@ export declare function getGameDefaultConfig<TGlobals extends Record<string, Bas
|
|
|
16
16
|
time?: number;
|
|
17
17
|
input?: GameInputConfig;
|
|
18
18
|
};
|
|
19
|
+
//# sourceMappingURL=game-default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-default.d.ts","sourceRoot":"","sources":["../../../src/lib/game/game-default.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAmBnG,eAAO,MAAM,iBAAiB,mDAE7B,CAAC;AAEF,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,GAAG,IAAI,CAEhG;AAED,+CAA+C;AAC/C,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,WAAW,KAAK;IAClG,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;CACxB,CASA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UpdateFunction } from "../core/base-node-life-cycle";
|
|
2
2
|
export type BasicTypes = number | string | boolean;
|
|
3
|
-
export type
|
|
3
|
+
export type BaseGlobals = Record<string, BasicTypes>;
|
|
4
4
|
export type KeyboardMapping = Record<string, string[]>;
|
|
5
5
|
export type MouseMapping = Record<string, string[]>;
|
|
6
6
|
export interface GameInputPlayerConfig {
|
|
@@ -17,7 +17,7 @@ export interface GameInputConfig {
|
|
|
17
17
|
p7?: GameInputPlayerConfig;
|
|
18
18
|
p8?: GameInputPlayerConfig;
|
|
19
19
|
}
|
|
20
|
-
export interface ZylemGameConfig<StageInterface, GameInterface, TGlobals extends
|
|
20
|
+
export interface ZylemGameConfig<StageInterface, GameInterface, TGlobals extends BaseGlobals> {
|
|
21
21
|
id: string;
|
|
22
22
|
globals?: TGlobals;
|
|
23
23
|
stages?: StageInterface[];
|
|
@@ -26,3 +26,4 @@ export interface ZylemGameConfig<StageInterface, GameInterface, TGlobals extends
|
|
|
26
26
|
time?: number;
|
|
27
27
|
input?: GameInputConfig;
|
|
28
28
|
}
|
|
29
|
+
//# sourceMappingURL=game-interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-interfaces.d.ts","sourceRoot":"","sources":["../../../src/lib/game/game-interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACrC,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC/B,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC3B,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC3B,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC3B,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC3B,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC3B,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC3B,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAC3B,EAAE,CAAC,EAAE,qBAAqB,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe,CAAC,cAAc,EAAE,aAAa,EAAE,QAAQ,SAAS,WAAW;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;CACxB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type RetroResolution = {
|
|
2
|
+
key: string;
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
notes?: string;
|
|
6
|
+
};
|
|
7
|
+
export type RetroPreset = {
|
|
8
|
+
displayAspect: number;
|
|
9
|
+
resolutions: RetroResolution[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Retro and console display presets.
|
|
13
|
+
* displayAspect represents the intended display aspect (letterboxing target),
|
|
14
|
+
* not necessarily the raw pixel aspect of internal buffers.
|
|
15
|
+
*/
|
|
16
|
+
export declare const RetroPresets: Record<string, RetroPreset>;
|
|
17
|
+
export type RetroPresetKey = keyof typeof RetroPresets;
|
|
18
|
+
export declare function getDisplayAspect(preset: RetroPresetKey): number;
|
|
19
|
+
export declare function getPresetResolution(preset: RetroPresetKey, key?: string): RetroResolution | undefined;
|
|
20
|
+
export declare function parseResolution(text: string): {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
} | null;
|
|
24
|
+
//# sourceMappingURL=game-retro-resolutions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-retro-resolutions.d.ts","sourceRoot":"","sources":["../../../src/lib/game/game-retro-resolutions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7F,MAAM,MAAM,WAAW,GAAG;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,eAAe,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAuDpD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,YAAY,CAAC;AAEvD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAE/D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAKrG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAStF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
NES: {
|
|
3
|
+
displayAspect: 1.3333333333333333,
|
|
4
|
+
resolutions: [
|
|
5
|
+
{ key: "256x240", width: 256, height: 240, notes: "Standard NTSC; effective 240p." }
|
|
6
|
+
]
|
|
7
|
+
},
|
|
8
|
+
SNES: {
|
|
9
|
+
displayAspect: 1.3333333333333333,
|
|
10
|
+
resolutions: [
|
|
11
|
+
{ key: "256x224", width: 256, height: 224, notes: "Common 240p-equivalent mode." },
|
|
12
|
+
{ key: "512x448", width: 512, height: 448, notes: "Hi-res interlaced (480i)." }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
N64: {
|
|
16
|
+
displayAspect: 1.3333333333333333,
|
|
17
|
+
resolutions: [
|
|
18
|
+
{ key: "320x240", width: 320, height: 240, notes: "Common 240p mode." },
|
|
19
|
+
{ key: "640x480", width: 640, height: 480, notes: "Higher resolution (480i)." }
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
PS1: {
|
|
23
|
+
displayAspect: 1.3333333333333333,
|
|
24
|
+
resolutions: [
|
|
25
|
+
{ key: "320x240", width: 320, height: 240, notes: "Progressive 240p common." },
|
|
26
|
+
{ key: "640x480", width: 640, height: 480, notes: "Interlaced 480i for higher detail." }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
PS2: {
|
|
30
|
+
displayAspect: 1.3333333333333333,
|
|
31
|
+
resolutions: [
|
|
32
|
+
{ key: "640x480", width: 640, height: 480, notes: "480i/480p baseline." },
|
|
33
|
+
{ key: "720x480", width: 720, height: 480, notes: "480p (widescreen capable in some titles)." },
|
|
34
|
+
{ key: "1280x720", width: 1280, height: 720, notes: "720p (select titles)." }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
PS5: {
|
|
38
|
+
displayAspect: 1.7777777777777777,
|
|
39
|
+
resolutions: [
|
|
40
|
+
{ key: "720x480", width: 720, height: 480, notes: "Legacy compatibility." },
|
|
41
|
+
{ key: "1280x720", width: 1280, height: 720, notes: "720p." },
|
|
42
|
+
{ key: "1920x1080", width: 1920, height: 1080, notes: "1080p." },
|
|
43
|
+
{ key: "2560x1440", width: 2560, height: 1440, notes: "1440p." },
|
|
44
|
+
{ key: "3840x2160", width: 3840, height: 2160, notes: "4K (up to 120Hz)." },
|
|
45
|
+
{ key: "7680x4320", width: 7680, height: 4320, notes: "8K (limited)." }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
XboxOne: {
|
|
49
|
+
displayAspect: 1.7777777777777777,
|
|
50
|
+
resolutions: [
|
|
51
|
+
{ key: "1280x720", width: 1280, height: 720, notes: "720p (original)." },
|
|
52
|
+
{ key: "1920x1080", width: 1920, height: 1080, notes: "1080p (original)." },
|
|
53
|
+
{ key: "3840x2160", width: 3840, height: 2160, notes: "4K UHD (S/X models)." }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
function h(e) {
|
|
58
|
+
return n[e].displayAspect;
|
|
59
|
+
}
|
|
60
|
+
function r(e, o) {
|
|
61
|
+
const t = n[e]?.resolutions || [];
|
|
62
|
+
if (!o)
|
|
63
|
+
return t[0];
|
|
64
|
+
const i = o.toLowerCase().replace(/\s+/g, "").replace("×", "x");
|
|
65
|
+
return t.find((s) => s.key.toLowerCase() === i);
|
|
66
|
+
}
|
|
67
|
+
function l(e) {
|
|
68
|
+
if (!e)
|
|
69
|
+
return null;
|
|
70
|
+
const t = String(e).toLowerCase().trim().replace(/\s+/g, "").replace("×", "x").match(/^(\d+)x(\d+)$/);
|
|
71
|
+
if (!t)
|
|
72
|
+
return null;
|
|
73
|
+
const i = parseInt(t[1], 10), s = parseInt(t[2], 10);
|
|
74
|
+
return !Number.isFinite(i) || !Number.isFinite(s) ? null : { width: i, height: s };
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
n as RetroPresets,
|
|
78
|
+
h as getDisplayAspect,
|
|
79
|
+
r as getPresetResolution,
|
|
80
|
+
l as parseResolution
|
|
81
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseGlobals } from './game-interfaces';
|
|
2
2
|
declare const state: {
|
|
3
3
|
id: string;
|
|
4
|
-
globals:
|
|
4
|
+
globals: BaseGlobals;
|
|
5
5
|
time: number;
|
|
6
6
|
};
|
|
7
|
-
export declare function setGlobalState<TGlobals extends
|
|
8
|
-
export declare function getGlobalState<TGlobals extends
|
|
9
|
-
export declare function getGlobalState<TGlobals extends
|
|
7
|
+
export declare function setGlobalState<TGlobals extends BaseGlobals, K extends keyof TGlobals = keyof TGlobals>(key: K, value: TGlobals[K]): void;
|
|
8
|
+
export declare function getGlobalState<TGlobals extends BaseGlobals>(): TGlobals;
|
|
9
|
+
export declare function getGlobalState<TGlobals extends BaseGlobals, K extends keyof TGlobals = keyof TGlobals>(key: K): TGlobals[K];
|
|
10
10
|
export { state };
|
|
11
|
+
//# sourceMappingURL=game-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-state.d.ts","sourceRoot":"","sources":["../../../src/lib/game/game-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAc,MAAM,mBAAmB,CAAC;AAE5D,QAAA,MAAM,KAAK;;aAEK,WAAW;;CAEzB,CAAC;AAEH,wBAAgB,cAAc,CAC7B,QAAQ,SAAS,WAAW,EAC5B,CAAC,SAAS,MAAM,QAAQ,GAAG,MAAM,QAAQ,EACxC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAMpC,wBAAgB,cAAc,CAAC,QAAQ,SAAS,WAAW,KAAK,QAAQ,CAAC;AAEzE,wBAAgB,cAAc,CAC7B,QAAQ,SAAS,WAAW,EAC5B,CAAC,SAAS,MAAM,QAAQ,GAAG,MAAM,QAAQ,EACxC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AASvB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/lib/game/game.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { ZylemGame } from './zylem-game';
|
|
2
|
-
import { Stage } from '../stage/stage';
|
|
3
2
|
import { DestroyFunction, IGame, SetupFunction, UpdateFunction } from '../core/base-node-life-cycle';
|
|
4
|
-
import {
|
|
3
|
+
import { BaseGlobals } from './game-interfaces';
|
|
5
4
|
import { GameOptions } from '../core/utility/nodes';
|
|
6
|
-
export declare class Game<TGlobals extends
|
|
7
|
-
|
|
8
|
-
options: GameOptions<TGlobals>;
|
|
5
|
+
export declare class Game<TGlobals extends BaseGlobals> implements IGame<TGlobals> {
|
|
6
|
+
private wrappedGame;
|
|
9
7
|
private pendingGlobalChangeHandlers;
|
|
8
|
+
options: GameOptions<TGlobals>;
|
|
10
9
|
update: UpdateFunction<ZylemGame<TGlobals>, TGlobals>;
|
|
11
10
|
setup: SetupFunction<ZylemGame<TGlobals>, TGlobals>;
|
|
12
11
|
destroy: DestroyFunction<ZylemGame<TGlobals>, TGlobals>;
|
|
13
12
|
refErrorMessage: string;
|
|
14
13
|
constructor(options: GameOptions<TGlobals>);
|
|
15
14
|
start(): Promise<this>;
|
|
16
|
-
load
|
|
15
|
+
private load;
|
|
17
16
|
setOverrides(): void;
|
|
18
17
|
pause(): Promise<void>;
|
|
19
18
|
resume(): Promise<void>;
|
|
@@ -22,7 +21,6 @@ export declare class Game<TGlobals extends Record<string, BasicTypes> = GlobalVa
|
|
|
22
21
|
previousStage(): Promise<void>;
|
|
23
22
|
goToStage(): Promise<void>;
|
|
24
23
|
end(): Promise<void>;
|
|
25
|
-
add(...inputs: Array<Stage | Promise<any> | (() => Stage | Promise<any>)>): this;
|
|
26
24
|
getGlobal<K extends keyof TGlobals>(key: K): TGlobals[K];
|
|
27
25
|
setGlobal<K extends keyof TGlobals>(key: K, value: TGlobals[K]): void;
|
|
28
26
|
onGlobalChange<K extends keyof TGlobals>(key: K, callback: (value: TGlobals[K]) => void): void;
|
|
@@ -35,4 +33,5 @@ export declare class Game<TGlobals extends Record<string, BasicTypes> = GlobalVa
|
|
|
35
33
|
* @param options.stages Array of stage objects (when using IGameOptions)
|
|
36
34
|
* @returns Game
|
|
37
35
|
*/
|
|
38
|
-
export declare function
|
|
36
|
+
export declare function createGame<TGlobals extends BaseGlobals>(...options: GameOptions<TGlobals>): Game<TGlobals>;
|
|
37
|
+
//# sourceMappingURL=game.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game.d.ts","sourceRoot":"","sources":["../../../src/lib/game/game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAErG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAgB,WAAW,EAAa,MAAM,uBAAuB,CAAC;AAI7E,qBAAa,IAAI,CAAC,QAAQ,SAAS,WAAW,CAAE,YAAW,KAAK,CAAC,QAAQ,CAAC;IACzE,OAAO,CAAC,WAAW,CAAoC;IACvD,OAAO,CAAC,2BAA2B,CAAsE;IAEzG,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE/B,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAa;IAClE,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAa;IAChE,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAa;IAEpE,eAAe,SAA4B;gBAE/B,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC;IAOpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAQd,IAAI;IAYlB,YAAY;IAgBN,KAAK;IAIL,MAAM;IAQN,KAAK;IAQL,SAAS;IAeT,aAAa;IAeb,SAAS;IAET,GAAG;IAET,SAAS,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC;IAO1C,SAAS,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAQ9D,cAAc,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI;CAOvF;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,QAAQ,SAAS,WAAW,EAAE,GAAG,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAE1G"}
|
package/dist/lib/game/game.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ZylemGame as n } from "./zylem-game.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
class
|
|
8
|
-
|
|
9
|
-
options;
|
|
2
|
+
import { setPaused as o } from "../debug/debug-state.js";
|
|
3
|
+
import { getGlobalState as i, setGlobalState as p } from "./game-state.js";
|
|
4
|
+
import { hasStages as d, convertNodes as l } from "../core/utility/nodes.js";
|
|
5
|
+
import { resolveGameConfig as h } from "./game-config.js";
|
|
6
|
+
import { stage as g } from "../stage/stage.js";
|
|
7
|
+
class m {
|
|
8
|
+
wrappedGame = null;
|
|
10
9
|
pendingGlobalChangeHandlers = [];
|
|
10
|
+
options;
|
|
11
11
|
update = () => {
|
|
12
12
|
};
|
|
13
13
|
setup = () => {
|
|
@@ -15,119 +15,95 @@ class u {
|
|
|
15
15
|
destroy = () => {
|
|
16
16
|
};
|
|
17
17
|
refErrorMessage = "lost reference to game";
|
|
18
|
-
constructor(
|
|
19
|
-
this.options =
|
|
18
|
+
constructor(e) {
|
|
19
|
+
this.options = e, d(e) || this.options.push(g());
|
|
20
20
|
}
|
|
21
21
|
async start() {
|
|
22
|
-
const
|
|
23
|
-
return this.
|
|
22
|
+
const e = await this.load();
|
|
23
|
+
return this.wrappedGame = e, this.setOverrides(), e.start(), this;
|
|
24
24
|
}
|
|
25
25
|
async load() {
|
|
26
26
|
console.log("loading game", this.options);
|
|
27
|
-
const
|
|
28
|
-
...
|
|
29
|
-
...
|
|
27
|
+
const e = await l(this.options), a = h(e), t = new n({
|
|
28
|
+
...e,
|
|
29
|
+
...a
|
|
30
30
|
}, this);
|
|
31
|
-
return await
|
|
31
|
+
return await t.loadStage(e.stages[0]), t;
|
|
32
32
|
}
|
|
33
33
|
setOverrides() {
|
|
34
|
-
if (!this.
|
|
34
|
+
if (!this.wrappedGame) {
|
|
35
35
|
console.error(this.refErrorMessage);
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
if (this.
|
|
39
|
-
for (const { key:
|
|
40
|
-
this.
|
|
38
|
+
if (this.wrappedGame.customSetup = this.setup, this.wrappedGame.customUpdate = this.update, this.wrappedGame.customDestroy = this.destroy, this.pendingGlobalChangeHandlers.length) {
|
|
39
|
+
for (const { key: e, callback: a } of this.pendingGlobalChangeHandlers)
|
|
40
|
+
this.wrappedGame.onGlobalChange(e, a);
|
|
41
41
|
this.pendingGlobalChangeHandlers = [];
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
async pause() {
|
|
45
|
-
|
|
45
|
+
o(!0);
|
|
46
46
|
}
|
|
47
47
|
async resume() {
|
|
48
|
-
|
|
48
|
+
o(!1), this.wrappedGame && (this.wrappedGame.previousTimeStamp = 0, this.wrappedGame.timer.reset());
|
|
49
49
|
}
|
|
50
50
|
async reset() {
|
|
51
|
-
if (!this.
|
|
51
|
+
if (!this.wrappedGame) {
|
|
52
52
|
console.error(this.refErrorMessage);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
await this.
|
|
55
|
+
await this.wrappedGame.loadStage(this.wrappedGame.stages[0]);
|
|
56
56
|
}
|
|
57
57
|
async nextStage() {
|
|
58
|
-
if (!this.
|
|
58
|
+
if (!this.wrappedGame) {
|
|
59
59
|
console.error(this.refErrorMessage);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
if (!
|
|
62
|
+
const e = this.wrappedGame.currentStageId, a = this.wrappedGame.stages.findIndex((r) => r.wrappedStage.uuid === e), t = this.wrappedGame.stages[a + 1];
|
|
63
|
+
if (!t) {
|
|
64
64
|
console.error("next stage called on last stage");
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
await this.
|
|
67
|
+
await this.wrappedGame.loadStage(t);
|
|
68
68
|
}
|
|
69
69
|
async previousStage() {
|
|
70
|
-
if (!this.
|
|
70
|
+
if (!this.wrappedGame) {
|
|
71
71
|
console.error(this.refErrorMessage);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
74
|
+
const e = this.wrappedGame.currentStageId, a = this.wrappedGame.stages.findIndex((r) => r.wrappedStage.uuid === e), t = this.wrappedGame.stages[a - 1];
|
|
75
|
+
if (!t) {
|
|
76
76
|
console.error("previous stage called on first stage");
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
await this.
|
|
79
|
+
await this.wrappedGame.loadStage(t);
|
|
80
80
|
}
|
|
81
81
|
async goToStage() {
|
|
82
82
|
}
|
|
83
83
|
async end() {
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (s) {
|
|
88
|
-
if (s instanceof o) {
|
|
89
|
-
this.gameRef ? (this.gameRef.stages.push(s), this.gameRef.stageMap.set(s.stageRef.uuid, s)) : this.options.push(s);
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
if (typeof s == "function") {
|
|
93
|
-
try {
|
|
94
|
-
const e = s();
|
|
95
|
-
e instanceof o ? this.gameRef ? (this.gameRef.stages.push(e), this.gameRef.stageMap.set(e.stageRef.uuid, e)) : this.options.push(e) : e && typeof e.then == "function" && e.then((a) => {
|
|
96
|
-
a instanceof o && (this.gameRef ? (this.gameRef.stages.push(a), this.gameRef.stageMap.set(a.stageRef.uuid, a)) : this.options.push(a));
|
|
97
|
-
}).catch((a) => console.error("Failed to add async stage", a));
|
|
98
|
-
} catch (e) {
|
|
99
|
-
console.error("Error executing stage factory", e);
|
|
100
|
-
}
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
s && typeof s.then == "function" && s.then((e) => {
|
|
104
|
-
e instanceof o && (this.gameRef ? (this.gameRef.stages.push(e), this.gameRef.stageMap.set(e.stageRef.uuid, e)) : this.options.push(e));
|
|
105
|
-
}).catch((e) => console.error("Failed to add async stage", e));
|
|
106
|
-
}
|
|
107
|
-
return this;
|
|
108
|
-
}
|
|
109
|
-
getGlobal(t) {
|
|
110
|
-
return this.gameRef ? this.gameRef.getGlobal(t) : g(t);
|
|
85
|
+
getGlobal(e) {
|
|
86
|
+
return this.wrappedGame ? this.wrappedGame.getGlobal(e) : i(e);
|
|
111
87
|
}
|
|
112
|
-
setGlobal(
|
|
113
|
-
if (this.
|
|
114
|
-
this.
|
|
88
|
+
setGlobal(e, a) {
|
|
89
|
+
if (this.wrappedGame) {
|
|
90
|
+
this.wrappedGame.setGlobal(e, a);
|
|
115
91
|
return;
|
|
116
92
|
}
|
|
117
|
-
|
|
93
|
+
p(e, a);
|
|
118
94
|
}
|
|
119
|
-
onGlobalChange(
|
|
120
|
-
if (this.
|
|
121
|
-
this.
|
|
95
|
+
onGlobalChange(e, a) {
|
|
96
|
+
if (this.wrappedGame) {
|
|
97
|
+
this.wrappedGame.onGlobalChange(e, a);
|
|
122
98
|
return;
|
|
123
99
|
}
|
|
124
|
-
this.pendingGlobalChangeHandlers.push({ key:
|
|
100
|
+
this.pendingGlobalChangeHandlers.push({ key: e, callback: a });
|
|
125
101
|
}
|
|
126
102
|
}
|
|
127
|
-
function
|
|
128
|
-
return new
|
|
103
|
+
function b(...s) {
|
|
104
|
+
return new m(s);
|
|
129
105
|
}
|
|
130
106
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
107
|
+
m as Game,
|
|
108
|
+
b as createGame
|
|
133
109
|
};
|
|
@@ -4,12 +4,12 @@ import { InputManager } from '../input/input-manager';
|
|
|
4
4
|
import { Timer } from '../core/three-addons/Timer';
|
|
5
5
|
import { ZylemCamera } from '~/lib/camera/zylem-camera';
|
|
6
6
|
import { Stage } from '../stage/stage';
|
|
7
|
-
import {
|
|
7
|
+
import { BaseGlobals, ZylemGameConfig } from './game-interfaces';
|
|
8
8
|
import { GameConfig } from './game-config';
|
|
9
9
|
import { AspectRatioDelegate } from '../device/aspect-ratio';
|
|
10
10
|
import { GameCanvas } from './game-canvas';
|
|
11
|
-
type ZylemGameOptions<TGlobals extends
|
|
12
|
-
export declare class ZylemGame<TGlobals extends
|
|
11
|
+
type ZylemGameOptions<TGlobals extends BaseGlobals> = ZylemGameConfig<Stage, ZylemGame<TGlobals>, TGlobals> & Partial<GameConfig>;
|
|
12
|
+
export declare class ZylemGame<TGlobals extends BaseGlobals> {
|
|
13
13
|
id: string;
|
|
14
14
|
initialGlobals: TGlobals;
|
|
15
15
|
customSetup: ((params: SetupContext<ZylemGame<TGlobals>, TGlobals>) => void) | null;
|
|
@@ -55,3 +55,4 @@ export declare class ZylemGame<TGlobals extends Record<string, BasicTypes> = Glo
|
|
|
55
55
|
onGlobalChange<K extends keyof TGlobals>(key: K, callback: (value: TGlobals[K]) => void): void;
|
|
56
56
|
}
|
|
57
57
|
export default ZylemGame;
|
|
58
|
+
//# sourceMappingURL=zylem-game.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zylem-game.d.ts","sourceRoot":"","sources":["../../../src/lib/game/zylem-game.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,WAAW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