@zylem/game-lib 0.6.4 → 0.8.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 +18 -2
- package/dist/actions.d.ts +321 -11
- package/dist/actions.js +1 -936
- package/dist/api/game-lib.api.json +54074 -0
- package/dist/api/game-lib.api.md +4544 -0
- package/dist/api/game-lib.d.ts +8258 -0
- package/dist/api/game-lib.typedoc.json +345421 -0
- package/dist/audio.d.ts +13 -0
- package/dist/audio.js +1 -0
- package/dist/base-node-life-cycle-D2NuN1VB.d.ts +151 -0
- package/dist/behavior.d.ts +2 -0
- package/dist/behavior.js +1 -0
- package/dist/blueprints-TbGY-h53.d.ts +162 -0
- package/dist/chunk-4QLJUQSJ.js +1 -0
- package/dist/chunk-7FR5JSQ2.js +1 -0
- package/dist/chunk-7GYFZKK7.js +1 -0
- package/dist/chunk-7WRQ2UAN.js +1 -0
- package/dist/chunk-BH53MBAZ.js +1 -0
- package/dist/chunk-BIGH6D34.js +0 -0
- package/dist/chunk-CM5YRNBJ.js +19 -0
- package/dist/chunk-COM6HJ2L.js +1 -0
- package/dist/chunk-D2PATZCC.js +1 -0
- package/dist/chunk-DFLI7ICU.js +0 -0
- package/dist/chunk-E3UBSUPX.js +1 -0
- package/dist/chunk-FKIKN7RP.js +24 -0
- package/dist/chunk-G4HONLWC.js +1 -0
- package/dist/chunk-IKWE2W6L.js +1 -0
- package/dist/chunk-IPWUDOV5.js +1 -0
- package/dist/chunk-JEHFHUH4.js +0 -0
- package/dist/chunk-JNKPTL77.js +1 -0
- package/dist/chunk-JQKS42G4.js +1 -0
- package/dist/chunk-M3XNO56P.js +1 -0
- package/dist/chunk-MSC2BEO5.js +1 -0
- package/dist/chunk-ORIDWL3T.js +0 -0
- package/dist/chunk-QB3NL7VQ.js +1 -0
- package/dist/chunk-QXVH6POE.js +1 -0
- package/dist/chunk-RXDTAWI2.js +29 -0
- package/dist/chunk-TAUWDQZF.js +9 -0
- package/dist/chunk-VS2D4B3W.js +1 -0
- package/dist/chunk-WQ3WMMZD.js +1 -0
- package/dist/chunk-XK63E4SX.js +1 -0
- package/dist/chunk-XNDS4YFR.js +1 -0
- package/dist/chunk-XNHVRFAK.js +1 -0
- package/dist/chunk-XRP4JJXL.js +1 -0
- package/dist/chunk-YHEWKN7N.js +1 -0
- package/dist/chunk-ZRT3ZQVH.js +1 -0
- package/dist/collision-builder-jF-toPIl.d.ts +38 -0
- package/dist/core.d.ts +223 -16
- package/dist/core.js +1 -12424
- package/dist/debug-state-BPT6jEog.d.ts +17 -0
- package/dist/debug.d.ts +76 -0
- package/dist/debug.js +1 -0
- package/dist/default-controls-0-vCnli7.d.ts +111 -0
- package/dist/{entity-vj-HTjzU.d.ts → entity-BdSI8CL3.d.ts} +119 -626
- package/dist/{entity-Bq_eNEDI.d.ts → entity-DZbFQ1Wg.d.ts} +4 -4
- package/dist/entity-type-map-Bd69SpAS.d.ts +928 -0
- package/dist/entity.d.ts +268 -0
- package/dist/entity.js +1 -0
- package/dist/events.d.ts +181 -0
- package/dist/events.js +1 -0
- package/dist/game-C1FHVqXl.d.ts +1886 -0
- package/dist/game-default-QHROHW2O.js +1 -0
- package/dist/game-interfaces-mchNYSZE.d.ts +90 -0
- package/dist/globals.d.ts +115 -0
- package/dist/globals.js +1 -0
- package/dist/graphics.d.ts +53 -0
- package/dist/graphics.js +1 -0
- package/dist/input-ui.d.ts +35 -0
- package/dist/input-ui.js +1 -0
- package/dist/input.d.ts +73 -0
- package/dist/input.js +1 -0
- package/dist/material-9vJ6SZaI.d.ts +126 -0
- package/dist/public.d.ts +38 -0
- package/dist/public.js +1 -0
- package/dist/runtime.d.ts +59 -0
- package/dist/runtime.js +1 -0
- package/dist/schema/entity.schema.json +244 -0
- package/dist/schema/game-config.schema.json +625 -0
- package/dist/schema/input-config.schema.json +499 -0
- package/dist/schema/stage-config.schema.json +93 -0
- package/dist/schema/stage.schema.json +271 -0
- package/dist/schema.d.ts +538 -0
- package/dist/schema.js +1 -0
- package/dist/stage-transition-CmGpV4tc.d.ts +46 -0
- package/dist/vector-CiSHbivc.d.ts +133 -0
- package/dist/web-components.d.ts +70 -0
- package/dist/web-components.js +1 -0
- package/dist/zylem-camera-C3bn6BTI.d.ts +575 -0
- package/package.json +70 -73
- package/dist/actions.js.map +0 -1
- package/dist/behavior/jumper-2d.d.ts +0 -114
- package/dist/behavior/jumper-2d.js +0 -711
- package/dist/behavior/jumper-2d.js.map +0 -1
- package/dist/behavior/platformer-3d.d.ts +0 -296
- package/dist/behavior/platformer-3d.js +0 -761
- package/dist/behavior/platformer-3d.js.map +0 -1
- package/dist/behavior/ricochet-2d.d.ts +0 -275
- package/dist/behavior/ricochet-2d.js +0 -425
- package/dist/behavior/ricochet-2d.js.map +0 -1
- package/dist/behavior/ricochet-3d.d.ts +0 -117
- package/dist/behavior/ricochet-3d.js +0 -443
- package/dist/behavior/ricochet-3d.js.map +0 -1
- package/dist/behavior/screen-visibility.d.ts +0 -79
- package/dist/behavior/screen-visibility.js +0 -358
- package/dist/behavior/screen-visibility.js.map +0 -1
- package/dist/behavior/screen-wrap.d.ts +0 -87
- package/dist/behavior/screen-wrap.js +0 -246
- package/dist/behavior/screen-wrap.js.map +0 -1
- package/dist/behavior/shooter-2d.d.ts +0 -79
- package/dist/behavior/shooter-2d.js +0 -180
- package/dist/behavior/shooter-2d.js.map +0 -1
- package/dist/behavior/thruster.d.ts +0 -11
- package/dist/behavior/thruster.js +0 -292
- package/dist/behavior/thruster.js.map +0 -1
- package/dist/behavior/top-down-movement.d.ts +0 -56
- package/dist/behavior/top-down-movement.js +0 -125
- package/dist/behavior/top-down-movement.js.map +0 -1
- package/dist/behavior/world-boundary-2d.d.ts +0 -142
- package/dist/behavior/world-boundary-2d.js +0 -235
- package/dist/behavior/world-boundary-2d.js.map +0 -1
- package/dist/behavior/world-boundary-3d.d.ts +0 -76
- package/dist/behavior/world-boundary-3d.js +0 -274
- package/dist/behavior/world-boundary-3d.js.map +0 -1
- package/dist/behavior-descriptor-BXnVR8Ki.d.ts +0 -159
- package/dist/blueprints-DmbK2dki.d.ts +0 -26
- package/dist/camera-4XO5gbQH.d.ts +0 -905
- package/dist/camera.d.ts +0 -6
- package/dist/camera.js +0 -1993
- package/dist/camera.js.map +0 -1
- package/dist/composition-BASvMKrW.d.ts +0 -218
- package/dist/core-CARRaS55.d.ts +0 -541
- package/dist/core.js.map +0 -1
- package/dist/entities-ChFirVL9.d.ts +0 -410
- package/dist/entities.d.ts +0 -9
- package/dist/entities.js +0 -4986
- package/dist/entities.js.map +0 -1
- package/dist/entity-types-DAu8sGJH.d.ts +0 -26
- package/dist/global-change-2JvMaz44.d.ts +0 -25
- package/dist/main.d.ts +0 -1353
- package/dist/main.js +0 -19525
- package/dist/main.js.map +0 -1
- package/dist/physics-pose-DCc4oE44.d.ts +0 -25
- package/dist/physics-protocol-BDD3P5W2.d.ts +0 -200
- package/dist/physics-worker.d.ts +0 -21
- package/dist/physics-worker.js +0 -306
- package/dist/physics-worker.js.map +0 -1
- package/dist/physics.d.ts +0 -205
- package/dist/physics.js +0 -577
- package/dist/physics.js.map +0 -1
- package/dist/stage-types-C19IhuzA.d.ts +0 -731
- package/dist/stage.d.ts +0 -52
- package/dist/stage.js +0 -8479
- package/dist/stage.js.map +0 -1
- package/dist/sync-state-machine-CZyspBpj.d.ts +0 -16
- package/dist/thruster-23lzoPZd.d.ts +0 -180
- package/dist/world-DfgxoNMt.d.ts +0 -105
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as e}from"./chunk-JNKPTL77.js";import"./chunk-VS2D4B3W.js";import"./chunk-JQKS42G4.js";import"./chunk-G4HONLWC.js";import"./chunk-XNHVRFAK.js";import"./chunk-CM5YRNBJ.js";import"./chunk-YHEWKN7N.js";import"./chunk-QXVH6POE.js";import"./chunk-E3UBSUPX.js";import"./chunk-D2PATZCC.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-BH53MBAZ.js";import"./chunk-XRP4JJXL.js";import"./chunk-MSC2BEO5.js";import{proxy as t}from"valtio/vanilla";var s=()=>({id:"zylem",globals:{},stages:[e()],debug:!1,time:0,input:void 0}),a=t({...s()});function o(){return{id:a.id??"zylem",globals:a.globals??{},stages:a.stages??[e()],debug:a.debug,time:a.time,input:a.input}}export{o as getGameDefaultConfig};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { g as UpdateFunction } from './base-node-life-cycle-D2NuN1VB.js';
|
|
2
|
+
|
|
3
|
+
type BasicTypes = number | string | boolean;
|
|
4
|
+
type BaseGlobals = Record<string, BasicTypes>;
|
|
5
|
+
type KeyboardMapping = Record<string, string[]>;
|
|
6
|
+
type MouseMapping = Record<string, string[]>;
|
|
7
|
+
type VirtualTouchStyle = Partial<Record<string, string | number>>;
|
|
8
|
+
interface VirtualTouchPosition {
|
|
9
|
+
top?: string | number;
|
|
10
|
+
right?: string | number;
|
|
11
|
+
bottom?: string | number;
|
|
12
|
+
left?: string | number;
|
|
13
|
+
transform?: string;
|
|
14
|
+
}
|
|
15
|
+
interface VirtualTouchButtonConfig {
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: VirtualTouchStyle;
|
|
19
|
+
position?: VirtualTouchPosition;
|
|
20
|
+
size?: number;
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Trusted SVG markup injected into the control. */
|
|
23
|
+
svg?: string;
|
|
24
|
+
}
|
|
25
|
+
interface VirtualTouchJoystickConfig {
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: VirtualTouchStyle;
|
|
29
|
+
position?: VirtualTouchPosition;
|
|
30
|
+
size?: number;
|
|
31
|
+
thumbSize?: number;
|
|
32
|
+
maxDistance?: number;
|
|
33
|
+
deadzone?: number;
|
|
34
|
+
directionThreshold?: number;
|
|
35
|
+
horizontalAxis?: 'Horizontal' | 'SecondaryHorizontal';
|
|
36
|
+
verticalAxis?: 'Vertical' | 'SecondaryVertical';
|
|
37
|
+
emitDirections?: boolean;
|
|
38
|
+
svg?: {
|
|
39
|
+
base?: string;
|
|
40
|
+
thumb?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
type VirtualTouchButtonSlot = 'A' | 'B' | 'X' | 'Y' | 'Start' | 'Select' | 'L' | 'R' | 'LTrigger' | 'RTrigger' | 'Up' | 'Down' | 'Left' | 'Right';
|
|
44
|
+
type VirtualTouchButtonsConfig = Partial<Record<VirtualTouchButtonSlot, VirtualTouchButtonConfig | false>>;
|
|
45
|
+
interface VirtualTouchJoysticksConfig {
|
|
46
|
+
left?: VirtualTouchJoystickConfig | false;
|
|
47
|
+
right?: VirtualTouchJoystickConfig | false;
|
|
48
|
+
}
|
|
49
|
+
interface VirtualTouchConfig {
|
|
50
|
+
enabled?: boolean | 'auto';
|
|
51
|
+
className?: string;
|
|
52
|
+
style?: VirtualTouchStyle;
|
|
53
|
+
joysticks?: VirtualTouchJoysticksConfig | false;
|
|
54
|
+
buttons?: VirtualTouchButtonsConfig | false;
|
|
55
|
+
}
|
|
56
|
+
interface MouseConfig {
|
|
57
|
+
/** Custom mapping from mouse actions to input properties. */
|
|
58
|
+
mapping?: MouseMapping;
|
|
59
|
+
/** Whether to capture the cursor via Pointer Lock API. */
|
|
60
|
+
pointerLock?: boolean;
|
|
61
|
+
/** Sensitivity multiplier for mouse movement (default 0.002). */
|
|
62
|
+
sensitivity?: number;
|
|
63
|
+
}
|
|
64
|
+
interface GameInputPlayerConfig {
|
|
65
|
+
key?: KeyboardMapping;
|
|
66
|
+
mouse?: MouseConfig;
|
|
67
|
+
touch?: VirtualTouchConfig;
|
|
68
|
+
includeDefaults?: boolean;
|
|
69
|
+
}
|
|
70
|
+
interface GameInputConfig {
|
|
71
|
+
p1?: GameInputPlayerConfig;
|
|
72
|
+
p2?: GameInputPlayerConfig;
|
|
73
|
+
p3?: GameInputPlayerConfig;
|
|
74
|
+
p4?: GameInputPlayerConfig;
|
|
75
|
+
p5?: GameInputPlayerConfig;
|
|
76
|
+
p6?: GameInputPlayerConfig;
|
|
77
|
+
p7?: GameInputPlayerConfig;
|
|
78
|
+
p8?: GameInputPlayerConfig;
|
|
79
|
+
}
|
|
80
|
+
interface ZylemGameConfig<StageInterface, GameInterface, TGlobals extends BaseGlobals> {
|
|
81
|
+
id: string;
|
|
82
|
+
globals?: TGlobals;
|
|
83
|
+
stages?: StageInterface[];
|
|
84
|
+
update?: UpdateFunction<GameInterface>;
|
|
85
|
+
debug?: boolean;
|
|
86
|
+
time?: number;
|
|
87
|
+
input?: GameInputConfig;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type { BaseGlobals as B, GameInputConfig as G, KeyboardMapping as K, MouseConfig as M, VirtualTouchButtonConfig as V, ZylemGameConfig as Z, GameInputPlayerConfig as a, MouseMapping as b, VirtualTouchButtonsConfig as c, VirtualTouchButtonSlot as d, VirtualTouchConfig as e, VirtualTouchJoystickConfig as f, VirtualTouchJoysticksConfig as g, VirtualTouchPosition as h, VirtualTouchStyle as i };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { U as UpdateContext } from './base-node-life-cycle-D2NuN1VB.js';
|
|
2
|
+
import 'three';
|
|
3
|
+
import './stage-transition-CmGpV4tc.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Set a global value by path.
|
|
7
|
+
* Emits a 'game:state:updated' event when the value changes.
|
|
8
|
+
* @example setGlobal('score', 100)
|
|
9
|
+
* @example setGlobal('player.health', 50)
|
|
10
|
+
*/
|
|
11
|
+
declare function setGlobal(path: string, value: unknown): void;
|
|
12
|
+
/**
|
|
13
|
+
* Create/initialize a global with a default value.
|
|
14
|
+
* Only sets the value if it doesn't already exist.
|
|
15
|
+
* Use this to ensure globals have initial values before game starts.
|
|
16
|
+
* @example createGlobal('score', 0)
|
|
17
|
+
* @example createGlobal('player.health', 100)
|
|
18
|
+
*/
|
|
19
|
+
declare function createGlobal<T>(path: string, defaultValue: T): T;
|
|
20
|
+
/**
|
|
21
|
+
* Get a global value by path.
|
|
22
|
+
* @example getGlobal('score') // 100
|
|
23
|
+
* @example getGlobal<number>('player.health') // 50
|
|
24
|
+
*/
|
|
25
|
+
declare function getGlobal<T = unknown>(path: string): T | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Subscribe to changes on a global value at a specific path.
|
|
28
|
+
* Returns an unsubscribe function. Subscriptions are automatically
|
|
29
|
+
* cleaned up when the game is disposed.
|
|
30
|
+
* @example const unsub = onGlobalChange('score', (val) => console.log(val));
|
|
31
|
+
*/
|
|
32
|
+
declare function onGlobalChange<T = unknown>(path: string, callback: (value: T) => void): () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Subscribe to changes on multiple global paths.
|
|
35
|
+
* Callback fires when any of the paths change, receiving all current values.
|
|
36
|
+
* Subscriptions are automatically cleaned up when the game is disposed.
|
|
37
|
+
* @example const unsub = onGlobalChanges(['score', 'lives'], ([score, lives]) => console.log(score, lives));
|
|
38
|
+
*/
|
|
39
|
+
declare function onGlobalChanges<T extends unknown[] = unknown[]>(paths: string[], callback: (values: T) => void): () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Get the entire globals object (read-only snapshot).
|
|
42
|
+
*/
|
|
43
|
+
declare function getGlobals<T = Record<string, unknown>>(): T;
|
|
44
|
+
/**
|
|
45
|
+
* Unsubscribe all active global subscriptions.
|
|
46
|
+
* Used internally on game dispose to prevent old callbacks from firing.
|
|
47
|
+
*/
|
|
48
|
+
declare function clearGlobalSubscriptions(): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Reactive state for the active stage plus per-object variable storage.
|
|
52
|
+
*
|
|
53
|
+
* Provides the valtio `stageState` proxy (background, inputs, gravity, live
|
|
54
|
+
* entity list) with internal setters, and a WeakMap/proxy-backed variable store
|
|
55
|
+
* with public `get/set/create/subscribe/clear` helpers for attaching reactive
|
|
56
|
+
* key/value data to any stage or entity by path. Exists as the central reactive
|
|
57
|
+
* data layer the rest of the stage subsystem reads from and writes to.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Set a variable on an object by path.
|
|
62
|
+
* @example setVariable(stage1, 'totalAngle', 0.5)
|
|
63
|
+
* @example setVariable(entity, 'enemy.count', 10)
|
|
64
|
+
*/
|
|
65
|
+
declare function setVariable(target: object, path: string, value: unknown): void;
|
|
66
|
+
/**
|
|
67
|
+
* Create/initialize a variable with a default value on a target object.
|
|
68
|
+
* Only sets the value if it doesn't already exist.
|
|
69
|
+
* @example createVariable(stage1, 'totalAngle', 0)
|
|
70
|
+
* @example createVariable(entity, 'enemy.count', 10)
|
|
71
|
+
*/
|
|
72
|
+
declare function createVariable<T>(target: object, path: string, defaultValue: T): T;
|
|
73
|
+
/**
|
|
74
|
+
* Get a variable from an object by path.
|
|
75
|
+
* @example getVariable(stage1, 'totalAngle') // 0.5
|
|
76
|
+
* @example getVariable<number>(entity, 'enemy.count') // 10
|
|
77
|
+
*/
|
|
78
|
+
declare function getVariable<T = unknown>(target: object, path: string): T | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Subscribe to changes on a variable at a specific path for a target object.
|
|
81
|
+
* Returns an unsubscribe function.
|
|
82
|
+
* @example const unsub = onVariableChange(stage1, 'score', (val) => console.log(val));
|
|
83
|
+
*/
|
|
84
|
+
declare function onVariableChange<T = unknown>(target: object, path: string, callback: (value: T) => void): () => void;
|
|
85
|
+
/**
|
|
86
|
+
* Subscribe to changes on multiple variable paths for a target object.
|
|
87
|
+
* Callback fires when any of the paths change, receiving all current values.
|
|
88
|
+
* Returns an unsubscribe function.
|
|
89
|
+
* @example const unsub = onVariableChanges(stage1, ['count', 'total'], ([count, total]) => console.log(count, total));
|
|
90
|
+
*/
|
|
91
|
+
declare function onVariableChanges<T extends unknown[] = unknown[]>(target: object, paths: string[], callback: (values: T) => void): () => void;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Listen for a single global key change inside an onUpdate pipeline.
|
|
95
|
+
* Usage: onUpdate(globalChange('p1Score', (value) => { ... }))
|
|
96
|
+
*/
|
|
97
|
+
declare function globalChange<T = any>(key: string, callback: (value: T, ctx: UpdateContext<any>) => void): (ctx: UpdateContext<any>) => void;
|
|
98
|
+
/**
|
|
99
|
+
* Listen for multiple global key changes inside an onUpdate pipeline.
|
|
100
|
+
* Calls back when any of the provided keys changes.
|
|
101
|
+
* Usage: onUpdate(globalChanges(['p1Score','p2Score'], ([p1,p2]) => { ... }))
|
|
102
|
+
*/
|
|
103
|
+
declare function globalChanges<T = any>(keys: string[], callback: (values: T[], ctx: UpdateContext<any>) => void): (ctx: UpdateContext<any>) => void;
|
|
104
|
+
/**
|
|
105
|
+
* Listen for a single stage variable change inside an onUpdate pipeline.
|
|
106
|
+
* Usage: onUpdate(variableChange('score', (value, ctx) => { ... }))
|
|
107
|
+
*/
|
|
108
|
+
declare function variableChange<T = any>(key: string, callback: (value: T, ctx: UpdateContext<any>) => void): (ctx: UpdateContext<any>) => void;
|
|
109
|
+
/**
|
|
110
|
+
* Listen for multiple stage variable changes; fires when any changes.
|
|
111
|
+
* Usage: onUpdate(variableChanges(['a','b'], ([a,b], ctx) => { ... }))
|
|
112
|
+
*/
|
|
113
|
+
declare function variableChanges<T = any>(keys: string[], callback: (values: T[], ctx: UpdateContext<any>) => void): (ctx: UpdateContext<any>) => void;
|
|
114
|
+
|
|
115
|
+
export { clearGlobalSubscriptions, createGlobal, createVariable, getGlobal, getGlobals, getVariable, globalChange, globalChanges, onGlobalChange, onGlobalChanges, onVariableChange, onVariableChanges, setGlobal, setVariable, variableChange, variableChanges };
|
package/dist/globals.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m,b as n,c as o,d as p}from"./chunk-WQ3WMMZD.js";import{h,i,j,k,l}from"./chunk-D2PATZCC.js";import{e as a,f as b,g as c,h as d,i as e,j as f,m as g}from"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";export{g as clearGlobalSubscriptions,b as createGlobal,i as createVariable,c as getGlobal,f as getGlobals,j as getVariable,m as globalChange,n as globalChanges,d as onGlobalChange,e as onGlobalChanges,k as onVariableChange,l as onVariableChanges,a as setGlobal,h as setVariable,o as variableChange,p as variableChanges};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { b as ZylemTSLShader } from './material-9vJ6SZaI.js';
|
|
2
|
+
export { d as ZylemShader, Z as ZylemShaderObject, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-9vJ6SZaI.js';
|
|
3
|
+
export { Z as ZylemPostEffect } from './zylem-camera-C3bn6BTI.js';
|
|
4
|
+
export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
|
|
5
|
+
export { Fn, abs, asin, atan, clamp, cos, dot, exp, float, floor, fract, length, max, min, mix, mod, normalize, positionWorld, positionWorldDirection, pow, sin, smoothstep, step, time, uniform, uv, vec2, vec3, vec4 } from 'three/tsl';
|
|
6
|
+
import 'three';
|
|
7
|
+
import 'three/webgpu';
|
|
8
|
+
import './vector-CiSHbivc.js';
|
|
9
|
+
import '@zylem/behaviors/core';
|
|
10
|
+
import './entity-DZbFQ1Wg.js';
|
|
11
|
+
|
|
12
|
+
declare const standardShader: {
|
|
13
|
+
vertex: string;
|
|
14
|
+
fragment: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare const objectVertexShader = "\nuniform vec2 uvScale;\nvarying vec2 vUv;\n\nvoid main() {\n\tvUv = uv;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n}\n";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Convenience factory for creating background (skybox) shaders.
|
|
21
|
+
*
|
|
22
|
+
* Wraps a TSL color node into a {@link ZylemTSLShader} object suitable for
|
|
23
|
+
* passing to `stageConfig({ backgroundShader: ... })`.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { createBackgroundShader, Fn, positionWorldDirection, vec4 } from '@zylem/game-lib/graphics';
|
|
28
|
+
*
|
|
29
|
+
* const myShader = createBackgroundShader(
|
|
30
|
+
* Fn(() => {
|
|
31
|
+
* const dir = positionWorldDirection; // per-pixel view direction
|
|
32
|
+
* return vec4(dir.x, dir.y, dir.z, 1.0);
|
|
33
|
+
* })()
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a background shader from a TSL color node.
|
|
40
|
+
*
|
|
41
|
+
* The node is rendered via the WebGPU renderer's `scene.backgroundNode` — a
|
|
42
|
+
* true skybox pass evaluated per background pixel at infinite depth — and
|
|
43
|
+
* should produce a `vec4` color output. Use `positionWorldDirection` (from
|
|
44
|
+
* `three/tsl`), which in this context is the normalized per-pixel view
|
|
45
|
+
* direction, to compute colors in spherical coordinates.
|
|
46
|
+
*
|
|
47
|
+
* @param colorNode - A TSL node expression that evaluates to a vec4 color
|
|
48
|
+
* @param transparent - Whether the background should be transparent (default: false)
|
|
49
|
+
* @returns A ZylemTSLShader that can be used as `backgroundShader` in stage config
|
|
50
|
+
*/
|
|
51
|
+
declare function createBackgroundShader(colorNode: any, transparent?: boolean): ZylemTSLShader;
|
|
52
|
+
|
|
53
|
+
export { ZylemTSLShader, createBackgroundShader, objectVertexShader, standardShader };
|
package/dist/graphics.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,b as o,c as p,d as q,e as r,f as s,g as t,h as u,i as v,j as w,k as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as H,v as I,w as J}from"./chunk-QB3NL7VQ.js";import{a}from"./chunk-7GYFZKK7.js";import{a as b,b as c,h as d,i as e,k as f,l as g,m as h,n as i,o as j,p as k,q as l,r as m}from"./chunk-CM5YRNBJ.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";export{m as Fn,y as abs,x as asin,w as atan,t as clamp,v as cos,n as createBackgroundShader,f as createNodeMaterialFromTSL,a as crossfadeTransitionShader,G as dot,z as exp,l as float,E as floor,F as fract,e as isGLSLShader,d as isTSLShader,H as length,C as max,D as min,r as mix,J as mod,q as normalize,b as objectVertexShader,p as positionWorld,o as positionWorldDirection,A as pow,u as sin,s as smoothstep,c as standardShader,B as step,i as time,g as uniform,h as uv,I as vec2,j as vec3,k as vec4};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { T as TouchTheme, b as TouchThemeName } from './default-controls-0-vCnli7.js';
|
|
2
|
+
export { D as DefaultTouchControlsOptions, J as JoystickSelection, d as defaultTouchControls, a as resolveButtonAccent, r as resolveTouchTheme, t as touchThemes } from './default-controls-0-vCnli7.js';
|
|
3
|
+
import './base-node-life-cycle-D2NuN1VB.js';
|
|
4
|
+
import 'three';
|
|
5
|
+
import './stage-transition-CmGpV4tc.js';
|
|
6
|
+
import './game-interfaces-mchNYSZE.js';
|
|
7
|
+
|
|
8
|
+
type TouchThemeInput = TouchTheme | TouchThemeName;
|
|
9
|
+
interface TouchButtonSvgOptions {
|
|
10
|
+
/** Stroke + text accent color. Overrides any theme-resolved accent. */
|
|
11
|
+
accent?: string;
|
|
12
|
+
/** Theme name or full theme object (defaults to `'default'`). */
|
|
13
|
+
theme?: TouchThemeInput;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Stylized joystick base SVG: outer ring, subtle inner ring, and four
|
|
17
|
+
* directional tabs. Designed to scale to any size; consumes only theme
|
|
18
|
+
* color tokens so a single `theme` argument re-skins the whole control.
|
|
19
|
+
*/
|
|
20
|
+
declare function joystickBaseSvg(theme?: TouchThemeInput): string;
|
|
21
|
+
/**
|
|
22
|
+
* Stylized joystick thumb SVG: filled disc with a subtle inner highlight ring.
|
|
23
|
+
*/
|
|
24
|
+
declare function joystickThumbSvg(theme?: TouchThemeInput): string;
|
|
25
|
+
/**
|
|
26
|
+
* Stylized button SVG with a centered label. The accent color drives the
|
|
27
|
+
* outer stroke, the inner translucent fill, and the label text color, so
|
|
28
|
+
* each button can have its own visual identity within a shared theme.
|
|
29
|
+
*
|
|
30
|
+
* @param label Display text (length affects font size, like the engine default).
|
|
31
|
+
* @param options `accent` overrides the theme accent; `theme` selects the palette.
|
|
32
|
+
*/
|
|
33
|
+
declare function touchButtonSvg(label: string, options?: TouchButtonSvgOptions): string;
|
|
34
|
+
|
|
35
|
+
export { type TouchButtonSvgOptions, TouchTheme, type TouchThemeInput, TouchThemeName, joystickBaseSvg, joystickThumbSvg, touchButtonSvg };
|
package/dist/input-ui.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-ORIDWL3T.js";import{a,b,c,d,e,f,g}from"./chunk-RXDTAWI2.js";import"./chunk-MSC2BEO5.js";export{g as defaultTouchControls,d as joystickBaseSvg,e as joystickThumbSvg,c as resolveButtonAccent,b as resolveTouchTheme,f as touchButtonSvg,a as touchThemes};
|
package/dist/input.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { b as InputPlayer } from './base-node-life-cycle-D2NuN1VB.js';
|
|
2
|
+
export { A as AnalogState, d as ButtonName, B as ButtonState, c as InputGamepad, e as InputPlayerNumber, f as InputProvider, I as Inputs } from './base-node-life-cycle-D2NuN1VB.js';
|
|
3
|
+
import { G as GameInputConfig, e as VirtualTouchConfig } from './game-interfaces-mchNYSZE.js';
|
|
4
|
+
import 'three';
|
|
5
|
+
import './stage-transition-CmGpV4tc.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Maps arrow keys to axes (Horizontal/Vertical) for the given player.
|
|
9
|
+
* @example stage.setInputConfiguration(useArrowsForAxes('p1'));
|
|
10
|
+
*/
|
|
11
|
+
declare function useArrowsForAxes(player: InputPlayer): GameInputConfig;
|
|
12
|
+
/**
|
|
13
|
+
* Maps arrow keys to secondary axes for the given player.
|
|
14
|
+
* @example stage.setInputConfiguration(useArrowsForSecondaryAxes('p1'));
|
|
15
|
+
*/
|
|
16
|
+
declare function useArrowsForSecondaryAxes(player: InputPlayer): GameInputConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Maps arrow keys to directions (Up/Down/Left/Right) for the given player.
|
|
19
|
+
* Useful when `includeDefaults` is false and you still want arrow-key directions.
|
|
20
|
+
* @example stage.setInputConfiguration(useArrowsForDirections('p1'));
|
|
21
|
+
*/
|
|
22
|
+
declare function useArrowsForDirections(player: InputPlayer): GameInputConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Maps W/A/S/D keys to directions (Up/Down/Left/Right) for the given player.
|
|
25
|
+
* @example stage.setInputConfiguration(useWASDForDirections('p1'));
|
|
26
|
+
*/
|
|
27
|
+
declare function useWASDForDirections(player: InputPlayer): GameInputConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Maps W/A/S/D keys to axes (Horizontal/Vertical) for the given player.
|
|
30
|
+
* @example stage.setInputConfiguration(useWASDForAxes('p1'));
|
|
31
|
+
*/
|
|
32
|
+
declare function useWASDForAxes(player: InputPlayer): GameInputConfig;
|
|
33
|
+
/**
|
|
34
|
+
* Maps I/J/K/L keys to axes (Horizontal/Vertical) for the given player.
|
|
35
|
+
* @example stage.setInputConfiguration(useIJKLForAxes('p1'));
|
|
36
|
+
*/
|
|
37
|
+
declare function useIJKLForAxes(player: InputPlayer): GameInputConfig;
|
|
38
|
+
/**
|
|
39
|
+
* Maps I/J/K/L keys to directions (Up/Down/Left/Right) for the given player.
|
|
40
|
+
* @example stage.setInputConfiguration(useIJKLForDirections('p1'));
|
|
41
|
+
*/
|
|
42
|
+
declare function useIJKLForDirections(player: InputPlayer): GameInputConfig;
|
|
43
|
+
/**
|
|
44
|
+
* Enables mouse-look with pointer lock for the given player.
|
|
45
|
+
* Mouse movement maps to SecondaryHorizontal/SecondaryVertical axes;
|
|
46
|
+
* left click maps to LTrigger, right click to RTrigger.
|
|
47
|
+
* @example stage.setInputConfiguration(useMouseLook('p1'));
|
|
48
|
+
*/
|
|
49
|
+
declare function useMouseLook(player: InputPlayer, options?: {
|
|
50
|
+
sensitivity?: number;
|
|
51
|
+
}): GameInputConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Enables basic mouse input (no pointer lock) for the given player.
|
|
54
|
+
* @example stage.setInputConfiguration(useMouse('p1'));
|
|
55
|
+
*/
|
|
56
|
+
declare function useMouse(player: InputPlayer, options?: {
|
|
57
|
+
sensitivity?: number;
|
|
58
|
+
}): GameInputConfig;
|
|
59
|
+
/**
|
|
60
|
+
* Enables virtual touch controls for the given player.
|
|
61
|
+
* By default the provider auto-enables itself on mobile/touch devices.
|
|
62
|
+
* @example stage.setInputConfiguration(useVirtualControls('p1'));
|
|
63
|
+
*/
|
|
64
|
+
declare function useVirtualControls(player: InputPlayer, options?: VirtualTouchConfig): GameInputConfig;
|
|
65
|
+
/**
|
|
66
|
+
* Deep-merges multiple GameInputConfig objects into one.
|
|
67
|
+
* At the player level, configs are merged (both apply).
|
|
68
|
+
* At the key level, later configs win on conflict.
|
|
69
|
+
* @example mergeInputConfigs(useArrowsForAxes('p1'), useWASDForDirections('p1'));
|
|
70
|
+
*/
|
|
71
|
+
declare function mergeInputConfigs(...configs: GameInputConfig[]): GameInputConfig;
|
|
72
|
+
|
|
73
|
+
export { InputPlayer, mergeInputConfigs, useArrowsForAxes, useArrowsForDirections, useArrowsForSecondaryAxes, useIJKLForAxes, useIJKLForDirections, useMouse, useMouseLook, useVirtualControls, useWASDForAxes, useWASDForDirections };
|
package/dist/input.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-JEHFHUH4.js";import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-MSC2BEO5.js";export{k as mergeInputConfigs,a as useArrowsForAxes,c as useArrowsForDirections,b as useArrowsForSecondaryAxes,f as useIJKLForAxes,g as useIJKLForDirections,i as useMouse,h as useMouseLook,j as useVirtualControls,e as useWASDForAxes,d as useWASDForDirections};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Blending, Side, Color, Material } from 'three';
|
|
2
|
+
import { MeshBasicNodeMaterial } from 'three/webgpu';
|
|
3
|
+
import { b as Vec2Input } from './vector-CiSHbivc.js';
|
|
4
|
+
|
|
5
|
+
declare function shortHash(objString: string): string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* GLSL shader object (traditional WebGL approach).
|
|
9
|
+
*
|
|
10
|
+
* @deprecated game-lib renders with WebGPU, which cannot compile raw GLSL
|
|
11
|
+
* `ShaderMaterial`. Author custom shaders as {@link ZylemTSLShader} (TSL)
|
|
12
|
+
* instead. A GLSL shader passed to a material now logs a warning and renders
|
|
13
|
+
* with a default node material.
|
|
14
|
+
*/
|
|
15
|
+
type ZylemShaderObject = {
|
|
16
|
+
fragment: string;
|
|
17
|
+
vertex: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* TSL shader type (for WebGPU)
|
|
21
|
+
* colorNode should be a TSL node that returns the fragment color
|
|
22
|
+
*/
|
|
23
|
+
type ZylemTSLShader = {
|
|
24
|
+
colorNode: any;
|
|
25
|
+
/**
|
|
26
|
+
* Optional TSL node overriding vertex positions (e.g. wave displacement).
|
|
27
|
+
* Requires geometry with enough vertices to displace (e.g. a subdivided
|
|
28
|
+
* plane).
|
|
29
|
+
*/
|
|
30
|
+
positionNode?: any;
|
|
31
|
+
/** Optional TSL node overriding the surface normal. */
|
|
32
|
+
normalNode?: any;
|
|
33
|
+
transparent?: boolean;
|
|
34
|
+
/** Optional three.js blending mode (e.g. `AdditiveBlending`). */
|
|
35
|
+
blending?: Blending;
|
|
36
|
+
/** Optional three.js render side (e.g. `DoubleSide`). */
|
|
37
|
+
side?: Side;
|
|
38
|
+
/** Optional depth test override (e.g. `false` for overlay holograms). */
|
|
39
|
+
depthTest?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Combined shader type supporting both GLSL and TSL
|
|
43
|
+
*/
|
|
44
|
+
type ZylemShader = ZylemShaderObject | ZylemTSLShader;
|
|
45
|
+
/**
|
|
46
|
+
* Check if a shader is a TSL shader
|
|
47
|
+
*/
|
|
48
|
+
declare function isTSLShader(shader: ZylemShader): shader is ZylemTSLShader;
|
|
49
|
+
/**
|
|
50
|
+
* Check if a shader is a GLSL shader
|
|
51
|
+
*/
|
|
52
|
+
declare function isGLSLShader(shader: ZylemShader): shader is ZylemShaderObject;
|
|
53
|
+
interface MaterialOptions {
|
|
54
|
+
path?: string;
|
|
55
|
+
normalMap?: string;
|
|
56
|
+
repeat?: Vec2Input;
|
|
57
|
+
shader?: ZylemShader;
|
|
58
|
+
color?: Color;
|
|
59
|
+
/** Opacity from 0 (fully transparent) to 1 (fully opaque). */
|
|
60
|
+
opacity?: number;
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated game-lib is WebGPU-only and always builds TSL node materials.
|
|
63
|
+
* This flag is ignored.
|
|
64
|
+
*/
|
|
65
|
+
useTSL?: boolean;
|
|
66
|
+
}
|
|
67
|
+
type SharedGeometryMap = Map<symbol, number>;
|
|
68
|
+
interface SharedMaterialMapEntry {
|
|
69
|
+
geometryMap: SharedGeometryMap;
|
|
70
|
+
material: Material;
|
|
71
|
+
}
|
|
72
|
+
type MaterialCacheKey = ReturnType<typeof shortHash>;
|
|
73
|
+
type TexturePath = string | null;
|
|
74
|
+
declare class MaterialBuilder {
|
|
75
|
+
static sharedMaterialMap: Map<MaterialCacheKey, SharedMaterialMapEntry>;
|
|
76
|
+
/**
|
|
77
|
+
* Clear the static shared material cache.
|
|
78
|
+
* Should be called during game disposal to prevent stale material references
|
|
79
|
+
* from persisting across demo/stage switches.
|
|
80
|
+
*/
|
|
81
|
+
static clearSharedMaterialCache(): void;
|
|
82
|
+
materials: Material[];
|
|
83
|
+
/**
|
|
84
|
+
* Retained for backward compatibility. game-lib is WebGPU-only and always
|
|
85
|
+
* builds TSL node materials, so this no longer changes behavior.
|
|
86
|
+
*
|
|
87
|
+
* @deprecated
|
|
88
|
+
*/
|
|
89
|
+
private useTSL;
|
|
90
|
+
constructor(useTSL?: boolean);
|
|
91
|
+
trackSharedMaterial(options: Partial<MaterialOptions>, entityType: symbol): void;
|
|
92
|
+
build(options: Partial<MaterialOptions>, entityType: symbol): void;
|
|
93
|
+
withColor(color: Color, useTSL?: boolean, opacity?: number): this;
|
|
94
|
+
withShader(shader: ZylemShaderObject, opacity?: number): this;
|
|
95
|
+
withTSLShader(shader: ZylemTSLShader, opacity?: number): this;
|
|
96
|
+
private applyOpacity;
|
|
97
|
+
/**
|
|
98
|
+
* Set texture - loads in background (deferred).
|
|
99
|
+
* Material is created immediately with null map, texture applies when loaded.
|
|
100
|
+
*/
|
|
101
|
+
setTexture(texturePath?: TexturePath, repeat?: Vec2Input, _useTSL?: boolean, opacity?: number, color?: Color): void;
|
|
102
|
+
/**
|
|
103
|
+
* Set normal map for the current material
|
|
104
|
+
*/
|
|
105
|
+
setNormalMap(normalMapPath: string, repeat?: Vec2Input): void;
|
|
106
|
+
setColor(color: Color, _useTSL?: boolean, opacity?: number): void;
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated GLSL shaders cannot compile on the WebGPU renderer. This now
|
|
109
|
+
* logs a warning and creates a default node material so the entity still
|
|
110
|
+
* renders. Author custom shaders as {@link ZylemTSLShader} (TSL) and use
|
|
111
|
+
* {@link withTSLShader} / `material.shader` instead.
|
|
112
|
+
*/
|
|
113
|
+
setShader(_customShader: ZylemShaderObject, opacity?: number): void;
|
|
114
|
+
/**
|
|
115
|
+
* Set TSL shader (WebGPU compatible)
|
|
116
|
+
*/
|
|
117
|
+
setTSLShader(tslShader: ZylemTSLShader, opacity?: number): void;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Build a standalone WebGPU node material ({@link MeshBasicNodeMaterial}) from
|
|
121
|
+
* a {@link ZylemTSLShader}. Useful for runtime material swapping outside the
|
|
122
|
+
* entity material pipeline (e.g. demos that toggle shader "looks").
|
|
123
|
+
*/
|
|
124
|
+
declare function createNodeMaterialFromTSL(tslShader: ZylemTSLShader, opacity?: number): MeshBasicNodeMaterial;
|
|
125
|
+
|
|
126
|
+
export { MaterialBuilder as M, type TexturePath as T, type ZylemShaderObject as Z, isGLSLShader as a, type ZylemTSLShader as b, createNodeMaterialFromTSL as c, type ZylemShader as d, type MaterialOptions as e, isTSLShader as i };
|
package/dist/public.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export { A as AspectRatio, q as AspectRatioValue, k as CameraManager, j as CameraOptions, C as CameraWrapper, D as DeviceProfile, p as FirstPersonOptions, l as FirstPersonPerspective, o as Fixed2DOptions, F as Fixed2DPerspective, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, P as PerspectiveOptions, y as RenderBundleManager, z as RenderStrategyManager, R as ResolutionInput, e as ResolveGameConfigRuntime, v as RetroPreset, w as RetroPresetKey, x as RetroResolution, S as StageConfigLike, h as StageOptions, n as ThirdPersonOptions, T as ThirdPersonPerspective, i as createCamera, c as createGame, m as createPerspective, f as createStage, g as gameConfig, r as getDisplayAspect, t as getPresetResolution, u as parseResolution, s as stageConfig } from './game-C1FHVqXl.js';
|
|
2
|
+
export { G as GameInputConfig, a as GameInputPlayerConfig, K as KeyboardMapping, M as MouseConfig, b as MouseMapping, V as VirtualTouchButtonConfig, d as VirtualTouchButtonSlot, c as VirtualTouchButtonsConfig, e as VirtualTouchConfig, f as VirtualTouchJoystickConfig, g as VirtualTouchJoysticksConfig, h as VirtualTouchPosition, i as VirtualTouchStyle, Z as ZylemGameConfig } from './game-interfaces-mchNYSZE.js';
|
|
3
|
+
export { CameraFeedOptions, FollowTargetOptions, RenderCategory, STAGE_STATE_CHANGE, StageManager, StageStateChangeEvent, Vect3, createFollowTarget, dispatchStageState, entitySpawner, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, usesManagedRenderPath, vessel } from './core.js';
|
|
4
|
+
export { f as EntityBlueprint, j as EntityJson, d as EntityJsonSchema, E as EntitySchema, i as LineEntityData, L as LineEntityDataSchema, h as SpriteEntityData, b as SpriteEntityDataSchema, S as StageBlueprint, k as StageJson, e as StageJsonSchema, c as StageSchema, g as TextEntityData, T as TextEntityDataSchema, V as Vector2Schema, a as Vector3TupleSchema } from './blueprints-TbGY-h53.js';
|
|
5
|
+
export { A as AnalogState, d as ButtonName, B as ButtonState, c as InputGamepad, b as InputPlayer, e as InputPlayerNumber, f as InputProvider, I as Inputs, L as LoadingEvent, a as SetupContext, S as StageNavigationOptions, U as UpdateContext } from './base-node-life-cycle-D2NuN1VB.js';
|
|
6
|
+
export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
|
|
7
|
+
export { g as CameraAction, f as CameraBehavior, d as CameraContext, e as CameraPerspective, j as CameraPipeline, h as CameraPipelineState, C as CameraPose, P as PerspectiveType, a as Perspectives, c as PoseDelta, T as TransformLike, V as Viewport, Z as ZylemPostEffect, b as ZylemRenderer, i as isWebGPUSupported } from './zylem-camera-C3bn6BTI.js';
|
|
8
|
+
export { S as StageEntity } from './entity-DZbFQ1Wg.js';
|
|
9
|
+
export { l as SimulationBody, S as SimulationStepClock, f as VEC2_ONE, g as VEC2_ZERO, h as VEC3_ONE, i as VEC3_ZERO, V as Vec2, a as Vec2Components, b as Vec2Input, c as Vec3, d as Vec3Components, e as Vec3Input, n as normalizeVec2, j as normalizeVec3, t as toThreeVector2, k as toThreeVector3 } from './vector-CiSHbivc.js';
|
|
10
|
+
export { A as ACTOR_TYPE, $ as AmbientLightOptions, B as BOX_TYPE, z as CONE_TYPE, J as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a1 as DirectionalLightOptions, aj as EntityForType, ai as EntityTypeMap, a7 as FOG_TYPE, a0 as HemisphereLightOptions, Y as LIGHT_TYPE, aa as LINE_TYPE, a4 as LightShadowOptions, ad as LinePickResult, n as OnEnterParams, o as OnExitParams, O as OnHeldParams, U as PARTICLE_SYSTEM_TYPE, M as PILL_TYPE, P as PLANE_TYPE, G as PYRAMID_TYPE, a2 as PointLightOptions, R as RECT_TYPE, S as SPHERE_TYPE, f as SPRITE_TYPE, a3 as SpotLightOptions, h as SpriteAnimation, g as SpriteImage, T as TEXT_TYPE, m as ZONE_TYPE, q as ZylemActor, Z as ZylemBox, y as ZylemCone, I as ZylemCylinder, w as ZylemDisk, a6 as ZylemFog, ag as ZylemFogHeightOptions, ah as ZylemFogNoiseOptions, ae as ZylemFogOptions, af as ZylemFogType, X as ZylemLight, _ as ZylemLightOptions, a9 as ZylemLine, ac as ZylemLineOptions, Q as ZylemParticleSystem, V as ZylemParticleSystemOptions, L as ZylemPill, j as ZylemPlane, F as ZylemPyramid, u as ZylemRect, b as ZylemSphere, e as ZylemSprite, s as ZylemText, l as ZylemZone, p as createActor, c as createBox, x as createCone, H as createCylinder, v as createDisk, a5 as createFog, W as createLight, a8 as createLine, N as createParticleSystem, K as createPill, i as createPlane, E as createPyramid, t as createRect, a as createSphere, d as createSprite, r as createText, k as createZone, ab as pickZylemLine } from './entity-type-map-Bd69SpAS.js';
|
|
11
|
+
export { A as Action, C as CollisionComponent, G as GameEntity, a as GameEntityOptions, b as boxCollision, d as coneCollision, c as create, e as cylinderCollision, x as getRotation, f as pillCollision, g as planeCollision, p as pyramidCollision, i as rotateEuler, r as rotateInDirection, j as rotateX, k as rotateY, h as rotateYEuler, l as rotateZ, w as setRotation, q as setRotationDegrees, u as setRotationDegreesX, t as setRotationDegreesY, v as setRotationDegreesZ, n as setRotationX, m as setRotationY, o as setRotationZ, s as sphereCollision, z as zoneCollision } from './entity-BdSI8CL3.js';
|
|
12
|
+
export { IconSize, IconSizePreset, ScreenAnchor, TemplateFactory, boxMesh, coneMesh, createCooldownIcon, createEntity, createEntityFactory, cylinderMesh, destroy, pillMesh, pyramidMesh, sphereMesh } from './entity.js';
|
|
13
|
+
export { BehaviorDescriptor, BehaviorHandle, BehaviorRef, BehaviorSystem, BehaviorSystemFactory, BoundaryRicochet3DCoordinator, BoundaryRicochet3DEntity, BoundaryRicochetCoordinator, BoundaryRicochetEntity, BoundaryRicochetUpdate, BurstParticlePresetOptions, CooldownBehavior, CooldownConfig, CooldownEntry, CooldownHandle, CooldownOptions, DefineBehaviorConfig, Destructible3DBehavior, Destructible3DBehaviorOptions, Destructible3DColliderOptions, Destructible3DFragmentColliderShape, Destructible3DFragmentPhysicsOptions, Destructible3DHandle, DestructibleMesh, DestructiblePrebakeWorkerAPI, FacingAngle2DEntity, FirstPersonBehavior, FirstPersonBehaviorOptions, FirstPersonContext, FirstPersonEntity, FirstPersonEvent, FirstPersonFSM, FirstPersonInputComponent, FirstPersonMovementComponent, FirstPersonPresentation, FirstPersonShooterCoordinator, FirstPersonShooterEntity, FirstPersonShooterInput, FirstPersonState, FirstPersonStateComponent, FractureOptions, FractureOptionsInput, JumpConfig2D, JumpConfig3D, JumpContext2D, JumpContext3D, JumpInput2D, JumpInput3D, JumpState2D, JumpState3D, Jumper2DBehavior, Jumper2DBehaviorOptions, Jumper2DEntity, Jumper2DEvent, Jumper2DFSM, Jumper2DState, Jumper3DBehavior, Jumper3DBehaviorOptions, Jumper3DEntity, Jumper3DEvent, Jumper3DFSM, Jumper3DState, MultidirectionalSpaceShooterCoordinator, MultidirectionalSpaceShooterEntity, MultidirectionalSpaceShooterInput, ParticleEffectDefinition, ParticleEmitterBehavior, ParticleEmitterBehaviorOptions, ParticleEmitterHandle, ParticleMagicAgency, ParticleMagicAlignment, ParticleMagicModifierInput, ParticleMagicModifierOptions, ParticleMagicOrder, ParticleMagicRealityEffect, ParticleMagicTemperament, ParticlePresetMaterialOptions, PhysicsBodyComponent, PlainBufferGeometryPayload, PlainFractureOptions, Platformer2DBehavior, Platformer2DBehaviorOptions, Platformer2DCollisionContext, Platformer2DContext, Platformer2DEntity, Platformer2DEvent, Platformer2DFSM, Platformer2DInputComponent, Platformer2DMovementComponent, Platformer2DState, Platformer2DStateComponent, Platformer3DBehavior, Platformer3DBehaviorOptions, Platformer3DContext, Platformer3DEntity, Platformer3DEvent, Platformer3DFSM, Platformer3DInputComponent, Platformer3DMovementComponent, Platformer3DState, Platformer3DStateComponent, PlatformerCollisionContext, PlayerInput, PrebakeWorkerRequest, PrebakeWorkerResponse, ResolvedAim2D, Ricochet2DBehavior, Ricochet2DCollisionContext, Ricochet2DEvent, Ricochet2DFSM, Ricochet2DHandle, Ricochet2DOptions, Ricochet2DResult, Ricochet2DState, Ricochet3DBehavior, Ricochet3DCallback, Ricochet3DCollisionContext, Ricochet3DEvent, Ricochet3DFSM, Ricochet3DHandle, Ricochet3DOptions, Ricochet3DResult, Ricochet3DState, RicochetCallback, ScreenVisibilityBehavior, ScreenVisibilityChangeContext, ScreenVisibilityFSM, ScreenVisibilityHandle, ScreenVisibilityOptions, ScreenVisibilitySize, ScreenVisibilitySnapshot, ScreenWrapBehavior, ScreenWrapEvent, ScreenWrapFSM, ScreenWrapOptions, ScreenWrapState, SemanticParticlePresetOptions, Shooter2DAimFireInput, Shooter2DBehavior, Shooter2DBehaviorOptions, Shooter2DFireArgs, Shooter2DHandle, Shooter2DProjectileFactory, Shooter2DSourceEntity, Shooter2DStageLike, Shooter2DStateComponent, Shooter2DTarget, ThrusterBehavior, ThrusterBehaviorOptions, ThrusterEntity, ThrusterEvent, ThrusterFSM, ThrusterFSMContext, ThrusterInputComponent, ThrusterMovementComponent, ThrusterState, ThrusterStateComponent, TopDownMovementBehavior, TopDownMovementBehaviorOptions, TopDownMovementComponent, TopDownMovementEntity, TopDownMovementHandle, TopDownMovementInputComponent, TopDownMovementStateComponent, TopDownShooterCoordinator, TopDownShooterEntity, TopDownShooterInput, TransformComponent, Vec3Like, ViewmodelConfig, VoronoiOptions, WorldBoundary2DBehavior, WorldBoundary2DBounds, WorldBoundary2DEvent, WorldBoundary2DFSM, WorldBoundary2DHandle, WorldBoundary2DHit, WorldBoundary2DHits, WorldBoundary2DOptions, WorldBoundary2DPosition, WorldBoundary2DState, WorldBoundary3DBehavior, WorldBoundary3DBounds, WorldBoundary3DEvent, WorldBoundary3DFSM, WorldBoundary3DHandle, WorldBoundary3DHit, WorldBoundary3DHits, WorldBoundary3DOptions, WorldBoundary3DPosition, WorldBoundary3DState, computeWorldBoundary2DHits, computeWorldBoundary3DHits, createFirstPersonInputComponent, createFirstPersonMovementComponent, createFirstPersonStateComponent, createJumpConfig2D, createJumpConfig3D, createJumpInput2D, createJumpInput3D, createJumpState2D, createJumpState3D, createPhysicsBodyComponent, createPlatformer2DInputComponent, createPlatformer2DMovementComponent, createPlatformer2DStateComponent, createPlatformer3DInputComponent, createPlatformer3DMovementComponent, createPlatformer3DStateComponent, createShooter2DStateComponent, createThrusterInputComponent, createThrusterMovementComponent, createThrusterStateComponent, createTopDownMovementComponent, createTopDownMovementInputComponent, createTopDownMovementStateComponent, createTransformComponent, defineBehavior, fireCooldown, fireShooter2DIfRequested, getCooldown, getCooldownStore, getEntityFacingAngle2D, hasAnyWorldBoundary2DHit, hasAnyWorldBoundary3DHit, particleEffect, particlePresets, registerCooldown, resetCooldown, resolveAim2D, tickCooldowns, updateBoundaryRicochet, useBehavior } from '@zylem/behaviors';
|
|
14
|
+
export { RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY, RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY, RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY, RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY, RUNTIME_RICOCHET_2D_BEHAVIOR_KEY, RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY, RuntimeBoundary2DBehavior, RuntimeBoundary2DOptions, RuntimeDynamicCircleBody2DBehavior, RuntimeDynamicCircleBody2DHandle, RuntimeDynamicCircleBody2DOptions, RuntimeGoalZone2DBehavior, RuntimeGoalZone2DEvent, RuntimeGoalZone2DHandle, RuntimeGoalZone2DOptions, RuntimePlayerInput2DBehavior, RuntimePlayerInput2DOptions, RuntimeRicochet2DBehavior, RuntimeRicochet2DEvent, RuntimeRicochet2DHandle, RuntimeRicochet2DOptions, RuntimeTriggerRegion2DBehavior, RuntimeTriggerRegion2DEvent, RuntimeTriggerRegion2DHandle, RuntimeTriggerRegion2DOptions, bindRuntimeDynamicCircleBody2DHandle, emitRuntimeGoal, emitRuntimeRicochet, emitRuntimeTriggerRegionEnter } from '@zylem/behaviors/runtime-2d';
|
|
15
|
+
export { FadeOpacityOptions, MoveByOptions, MoveToOptions, OpacityEntity, RotateByOptions, ThrottleOptions, applyTransformChanges, callFunc, delay, fadeOpacity, moveBy, moveTo, onPress, onRelease, parallel, repeat, repeatForever, resetEntityOpacity, rotateBy, sequence, throttle } from './actions.js';
|
|
16
|
+
export { BehaviorRuntime, EntityDefinition, EntityHandle, Simulation, SimulationBodyDefinition, SimulationColliderDefinition, SimulationEvent, SimulationFrame, SimulationOptions, StageBodyConfig, StageBodyInfo, StageBodyKind, StageBodyKindValue, StageBoundaryDim, StageColliderConfig, StageColliderShape, StageDebugRender, StageEvent, StageEventType, StagePose, StageRaycastHit, StageRenderSlot, StageRicochetDim, StageRicochetReflection, StageTopDownPlane, TransformState, createSimulation, createTransformStore, getPosition, getVelocity, move, moveForwardXY, moveX, moveXY, moveXZ, moveY, moveZ, resetVelocity, setPosition, setPositionX, setPositionY, setPositionZ, wrapAround3D, wrapAroundXY } from '@zylem/behaviors/core';
|
|
17
|
+
export { mergeInputConfigs, useArrowsForAxes, useArrowsForDirections, useArrowsForSecondaryAxes, useIJKLForAxes, useIJKLForDirections, useMouse, useMouseLook, useVirtualControls, useWASDForAxes, useWASDForDirections } from './input.js';
|
|
18
|
+
export { D as DefaultTouchControlsOptions, J as JoystickSelection, T as TouchTheme, b as TouchThemeName, d as defaultTouchControls, a as resolveButtonAccent, r as resolveTouchTheme, t as touchThemes } from './default-controls-0-vCnli7.js';
|
|
19
|
+
export { TouchButtonSvgOptions, TouchThemeInput, joystickBaseSvg, joystickThumbSvg, touchButtonSvg } from './input-ui.js';
|
|
20
|
+
export { EntityConfigPayload, EntityEvents, EventEmitterDelegate, GameEvents, GameLoadingPayload, StageConfigPayload, StageEvents, StateDispatchPayload, ZylemEvents, zylemEventBus } from './events.js';
|
|
21
|
+
export { clearGlobalSubscriptions, createGlobal, createVariable, getGlobal, getGlobals, getVariable, globalChange, globalChanges, onGlobalChange, onGlobalChanges, onVariableChange, onVariableChanges, setGlobal, setVariable, variableChange, variableChanges } from './globals.js';
|
|
22
|
+
export { pingPongBeep, ricochetSound } from './audio.js';
|
|
23
|
+
export { Howl } from 'howler';
|
|
24
|
+
export { D as DebugTools, d as debugState, s as setDebugTool, a as setPaused, b as setSelectedEntity } from './debug-state-BPT6jEog.js';
|
|
25
|
+
export { EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, entityThumbnailCache, focusEntity, registerEntityFocusContext } from './debug.js';
|
|
26
|
+
export { ZylemGameElement, ZylemGameState } from './web-components.js';
|
|
27
|
+
export { RuntimeBodyOptions, RuntimeColliderOptions, RuntimeCollisionBundle, buildBoxCollider, buildCapsuleCollider, buildConvexHullCollider, buildCylinderCollider, buildHeightfieldCollider, buildRuntimeBody, buildSphereCollider, buildTrimeshCollider, bundleRuntimeCollision } from './runtime.js';
|
|
28
|
+
export { ColorJsonSchema, GameConfigJson, GameConfigJsonSchema, GameDeviceConfigJson, GameDeviceConfigJsonSchema, GameInputConfigJson, GameInputConfigSchema, GameInputPlayerConfigSchema, KeyboardMappingSchema, MouseConfigSchema, MouseMappingSchema, ResolutionInputSchema, StageAssetLoaderConfigSchema, StageConfigJson, StageConfigJsonSchema, StageGLTFAssetLoaderConfigSchema, Vec3ComponentsSchema, VirtualTouchButtonConfigSchema, VirtualTouchButtonsConfigSchema, VirtualTouchConfigSchema, VirtualTouchJoystickConfigSchema, VirtualTouchJoysticksConfigSchema, VirtualTouchPositionSchema, VirtualTouchStyleSchema } from './schema.js';
|
|
29
|
+
export { createBackgroundShader, objectVertexShader, standardShader } from './graphics.js';
|
|
30
|
+
export { d as ZylemShader, Z as ZylemShaderObject, b as ZylemTSLShader, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-9vJ6SZaI.js';
|
|
31
|
+
export { Fn, abs, asin, atan, clamp, cos, dot, exp, float, floor, fract, length, max, min, mix, mod, normalize, positionWorld, positionWorldDirection, pow, sin, smoothstep, step, time, uniform, uv, vec2, vec3, vec4 } from 'three/tsl';
|
|
32
|
+
export { p as packCollisionGroups } from './collision-builder-jF-toPIl.js';
|
|
33
|
+
import 'three';
|
|
34
|
+
import '@sinclair/typebox';
|
|
35
|
+
import 'three/webgpu';
|
|
36
|
+
import '@zylem/behaviors/particle-emitter';
|
|
37
|
+
import 'three/addons/lines/webgpu/Line2.js';
|
|
38
|
+
import 'mitt';
|
package/dist/public.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,b as n,c as l,d as S,e as h,f as y,g as L,h as v,i as Z,j as b,k as g,l as u,m as T,n as j,o as F,p as W,q as k,r as w,s as z,t as B,u as D,v as E,w as G}from"./chunk-QB3NL7VQ.js";import"./chunk-BIGH6D34.js";import"./chunk-DFLI7ICU.js";import{a as Va}from"./chunk-TAUWDQZF.js";import{a as qa,b as Aa,c as Ca,d as Ha,e as Ia,f as Ja,g as Ka,h as Qa,i as Ra,j as Ua,k as Xa,l as Ya,m as _a,n as $a,o as op,p as rp}from"./chunk-IKWE2W6L.js";import{A as kp,B as wp,C as zp,a as ep,b as tp,c as mp,d as ap,e as pp,f as fp,g as xp,h as ip,i as dp,j as cp,k as sp,l as np,m as lp,n as Sp,o as hp,p as yp,q as Lp,r as vp,s as Zp,t as bp,u as gp,v as up,w as Tp,x as jp,y as Fp,z as Wp}from"./chunk-M3XNO56P.js";import{a as po,b as fo,c as xo,d as io,e as Lo,f as Mr,g as Nr,h as Rr,i as Ur,j as Xr,k as Yr,l as _r,m as $r,n as oe,o as re}from"./chunk-FKIKN7RP.js";import{a as bo}from"./chunk-7GYFZKK7.js";import{a as K,b as Q}from"./chunk-COM6HJ2L.js";import{a as ao,c as go,d as uo,e as To,f as sr,g as nr,h as br,i as gr,k as ur,l as Tr,m as jr,n as Fr,o as Wr,p as kr,q as wr,r as zr,s as Br,t as Er,v as Gr}from"./chunk-JNKPTL77.js";import{c as vr,d as Zr}from"./chunk-VS2D4B3W.js";import{a as C,c as H,e as I,f as J}from"./chunk-JQKS42G4.js";import{b as xr}from"./chunk-G4HONLWC.js";import{A as ke,B as we,C as ze,D as Be,E as De,F as Ee,G as Ge,H as Me,I as Ne,J as Oe,K as Pe,L as Ve,M as qe,N as Ae,O as Ce,P as He,Q as Ie,R as Je,a as ee,b as te,c as me,d as ae,e as pe,f as fe,g as xe,h as ie,i as de,j as ce,k as se,l as ne,m as le,n as Se,o as he,p as ye,q as Le,r as ve,s as Ze,t as be,u as ge,v as ue,w as Te,x as je,y as Fe,z as We}from"./chunk-7FR5JSQ2.js";import{b as Or,c as Pr,d as Vr,e as qr,f as Ar,g as Cr,h as Hr,i as Ir,j as Jr,k as Kr,m as Qr}from"./chunk-XNDS4YFR.js";import{c as Uo,d as Xo,e as Yo,f as _o,g as $o,h as or,i as rr,j as er,n as tr,p as mr,t as ar,u as pr,v as fr,w as ir,x as dr,y as cr}from"./chunk-XNHVRFAK.js";import{a as o,b as r,h as e,i as t,k as m,l as a,m as p,n as f,o as x,p as i,q as d,r as c}from"./chunk-CM5YRNBJ.js";import{a as vo,b as Zo}from"./chunk-YHEWKN7N.js";import"./chunk-QXVH6POE.js";import{a as Ro}from"./chunk-E3UBSUPX.js";import{$ as Jt,$a as Jm,A as Lt,Aa as Lm,B as vt,Ba as vm,C as Zt,Ca as Zm,D as bt,Da as bm,E as gt,Ea as gm,F as ut,Fa as um,G as Tt,Ga as Tm,H as jt,Ha as jm,I as Ft,Ia as Fm,J as Wt,Ja as Wm,K as kt,Ka as km,L as wt,La as wm,M as zt,Ma as zm,N as Bt,Na as Bm,O as Dt,Oa as Dm,P as Et,Pa as Em,Q as Gt,Qa as Gm,R as Mt,Ra as Mm,S as Nt,Sa as Nm,T as Ot,Ta as Om,U as Pt,Ua as Pm,V as Vt,Va as Vm,W as qt,Wa as qm,X as At,Xa as Am,Y as Ct,Ya as Cm,Z as Ht,Za as Hm,_ as It,_a as Im,a as Ke,aa as Kt,ab as Km,b as Qe,ba as Qt,bb as Qm,c as Re,ca as Rt,cb as Rm,d as Ue,da as Ut,db as Um,e as Xe,ea as Xt,eb as Xm,f as Ye,fa as Yt,fb as Ym,g as _e,ga as _t,gb as _m,h as $e,ha as $t,hb as $m,i as ot,ia as om,ib as oa,j as rt,ja as rm,k as et,ka as em,l as tt,la as tm,m as mt,ma as mm,n as at,na as am,o as pt,oa as pm,p as ft,pa as fm,q as xt,qa as xm,r as it,ra as im,s as dt,sa as dm,t as ct,ta as cm,u as st,ua as sm,v as nt,va as nm,w as lt,wa as lm,x as St,xa as Sm,y as ht,ya as hm,z as yt,za as ym}from"./chunk-XK63E4SX.js";import{a as ra,b as ea,c as ta}from"./chunk-ZRT3ZQVH.js";import{a as ma,b as aa,c as pa,d as fa}from"./chunk-WQ3WMMZD.js";import{h as lr,i as Sr,j as hr,k as yr,l as Lr}from"./chunk-D2PATZCC.js";import{e as M,f as N,g as O,h as P,i as V,j as q,m as A}from"./chunk-4QLJUQSJ.js";import{a as jo,b as Fo,c as Wo,d as ko,g as wo,h as zo,i as Bo,j as Do}from"./chunk-7WRQ2UAN.js";import{A as Ga,B as Ma,C as Na,D as Oa,E as Pa,a as xa,b as ia,c as da,d as ca,e as sa,f as na,g as la,h as Sa,i as ha,j as ya,k as La,l as va,m as Za,n as ba,o as ga,p as ua,q as Ta,r as ja,s as Fa,t as Wa,u as ka,v as wa,w as za,x as Ba,y as Da,z as Ea}from"./chunk-IPWUDOV5.js";import{a as Dr}from"./chunk-BH53MBAZ.js";import{a as Eo,b as Go,c as Mo,d as No,e as Oo,f as Po,g as Vo,h as qo,i as Ao,j as Co,k as Ho,l as Io,m as Jo,n as Ko,o as Qo}from"./chunk-XRP4JJXL.js";import"./chunk-JEHFHUH4.js";import"./chunk-ORIDWL3T.js";import{a as co,b as so,c as no,d as lo,e as So,f as ho,g as yo}from"./chunk-RXDTAWI2.js";import{a as R,b as U,c as X,d as Y,e as _,f as $,g as oo,h as ro,i as eo,j as to,k as mo}from"./chunk-MSC2BEO5.js";export{ar as ACTOR_TYPE,po as AspectRatio,xe as BOX_TYPE,Ke as BoundaryRicochet3DCoordinator,Qe as BoundaryRicochetCoordinator,Fe as CONE_TYPE,De as CYLINDER_TYPE,kr as CameraManager,ur as CameraPipeline,wr as CameraWrapper,up as ColorJsonSchema,Re as CooldownBehavior,ue as DISK_TYPE,Ue as Destructible3DBehavior,Xe as DestructibleMesh,ip as EntityJsonSchema,tp as EntitySchema,K as EntityThumbnailCache,vo as EventEmitterDelegate,ir as FOG_TYPE,Ye as FirstPersonBehavior,_e as FirstPersonEvent,$e as FirstPersonFSM,Fr as FirstPersonPerspective,et as FirstPersonPresentation,ot as FirstPersonShooterCoordinator,rt as FirstPersonState,jr as Fixed2DPerspective,c as Fn,tt as FractureOptions,Rr as Game,zp as GameConfigJsonSchema,wp as GameDeviceConfigJsonSchema,gp as GameInputConfigSchema,bp as GameInputPlayerConfigSchema,ta as Howl,mt as Jumper2DBehavior,at as Jumper2DEvent,pt as Jumper2DFSM,ft as Jumper2DState,xt as Jumper3DBehavior,it as Jumper3DEvent,dt as Jumper3DFSM,ct as Jumper3DState,cp as KeyboardMappingSchema,Ae as LIGHT_TYPE,Hr as LINE_TYPE,fp as LineEntityDataSchema,Zp as MouseConfigSchema,sp as MouseMappingSchema,st as MultidirectionalSpaceShooterCoordinator,Pe as PARTICLE_SYSTEM_TYPE,Me as PILL_TYPE,le as PLANE_TYPE,we as PYRAMID_TYPE,nt as ParticleEmitterBehavior,gr as Perspectives,lt as Platformer2DBehavior,St as Platformer2DEvent,ht as Platformer2DFSM,yt as Platformer2DState,Lt as Platformer3DBehavior,vt as Platformer3DEvent,Zt as Platformer3DFSM,bt as Platformer3DState,Ze as RECT_TYPE,Jm as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,Km as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,Qm as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,Rm as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,Um as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,Xm as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,sr as RenderBundleManager,nr as RenderStrategyManager,kp as ResolutionInputSchema,gt as Ricochet2DBehavior,ut as Ricochet2DEvent,Tt as Ricochet2DFSM,jt as Ricochet2DState,Ft as Ricochet3DBehavior,Wt as Ricochet3DEvent,kt as Ricochet3DFSM,wt as Ricochet3DState,Vm as RuntimeBoundary2DBehavior,qm as RuntimeDynamicCircleBody2DBehavior,Am as RuntimeGoalZone2DBehavior,Cm as RuntimePlayerInput2DBehavior,Hm as RuntimeRicochet2DBehavior,Im as RuntimeTriggerRegion2DBehavior,ce as SPHERE_TYPE,qr as SPRITE_TYPE,Yr as STAGE_STATE_CHANGE,zt as ScreenVisibilityBehavior,Bt as ScreenVisibilityFSM,Dt as ScreenWrapBehavior,Et as ScreenWrapEvent,Gt as ScreenWrapFSM,Mt as ScreenWrapState,Nt as Shooter2DBehavior,xr as SimulationBody,xp as SpriteEntityDataSchema,Fp as StageAssetLoaderConfigSchema,Ua as StageBodyKind,Xa as StageBoundaryDim,Wp as StageConfigJsonSchema,Ya as StageEventType,jp as StageGLTFAssetLoaderConfigSchema,dp as StageJsonSchema,Nr as StageManager,_a as StageRicochetDim,$a as StageRicochetReflection,mp as StageSchema,op as StageTopDownPlane,Or as TEXT_TYPE,ap as TextEntityDataSchema,Tr as ThirdPersonPerspective,Ot as ThrusterBehavior,Pt as ThrusterEvent,Vt as ThrusterFSM,qt as ThrusterState,At as TopDownMovementBehavior,Ct as TopDownShooterCoordinator,Fo as VEC2_ONE,jo as VEC2_ZERO,ko as VEC3_ONE,Wo as VEC3_ZERO,Tp as Vec3ComponentsSchema,ep as Vector2Schema,pp as Vector3TupleSchema,Sp as VirtualTouchButtonConfigSchema,yp as VirtualTouchButtonsConfigSchema,vp as VirtualTouchConfigSchema,hp as VirtualTouchJoystickConfigSchema,Lp as VirtualTouchJoysticksConfigSchema,lp as VirtualTouchPositionSchema,np as VirtualTouchStyleSchema,Ht as WorldBoundary2DBehavior,It as WorldBoundary2DEvent,Jt as WorldBoundary2DFSM,Kt as WorldBoundary2DState,Qt as WorldBoundary3DBehavior,Rt as WorldBoundary3DEvent,Ut as WorldBoundary3DFSM,Xt as WorldBoundary3DState,ye as ZONE_TYPE,pr as ZylemActor,ie as ZylemBox,We as ZylemCone,Ee as ZylemCylinder,Te as ZylemDisk,dr as ZylemFog,Va as ZylemGameElement,Ce as ZylemLight,Jr as ZylemLine,Ve as ZylemParticleSystem,Ne as ZylemPill,Se as ZylemPlane,ze as ZylemPyramid,be as ZylemRect,se as ZylemSphere,Ar as ZylemSprite,Pr as ZylemText,Le as ZylemZone,u as abs,Dr as applyTransformChanges,g as asin,b as atan,Ym as bindRuntimeDynamicCircleBody2DHandle,Uo as boxCollision,ee as boxMesh,Aa as buildBoxCollider,Ha as buildCapsuleCollider,Ja as buildConvexHullCollider,Ia as buildCylinderCollider,Qa as buildHeightfieldCollider,qa as buildRuntimeBody,Ca as buildSphereCollider,Ka as buildTrimeshCollider,Ra as bundleRuntimeCollision,na as callFunc,L as clamp,A as clearGlobalSubscriptions,Yt as computeWorldBoundary2DHits,_t as computeWorldBoundary3DHits,Yo as coneCollision,me as coneMesh,Z as cos,tr as create,fr as createActor,s as createBackgroundShader,de as createBox,zr as createCamera,ke as createCone,Ie as createCooldownIcon,Ge as createCylinder,je as createDisk,mr as createEntity,Qr as createEntityFactory,$t as createFirstPersonInputComponent,om as createFirstPersonMovementComponent,rm as createFirstPersonStateComponent,cr as createFog,oe as createFollowTarget,Ur as createGame,N as createGlobal,em as createJumpConfig2D,tm as createJumpConfig3D,mm as createJumpInput2D,am as createJumpInput3D,pm as createJumpState2D,fm as createJumpState3D,He as createLight,Kr as createLine,m as createNodeMaterialFromTSL,qe as createParticleSystem,Wr as createPerspective,xm as createPhysicsBodyComponent,Oe as createPill,he as createPlane,im as createPlatformer2DInputComponent,dm as createPlatformer2DMovementComponent,cm as createPlatformer2DStateComponent,sm as createPlatformer3DInputComponent,nm as createPlatformer3DMovementComponent,lm as createPlatformer3DStateComponent,Be as createPyramid,ge as createRect,Sm as createShooter2DStateComponent,rp as createSimulation,ne as createSphere,Cr as createSprite,Gr as createStage,Vr as createText,hm as createThrusterInputComponent,ym as createThrusterMovementComponent,Lm as createThrusterStateComponent,vm as createTopDownMovementComponent,Zm as createTopDownMovementInputComponent,bm as createTopDownMovementStateComponent,gm as createTransformComponent,ga as createTransformStore,Sr as createVariable,ve as createZone,bo as crossfadeTransitionShader,$o as cylinderCollision,pe as cylinderMesh,C as debugState,yo as defaultTouchControls,um as defineBehavior,sa as delay,Je as destroy,$r as dispatchStageState,B as dot,_m as emitRuntimeGoal,$m as emitRuntimeRicochet,oa as emitRuntimeTriggerRegionEnter,Xr as entitySpawner,Q as entityThumbnailCache,T as exp,la as fadeOpacity,Tm as fireCooldown,jm as fireShooter2DIfRequested,d as float,w as floor,Zr as focusEntity,z as fract,Lo as gameConfig,Fm as getCooldown,Wm as getCooldownStore,fo as getDisplayAspect,km as getEntityFacingAngle2D,O as getGlobal,q as getGlobals,Ba as getPosition,xo as getPresetResolution,Qo as getRotation,hr as getVariable,Da as getVelocity,ma as globalChange,aa as globalChanges,wm as hasAnyWorldBoundary2DHit,zm as hasAnyWorldBoundary3DHit,_r as initStageStateDispatcher,t as isGLSLShader,To as isManagedRenderEntity,e as isTSLShader,ao as isWebGPUSupported,lo as joystickBaseSvg,So as joystickThumbSvg,D as length,W as max,mo as mergeInputConfigs,k as min,h as mix,G as mod,ua as move,ia as moveBy,za as moveForwardXY,da as moveTo,Ta as moveX,Wa as moveXY,ka as moveXZ,ja as moveY,Fa as moveZ,S as normalize,wo as normalizeVec2,zo as normalizeVec3,o as objectVertexShader,P as onGlobalChange,V as onGlobalChanges,ha as onPress,ya as onRelease,yr as onVariableChange,Lr as onVariableChanges,Ro as packCollisionGroups,va as parallel,io as parseResolution,Bm as particleEffect,Dm as particlePresets,Ir as pickZylemLine,or as pillCollision,fe as pillMesh,ea as pingPongBeep,rr as planeCollision,l as positionWorld,n as positionWorldDirection,j as pow,_o as pyramidCollision,ae as pyramidMesh,Em as registerCooldown,vr as registerEntityFocusContext,Za as repeat,ba as repeatForever,Gm as resetCooldown,xa as resetEntityOpacity,wa as resetVelocity,Mm as resolveAim2D,no as resolveButtonAccent,go as resolveRenderCategory,so as resolveTouchTheme,ra as ricochetSound,ca as rotateBy,Mo as rotateEuler,Eo as rotateInDirection,Oo as rotateX,No as rotateY,Go as rotateYEuler,Po as rotateZ,La as sequence,re as setCameraFeed,I as setDebugTool,M as setGlobal,H as setPaused,Ea as setPosition,Ga as setPositionX,Ma as setPositionY,Na as setPositionZ,Jo as setRotation,Ko as setRotationDegrees,Co as setRotationDegreesX,qo as setRotationDegreesY,Io as setRotationDegreesZ,Ao as setRotationX,Vo as setRotationY,Ho as setRotationZ,J as setSelectedEntity,br as setStageFrameProfilerEnabled,lr as setVariable,v as sin,y as smoothstep,Xo as sphereCollision,te as sphereMesh,Br as stageConfig,Mr as stageState,r as standardShader,F as step,Sa as throttle,Nm as tickCooldowns,f as time,Bo as toThreeVector2,Do as toThreeVector3,ho as touchButtonSvg,co as touchThemes,a as uniform,Om as updateBoundaryRicochet,R as useArrowsForAxes,X as useArrowsForDirections,U as useArrowsForSecondaryAxes,Pm as useBehavior,$ as useIJKLForAxes,oo as useIJKLForDirections,eo as useMouse,ro as useMouseLook,to as useVirtualControls,_ as useWASDForAxes,Y as useWASDForDirections,uo as usesManagedRenderPath,p as uv,pa as variableChange,fa as variableChanges,E as vec2,x as vec3,i as vec4,Er as vessel,Pa as wrapAround3D,Oa as wrapAroundXY,er as zoneCollision,Zo as zylemEventBus};
|