@zylem/game-lib 0.7.0 → 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 +15 -1
- package/dist/actions.d.ts +71 -8
- package/dist/actions.js +1 -1
- 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.js +1 -1
- package/dist/{base-node-life-cycle-CnJ-7zX-.d.ts → base-node-life-cycle-D2NuN1VB.d.ts} +12 -4
- package/dist/behavior.d.ts +2 -3
- package/dist/behavior.js +1 -1
- package/dist/blueprints-TbGY-h53.d.ts +162 -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-ORIDWL3T.js +0 -0
- package/dist/chunk-QB3NL7VQ.js +1 -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-ZRT3ZQVH.js +1 -0
- package/dist/collision-builder-jF-toPIl.d.ts +38 -0
- package/dist/core.d.ts +45 -30
- package/dist/core.js +1 -24
- package/dist/debug-state-BPT6jEog.d.ts +17 -0
- package/dist/debug.d.ts +71 -19
- package/dist/debug.js +1 -1
- package/dist/{default-controls-BGc61yYl.d.ts → default-controls-0-vCnli7.d.ts} +3 -3
- package/dist/{entity-DNkYKfdp.d.ts → entity-BdSI8CL3.d.ts} +63 -444
- package/dist/entity-DZbFQ1Wg.d.ts +28 -0
- package/dist/{entity-type-map-C94h2TDW.d.ts → entity-type-map-Bd69SpAS.d.ts} +153 -6
- package/dist/entity.d.ts +11 -8
- package/dist/entity.js +1 -1
- package/dist/events.d.ts +10 -1
- package/dist/events.js +1 -1
- package/dist/{game-Cuj5gy7U.d.ts → game-C1FHVqXl.d.ts} +429 -133
- package/dist/game-default-QHROHW2O.js +1 -0
- package/dist/{game-interfaces-tfpM5NBk.d.ts → game-interfaces-mchNYSZE.d.ts} +2 -2
- package/dist/globals.d.ts +12 -1
- package/dist/globals.js +1 -1
- package/dist/graphics.d.ts +16 -46
- package/dist/graphics.js +1 -1
- package/dist/input-ui.d.ts +5 -4
- package/dist/input-ui.js +1 -1
- package/dist/input.d.ts +4 -3
- package/dist/input.js +1 -1
- package/dist/{material-Wz83vTTp.d.ts → material-9vJ6SZaI.d.ts} +25 -50
- package/dist/public.d.ts +38 -0
- package/dist/public.js +1 -0
- package/dist/runtime.d.ts +7 -381
- package/dist/runtime.js +1 -1
- 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 +15 -12
- package/dist/web-components.js +1 -9
- package/dist/{zylem-stage-runtime-Cs-UDEVU.d.ts → zylem-camera-C3bn6BTI.d.ts} +62 -264
- package/package.json +28 -20
- package/dist/chunk-73VZQZUL.js +0 -1
- package/dist/chunk-A34ZG3L4.js +0 -1
- package/dist/chunk-CDPY4VOQ.js +0 -1
- package/dist/chunk-DR6XXZE7.js +0 -19
- package/dist/chunk-FM5TBEPO.js +0 -1
- package/dist/chunk-G2IIMSUH.js +0 -1
- package/dist/chunk-NIH5CONO.js +0 -1
- package/dist/chunk-ONWXGBWB.js +0 -1
- package/dist/chunk-QEDQDR27.js +0 -1
- package/dist/chunk-WKHW2QO2.js +0 -1
- package/dist/chunk-YHKXQ2ZN.js +0 -1
- package/dist/game-default-PZLLHYL7.js +0 -1
- package/dist/world-C9zdyl5d.d.ts +0 -103
|
@@ -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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as UpdateFunction } from './base-node-life-cycle-D2NuN1VB.js';
|
|
2
2
|
|
|
3
3
|
type BasicTypes = number | string | boolean;
|
|
4
4
|
type BaseGlobals = Record<string, BasicTypes>;
|
|
@@ -87,4 +87,4 @@ interface ZylemGameConfig<StageInterface, GameInterface, TGlobals extends BaseGl
|
|
|
87
87
|
input?: GameInputConfig;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export type { BaseGlobals as B, GameInputConfig as G, KeyboardMapping as K, MouseConfig as M,
|
|
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 };
|
package/dist/globals.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as UpdateContext } from './base-node-life-cycle-D2NuN1VB.js';
|
|
2
2
|
import 'three';
|
|
3
|
+
import './stage-transition-CmGpV4tc.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Set a global value by path.
|
|
@@ -46,6 +47,16 @@ declare function getGlobals<T = Record<string, unknown>>(): T;
|
|
|
46
47
|
*/
|
|
47
48
|
declare function clearGlobalSubscriptions(): void;
|
|
48
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
|
+
|
|
49
60
|
/**
|
|
50
61
|
* Set a variable on an object by path.
|
|
51
62
|
* @example setVariable(stage1, 'totalAngle', 0.5)
|
package/dist/globals.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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};
|
package/dist/graphics.d.ts
CHANGED
|
@@ -1,44 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
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';
|
|
4
6
|
import 'three';
|
|
5
7
|
import 'three/webgpu';
|
|
6
|
-
import '
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* TSL fire shader for WebGPU.
|
|
10
|
-
*/
|
|
11
|
-
declare const fireTSL: ZylemTSLShader;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* TSL star shader for WebGPU.
|
|
15
|
-
*/
|
|
16
|
-
declare const starTSL: ZylemTSLShader;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* TSL debug wireframe shader for WebGPU.
|
|
20
|
-
*/
|
|
21
|
-
declare const debugTSL: ZylemTSLShader;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Create a gradient sky shader with custom colors.
|
|
25
|
-
*
|
|
26
|
-
* @param groundColor Color below the horizon (default: dark ground)
|
|
27
|
-
* @param horizonColor Color at the horizon line (default: warm orange)
|
|
28
|
-
* @param zenithColor Color directly above (default: deep blue/black)
|
|
29
|
-
*/
|
|
30
|
-
declare function createGradientSky(groundColor?: [number, number, number], horizonColor?: [number, number, number], zenithColor?: [number, number, number]): ZylemTSLShader;
|
|
31
|
-
/**
|
|
32
|
-
* Default gradient sky: dark space above, warm horizon glow, dark ground below.
|
|
33
|
-
* Suitable as a general-purpose game skybox.
|
|
34
|
-
*/
|
|
35
|
-
declare const gradientSkyTSL: ZylemTSLShader;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* TSL starfield skybox shader for WebGPU.
|
|
39
|
-
* Uses world-space position for proper 3D skybox rendering.
|
|
40
|
-
*/
|
|
41
|
-
declare const starfieldSkyTSL: ZylemTSLShader;
|
|
8
|
+
import './vector-CiSHbivc.js';
|
|
9
|
+
import '@zylem/behaviors/core';
|
|
10
|
+
import './entity-DZbFQ1Wg.js';
|
|
42
11
|
|
|
43
12
|
declare const standardShader: {
|
|
44
13
|
vertex: string;
|
|
@@ -55,11 +24,11 @@ declare const objectVertexShader = "\nuniform vec2 uvScale;\nvarying vec2 vUv;\n
|
|
|
55
24
|
*
|
|
56
25
|
* @example
|
|
57
26
|
* ```ts
|
|
58
|
-
* import { createBackgroundShader, Fn,
|
|
27
|
+
* import { createBackgroundShader, Fn, positionWorldDirection, vec4 } from '@zylem/game-lib/graphics';
|
|
59
28
|
*
|
|
60
29
|
* const myShader = createBackgroundShader(
|
|
61
30
|
* Fn(() => {
|
|
62
|
-
* const dir =
|
|
31
|
+
* const dir = positionWorldDirection; // per-pixel view direction
|
|
63
32
|
* return vec4(dir.x, dir.y, dir.z, 1.0);
|
|
64
33
|
* })()
|
|
65
34
|
* );
|
|
@@ -69,10 +38,11 @@ declare const objectVertexShader = "\nuniform vec2 uvScale;\nvarying vec2 vUv;\n
|
|
|
69
38
|
/**
|
|
70
39
|
* Create a background shader from a TSL color node.
|
|
71
40
|
*
|
|
72
|
-
* The
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
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.
|
|
76
46
|
*
|
|
77
47
|
* @param colorNode - A TSL node expression that evaluates to a vec4 color
|
|
78
48
|
* @param transparent - Whether the background should be transparent (default: false)
|
|
@@ -80,4 +50,4 @@ declare const objectVertexShader = "\nuniform vec2 uvScale;\nvarying vec2 vUv;\n
|
|
|
80
50
|
*/
|
|
81
51
|
declare function createBackgroundShader(colorNode: any, transparent?: boolean): ZylemTSLShader;
|
|
82
52
|
|
|
83
|
-
export { ZylemTSLShader, createBackgroundShader,
|
|
53
|
+
export { ZylemTSLShader, createBackgroundShader, objectVertexShader, standardShader };
|
package/dist/graphics.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
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};
|
package/dist/input-ui.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { T as TouchTheme,
|
|
2
|
-
export { D as DefaultTouchControlsOptions, J as JoystickSelection, d as defaultTouchControls,
|
|
3
|
-
import './base-node-life-cycle-
|
|
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
4
|
import 'three';
|
|
5
|
-
import './
|
|
5
|
+
import './stage-transition-CmGpV4tc.js';
|
|
6
|
+
import './game-interfaces-mchNYSZE.js';
|
|
6
7
|
|
|
7
8
|
type TouchThemeInput = TouchTheme | TouchThemeName;
|
|
8
9
|
interface TouchButtonSvgOptions {
|
package/dist/input-ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a
|
|
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
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnalogState,
|
|
3
|
-
import { G as GameInputConfig,
|
|
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
4
|
import 'three';
|
|
5
|
+
import './stage-transition-CmGpV4tc.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Maps arrow keys to axes (Horizontal/Vertical) for the given player.
|
package/dist/input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a
|
|
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};
|
|
@@ -1,45 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Blending, Side, Color, Material } from 'three';
|
|
2
2
|
import { MeshBasicNodeMaterial } from 'three/webgpu';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
type Vec2 = Vector2;
|
|
6
|
-
type Vec3 = Vector3 | Vector3$1;
|
|
7
|
-
type Vec2Components = {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
type Vec3Components = {
|
|
12
|
-
x: number;
|
|
13
|
-
y: number;
|
|
14
|
-
z: number;
|
|
15
|
-
};
|
|
16
|
-
type Vec2Tuple = readonly [number?, number?] & {
|
|
17
|
-
x?: number;
|
|
18
|
-
y?: number;
|
|
19
|
-
};
|
|
20
|
-
type Vec3Tuple = readonly [number?, number?, number?] & {
|
|
21
|
-
x?: number;
|
|
22
|
-
y?: number;
|
|
23
|
-
z?: number;
|
|
24
|
-
};
|
|
25
|
-
type Vec2Input = Vec2 | {
|
|
26
|
-
x?: number;
|
|
27
|
-
y?: number;
|
|
28
|
-
} | Vec2Tuple;
|
|
29
|
-
type Vec3Input = Vec3 | {
|
|
30
|
-
x?: number;
|
|
31
|
-
y?: number;
|
|
32
|
-
z?: number;
|
|
33
|
-
} | Vec3Tuple;
|
|
34
|
-
declare const VEC2_ZERO: Readonly<Vec2Components>;
|
|
35
|
-
declare const VEC2_ONE: Readonly<Vec2Components>;
|
|
36
|
-
declare const VEC3_ZERO: Readonly<Vec3Components>;
|
|
37
|
-
declare const VEC3_ONE: Readonly<Vec3Components>;
|
|
38
|
-
declare function normalizeVec2(input?: Vec2Input | null, defaults?: Vec2Input | Partial<Vec2Components>): Vec2Components;
|
|
39
|
-
declare function normalizeVec3(input?: Vec3Input | null, defaults?: Vec3Input | Partial<Vec3Components>): Vec3Components;
|
|
40
|
-
declare function toThreeVector2(input?: Vec2Input | null, defaults?: Vec2Input | Partial<Vec2Components>): Vector2;
|
|
41
|
-
declare function toThreeVector3(input?: Vec3Input | null, defaults?: Vec3Input | Partial<Vec3Components>): Vector3;
|
|
42
|
-
declare function toRapierVector3(input?: Vec3Input | null, defaults?: Vec3Input | Partial<Vec3Components>): Vector3$1;
|
|
3
|
+
import { b as Vec2Input } from './vector-CiSHbivc.js';
|
|
43
4
|
|
|
44
5
|
declare function shortHash(objString: string): string;
|
|
45
6
|
|
|
@@ -61,7 +22,21 @@ type ZylemShaderObject = {
|
|
|
61
22
|
*/
|
|
62
23
|
type ZylemTSLShader = {
|
|
63
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;
|
|
64
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;
|
|
65
40
|
};
|
|
66
41
|
/**
|
|
67
42
|
* Combined shader type supporting both GLSL and TSL
|
|
@@ -89,21 +64,21 @@ interface MaterialOptions {
|
|
|
89
64
|
*/
|
|
90
65
|
useTSL?: boolean;
|
|
91
66
|
}
|
|
92
|
-
type
|
|
93
|
-
interface
|
|
94
|
-
geometryMap:
|
|
67
|
+
type SharedGeometryMap = Map<symbol, number>;
|
|
68
|
+
interface SharedMaterialMapEntry {
|
|
69
|
+
geometryMap: SharedGeometryMap;
|
|
95
70
|
material: Material;
|
|
96
71
|
}
|
|
97
|
-
type
|
|
72
|
+
type MaterialCacheKey = ReturnType<typeof shortHash>;
|
|
98
73
|
type TexturePath = string | null;
|
|
99
74
|
declare class MaterialBuilder {
|
|
100
|
-
static
|
|
75
|
+
static sharedMaterialMap: Map<MaterialCacheKey, SharedMaterialMapEntry>;
|
|
101
76
|
/**
|
|
102
|
-
* Clear the static
|
|
77
|
+
* Clear the static shared material cache.
|
|
103
78
|
* Should be called during game disposal to prevent stale material references
|
|
104
79
|
* from persisting across demo/stage switches.
|
|
105
80
|
*/
|
|
106
|
-
static
|
|
81
|
+
static clearSharedMaterialCache(): void;
|
|
107
82
|
materials: Material[];
|
|
108
83
|
/**
|
|
109
84
|
* Retained for backward compatibility. game-lib is WebGPU-only and always
|
|
@@ -113,7 +88,7 @@ declare class MaterialBuilder {
|
|
|
113
88
|
*/
|
|
114
89
|
private useTSL;
|
|
115
90
|
constructor(useTSL?: boolean);
|
|
116
|
-
|
|
91
|
+
trackSharedMaterial(options: Partial<MaterialOptions>, entityType: symbol): void;
|
|
117
92
|
build(options: Partial<MaterialOptions>, entityType: symbol): void;
|
|
118
93
|
withColor(color: Color, useTSL?: boolean, opacity?: number): this;
|
|
119
94
|
withShader(shader: ZylemShaderObject, opacity?: number): this;
|
|
@@ -148,4 +123,4 @@ declare class MaterialBuilder {
|
|
|
148
123
|
*/
|
|
149
124
|
declare function createNodeMaterialFromTSL(tslShader: ZylemTSLShader, opacity?: number): MeshBasicNodeMaterial;
|
|
150
125
|
|
|
151
|
-
export {
|
|
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};
|