@zylem/game-lib 0.9.1 → 0.9.3

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/core.d.ts CHANGED
@@ -1,20 +1,22 @@
1
- import { S as StageStateInterface } from './game-D8KTP3fD.js';
2
- export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-D8KTP3fD.js';
1
+ import { S as StageStateInterface } from './game-DBNxY6mb.js';
2
+ export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-DBNxY6mb.js';
3
3
  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';
4
- import { q as Stage, C as CameraWrapper } from './stage-CAPlk_cN.js';
5
- export { e as CameraManager, d as CameraOptions, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-CAPlk_cN.js';
4
+ import { q as Stage, C as CameraWrapper } from './stage-bVLyYnOQ.js';
5
+ export { e as CameraManager, d as CameraOptions, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-bVLyYnOQ.js';
6
+ import { LevelBuffer, LevelEntry } from '@zylem/bridge';
7
+ export { LevelBuffer } from '@zylem/bridge';
8
+ import { B as BaseNode, N as NodeInterface } from './base-node-idopiSw5.js';
6
9
  import { Vector2 } from 'three';
7
10
  import { G as GameEntity, a as GameEntityOptions } from './entity-XqvuWgPm.js';
8
11
  import { S as StageBlueprint } from './blueprints-TbGY-h53.js';
9
12
  import { a as SetupContext, k as LoadedContext, U as UpdateContext, D as DestroyContext, l as CleanupContext } from './base-node-life-cycle-BK9xebT9.js';
10
13
  export { L as LoadingEvent, S as StageNavigationOptions } from './base-node-life-cycle-BK9xebT9.js';
11
14
  export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
12
- import { f as CameraBehavior } from './zylem-camera-CYDtrVgi.js';
13
- export { g as CameraAction, d as CameraContext, e as CameraPerspective, k as CameraPipeline, h as CameraPipelineState, C as CameraPose, j as CameraProjection, P as PerspectiveType, a as Perspectives, c as PoseDelta, T as TransformLike, V as Viewport, b as ZylemRenderer, i as isWebGPUSupported } from './zylem-camera-CYDtrVgi.js';
15
+ import { f as CameraBehavior } from './zylem-camera-CO713zFl.js';
16
+ export { g as CameraAction, d as CameraContext, e as CameraPerspective, k as CameraPipeline, h as CameraPipelineState, C as CameraPose, j as CameraProjection, P as PerspectiveType, a as Perspectives, c as PoseDelta, T as TransformLike, V as Viewport, b as ZylemRenderer, i as isWebGPUSupported } from './zylem-camera-CO713zFl.js';
14
17
  import { e as Vec3Input, c as Vec3 } from './vector-D3eDzvcA.js';
15
18
  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, d as Vec3Components, n as normalizeVec2, j as normalizeVec3, t as toThreeVector2, k as toThreeVector3 } from './vector-D3eDzvcA.js';
16
19
  import { S as StageEntity } from './entity-BIf_a4dl.js';
17
- import { B as BaseNode, N as NodeInterface } from './base-node-idopiSw5.js';
18
20
  import './default-controls-CAKJ5zlo.js';
19
21
  import './events.js';
20
22
  import 'mitt';
@@ -26,10 +28,56 @@ import './selection-bounds-BKmSo9aG.js';
26
28
  import '@zylem/behaviors/particle-emitter';
27
29
  import 'three/addons/lines/webgpu/Line2.js';
28
30
  import './simulation-body-zQw-emOr.js';
29
- import '@zylem/bridge';
30
31
  import './collision-builder-BckxkdmA.js';
31
32
  import '@sinclair/typebox';
32
33
 
34
+ /**
35
+ * Stream a level buffer into a stage.
36
+ *
37
+ * The streamer does not know the catalog. `spawn` is the host's existing
38
+ * create path, which resolves a catalog id and no-ops when the type is
39
+ * unknown. Entries are handed off in batches, yielding to the event loop
40
+ * between them so a large level does not stall the frame the way a single
41
+ * synchronous spawn loop would.
42
+ */
43
+
44
+ interface StreamLevelOptions {
45
+ /** @default 5 */
46
+ batchSize?: number;
47
+ }
48
+ interface StreamLevelResult {
49
+ /** Entries handed to `spawn`, in buffer order. */
50
+ spawned: number;
51
+ }
52
+ /**
53
+ * Hand each buffer entry to `spawn`, in order, yielding between batches.
54
+ *
55
+ * @returns How many entries were handed off. A spawn that no-ops for an
56
+ * unknown catalog type still counts: the entry was delivered.
57
+ */
58
+ declare function streamLevel(buffer: LevelBuffer, spawn: (entry: LevelEntry) => void | Promise<void>, options?: StreamLevelOptions): Promise<StreamLevelResult>;
59
+
60
+ /**
61
+ * Stream a level buffer into a stage through the catalog.
62
+ *
63
+ * `streamLevel` only walks entries. This is the call gameplay code makes:
64
+ * each entry is created from its catalog id, spawned, then posed. Unknown
65
+ * catalog ids are skipped. Batching stays in `streamLevel`.
66
+ */
67
+
68
+ /** The slice of a stage `streamLevelOnStage` needs. */
69
+ interface LevelStage {
70
+ spawnEntity(node: BaseNode): Promise<void> | void;
71
+ }
72
+ /**
73
+ * Spawn every catalog entry in `buffer` onto `stage`.
74
+ *
75
+ * Position is handed to the type's factory. Rotation and scale are applied
76
+ * after spawn, and a scale change rebuilds colliders. An entry whose catalog
77
+ * id is not registered is skipped.
78
+ */
79
+ declare function streamLevelOnStage(stage: LevelStage, buffer: LevelBuffer, options?: StreamLevelOptions): Promise<StreamLevelResult>;
80
+
33
81
  /**
34
82
  * Authoring helper for spawning entities into a live stage at runtime.
35
83
  *
@@ -338,4 +386,4 @@ declare function isManagedRenderEntity(entity: {
338
386
  */
339
387
  type Vect3 = Vec3;
340
388
 
341
- export { CameraBehavior, type CameraFeedOptions, CameraWrapper, type FollowTargetOptions, type PlatformAxisMode, type PlatformAxisModes, type PlatformFollowOptions, type RenderCategory, STAGE_STATE_CHANGE, SetupContext, StageBlueprint, StageEntity, StageManager, type StageStateChangeEvent, type StrategyPanBehavior, type StrategyPanInput, type StrategyPanOptions, type StrategyPointer, UpdateContext, Vec3, Vec3Input, type Vect3, createFollowTarget, createPlatformFollow, createStrategyPan, dispatchStageState, entitySpawner, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, usesManagedRenderPath, vessel };
389
+ export { CameraBehavior, type CameraFeedOptions, CameraWrapper, type FollowTargetOptions, type LevelStage, type PlatformAxisMode, type PlatformAxisModes, type PlatformFollowOptions, type RenderCategory, STAGE_STATE_CHANGE, SetupContext, StageBlueprint, StageEntity, StageManager, type StageStateChangeEvent, type StrategyPanBehavior, type StrategyPanInput, type StrategyPanOptions, type StrategyPointer, type StreamLevelOptions, type StreamLevelResult, UpdateContext, Vec3, Vec3Input, type Vect3, createFollowTarget, createPlatformFollow, createStrategyPan, dispatchStageState, entitySpawner, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, streamLevel, streamLevelOnStage, usesManagedRenderPath, vessel };
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- import{a as b,b as c,c as d,d as e,e as f,f as K,g as L,h as M,i as N,j as O,k as P,l as Q,m as R,n as S,o as T,p as U,q as V}from"./chunk-SHDHPDOV.js";import{a,c as p,d as q,e as r,f as s,g as t,h as u,i as v,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,y as J}from"./chunk-SWDNK4GG.js";import"./chunk-PCFF4LLO.js";import"./chunk-Q2YDBMVY.js";import"./chunk-BCFFS3FP.js";import"./chunk-VSFULLND.js";import"./chunk-2HSR5XDQ.js";import"./chunk-7CBJKE42.js";import"./chunk-BQRMYLYD.js";import"./chunk-GPCSX3M6.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-LI43BZQN.js";import"./chunk-YQS7CGXE.js";import"./chunk-STVEILJJ.js";import"./chunk-KP6DLLJO.js";import"./chunk-6FGXC4T6.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-EVYHPR3J.js";import"./chunk-VUJXR5K5.js";import"./chunk-2XMG3NJS.js";import{a as o}from"./chunk-7GYFZKK7.js";import"./chunk-QGIYILYI.js";import"./chunk-D2PATZCC.js";import"./chunk-4QLJUQSJ.js";import{a as g,b as h,c as i,d as j,g as k,h as l,i as m,j as n}from"./chunk-7WRQ2UAN.js";import"./chunk-BH53MBAZ.js";import"./chunk-XRP4JJXL.js";import"./chunk-UG22Z42P.js";import"./chunk-WOT6VMZA.js";export{b as AspectRatio,E as CameraManager,w as CameraPipeline,F as CameraWrapper,z as FirstPersonPerspective,y as Fixed2DPerspective,M as Game,A as IsometricPerspective,v as Perspectives,s as RenderBundleManager,t as RenderStrategyManager,P as STAGE_STATE_CHANGE,C as SecondPersonPerspective,L as StageManager,x as ThirdPersonPerspective,B as TopDownPerspective,h as VEC2_ONE,g as VEC2_ZERO,j as VEC3_ONE,i as VEC3_ZERO,G as createCamera,S as createFollowTarget,N as createGame,D as createPerspective,T as createPlatformFollow,J as createStage,U as createStrategyPan,o as crossfadeTransitionShader,R as dispatchStageState,O as entitySpawner,f as gameConfig,c as getDisplayAspect,d as getPresetResolution,Q as initStageStateDispatcher,r as isManagedRenderEntity,a as isWebGPUSupported,k as normalizeVec2,l as normalizeVec3,e as parseResolution,p as resolveRenderCategory,V as setCameraFeed,u as setStageFrameProfilerEnabled,H as stageConfig,K as stageState,m as toThreeVector2,n as toThreeVector3,q as usesManagedRenderPath,I as vessel};
1
+ import{a as b,b as c,c as d,d as e,e as f,f as L,g as M,h as N,i as O,j as P,k as Q,l as R,m as S,n as T,o as U,p as V,q as W,r as X}from"./chunk-U4JSAJAD.js";import{a,c as q,d as r,e as s,f as t,g as u,h as v,i 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,y as K}from"./chunk-4A274H3Y.js";import"./chunk-PCFF4LLO.js";import"./chunk-OCQ7A5IK.js";import"./chunk-47HAZZWF.js";import"./chunk-VSFULLND.js";import"./chunk-2HSR5XDQ.js";import{e as g}from"./chunk-3CLQWJ2I.js";import"./chunk-BQRMYLYD.js";import"./chunk-GPCSX3M6.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-LI43BZQN.js";import"./chunk-YQS7CGXE.js";import"./chunk-STVEILJJ.js";import"./chunk-KP6DLLJO.js";import"./chunk-6FGXC4T6.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-EVYHPR3J.js";import"./chunk-VUJXR5K5.js";import"./chunk-2XMG3NJS.js";import{a as p}from"./chunk-7GYFZKK7.js";import"./chunk-QGIYILYI.js";import"./chunk-D2PATZCC.js";import"./chunk-4QLJUQSJ.js";import{a as h,b as i,c as j,d as k,g as l,h as m,i as n,j as o}from"./chunk-7WRQ2UAN.js";import"./chunk-BH53MBAZ.js";import"./chunk-XRP4JJXL.js";import"./chunk-UG22Z42P.js";import"./chunk-WOT6VMZA.js";export{b as AspectRatio,F as CameraManager,x as CameraPipeline,G as CameraWrapper,A as FirstPersonPerspective,z as Fixed2DPerspective,N as Game,B as IsometricPerspective,w as Perspectives,t as RenderBundleManager,u as RenderStrategyManager,R as STAGE_STATE_CHANGE,D as SecondPersonPerspective,M as StageManager,y as ThirdPersonPerspective,C as TopDownPerspective,i as VEC2_ONE,h as VEC2_ZERO,k as VEC3_ONE,j as VEC3_ZERO,H as createCamera,U as createFollowTarget,O as createGame,E as createPerspective,V as createPlatformFollow,K as createStage,W as createStrategyPan,p as crossfadeTransitionShader,T as dispatchStageState,Q as entitySpawner,f as gameConfig,c as getDisplayAspect,d as getPresetResolution,S as initStageStateDispatcher,s as isManagedRenderEntity,a as isWebGPUSupported,l as normalizeVec2,m as normalizeVec3,e as parseResolution,q as resolveRenderCategory,X as setCameraFeed,v as setStageFrameProfilerEnabled,I as stageConfig,L as stageState,g as streamLevel,P as streamLevelOnStage,n as toThreeVector2,o as toThreeVector3,r as usesManagedRenderPath,J as vessel};
package/dist/debug.d.ts CHANGED
@@ -216,8 +216,9 @@ interface EntityFocusContext {
216
216
  */
217
217
  declare function registerEntityFocusContext(context: EntityFocusContext): () => void;
218
218
  /**
219
- * Select an entity by UUID and frame the debug camera to fit it.
220
- * Enables debug mode so orbit controls are active.
219
+ * Select an entity by UUID and frame the active editor camera to fit it.
220
+ * When the game camera is showing, the stage switches to the free editor
221
+ * camera first. Enables debug mode so the selection is visible.
221
222
  *
222
223
  * @returns true if the entity was found and framed
223
224
  */
package/dist/debug.js CHANGED
@@ -1 +1 @@
1
- import"./chunk-ELQN62PQ.js";import{a as x,b as y}from"./chunk-Q2YDBMVY.js";import{c as P,d as Q,e as R,f as S}from"./chunk-BCFFS3FP.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H}from"./chunk-BQRMYLYD.js";import{B as u,C as v,D as w,a,b,c,d,e,f,h as g,j as h,l as i,m as j,n as k,o as l,p as m,q as n,u as o,v as p,w as q,x as r,y as s,z as t}from"./chunk-GPCSX3M6.js";import{a as I,b as J,c as K,d as L,e as M,f as N,g as O}from"./chunk-UUOPT2N4.js";import"./chunk-WOT6VMZA.js";export{P as ConstructionGrid,c as DEFAULT_SNAP_SETTINGS,x as EntityThumbnailCache,I as SELECTION_BOUNDS_MARGIN,J as SELECTION_THIN_AXIS_FRACTION,L as SELECTION_THIN_AXIS_MAX,K as SELECTION_THIN_AXIS_MIN,a as TRANSFORM_TOOLS,S as TransformGizmo,Q as closestAxisValue,d as debugState,G as degreesToRadians,y as entityThumbnailCache,B as eulerToQuaternion,A as focusEntity,v as getHoveredEntity,s as getHoveredEntityId,u as getSelectedEntity,k as getSelectedEntityId,m as getSelectedEntityIds,o as getSnapSettings,R as intersectPlane,j as isPickMode,b as isTransformTool,N as measureObjectSelectionBounds,M as padSelectionBounds,C as quaternionToEuler,H as radiansToDegrees,e as registerDebugEntityResolver,z as registerEntityFocusContext,f as resolveDebugEntity,O as resolveSelectionBounds,r as setAddType,h as setDebugTool,q as setGridVisible,t as setHoveredEntityId,g as setPaused,i as setPickMode,w as setSelectedEntity,l as setSelectedEntityId,n as setSelectedEntityIds,p as setSnapSettings,F as snapScale,D as snapToIncrement,E as snapVec3};
1
+ import"./chunk-ELQN62PQ.js";import{a as x,b as y}from"./chunk-OCQ7A5IK.js";import{c as P,d as Q,e as R,f as S}from"./chunk-47HAZZWF.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H}from"./chunk-BQRMYLYD.js";import{B as u,C as v,D as w,a,b,c,d,e,f,h as g,j as h,l as i,m as j,n as k,o as l,p as m,q as n,u as o,v as p,w as q,x as r,y as s,z as t}from"./chunk-GPCSX3M6.js";import{a as I,b as J,c as K,d as L,e as M,f as N,g as O}from"./chunk-UUOPT2N4.js";import"./chunk-WOT6VMZA.js";export{P as ConstructionGrid,c as DEFAULT_SNAP_SETTINGS,x as EntityThumbnailCache,I as SELECTION_BOUNDS_MARGIN,J as SELECTION_THIN_AXIS_FRACTION,L as SELECTION_THIN_AXIS_MAX,K as SELECTION_THIN_AXIS_MIN,a as TRANSFORM_TOOLS,S as TransformGizmo,Q as closestAxisValue,d as debugState,G as degreesToRadians,y as entityThumbnailCache,B as eulerToQuaternion,A as focusEntity,v as getHoveredEntity,s as getHoveredEntityId,u as getSelectedEntity,k as getSelectedEntityId,m as getSelectedEntityIds,o as getSnapSettings,R as intersectPlane,j as isPickMode,b as isTransformTool,N as measureObjectSelectionBounds,M as padSelectionBounds,C as quaternionToEuler,H as radiansToDegrees,e as registerDebugEntityResolver,z as registerEntityFocusContext,f as resolveDebugEntity,O as resolveSelectionBounds,r as setAddType,h as setDebugTool,q as setGridVisible,t as setHoveredEntityId,g as setPaused,i as setPickMode,w as setSelectedEntity,l as setSelectedEntityId,n as setSelectedEntityIds,p as setSnapSettings,F as snapScale,D as snapToIncrement,E as snapVec3};
@@ -1,14 +1,14 @@
1
1
  import { e as InputPlayerNumber, f as InputProvider, I as Inputs, a as SetupContext, U as UpdateContext, D as DestroyContext, m as IGame, h as SetupFunction, g as UpdateFunction, j as DestroyFunction, 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
3
  import { B as BaseNode } from './base-node-idopiSw5.js';
4
- import { B as BaseEntityInterface, q as Stage } from './stage-CAPlk_cN.js';
4
+ import { B as BaseEntityInterface, q as Stage } from './stage-bVLyYnOQ.js';
5
5
  import { y as GameEntityLifeCycle } from './entity-XqvuWgPm.js';
6
6
  import { Color, Vector3 } from 'three';
7
7
  import { d as Vec3Components } from './vector-D3eDzvcA.js';
8
8
  import { D as DefaultTouchControlsOptions } from './default-controls-CAKJ5zlo.js';
9
9
  import { GameEvents } from './events.js';
10
10
  import { Simulation } from '@zylem/behaviors/core';
11
- import { l as ZylemCamera, R as RendererManager } from './zylem-camera-CYDtrVgi.js';
11
+ import { l as ZylemCamera, R as RendererManager } from './zylem-camera-CO713zFl.js';
12
12
  import { S as StageTransitionConfig } from './stage-transition-CmGpV4tc.js';
13
13
 
14
14
  declare class InputManager {
@@ -1 +1 @@
1
- import{y as e}from"./chunk-SWDNK4GG.js";import"./chunk-BCFFS3FP.js";import"./chunk-2HSR5XDQ.js";import"./chunk-7CBJKE42.js";import"./chunk-BQRMYLYD.js";import"./chunk-GPCSX3M6.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-YQS7CGXE.js";import"./chunk-KP6DLLJO.js";import"./chunk-6FGXC4T6.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.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"./chunk-WOT6VMZA.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
+ import{y as e}from"./chunk-4A274H3Y.js";import"./chunk-47HAZZWF.js";import"./chunk-2HSR5XDQ.js";import"./chunk-3CLQWJ2I.js";import"./chunk-BQRMYLYD.js";import"./chunk-GPCSX3M6.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-YQS7CGXE.js";import"./chunk-KP6DLLJO.js";import"./chunk-6FGXC4T6.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.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"./chunk-WOT6VMZA.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,6 +1,6 @@
1
1
  import { b as ZylemTSLShader } from './material-CxxAyJYp.js';
2
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-CYDtrVgi.js';
3
+ export { Z as ZylemPostEffect } from './zylem-camera-CO713zFl.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';
package/dist/public.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-D8KTP3fD.js';
1
+ export { A as AspectRatio, f as AspectRatioValue, D as DeviceProfile, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, R as ResolutionInput, e as ResolveGameConfigRuntime, j as RetroPreset, k as RetroPresetKey, l as RetroResolution, c as createGame, g as gameConfig, h as getDisplayAspect, i as getPresetResolution, p as parseResolution } from './game-DBNxY6mb.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
- export { e as CameraManager, d as CameraOptions, C as CameraWrapper, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-CAPlk_cN.js';
4
- export { CameraFeedOptions, FollowTargetOptions, PlatformAxisMode, PlatformAxisModes, PlatformFollowOptions, RenderCategory, STAGE_STATE_CHANGE, StageManager, StageStateChangeEvent, StrategyPanBehavior, StrategyPanInput, StrategyPanOptions, StrategyPointer, Vect3, createFollowTarget, createPlatformFollow, createStrategyPan, dispatchStageState, entitySpawner, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, usesManagedRenderPath, vessel } from './core.js';
3
+ export { e as CameraManager, d as CameraOptions, C as CameraWrapper, l as FirstPersonOptions, f as FirstPersonPerspective, k as Fixed2DOptions, F as Fixed2DPerspective, n as IsometricOptions, I as IsometricPerspective, P as PerspectiveOptions, R as RenderBundleManager, p as RenderStrategyManager, m as SecondPersonOptions, g as SecondPersonPerspective, S as StageConfigLike, a as StageOptions, j as ThirdPersonOptions, T as ThirdPersonPerspective, o as TopDownOptions, h as TopDownPerspective, b as createCamera, i as createPerspective, c as createStage, s as stageConfig } from './stage-bVLyYnOQ.js';
4
+ export { CameraFeedOptions, FollowTargetOptions, LevelStage, PlatformAxisMode, PlatformAxisModes, PlatformFollowOptions, RenderCategory, STAGE_STATE_CHANGE, StageManager, StageStateChangeEvent, StrategyPanBehavior, StrategyPanInput, StrategyPanOptions, StrategyPointer, StreamLevelOptions, StreamLevelResult, Vect3, createFollowTarget, createPlatformFollow, createStrategyPan, dispatchStageState, entitySpawner, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, streamLevel, streamLevelOnStage, usesManagedRenderPath, vessel } from './core.js';
5
+ export { BRIDGE_READY_EVENT, BridgeChannel, BridgeDebugTool, BridgeHandler, GameLoadingPayload as BridgeLoadingPayload, BridgeMessageType, BridgeMessages, BridgeNdc, BridgeVec3, CameraPosePayload, CutsceneLoadPayload, CutscenePlaybackState, CutsceneStatusPayload, CutsceneViewPayload, EditorToGameMessages, EntityApplySwatchPayload, EntityPickPayload, EntityPickResultPayload, EntitySummaryPayload, EntitySwatchAppliedPayload, EntityThumbnailPayload, GameConfigPayload, GameToEditorMessages, GameVariablePayload, LevelBuffer, StageConfigPayload, StageSnapshotPayload, SwatchApplyFailureReason, SwatchApplyResult, SwatchKind, SwatchSpec, ZylemBridge, announceBridgeReady, applySwatchesToSelection, getZylemBridge } from '@zylem/bridge';
5
6
  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';
6
7
  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';
7
8
  export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
8
- export { g as CameraAction, f as CameraBehavior, d as CameraContext, e as CameraPerspective, k as CameraPipeline, h as CameraPipelineState, C as CameraPose, j as CameraProjection, 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-CYDtrVgi.js';
9
+ export { g as CameraAction, f as CameraBehavior, d as CameraContext, e as CameraPerspective, k as CameraPipeline, h as CameraPipelineState, C as CameraPose, j as CameraProjection, 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-CO713zFl.js';
9
10
  export { S as StageEntity } from './entity-BIf_a4dl.js';
10
11
  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';
11
12
  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-CrsrKT8c.js';
@@ -29,7 +30,6 @@ export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools,
29
30
  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';
30
31
  export { S as SELECTION_BOUNDS_MARGIN, a as SELECTION_THIN_AXIS_FRACTION, c as SELECTION_THIN_AXIS_MAX, b as SELECTION_THIN_AXIS_MIN, d as SelectionBoundsProvider, m as measureObjectSelectionBounds, p as padSelectionBounds, r as resolveSelectionBounds } from './selection-bounds-BKmSo9aG.js';
31
32
  export { GameBridge, GameBridgeHost, SwatchApplyOutcome } from './bridge.js';
32
- export { BRIDGE_READY_EVENT, BridgeChannel, BridgeDebugTool, BridgeHandler, GameLoadingPayload as BridgeLoadingPayload, BridgeMessageType, BridgeMessages, BridgeNdc, BridgeVec3, CameraPosePayload, CutsceneLoadPayload, CutscenePlaybackState, CutsceneStatusPayload, CutsceneViewPayload, EditorToGameMessages, EntityApplySwatchPayload, EntityPickPayload, EntityPickResultPayload, EntitySummaryPayload, EntitySwatchAppliedPayload, EntityThumbnailPayload, GameConfigPayload, GameToEditorMessages, GameVariablePayload, StageConfigPayload, StageSnapshotPayload, SwatchApplyFailureReason, SwatchApplyResult, SwatchKind, SwatchSpec, ZylemBridge, announceBridgeReady, applySwatchesToSelection, getZylemBridge } from '@zylem/bridge';
33
33
  export { ZylemGameElement, ZylemGameState } from './web-components.js';
34
34
  export { a as SimulationBody, S as SimulationStepClock } from './simulation-body-zQw-emOr.js';
35
35
  export { RuntimeBodyOptions, RuntimeColliderOptions, RuntimeCollisionBundle, buildBoxCollider, buildCapsuleCollider, buildConvexHullCollider, buildCylinderCollider, buildHeightfieldCollider, buildRuntimeBody, buildSphereCollider, buildTrimeshCollider, bundleRuntimeCollision } from './runtime.js';
package/dist/public.js CHANGED
@@ -1 +1 @@
1
- import{A as Mx,B as Nx,C as Ox,a as ix,b as dx,c as cx,d as sx,e as nx,f as lx,g as Sx,h as hx,i as yx,j as Lx,k as vx,l as Zx,m as bx,n as gx,o as ux,p as Tx,q as jx,r as Fx,s as Wx,t as kx,u as wx,v as zx,w as Bx,x as Dx,y as Ex,z as Gx}from"./chunk-KSEP7AUF.js";import"./chunk-ORIDWL3T.js";import{a as s,b as n,c as l,d as S,e as h,f as y,g as L,h as v,i as Z,j as b,k as g,l as u,m as T,n as j,o as F,p as W,q as k,r as w,s as z,t as B,u as D,v as E,w as G}from"./chunk-QB3NL7VQ.js";import"./chunk-BIGH6D34.js";import"./chunk-ELQN62PQ.js";import{a as Cf,b as Hf,c as If,d as Jf}from"./chunk-FZNEWOC5.js";import{a as Kf}from"./chunk-4CZZZCFB.js";import{a as Qf,b as Rf,c as Uf,d as Xf,e as Yf,f as _f,g as $f,h as ox,i as rx,j as ex,k as tx,l as mx,m as px,n as ax,o as fx,p as xx}from"./chunk-47DG7I7M.js";import{a as Wo,b as ko,c as wo,d as zo,e as Po,f as Vp,g as qp,h as _p,i as $p,j as oa,k as ra,l as ea,m as ta,n as ma,o as pa,p as aa,q as fa}from"./chunk-SHDHPDOV.js";import{a as Fo,c as ym,d as Lm,e as vm,f as cp,g as sp,h as gp,i as up,k as Tp,l as jp,m as Fp,n as Wp,o as kp,p as wp,q as zp,r as Bp,s as Dp,t as Ep,u as Gp,v as Mp,w as Op,y as Pp}from"./chunk-SWDNK4GG.js";import{a as Bo,b as Do,c as Eo,d as Go,e as Mo,f as No,g as Oo}from"./chunk-PCFF4LLO.js";import{a as so,b as no}from"./chunk-Q2YDBMVY.js";import{c as Lp,d as vp,e as Zp,f as bp}from"./chunk-BCFFS3FP.js";import"./chunk-VSFULLND.js";import"./chunk-2HSR5XDQ.js";import{h as Xo}from"./chunk-7CBJKE42.js";import{a as Ao,b as Co,c as Ho,d as Io,e as Jo,f as Ko,g as Qo,h as Ro,i as Uo}from"./chunk-BQRMYLYD.js";import{B as xo,C as io,D as co,a as C,b as H,c as I,d as J,e as K,f as Q,h as R,j as U,l as X,m as Y,n as _,o as $,p as oo,q as ro,u as eo,v as to,w as mo,x as po,y as ao,z as fo}from"./chunk-GPCSX3M6.js";import{b as fp}from"./chunk-WBQ5TNRZ.js";import{a as xa,b as ia,c as da,d as ca,e as sa}from"./chunk-K3NNXZIJ.js";import{a as Ap,b as Cp,c as Hp,d as Ip,e as Jp,f as Kp,g as Qp,h as Rp,i as Up,j as Xp,l as Yp}from"./chunk-LI43BZQN.js";import{a as mp,b as pp,c as ap,d as xp,e as ip,f as dp}from"./chunk-YQS7CGXE.js";import{A as ee,B as te,C as me,D as pe,E as ae,F as le,G as Se,H as he,I as ye,J as Le,K as ve,L as Ze,M as be,N as ge,b as zr,c as Br,d as Dr,e as Er,f as Gr,g as Mr,h as Nr,i as Or,j as Pr,k as Vr,l as qr,m as Ar,n as Cr,o as Hr,p as Ir,q as Jr,r as Kr,s as Qr,t as Rr,u as Ur,v as Xr,w as Yr,x as _r,y as $r,z as re}from"./chunk-STVEILJJ.js";import{c as br,d as gr,e as ur,f as Tr,g as jr,h as Fr,i as Wr,j as kr,u as wr,z as oe}from"./chunk-KP6DLLJO.js";import{c as o,d as r,h as e,i as t,k as m,l as p,m as a,n as f,o as x,p as i,q as d,r as c}from"./chunk-6FGXC4T6.js";import{a as Vo,b as qo}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{a as fe,b as xe,c as ie,d as de,e as ce,f as se,g as ne}from"./chunk-UUOPT2N4.js";import{b as Zr}from"./chunk-EVYHPR3J.js";import{a as na,b as la,c as Sa,d as ha,e as ya,f as La,g as va,h as Za,i as ba,j as ga,k as ua,l as Ta,m as ja,n as Fa,o as Wa,p as ka}from"./chunk-6XFXPIVB.js";import{$ as bt,A as Re,Aa as Rt,B as Ue,Ba as Ut,C as Xe,Ca as Xt,D as Ye,Da as Yt,E as _e,Ea as _t,F as $e,Fa as $t,G as ot,Ga as om,H as rt,Ha as rm,I as et,Ia as em,J as tt,Ja as tm,K as mt,Ka as mm,L as pt,La as pm,M as at,Ma as am,N as ft,Na as fm,O as xt,Oa as xm,P as it,Pa as im,Q as dt,Qa as dm,R as ct,Ra as cm,S as st,Sa as sm,T as nt,Ta as nm,U as lt,Ua as lm,V as St,Va as Sm,W as ht,X as yt,Y as Lt,Z as vt,_ as Zt,aa as gt,b as ue,ba as ut,c as Te,ca as Tt,d as je,da as jt,e as Fe,ea as Ft,f as We,fa as Wt,g as ke,ga as kt,h as we,ha as wt,i as ze,ia as zt,j as Be,ja as Bt,k as De,ka as Dt,l as Ee,la as Et,m as Ge,ma as Gt,n as Me,na as Mt,o as Ne,oa as Nt,p as Oe,pa as Ot,q as Pe,qa as Pt,r as Ve,ra as Vt,s as qe,sa as qt,t as Ae,ta as At,u as Ce,ua as Ct,v as He,va as Ht,w as Ie,wa as It,x as Je,xa as Jt,y as Ke,ya as Kt,z as Qe,za as Qt}from"./chunk-VUJXR5K5.js";import{a as wa,b as za,c as Ca,d as Ha,e as Ia,f as Ja}from"./chunk-ZZO4CKRU.js";import{a as Ba,b as Da,c as Ea,d as Ga,e as Ma,f as Na,g as Oa,h as Pa,i as Va,j as qa,k as Aa}from"./chunk-NVVLLWIM.js";import{a as Um,c as Xm,d as Ym,e as _m,f as $m,g as op}from"./chunk-2PFNNGTV.js";import"./chunk-VMXSE3EC.js";import{a as Ka,b as Qa,c as Ra,d as Ua,e as Xa,f as Ya,g as _a,h as $a,i as of,j as rf,k as ef}from"./chunk-YNX3Q3CL.js";import{a as Zm,b as bm,c as gm,d as um,e as Tm,f as jm,g as Fm,h as Wm,i as km,j as wm,k as zm,l as Bm,m as Dm,n as Em,o as Gm,p as Mm,q as Nm,r as rp,s as ep,t as tp}from"./chunk-2XMG3NJS.js";import{a as hm}from"./chunk-7GYFZKK7.js";import{a as Om,b as Pm,c as Vm,d as qm,e as Am,f as Cm,g as Hm,h as Im,i as Jm,j as Km,k as Qm,l as Rm}from"./chunk-QGIYILYI.js";import{a as tf,b as mf,c as pf,d as af}from"./chunk-WQ3WMMZD.js";import{h as np,i as lp,j as Sp,k as hp,l as yp}from"./chunk-D2PATZCC.js";import{e as M,f as N,g as O,h as P,i as V,j as q,m as A}from"./chunk-4QLJUQSJ.js";import{a as Yo,b as _o,c as $o,d as or,g as rr,h as er,i as tr,j as mr}from"./chunk-7WRQ2UAN.js";import{A as Gf,B as Mf,C as Nf,D as Of,E as Pf,a as ff,b as xf,c as df,d as cf,e as sf,f as nf,g as lf,h as Sf,i as hf,j as yf,k as Lf,l as vf,m as Zf,n as bf,o as gf,p as uf,q as Tf,r as jf,s as Ff,t as Wf,u as kf,v as wf,w as zf,x as Bf,y as Df,z as Ef}from"./chunk-IPWUDOV5.js";import{a as Np}from"./chunk-BH53MBAZ.js";import{a as pr,b as ar,c as fr,d as xr,e as ir,f as dr,g as cr,h as sr,i as nr,j as lr,k as Sr,l as hr,m as yr,n as Lr,o as vr}from"./chunk-XRP4JJXL.js";import{a as Vf,b as qf,c as Af}from"./chunk-7QF6YTEZ.js";import{a as lo,b as So,c as ho,d as yo,e as Lo,f as vo,g as Zo,h as bo,i as go,j as uo,k as To,l as jo}from"./chunk-UG22Z42P.js";import"./chunk-WOT6VMZA.js";export{mp as ACTOR_TYPE,Wo as AspectRatio,Oa as AudioClipSchema,of as AudioItemSchema,Nr as BOX_TYPE,Jf as BRIDGE_READY_EVENT,ue as BoundaryRicochet3DCoordinator,Te as BoundaryRicochetCoordinator,Cr as CONE_TYPE,Zm as CUTSCENE_BEHAVIOR_KEY,Rr as CYLINDER_TYPE,Ra as CameraKeyframeSchema,Dp as CameraManager,Tp as CameraPipeline,Ya as CameraShotSchema,Ep as CameraWrapper,zx as ColorJsonSchema,Lp as ConstructionGrid,je as CooldownBehavior,bm as CutsceneCameraBehavior,Ua as CutsceneCameraSchema,ef as CutsceneDefinitionSchema,_a as CutsceneEventSchema,tp as CutscenePreviewController,Qa as CutsceneSceneSchema,rf as CutsceneTrackSchema,I as DEFAULT_SNAP_SETTINGS,re as DISK_TYPE,Fe as Destructible3DBehavior,We as DestructibleMesh,Xa as DollyPathSchema,hx as EntityJsonSchema,dx as EntitySchema,so as EntityThumbnailCache,Vo as EventEmitterDelegate,$a as EventItemSchema,xp as FOG_TYPE,ke as FirstPersonBehavior,we as FirstPersonEvent,ze as FirstPersonFSM,Wp as FirstPersonPerspective,Ee as FirstPersonPresentation,Be as FirstPersonShooterCoordinator,De as FirstPersonState,Fp as Fixed2DPerspective,c as Fn,Ge as FractureOptions,_p as Game,Xo as GameBridge,Ox as GameConfigJsonSchema,Nx as GameDeviceConfigJsonSchema,wx as GameInputConfigSchema,kx as GameInputPlayerConfigSchema,Ja as Howl,Ea as InstrumentDefinitionSchema,Da as InstrumentEffectSchema,Ba as InstrumentPresetSchema,kp as IsometricPerspective,Me as Jumper2DBehavior,Ne as Jumper2DEvent,Oe as Jumper2DFSM,Pe as Jumper2DState,Ve as Jumper3DBehavior,qe as Jumper3DEvent,Ae as Jumper3DFSM,Ce as Jumper3DState,Lx as KeyboardMappingSchema,Ze as LIGHT_TYPE,Qp as LINE_TYPE,lx as LineEntityDataSchema,Wx as MouseConfigSchema,vx as MouseMappingSchema,He as MultidirectionalSpaceShooterCoordinator,Na as NoteClipSchema,xa as PARTICLE_SYSTEM_TYPE,Yr as PILL_TYPE,me as PLANE_TYPE,Jr as PYRAMID_TYPE,Ie as ParticleEmitterBehavior,up as Perspectives,Je as Platformer2DBehavior,Ke as Platformer2DEvent,Qe as Platformer2DFSM,Re as Platformer2DState,Ue as Platformer3DBehavior,Xe as Platformer3DEvent,Ye as Platformer3DFSM,_e as Platformer3DState,ye as RECT_TYPE,va as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,Za as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,ba as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,ga as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,ua as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,Ta as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,cp as RenderBundleManager,sp as RenderStrategyManager,Mx as ResolutionInputSchema,$e as Ricochet2DBehavior,ot as Ricochet2DEvent,rt as Ricochet2DFSM,et as Ricochet2DState,tt as Ricochet3DBehavior,mt as Ricochet3DEvent,pt as Ricochet3DFSM,at as Ricochet3DState,na as RuntimeBoundary2DBehavior,la as RuntimeDynamicCircleBody2DBehavior,Sa as RuntimeGoalZone2DBehavior,ha as RuntimePlayerInput2DBehavior,ya as RuntimeRicochet2DBehavior,La as RuntimeTriggerRegion2DBehavior,fe as SELECTION_BOUNDS_MARGIN,xe as SELECTION_THIN_AXIS_FRACTION,de as SELECTION_THIN_AXIS_MAX,ie as SELECTION_THIN_AXIS_MIN,Vr as SPHERE_TYPE,Ip as SPRITE_TYPE,ra as STAGE_STATE_CHANGE,Ka as SceneTransitionSchema,ft as ScreenVisibilityBehavior,xt as ScreenVisibilityFSM,it as ScreenWrapBehavior,dt as ScreenWrapEvent,ct as ScreenWrapFSM,st as ScreenWrapState,zp as SecondPersonPerspective,nt as Shooter2DBehavior,fp as SimulationBody,Pa as SongClipSchema,Aa as SongDefinitionSchema,qa as SongLoopSchema,Ga as SongNoteSchema,Ma as SongTrackSchema,Sx as SpriteEntityDataSchema,Ex as StageAssetLoaderConfigSchema,ex as StageBodyKind,tx as StageBoundaryDim,Gx as StageConfigJsonSchema,mx as StageEventType,Dx as StageGLTFAssetLoaderConfigSchema,yx as StageJsonSchema,qp as StageManager,px as StageRicochetDim,ax as StageRicochetReflection,cx as StageSchema,fx as StageTopDownPlane,Ap as TEXT_TYPE,C as TRANSFORM_TOOLS,sx as TextEntityDataSchema,jp as ThirdPersonPerspective,lt as ThrusterBehavior,St as ThrusterEvent,ht as ThrusterFSM,yt as ThrusterState,Va as TimeSignatureSchema,Lt as TopDownMovementBehavior,wp as TopDownPerspective,vt as TopDownShooterCoordinator,bp as TransformGizmo,_o as VEC2_ONE,Yo as VEC2_ZERO,or as VEC3_ONE,$o as VEC3_ZERO,Bx as Vec3ComponentsSchema,ix as Vector2Schema,nx as Vector3TupleSchema,gx as VirtualTouchButtonConfigSchema,Tx as VirtualTouchButtonsConfigSchema,Fx as VirtualTouchConfigSchema,ux as VirtualTouchJoystickConfigSchema,jx as VirtualTouchJoysticksConfigSchema,bx as VirtualTouchPositionSchema,Zx as VirtualTouchStyleSchema,Zt as WorldBoundary2DBehavior,bt as WorldBoundary2DEvent,gt as WorldBoundary2DFSM,ut as WorldBoundary2DState,Tt as WorldBoundary3DBehavior,jt as WorldBoundary3DEvent,Ft as WorldBoundary3DFSM,Wt as WorldBoundary3DState,le as ZONE_TYPE,pp as ZylemActor,Or as ZylemBox,Hr as ZylemCone,Ur as ZylemCylinder,ee as ZylemDisk,ip as ZylemFog,Kf as ZylemGameElement,be as ZylemLight,Up as ZylemLine,ia as ZylemParticleSystem,_r as ZylemPill,pe as ZylemPlane,Kr as ZylemPyramid,Le as ZylemRect,qr as ZylemSphere,Jp as ZylemSprite,Cp as ZylemText,Se as ZylemZone,u as abs,Wm as activeShot,Hf as announceBridgeReady,If as applySwatchesToSelection,Np as applyTransformChanges,g as asin,b as atan,Km as audibleTrackIds,Om as beatsPerBar,Vm as beatsToSeconds,ja as bindRuntimeDynamicCircleBody2DHandle,br as boxCollision,zr as boxMesh,Rf as buildBoxCollider,Xf as buildCapsuleCollider,_f as buildConvexHullCollider,Yf as buildCylinderCollider,ox as buildHeightfieldCollider,Qf as buildRuntimeBody,Uf as buildSphereCollider,$f as buildTrimeshCollider,rx as bundleRuntimeCollision,nf as callFunc,Gm as cameraTracks,L as clamp,A as clearGlobalSubscriptions,Rm as clipsAt,vp as closestAxisValue,kt as computeWorldBoundary2DHits,wt as computeWorldBoundary3DHits,ur as coneCollision,Dr as coneMesh,Z as cos,wr as create,ap as createActor,s as createBackgroundShader,Pr as createBox,Gp as createCamera,Ir as createCone,ca as createCooldownIcon,Nm as createCutscenePlayer,Xr as createCylinder,te as createDisk,oe as createEntity,Yp as createEntityFactory,zt as createFirstPersonInputComponent,Bt as createFirstPersonMovementComponent,Dt as createFirstPersonStateComponent,dp as createFog,ma as createFollowTarget,$p as createGame,N as createGlobal,Um as createInstrument,Et as createJumpConfig2D,Gt as createJumpConfig3D,Mt as createJumpInput2D,Nt as createJumpInput3D,Ot as createJumpState2D,Pt as createJumpState3D,ge as createLight,Xp as createLine,m as createNodeMaterialFromTSL,da as createParticleSystem,Bp as createPerspective,Vt as createPhysicsBodyComponent,$r as createPill,ae as createPlane,pa as createPlatformFollow,qt as createPlatformer2DInputComponent,At as createPlatformer2DMovementComponent,Ct as createPlatformer2DStateComponent,Ht as createPlatformer3DInputComponent,It as createPlatformer3DMovementComponent,Jt as createPlatformer3DStateComponent,Qr as createPyramid,ve as createRect,Kt as createShooter2DStateComponent,xx as createSimulation,$m as createSongPlayer,Ar as createSphere,Kp as createSprite,Pp as createStage,ep as createStageCutsceneHost,aa as createStrategyPan,Hp as createText,Qt as createThrusterInputComponent,Rt as createThrusterMovementComponent,Ut as createThrusterStateComponent,Xt as createTopDownMovementComponent,Yt as createTopDownMovementInputComponent,_t as createTopDownMovementStateComponent,$t as createTransformComponent,gf as createTransformStore,lp as createVariable,he as createZone,hm as crossfadeTransitionShader,Mm as cutsceneLength,jr as cylinderCollision,Gr as cylinderMesh,Im as dbToGain,J as debugState,Oo as defaultTouchControls,om as defineBehavior,Ro as degreesToRadians,sf as delay,sa as destroy,ta as dispatchStageState,wm as dollyPointAt,B as dot,gm as easeValue,Fa as emitRuntimeGoal,Wa as emitRuntimeRicochet,ka as emitRuntimeTriggerRegionEnter,Ha as encodeWav,Ia as encodeWavBlob,Ym as ensureAudio,oa as entitySpawner,no as entityThumbnailCache,Ho as eulerToQuaternion,Bm as evaluateCameraPose,Dm as evaluateCutscene,T as exp,lf as fadeOpacity,rm as fireCooldown,em as fireShooter2DIfRequested,d as float,w as floor,Co as focusEntity,z as fract,Jm as gainToDb,Po as gameConfig,op as getActiveSongPlayer,tm as getCooldown,mm as getCooldownStore,ko as getDisplayAspect,pm as getEntityFacingAngle2D,O as getGlobal,q as getGlobals,io as getHoveredEntity,ao as getHoveredEntityId,Bf as getPosition,wo as getPresetResolution,vr as getRotation,xo as getSelectedEntity,_ as getSelectedEntityId,oo as getSelectedEntityIds,eo as getSnapSettings,Sp as getVariable,Df as getVelocity,Cf as getZylemBridge,tf as globalChange,mf as globalChanges,am as hasAnyWorldBoundary2DHit,fm as hasAnyWorldBoundary3DHit,ea as initStageStateDispatcher,Zp as intersectPlane,_m as isAudioReady,t as isGLSLShader,vm as isManagedRenderEntity,Y as isPickMode,e as isTSLShader,H as isTransformTool,Fo as isWebGPUSupported,Em as itemsBetween,Go as joystickBaseSvg,Mo as joystickThumbSvg,D as length,Tm as lerpPose,um as lerpVec3,Xm as loadTone,W as max,se as measureObjectSelectionBounds,jo as mergeInputConfigs,Cm as midiToFrequency,Hm as midiToNoteName,k as min,h as mix,G as mod,uf as move,xf as moveBy,zf as moveForwardXY,df as moveTo,Tf as moveX,Wf as moveXY,kf as moveXZ,jf as moveY,Ff as moveZ,S as normalize,rr as normalizeVec2,er as normalizeVec3,o as objectVertexShader,P as onGlobalChange,V as onGlobalChanges,hf as onPress,yf as onRelease,hp as onVariableChange,yp as onVariableChanges,Zr as packCollisionGroups,ce as padSelectionBounds,vf as parallel,zo as parseResolution,xm as particleEffect,im as particlePresets,Rp as pickZylemLine,Fr as pillCollision,Mr as pillMesh,za as pingPongBeep,Wr as planeCollision,l as positionWorld,n as positionWorldDirection,j as pow,km as previousShot,Tr as pyramidCollision,Er as pyramidMesh,Io as quaternionToEuler,Uo as radiansToDegrees,dm as registerCooldown,K as registerDebugEntityResolver,Ao as registerEntityFocusContext,Ca as renderSong,Zf as repeat,bf as repeatForever,cm as resetCooldown,ff as resetEntityOpacity,wf as resetVelocity,sm as resolveAim2D,Eo as resolveButtonAccent,Q as resolveDebugEntity,ym as resolveRenderCategory,ne as resolveSelectionBounds,Do as resolveTouchTheme,wa as ricochetSound,cf as rotateBy,fr as rotateEuler,pr as rotateInDirection,ir as rotateX,xr as rotateY,ar as rotateYEuler,dr as rotateZ,zm as sampleDollyPath,jm as sceneAt,Qm as scheduleSong,Af as screenCenterLookDeltas,qf as screenCenterLookTargets,qm as secondsToBeats,Lf as sequence,po as setAddType,fa as setCameraFeed,rp as setCutsceneTransitionShaders,U as setDebugTool,M as setGlobal,mo as setGridVisible,fo as setHoveredEntityId,R as setPaused,X as setPickMode,Ef as setPosition,Gf as setPositionX,Mf as setPositionY,Nf as setPositionZ,yr as setRotation,Lr as setRotationDegrees,lr as setRotationDegreesX,sr as setRotationDegreesY,hr as setRotationDegreesZ,nr as setRotationX,cr as setRotationY,Sr as setRotationZ,co as setSelectedEntity,$ as setSelectedEntityId,ro as setSelectedEntityIds,to as setSnapSettings,gp as setStageFrameProfilerEnabled,np as setVariable,Vf as shortestAngleDelta,Fm as shotAt,v as sin,y as smoothstep,Qo as snapScale,Jo as snapToIncrement,Ko as snapVec3,Pm as songLengthBeats,Am as songLengthSeconds,gr as sphereCollision,Br as sphereMesh,Mp as stageConfig,Vp as stageState,r as standardShader,F as step,Sf as throttle,nm as tickCooldowns,f as time,tr as toThreeVector2,mr as toThreeVector3,No as touchButtonSvg,Bo as touchThemes,p as uniform,lm as updateBoundaryRicochet,lo as useArrowsForAxes,ho as useArrowsForDirections,So as useArrowsForSecondaryAxes,Sm as useBehavior,vo as useIJKLForAxes,Zo as useIJKLForDirections,uo as useMouse,bo as useMouseLook,go as useScreenCenterLook,To as useVirtualControls,Lo as useWASDForAxes,yo as useWASDForDirections,Lm as usesManagedRenderPath,a as uv,pf as variableChange,af as variableChanges,E as vec2,x as vec3,i as vec4,Op as vessel,Pf as wrapAround3D,Of as wrapAroundXY,kr as zoneCollision,qo as zylemEventBus};
1
+ import{A as Ox,B as Px,C as Vx,a as cx,b as sx,c as nx,d as lx,e as Sx,f as hx,g as yx,h as Lx,i as vx,j as Zx,k as bx,l as gx,m as ux,n as Tx,o as jx,p as Fx,q as Wx,r as kx,s as wx,t as zx,u as Bx,v as Dx,w as Ex,x as Gx,y as Mx,z as Nx}from"./chunk-KSEP7AUF.js";import"./chunk-ORIDWL3T.js";import{a as s,b as n,c as l,d as S,e as h,f as y,g as L,h as v,i as Z,j as b,k as g,l as u,m as T,n as j,o as F,p as W,q as k,r as w,s as z,t as B,u as D,v as E,w as G}from"./chunk-QB3NL7VQ.js";import"./chunk-BIGH6D34.js";import"./chunk-ELQN62PQ.js";import{a as If,b as Jf,c as Kf,d as Qf}from"./chunk-FZNEWOC5.js";import{a as Rf}from"./chunk-4CZZZCFB.js";import{a as Uf,b as Xf,c as Yf,d as _f,e as $f,f as ox,g as rx,h as ex,i as tx,j as mx,k as px,l as ax,m as fx,n as xx,o as ix,p as dx}from"./chunk-47DG7I7M.js";import{a as Wo,b as ko,c as wo,d as zo,e as Po,f as qp,g as Ap,h as $p,i as oa,j as ra,k as ea,l as ta,m as ma,n as pa,o as aa,p as fa,q as xa,r as ia}from"./chunk-U4JSAJAD.js";import{a as Fo,c as Lm,d as vm,e as Zm,f as sp,g as np,h as up,i as Tp,k as jp,l as Fp,m as Wp,n as kp,o as wp,p as zp,q as Bp,r as Dp,s as Ep,t as Gp,u as Mp,v as Np,w as Pp,y as Vp}from"./chunk-4A274H3Y.js";import{a as Bo,b as Do,c as Eo,d as Go,e as Mo,f as No,g as Oo}from"./chunk-PCFF4LLO.js";import{a as so,b as no}from"./chunk-OCQ7A5IK.js";import{c as vp,d as Zp,e as bp,f as gp}from"./chunk-47HAZZWF.js";import"./chunk-VSFULLND.js";import"./chunk-2HSR5XDQ.js";import{e as Ho,n as Yo}from"./chunk-3CLQWJ2I.js";import{a as Ao,b as Co,c as Io,d as Jo,e as Ko,f as Qo,g as Ro,h as Uo,i as Xo}from"./chunk-BQRMYLYD.js";import{B as xo,C as io,D as co,a as C,b as H,c as I,d as J,e as K,f as Q,h as R,j as U,l as X,m as Y,n as _,o as $,p as oo,q as ro,u as eo,v as to,w as mo,x as po,y as ao,z as fo}from"./chunk-GPCSX3M6.js";import{b as xp}from"./chunk-WBQ5TNRZ.js";import{a as da,b as ca,c as sa,d as na,e as la}from"./chunk-K3NNXZIJ.js";import{a as Cp,b as Hp,c as Ip,d as Jp,e as Kp,f as Qp,g as Rp,h as Up,i as Xp,j as Yp,l as _p}from"./chunk-LI43BZQN.js";import{a as pp,b as ap,c as fp,d as ip,e as dp,f as cp}from"./chunk-YQS7CGXE.js";import{A as te,B as me,C as pe,D as ae,E as fe,F as Se,G as he,H as ye,I as Le,J as ve,K as Ze,L as be,M as ge,N as ue,b as Br,c as Dr,d as Er,e as Gr,f as Mr,g as Nr,h as Or,i as Pr,j as Vr,k as qr,l as Ar,m as Cr,n as Hr,o as Ir,p as Jr,q as Kr,r as Qr,s as Rr,t as Ur,u as Xr,v as Yr,w as _r,x as $r,y as oe,z as ee}from"./chunk-STVEILJJ.js";import{c as gr,d as ur,e as Tr,f as jr,g as Fr,h as Wr,i as kr,j as wr,u as zr,z as re}from"./chunk-KP6DLLJO.js";import{c as o,d as r,h as e,i as t,k as m,l as p,m as a,n as f,o as x,p as i,q as d,r as c}from"./chunk-6FGXC4T6.js";import{a as Vo,b as qo}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{a as xe,b as ie,c as de,d as ce,e as se,f as ne,g as le}from"./chunk-UUOPT2N4.js";import{b as br}from"./chunk-EVYHPR3J.js";import{a as Sa,b as ha,c as ya,d as La,e as va,f as Za,g as ba,h as ga,i as ua,j as Ta,k as ja,l as Fa,m as Wa,n as ka,o as wa,p as za}from"./chunk-6XFXPIVB.js";import{$ as gt,A as Ue,Aa as Ut,B as Xe,Ba as Xt,C as Ye,Ca as Yt,D as _e,Da as _t,E as $e,Ea as $t,F as ot,Fa as om,G as rt,Ga as rm,H as et,Ha as em,I as tt,Ia as tm,J as mt,Ja as mm,K as pt,Ka as pm,L as at,La as am,M as ft,Ma as fm,N as xt,Na as xm,O as it,Oa as im,P as dt,Pa as dm,Q as ct,Qa as cm,R as st,Ra as sm,S as nt,Sa as nm,T as lt,Ta as lm,U as St,Ua as Sm,V as ht,Va as hm,W as yt,X as Lt,Y as vt,Z as Zt,_ as bt,aa as ut,b as Te,ba as Tt,c as je,ca as jt,d as Fe,da as Ft,e as We,ea as Wt,f as ke,fa as kt,g as we,ga as wt,h as ze,ha as zt,i as Be,ia as Bt,j as De,ja as Dt,k as Ee,ka as Et,l as Ge,la as Gt,m as Me,ma as Mt,n as Ne,na as Nt,o as Oe,oa as Ot,p as Pe,pa as Pt,q as Ve,qa as Vt,r as qe,ra as qt,s as Ae,sa as At,t as Ce,ta as Ct,u as He,ua as Ht,v as Ie,va as It,w as Je,wa as Jt,x as Ke,xa as Kt,y as Qe,ya as Qt,z as Re,za as Rt}from"./chunk-VUJXR5K5.js";import{a as Ba,b as Da,c as Ia,d as Ja,e as Ka,f as Qa}from"./chunk-ZZO4CKRU.js";import{a as Ea,b as Ga,c as Ma,d as Na,e as Oa,f as Pa,g as Va,h as qa,i as Aa,j as Ca,k as Ha}from"./chunk-NVVLLWIM.js";import{a as Xm,c as Ym,d as _m,e as $m,f as op,g as rp}from"./chunk-2PFNNGTV.js";import"./chunk-VMXSE3EC.js";import{a as Ra,b as Ua,c as Xa,d as Ya,e as _a,f as $a,g as of,h as rf,i as ef,j as tf,k as mf}from"./chunk-YNX3Q3CL.js";import{a as bm,b as gm,c as um,d as Tm,e as jm,f as Fm,g as Wm,h as km,i as wm,j as zm,k as Bm,l as Dm,m as Em,n as Gm,o as Mm,p as Nm,q as Om,r as ep,s as tp,t as mp}from"./chunk-2XMG3NJS.js";import{a as ym}from"./chunk-7GYFZKK7.js";import{a as Pm,b as Vm,c as qm,d as Am,e as Cm,f as Hm,g as Im,h as Jm,i as Km,j as Qm,k as Rm,l as Um}from"./chunk-QGIYILYI.js";import{a as pf,b as af,c as ff,d as xf}from"./chunk-WQ3WMMZD.js";import{h as lp,i as Sp,j as hp,k as yp,l as Lp}from"./chunk-D2PATZCC.js";import{e as M,f as N,g as O,h as P,i as V,j as q,m as A}from"./chunk-4QLJUQSJ.js";import{a as _o,b as $o,c as or,d as rr,g as er,h as tr,i as mr,j as pr}from"./chunk-7WRQ2UAN.js";import{A as Nf,B as Of,C as Pf,D as Vf,E as qf,a as df,b as cf,c as sf,d as nf,e as lf,f as Sf,g as hf,h as yf,i as Lf,j as vf,k as Zf,l as bf,m as gf,n as uf,o as Tf,p as jf,q as Ff,r as Wf,s as kf,t as wf,u as zf,v as Bf,w as Df,x as Ef,y as Gf,z as Mf}from"./chunk-IPWUDOV5.js";import{a as Op}from"./chunk-BH53MBAZ.js";import{a as ar,b as fr,c as xr,d as ir,e as dr,f as cr,g as sr,h as nr,i as lr,j as Sr,k as hr,l as yr,m as Lr,n as vr,o as Zr}from"./chunk-XRP4JJXL.js";import{a as Af,b as Cf,c as Hf}from"./chunk-7QF6YTEZ.js";import{a as lo,b as So,c as ho,d as yo,e as Lo,f as vo,g as Zo,h as bo,i as go,j as uo,k as To,l as jo}from"./chunk-UG22Z42P.js";import"./chunk-WOT6VMZA.js";export{pp as ACTOR_TYPE,Wo as AspectRatio,Va as AudioClipSchema,ef as AudioItemSchema,Or as BOX_TYPE,Qf as BRIDGE_READY_EVENT,Te as BoundaryRicochet3DCoordinator,je as BoundaryRicochetCoordinator,Hr as CONE_TYPE,bm as CUTSCENE_BEHAVIOR_KEY,Ur as CYLINDER_TYPE,Xa as CameraKeyframeSchema,Ep as CameraManager,jp as CameraPipeline,$a as CameraShotSchema,Gp as CameraWrapper,Dx as ColorJsonSchema,vp as ConstructionGrid,Fe as CooldownBehavior,gm as CutsceneCameraBehavior,Ya as CutsceneCameraSchema,mf as CutsceneDefinitionSchema,of as CutsceneEventSchema,mp as CutscenePreviewController,Ua as CutsceneSceneSchema,tf as CutsceneTrackSchema,I as DEFAULT_SNAP_SETTINGS,ee as DISK_TYPE,We as Destructible3DBehavior,ke as DestructibleMesh,_a as DollyPathSchema,Lx as EntityJsonSchema,sx as EntitySchema,so as EntityThumbnailCache,Vo as EventEmitterDelegate,rf as EventItemSchema,ip as FOG_TYPE,we as FirstPersonBehavior,ze as FirstPersonEvent,Be as FirstPersonFSM,kp as FirstPersonPerspective,Ge as FirstPersonPresentation,De as FirstPersonShooterCoordinator,Ee as FirstPersonState,Wp as Fixed2DPerspective,c as Fn,Me as FractureOptions,$p as Game,Yo as GameBridge,Vx as GameConfigJsonSchema,Px as GameDeviceConfigJsonSchema,Bx as GameInputConfigSchema,zx as GameInputPlayerConfigSchema,Qa as Howl,Ma as InstrumentDefinitionSchema,Ga as InstrumentEffectSchema,Ea as InstrumentPresetSchema,wp as IsometricPerspective,Ne as Jumper2DBehavior,Oe as Jumper2DEvent,Pe as Jumper2DFSM,Ve as Jumper2DState,qe as Jumper3DBehavior,Ae as Jumper3DEvent,Ce as Jumper3DFSM,He as Jumper3DState,Zx as KeyboardMappingSchema,be as LIGHT_TYPE,Rp as LINE_TYPE,hx as LineEntityDataSchema,wx as MouseConfigSchema,bx as MouseMappingSchema,Ie as MultidirectionalSpaceShooterCoordinator,Pa as NoteClipSchema,da as PARTICLE_SYSTEM_TYPE,_r as PILL_TYPE,pe as PLANE_TYPE,Kr as PYRAMID_TYPE,Je as ParticleEmitterBehavior,Tp as Perspectives,Ke as Platformer2DBehavior,Qe as Platformer2DEvent,Re as Platformer2DFSM,Ue as Platformer2DState,Xe as Platformer3DBehavior,Ye as Platformer3DEvent,_e as Platformer3DFSM,$e as Platformer3DState,Le as RECT_TYPE,ba as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,ga as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,ua as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,Ta as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,ja as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,Fa as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,sp as RenderBundleManager,np as RenderStrategyManager,Ox as ResolutionInputSchema,ot as Ricochet2DBehavior,rt as Ricochet2DEvent,et as Ricochet2DFSM,tt as Ricochet2DState,mt as Ricochet3DBehavior,pt as Ricochet3DEvent,at as Ricochet3DFSM,ft as Ricochet3DState,Sa as RuntimeBoundary2DBehavior,ha as RuntimeDynamicCircleBody2DBehavior,ya as RuntimeGoalZone2DBehavior,La as RuntimePlayerInput2DBehavior,va as RuntimeRicochet2DBehavior,Za as RuntimeTriggerRegion2DBehavior,xe as SELECTION_BOUNDS_MARGIN,ie as SELECTION_THIN_AXIS_FRACTION,ce as SELECTION_THIN_AXIS_MAX,de as SELECTION_THIN_AXIS_MIN,qr as SPHERE_TYPE,Jp as SPRITE_TYPE,ta as STAGE_STATE_CHANGE,Ra as SceneTransitionSchema,xt as ScreenVisibilityBehavior,it as ScreenVisibilityFSM,dt as ScreenWrapBehavior,ct as ScreenWrapEvent,st as ScreenWrapFSM,nt as ScreenWrapState,Bp as SecondPersonPerspective,lt as Shooter2DBehavior,xp as SimulationBody,qa as SongClipSchema,Ha as SongDefinitionSchema,Ca as SongLoopSchema,Na as SongNoteSchema,Oa as SongTrackSchema,yx as SpriteEntityDataSchema,Mx as StageAssetLoaderConfigSchema,mx as StageBodyKind,px as StageBoundaryDim,Nx as StageConfigJsonSchema,ax as StageEventType,Gx as StageGLTFAssetLoaderConfigSchema,vx as StageJsonSchema,Ap as StageManager,fx as StageRicochetDim,xx as StageRicochetReflection,nx as StageSchema,ix as StageTopDownPlane,Cp as TEXT_TYPE,C as TRANSFORM_TOOLS,lx as TextEntityDataSchema,Fp as ThirdPersonPerspective,St as ThrusterBehavior,ht as ThrusterEvent,yt as ThrusterFSM,Lt as ThrusterState,Aa as TimeSignatureSchema,vt as TopDownMovementBehavior,zp as TopDownPerspective,Zt as TopDownShooterCoordinator,gp as TransformGizmo,$o as VEC2_ONE,_o as VEC2_ZERO,rr as VEC3_ONE,or as VEC3_ZERO,Ex as Vec3ComponentsSchema,cx as Vector2Schema,Sx as Vector3TupleSchema,Tx as VirtualTouchButtonConfigSchema,Fx as VirtualTouchButtonsConfigSchema,kx as VirtualTouchConfigSchema,jx as VirtualTouchJoystickConfigSchema,Wx as VirtualTouchJoysticksConfigSchema,ux as VirtualTouchPositionSchema,gx as VirtualTouchStyleSchema,bt as WorldBoundary2DBehavior,gt as WorldBoundary2DEvent,ut as WorldBoundary2DFSM,Tt as WorldBoundary2DState,jt as WorldBoundary3DBehavior,Ft as WorldBoundary3DEvent,Wt as WorldBoundary3DFSM,kt as WorldBoundary3DState,Se as ZONE_TYPE,ap as ZylemActor,Pr as ZylemBox,Ir as ZylemCone,Xr as ZylemCylinder,te as ZylemDisk,dp as ZylemFog,Rf as ZylemGameElement,ge as ZylemLight,Xp as ZylemLine,ca as ZylemParticleSystem,$r as ZylemPill,ae as ZylemPlane,Qr as ZylemPyramid,ve as ZylemRect,Ar as ZylemSphere,Kp as ZylemSprite,Hp as ZylemText,he as ZylemZone,u as abs,km as activeShot,Jf as announceBridgeReady,Kf as applySwatchesToSelection,Op as applyTransformChanges,g as asin,b as atan,Qm as audibleTrackIds,Pm as beatsPerBar,qm as beatsToSeconds,Wa as bindRuntimeDynamicCircleBody2DHandle,gr as boxCollision,Br as boxMesh,Xf as buildBoxCollider,_f as buildCapsuleCollider,ox as buildConvexHullCollider,$f as buildCylinderCollider,ex as buildHeightfieldCollider,Uf as buildRuntimeBody,Yf as buildSphereCollider,rx as buildTrimeshCollider,tx as bundleRuntimeCollision,Sf as callFunc,Mm as cameraTracks,L as clamp,A as clearGlobalSubscriptions,Um as clipsAt,Zp as closestAxisValue,wt as computeWorldBoundary2DHits,zt as computeWorldBoundary3DHits,Tr as coneCollision,Er as coneMesh,Z as cos,zr as create,fp as createActor,s as createBackgroundShader,Vr as createBox,Mp as createCamera,Jr as createCone,na as createCooldownIcon,Om as createCutscenePlayer,Yr as createCylinder,me as createDisk,re as createEntity,_p as createEntityFactory,Bt as createFirstPersonInputComponent,Dt as createFirstPersonMovementComponent,Et as createFirstPersonStateComponent,cp as createFog,aa as createFollowTarget,oa as createGame,N as createGlobal,Xm as createInstrument,Gt as createJumpConfig2D,Mt as createJumpConfig3D,Nt as createJumpInput2D,Ot as createJumpInput3D,Pt as createJumpState2D,Vt as createJumpState3D,ue as createLight,Yp as createLine,m as createNodeMaterialFromTSL,sa as createParticleSystem,Dp as createPerspective,qt as createPhysicsBodyComponent,oe as createPill,fe as createPlane,fa as createPlatformFollow,At as createPlatformer2DInputComponent,Ct as createPlatformer2DMovementComponent,Ht as createPlatformer2DStateComponent,It as createPlatformer3DInputComponent,Jt as createPlatformer3DMovementComponent,Kt as createPlatformer3DStateComponent,Rr as createPyramid,Ze as createRect,Qt as createShooter2DStateComponent,dx as createSimulation,op as createSongPlayer,Cr as createSphere,Qp as createSprite,Vp as createStage,tp as createStageCutsceneHost,xa as createStrategyPan,Ip as createText,Rt as createThrusterInputComponent,Ut as createThrusterMovementComponent,Xt as createThrusterStateComponent,Yt as createTopDownMovementComponent,_t as createTopDownMovementInputComponent,$t as createTopDownMovementStateComponent,om as createTransformComponent,Tf as createTransformStore,Sp as createVariable,ye as createZone,ym as crossfadeTransitionShader,Nm as cutsceneLength,Fr as cylinderCollision,Mr as cylinderMesh,Jm as dbToGain,J as debugState,Oo as defaultTouchControls,rm as defineBehavior,Uo as degreesToRadians,lf as delay,la as destroy,pa as dispatchStageState,zm as dollyPointAt,B as dot,um as easeValue,ka as emitRuntimeGoal,wa as emitRuntimeRicochet,za as emitRuntimeTriggerRegionEnter,Ja as encodeWav,Ka as encodeWavBlob,_m as ensureAudio,ea as entitySpawner,no as entityThumbnailCache,Io as eulerToQuaternion,Dm as evaluateCameraPose,Em as evaluateCutscene,T as exp,hf as fadeOpacity,em as fireCooldown,tm as fireShooter2DIfRequested,d as float,w as floor,Co as focusEntity,z as fract,Km as gainToDb,Po as gameConfig,rp as getActiveSongPlayer,mm as getCooldown,pm as getCooldownStore,ko as getDisplayAspect,am as getEntityFacingAngle2D,O as getGlobal,q as getGlobals,io as getHoveredEntity,ao as getHoveredEntityId,Ef as getPosition,wo as getPresetResolution,Zr as getRotation,xo as getSelectedEntity,_ as getSelectedEntityId,oo as getSelectedEntityIds,eo as getSnapSettings,hp as getVariable,Gf as getVelocity,If as getZylemBridge,pf as globalChange,af as globalChanges,fm as hasAnyWorldBoundary2DHit,xm as hasAnyWorldBoundary3DHit,ma as initStageStateDispatcher,bp as intersectPlane,$m as isAudioReady,t as isGLSLShader,Zm as isManagedRenderEntity,Y as isPickMode,e as isTSLShader,H as isTransformTool,Fo as isWebGPUSupported,Gm as itemsBetween,Go as joystickBaseSvg,Mo as joystickThumbSvg,D as length,jm as lerpPose,Tm as lerpVec3,Ym as loadTone,W as max,ne as measureObjectSelectionBounds,jo as mergeInputConfigs,Hm as midiToFrequency,Im as midiToNoteName,k as min,h as mix,G as mod,jf as move,cf as moveBy,Df as moveForwardXY,sf as moveTo,Ff as moveX,wf as moveXY,zf as moveXZ,Wf as moveY,kf as moveZ,S as normalize,er as normalizeVec2,tr as normalizeVec3,o as objectVertexShader,P as onGlobalChange,V as onGlobalChanges,Lf as onPress,vf as onRelease,yp as onVariableChange,Lp as onVariableChanges,br as packCollisionGroups,se as padSelectionBounds,bf as parallel,zo as parseResolution,im as particleEffect,dm as particlePresets,Up as pickZylemLine,Wr as pillCollision,Nr as pillMesh,Da as pingPongBeep,kr as planeCollision,l as positionWorld,n as positionWorldDirection,j as pow,wm as previousShot,jr as pyramidCollision,Gr as pyramidMesh,Jo as quaternionToEuler,Xo as radiansToDegrees,cm as registerCooldown,K as registerDebugEntityResolver,Ao as registerEntityFocusContext,Ia as renderSong,gf as repeat,uf as repeatForever,sm as resetCooldown,df as resetEntityOpacity,Bf as resetVelocity,nm as resolveAim2D,Eo as resolveButtonAccent,Q as resolveDebugEntity,Lm as resolveRenderCategory,le as resolveSelectionBounds,Do as resolveTouchTheme,Ba as ricochetSound,nf as rotateBy,xr as rotateEuler,ar as rotateInDirection,dr as rotateX,ir as rotateY,fr as rotateYEuler,cr as rotateZ,Bm as sampleDollyPath,Fm as sceneAt,Rm as scheduleSong,Hf as screenCenterLookDeltas,Cf as screenCenterLookTargets,Am as secondsToBeats,Zf as sequence,po as setAddType,ia as setCameraFeed,ep as setCutsceneTransitionShaders,U as setDebugTool,M as setGlobal,mo as setGridVisible,fo as setHoveredEntityId,R as setPaused,X as setPickMode,Mf as setPosition,Nf as setPositionX,Of as setPositionY,Pf as setPositionZ,Lr as setRotation,vr as setRotationDegrees,Sr as setRotationDegreesX,nr as setRotationDegreesY,yr as setRotationDegreesZ,lr as setRotationX,sr as setRotationY,hr as setRotationZ,co as setSelectedEntity,$ as setSelectedEntityId,ro as setSelectedEntityIds,to as setSnapSettings,up as setStageFrameProfilerEnabled,lp as setVariable,Af as shortestAngleDelta,Wm as shotAt,v as sin,y as smoothstep,Ro as snapScale,Ko as snapToIncrement,Qo as snapVec3,Vm as songLengthBeats,Cm as songLengthSeconds,ur as sphereCollision,Dr as sphereMesh,Np as stageConfig,qp as stageState,r as standardShader,F as step,Ho as streamLevel,ra as streamLevelOnStage,yf as throttle,lm as tickCooldowns,f as time,mr as toThreeVector2,pr as toThreeVector3,No as touchButtonSvg,Bo as touchThemes,p as uniform,Sm as updateBoundaryRicochet,lo as useArrowsForAxes,ho as useArrowsForDirections,So as useArrowsForSecondaryAxes,hm as useBehavior,vo as useIJKLForAxes,Zo as useIJKLForDirections,uo as useMouse,bo as useMouseLook,go as useScreenCenterLook,To as useVirtualControls,Lo as useWASDForAxes,yo as useWASDForDirections,vm as usesManagedRenderPath,a as uv,ff as variableChange,xf as variableChanges,E as vec2,x as vec3,i as vec4,Pp as vessel,qf as wrapAround3D,Vf as wrapAroundXY,wr as zoneCollision,qo as zylemEventBus};
@@ -4,7 +4,7 @@ import { Scene, Color, Object3D, Vector3, BufferGeometry, Material, Group, Textu
4
4
  import { al as ZylemWorld, aj as EntityTypeMap } from './entity-type-map-CrsrKT8c.js';
5
5
  import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-BIf_a4dl.js';
6
6
  import { G as GameEntity, a as GameEntityOptions } from './entity-XqvuWgPm.js';
7
- import { l 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-CYDtrVgi.js';
7
+ import { l 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-CO713zFl.js';
8
8
  import { d as ZylemShader } from './material-CxxAyJYp.js';
9
9
  import { a as SimulationBody } from './simulation-body-zQw-emOr.js';
10
10
  import { e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-D3eDzvcA.js';
@@ -13,34 +13,57 @@ import { G as GameInputConfig } from './game-interfaces-vF5sRi1n.js';
13
13
  import { SwatchApplyResult, SceneOperationEntry, EntityApplySwatchPayload, SceneOperationPayload } from '@zylem/bridge';
14
14
  import { BehaviorSystem, BehaviorEntityLink, BehaviorRuntime, BehaviorSystemFactory, BehaviorRef } from '@zylem/behaviors/core';
15
15
 
16
+ /**
17
+ * Editor-view cameras exist only while an editor is attached.
18
+ *
19
+ * `GameBridge.connect()` runs for every game, so it is not the signal. The
20
+ * bridge marks the session attached when an editor subscribes, and every live
21
+ * camera manager creates or destroys its four view cameras from that flag.
22
+ */
23
+ interface EditorCameraHost {
24
+ ensureEditorCameras(): Promise<void>;
25
+ destroyEditorCameras(): void;
26
+ activateCameraById(id: string): boolean;
27
+ }
28
+
16
29
  /**
17
30
  * CameraManager orchestrates multiple cameras per stage.
18
31
  *
19
32
  * Responsibilities:
20
33
  * - Named camera registry (add/remove/get by name or reference)
21
34
  * - Active camera list management (determines which cameras render)
22
- * - Always-available debug camera with orbit controls
35
+ * - Editor view cameras (side, top, isometric, free), created only while an editor is attached
23
36
  * - Per-frame update of all active cameras' perspective controllers
24
37
  * - Coordinating rendering via RendererManager for all active viewports
25
38
  */
26
- declare class CameraManager {
39
+ declare class CameraManager implements EditorCameraHost {
27
40
  /** Named camera registry */
28
41
  private cameras;
29
42
  /** Currently active cameras, ordered by render layer (first = bottom) */
30
43
  private _activeCameras;
31
- /** Auto-created debug camera with orbit controls */
32
- private _debugCamera;
33
- /** Gameplay primary camera saved while the debug camera is active. */
34
- private _preDebugPrimary;
35
- /** Scene anchor at world origin for debug orbit when nothing is selected. */
36
- private _debugOrbitTargetAnchor;
44
+ /** Editor view cameras, keyed by `editor:*` id. */
45
+ private _editorCameras;
46
+ /** Which editor views freeze rotation. */
47
+ private _lockedEditorIds;
48
+ /** Game camera to restore when the editor releases the main view. */
49
+ private _rememberedGameCamera;
50
+ /**
51
+ * True while an editor view is the main camera. Game calls to
52
+ * {@link setActiveCamera} update {@link _rememberedGameCamera} and leave
53
+ * the view on screen.
54
+ */
55
+ private _editorViewLocked;
56
+ /** Game cameras whose orbit input was suspended for an editor view. */
57
+ private _suspendedOrbits;
58
+ /** In-flight creation, so a second attach does not build a second set. */
59
+ private _editorCamerasPromise;
37
60
  /** Reference to the shared renderer manager */
38
61
  private _rendererManager;
39
62
  /** Scene reference */
40
63
  private _sceneRef;
41
64
  /** Counter for auto-generated camera names */
42
65
  private _autoNameCounter;
43
- constructor();
66
+ private _unregisterEditorHost;
44
67
  /**
45
68
  * Get the list of currently active cameras.
46
69
  */
@@ -49,14 +72,10 @@ declare class CameraManager {
49
72
  * Get the primary active camera (first in the active list).
50
73
  */
51
74
  get primaryCamera(): ZylemCamera | null;
52
- /**
53
- * Get the debug camera.
54
- */
55
- get debugCamera(): ZylemCamera | null;
56
- /**
57
- * Gameplay primary camera that was active before debug mode was enabled.
58
- */
59
- get preDebugPrimary(): ZylemCamera | null;
75
+ /** True while side, top, isometric, or free is the main view. */
76
+ isEditorViewActive(): boolean;
77
+ /** True after the four editor views have been created. */
78
+ hasEditorCameras(): boolean;
60
79
  /**
61
80
  * Get all registered cameras.
62
81
  */
@@ -73,13 +92,15 @@ declare class CameraManager {
73
92
  addCamera(camera: ZylemCamera, name?: string): string;
74
93
  /**
75
94
  * Remove a camera by name or reference.
76
- * Cannot remove the debug camera via this method.
77
95
  */
78
96
  removeCamera(nameOrRef: string | ZylemCamera): boolean;
79
97
  /**
80
98
  * Set a camera as the primary active camera (replaces all active cameras
81
99
  * except additional viewport cameras).
82
100
  *
101
+ * While an editor view owns the main view, a game camera is remembered
102
+ * and the rendered camera does not change.
103
+ *
83
104
  * @param nameOrRef Camera name or reference to activate
84
105
  */
85
106
  setActiveCamera(nameOrRef: string | ZylemCamera): boolean;
@@ -97,19 +118,27 @@ declare class CameraManager {
97
118
  getCamera(name: string): ZylemCamera | null;
98
119
  /**
99
120
  * Setup all cameras with the given scene and renderer manager.
100
- * Also creates the debug camera.
121
+ * Editor view cameras are created here only when an editor is already attached.
101
122
  */
102
123
  setup(scene: Scene, rendererManager: RendererManager): Promise<void>;
103
124
  /**
104
- * Switch the primary viewport to the debug orbit camera, remembering the
105
- * previous primary so gameplay cameras (e.g. first-person) can be restored.
125
+ * Create side, top, isometric, and free cameras seeded from the current
126
+ * game camera. Does not change which camera is rendering.
127
+ */
128
+ ensureEditorCameras(): Promise<void>;
129
+ /**
130
+ * Restore the game camera when an editor view is showing, then destroy
131
+ * the four editor cameras.
106
132
  */
107
- activateDebugCamera(): boolean;
133
+ destroyEditorCameras(): void;
108
134
  /**
109
- * Restore the gameplay primary camera that was active before
110
- * {@link activateDebugCamera}.
135
+ * Switch the main view.
136
+ *
137
+ * `game` releases to the remembered game camera. Editor view ids show
138
+ * that view. Any other id activates a game-registered camera and clears
139
+ * the editor override.
111
140
  */
112
- deactivateDebugCamera(): boolean;
141
+ activateCameraById(id: string): boolean;
113
142
  /**
114
143
  * Update all active cameras' controllers.
115
144
  */
@@ -129,16 +158,19 @@ declare class CameraManager {
129
158
  * Dispose all cameras and cleanup.
130
159
  */
131
160
  dispose(): void;
132
- /**
133
- * Create the always-available debug camera with orbit controls.
134
- * Registered for lookup/activation, but not added to the active list.
135
- */
136
- private createDebugCamera;
137
- /**
138
- * Seed the debug camera orbit pose on first activation, framing the origin
139
- * or offsetting from the saved gameplay primary.
140
- */
141
- private seedDebugCameraPose;
161
+ private createEditorCameras;
162
+ private showEditorCamera;
163
+ private showGameCamera;
164
+ /** Enable orbit on the active editor view only. Inactive views keep their pose. */
165
+ private syncEditorOrbit;
166
+ /** Stop game-camera orbit controls from sharing the canvas with an editor view. */
167
+ private suspendOtherOrbits;
168
+ private restoreOrbitFor;
169
+ private gameCameraToRestore;
170
+ private cameraIsRegistered;
171
+ private isEditorCamera;
172
+ /** Replace the primary camera and keep picture-in-picture viewports. */
173
+ private commitActive;
142
174
  /**
143
175
  * Resolve a camera from a name or reference.
144
176
  */
@@ -879,8 +911,9 @@ interface SwatchApplyOutcome {
879
911
  * hover/select/delete/spawn, the `DebugEntityCursor` highlight and the
880
912
  * `PlacementGhost` — is live whenever a tool is armed, so the toolbar's buttons
881
913
  * work on their own. The debug layer — the wasm simulation's collider
882
- * wireframes and the orbit camera — is the part `debugState.enabled` gates, and
883
- * is torn down when it goes off while the delegate stays alive to re-activate.
914
+ * wireframes — is the part `debugState.enabled` gates, and is torn down when
915
+ * it goes off while the delegate stays alive to re-activate. Debug mode does
916
+ * not switch cameras; picking and gizmos use whichever camera is rendering.
884
917
  *
885
918
  * Centralizes all of this so `ZylemStage` doesn't have to know about
886
919
  * raycasting, DOM input, or debug rendering.
@@ -911,7 +944,6 @@ declare class StageDebugDelegate {
911
944
  private debugCursor;
912
945
  private placementGhost;
913
946
  private debugLines;
914
- private cameraDebugDelegate;
915
947
  private debugStateUnsubscribe;
916
948
  private focusContextUnregister;
917
949
  private entityResolverUnregister;
@@ -933,7 +965,7 @@ declare class StageDebugDelegate {
933
965
  * point. Without one the tool warns instead of silently doing nothing.
934
966
  */
935
967
  setAddEntityFactory(factory: AddEntityFactory | null): void;
936
- /** Camera used for debug orbit / raycasts (active primary, usually `__debug__`). */
968
+ /** Camera used for raycasts and gizmos: whichever one is rendering. */
937
969
  private getDebugViewCamera;
938
970
  private resolveEntity;
939
971
  /**
@@ -945,7 +977,6 @@ declare class StageDebugDelegate {
945
977
  private forEachSelectableEntity;
946
978
  /** Copy all stage children into debugMap so raycast/select tools work after enabling debug mid-session. */
947
979
  private populateDebugMap;
948
- private ensureCameraDebugDelegate;
949
980
  /**
950
981
  * Activate/deactivate only when `debugState.enabled` actually flips.
951
982
  * Hover and selection write to `debugState` every frame, and `activate()`
@@ -956,9 +987,9 @@ declare class StageDebugDelegate {
956
987
  /** Hand the transform tool its mode whenever the active tool changes. */
957
988
  private syncToolMode;
958
989
  private syncGrid;
959
- /** Initialize DOM listeners and switch rendering to the debug orbit camera. */
990
+ /** Initialize DOM listeners. The rendering camera stays whatever the editor selected. */
960
991
  private activate;
961
- /** Tear down visuals and restore the gameplay primary camera. */
992
+ /** Tear down visuals without changing which camera is rendering. */
962
993
  private deactivate;
963
994
  private rebindPostProcessing;
964
995
  /**
@@ -1,11 +1,11 @@
1
- import { G as Game, D as DeviceProfile } from './game-D8KTP3fD.js';
1
+ import { G as Game, D as DeviceProfile } from './game-DBNxY6mb.js';
2
2
  import { v as DebugTools } from './debug-state-Cg3f5FB6.js';
3
3
  import './base-node-life-cycle-BK9xebT9.js';
4
4
  import 'three';
5
5
  import './stage-transition-CmGpV4tc.js';
6
6
  import './game-interfaces-vF5sRi1n.js';
7
7
  import './base-node-idopiSw5.js';
8
- import './stage-CAPlk_cN.js';
8
+ import './stage-bVLyYnOQ.js';
9
9
  import './entity-type-map-CrsrKT8c.js';
10
10
  import './entity-XqvuWgPm.js';
11
11
  import '@zylem/behaviors/core';
@@ -20,7 +20,7 @@ import './selection-bounds-BKmSo9aG.js';
20
20
  import './entity-BIf_a4dl.js';
21
21
  import '@zylem/behaviors/particle-emitter';
22
22
  import 'three/addons/lines/webgpu/Line2.js';
23
- import './zylem-camera-CYDtrVgi.js';
23
+ import './zylem-camera-CO713zFl.js';
24
24
  import '@zylem/bridge';
25
25
  import './default-controls-CAKJ5zlo.js';
26
26
 
@@ -504,6 +504,17 @@ declare class ZylemCamera {
504
504
  * Disable user-configured orbital controls.
505
505
  */
506
506
  disableOrbitalControls(): void;
507
+ /**
508
+ * Turn on orbit for an editor view camera.
509
+ *
510
+ * Locked views keep pan and zoom and freeze the seeded angle. The free
511
+ * view can rotate. Controls stay allocated after this so a later visit
512
+ * keeps the panned pose; use {@link setOrbitInteractionEnabled} to ignore
513
+ * pointer input while another camera is showing.
514
+ */
515
+ armEditorOrbit(lockRotation: boolean): void;
516
+ /** Ignore pointer input without disposing orbit controls or their pose. */
517
+ disarmEditorOrbit(): void;
507
518
  /**
508
519
  * Whether user orbital controls are enabled.
509
520
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zylem/game-lib",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "type": "module",
5
5
  "description": "A powerful and easy-to-use framework for creating simple 3D digital interactive applications using TypeScript.",
6
6
  "license": "MIT",
@@ -116,7 +116,7 @@
116
116
  "@sinclair/typebox": "^0.34.52",
117
117
  "@types/howler": "^2.2.13",
118
118
  "@zylem/behaviors": "^0.8.8",
119
- "@zylem/bridge": "^0.9.0",
119
+ "@zylem/bridge": "^0.9.4",
120
120
  "comlink": "^4.4.2",
121
121
  "howler": "^2.2.4",
122
122
  "idb-keyval": "^6.2.6",
@@ -1 +0,0 @@
1
- import{b as V,c as k,d as D}from"./chunk-BQRMYLYD.js";import{d as a,h as f,j as b,l as g,o as S,q as u,r as w,s as v,t as P,v as E,w as C,x}from"./chunk-GPCSX3M6.js";import{subscribe as T}from"valtio/vanilla";import{announceBridgeReady as R,getZylemBridge as d}from"@zylem/bridge";var c="custom",p=new Set;function B(t){if(t!==c){c=t;for(let e of p)e(c)}}function J(t){return p.add(t),t(c),()=>{p.delete(t)}}function h(t,e){return[t[0]*e.x,t[1]*e.y,t[2]*e.z]}function O(t,e){let i=new Float32Array(t.length);for(let n=0;n<t.length;n+=3)i[n]=t[n]*e.x,i[n+1]=t[n+1]*e.y,i[n+2]=t[n+2]*e.z;return i}function K(t,e){let{shape:i}=t,n=t.offset?h(t.offset,e):t.offset,o;switch(i.type){case"box":o={type:"box",halfExtents:h(i.halfExtents,e)};break;case"sphere":o={type:"sphere",radius:i.radius*Math.max(e.x,e.y,e.z)};break;case"capsule":case"cylinder":case"cone":o={type:i.type,halfHeight:i.halfHeight*e.y,radius:i.radius*Math.max(e.x,e.z)};break;case"convexHull":o={type:"convexHull",vertices:O(i.vertices,e)};break;case"trimesh":o={type:"trimesh",vertices:O(i.vertices,e),indices:i.indices};break;case"heightfield":o={...i,scale:h(i.scale,e)};break;default:o=i;break}return{...t,shape:o,offset:n}}function G(t){if(!t.colliderBaseline){let e=t.colliderDescs.length?t.colliderDescs:t.colliderDesc?[t.colliderDesc]:[];t.colliderBaseline=e.map(i=>({...i}))}return t.colliderBaseline}function I(t){if(!t.colliderScaleDirty)return!1;t.colliderScaleDirty=!1;let e=G(t);if(!e.length)return!1;let i=t.getScale(),n=e.map(r=>K(r,i));t.colliderDescs=n,t.colliderDesc=n[0];let o=t.physicsWorldRef;if(!o)return!0;let s=t.getPose();return o.destroyEntity(t),s&&t.bodyDesc&&(t.bodyDesc.position=[s.position.x,s.position.y,s.position.z],t.bodyDesc.rotation=[s.rotation.x,s.rotation.y,s.rotation.z,s.rotation.w]),o.addEntity(t),!0}function U(t){return(t?.group??t?.mesh)?.scale}function N(t){let i=(typeof t?.getScale=="function"?t.getScale():void 0)??t?.scale??U(t)??{};return{x:i.x??1,y:i.y??1,z:i.z??1}}function ae(t){let e=typeof t?.getPose=="function"?t.getPose():null;if(!e?.rotation)return;let{x:i,y:n,z:o,w:s}=e.rotation;return{x:i,y:n,z:o,w:s}}function y(t){let e=typeof t?.getPose=="function"?t.getPose():null,i=e?.position??{x:0,y:0,z:0},n=e?.rotation??{x:0,y:0,z:0,w:1};return{position:{x:i.x,y:i.y,z:i.z},rotation:D(n),quaternion:{x:n.x,y:n.y,z:n.z,w:n.w},scale:N(t)}}function $(t,e){if(typeof t?.setScale=="function"){t.setScale(e.x,e.y,e.z);return}U(t)?.set?.(e.x,e.y,e.z)}function H(t){!t||typeof t.getScale!="function"||I(t)}function L(t,e){if(!t)return!1;let i=e.quaternion??(e.rotation?k(e.rotation):void 0),n=!1;return(e.position||i)&&typeof t.setPose=="function"&&(n=t.setPose({position:e.position,rotation:i})),e.scale&&($(t,e.scale),n=!0),n}function M(t){let e=t?.constructor?.type;return e?String(e).replace("Symbol(","").replace(")",""):"Unknown"}function Q(t){let e=t;if(!e?.uuid)return;let i=d().channel;if(!i.hasSubscribers("entity:upsert"))return;let n=y(t);i.queue("entity:upsert",[{uuid:e.uuid,name:e.name||"Unnamed",type:M(t),position:n.position,rotation:n.rotation,scale:n.scale,quaternion:n.quaternion}])}function re(t,e){d().channel.send("game:notice",{level:t,message:e})}function W(t,e,i){let n=[...new Set(t.swatches.map(r=>r.source))],o=[...new Set(e.map(r=>r.uuid))],s=o.length===1?i(o[0])||"entity":`${o.length} entities`;return`Apply ${n.join(", ")} to ${s}`}function j(t,e){return!e||t.length!==e.length?!1:t.every((i,n)=>i===e[n])}function F(t,e){switch(e){case"add":w(t);break;case"subtract":v(t);break;case"toggle":for(let i of t)P(i);break;default:u(t);break}}function Z(t,e){return t.on.bind(t)("camera:view:set",({preset:n})=>e(n))}var z=class{channel;unsubscribes=[];host=null;editorKnown={};applyingSceneOperation=!1;constructor(){this.channel=d().channel}connect(e,i){this.disconnect(),this.host=e,this.unsubscribes.push(this.channel.on("debug:set",({enabled:n})=>{this.editorKnown.debug=n,a.enabled=n}),this.channel.on("tool:set",({tool:n})=>{b(n)}),this.channel.on("playback:set",({paused:n})=>{this.editorKnown.paused=n,f(n)}),this.channel.on("entity:select",({uuid:n,uuids:o,mode:s})=>{o?F(o,s??"replace"):S(n),this.editorKnown.selectedUuid=a.selectedEntityId,this.editorKnown.selectedUuids=[...a.selectedEntityIds]}),this.channel.on("entity:focus",({uuid:n})=>{V(n)}),this.channel.on("entity:transform",({uuid:n,position:o,rotation:s,quaternion:r,scale:m})=>{let l=this.host?.resolveEntity(n);if(!l)return;let q=y(l);if(L(l,{position:o,rotation:s,quaternion:r,scale:m}),m&&H(l),Q(l),this.applyingSceneOperation)return;let A=y(l);this.channel.send("scene:operation",{opId:`tx-${n}-${Date.now().toString(36)}`,kind:"transform",label:`Set ${l.name||"entity"} transform`,entries:[{uuid:n,before:q,after:A}]})}),this.channel.on("entity:create",({typeId:n,props:o,pose:s})=>{this.host?.createEntity?.(n,o,s)}),this.channel.on("scene:operation:apply",({op:n,direction:o})=>{this.applyingSceneOperation=!0;try{this.host?.applySceneOperation?.(n,o)}finally{this.applyingSceneOperation=!1}}),this.channel.on("add:type:set",({typeId:n,props:o})=>{x(n,o??null)}),this.channel.on("snap:set",n=>{E(n)}),this.channel.on("grid:set",({visible:n})=>{C(n)}),this.channel.on("stage:variable:set",({key:n,value:o})=>{this.host?.setStageVariable?.(n,o)}),this.channel.on("pick:mode:set",({enabled:n})=>{g(n)}),this.channel.on("entity:pick",({requestId:n,ndc:o})=>{let s=this.host?.pickEntity?.(o)??null;this.channel.send("entity:pick:result",{requestId:n,hit:s})}),this.channel.on("entity:apply-swatch",n=>{this.handleApplySwatch(n)}),this.channel.on("cutscene:load",n=>this.host?.cutscene?.load(n)),this.channel.on("cutscene:play",({from:n})=>this.host?.cutscene?.play(n)),this.channel.on("cutscene:pause",()=>this.host?.cutscene?.pause()),this.channel.on("cutscene:stop",()=>this.host?.cutscene?.stop()),this.channel.on("cutscene:seek",({time:n})=>this.host?.cutscene?.seek(n)),this.channel.on("cutscene:unload",()=>this.host?.cutscene?.unload()),this.channel.on("camera:pose:get",({requestId:n})=>{let o=this.host?.cameraPose?.();o&&this.channel.send("camera:pose",{requestId:n,...o})}),Z(this.channel,B),T(a,()=>this.publishDebugStateChanges())),this.publishDebugStateChanges(),R(i)}publishCutsceneStatus(e){this.channel.queue("cutscene:status",e)}publishCutsceneView(e){this.channel.queue("cutscene:view",e)}disconnect(){for(let e of this.unsubscribes)e();this.unsubscribes=[],this.host=null,this.editorKnown={}}handleApplySwatch(e){let i=e.opId??`swatch-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=this.host?.applySwatches?this.host.applySwatches({...e,opId:i}):{results:e.uuids.flatMap(s=>e.swatches.map(r=>({uuid:s,kind:r.kind,source:r.source,ok:!1,reason:"entity-not-found"}))),entries:[]},o=[...new Set(n.entries.map(s=>s.uuid))];e.select&&o.length>0&&u(o),n.entries.length>0&&!this.applyingSceneOperation&&this.channel.send("scene:operation",{opId:i,kind:"swatch",label:W(e,n.entries,s=>this.host?.resolveEntity(s)?.name),entries:n.entries}),this.channel.send("entity:swatch-applied",{opId:i,results:n.results})}publishDebugStateChanges(){let e={};a.paused!==this.editorKnown.paused&&(this.editorKnown.paused=a.paused,e.paused=a.paused),a.enabled!==this.editorKnown.debug&&(this.editorKnown.debug=a.enabled,e.debug=a.enabled),(e.paused!==void 0||e.debug!==void 0)&&this.publishStatus(e),(a.selectedEntityId!==this.editorKnown.selectedUuid||a.hoveredEntityId!==this.editorKnown.hoveredUuid||!j(a.selectedEntityIds,this.editorKnown.selectedUuids))&&(this.editorKnown.selectedUuid=a.selectedEntityId,this.editorKnown.selectedUuids=[...a.selectedEntityIds],this.editorKnown.hoveredUuid=a.hoveredEntityId,this.channel.queue("entity:selection",{selectedUuid:a.selectedEntityId,hoveredUuid:a.hoveredEntityId,selectedUuids:[...a.selectedEntityIds]}))}wantsEntityUpdates(){return this.channel.hasSubscribers("entity:upsert")||this.channel.hasSubscribers("stage:snapshot")}wantsThumbnails(){return this.channel.hasSubscribers("entity:thumbnail")}onEditorAttached(e){return this.channel.onSubscriberAdded(i=>{if(i!=="entity:upsert"&&i!=="entity:thumbnail")return;let n=i==="entity:upsert"?"entity:thumbnail":"entity:upsert";this.channel.subscriberCount(n)>0||e()})}publishConfig(e){this.channel.send("game:config",e)}publishLoading(e){this.channel.send("game:loading",e)}publishStatus(e){this.channel.queue("game:status",e)}publishVariable(e){this.channel.send("game:variable",e)}publishNotice(e,i){this.channel.send("game:notice",{level:e,message:i})}publishStageSnapshot(e){this.channel.send("stage:snapshot",e)}queueEntityUpsert(e){e.length&&this.channel.queue("entity:upsert",e)}queueEntityRemoved(e){e.length&&this.channel.queue("entity:removed",{uuids:e})}queueThumbnails(e){e.length&&this.channel.queue("entity:thumbnail",e)}publishCatalog(e){this.channel.send("catalog:snapshot",{entities:e})}publishSceneOperation(e){this.channel.send("scene:operation",e)}wantsSceneOperations(){return this.channel.hasSubscribers("scene:operation")}};function le(t){d().channel.send("scene:operation",t)}export{J as a,I as b,N as c,ae as d,y as e,M as f,re as g,z as h,le as i};