@zylem/game-lib 0.8.3 → 0.8.6

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.
Files changed (67) hide show
  1. package/dist/actions.d.ts +7 -5
  2. package/dist/api/game-lib.api.json +3564 -395
  3. package/dist/api/game-lib.api.md +196 -12
  4. package/dist/api/game-lib.d.ts +547 -14
  5. package/dist/api/game-lib.typedoc.json +213478 -129350
  6. package/dist/base-node-idopiSw5.d.ts +96 -0
  7. package/dist/bridge.d.ts +41 -5
  8. package/dist/bridge.js +1 -1
  9. package/dist/catalog.d.ts +77 -0
  10. package/dist/catalog.js +1 -0
  11. package/dist/{chunk-CM5YRNBJ.js → chunk-7NYP4YAG.js} +1 -1
  12. package/dist/chunk-AE3CTVHY.js +1 -0
  13. package/dist/chunk-BCFFS3FP.js +1 -0
  14. package/dist/chunk-BMRFDDMR.js +1 -0
  15. package/dist/chunk-DECK4UEC.js +1 -0
  16. package/dist/chunk-DQQA3VJH.js +1 -0
  17. package/dist/chunk-FYQNZCIP.js +1 -0
  18. package/dist/chunk-GHJQ2HKI.js +1 -0
  19. package/dist/chunk-LD4KDRYL.js +24 -0
  20. package/dist/chunk-MXO4VGDB.js +1 -0
  21. package/dist/chunk-Q2YDBMVY.js +19 -0
  22. package/dist/chunk-QDQ4QMAI.js +1 -0
  23. package/dist/{chunk-TV3AZKT4.js → chunk-QVIUZEYA.js} +1 -1
  24. package/dist/chunk-SAQA4SXW.js +1 -0
  25. package/dist/chunk-VJZMSBKP.js +1 -0
  26. package/dist/{chunk-YAOXFYOD.js → chunk-WBQ5TNRZ.js} +1 -1
  27. package/dist/chunk-YOVE25NW.js +1 -0
  28. package/dist/{collision-builder-B_tm8OVy.d.ts → collision-builder-BckxkdmA.d.ts} +1 -1
  29. package/dist/core.d.ts +14 -11
  30. package/dist/core.js +1 -1
  31. package/dist/debug-state-B5awuDHl.d.ts +89 -0
  32. package/dist/debug.d.ts +200 -7
  33. package/dist/debug.js +1 -1
  34. package/dist/{entity-B9yZeBm4.d.ts → entity-BIf_a4dl.d.ts} +1 -1
  35. package/dist/{entity-BGEq1yfC.d.ts → entity-XZNGBeca.d.ts} +32 -98
  36. package/dist/{entity-type-map-CW6RHQkx.d.ts → entity-type-map-CkkFMSrL.d.ts} +42 -7
  37. package/dist/entity.d.ts +9 -7
  38. package/dist/entity.js +1 -1
  39. package/dist/{game-NHkubIfI.d.ts → game-Cy8f6gJm.d.ts} +181 -17
  40. package/dist/game-default-F3KPYZ7X.js +1 -0
  41. package/dist/graphics.d.ts +6 -5
  42. package/dist/graphics.js +1 -1
  43. package/dist/{material-DbSuZBbP.d.ts → material-CxxAyJYp.d.ts} +1 -1
  44. package/dist/public.d.ts +12 -10
  45. package/dist/public.js +1 -1
  46. package/dist/runtime.d.ts +3 -3
  47. package/dist/runtime.js +1 -1
  48. package/dist/{vector-DN6zlPoE.d.ts → simulation-body-zQw-emOr.d.ts} +11 -42
  49. package/dist/vector-D3eDzvcA.d.ts +41 -0
  50. package/dist/web-components.d.ts +12 -9
  51. package/dist/web-components.js +1 -1
  52. package/dist/{zylem-camera-Du2UPW9O.d.ts → zylem-camera-DZTpPOiD.d.ts} +12 -1
  53. package/package.json +21 -16
  54. package/LICENSE +0 -21
  55. package/dist/chunk-2VSVOPQN.js +0 -19
  56. package/dist/chunk-3I537JFL.js +0 -1
  57. package/dist/chunk-C5NEGC3S.js +0 -1
  58. package/dist/chunk-CV75NSES.js +0 -1
  59. package/dist/chunk-GKHAJ3MW.js +0 -1
  60. package/dist/chunk-LGS5N5M4.js +0 -1
  61. package/dist/chunk-LKFF6XJC.js +0 -1
  62. package/dist/chunk-Q27ULMXY.js +0 -24
  63. package/dist/chunk-W5SXED5T.js +0 -1
  64. package/dist/chunk-WVSYUWTT.js +0 -1
  65. package/dist/debug-state-Dp9CQQZ4.d.ts +0 -49
  66. package/dist/game-default-5TB3T5N7.js +0 -1
  67. /package/dist/{chunk-DFLI7ICU.js → chunk-MSCVL5OK.js} +0 -0
@@ -1,10 +1,11 @@
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-BGEq1yfC.js';
3
- import { d as Vec3Components, e as Vec3Input, b as Vec2Input } from './vector-DN6zlPoE.js';
1
+ import { Vector3, Sprite, Texture, Color, Object3D, ColorRepresentation, Light, Fog, FogExp2, Scene, Raycaster } from 'three';
2
+ import { B as BaseNode } from './base-node-idopiSw5.js';
3
+ import { G as GameEntity, a as GameEntityOptions } from './entity-XZNGBeca.js';
4
+ import { d as Vec3Components, e as Vec3Input, b as Vec2Input } from './vector-D3eDzvcA.js';
4
5
  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-DbSuZBbP.js';
6
+ import { T as TexturePath, e as MaterialOptions } from './material-CxxAyJYp.js';
6
7
  import { Simulation } from '@zylem/behaviors/core';
7
- import { E as Entity } from './entity-B9yZeBm4.js';
8
+ import { E as Entity } from './entity-BIf_a4dl.js';
8
9
  import { ParticleEmitterBehaviorOptions, ParticleEffectDefinition, ParticleEmitterHandle } from '@zylem/behaviors/particle-emitter';
9
10
  import { Line2 } from 'three/addons/lines/webgpu/Line2.js';
10
11
 
@@ -104,8 +105,23 @@ type SpriteAnimation = {
104
105
  speed: number | number[];
105
106
  loop: boolean;
106
107
  };
108
+ /**
109
+ * A single texture divided into a uniform grid of frames, addressed by UV
110
+ * offset. Prefer this over {@link SpriteImage} lists for character sheets: one
111
+ * texture and one draw call instead of one per frame.
112
+ */
113
+ type SpriteSheet = {
114
+ file: string;
115
+ columns: number;
116
+ rows: number;
117
+ /** Frame names in row-major order. `null` marks an unused cell. */
118
+ frames: Array<string | null>;
119
+ /** Texture filtering. Defaults to `nearest`, which keeps pixel art crisp. */
120
+ filter?: 'nearest' | 'linear';
121
+ };
107
122
  type ZylemSpriteOptions = GameEntityOptions & {
108
123
  images?: SpriteImage[];
124
+ sheet?: SpriteSheet;
109
125
  animations?: SpriteAnimation[];
110
126
  size?: Vec3Input;
111
127
  collisionSize?: Vec3Input;
@@ -117,15 +133,34 @@ declare class ZylemSprite extends GameEntity<ZylemSpriteOptions> {
117
133
  protected spriteMap: Map<string, number>;
118
134
  protected currentSpriteIndex: number;
119
135
  protected animations: Map<string, any>;
120
- protected currentAnimation: any;
136
+ protected currentAnimation: string | null;
121
137
  protected currentAnimationFrame: string;
122
138
  protected currentAnimationIndex: number;
123
139
  protected currentAnimationTime: number;
140
+ /** Set only in sheet mode; the shared texture whose UV window we shift. */
141
+ protected sheetTexture: Texture | null;
142
+ protected flippedX: boolean;
124
143
  constructor(options?: ZylemSpriteOptions);
125
144
  create(): this;
126
145
  protected createSpritesFromImages(images: SpriteImage[]): void;
146
+ protected createSpriteFromSheet(sheet: SpriteSheet): void;
127
147
  protected createAnimations(animations: SpriteAnimation[]): void;
128
148
  setSprite(key: string): void;
149
+ /**
150
+ * Mirror the sprite horizontally, for characters whose sheet only contains
151
+ * one facing direction.
152
+ *
153
+ * In sheet mode this flips the UV window rather than the sprite scale,
154
+ * because {@link syncSpriteMaterials} rewrites scale from `options.size`
155
+ * every frame and would immediately undo a negative scale.
156
+ */
157
+ setFlipX(flip: boolean): void;
158
+ isFlippedX(): boolean;
159
+ private applySheetFrame;
160
+ /**
161
+ * Advance a named clip. Call once per frame from an update loop; `delta` is
162
+ * seconds, so scaling it scales playback rate.
163
+ */
129
164
  setAnimation(name: string, delta: number): void;
130
165
  private getCurrentRotationQuaternion;
131
166
  private syncSpriteMaterials;
@@ -925,4 +960,4 @@ interface EntityTypeMap {
925
960
  */
926
961
  type EntityForType<T> = T extends keyof EntityTypeMap ? EntityTypeMap[T] : BaseNode;
927
962
 
928
- export { type AmbientLightOptions as $, ACTOR_TYPE as A, BOX_TYPE as B, type CollisionShapeType as C, DISK_TYPE as D, createPyramid as E, ZylemPyramid as F, PYRAMID_TYPE as G, createCylinder as H, ZylemCylinder as I, CYLINDER_TYPE as J, createPill as K, ZylemPill as L, PILL_TYPE as M, createParticleSystem as N, type OnHeldParams as O, PLANE_TYPE as P, ZylemParticleSystem as Q, RECT_TYPE as R, SPHERE_TYPE as S, TEXT_TYPE as T, PARTICLE_SYSTEM_TYPE as U, type ZylemParticleSystemOptions as V, createLight as W, ZylemLight as X, LIGHT_TYPE as Y, ZylemBox as Z, type ZylemLightOptions as _, createSphere as a, type HemisphereLightOptions as a0, type DirectionalLightOptions as a1, type PointLightOptions as a2, type SpotLightOptions as a3, type LightShadowOptions as a4, createFog as a5, ZylemFog as a6, FOG_TYPE as a7, createLine as a8, ZylemLine as a9, LINE_TYPE as aa, pickZylemLine as ab, type ZylemLineOptions as ac, type LinePickResult as ad, type ZylemFogOptions as ae, type ZylemFogType as af, type ZylemFogHeightOptions as ag, type ZylemFogNoiseOptions as ah, type EntityTypeMap as ai, type EntityForType as aj, ZylemWorld as ak, ZylemSphere as b, createBox as c, createSprite as d, ZylemSprite as e, SPRITE_TYPE as f, type SpriteImage as g, type SpriteAnimation as h, createPlane as i, ZylemPlane as j, createZone as k, ZylemZone as l, ZONE_TYPE as m, type OnEnterParams as n, type OnExitParams as o, createActor as p, ZylemActor as q, createText as r, ZylemText as s, createRect as t, ZylemRect as u, createDisk as v, ZylemDisk as w, createCone as x, ZylemCone as y, CONE_TYPE as z };
963
+ 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,18 @@
1
- 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-CW6RHQkx.js';
2
- import { G as GameEntity, a as GameEntityOptions, E as EntityBuilder, D as EntityMeshBuilder, F as EntityCollisionBuilder, B as BaseNode } from './entity-BGEq1yfC.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-BGEq1yfC.js';
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-CkkFMSrL.js';
2
+ import { G as GameEntity, a as GameEntityOptions, E as EntityBuilder, B as EntityMeshBuilder, D as EntityCollisionBuilder } from './entity-XZNGBeca.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-XZNGBeca.js';
4
4
  import { Color, Mesh } from 'three';
5
- import { b as Vec2Input, e as Vec3Input } from './vector-DN6zlPoE.js';
6
- import { e as MaterialOptions } from './material-DbSuZBbP.js';
5
+ import { B as BaseNode } from './base-node-idopiSw5.js';
6
+ import { b as Vec2Input, e as Vec3Input } from './vector-D3eDzvcA.js';
7
+ import { e as MaterialOptions } from './material-CxxAyJYp.js';
7
8
  import './base-node-life-cycle-BK9xebT9.js';
8
9
  import './stage-transition-CmGpV4tc.js';
9
10
  import '@zylem/behaviors/core';
10
- import './entity-B9yZeBm4.js';
11
+ import './entity-BIf_a4dl.js';
12
+ import './simulation-body-zQw-emOr.js';
11
13
  import '@zylem/behaviors/particle-emitter';
12
14
  import 'three/addons/lines/webgpu/Line2.js';
13
- import './collision-builder-B_tm8OVy.js';
15
+ import './collision-builder-BckxkdmA.js';
14
16
  import './events.js';
15
17
  import 'mitt';
16
18
  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-CV75NSES.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-LGS5N5M4.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};
1
+ import{a as ma,b as na,c as oa,d as pa,e as qa}from"./chunk-GHJQ2HKI.js";import{a as ba,b as ca,c as da,d as ea,e as fa,f as ga,g as ha,h as ia,i as ja,j as ka,l as la}from"./chunk-YOVE25NW.js";import{a as X,b as Y,c as Z,d as _,e as $,f as aa}from"./chunk-MXO4VGDB.js";import{A as J,B as K,C as L,D as M,E as N,F as O,G as P,H as Q,I as R,J as S,K as T,L as U,M as V,N as W,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r,k as s,l as t,m as u,n as v,o as w,p as x,q as y,r as z,s as A,t as B,u as C,v as D,w as E,x as F,y as G,z as I}from"./chunk-BMRFDDMR.js";import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,u as i,z as H}from"./chunk-SAQA4SXW.js";import"./chunk-7NYP4YAG.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{X as ACTOR_TYPE,p as BOX_TYPE,v as CONE_TYPE,B as CYLINDER_TYPE,I as DISK_TYPE,_ as FOG_TYPE,U as LIGHT_TYPE,ha as LINE_TYPE,ma as PARTICLE_SYSTEM_TYPE,E as PILL_TYPE,L as PLANE_TYPE,y as PYRAMID_TYPE,R as RECT_TYPE,s as SPHERE_TYPE,ea as SPRITE_TYPE,ba as TEXT_TYPE,O as ZONE_TYPE,Y as ZylemActor,q as ZylemBox,w as ZylemCone,C as ZylemCylinder,J as ZylemDisk,$ as ZylemFog,V as ZylemLight,ja as ZylemLine,na as ZylemParticleSystem,F as ZylemPill,M as ZylemPlane,z as ZylemPyramid,S as ZylemRect,t as ZylemSphere,fa as ZylemSprite,ca as ZylemText,P as ZylemZone,a as boxCollision,j as boxMesh,c as coneCollision,l as coneMesh,i as create,Z as createActor,r as createBox,x as createCone,pa as createCooldownIcon,D as createCylinder,K as createDisk,H as createEntity,la as createEntityFactory,aa as createFog,W as createLight,ka as createLine,oa as createParticleSystem,G as createPill,N as createPlane,A as createPyramid,T as createRect,u as createSphere,ga as createSprite,da as createText,Q as createZone,e as cylinderCollision,n as cylinderMesh,qa as destroy,ia as pickZylemLine,f as pillCollision,o as pillMesh,g as planeCollision,d as pyramidCollision,m as pyramidMesh,b as sphereCollision,k as sphereMesh,h as zoneCollision};
@@ -1,12 +1,15 @@
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-BGEq1yfC.js';
3
+ import { B as BaseNode } from './base-node-idopiSw5.js';
4
4
  import { Scene, Color, Object3D, Vector3, BufferGeometry, Material, Group, Texture } from 'three';
5
- import { ak as ZylemWorld, ai as EntityTypeMap } from './entity-type-map-CW6RHQkx.js';
6
- import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-B9yZeBm4.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-Du2UPW9O.js';
8
- import { d as ZylemShader } from './material-DbSuZBbP.js';
9
- import { l as SimulationBody, e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-DN6zlPoE.js';
5
+ import { al as ZylemWorld, aj as EntityTypeMap } from './entity-type-map-CkkFMSrL.js';
6
+ import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-BIf_a4dl.js';
7
+ import { G as GameEntity, a as GameEntityOptions, y as GameEntityLifeCycle } from './entity-XZNGBeca.js';
8
+ 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-DZTpPOiD.js';
9
+ import { d as ZylemShader } from './material-CxxAyJYp.js';
10
+ import { a as SimulationBody } from './simulation-body-zQw-emOr.js';
11
+ import { e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-D3eDzvcA.js';
12
+ import { SceneOperationPayload } from '@zylem/bridge';
10
13
  import { BehaviorSystem, BehaviorEntityLink, BehaviorRuntime, BehaviorSystemFactory, Simulation } from '@zylem/behaviors/core';
11
14
  import { StageEvents, GameEvents } from './events.js';
12
15
  import { D as DefaultTouchControlsOptions } from './default-controls-CAKJ5zlo.js';
@@ -846,13 +849,16 @@ declare function createCamera(options: CameraOptions): CameraWrapper;
846
849
  /**
847
850
  * Owns the stage's in-world debug/editor interaction layer.
848
851
  *
849
- * Self-manages around the global `debugState`: when debug is enabled it draws
850
- * the wasm simulation's collider wireframes, attaches mouse listeners,
851
- * raycasts into the physics world to hover/select/delete/spawn entities, and
852
- * drives the `DebugEntityCursor` highlight. When disabled it tears down
853
- * visuals but stays alive to re-activate. Centralizes all debug-tool plumbing
854
- * so `ZylemStage` doesn't have to know about raycasting, DOM input, or debug
855
- * rendering.
852
+ * Self-manages around the global `debugState`, in two layers that switch on
853
+ * independently. The tool layer — mouse listeners, physics raycasts to
854
+ * hover/select/delete/spawn, the `DebugEntityCursor` highlight and the
855
+ * `PlacementGhost` — is live whenever a tool is armed, so the toolbar's buttons
856
+ * work on their own. The debug layer — the wasm simulation's collider
857
+ * wireframes and the orbit camera — is the part `debugState.enabled` gates, and
858
+ * is torn down when it goes off while the delegate stays alive to re-activate.
859
+ *
860
+ * Centralizes all of this so `ZylemStage` doesn't have to know about
861
+ * raycasting, DOM input, or debug rendering.
856
862
  */
857
863
 
858
864
  type AddEntityFactory = (params: {
@@ -875,10 +881,10 @@ declare class StageDebugDelegate {
875
881
  private options;
876
882
  private mouseNdc;
877
883
  private raycaster;
878
- private isMouseDown;
879
884
  private domDisposeFns;
880
885
  private domListenersAttached;
881
886
  private debugCursor;
887
+ private placementGhost;
882
888
  private debugLines;
883
889
  private cameraDebugDelegate;
884
890
  private debugStateUnsubscribe;
@@ -886,6 +892,11 @@ declare class StageDebugDelegate {
886
892
  private entityResolverUnregister;
887
893
  private lastDebugEnabled;
888
894
  private warnedMissingAddFactory;
895
+ private transformTool;
896
+ private grid;
897
+ private lastTool;
898
+ /** Element the current gizmo drag captured, so pointerup is never missed. */
899
+ private capturedPointer;
889
900
  constructor(stage: ZylemStage, options?: StageDebugDelegateOptions);
890
901
  /**
891
902
  * Supply the factory the `add` tool uses to spawn entities at the clicked
@@ -905,18 +916,107 @@ declare class StageDebugDelegate {
905
916
  * rebuild the render pipeline once per frame.
906
917
  */
907
918
  private syncWithDebugState;
919
+ /** Hand the transform tool its mode whenever the active tool changes. */
920
+ private syncToolMode;
921
+ private syncGrid;
908
922
  /** Initialize DOM listeners and switch rendering to the debug orbit camera. */
909
923
  private activate;
910
924
  /** Tear down visuals and restore the gameplay primary camera. */
911
925
  private deactivate;
912
926
  private rebindPostProcessing;
927
+ /**
928
+ * Collider wireframes: the one overlay that really is debug-mode-only, since
929
+ * it draws the simulation itself rather than anything being edited.
930
+ */
913
931
  private initDebugVisuals;
914
932
  private disposeDebugVisuals;
933
+ /**
934
+ * Tool feedback, built on first use and kept for the delegate's life.
935
+ *
936
+ * Separate from {@link initDebugVisuals} because the hover highlight and the
937
+ * placement ghost belong to the tools, not to debug mode: they have to be
938
+ * available when a tool is armed with debug off.
939
+ */
940
+ private ensureToolVisuals;
941
+ /**
942
+ * Hide the overlays whose tool has just gone away.
943
+ *
944
+ * `update()` normally does this, but it stops being called once nothing is
945
+ * armed and debug is off — so the frame that would have hidden a disarmed
946
+ * Add's ghost never arrives, and the preview is left floating in the scene.
947
+ * Driven from the tool transition, which always fires.
948
+ */
949
+ private parkToolVisuals;
950
+ private disposeToolVisuals;
915
951
  update(): void;
952
+ /** Collider wireframes, straight from the wasm simulation. */
953
+ private updateColliderWireframes;
954
+ /**
955
+ * Make sure an armed tool can actually receive the pointer.
956
+ *
957
+ * The listeners outlive debug mode once attached — `deactivate()` leaves them
958
+ * in place and only `dispose()` removes them — so this only ever has to run
959
+ * until it succeeds.
960
+ */
961
+ private ensureInteraction;
962
+ /**
963
+ * Drive the translucent preview of the armed entity type from the cursor.
964
+ *
965
+ * Runs while the game is paused as well as while it plays: only the
966
+ * fixed-step `step()` is pause-gated, so this pass still ticks and the
967
+ * ghost keeps following the mouse in a frozen scene — which is exactly when
968
+ * a scene is usually being built. It runs with debug mode off too, for the
969
+ * same reason: arming Add is a request to place something, not to inspect
970
+ * colliders.
971
+ *
972
+ * The ghost is a scene overlay, not an entity, so it is invisible to the
973
+ * physics raycast here and cannot preview itself.
974
+ */
975
+ private updatePlacementGhost;
916
976
  /** Full teardown — unsubscribes from debugState and cleans up all resources. */
917
977
  dispose(): void;
918
- private handleActionOnHit;
978
+ /**
979
+ * Undo or redo a committed operation.
980
+ *
981
+ * The editor holds the history but cannot apply it: reverting a delete means
982
+ * producing the original entity, which only the stage can do. So the editor
983
+ * hands the record back and the inversion happens here.
984
+ */
985
+ applySceneOperation(op: SceneOperationPayload, direction: 'undo' | 'redo'): void;
986
+ /** The mouse ray in world space, from the last pointer position. */
987
+ private currentRay;
988
+ private handleAction;
989
+ /**
990
+ * Spawn the armed entity type at the clicked point.
991
+ *
992
+ * Placement resolves in two steps because a click into empty sky is the
993
+ * common case when building a scene from nothing: the physics hit is
994
+ * preferred (the entity rests on the surface it was dropped onto), and
995
+ * otherwise the ray is intersected with the y=0 construction plane. Before
996
+ * this, clicking anywhere without an existing collider under the cursor did
997
+ * nothing at all.
998
+ */
999
+ private placeEntity;
1000
+ /**
1001
+ * Nudge a freshly placed entity out along the surface normal by half its
1002
+ * own size, so it sits on the surface rather than half-buried in it.
1003
+ *
1004
+ * Runs after spawn because the entity's bounds are not known until its mesh
1005
+ * exists.
1006
+ */
1007
+ private restOnSurface;
1008
+ private warnMissingAddSource;
919
1009
  private attachDomListeners;
1010
+ /**
1011
+ * Own the pointer for the duration of a gizmo drag.
1012
+ *
1013
+ * Capture keeps events coming even when the cursor leaves the canvas, which
1014
+ * happens constantly when dragging an axis toward the edge of the viewport.
1015
+ * Orbit is suspended for the same window so the drag does not also swing the
1016
+ * camera.
1017
+ */
1018
+ private beginPointerCapture;
1019
+ private endPointerCapture;
920
1020
  }
921
1021
 
922
1022
  /**
@@ -1070,6 +1170,21 @@ type NodeLike$1 = {
1070
1170
  create: Function;
1071
1171
  };
1072
1172
  type StageEntityInput = NodeLike$1 | Promise<any> | (() => NodeLike$1 | Promise<any>);
1173
+ /** A detached entity plus the pose to restore it at. */
1174
+ interface DetachedEntity {
1175
+ entity: any;
1176
+ position: {
1177
+ x: number;
1178
+ y: number;
1179
+ z: number;
1180
+ } | null;
1181
+ rotation: {
1182
+ x: number;
1183
+ y: number;
1184
+ z: number;
1185
+ w: number;
1186
+ } | null;
1187
+ }
1073
1188
  /**
1074
1189
  * Runtime context provided by ZylemStage after scene and world are initialized.
1075
1190
  */
@@ -1094,6 +1209,11 @@ declare class StageEntityDelegate {
1094
1209
  readonly childrenMap: Map<string, BaseNode>;
1095
1210
  /** UUID → BaseNode map populated when debug mode is active. */
1096
1211
  readonly debugMap: Map<string, BaseNode>;
1212
+ /**
1213
+ * Entities detached from the stage but kept alive so an editor undo can put
1214
+ * them back. See {@link StageEntityDelegate.detachEntity}.
1215
+ */
1216
+ readonly detachedMap: Map<string, DetachedEntity>;
1097
1217
  private pendingEntities;
1098
1218
  private pendingPromises;
1099
1219
  private _isLoaded;
@@ -1143,10 +1263,48 @@ declare class StageEntityDelegate {
1143
1263
  /** Add the entity to internal maps and notify listeners. */
1144
1264
  addEntityToStage(entity: BaseNode): void;
1145
1265
  /**
1146
- * Remove an entity and its resources by its UUID.
1266
+ * Remove an entity from the stage by its UUID.
1267
+ *
1268
+ * Detaches rather than destroys, so an editor undo can put the same
1269
+ * instance back. See {@link StageEntityDelegate.detachEntity}.
1270
+ *
1147
1271
  * @returns true if removed, false if not found or stage not ready
1148
1272
  */
1149
1273
  removeEntityByUuid(uuid: string): boolean;
1274
+ /**
1275
+ * Take an entity out of the stage while keeping the instance alive.
1276
+ *
1277
+ * The editor cannot rebuild an entity — all it ever receives is a summary of
1278
+ * name, type, and transform, with no material, behaviors, or collider
1279
+ * config. So undoing a delete has to restore the original object, which
1280
+ * means holding onto it here. Keeping the same instance also keeps its uuid
1281
+ * stable, which every other entry in the undo stack depends on.
1282
+ *
1283
+ * Observers are still told the entity is gone: from the outside it has left
1284
+ * the stage, and leaving it in the editor's list or the thumbnail cache
1285
+ * would leak.
1286
+ *
1287
+ * @returns true when the entity was found and detached.
1288
+ */
1289
+ detachEntity(uuid: string): boolean;
1290
+ /**
1291
+ * Put a detached entity back into the stage at the pose it left.
1292
+ *
1293
+ * Unlike {@link StageEntityDelegate.spawnEntity} this never calls
1294
+ * `create()`: the entity is already fully built, and rebuilding it would
1295
+ * discard its meshes and colliders along with any editor scale applied to
1296
+ * them.
1297
+ *
1298
+ * @returns true when the entity was found and restored.
1299
+ */
1300
+ restoreEntity(uuid: string): boolean;
1301
+ /** Whether a uuid is currently recoverable via {@link restoreEntity}. */
1302
+ isDetached(uuid: string): boolean;
1303
+ /**
1304
+ * Destroy detached entities past the recoverable window. Insertion-ordered,
1305
+ * so the oldest detachments go first.
1306
+ */
1307
+ private evictOldestDetached;
1150
1308
  /** Get an entity by its name; returns null if not found. */
1151
1309
  getEntityByName(name: string): BaseNode | null;
1152
1310
  /** Build a serializable state snapshot for an entity. */
@@ -1295,7 +1453,7 @@ declare class ZylemStage extends LifeCycleBase<ZylemStage> {
1295
1453
  protected _setup(params: SetupContext<ZylemStage>): void;
1296
1454
  protected _update(params: UpdateContext<ZylemStage>): void;
1297
1455
  outOfLoop(): void;
1298
- /** Update debug overlays and helpers if enabled. */
1456
+ /** Update debug overlays and the editor's pointer tools. */
1299
1457
  debugUpdate(): void;
1300
1458
  /** Cleanup owned resources when the stage is destroyed. */
1301
1459
  protected _destroy(params: DestroyContext<ZylemStage>): void;
@@ -1712,6 +1870,8 @@ declare class ZylemGame<TGlobals extends BaseGlobals> {
1712
1870
  private lastPublishedGameConfig;
1713
1871
  /** Editor ↔ game bridge adapter (RAF-coalesced publishes, command intake). */
1714
1872
  private gameBridge;
1873
+ /** Stops republishing the entity catalog on registry changes. */
1874
+ private catalogUnsubscribe;
1715
1875
  private readonly gameUpdateParams;
1716
1876
  private readonly stageSetupParams;
1717
1877
  private readonly stageUpdateParams;
@@ -1722,6 +1882,10 @@ declare class ZylemGame<TGlobals extends BaseGlobals> {
1722
1882
  static FRAME_DURATION: number;
1723
1883
  static MAX_DELTA_SECONDS: number;
1724
1884
  constructor(options: ZylemGameOptions<TGlobals>, wrapperRef: Game<TGlobals>, displayRuntime?: ResolveGameConfigRuntime);
1885
+ /** Publish the placeable entity types the editor's Add palette lists. */
1886
+ private publishEntityCatalog;
1887
+ /** Spawn a catalog type programmatically (editor `entity:create`). */
1888
+ private createCatalogEntity;
1725
1889
  setDisplayRuntime(runtime: ResolveGameConfigRuntime): void;
1726
1890
  loadGameCanvas(config: GameConfig): void;
1727
1891
  loadDebugOptions(options: ZylemGameOptions<TGlobals>): void;
@@ -0,0 +1 @@
1
+ import{v as e}from"./chunk-FYQNZCIP.js";import"./chunk-BCFFS3FP.js";import"./chunk-AE3CTVHY.js";import"./chunk-DQQA3VJH.js";import"./chunk-VJZMSBKP.js";import"./chunk-DECK4UEC.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-MXO4VGDB.js";import"./chunk-SAQA4SXW.js";import"./chunk-7NYP4YAG.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};
@@ -1,13 +1,14 @@
1
- import { b as ZylemTSLShader } from './material-DbSuZBbP.js';
2
- export { d as ZylemShader, Z as ZylemShaderObject, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-DbSuZBbP.js';
3
- export { Z as ZylemPostEffect } from './zylem-camera-Du2UPW9O.js';
1
+ import { b as ZylemTSLShader } from './material-CxxAyJYp.js';
2
+ export { d as ZylemShader, Z as ZylemShaderObject, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-CxxAyJYp.js';
3
+ export { Z as ZylemPostEffect } from './zylem-camera-DZTpPOiD.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-DN6zlPoE.js';
8
+ import './vector-D3eDzvcA.js';
9
+ import './entity-BIf_a4dl.js';
10
+ import './simulation-body-zQw-emOr.js';
9
11
  import '@zylem/behaviors/core';
10
- import './entity-B9yZeBm4.js';
11
12
 
12
13
  declare const standardShader: {
13
14
  vertex: string;
package/dist/graphics.js CHANGED
@@ -1 +1 @@
1
- import{a as n,b as o,c as p,d as q,e as r,f as s,g as t,h as u,i as v,j as w,k as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as H,v as I,w as J}from"./chunk-QB3NL7VQ.js";import{a}from"./chunk-7GYFZKK7.js";import{a as b,b as c,h as d,i as e,k as f,l as g,m as h,n as i,o as j,p as k,q as l,r as m}from"./chunk-CM5YRNBJ.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";export{m as Fn,y as abs,x as asin,w as atan,t as clamp,v as cos,n as createBackgroundShader,f as createNodeMaterialFromTSL,a as crossfadeTransitionShader,G as dot,z as exp,l as float,E as floor,F as fract,e as isGLSLShader,d as isTSLShader,H as length,C as max,D as min,r as mix,J as mod,q as normalize,b as objectVertexShader,p as positionWorld,o as positionWorldDirection,A as pow,u as sin,s as smoothstep,c as standardShader,B as step,i as time,g as uniform,h as uv,I as vec2,j as vec3,k as vec4};
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 as m}from"./chunk-7GYFZKK7.js";import{a,b,h as c,i as d,k as e,l as f,m as g,n as h,o as i,p as j,q as k,r as l}from"./chunk-7NYP4YAG.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";export{l as Fn,y as abs,x as asin,w as atan,t as clamp,v as cos,n as createBackgroundShader,e as createNodeMaterialFromTSL,m as crossfadeTransitionShader,G as dot,z as exp,k as float,E as floor,F as fract,d as isGLSLShader,c as isTSLShader,H as length,C as max,D as min,r as mix,J as mod,q as normalize,a as objectVertexShader,p as positionWorld,o as positionWorldDirection,A as pow,u as sin,s as smoothstep,b as standardShader,B as step,h as time,f as uniform,g as uv,I as vec2,i as vec3,j as vec4};
@@ -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-DN6zlPoE.js';
3
+ import { b as Vec2Input } from './vector-D3eDzvcA.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-NHkubIfI.js';
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-Cy8f6gJm.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-Du2UPW9O.js';
8
- export { S as StageEntity } from './entity-B9yZeBm4.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-DN6zlPoE.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-CW6RHQkx.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-BGEq1yfC.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-DZTpPOiD.js';
8
+ export { S as StageEntity } from './entity-BIf_a4dl.js';
9
+ export { 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-D3eDzvcA.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-CkkFMSrL.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-XZNGBeca.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';
@@ -21,17 +21,19 @@ export { EntityEvents, EventEmitterDelegate, GameEvents, GameLoadingPayload, Sta
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 { 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-Dp9CQQZ4.js';
25
- export { EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, entityThumbnailCache, focusEntity, registerEntityFocusContext } from './debug.js';
24
+ export { D as DEFAULT_SNAP_SETTINGS, u as DebugEntityResolver, t as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, v as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, q as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-B5awuDHl.js';
25
+ export { ConstructionGrid, EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, GizmoAxis, GizmoDelta, GizmoMode, GizmoRay, Quat, TransformGizmo, closestAxisValue, degreesToRadians, entityThumbnailCache, eulerToQuaternion, focusEntity, intersectPlane, quaternionToEuler, radiansToDegrees, registerEntityFocusContext, snapScale, snapToIncrement, snapVec3 } from './debug.js';
26
26
  export { GameBridge, GameBridgeHost } from './bridge.js';
27
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';
28
28
  export { ZylemGameElement, ZylemGameState } from './web-components.js';
29
+ export { a as SimulationBody, S as SimulationStepClock } from './simulation-body-zQw-emOr.js';
29
30
  export { RuntimeBodyOptions, RuntimeColliderOptions, RuntimeCollisionBundle, buildBoxCollider, buildCapsuleCollider, buildConvexHullCollider, buildCylinderCollider, buildHeightfieldCollider, buildRuntimeBody, buildSphereCollider, buildTrimeshCollider, bundleRuntimeCollision } from './runtime.js';
30
31
  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';
31
32
  export { createBackgroundShader, objectVertexShader, standardShader } from './graphics.js';
32
- export { d as ZylemShader, Z as ZylemShaderObject, b as ZylemTSLShader, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-DbSuZBbP.js';
33
+ export { d as ZylemShader, Z as ZylemShaderObject, b as ZylemTSLShader, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-CxxAyJYp.js';
33
34
  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';
34
- export { p as packCollisionGroups } from './collision-builder-B_tm8OVy.js';
35
+ export { p as packCollisionGroups } from './collision-builder-BckxkdmA.js';
36
+ import './base-node-idopiSw5.js';
35
37
  import 'three';
36
38
  import '@sinclair/typebox';
37
39
  import 'three/webgpu';