@zylem/game-lib 0.8.2 → 0.8.4
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/dist/actions.d.ts +5 -5
- package/dist/api/game-lib.api.json +2079 -1214
- package/dist/api/game-lib.api.md +150 -97
- package/dist/api/game-lib.d.ts +321 -95
- package/dist/api/game-lib.typedoc.json +141279 -214520
- package/dist/bridge.d.ts +111 -0
- package/dist/bridge.js +1 -0
- package/dist/{chunk-KVSJE4XD.js → chunk-3I537JFL.js} +1 -1
- package/dist/chunk-4CHZUWLF.js +1 -0
- package/dist/chunk-6B5JP7T5.js +24 -0
- package/dist/chunk-AIQ6IVT5.js +1 -0
- package/dist/chunk-C5NEGC3S.js +1 -0
- package/dist/chunk-D3JO4HW2.js +1 -0
- package/dist/chunk-HNCTOJP7.js +1 -0
- package/dist/chunk-LKFF6XJC.js +1 -0
- package/dist/{chunk-CD7ZOZ35.js → chunk-OAWK2UUY.js} +1 -1
- package/dist/chunk-PNLNC3FA.js +1 -0
- package/dist/chunk-TV3AZKT4.js +9 -0
- package/dist/chunk-VIPINV7V.js +19 -0
- package/dist/chunk-W5SXED5T.js +1 -0
- package/dist/{chunk-YAOXFYOD.js → chunk-WBQ5TNRZ.js} +1 -1
- package/dist/{collision-builder-B_tm8OVy.d.ts → collision-builder-4TVDzXsp.d.ts} +1 -1
- package/dist/core.d.ts +11 -11
- package/dist/core.js +1 -1
- package/dist/debug-state-s0s-qndj.d.ts +49 -0
- package/dist/debug.d.ts +32 -7
- package/dist/debug.js +1 -1
- package/dist/{entity-BGEq1yfC.d.ts → entity-BI7cSlK8.d.ts} +3 -3
- package/dist/{entity-B9yZeBm4.d.ts → entity-DDks47JB.d.ts} +1 -1
- package/dist/{entity-type-map-CW6RHQkx.d.ts → entity-type-map-COHu4fkW.d.ts} +41 -7
- package/dist/entity.d.ts +7 -7
- package/dist/entity.js +1 -1
- package/dist/events.d.ts +1 -64
- package/dist/events.js +1 -1
- package/dist/{game-DbqBQiFC.d.ts → game-4fsy55uN.d.ts} +55 -27
- package/dist/game-default-4PPYYGAR.js +1 -0
- package/dist/graphics.d.ts +5 -5
- package/dist/{material-DbSuZBbP.d.ts → material-BKPYeBC6.d.ts} +1 -1
- package/dist/public.d.ts +12 -10
- package/dist/public.js +1 -1
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +1 -1
- package/dist/{vector-DN6zlPoE.d.ts → vector-DPbwlzgG.d.ts} +10 -2
- package/dist/web-components.d.ts +9 -9
- package/dist/web-components.js +1 -1
- package/dist/{zylem-camera-Du2UPW9O.d.ts → zylem-camera-B73ZNcgs.d.ts} +1 -1
- package/package.json +20 -14
- package/LICENSE +0 -21
- package/dist/chunk-3PRBSSTS.js +0 -24
- package/dist/chunk-CFVRRRZZ.js +0 -1
- package/dist/chunk-COM6HJ2L.js +0 -1
- package/dist/chunk-JQKS42G4.js +0 -1
- package/dist/chunk-MZZCDXFB.js +0 -1
- package/dist/chunk-TAUWDQZF.js +0 -9
- package/dist/chunk-VS2D4B3W.js +0 -1
- package/dist/chunk-YHEWKN7N.js +0 -1
- package/dist/debug-state-DRoeasG2.d.ts +0 -17
- package/dist/game-default-6AZZCNST.js +0 -1
package/dist/debug.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { D as DebugTools, d as debugState, s as setDebugTool, a as setPaused, b as setSelectedEntity } from './debug-state-
|
|
1
|
+
export { k as DebugEntityResolver, D as DebugTools, d as debugState, i as getHoveredEntity, h as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, r as registerDebugEntityResolver, j as resolveDebugEntity, s as setDebugTool, f as setHoveredEntityId, a as setPaused, b as setSelectedEntity, c as setSelectedEntityId } from './debug-state-s0s-qndj.js';
|
|
2
2
|
import { Object3D, Vector3 } from 'three';
|
|
3
|
-
import { G as GameEntity } from './entity-
|
|
3
|
+
import { G as GameEntity } from './entity-BI7cSlK8.js';
|
|
4
4
|
import { WebGPURenderer } from 'three/webgpu';
|
|
5
5
|
import '@zylem/behaviors/core';
|
|
6
|
-
import './vector-
|
|
7
|
-
import './material-
|
|
8
|
-
import './collision-builder-
|
|
6
|
+
import './vector-DPbwlzgG.js';
|
|
7
|
+
import './material-BKPYeBC6.js';
|
|
8
|
+
import './collision-builder-4TVDzXsp.js';
|
|
9
9
|
import './base-node-life-cycle-BK9xebT9.js';
|
|
10
10
|
import './stage-transition-CmGpV4tc.js';
|
|
11
11
|
import './events.js';
|
|
@@ -44,6 +44,10 @@ interface ObjectBounds {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
interface EntityThumbnailResult {
|
|
47
|
+
/**
|
|
48
|
+
* Preview image URL. Blob URL when the payload worker is available
|
|
49
|
+
* (encoded off-thread), PNG data URL on the synchronous fallback path.
|
|
50
|
+
*/
|
|
47
51
|
dataUrl: string;
|
|
48
52
|
bounds: Pick<ObjectBounds, 'width' | 'height' | 'depth'>;
|
|
49
53
|
}
|
|
@@ -53,21 +57,42 @@ interface EntityThumbnailCacheEntry extends EntityThumbnailResult {
|
|
|
53
57
|
/**
|
|
54
58
|
* Generates and caches entity thumbnail previews for the editor entity list.
|
|
55
59
|
* Renders a cloned Object3D into an offscreen RenderTarget on the shared WebGPU renderer.
|
|
60
|
+
*
|
|
61
|
+
* A rendered URL leaves this cache the moment it is read, and the editor holds
|
|
62
|
+
* it for as long as the entity is listed. Dropping an entry here therefore
|
|
63
|
+
* must not revoke its blob URL — the consumer owns that lifetime and releases
|
|
64
|
+
* it when the thumbnail is replaced, the entity is removed, or the stage
|
|
65
|
+
* changes.
|
|
56
66
|
*/
|
|
57
67
|
declare class EntityThumbnailCache {
|
|
58
68
|
private cache;
|
|
59
69
|
private inFlight;
|
|
60
70
|
private renderer;
|
|
61
71
|
private size;
|
|
62
|
-
|
|
72
|
+
private maxEntries;
|
|
73
|
+
private queue;
|
|
74
|
+
private activeRenders;
|
|
75
|
+
constructor(size?: number, maxEntries?: number);
|
|
63
76
|
setRenderer(renderer: WebGPURenderer | null): void;
|
|
64
77
|
get(uuid: string): EntityThumbnailCacheEntry | null;
|
|
65
78
|
invalidate(uuid: string): void;
|
|
66
79
|
clear(): void;
|
|
80
|
+
/** Number of thumbnails currently cached. */
|
|
81
|
+
get cacheSize(): number;
|
|
82
|
+
/** Entities waiting for a render slot. */
|
|
83
|
+
get pendingCount(): number;
|
|
67
84
|
/**
|
|
68
|
-
* Return a cached thumbnail or
|
|
85
|
+
* Return a cached thumbnail, or schedule one. Renders are throttled to
|
|
86
|
+
* {@link MAX_CONCURRENT_RENDERS} at a time behind a bounded queue, so a
|
|
87
|
+
* burst of spawns cannot flood the renderer with pixel readbacks.
|
|
69
88
|
*/
|
|
70
89
|
ensure(uuid: string, object: Object3D | null | undefined): Promise<EntityThumbnailCacheEntry | null>;
|
|
90
|
+
/** Start queued renders until the concurrency budget is spent. */
|
|
91
|
+
private drainQueue;
|
|
92
|
+
/** Move an entry to the end of the Map so it is evicted last. */
|
|
93
|
+
private touch;
|
|
94
|
+
/** Evict least-recently-used entries down to the cap. */
|
|
95
|
+
private evictOverflow;
|
|
71
96
|
private render;
|
|
72
97
|
}
|
|
73
98
|
/** Shared cache used by the running game to feed editor entity payloads. */
|
package/dist/debug.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-DFLI7ICU.js";import{a as
|
|
1
|
+
import"./chunk-DFLI7ICU.js";import{a as m,b as n}from"./chunk-VIPINV7V.js";import"./chunk-C5NEGC3S.js";import{a as o,b as p}from"./chunk-LKFF6XJC.js";import{a,b,c,e as d,g as e,h as f,i as g,j as h,k as i,m as j,n as k,o as l}from"./chunk-W5SXED5T.js";export{m as EntityThumbnailCache,a as debugState,n as entityThumbnailCache,p as focusEntity,k as getHoveredEntity,h as getHoveredEntityId,j as getSelectedEntity,f as getSelectedEntityId,b as registerDebugEntityResolver,o as registerEntityFocusContext,c as resolveDebugEntity,e as setDebugTool,i as setHoveredEntityId,d as setPaused,l as setSelectedEntity,g as setSelectedEntityId};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BufferGeometry, Material, Mesh, Group, Vector3, Color, ShaderMaterial } from 'three';
|
|
2
2
|
import { SimulationColliderDefinition, TransformState, SimulationBodyDefinition, MoveableEntity, BehaviorRuntime, Vector, BehaviorDescriptor, BehaviorHandle, BehaviorRef } from '@zylem/behaviors/core';
|
|
3
|
-
import { c as Vec3, e as Vec3Input, b as Vec2Input, l as SimulationBody } from './vector-
|
|
4
|
-
import { M as MaterialBuilder, e as MaterialOptions } from './material-
|
|
5
|
-
import { C as CollisionBuilder, L as LockAxesInput, a as CollisionOptions } from './collision-builder-
|
|
3
|
+
import { c as Vec3, e as Vec3Input, b as Vec2Input, l as SimulationBody } from './vector-DPbwlzgG.js';
|
|
4
|
+
import { M as MaterialBuilder, e as MaterialOptions } from './material-BKPYeBC6.js';
|
|
5
|
+
import { C as CollisionBuilder, L as LockAxesInput, a as CollisionOptions } from './collision-builder-4TVDzXsp.js';
|
|
6
6
|
import { a as SetupContext, U as UpdateContext, D as DestroyContext, h as SetupFunction, i as LoadedFunction, g as UpdateFunction, j as DestroyFunction, C as CleanupFunction, k as LoadedContext, l as CleanupContext } from './base-node-life-cycle-BK9xebT9.js';
|
|
7
7
|
import { EventEmitterDelegate, EntityEvents } from './events.js';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Vector3, Sprite, Color, Object3D, ColorRepresentation, Light, Fog, FogExp2, Scene, Raycaster } from 'three';
|
|
2
|
-
import { G as GameEntity, a as GameEntityOptions, B as BaseNode } from './entity-
|
|
3
|
-
import { d as Vec3Components, e as Vec3Input, b as Vec2Input } from './vector-
|
|
1
|
+
import { Vector3, Sprite, Texture, Color, Object3D, ColorRepresentation, Light, Fog, FogExp2, Scene, Raycaster } from 'three';
|
|
2
|
+
import { G as GameEntity, a as GameEntityOptions, B as BaseNode } from './entity-BI7cSlK8.js';
|
|
3
|
+
import { d as Vec3Components, e as Vec3Input, b as Vec2Input } from './vector-DPbwlzgG.js';
|
|
4
4
|
import { U as UpdateContext, a as SetupContext, D as DestroyContext, l as CleanupContext } from './base-node-life-cycle-BK9xebT9.js';
|
|
5
|
-
import { T as TexturePath, e as MaterialOptions } from './material-
|
|
5
|
+
import { T as TexturePath, e as MaterialOptions } from './material-BKPYeBC6.js';
|
|
6
6
|
import { Simulation } from '@zylem/behaviors/core';
|
|
7
|
-
import { E as Entity } from './entity-
|
|
7
|
+
import { E as Entity } from './entity-DDks47JB.js';
|
|
8
8
|
import { ParticleEmitterBehaviorOptions, ParticleEffectDefinition, ParticleEmitterHandle } from '@zylem/behaviors/particle-emitter';
|
|
9
9
|
import { Line2 } from 'three/addons/lines/webgpu/Line2.js';
|
|
10
10
|
|
|
@@ -104,8 +104,23 @@ type SpriteAnimation = {
|
|
|
104
104
|
speed: number | number[];
|
|
105
105
|
loop: boolean;
|
|
106
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* A single texture divided into a uniform grid of frames, addressed by UV
|
|
109
|
+
* offset. Prefer this over {@link SpriteImage} lists for character sheets: one
|
|
110
|
+
* texture and one draw call instead of one per frame.
|
|
111
|
+
*/
|
|
112
|
+
type SpriteSheet = {
|
|
113
|
+
file: string;
|
|
114
|
+
columns: number;
|
|
115
|
+
rows: number;
|
|
116
|
+
/** Frame names in row-major order. `null` marks an unused cell. */
|
|
117
|
+
frames: Array<string | null>;
|
|
118
|
+
/** Texture filtering. Defaults to `nearest`, which keeps pixel art crisp. */
|
|
119
|
+
filter?: 'nearest' | 'linear';
|
|
120
|
+
};
|
|
107
121
|
type ZylemSpriteOptions = GameEntityOptions & {
|
|
108
122
|
images?: SpriteImage[];
|
|
123
|
+
sheet?: SpriteSheet;
|
|
109
124
|
animations?: SpriteAnimation[];
|
|
110
125
|
size?: Vec3Input;
|
|
111
126
|
collisionSize?: Vec3Input;
|
|
@@ -117,15 +132,34 @@ declare class ZylemSprite extends GameEntity<ZylemSpriteOptions> {
|
|
|
117
132
|
protected spriteMap: Map<string, number>;
|
|
118
133
|
protected currentSpriteIndex: number;
|
|
119
134
|
protected animations: Map<string, any>;
|
|
120
|
-
protected currentAnimation:
|
|
135
|
+
protected currentAnimation: string | null;
|
|
121
136
|
protected currentAnimationFrame: string;
|
|
122
137
|
protected currentAnimationIndex: number;
|
|
123
138
|
protected currentAnimationTime: number;
|
|
139
|
+
/** Set only in sheet mode; the shared texture whose UV window we shift. */
|
|
140
|
+
protected sheetTexture: Texture | null;
|
|
141
|
+
protected flippedX: boolean;
|
|
124
142
|
constructor(options?: ZylemSpriteOptions);
|
|
125
143
|
create(): this;
|
|
126
144
|
protected createSpritesFromImages(images: SpriteImage[]): void;
|
|
145
|
+
protected createSpriteFromSheet(sheet: SpriteSheet): void;
|
|
127
146
|
protected createAnimations(animations: SpriteAnimation[]): void;
|
|
128
147
|
setSprite(key: string): void;
|
|
148
|
+
/**
|
|
149
|
+
* Mirror the sprite horizontally, for characters whose sheet only contains
|
|
150
|
+
* one facing direction.
|
|
151
|
+
*
|
|
152
|
+
* In sheet mode this flips the UV window rather than the sprite scale,
|
|
153
|
+
* because {@link syncSpriteMaterials} rewrites scale from `options.size`
|
|
154
|
+
* every frame and would immediately undo a negative scale.
|
|
155
|
+
*/
|
|
156
|
+
setFlipX(flip: boolean): void;
|
|
157
|
+
isFlippedX(): boolean;
|
|
158
|
+
private applySheetFrame;
|
|
159
|
+
/**
|
|
160
|
+
* Advance a named clip. Call once per frame from an update loop; `delta` is
|
|
161
|
+
* seconds, so scaling it scales playback rate.
|
|
162
|
+
*/
|
|
129
163
|
setAnimation(name: string, delta: number): void;
|
|
130
164
|
private getCurrentRotationQuaternion;
|
|
131
165
|
private syncSpriteMaterials;
|
|
@@ -925,4 +959,4 @@ interface EntityTypeMap {
|
|
|
925
959
|
*/
|
|
926
960
|
type EntityForType<T> = T extends keyof EntityTypeMap ? EntityTypeMap[T] : BaseNode;
|
|
927
961
|
|
|
928
|
-
export { type
|
|
962
|
+
export { type ZylemLightOptions as $, ACTOR_TYPE as A, BOX_TYPE as B, type CollisionShapeType as C, DISK_TYPE as D, CONE_TYPE as E, createPyramid as F, ZylemPyramid as G, PYRAMID_TYPE as H, createCylinder as I, ZylemCylinder as J, CYLINDER_TYPE as K, createPill as L, ZylemPill as M, PILL_TYPE as N, type OnHeldParams as O, PLANE_TYPE as P, createParticleSystem as Q, RECT_TYPE as R, SPHERE_TYPE as S, TEXT_TYPE as T, ZylemParticleSystem as U, PARTICLE_SYSTEM_TYPE as V, type ZylemParticleSystemOptions as W, createLight as X, ZylemLight as Y, ZylemBox as Z, LIGHT_TYPE as _, createSphere as a, type AmbientLightOptions as a0, type HemisphereLightOptions as a1, type DirectionalLightOptions as a2, type PointLightOptions as a3, type SpotLightOptions as a4, type LightShadowOptions as a5, createFog as a6, ZylemFog as a7, FOG_TYPE as a8, createLine as a9, ZylemLine as aa, LINE_TYPE as ab, pickZylemLine as ac, type ZylemLineOptions as ad, type LinePickResult as ae, type ZylemFogOptions as af, type ZylemFogType as ag, type ZylemFogHeightOptions as ah, type ZylemFogNoiseOptions as ai, type EntityTypeMap as aj, type EntityForType as ak, ZylemWorld as al, ZylemSphere as b, createBox as c, createSprite as d, ZylemSprite as e, SPRITE_TYPE as f, type SpriteImage as g, type SpriteAnimation as h, type SpriteSheet as i, createPlane as j, ZylemPlane as k, createZone as l, ZylemZone as m, ZONE_TYPE as n, type OnEnterParams as o, type OnExitParams as p, createActor as q, ZylemActor as r, createText as s, ZylemText as t, createRect as u, ZylemRect as v, createDisk as w, ZylemDisk as x, createCone as y, ZylemCone as z };
|
package/dist/entity.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { A as ACTOR_TYPE,
|
|
2
|
-
import { G as GameEntity, a as GameEntityOptions, E as EntityBuilder, D as EntityMeshBuilder, F as EntityCollisionBuilder, B as BaseNode } from './entity-
|
|
3
|
-
export { C as CollisionComponent, b as boxCollision, d as coneCollision, c as create, e as cylinderCollision, f as pillCollision, g as planeCollision, p as pyramidCollision, s as sphereCollision, z as zoneCollision } from './entity-
|
|
1
|
+
export { A as ACTOR_TYPE, a0 as AmbientLightOptions, B as BOX_TYPE, E as CONE_TYPE, K as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a2 as DirectionalLightOptions, ak as EntityForType, aj as EntityTypeMap, a8 as FOG_TYPE, a1 as HemisphereLightOptions, _ as LIGHT_TYPE, ab as LINE_TYPE, a5 as LightShadowOptions, ae as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, V as PARTICLE_SYSTEM_TYPE, N as PILL_TYPE, P as PLANE_TYPE, H as PYRAMID_TYPE, a3 as PointLightOptions, R as RECT_TYPE, S as SPHERE_TYPE, f as SPRITE_TYPE, a4 as SpotLightOptions, h as SpriteAnimation, g as SpriteImage, i as SpriteSheet, T as TEXT_TYPE, n as ZONE_TYPE, r as ZylemActor, Z as ZylemBox, z as ZylemCone, J as ZylemCylinder, x as ZylemDisk, a7 as ZylemFog, ah as ZylemFogHeightOptions, ai as ZylemFogNoiseOptions, af as ZylemFogOptions, ag as ZylemFogType, Y as ZylemLight, $ as ZylemLightOptions, aa as ZylemLine, ad as ZylemLineOptions, U as ZylemParticleSystem, W as ZylemParticleSystemOptions, M as ZylemPill, k as ZylemPlane, G as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, y as createCone, I as createCylinder, w as createDisk, a6 as createFog, X as createLight, a9 as createLine, Q as createParticleSystem, L as createPill, j as createPlane, F as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ac as pickZylemLine } from './entity-type-map-COHu4fkW.js';
|
|
2
|
+
import { G as GameEntity, a as GameEntityOptions, E as EntityBuilder, D as EntityMeshBuilder, F as EntityCollisionBuilder, B as BaseNode } from './entity-BI7cSlK8.js';
|
|
3
|
+
export { C as CollisionComponent, b as boxCollision, d as coneCollision, c as create, e as cylinderCollision, f as pillCollision, g as planeCollision, p as pyramidCollision, s as sphereCollision, z as zoneCollision } from './entity-BI7cSlK8.js';
|
|
4
4
|
import { Color, Mesh } from 'three';
|
|
5
|
-
import { b as Vec2Input, e as Vec3Input } from './vector-
|
|
6
|
-
import { e as MaterialOptions } from './material-
|
|
5
|
+
import { b as Vec2Input, e as Vec3Input } from './vector-DPbwlzgG.js';
|
|
6
|
+
import { e as MaterialOptions } from './material-BKPYeBC6.js';
|
|
7
7
|
import './base-node-life-cycle-BK9xebT9.js';
|
|
8
8
|
import './stage-transition-CmGpV4tc.js';
|
|
9
9
|
import '@zylem/behaviors/core';
|
|
10
|
-
import './entity-
|
|
10
|
+
import './entity-DDks47JB.js';
|
|
11
11
|
import '@zylem/behaviors/particle-emitter';
|
|
12
12
|
import 'three/addons/lines/webgpu/Line2.js';
|
|
13
|
-
import './collision-builder-
|
|
13
|
+
import './collision-builder-4TVDzXsp.js';
|
|
14
14
|
import './events.js';
|
|
15
15
|
import 'mitt';
|
|
16
16
|
import 'three/webgpu';
|
package/dist/entity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as $,B as aa,C as ba,D as ca,E as da,F as ea,G as fa,H as ga,I as ha,J as ia,K as ja,L as ka,M as la,N as ma,O as na,P as oa,Q as pa,R as qa,a as B,b as C,c as D,d as E,e as F,f as G,g as H,h as I,i as J,j as K,k as L,l as M,m as N,n as O,o as P,p as Q,q as R,r as S,s as T,t as U,u as V,v as W,w as X,x as Y,y as Z,z as _}from"./chunk-
|
|
1
|
+
import{A as $,B as aa,C as ba,D as ca,E as da,F as ea,G as fa,H as ga,I as ha,J as ia,K as ja,L as ka,M as la,N as ma,O as na,P as oa,Q as pa,R as qa,a as B,b as C,c as D,d as E,e as F,f as G,g as H,h as I,i as J,j as K,k as L,l as M,m as N,n as O,o as P,p as Q,q as R,r as S,s as T,t as U,u as V,v as W,w as X,x as Y,y as Z,z as _}from"./chunk-OAWK2UUY.js";import{b as q,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as z,m as A}from"./chunk-PNLNC3FA.js";import{A as m,B as n,C as o,D as p,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,s as i,u as j,y as k,z as l}from"./chunk-3I537JFL.js";import"./chunk-CM5YRNBJ.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-EVYHPR3J.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-XRP4JJXL.js";export{k as ACTOR_TYPE,H as BOX_TYPE,Z as CONE_TYPE,da as CYLINDER_TYPE,W as DISK_TYPE,n as FOG_TYPE,ma as LIGHT_TYPE,w as LINE_TYPE,ja as PARTICLE_SYSTEM_TYPE,ga as PILL_TYPE,N as PLANE_TYPE,aa as PYRAMID_TYPE,T as RECT_TYPE,K as SPHERE_TYPE,t as SPRITE_TYPE,q as TEXT_TYPE,Q as ZONE_TYPE,l as ZylemActor,I as ZylemBox,_ as ZylemCone,ea as ZylemCylinder,X as ZylemDisk,o as ZylemFog,na as ZylemLight,y as ZylemLine,ka as ZylemParticleSystem,ha as ZylemPill,O as ZylemPlane,ba as ZylemPyramid,U as ZylemRect,L as ZylemSphere,u as ZylemSprite,r as ZylemText,R as ZylemZone,a as boxCollision,B as boxMesh,c as coneCollision,D as coneMesh,i as create,m as createActor,J as createBox,$ as createCone,pa as createCooldownIcon,fa as createCylinder,Y as createDisk,j as createEntity,A as createEntityFactory,p as createFog,oa as createLight,z as createLine,la as createParticleSystem,ia as createPill,P as createPlane,ca as createPyramid,V as createRect,M as createSphere,v as createSprite,s as createText,S as createZone,e as cylinderCollision,F as cylinderMesh,qa as destroy,x as pickZylemLine,f as pillCollision,G as pillMesh,g as planeCollision,d as pyramidCollision,E as pyramidMesh,b as sphereCollision,C as sphereMesh,h as zoneCollision};
|
package/dist/events.d.ts
CHANGED
|
@@ -45,68 +45,6 @@ interface GameLoadingPayload extends LoadingEvent {
|
|
|
45
45
|
stageName?: string;
|
|
46
46
|
stageIndex?: number;
|
|
47
47
|
}
|
|
48
|
-
/** Payload for stage configuration sent to editor. */
|
|
49
|
-
interface StageConfigPayload {
|
|
50
|
-
id: string;
|
|
51
|
-
backgroundColor: string;
|
|
52
|
-
backgroundImage: string | null;
|
|
53
|
-
gravity: {
|
|
54
|
-
x: number;
|
|
55
|
-
y: number;
|
|
56
|
-
z: number;
|
|
57
|
-
};
|
|
58
|
-
inputs: Record<string, string[]>;
|
|
59
|
-
variables: Record<string, unknown>;
|
|
60
|
-
}
|
|
61
|
-
/** Payload for entity configuration sent to editor. */
|
|
62
|
-
interface EntityConfigPayload {
|
|
63
|
-
uuid: string;
|
|
64
|
-
name: string;
|
|
65
|
-
type: string;
|
|
66
|
-
position: {
|
|
67
|
-
x: number;
|
|
68
|
-
y: number;
|
|
69
|
-
z: number;
|
|
70
|
-
};
|
|
71
|
-
rotation: {
|
|
72
|
-
x: number;
|
|
73
|
-
y: number;
|
|
74
|
-
z: number;
|
|
75
|
-
};
|
|
76
|
-
scale: {
|
|
77
|
-
x: number;
|
|
78
|
-
y: number;
|
|
79
|
-
z: number;
|
|
80
|
-
};
|
|
81
|
-
/** PNG data URL of a framed entity preview, when available. */
|
|
82
|
-
thumbnail?: string | null;
|
|
83
|
-
/** World-space AABB size used for thumbnail rulers. */
|
|
84
|
-
bounds?: {
|
|
85
|
-
width: number;
|
|
86
|
-
height: number;
|
|
87
|
-
depth: number;
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
/** Payload for state dispatch events from game to editor. */
|
|
91
|
-
interface StateDispatchPayload {
|
|
92
|
-
scope: 'game' | 'stage' | 'entity';
|
|
93
|
-
path: string;
|
|
94
|
-
value: unknown;
|
|
95
|
-
previousValue?: unknown;
|
|
96
|
-
config?: {
|
|
97
|
-
id: string;
|
|
98
|
-
aspectRatio: number;
|
|
99
|
-
fullscreen: boolean;
|
|
100
|
-
bodyBackground: string | undefined;
|
|
101
|
-
internalResolution: {
|
|
102
|
-
width: number;
|
|
103
|
-
height: number;
|
|
104
|
-
} | undefined;
|
|
105
|
-
debug: boolean;
|
|
106
|
-
} | null;
|
|
107
|
-
stageConfig?: StageConfigPayload | null;
|
|
108
|
-
entities?: EntityConfigPayload[] | null;
|
|
109
|
-
}
|
|
110
48
|
type GameEvents = {
|
|
111
49
|
'loading:start': GameLoadingPayload;
|
|
112
50
|
'loading:progress': GameLoadingPayload;
|
|
@@ -117,7 +55,6 @@ type GameEvents = {
|
|
|
117
55
|
'debug': {
|
|
118
56
|
enabled: boolean;
|
|
119
57
|
};
|
|
120
|
-
'state:dispatch': StateDispatchPayload;
|
|
121
58
|
};
|
|
122
59
|
type StageEvents = {
|
|
123
60
|
'stage:loaded': {
|
|
@@ -178,4 +115,4 @@ type ZylemEvents = GameEvents & StageEvents & EntityEvents;
|
|
|
178
115
|
*/
|
|
179
116
|
declare const zylemEventBus: mitt.Emitter<ZylemEvents>;
|
|
180
117
|
|
|
181
|
-
export { type
|
|
118
|
+
export { type EntityEvents, EventEmitterDelegate, type GameEvents, type GameLoadingPayload, type StageEvents, type ZylemEvents, zylemEventBus };
|
package/dist/events.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-BIGH6D34.js";import{a,b}from"./chunk-
|
|
1
|
+
import"./chunk-BIGH6D34.js";import{a,b}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";export{a as EventEmitterDelegate,b as zylemEventBus};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { e as InputPlayerNumber, f as InputProvider, I as Inputs, h as SetupFunction, g as UpdateFunction, j as DestroyFunction, a as SetupContext, U as UpdateContext, D as DestroyContext, L as LoadingEvent, m as IGame, S as StageNavigationOptions } from './base-node-life-cycle-BK9xebT9.js';
|
|
2
2
|
import { G as GameInputConfig, B as BaseGlobals, Z as ZylemGameConfig } from './game-interfaces-vF5sRi1n.js';
|
|
3
|
-
import { G as GameEntity, a as GameEntityOptions, B as BaseNode, y as GameEntityLifeCycle } from './entity-
|
|
3
|
+
import { G as GameEntity, a as GameEntityOptions, B as BaseNode, y as GameEntityLifeCycle } from './entity-BI7cSlK8.js';
|
|
4
4
|
import { Scene, Color, Object3D, Vector3, BufferGeometry, Material, Group, Texture } from 'three';
|
|
5
|
-
import {
|
|
6
|
-
import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-
|
|
7
|
-
import { k as ZylemCamera, R as RendererManager, e as CameraPerspective, d as CameraContext, C as CameraPose, P as PerspectiveType, f as CameraBehavior, g as CameraAction, h as CameraPipelineState, V as Viewport, Z as ZylemPostEffect } from './zylem-camera-
|
|
8
|
-
import { d as ZylemShader } from './material-
|
|
9
|
-
import { l as SimulationBody, e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-
|
|
5
|
+
import { al as ZylemWorld, aj as EntityTypeMap } from './entity-type-map-COHu4fkW.js';
|
|
6
|
+
import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-DDks47JB.js';
|
|
7
|
+
import { k as ZylemCamera, R as RendererManager, e as CameraPerspective, d as CameraContext, C as CameraPose, P as PerspectiveType, f as CameraBehavior, g as CameraAction, h as CameraPipelineState, V as Viewport, Z as ZylemPostEffect } from './zylem-camera-B73ZNcgs.js';
|
|
8
|
+
import { d as ZylemShader } from './material-BKPYeBC6.js';
|
|
9
|
+
import { l as SimulationBody, e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-DPbwlzgG.js';
|
|
10
10
|
import { BehaviorSystem, BehaviorEntityLink, BehaviorRuntime, BehaviorSystemFactory, Simulation } from '@zylem/behaviors/core';
|
|
11
11
|
import { StageEvents, GameEvents } from './events.js';
|
|
12
12
|
import { D as DefaultTouchControlsOptions } from './default-controls-CAKJ5zlo.js';
|
|
@@ -883,13 +883,27 @@ declare class StageDebugDelegate {
|
|
|
883
883
|
private cameraDebugDelegate;
|
|
884
884
|
private debugStateUnsubscribe;
|
|
885
885
|
private focusContextUnregister;
|
|
886
|
+
private entityResolverUnregister;
|
|
887
|
+
private lastDebugEnabled;
|
|
888
|
+
private warnedMissingAddFactory;
|
|
886
889
|
constructor(stage: ZylemStage, options?: StageDebugDelegateOptions);
|
|
890
|
+
/**
|
|
891
|
+
* Supply the factory the `add` tool uses to spawn entities at the clicked
|
|
892
|
+
* point. Without one the tool warns instead of silently doing nothing.
|
|
893
|
+
*/
|
|
894
|
+
setAddEntityFactory(factory: AddEntityFactory | null): void;
|
|
887
895
|
/** Camera used for debug orbit / raycasts (active primary, usually `__debug__`). */
|
|
888
896
|
private getDebugViewCamera;
|
|
889
897
|
private resolveEntity;
|
|
890
898
|
/** Copy all stage children into debugMap so raycast/select tools work after enabling debug mid-session. */
|
|
891
899
|
private populateDebugMap;
|
|
892
900
|
private ensureCameraDebugDelegate;
|
|
901
|
+
/**
|
|
902
|
+
* Activate/deactivate only when `debugState.enabled` actually flips.
|
|
903
|
+
* Hover and selection write to `debugState` every frame, and `activate()`
|
|
904
|
+
* rebuilds post-processing, so reacting to every notification would
|
|
905
|
+
* rebuild the render pipeline once per frame.
|
|
906
|
+
*/
|
|
893
907
|
private syncWithDebugState;
|
|
894
908
|
/** Initialize DOM listeners and switch rendering to the debug orbit camera. */
|
|
895
909
|
private activate;
|
|
@@ -1694,16 +1708,10 @@ declare class ZylemGame<TGlobals extends BaseGlobals> {
|
|
|
1694
1708
|
private rendererObserver;
|
|
1695
1709
|
private eventBusUnsubscribes;
|
|
1696
1710
|
private thumbnailUnsubscribes;
|
|
1697
|
-
/**
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
* must coalesce into a single dispatch instead of one per entity.
|
|
1702
|
-
*/
|
|
1703
|
-
private entityDispatchTimer;
|
|
1704
|
-
private pendingEntityDispatchPath;
|
|
1705
|
-
/** Debounce window (ms) for coalescing entity-driven state dispatches. */
|
|
1706
|
-
private static readonly ENTITY_DISPATCH_DEBOUNCE_MS;
|
|
1711
|
+
/** Serialized last-published game config, for dirty-checking resize churn. */
|
|
1712
|
+
private lastPublishedGameConfig;
|
|
1713
|
+
/** Editor ↔ game bridge adapter (RAF-coalesced publishes, command intake). */
|
|
1714
|
+
private gameBridge;
|
|
1707
1715
|
private readonly gameUpdateParams;
|
|
1708
1716
|
private readonly stageSetupParams;
|
|
1709
1717
|
private readonly stageUpdateParams;
|
|
@@ -1757,27 +1765,47 @@ declare class ZylemGame<TGlobals extends BaseGlobals> {
|
|
|
1757
1765
|
*/
|
|
1758
1766
|
private buildStageConfigPayload;
|
|
1759
1767
|
/**
|
|
1760
|
-
* Build
|
|
1768
|
+
* Build a bridge entity summary for one entity, or null for entities on
|
|
1769
|
+
* the managed render path (instanced packs/bundles), which can number in
|
|
1770
|
+
* the thousands and are not useful in the editor panel.
|
|
1771
|
+
*/
|
|
1772
|
+
private buildEntitySummary;
|
|
1773
|
+
/**
|
|
1774
|
+
* Build the full entities payload for the current stage.
|
|
1761
1775
|
*/
|
|
1762
1776
|
private buildEntitiesPayload;
|
|
1763
1777
|
/**
|
|
1764
|
-
* Generate entity thumbnails as entities become available,
|
|
1778
|
+
* Generate entity thumbnails as entities become available, streaming
|
|
1779
|
+
* upserts/thumbnails/removals to the editor through the bridge
|
|
1780
|
+
* (RAF-coalesced, merged by uuid).
|
|
1781
|
+
*
|
|
1782
|
+
* All of this work exists only to feed the editor, and thumbnails in
|
|
1783
|
+
* particular cost an offscreen render plus a pixel readback on the shared
|
|
1784
|
+
* renderer. Each publisher therefore checks the bridge for a live listener
|
|
1785
|
+
* first, and a late-connecting editor is backfilled from
|
|
1786
|
+
* {@link wireEditorBackfill}.
|
|
1765
1787
|
*/
|
|
1766
1788
|
private wireEntityThumbnails;
|
|
1767
|
-
private clearEntityThumbnailWiring;
|
|
1768
1789
|
/**
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1790
|
+
* Republish the current stage when an editor subscribes after the game
|
|
1791
|
+
* started. Without this, entities added while nothing was listening would
|
|
1792
|
+
* never appear, since the per-entity publishers were skipped.
|
|
1771
1793
|
*/
|
|
1772
|
-
private
|
|
1794
|
+
private wireEditorBackfill;
|
|
1795
|
+
private clearEntityThumbnailWiring;
|
|
1796
|
+
private buildGameConfigPayload;
|
|
1797
|
+
/** Publish the resolved display config over the bridge. */
|
|
1773
1798
|
/**
|
|
1774
|
-
*
|
|
1775
|
-
*
|
|
1799
|
+
* Publish the display config, skipping unchanged payloads. The
|
|
1800
|
+
* `ResizeObserver` on `<zylem-game>` funnels into `setDisplayRuntime`, which
|
|
1801
|
+
* fires on every layout tick even when nothing about the config moved.
|
|
1776
1802
|
*/
|
|
1777
|
-
private
|
|
1803
|
+
private publishGameConfig;
|
|
1804
|
+
/** Publish a full stage snapshot (config + entity list) over the bridge. */
|
|
1805
|
+
private publishStageSnapshot;
|
|
1778
1806
|
/**
|
|
1779
|
-
* Subscribe to the game event bus for stage loading and state events
|
|
1780
|
-
*
|
|
1807
|
+
* Subscribe to the game event bus for stage loading and state events,
|
|
1808
|
+
* mirroring global-variable updates to the editor over the bridge.
|
|
1781
1809
|
*/
|
|
1782
1810
|
private subscribeToEventBus;
|
|
1783
1811
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as e}from"./chunk-4CHZUWLF.js";import"./chunk-C5NEGC3S.js";import"./chunk-D3JO4HW2.js";import"./chunk-LKFF6XJC.js";import"./chunk-W5SXED5T.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-3I537JFL.js";import"./chunk-CM5YRNBJ.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-EVYHPR3J.js";import"./chunk-D2PATZCC.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-BH53MBAZ.js";import"./chunk-XRP4JJXL.js";import"./chunk-UG22Z42P.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};
|
package/dist/graphics.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { b as ZylemTSLShader } from './material-
|
|
2
|
-
export { d as ZylemShader, Z as ZylemShaderObject, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-
|
|
3
|
-
export { Z as ZylemPostEffect } from './zylem-camera-
|
|
1
|
+
import { b as ZylemTSLShader } from './material-BKPYeBC6.js';
|
|
2
|
+
export { d as ZylemShader, Z as ZylemShaderObject, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-BKPYeBC6.js';
|
|
3
|
+
export { Z as ZylemPostEffect } from './zylem-camera-B73ZNcgs.js';
|
|
4
4
|
export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
|
|
5
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
6
|
import 'three';
|
|
7
7
|
import 'three/webgpu';
|
|
8
|
-
import './vector-
|
|
8
|
+
import './vector-DPbwlzgG.js';
|
|
9
9
|
import '@zylem/behaviors/core';
|
|
10
|
-
import './entity-
|
|
10
|
+
import './entity-DDks47JB.js';
|
|
11
11
|
|
|
12
12
|
declare const standardShader: {
|
|
13
13
|
vertex: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Blending, Side, Color, Material } from 'three';
|
|
2
2
|
import { MeshBasicNodeMaterial } from 'three/webgpu';
|
|
3
|
-
import { b as Vec2Input } from './vector-
|
|
3
|
+
import { b as Vec2Input } from './vector-DPbwlzgG.js';
|
|
4
4
|
|
|
5
5
|
declare function shortHash(objString: string): string;
|
|
6
6
|
|
package/dist/public.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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-
|
|
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-4fsy55uN.js';
|
|
2
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-vF5sRi1n.js';
|
|
3
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
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
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-BK9xebT9.js';
|
|
6
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-
|
|
8
|
-
export { S as StageEntity } from './entity-
|
|
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-
|
|
10
|
-
export { A as ACTOR_TYPE,
|
|
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-
|
|
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-B73ZNcgs.js';
|
|
8
|
+
export { S as StageEntity } from './entity-DDks47JB.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-DPbwlzgG.js';
|
|
10
|
+
export { A as ACTOR_TYPE, a0 as AmbientLightOptions, B as BOX_TYPE, E as CONE_TYPE, K as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a2 as DirectionalLightOptions, ak as EntityForType, aj as EntityTypeMap, a8 as FOG_TYPE, a1 as HemisphereLightOptions, _ as LIGHT_TYPE, ab as LINE_TYPE, a5 as LightShadowOptions, ae as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, V as PARTICLE_SYSTEM_TYPE, N as PILL_TYPE, P as PLANE_TYPE, H as PYRAMID_TYPE, a3 as PointLightOptions, R as RECT_TYPE, S as SPHERE_TYPE, f as SPRITE_TYPE, a4 as SpotLightOptions, h as SpriteAnimation, g as SpriteImage, i as SpriteSheet, T as TEXT_TYPE, n as ZONE_TYPE, r as ZylemActor, Z as ZylemBox, z as ZylemCone, J as ZylemCylinder, x as ZylemDisk, a7 as ZylemFog, ah as ZylemFogHeightOptions, ai as ZylemFogNoiseOptions, af as ZylemFogOptions, ag as ZylemFogType, Y as ZylemLight, $ as ZylemLightOptions, aa as ZylemLine, ad as ZylemLineOptions, U as ZylemParticleSystem, W as ZylemParticleSystemOptions, M as ZylemPill, k as ZylemPlane, G as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, y as createCone, I as createCylinder, w as createDisk, a6 as createFog, X as createLight, a9 as createLine, Q as createParticleSystem, L as createPill, j as createPlane, F as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ac as pickZylemLine } from './entity-type-map-COHu4fkW.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-BI7cSlK8.js';
|
|
12
12
|
export { IconSize, IconSizePreset, ScreenAnchor, TemplateFactory, boxMesh, coneMesh, createCooldownIcon, createEntity, createEntityFactory, cylinderMesh, destroy, pillMesh, pyramidMesh, sphereMesh } from './entity.js';
|
|
13
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
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';
|
|
@@ -17,19 +17,21 @@ export { BehaviorRuntime, EntityDefinition, EntityHandle, Simulation, Simulation
|
|
|
17
17
|
export { ScreenCenterLookOptions, ScreenCenterLookTargets, mergeInputConfigs, screenCenterLookDeltas, screenCenterLookTargets, shortestAngleDelta, useArrowsForAxes, useArrowsForDirections, useArrowsForSecondaryAxes, useIJKLForAxes, useIJKLForDirections, useMouse, useMouseLook, useScreenCenterLook, useVirtualControls, useWASDForAxes, useWASDForDirections } from './input.js';
|
|
18
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-CAKJ5zlo.js';
|
|
19
19
|
export { TouchButtonSvgOptions, TouchThemeInput, joystickBaseSvg, joystickThumbSvg, touchButtonSvg } from './input-ui.js';
|
|
20
|
-
export {
|
|
20
|
+
export { EntityEvents, EventEmitterDelegate, GameEvents, GameLoadingPayload, StageEvents, ZylemEvents, zylemEventBus } from './events.js';
|
|
21
21
|
export { clearGlobalSubscriptions, createGlobal, createVariable, getGlobal, getGlobals, getVariable, globalChange, globalChanges, onGlobalChange, onGlobalChanges, onVariableChange, onVariableChanges, setGlobal, setVariable, variableChange, variableChanges } from './globals.js';
|
|
22
22
|
export { pingPongBeep, ricochetSound } from './audio.js';
|
|
23
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-
|
|
24
|
+
export { k as DebugEntityResolver, D as DebugTools, d as debugState, i as getHoveredEntity, h as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, r as registerDebugEntityResolver, j as resolveDebugEntity, s as setDebugTool, f as setHoveredEntityId, a as setPaused, b as setSelectedEntity, c as setSelectedEntityId } from './debug-state-s0s-qndj.js';
|
|
25
25
|
export { EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, entityThumbnailCache, focusEntity, registerEntityFocusContext } from './debug.js';
|
|
26
|
+
export { GameBridge, GameBridgeHost } from './bridge.js';
|
|
27
|
+
export { BRIDGE_READY_EVENT, BridgeChannel, BridgeDebugTool, BridgeHandler, GameLoadingPayload as BridgeLoadingPayload, BridgeMessageType, BridgeMessages, BridgeVec3, EditorToGameMessages, EntitySummaryPayload, EntityThumbnailPayload, GameConfigPayload, GameToEditorMessages, GameVariablePayload, StageConfigPayload, StageSnapshotPayload, ZylemBridge, announceBridgeReady, getZylemBridge } from '@zylem/bridge';
|
|
26
28
|
export { ZylemGameElement, ZylemGameState } from './web-components.js';
|
|
27
29
|
export { RuntimeBodyOptions, RuntimeColliderOptions, RuntimeCollisionBundle, buildBoxCollider, buildCapsuleCollider, buildConvexHullCollider, buildCylinderCollider, buildHeightfieldCollider, buildRuntimeBody, buildSphereCollider, buildTrimeshCollider, bundleRuntimeCollision } from './runtime.js';
|
|
28
30
|
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
31
|
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-
|
|
32
|
+
export { d as ZylemShader, Z as ZylemShaderObject, b as ZylemTSLShader, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-BKPYeBC6.js';
|
|
31
33
|
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-
|
|
34
|
+
export { p as packCollisionGroups } from './collision-builder-4TVDzXsp.js';
|
|
33
35
|
import 'three';
|
|
34
36
|
import '@sinclair/typebox';
|
|
35
37
|
import 'three/webgpu';
|