@zylem/game-lib 0.9.9 → 0.9.11

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 (60) hide show
  1. package/README.md +4 -0
  2. package/dist/actions.d.ts +2 -2
  3. package/dist/api/game-lib.api.json +1150 -187
  4. package/dist/api/game-lib.api.md +65 -9
  5. package/dist/api/game-lib.d.ts +100 -11
  6. package/dist/api/game-lib.typedoc.json +63710 -72679
  7. package/dist/bake-IARN2D5W.js +1 -0
  8. package/dist/bridge.d.ts +3 -1
  9. package/dist/bridge.js +1 -1
  10. package/dist/catalog.js +1 -1
  11. package/dist/chunk-2I76JHSN.js +1 -0
  12. package/dist/{chunk-CI7A5N6G.js → chunk-3XIJCDII.js} +1 -1
  13. package/dist/{chunk-BJYXY2FB.js → chunk-DLIQ7RKB.js} +1 -1
  14. package/dist/{chunk-YW2GTHCV.js → chunk-HOLQZSW3.js} +1 -1
  15. package/dist/{chunk-3LXDHDJB.js → chunk-KGAXGWKQ.js} +1 -1
  16. package/dist/chunk-LUFSPEPZ.js +1 -0
  17. package/dist/{chunk-5NQGXW75.js → chunk-M47F6LKE.js} +1 -1
  18. package/dist/chunk-NA5SAMP2.js +1 -0
  19. package/dist/{chunk-YFXNZ2RS.js → chunk-O5N7VFYK.js} +1 -1
  20. package/dist/chunk-RPLJRBU3.js +1 -0
  21. package/dist/{chunk-JUA5KNND.js → chunk-RRYBT6NL.js} +2 -2
  22. package/dist/chunk-TLUGF3AS.js +1 -0
  23. package/dist/{chunk-273CUPEO.js → chunk-TRKPYAVB.js} +1 -1
  24. package/dist/{chunk-UNCP6V7I.js → chunk-VLGJAGMX.js} +1 -1
  25. package/dist/chunk-W6XV7CCC.js +1 -0
  26. package/dist/{chunk-JCGW5PIR.js → chunk-WM3NVEDX.js} +1 -1
  27. package/dist/{chunk-YWH5HQDT.js → chunk-X4TZ645S.js} +1 -1
  28. package/dist/{chunk-ICJ2E2OV.js → chunk-Y2NS4OJH.js} +1 -1
  29. package/dist/chunk-YETBTF6G.js +1 -0
  30. package/dist/cinematics.d.ts +5 -4
  31. package/dist/core.d.ts +8 -7
  32. package/dist/core.js +1 -1
  33. package/dist/{debug-state-JRneI6c2.d.ts → debug-state-CKrWEXUz.d.ts} +7 -1
  34. package/dist/debug.d.ts +2 -2
  35. package/dist/debug.js +1 -1
  36. package/dist/{entity-CY75JJSw.d.ts → entity-B8VygThO.d.ts} +7 -0
  37. package/dist/{entity-type-map-BMaPY8cd.d.ts → entity-type-map-CnxOtV01.d.ts} +1 -1
  38. package/dist/entity.d.ts +4 -4
  39. package/dist/entity.js +1 -1
  40. package/dist/{game-uQd7k6-m.d.ts → game-BqKsvmSH.d.ts} +2 -2
  41. package/dist/game-default-ENWXZSPB.js +1 -0
  42. package/dist/graphics.js +1 -1
  43. package/dist/nav-mesh-P7OR5WYX.js +1 -0
  44. package/dist/navigation-session-2rs6rHOw.d.ts +54 -0
  45. package/dist/navigation-worker.js +2 -0
  46. package/dist/navigation.d.ts +27 -0
  47. package/dist/navigation.js +1 -0
  48. package/dist/{placement-session-BNQoL7Jb.d.ts → placement-session-DfvCaGxX.d.ts} +1 -1
  49. package/dist/placement.d.ts +3 -3
  50. package/dist/placement.js +1 -1
  51. package/dist/public.d.ts +9 -6
  52. package/dist/public.js +1 -1
  53. package/dist/{stage-Dez16Gxm.d.ts → stage-DT8QQbGk.d.ts} +11 -14
  54. package/dist/web-components.d.ts +8 -7
  55. package/dist/web-components.js +1 -1
  56. package/package.json +12 -4
  57. package/dist/chunk-26EJFYDX.js +0 -1
  58. package/dist/chunk-UM5VNQPY.js +0 -1
  59. package/dist/chunk-VUTKEMIE.js +0 -1
  60. package/dist/game-default-FRKFJOJX.js +0 -1
@@ -0,0 +1,27 @@
1
+ import { LevelNavigation, BridgeVec3, NavigationPath } from '@zylem/bridge';
2
+ export { DEFAULT_NAVIGATION_SETTINGS, LevelNavigation, NavigationAsset, NavigationLink, NavigationObstacle, NavigationPath, NavigationSettings, createLevelNavigation, navigationSourceHash } from '@zylem/bridge';
3
+ import { NavMeshHelper } from '@recast-navigation/three';
4
+ export { N as NavigationSession, a as NavigationSessionHost } from './navigation-session-2rs6rHOw.js';
5
+ import 'three';
6
+
7
+ interface NavigationBakeInput {
8
+ positions: Float32Array;
9
+ indices: Uint32Array;
10
+ navigation: LevelNavigation;
11
+ }
12
+ /** Pure geometry input, suitable for a worker. Returned bytes own their memory. */
13
+ declare function bakeNavigationData(input: NavigationBakeInput): Promise<Uint8Array>;
14
+
15
+ /** Owns Detour resources. A path supplies waypoints; movement and link traversal belong to gameplay. */
16
+ declare class NavigationMesh {
17
+ private mesh;
18
+ private query;
19
+ private disposed;
20
+ private constructor();
21
+ static load(bytes: Uint8Array): Promise<NavigationMesh>;
22
+ createHelper(): NavMeshHelper;
23
+ findPath(start: BridgeVec3, end: BridgeVec3, halfExtents?: BridgeVec3): NavigationPath;
24
+ dispose(): void;
25
+ }
26
+
27
+ export { type NavigationBakeInput, NavigationMesh, bakeNavigationData };
@@ -0,0 +1 @@
1
+ import{a as d,b as e,c as f}from"./chunk-RPLJRBU3.js";import{b as a}from"./chunk-TLUGF3AS.js";import{a as b}from"./chunk-2I76JHSN.js";import{c}from"./chunk-YETBTF6G.js";import"./chunk-LUFSPEPZ.js";import"./chunk-WOT6VMZA.js";export{e as DEFAULT_NAVIGATION_SETTINGS,a as NavigationMesh,c as NavigationSession,b as bakeNavigationData,d as createLevelNavigation,f as navigationSourceHash};
@@ -1,4 +1,4 @@
1
- import { G as GameEntity, a as PlacementPointContext } from './entity-CY75JJSw.js';
1
+ import { G as GameEntity, a as PlacementPointContext } from './entity-B8VygThO.js';
2
2
  import { e as Vec3Input, d as Vec3Components } from './vector-D3eDzvcA.js';
3
3
 
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import { B as BaseNode } from './base-node-idopiSw5.js';
2
- import { d as GameEntityOptions, H as HoverAreaOptions, G as GameEntity, P as PointerAreaContext, D as DroppableAreaOptions, a as PlacementPointContext } from './entity-CY75JJSw.js';
3
- export { b as PointerTargetEntity } from './entity-CY75JJSw.js';
4
- export { A as ArmPlacementOptions, E as EntityRepresentative, a as EntityRepresentativeOptions, P as PlacementSession, R as RepresentativeFrame, b as RepresentativeLook, c as RepresentativeSource, e as entityRepresentative } from './placement-session-BNQoL7Jb.js';
2
+ import { d as GameEntityOptions, H as HoverAreaOptions, G as GameEntity, P as PointerAreaContext, D as DroppableAreaOptions, a as PlacementPointContext } from './entity-B8VygThO.js';
3
+ export { b as PointerTargetEntity } from './entity-B8VygThO.js';
4
+ export { A as ArmPlacementOptions, E as EntityRepresentative, a as EntityRepresentativeOptions, P as PlacementSession, R as RepresentativeFrame, b as RepresentativeLook, c as RepresentativeSource, e as entityRepresentative } from './placement-session-DfvCaGxX.js';
5
5
  import './base-node-life-cycle-BK9xebT9.js';
6
6
  import 'three';
7
7
  import './stage-transition-CmGpV4tc.js';
package/dist/placement.js CHANGED
@@ -1 +1 @@
1
- import{a as b,b as c,c as d,d as e,e as f,f as g}from"./chunk-YFXNZ2RS.js";import{c as a}from"./chunk-Y5IU6IA5.js";import"./chunk-CI7A5N6G.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";import"./chunk-WOT6VMZA.js";export{c as DROPPABLE_AREA_TYPE,b as HOVER_AREA_TYPE,e as ZylemDroppableArea,d as ZylemHoverArea,g as createDroppableArea,f as createHoverArea,a as entityRepresentative};
1
+ import{a as b,b as c,c as d,d as e,e as f,f as g}from"./chunk-O5N7VFYK.js";import{c as a}from"./chunk-Y5IU6IA5.js";import"./chunk-3XIJCDII.js";import"./chunk-EVYHPR3J.js";import"./chunk-XRP4JJXL.js";import"./chunk-HOLQZSW3.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import"./chunk-7WRQ2UAN.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-WOT6VMZA.js";export{c as DROPPABLE_AREA_TYPE,b as HOVER_AREA_TYPE,e as ZylemDroppableArea,d as ZylemHoverArea,g as createDroppableArea,f as createHoverArea,a as entityRepresentative};
package/dist/public.d.ts CHANGED
@@ -1,17 +1,17 @@
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-uQd7k6-m.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-BqKsvmSH.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-Dez16Gxm.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-DT8QQbGk.js';
4
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, getActiveLevelDocument, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, streamLevel, streamLevelOnStage, usesManagedRenderPath, vessel } from './core.js';
5
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, LevelDocument, StageConfigPayload, StageSnapshotPayload, SwatchApplyFailureReason, SwatchApplyResult, SwatchKind, SwatchSpec, ZylemBridge, announceBridgeReady, applySwatchesToSelection, getZylemBridge } from '@zylem/bridge';
6
- export { A as ArmPlacementOptions, E as EntityRepresentative, a as EntityRepresentativeOptions, P as PlacementSession, R as RepresentativeFrame, b as RepresentativeLook, c as RepresentativeSource, e as entityRepresentative } from './placement-session-BNQoL7Jb.js';
6
+ export { A as ArmPlacementOptions, E as EntityRepresentative, a as EntityRepresentativeOptions, P as PlacementSession, R as RepresentativeFrame, b as RepresentativeLook, c as RepresentativeSource, e as entityRepresentative } from './placement-session-DfvCaGxX.js';
7
7
  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';
8
8
  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';
9
9
  export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
10
10
  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-BA3VPFlS.js';
11
11
  export { S as StageEntity } from './entity-BIf_a4dl.js';
12
12
  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';
13
- export { A as ACTOR_TYPE, a1 as AmbientLightOptions, B as BOX_TYPE, F as CONE_TYPE, L as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a3 as DirectionalLightOptions, am as EntityForType, al as EntityTypeMap, a9 as FOG_TYPE, a2 as HemisphereLightOptions, $ as LIGHT_TYPE, ac as LINE_TYPE, a6 as LightShadowOptions, af as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, W as PARTICLE_SYSTEM_TYPE, Q as PILL_TYPE, P as PLANE_TYPE, I as PYRAMID_TYPE, a4 as PointLightOptions, R as RECT_TYPE, w as RectShape, S as SPHERE_TYPE, f as SPRITE_TYPE, ak as ScreenAnchor, a5 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, E as ZylemCone, K as ZylemCylinder, y as ZylemDisk, a8 as ZylemFog, ai as ZylemFogHeightOptions, aj as ZylemFogNoiseOptions, ag as ZylemFogOptions, ah as ZylemFogType, _ as ZylemLight, a0 as ZylemLightOptions, ab as ZylemLine, ae as ZylemLineOptions, V as ZylemParticleSystem, X as ZylemParticleSystemOptions, N as ZylemPill, k as ZylemPlane, H as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, z as createCone, J as createCylinder, x as createDisk, a7 as createFog, Y as createLight, aa as createLine, U as createParticleSystem, M as createPill, j as createPlane, G as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ad as pickZylemLine } from './entity-type-map-BMaPY8cd.js';
14
- export { A as Action, C as CollisionComponent, D as DroppableAreaOptions, G as GameEntity, d as GameEntityOptions, H as HoverAreaOptions, a as PlacementPointContext, P as PointerAreaContext, b as PointerTargetEntity, e as boxCollision, f as coneCollision, c as create, g as cylinderCollision, B as getRotation, h as pillCollision, i as planeCollision, p as pyramidCollision, k as rotateEuler, r as rotateInDirection, l as rotateX, m as rotateY, j as rotateYEuler, n as rotateZ, y as setRotation, u as setRotationDegrees, w as setRotationDegreesX, v as setRotationDegreesY, x as setRotationDegreesZ, q as setRotationX, o as setRotationY, t as setRotationZ, s as sphereCollision, z as zoneCollision } from './entity-CY75JJSw.js';
13
+ export { A as ACTOR_TYPE, a1 as AmbientLightOptions, B as BOX_TYPE, F as CONE_TYPE, L as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a3 as DirectionalLightOptions, am as EntityForType, al as EntityTypeMap, a9 as FOG_TYPE, a2 as HemisphereLightOptions, $ as LIGHT_TYPE, ac as LINE_TYPE, a6 as LightShadowOptions, af as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, W as PARTICLE_SYSTEM_TYPE, Q as PILL_TYPE, P as PLANE_TYPE, I as PYRAMID_TYPE, a4 as PointLightOptions, R as RECT_TYPE, w as RectShape, S as SPHERE_TYPE, f as SPRITE_TYPE, ak as ScreenAnchor, a5 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, E as ZylemCone, K as ZylemCylinder, y as ZylemDisk, a8 as ZylemFog, ai as ZylemFogHeightOptions, aj as ZylemFogNoiseOptions, ag as ZylemFogOptions, ah as ZylemFogType, _ as ZylemLight, a0 as ZylemLightOptions, ab as ZylemLine, ae as ZylemLineOptions, V as ZylemParticleSystem, X as ZylemParticleSystemOptions, N as ZylemPill, k as ZylemPlane, H as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, z as createCone, J as createCylinder, x as createDisk, a7 as createFog, Y as createLight, aa as createLine, U as createParticleSystem, M as createPill, j as createPlane, G as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ad as pickZylemLine } from './entity-type-map-CnxOtV01.js';
14
+ export { A as Action, C as CollisionComponent, D as DroppableAreaOptions, G as GameEntity, d as GameEntityOptions, H as HoverAreaOptions, a as PlacementPointContext, P as PointerAreaContext, b as PointerTargetEntity, e as boxCollision, f as coneCollision, c as create, g as cylinderCollision, B as getRotation, h as pillCollision, i as planeCollision, p as pyramidCollision, k as rotateEuler, r as rotateInDirection, l as rotateX, m as rotateY, j as rotateYEuler, n as rotateZ, y as setRotation, u as setRotationDegrees, w as setRotationDegreesX, v as setRotationDegreesY, x as setRotationDegreesZ, q as setRotationX, o as setRotationY, t as setRotationZ, s as sphereCollision, z as zoneCollision } from './entity-B8VygThO.js';
15
15
  export { IconSize, IconSizePreset, TemplateFactory, boxMesh, coneMesh, createCooldownIcon, createEntity, createEntityFactory, cylinderMesh, destroy, pillMesh, pyramidMesh, sphereMesh } from './entity.js';
16
16
  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';
17
17
  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';
@@ -27,7 +27,9 @@ export { Howl } from 'howler';
27
27
  export { o as AudioClip, A as AudioClipSchema, k as EffectType, E as Envelope, h as InstrumentDefinition, I as InstrumentDefinitionSchema, i as InstrumentEffect, a as InstrumentEffectSchema, j as InstrumentPreset, b as InstrumentPresetSchema, n as NoteClip, N as NoteClipSchema, O as OscillatorType, m as SongClip, d as SongClipSchema, g as SongDefinition, S as SongDefinitionSchema, r as SongLoop, f as SongLoopSchema, p as SongNote, e as SongNoteSchema, l as SongTrack, c as SongTrackSchema, q as TimeSignature, T as TimeSignatureSchema } from './song-definition-rEKksP0B.js';
28
28
  export { w as AudioItem, A as AudioItemSchema, q as AudioTrack, l as CameraKeyframe, c as CameraKeyframeSchema, m as CameraPoseDef, n as CameraShot, d as CameraShotSchema, o as CameraTrack, i as CutsceneCamera, j as CutsceneCameraKind, b as CutsceneCameraSchema, g as CutsceneDefinition, C as CutsceneDefinitionSchema, k as CutsceneEasing, u as CutsceneEvent, e as CutsceneEventSchema, h as CutsceneScene, a as CutsceneSceneSchema, r as CutsceneTrack, f as CutsceneTrackSchema, s as DollyPath, D as DollyPathSchema, v as EventItem, E as EventItemSchema, p as EventTrack, x as SceneTransition, S as SceneTransitionSchema, y as SceneTransitionType, t as ShotBlend, V as Vec3Def } from './cutscene-definition-C479fkei.js';
29
29
  export { CUTSCENE_BEHAVIOR_KEY, CutsceneCameraBehavior, CutsceneFrame, CutsceneHost, CutscenePlayer, CutscenePlayerEvents, CutscenePlayerOptions, CutscenePlayerState, CutscenePreviewController, CutsceneStageLike, EvaluatedPose, StageCutsceneHostOptions, TargetLookup, activeShot, cameraTracks, createCutscenePlayer, createStageCutsceneHost, cutsceneLength, dollyPointAt, easeValue, evaluateCameraPose, evaluateCutscene, itemsBetween, lerpPose, lerpVec3, previousShot, sampleDollyPath, sceneAt, setCutsceneTransitionShaders, shotAt } from './cinematics.js';
30
- export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-JRneI6c2.js';
30
+ export { NavigationMesh, bakeNavigationData } from './navigation.js';
31
+ export { N as NavigationSession } from './navigation-session-2rs6rHOw.js';
32
+ export { D as DEFAULT_SNAP_SETTINGS, w as DebugEntityResolver, v as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, x as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, t as isPickMode, u as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, q as setPickMode, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-CKrWEXUz.js';
31
33
  export { G as GizmoAxis, a as GizmoDelta, b as GizmoMode, d as GizmoRay, T as TransformGizmo, c as closestAxisValue, i as intersectPlane } from './transform-gizmo-DappLQ9w.js';
32
34
  export { ConstructionGrid, EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, Quat, degreesToRadians, entityThumbnailCache, eulerToQuaternion, focusEntity, quaternionToEuler, radiansToDegrees, registerEntityFocusContext, snapScale, snapToIncrement, snapVec3 } from './debug.js';
33
35
  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';
@@ -49,3 +51,4 @@ import '@zylem/behaviors/particle-emitter';
49
51
  import 'three/addons/lines/webgpu/Line2.js';
50
52
  import 'mitt';
51
53
  import 'tone';
54
+ import '@recast-navigation/three';
package/dist/public.js CHANGED
@@ -1 +1 @@
1
- import{a as $m,b as en,c as rn,d as tn}from"./chunk-FZNEWOC5.js";import{a as on}from"./chunk-JCGW5PIR.js";import{a as an,b as pn,c as mn,d as nn,e as fn,f as xn,g as ln,h as sn,i as cn,j as dn,k as yn,l as vn,m as En,n as Sn,o as An,p as hn}from"./chunk-47DG7I7M.js";import{A as In,B as Jn,C as Kn,a as Rn,b as Pn,c as Ln,d as On,e as bn,f as Tn,g as Zn,h as Dn,i as gn,j as un,k as wn,l as Gn,m as Hn,n as _n,o as Fn,p as jn,q as kn,r as Bn,s as Cn,t as Mn,u as Vn,v as Wn,w as Yn,x as zn,y as Nn,z as qn}from"./chunk-KSEP7AUF.js";import{A as Nm,B as qm,C as Im,D as Jm,E as Km,a as Am,b as hm,c as Rm,d as Pm,e as Lm,f as Om,g as bm,h as Tm,i as Zm,j as Dm,k as gm,l as um,m as wm,n as Gm,o as Hm,p as _m,q as Fm,r as jm,s as km,t as Bm,u as Cm,v as Mm,w as Vm,x as Wm,y as Ym,z as zm}from"./chunk-IPWUDOV5.js";import{a as Qm,b as Um,c as Xm}from"./chunk-7QF6YTEZ.js";import"./chunk-ORIDWL3T.js";import{a as y,b as v,c as E,d as S,e as A,f as h}from"./chunk-YFXNZ2RS.js";import{a as R,b as P,c as L,d as O,e as b,f as T,g as Z,h as D,i as g,j as u,k as w,l as G,m as H,n as _,o as F,p as j,q as k,r as B,s as C,t as M,u as V,v as W,w as Y}from"./chunk-4DAITCJS.js";import"./chunk-BIGH6D34.js";import"./chunk-ELQN62PQ.js";import{a as Vi,b as Wi,c as em,d as rm,e as tm,f as om}from"./chunk-ZZO4CKRU.js";import{a as pp,c as ip,d as mp,e as np,f as fp,g as xp}from"./chunk-2PFNNGTV.js";import{a as Yi,b as zi,c as Ni,d as qi,e as Ii,f as Ji,g as Ki,h as Qi,i as Ui,j as Xi,k as $i}from"./chunk-NVVLLWIM.js";import"./chunk-VMXSE3EC.js";import{a as am,b as pm,c as im,d as mm,e as nm,f as fm,g as xm,h as lm,i as sm,j as cm,k as dm}from"./chunk-YNX3Q3CL.js";import{a as ym,b as vm,c as Em,d as Sm}from"./chunk-WQ3WMMZD.js";import{a as Fe,b as je,c as ke,d as Be,e as qe,f as Qp,g as Up,h as fi,i as xi,j as li,k as si,l as ci,m as di,n as yi,o as vi,p as Ei,q as Si,r as Ai}from"./chunk-JUA5KNND.js";import{a as _e,c as Za,d as Da,e as ga,f as Rp,g as Pp,h as wp,i as Hp,j as _p,l as Fp,m as jp,n as kp,o as Bp,p as Cp,q as Mp,r as Vp,s as Wp,t as Yp,u as zp,v as Np,w as qp,x as Jp,z as Kp}from"./chunk-VUTKEMIE.js";import{e as Ue,n as pr}from"./chunk-26EJFYDX.js";import{b as Ep}from"./chunk-WBQ5TNRZ.js";import{a as Ip}from"./chunk-BH53MBAZ.js";import{a as Ce,b as Me,c as Ve,d as We,e as Ye,f as ze,g as Ne}from"./chunk-PCFF4LLO.js";import{a as Pe,b as Le,c as Oe,d as be,e as Te,f as Ze,g as De,h as ge,i as ue,j as we,k as Ge,l as He}from"./chunk-UG22Z42P.js";import{c as d}from"./chunk-Y5IU6IA5.js";import{a as he,b as Re}from"./chunk-B6GDESCB.js";import{c as Dp,d as gp,e as up,f as Gp}from"./chunk-SIRFF4DY.js";import{a as Ke,b as Qe,c as Xe,d as $e,e as er,f as rr,g as tr,h as or,i as ar}from"./chunk-273CUPEO.js";import{B as Ee,C as Se,D as Ae,a as U,b as X,c as $,d as ee,e as re,f as te,h as oe,j as ae,l as pe,m as ie,n as me,o as ne,p as fe,q as xe,u as le,v as se,w as ce,x as de,y as ye,z as ve}from"./chunk-UM5VNQPY.js";import"./chunk-ICJ2E2OV.js";import"./chunk-2HSR5XDQ.js";import{a as ua,b as wa,c as Ga,d as Ha,e as _a,f as Fa,g as ja,h as ka,i as Ba,j as Ca,k as Ma,l as Va,m as Wa,n as Ya,o as za,p as Na,q as qa,r as lp,s as sp,t as cp}from"./chunk-2XMG3NJS.js";import{a as Ta}from"./chunk-7GYFZKK7.js";import{a as Ia,b as Ja,c as Ka,d as Qa,e as Ua,f as Xa,g as $a,h as ep,i as rp,j as tp,k as op,l as ap}from"./chunk-QGIYILYI.js";import{h as Lp,i as Op,j as bp,k as Tp,l as Zp}from"./chunk-D2PATZCC.js";import{a as hi,b as Ri,c as Pi,d as Li,e as Oi}from"./chunk-5NQGXW75.js";import{a as Xp,b as $p,c as ei,d as ri,e as ti,f as oi,g as ai,h as pi,i as ii,j as mi,l as ni}from"./chunk-3LXDHDJB.js";import{a as dp,b as yp,c as vp,d as Sp,e as Ap,f as hp}from"./chunk-BJYXY2FB.js";import{A as lt,B as st,C as ct,D as dt,E as yt,J as Tt,K as Zt,L as Dt,M as gt,N as ut,O as wt,b as Cr,c as Mr,d as Vr,e as Wr,f as Yr,g as zr,h as Nr,i as qr,j as Ir,k as Jr,l as Kr,m as Qr,n as Ur,o as Xr,p as $r,q as et,r as rt,s as tt,t as ot,u as at,v as pt,w as it,x as mt,y as nt,z as xt}from"./chunk-YWH5HQDT.js";import{d as ft,e as Lt,f as Ot,g as bt}from"./chunk-UNCP6V7I.js";import{E as Br,c as ur,d as wr,e as Gr,f as Hr,g as _r,h as Fr,i as jr,j as kr}from"./chunk-CI7A5N6G.js";import{b as gr}from"./chunk-EVYHPR3J.js";import{a as dr,b as yr,c as vr,d as Er,e as Sr,f as Ar,g as hr,h as Rr,i as Pr,j as Lr,k as Or,l as br,m as Tr,n as Zr,o as Dr}from"./chunk-XRP4JJXL.js";import{c as e,d as r,g as t,h as o,i as a,j as p,l as i,m,n,o as f,p as x,q as l,r as s,s as c}from"./chunk-YW2GTHCV.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import{a as Ie,b as Je}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{a as vt,b as Et,c as St,d as At,e as ht,f as Rt,g as Pt}from"./chunk-UUOPT2N4.js";import{e as z,f as N,g as q,h as I,i as J,j as K,m as Q}from"./chunk-4QLJUQSJ.js";import{a as ir,b as mr,c as nr,d as fr,g as xr,h as lr,i as sr,j as cr}from"./chunk-7WRQ2UAN.js";import{a as bi,b as Ti,c as Zi,d as Di,e as gi,f as ui,g as wi,h as Gi,i as Hi,j as _i,k as Fi,l as ji,m as ki,n as Bi,o as Ci,p as Mi}from"./chunk-6XFXPIVB.js";import{$ as wo,A as oo,Aa as aa,B as ao,Ba as pa,C as po,Ca as ia,D as io,Da as ma,E as mo,Ea as na,F as no,Fa as fa,G as fo,Ga as xa,H as xo,Ha as la,I as lo,Ia as sa,J as so,Ja as ca,K as co,Ka as da,L as yo,La as ya,M as vo,Ma as va,N as Eo,Na as Ea,O as So,Oa as Sa,P as Ao,Pa as Aa,Q as ho,Qa as ha,R as Ro,Ra,S as Po,Sa as Pa,T as Lo,Ta as La,U as Oo,Ua as Oa,V as bo,Va as ba,W as To,X as Zo,Y as Do,Z as go,_ as uo,aa as Go,b as Gt,ba as Ho,c as Ht,ca as _o,d as _t,da as Fo,e as Ft,ea as jo,f as jt,fa as ko,g as kt,ga as Bo,h as Bt,ha as Co,i as Ct,ia as Mo,j as Mt,ja as Vo,k as Vt,ka as Wo,l as Wt,la as Yo,m as Yt,ma as zo,n as zt,na as No,o as Nt,oa as qo,p as qt,pa as Io,q as It,qa as Jo,r as Jt,ra as Ko,s as Kt,sa as Qo,t as Qt,ta as Uo,u as Ut,ua as Xo,v as Xt,va as $o,w as $t,wa as ea,x as eo,xa as ra,y as ro,ya as ta,z as to,za as oa}from"./chunk-VUJXR5K5.js";import"./chunk-WOT6VMZA.js";export{dp as ACTOR_TYPE,Fe as AspectRatio,Ki as AudioClipSchema,sm as AudioItemSchema,Nr as BOX_TYPE,tn as BRIDGE_READY_EVENT,Gt as BoundaryRicochet3DCoordinator,Ht as BoundaryRicochetCoordinator,Ur as CONE_TYPE,ua as CUTSCENE_BEHAVIOR_KEY,ot as CYLINDER_TYPE,im as CameraKeyframeSchema,Yp as CameraManager,Fp as CameraPipeline,fm as CameraShotSchema,zp as CameraWrapper,Wn as ColorJsonSchema,Gp as ConstructionGrid,_t as CooldownBehavior,wa as CutsceneCameraBehavior,mm as CutsceneCameraSchema,dm as CutsceneDefinitionSchema,xm as CutsceneEventSchema,cp as CutscenePreviewController,pm as CutsceneSceneSchema,cm as CutsceneTrackSchema,$ as DEFAULT_SNAP_SETTINGS,xt as DISK_TYPE,v as DROPPABLE_AREA_TYPE,Ft as Destructible3DBehavior,jt as DestructibleMesh,nm as DollyPathSchema,Dn as EntityJsonSchema,Pn as EntitySchema,he as EntityThumbnailCache,Ie as EventEmitterDelegate,lm as EventItemSchema,Sp as FOG_TYPE,kt as FirstPersonBehavior,Bt as FirstPersonEvent,Ct as FirstPersonFSM,Bp as FirstPersonPerspective,Wt as FirstPersonPresentation,Mt as FirstPersonShooterCoordinator,Vt as FirstPersonState,kp as Fixed2DPerspective,c as Fn,Yt as FractureOptions,fi as Game,pr as GameBridge,Kn as GameConfigJsonSchema,Jn as GameDeviceConfigJsonSchema,Vn as GameInputConfigSchema,Mn as GameInputPlayerConfigSchema,y as HOVER_AREA_TYPE,om as Howl,Ni as InstrumentDefinitionSchema,zi as InstrumentEffectSchema,Yi as InstrumentPresetSchema,Cp as IsometricPerspective,zt as Jumper2DBehavior,Nt as Jumper2DEvent,qt as Jumper2DFSM,It as Jumper2DState,Jt as Jumper3DBehavior,Kt as Jumper3DEvent,Qt as Jumper3DFSM,Ut as Jumper3DState,un as KeyboardMappingSchema,gt as LIGHT_TYPE,ai as LINE_TYPE,Tn as LineEntityDataSchema,Cn as MouseConfigSchema,wn as MouseMappingSchema,Xt as MultidirectionalSpaceShooterCoordinator,Ji as NoteClipSchema,hi as PARTICLE_SYSTEM_TYPE,it as PILL_TYPE,ct as PLANE_TYPE,et as PYRAMID_TYPE,$t as ParticleEmitterBehavior,_p as Perspectives,eo as Platformer2DBehavior,ro as Platformer2DEvent,to as Platformer2DFSM,oo as Platformer2DState,ao as Platformer3DBehavior,po as Platformer3DEvent,io as Platformer3DFSM,mo as Platformer3DState,Tt as RECT_TYPE,wi as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,Gi as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,Hi as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,_i as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,Fi as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,ji as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,Rp as RenderBundleManager,Pp as RenderStrategyManager,In as ResolutionInputSchema,no as Ricochet2DBehavior,fo as Ricochet2DEvent,xo as Ricochet2DFSM,lo as Ricochet2DState,so as Ricochet3DBehavior,co as Ricochet3DEvent,yo as Ricochet3DFSM,vo as Ricochet3DState,bi as RuntimeBoundary2DBehavior,Ti as RuntimeDynamicCircleBody2DBehavior,Zi as RuntimeGoalZone2DBehavior,Di as RuntimePlayerInput2DBehavior,gi as RuntimeRicochet2DBehavior,ui as RuntimeTriggerRegion2DBehavior,vt as SELECTION_BOUNDS_MARGIN,Et as SELECTION_THIN_AXIS_FRACTION,At as SELECTION_THIN_AXIS_MAX,St as SELECTION_THIN_AXIS_MIN,Jr as SPHERE_TYPE,ri as SPRITE_TYPE,ci as STAGE_STATE_CHANGE,am as SceneTransitionSchema,Eo as ScreenVisibilityBehavior,So as ScreenVisibilityFSM,Ao as ScreenWrapBehavior,ho as ScreenWrapEvent,Ro as ScreenWrapFSM,Po as ScreenWrapState,Vp as SecondPersonPerspective,Lo as Shooter2DBehavior,Ep as SimulationBody,Qi as SongClipSchema,$i as SongDefinitionSchema,Xi as SongLoopSchema,qi as SongNoteSchema,Ii as SongTrackSchema,Zn as SpriteEntityDataSchema,Nn as StageAssetLoaderConfigSchema,dn as StageBodyKind,yn as StageBoundaryDim,qn as StageConfigJsonSchema,vn as StageEventType,zn as StageGLTFAssetLoaderConfigSchema,gn as StageJsonSchema,Up as StageManager,En as StageRicochetDim,Sn as StageRicochetReflection,Ln as StageSchema,An as StageTopDownPlane,Xp as TEXT_TYPE,U as TRANSFORM_TOOLS,On as TextEntityDataSchema,jp as ThirdPersonPerspective,Oo as ThrusterBehavior,bo as ThrusterEvent,To as ThrusterFSM,Zo as ThrusterState,Ui as TimeSignatureSchema,Do as TopDownMovementBehavior,Mp as TopDownPerspective,go as TopDownShooterCoordinator,up as TransformGizmo,mr as VEC2_ONE,ir as VEC2_ZERO,fr as VEC3_ONE,nr as VEC3_ZERO,Yn as Vec3ComponentsSchema,Rn as Vector2Schema,bn as Vector3TupleSchema,_n as VirtualTouchButtonConfigSchema,jn as VirtualTouchButtonsConfigSchema,Bn as VirtualTouchConfigSchema,Fn as VirtualTouchJoystickConfigSchema,kn as VirtualTouchJoysticksConfigSchema,Hn as VirtualTouchPositionSchema,Gn as VirtualTouchStyleSchema,uo as WorldBoundary2DBehavior,wo as WorldBoundary2DEvent,Go as WorldBoundary2DFSM,Ho as WorldBoundary2DState,_o as WorldBoundary3DBehavior,Fo as WorldBoundary3DEvent,jo as WorldBoundary3DFSM,ko as WorldBoundary3DState,Lt as ZONE_TYPE,yp as ZylemActor,qr as ZylemBox,Xr as ZylemCone,at as ZylemCylinder,lt as ZylemDisk,S as ZylemDroppableArea,Ap as ZylemFog,on as ZylemGameElement,E as ZylemHoverArea,ut as ZylemLight,ii as ZylemLine,Ri as ZylemParticleSystem,mt as ZylemPill,dt as ZylemPlane,rt as ZylemPyramid,Zt as ZylemRect,Kr as ZylemSphere,ti as ZylemSprite,$p as ZylemText,Ot as ZylemZone,G as abs,ka as activeShot,en as announceBridgeReady,o as applyEntityGlow,rn as applySwatchesToSelection,Ip as applyTransformChanges,w as asin,u as atan,tp as audibleTrackIds,Ia as beatsPerBar,Ka as beatsToSeconds,ki as bindRuntimeDynamicCircleBody2DHandle,ur as boxCollision,Cr as boxMesh,pn as buildBoxCollider,nn as buildCapsuleCollider,xn as buildConvexHullCollider,fn as buildCylinderCollider,sn as buildHeightfieldCollider,an as buildRuntimeBody,mn as buildSphereCollider,ln as buildTrimeshCollider,cn as bundleRuntimeCollision,Om as callFunc,za as cameraTracks,Z as clamp,Q as clearGlobalSubscriptions,ap as clipsAt,Dp as closestAxisValue,Bo as computeWorldBoundary2DHits,Co as computeWorldBoundary3DHits,Gr as coneCollision,Vr as coneMesh,g as cos,Br as create,vp as createActor,R as createBackgroundShader,Ir as createBox,Np as createCamera,$r as createCone,Li as createCooldownIcon,qa as createCutscenePlayer,pt as createCylinder,st as createDisk,h as createDroppableArea,ft as createEntity,ni as createEntityFactory,t as createEntityGlowMaterial,Mo as createFirstPersonInputComponent,Vo as createFirstPersonMovementComponent,Wo as createFirstPersonStateComponent,hp as createFog,vi as createFollowTarget,xi as createGame,N as createGlobal,A as createHoverArea,pp as createInstrument,Yo as createJumpConfig2D,zo as createJumpConfig3D,No as createJumpInput2D,qo as createJumpInput3D,Io as createJumpState2D,Jo as createJumpState3D,wt as createLight,mi as createLine,i as createNodeMaterialFromTSL,Pi as createParticleSystem,Wp as createPerspective,Ko as createPhysicsBodyComponent,nt as createPill,yt as createPlane,Ei as createPlatformFollow,Qo as createPlatformer2DInputComponent,Uo as createPlatformer2DMovementComponent,Xo as createPlatformer2DStateComponent,$o as createPlatformer3DInputComponent,ea as createPlatformer3DMovementComponent,ra as createPlatformer3DStateComponent,tt as createPyramid,Dt as createRect,ta as createShooter2DStateComponent,hn as createSimulation,fp as createSongPlayer,Qr as createSphere,oi as createSprite,Kp as createStage,sp as createStageCutsceneHost,Si as createStrategyPan,ei as createText,oa as createThrusterInputComponent,aa as createThrusterMovementComponent,pa as createThrusterStateComponent,ia as createTopDownMovementComponent,ma as createTopDownMovementInputComponent,na as createTopDownMovementStateComponent,fa as createTransformComponent,Hm as createTransformStore,Op as createVariable,bt as createZone,Ta as crossfadeTransitionShader,Na as cutsceneLength,_r as cylinderCollision,Yr as cylinderMesh,ep as dbToGain,ee as debugState,Ne as defaultTouchControls,xa as defineBehavior,or as degreesToRadians,Lm as delay,Oi as destroy,yi as dispatchStageState,Ca as dollyPointAt,M as dot,Ga as easeValue,Bi as emitRuntimeGoal,Ci as emitRuntimeRicochet,Mi as emitRuntimeTriggerRegionEnter,rm as encodeWav,tm as encodeWavBlob,mp as ensureAudio,d as entityRepresentative,si as entitySpawner,Re as entityThumbnailCache,Xe as eulerToQuaternion,Va as evaluateCameraPose,Wa as evaluateCutscene,H as exp,bm as fadeOpacity,la as fireCooldown,sa as fireShooter2DIfRequested,s as float,B as floor,Qe as focusEntity,C as fract,rp as gainToDb,qe as gameConfig,wp as getActiveLevelDocument,xp as getActiveSongPlayer,ca as getCooldown,da as getCooldownStore,je as getDisplayAspect,ya as getEntityFacingAngle2D,q as getGlobal,K as getGlobals,Se as getHoveredEntity,ye as getHoveredEntityId,Wm as getPosition,ke as getPresetResolution,Dr as getRotation,Ee as getSelectedEntity,me as getSelectedEntityId,fe as getSelectedEntityIds,le as getSnapSettings,bp as getVariable,Ym as getVelocity,$m as getZylemBridge,ym as globalChange,vm as globalChanges,va as hasAnyWorldBoundary2DHit,Ea as hasAnyWorldBoundary3DHit,di as initStageStateDispatcher,gp as intersectPlane,np as isAudioReady,p as isGLSLShader,ga as isManagedRenderEntity,ie as isPickMode,a as isTSLShader,X as isTransformTool,_e as isWebGPUSupported,Ya as itemsBetween,We as joystickBaseSvg,Ye as joystickThumbSvg,V as length,_a as lerpPose,Ha as lerpVec3,ip as loadTone,j as max,Rt as measureObjectSelectionBounds,He as mergeInputConfigs,Xa as midiToFrequency,$a as midiToNoteName,k as min,b as mix,Y as mod,_m as move,hm as moveBy,Vm as moveForwardXY,Rm as moveTo,Fm as moveX,Bm as moveXY,Cm as moveXZ,jm as moveY,km as moveZ,O as normalize,xr as normalizeVec2,lr as normalizeVec3,e as objectVertexShader,I as onGlobalChange,J as onGlobalChanges,Zm as onPress,Dm as onRelease,Tp as onVariableChange,Zp as onVariableChanges,gr as packCollisionGroups,ht as padSelectionBounds,um as parallel,Be as parseResolution,Sa as particleEffect,Aa as particlePresets,pi as pickZylemLine,Fr as pillCollision,zr as pillMesh,Wi as pingPongBeep,jr as planeCollision,L as positionWorld,P as positionWorldDirection,_ as pow,Ba as previousShot,Hr as pyramidCollision,Wr as pyramidMesh,$e as quaternionToEuler,ar as radiansToDegrees,ha as registerCooldown,re as registerDebugEntityResolver,Ke as registerEntityFocusContext,em as renderSong,wm as repeat,Gm as repeatForever,Ra as resetCooldown,Am as resetEntityOpacity,Mm as resetVelocity,Pa as resolveAim2D,Ve as resolveButtonAccent,te as resolveDebugEntity,Za as resolveRenderCategory,Pt as resolveSelectionBounds,Me as resolveTouchTheme,Vi as ricochetSound,Pm as rotateBy,vr as rotateEuler,dr as rotateInDirection,Sr as rotateX,Er as rotateY,yr as rotateYEuler,Ar as rotateZ,Ma as sampleDollyPath,Fa as sceneAt,op as scheduleSong,Xm as screenCenterLookDeltas,Um as screenCenterLookTargets,Qa as secondsToBeats,gm as sequence,de as setAddType,Ai as setCameraFeed,lp as setCutsceneTransitionShaders,ae as setDebugTool,z as setGlobal,ce as setGridVisible,ve as setHoveredEntityId,oe as setPaused,pe as setPickMode,zm as setPosition,Nm as setPositionX,qm as setPositionY,Im as setPositionZ,Tr as setRotation,Zr as setRotationDegrees,Lr as setRotationDegreesX,Rr as setRotationDegreesY,br as setRotationDegreesZ,Pr as setRotationX,hr as setRotationY,Or as setRotationZ,Ae as setSelectedEntity,ne as setSelectedEntityId,xe as setSelectedEntityIds,se as setSnapSettings,Hp as setStageFrameProfilerEnabled,Lp as setVariable,Qm as shortestAngleDelta,ja as shotAt,D as sin,T as smoothstep,tr as snapScale,er as snapToIncrement,rr as snapVec3,Ja as songLengthBeats,Ua as songLengthSeconds,wr as sphereCollision,Mr as sphereMesh,qp as stageConfig,Qp as stageState,r as standardShader,F as step,Ue as streamLevel,li as streamLevelOnStage,Tm as throttle,La as tickCooldowns,f as time,sr as toThreeVector2,cr as toThreeVector3,ze as touchButtonSvg,Ce as touchThemes,m as uniform,Oa as updateBoundaryRicochet,Pe as useArrowsForAxes,Oe as useArrowsForDirections,Le as useArrowsForSecondaryAxes,ba as useBehavior,Ze as useIJKLForAxes,De as useIJKLForDirections,we as useMouse,ge as useMouseLook,ue as useScreenCenterLook,Ge as useVirtualControls,Te as useWASDForAxes,be as useWASDForDirections,Da as usesManagedRenderPath,n as uv,Em as variableChange,Sm as variableChanges,W as vec2,x as vec3,l as vec4,Jp as vessel,Km as wrapAround3D,Jm as wrapAroundXY,kr as zoneCollision,Je as zylemEventBus};
1
+ import{a as om,b as am,c as pm,d as im}from"./chunk-FZNEWOC5.js";import{a as nm}from"./chunk-WM3NVEDX.js";import{a as mm,b as sm,c as fm,d as xm,e as lm,f as cm,g as dm,h as vm,i as ym,j as Sm,k as Em,l as hm,m as Am,n as Rm,o as Pm,p as bm}from"./chunk-47DG7I7M.js";import{A as Qm,B as Um,C as Xm,a as gm,b as Lm,c as Om,d as Dm,e as Tm,f as Zm,g as um,h as wm,i as Gm,j as Hm,k as Nm,l as _m,m as km,n as Fm,o as Mm,p as jm,q as Bm,r as Cm,s as Vm,t as Wm,u as Ym,v as zm,w as qm,x as Im,y as Jm,z as Km}from"./chunk-KSEP7AUF.js";import{a as hn,b as An,c as Rn,d as Pn}from"./chunk-WQ3WMMZD.js";import{A as Kn,B as Qn,C as Un,D as Xn,E as $n,a as bn,b as gn,c as Ln,d as On,e as Dn,f as Tn,g as Zn,h as un,i as wn,j as Gn,k as Hn,l as Nn,m as _n,n as kn,o as Fn,p as Mn,q as jn,r as Bn,s as Cn,t as Vn,u as Wn,v as Yn,w as zn,x as qn,y as In,z as Jn}from"./chunk-IPWUDOV5.js";import{a as em,b as rm,c as tm}from"./chunk-7QF6YTEZ.js";import"./chunk-ORIDWL3T.js";import{a as E,b as h,c as A,d as R,e as P,f as b}from"./chunk-O5N7VFYK.js";import{a as g,b as L,c as O,d as D,e as T,f as Z,g as u,h as w,i as G,j as H,k as N,l as _,m as k,n as F,o as M,p as j,q as B,r as C,s as V,t as W,u as Y,v as z,w as q}from"./chunk-4DAITCJS.js";import"./chunk-BIGH6D34.js";import"./chunk-ELQN62PQ.js";import{a as Yi,b as zi,c as on,d as an,e as pn,f as nn}from"./chunk-ZZO4CKRU.js";import{a as mp,c as sp,d as fp,e as xp,f as lp,g as cp}from"./chunk-2PFNNGTV.js";import{a as qi,b as Ii,c as Ji,d as Ki,e as Qi,f as Ui,g as Xi,h as $i,i as en,j as rn,k as tn}from"./chunk-NVVLLWIM.js";import"./chunk-VMXSE3EC.js";import{a as mn,b as sn,c as fn,d as xn,e as ln,f as cn,g as dn,h as vn,i as yn,j as Sn,k as En}from"./chunk-YNX3Q3CL.js";import{a as Me,b as je,c as Be,d as Ce,e as Ke,f as $p,g as ei,h as li,i as ci,j as di,k as vi,l as yi,m as Si,n as Ei,o as hi,p as Ai,q as Ri,r as Pi}from"./chunk-RRYBT6NL.js";import{a as Fe,c as ua,d as wa,e as Ga,f as gp,g as Lp,h as Np,i as kp,j as Fp,l as Mp,m as jp,n as Bp,o as Cp,p as Vp,q as Wp,r as Yp,s as zp,t as qp,u as Ip,v as Jp,w as Kp,x as Up,z as Xp}from"./chunk-NA5SAMP2.js";import"./chunk-Y2NS4OJH.js";import"./chunk-2HSR5XDQ.js";import{e as er,o as mr}from"./chunk-W6XV7CCC.js";import{b as Ap}from"./chunk-WBQ5TNRZ.js";import{h as Op,i as Dp,j as Tp,k as Zp,l as up}from"./chunk-D2PATZCC.js";import{a as Qp}from"./chunk-BH53MBAZ.js";import{a as Ve,b as We,c as Ye,d as ze,e as qe,f as Ie,g as Je}from"./chunk-PCFF4LLO.js";import{a as Le,b as Oe,c as De,d as Te,e as Ze,f as ue,g as we,h as Ge,i as He,j as Ne,k as _e,l as ke}from"./chunk-UG22Z42P.js";import{c as S}from"./chunk-Y5IU6IA5.js";import{a as be,b as ge}from"./chunk-B6GDESCB.js";import{c as wp,d as Gp,e as Hp,f as _p}from"./chunk-SIRFF4DY.js";import{a as Xe,b as $e,c as rr,d as tr,e as or,f as ar,g as pr,h as ir,i as nr}from"./chunk-TRKPYAVB.js";import{a as Ha,b as Na,c as _a,d as ka,e as Fa,f as Ma,g as ja,h as Ba,i as Ca,j as Va,k as Wa,l as Ya,m as za,n as qa,o as Ia,p as Ja,q as Ka,r as dp,s as vp,t as yp}from"./chunk-2XMG3NJS.js";import{a as Za}from"./chunk-7GYFZKK7.js";import{a as Qa,b as Ua,c as Xa,d as $a,e as ep,f as rp,g as tp,h as op,i as ap,j as pp,k as ip,l as np}from"./chunk-QGIYILYI.js";import"./chunk-RPLJRBU3.js";import{b as d}from"./chunk-TLUGF3AS.js";import{a as v}from"./chunk-2I76JHSN.js";import{c as y}from"./chunk-YETBTF6G.js";import{A as he,C as Ae,D as Re,E as Pe,a as ee,b as re,c as te,d as oe,e as ae,f as pe,h as ie,j as ne,m as me,n as se,o as fe,p as xe,q as le,r as ce,v as de,w as ve,x as ye,y as Se,z as Ee}from"./chunk-LUFSPEPZ.js";import{a as bi,b as gi,c as Li,d as Oi,e as Di}from"./chunk-M47F6LKE.js";import{a as ri,b as ti,c as oi,d as ai,e as pi,f as ii,g as ni,h as mi,i as si,j as fi,l as xi}from"./chunk-KGAXGWKQ.js";import{a as Sp,b as Ep,c as hp,d as Rp,e as Pp,f as bp}from"./chunk-DLIQ7RKB.js";import{A as dt,B as vt,C as yt,D as St,E as Et,J as Zt,K as ut,L as wt,M as Gt,N as Ht,O as Nt,b as Vr,c as Wr,d as Yr,e as zr,f as qr,g as Ir,h as Jr,i as Kr,j as Qr,k as Ur,l as Xr,m as $r,n as et,o as rt,p as tt,q as ot,r as at,s as pt,t as it,u as nt,v as mt,w as st,x as ft,y as xt,z as ct}from"./chunk-X4TZ645S.js";import{d as lt,e as Ot,f as Dt,g as Tt}from"./chunk-VLGJAGMX.js";import{e as I,f as J,g as K,h as Q,i as U,j as X,m as $}from"./chunk-4QLJUQSJ.js";import{E as Cr,c as Hr,d as Nr,e as _r,f as kr,g as Fr,h as Mr,i as jr,j as Br}from"./chunk-3XIJCDII.js";import{b as Gr}from"./chunk-EVYHPR3J.js";import{a as Sr,b as Er,c as hr,d as Ar,e as Rr,f as Pr,g as br,h as gr,i as Lr,j as Or,k as Dr,l as Tr,m as Zr,n as ur,o as wr}from"./chunk-XRP4JJXL.js";import{c as e,d as r,g as t,h as o,i as a,j as p,l as i,m as n,n as m,o as s,p as f,q as x,r as l,s as c}from"./chunk-HOLQZSW3.js";import"./chunk-5WRFDAZN.js";import"./chunk-2NO4YCLR.js";import"./chunk-T6O2SGH5.js";import{a as sr,b as fr,c as xr,d as lr,g as cr,h as dr,i as vr,j as yr}from"./chunk-7WRQ2UAN.js";import{a as Qe,b as Ue}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{a as ht,b as At,c as Rt,d as Pt,e as bt,f as gt,g as Lt}from"./chunk-UUOPT2N4.js";import{a as Ti,b as Zi,c as ui,d as wi,e as Gi,f as Hi,g as Ni,h as _i,i as ki,j as Fi,k as Mi,l as ji,m as Bi,n as Ci,o as Vi,p as Wi}from"./chunk-6XFXPIVB.js";import{$ as No,A as io,Aa as na,B as no,Ba as ma,C as mo,Ca as sa,D as so,Da as fa,E as fo,Ea as xa,F as xo,Fa as la,G as lo,Ga as ca,H as co,Ha as da,I as vo,Ia as va,J as yo,Ja as ya,K as So,Ka as Sa,L as Eo,La as Ea,M as ho,Ma as ha,N as Ao,Na as Aa,O as Ro,Oa as Ra,P as Po,Pa,Q as bo,Qa as ba,R as go,Ra as ga,S as Lo,Sa as La,T as Oo,Ta as Oa,U as Do,Ua as Da,V as To,Va as Ta,W as Zo,X as uo,Y as wo,Z as Go,_ as Ho,aa as _o,b as _t,ba as ko,c as kt,ca as Fo,d as Ft,da as Mo,e as Mt,ea as jo,f as jt,fa as Bo,g as Bt,ga as Co,h as Ct,ha as Vo,i as Vt,ia as Wo,j as Wt,ja as Yo,k as Yt,ka as zo,l as zt,la as qo,m as qt,ma as Io,n as It,na as Jo,o as Jt,oa as Ko,p as Kt,pa as Qo,q as Qt,qa as Uo,r as Ut,ra as Xo,s as Xt,sa as $o,t as $t,ta as ea,u as eo,ua as ra,v as ro,va as ta,w as to,wa as oa,x as oo,xa as aa,y as ao,ya as pa,z as po,za as ia}from"./chunk-VUJXR5K5.js";import"./chunk-WOT6VMZA.js";export{Sp as ACTOR_TYPE,Me as AspectRatio,Xi as AudioClipSchema,yn as AudioItemSchema,Jr as BOX_TYPE,im as BRIDGE_READY_EVENT,_t as BoundaryRicochet3DCoordinator,kt as BoundaryRicochetCoordinator,et as CONE_TYPE,Ha as CUTSCENE_BEHAVIOR_KEY,it as CYLINDER_TYPE,fn as CameraKeyframeSchema,qp as CameraManager,Mp as CameraPipeline,cn as CameraShotSchema,Ip as CameraWrapper,zm as ColorJsonSchema,_p as ConstructionGrid,Ft as CooldownBehavior,Na as CutsceneCameraBehavior,xn as CutsceneCameraSchema,En as CutsceneDefinitionSchema,dn as CutsceneEventSchema,yp as CutscenePreviewController,sn as CutsceneSceneSchema,Sn as CutsceneTrackSchema,te as DEFAULT_SNAP_SETTINGS,ct as DISK_TYPE,h as DROPPABLE_AREA_TYPE,Mt as Destructible3DBehavior,jt as DestructibleMesh,ln as DollyPathSchema,wm as EntityJsonSchema,Lm as EntitySchema,be as EntityThumbnailCache,Qe as EventEmitterDelegate,vn as EventItemSchema,Rp as FOG_TYPE,Bt as FirstPersonBehavior,Ct as FirstPersonEvent,Vt as FirstPersonFSM,Cp as FirstPersonPerspective,zt as FirstPersonPresentation,Wt as FirstPersonShooterCoordinator,Yt as FirstPersonState,Bp as Fixed2DPerspective,c as Fn,qt as FractureOptions,li as Game,mr as GameBridge,Xm as GameConfigJsonSchema,Um as GameDeviceConfigJsonSchema,Ym as GameInputConfigSchema,Wm as GameInputPlayerConfigSchema,E as HOVER_AREA_TYPE,nn as Howl,Ji as InstrumentDefinitionSchema,Ii as InstrumentEffectSchema,qi as InstrumentPresetSchema,Vp as IsometricPerspective,It as Jumper2DBehavior,Jt as Jumper2DEvent,Kt as Jumper2DFSM,Qt as Jumper2DState,Ut as Jumper3DBehavior,Xt as Jumper3DEvent,$t as Jumper3DFSM,eo as Jumper3DState,Hm as KeyboardMappingSchema,Gt as LIGHT_TYPE,ni as LINE_TYPE,Zm as LineEntityDataSchema,Vm as MouseConfigSchema,Nm as MouseMappingSchema,ro as MultidirectionalSpaceShooterCoordinator,d as NavigationMesh,y as NavigationSession,Ui as NoteClipSchema,bi as PARTICLE_SYSTEM_TYPE,st as PILL_TYPE,yt as PLANE_TYPE,ot as PYRAMID_TYPE,to as ParticleEmitterBehavior,Fp as Perspectives,oo as Platformer2DBehavior,ao as Platformer2DEvent,po as Platformer2DFSM,io as Platformer2DState,no as Platformer3DBehavior,mo as Platformer3DEvent,so as Platformer3DFSM,fo as Platformer3DState,Zt as RECT_TYPE,Ni as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,_i as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,ki as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,Fi as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,Mi as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,ji as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,gp as RenderBundleManager,Lp as RenderStrategyManager,Qm as ResolutionInputSchema,xo as Ricochet2DBehavior,lo as Ricochet2DEvent,co as Ricochet2DFSM,vo as Ricochet2DState,yo as Ricochet3DBehavior,So as Ricochet3DEvent,Eo as Ricochet3DFSM,ho as Ricochet3DState,Ti as RuntimeBoundary2DBehavior,Zi as RuntimeDynamicCircleBody2DBehavior,ui as RuntimeGoalZone2DBehavior,wi as RuntimePlayerInput2DBehavior,Gi as RuntimeRicochet2DBehavior,Hi as RuntimeTriggerRegion2DBehavior,ht as SELECTION_BOUNDS_MARGIN,At as SELECTION_THIN_AXIS_FRACTION,Pt as SELECTION_THIN_AXIS_MAX,Rt as SELECTION_THIN_AXIS_MIN,Ur as SPHERE_TYPE,ai as SPRITE_TYPE,yi as STAGE_STATE_CHANGE,mn as SceneTransitionSchema,Ao as ScreenVisibilityBehavior,Ro as ScreenVisibilityFSM,Po as ScreenWrapBehavior,bo as ScreenWrapEvent,go as ScreenWrapFSM,Lo as ScreenWrapState,Yp as SecondPersonPerspective,Oo as Shooter2DBehavior,Ap as SimulationBody,$i as SongClipSchema,tn as SongDefinitionSchema,rn as SongLoopSchema,Ki as SongNoteSchema,Qi as SongTrackSchema,um as SpriteEntityDataSchema,Jm as StageAssetLoaderConfigSchema,Sm as StageBodyKind,Em as StageBoundaryDim,Km as StageConfigJsonSchema,hm as StageEventType,Im as StageGLTFAssetLoaderConfigSchema,Gm as StageJsonSchema,ei as StageManager,Am as StageRicochetDim,Rm as StageRicochetReflection,Om as StageSchema,Pm as StageTopDownPlane,ri as TEXT_TYPE,ee as TRANSFORM_TOOLS,Dm as TextEntityDataSchema,jp as ThirdPersonPerspective,Do as ThrusterBehavior,To as ThrusterEvent,Zo as ThrusterFSM,uo as ThrusterState,en as TimeSignatureSchema,wo as TopDownMovementBehavior,Wp as TopDownPerspective,Go as TopDownShooterCoordinator,Hp as TransformGizmo,fr as VEC2_ONE,sr as VEC2_ZERO,lr as VEC3_ONE,xr as VEC3_ZERO,qm as Vec3ComponentsSchema,gm as Vector2Schema,Tm as Vector3TupleSchema,Fm as VirtualTouchButtonConfigSchema,jm as VirtualTouchButtonsConfigSchema,Cm as VirtualTouchConfigSchema,Mm as VirtualTouchJoystickConfigSchema,Bm as VirtualTouchJoysticksConfigSchema,km as VirtualTouchPositionSchema,_m as VirtualTouchStyleSchema,Ho as WorldBoundary2DBehavior,No as WorldBoundary2DEvent,_o as WorldBoundary2DFSM,ko as WorldBoundary2DState,Fo as WorldBoundary3DBehavior,Mo as WorldBoundary3DEvent,jo as WorldBoundary3DFSM,Bo as WorldBoundary3DState,Ot as ZONE_TYPE,Ep as ZylemActor,Kr as ZylemBox,rt as ZylemCone,nt as ZylemCylinder,dt as ZylemDisk,R as ZylemDroppableArea,Pp as ZylemFog,nm as ZylemGameElement,A as ZylemHoverArea,Ht as ZylemLight,si as ZylemLine,gi as ZylemParticleSystem,ft as ZylemPill,St as ZylemPlane,at as ZylemPyramid,ut as ZylemRect,Xr as ZylemSphere,pi as ZylemSprite,ti as ZylemText,Dt as ZylemZone,_ as abs,Ba as activeShot,am as announceBridgeReady,o as applyEntityGlow,pm as applySwatchesToSelection,Qp as applyTransformChanges,N as asin,H as atan,pp as audibleTrackIds,v as bakeNavigationData,Qa as beatsPerBar,Xa as beatsToSeconds,Bi as bindRuntimeDynamicCircleBody2DHandle,Hr as boxCollision,Vr as boxMesh,sm as buildBoxCollider,xm as buildCapsuleCollider,cm as buildConvexHullCollider,lm as buildCylinderCollider,vm as buildHeightfieldCollider,mm as buildRuntimeBody,fm as buildSphereCollider,dm as buildTrimeshCollider,ym as bundleRuntimeCollision,Tn as callFunc,Ia as cameraTracks,u as clamp,$ as clearGlobalSubscriptions,np as clipsAt,wp as closestAxisValue,Co as computeWorldBoundary2DHits,Vo as computeWorldBoundary3DHits,_r as coneCollision,Yr as coneMesh,G as cos,Cr as create,hp as createActor,g as createBackgroundShader,Qr as createBox,Jp as createCamera,tt as createCone,Oi as createCooldownIcon,Ka as createCutscenePlayer,mt as createCylinder,vt as createDisk,b as createDroppableArea,lt as createEntity,xi as createEntityFactory,t as createEntityGlowMaterial,Wo as createFirstPersonInputComponent,Yo as createFirstPersonMovementComponent,zo as createFirstPersonStateComponent,bp as createFog,hi as createFollowTarget,ci as createGame,J as createGlobal,P as createHoverArea,mp as createInstrument,qo as createJumpConfig2D,Io as createJumpConfig3D,Jo as createJumpInput2D,Ko as createJumpInput3D,Qo as createJumpState2D,Uo as createJumpState3D,Nt as createLight,fi as createLine,i as createNodeMaterialFromTSL,Li as createParticleSystem,zp as createPerspective,Xo as createPhysicsBodyComponent,xt as createPill,Et as createPlane,Ai as createPlatformFollow,$o as createPlatformer2DInputComponent,ea as createPlatformer2DMovementComponent,ra as createPlatformer2DStateComponent,ta as createPlatformer3DInputComponent,oa as createPlatformer3DMovementComponent,aa as createPlatformer3DStateComponent,pt as createPyramid,wt as createRect,pa as createShooter2DStateComponent,bm as createSimulation,lp as createSongPlayer,$r as createSphere,ii as createSprite,Xp as createStage,vp as createStageCutsceneHost,Ri as createStrategyPan,oi as createText,ia as createThrusterInputComponent,na as createThrusterMovementComponent,ma as createThrusterStateComponent,sa as createTopDownMovementComponent,fa as createTopDownMovementInputComponent,xa as createTopDownMovementStateComponent,la as createTransformComponent,Fn as createTransformStore,Dp as createVariable,Tt as createZone,Za as crossfadeTransitionShader,Ja as cutsceneLength,Fr as cylinderCollision,qr as cylinderMesh,op as dbToGain,oe as debugState,Je as defaultTouchControls,ca as defineBehavior,ir as degreesToRadians,Dn as delay,Di as destroy,Ei as dispatchStageState,Va as dollyPointAt,W as dot,_a as easeValue,Ci as emitRuntimeGoal,Vi as emitRuntimeRicochet,Wi as emitRuntimeTriggerRegionEnter,an as encodeWav,pn as encodeWavBlob,fp as ensureAudio,S as entityRepresentative,vi as entitySpawner,ge as entityThumbnailCache,rr as eulerToQuaternion,Ya as evaluateCameraPose,za as evaluateCutscene,k as exp,Zn as fadeOpacity,da as fireCooldown,va as fireShooter2DIfRequested,l as float,C as floor,$e as focusEntity,V as fract,ap as gainToDb,Ke as gameConfig,Np as getActiveLevelDocument,cp as getActiveSongPlayer,ya as getCooldown,Sa as getCooldownStore,je as getDisplayAspect,Ea as getEntityFacingAngle2D,K as getGlobal,X as getGlobals,Re as getHoveredEntity,Ee as getHoveredEntityId,qn as getPosition,Be as getPresetResolution,wr as getRotation,Ae as getSelectedEntity,fe as getSelectedEntityId,le as getSelectedEntityIds,de as getSnapSettings,Tp as getVariable,In as getVelocity,om as getZylemBridge,hn as globalChange,An as globalChanges,ha as hasAnyWorldBoundary2DHit,Aa as hasAnyWorldBoundary3DHit,Si as initStageStateDispatcher,Gp as intersectPlane,xp as isAudioReady,p as isGLSLShader,Ga as isManagedRenderEntity,se as isPickMode,a as isTSLShader,re as isTransformTool,Fe as isWebGPUSupported,qa as itemsBetween,ze as joystickBaseSvg,qe as joystickThumbSvg,Y as length,Fa as lerpPose,ka as lerpVec3,sp as loadTone,j as max,gt as measureObjectSelectionBounds,ke as mergeInputConfigs,rp as midiToFrequency,tp as midiToNoteName,B as min,T as mix,q as mod,Mn as move,gn as moveBy,zn as moveForwardXY,Ln as moveTo,jn as moveX,Vn as moveXY,Wn as moveXZ,Bn as moveY,Cn as moveZ,D as normalize,cr as normalizeVec2,dr as normalizeVec3,e as objectVertexShader,Q as onGlobalChange,U as onGlobalChanges,wn as onPress,Gn as onRelease,Zp as onVariableChange,up as onVariableChanges,Gr as packCollisionGroups,bt as padSelectionBounds,Nn as parallel,Ce as parseResolution,Ra as particleEffect,Pa as particlePresets,mi as pickZylemLine,Mr as pillCollision,Ir as pillMesh,zi as pingPongBeep,jr as planeCollision,O as positionWorld,L as positionWorldDirection,F as pow,Ca as previousShot,kr as pyramidCollision,zr as pyramidMesh,tr as quaternionToEuler,nr as radiansToDegrees,ba as registerCooldown,ae as registerDebugEntityResolver,Xe as registerEntityFocusContext,on as renderSong,_n as repeat,kn as repeatForever,ga as resetCooldown,bn as resetEntityOpacity,Yn as resetVelocity,La as resolveAim2D,Ye as resolveButtonAccent,pe as resolveDebugEntity,ua as resolveRenderCategory,Lt as resolveSelectionBounds,We as resolveTouchTheme,Yi as ricochetSound,On as rotateBy,hr as rotateEuler,Sr as rotateInDirection,Rr as rotateX,Ar as rotateY,Er as rotateYEuler,Pr as rotateZ,Wa as sampleDollyPath,Ma as sceneAt,ip as scheduleSong,tm as screenCenterLookDeltas,rm as screenCenterLookTargets,$a as secondsToBeats,Hn as sequence,Se as setAddType,Pi as setCameraFeed,dp as setCutsceneTransitionShaders,ne as setDebugTool,I as setGlobal,ye as setGridVisible,he as setHoveredEntityId,ie as setPaused,me as setPickMode,Jn as setPosition,Kn as setPositionX,Qn as setPositionY,Un as setPositionZ,Zr as setRotation,ur as setRotationDegrees,Or as setRotationDegreesX,gr as setRotationDegreesY,Tr as setRotationDegreesZ,Lr as setRotationX,br as setRotationY,Dr as setRotationZ,Pe as setSelectedEntity,xe as setSelectedEntityId,ce as setSelectedEntityIds,ve as setSnapSettings,kp as setStageFrameProfilerEnabled,Op as setVariable,em as shortestAngleDelta,ja as shotAt,w as sin,Z as smoothstep,pr as snapScale,or as snapToIncrement,ar as snapVec3,Ua as songLengthBeats,ep as songLengthSeconds,Nr as sphereCollision,Wr as sphereMesh,Kp as stageConfig,$p as stageState,r as standardShader,M as step,er as streamLevel,di as streamLevelOnStage,un as throttle,Oa as tickCooldowns,s as time,vr as toThreeVector2,yr as toThreeVector3,Ie as touchButtonSvg,Ve as touchThemes,n as uniform,Da as updateBoundaryRicochet,Le as useArrowsForAxes,De as useArrowsForDirections,Oe as useArrowsForSecondaryAxes,Ta as useBehavior,ue as useIJKLForAxes,we as useIJKLForDirections,Ne as useMouse,Ge as useMouseLook,He as useScreenCenterLook,_e as useVirtualControls,Ze as useWASDForAxes,Te as useWASDForDirections,wa as usesManagedRenderPath,m as uv,Rn as variableChange,Pn as variableChanges,z as vec2,f as vec3,x as vec4,Up as vessel,$n as wrapAround3D,Xn as wrapAroundXY,Br as zoneCollision,Ue as zylemEventBus};
@@ -1,16 +1,17 @@
1
+ import { N as NavigationSession } from './navigation-session-2rs6rHOw.js';
1
2
  import { B as BaseNode } from './base-node-idopiSw5.js';
2
3
  import { h as SetupFunction, g as UpdateFunction, j as DestroyFunction, a as SetupContext, U as UpdateContext, D as DestroyContext, L as LoadingEvent } from './base-node-life-cycle-BK9xebT9.js';
3
4
  import { Box3, Scene, Color, Object3D, Vector3, BufferGeometry, Material, Group, Texture, Camera } from 'three';
4
- import { an as ZylemWorld, al as EntityTypeMap } from './entity-type-map-BMaPY8cd.js';
5
+ import { an as ZylemWorld, al as EntityTypeMap } from './entity-type-map-CnxOtV01.js';
5
6
  import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-BIf_a4dl.js';
6
- import { G as GameEntity, d as GameEntityOptions, b as PointerTargetEntity } from './entity-CY75JJSw.js';
7
+ import { G as GameEntity, d as GameEntityOptions, b as PointerTargetEntity } from './entity-B8VygThO.js';
7
8
  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-BA3VPFlS.js';
8
9
  import { f as ZylemShader } from './material-D1IVeQc5.js';
9
10
  import { a as SimulationBody } from './simulation-body-zQw-emOr.js';
10
11
  import { e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-D3eDzvcA.js';
11
12
  import { StageEvents } from './events.js';
12
13
  import { G as GameInputConfig } from './game-interfaces-vF5sRi1n.js';
13
- import { A as ArmPlacementOptions, P as PlacementSession } from './placement-session-BNQoL7Jb.js';
14
+ import { A as ArmPlacementOptions, P as PlacementSession } from './placement-session-DfvCaGxX.js';
14
15
  import { SwatchApplyResult, SceneOperationEntry, LevelSyncPayload, LevelDocument, EntityApplySwatchPayload, SceneOperationPayload } from '@zylem/bridge';
15
16
  import { BehaviorSystem, BehaviorEntityLink, BehaviorRuntime, BehaviorSystemFactory, BehaviorRef } from '@zylem/behaviors/core';
16
17
  import { d as GizmoRay } from './transform-gizmo-DappLQ9w.js';
@@ -53,6 +54,8 @@ declare class CameraManager implements EditorCameraHost {
53
54
  private _screenSpacePanIds;
54
55
  /** Side, top, and isometric views that have already been placed on the gameplay camera. */
55
56
  private _framedEditorViews;
57
+ /** True after the free camera has copied the gameplay pose once. */
58
+ private _freePoseCaptured;
56
59
  /** World boxes of stage entities, read when an orthographic view is first shown. */
57
60
  private _entityBounds;
58
61
  /** Game camera to restore when the editor releases the main view. */
@@ -1392,6 +1395,8 @@ declare class StageEntityDelegate {
1392
1395
  */
1393
1396
  spawnEntity(child: BaseNode): Promise<void>;
1394
1397
  handleLateModelReady(entity: GameEntity<any>): void;
1398
+ /** Apply the `rotation` and `scale` options before the body is spawned. */
1399
+ private applySpawnTransform;
1395
1400
  /**
1396
1401
  * Register an entity for bundle or instanced rendering when opted in via
1397
1402
  * `category: 'environment'` or `category: 'pack'`.
@@ -1681,6 +1686,7 @@ type StageState = ZylemStageConfig & {
1681
1686
  */
1682
1687
  declare class ZylemStage extends LifeCycleBase<ZylemStage> {
1683
1688
  type: string;
1689
+ readonly navigation: NavigationSession;
1684
1690
  state: StageState;
1685
1691
  gravity: Vector3 | Vec3Components;
1686
1692
  world: ZylemWorld | null;
@@ -1772,17 +1778,6 @@ declare class ZylemStage extends LifeCycleBase<ZylemStage> {
1772
1778
  resize(width: number, height: number): void;
1773
1779
  }
1774
1780
 
1775
- /**
1776
- * The user-facing stage handle and its fluent authoring API.
1777
- *
1778
- * `Stage` is the durable, author-time wrapper game code holds onto: it stores
1779
- * options, pending entities, and lifecycle/loading callbacks, then constructs
1780
- * and drives a fresh internal `ZylemStage` on each `load()`. Exists to give a
1781
- * stable, ergonomic surface (`add`, `onSetup/onUpdate/onDestroy`, camera, input,
1782
- * and event helpers) that survives stage reloads, while `ZylemStage` owns the
1783
- * disposable per-load runtime. `createStage(...)` is the entry point.
1784
- */
1785
-
1786
1781
  type NodeLike = {
1787
1782
  create: Function;
1788
1783
  };
@@ -1790,6 +1785,8 @@ type AnyNode = NodeLike | Promise<NodeLike>;
1790
1785
  type EntityInput = AnyNode | (() => AnyNode) | (() => Promise<any>);
1791
1786
  declare class Stage {
1792
1787
  wrappedStage: ZylemStage | null;
1788
+ /** Navigation for the loaded stage. Null before load or after teardown. */
1789
+ get navigation(): NavigationSession | null;
1793
1790
  options: StageOptionItem[];
1794
1791
  private _pendingEntities;
1795
1792
  private setupCallbacks;
@@ -1,13 +1,15 @@
1
- import { G as Game, D as DeviceProfile } from './game-uQd7k6-m.js';
2
- import { v as DebugTools } from './debug-state-JRneI6c2.js';
1
+ import { G as Game, D as DeviceProfile } from './game-BqKsvmSH.js';
2
+ import { v as DebugTools } from './debug-state-CKrWEXUz.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-Dez16Gxm.js';
9
- import './entity-type-map-BMaPY8cd.js';
10
- import './entity-CY75JJSw.js';
8
+ import './stage-DT8QQbGk.js';
9
+ import './navigation-session-2rs6rHOw.js';
10
+ import '@zylem/bridge';
11
+ import './entity-type-map-CnxOtV01.js';
12
+ import './entity-B8VygThO.js';
11
13
  import '@zylem/behaviors/core';
12
14
  import './simulation-body-zQw-emOr.js';
13
15
  import './vector-D3eDzvcA.js';
@@ -21,8 +23,7 @@ import './entity-BIf_a4dl.js';
21
23
  import '@zylem/behaviors/particle-emitter';
22
24
  import 'three/addons/lines/webgpu/Line2.js';
23
25
  import './zylem-camera-BA3VPFlS.js';
24
- import './placement-session-BNQoL7Jb.js';
25
- import '@zylem/bridge';
26
+ import './placement-session-DfvCaGxX.js';
26
27
  import './transform-gizmo-DappLQ9w.js';
27
28
  import './default-controls-CAKJ5zlo.js';
28
29
 
@@ -1 +1 @@
1
- import{a}from"./chunk-JCGW5PIR.js";import"./chunk-UM5VNQPY.js";import"./chunk-WOT6VMZA.js";export{a as ZylemGameElement};
1
+ import{a}from"./chunk-WM3NVEDX.js";import"./chunk-LUFSPEPZ.js";import"./chunk-WOT6VMZA.js";export{a as ZylemGameElement};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zylem/game-lib",
3
- "version": "0.9.9",
3
+ "version": "0.9.11",
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",
@@ -235,7 +235,12 @@
235
235
  "./schema/stage-config": "./dist/schema/stage-config.schema.json",
236
236
  "./schema/input-config": "./dist/schema/input-config.schema.json",
237
237
  "./schema/song": "./dist/schema/song.schema.json",
238
- "./schema/cutscene": "./dist/schema/cutscene.schema.json"
238
+ "./schema/cutscene": "./dist/schema/cutscene.schema.json",
239
+ "./navigation": {
240
+ "types": "./dist/navigation.d.ts",
241
+ "import": "./dist/navigation.js"
242
+ },
243
+ "./navigation-worker.js": "./dist/navigation-worker.js"
239
244
  },
240
245
  "keywords": [
241
246
  "game",
@@ -253,15 +258,17 @@
253
258
  ],
254
259
  "dependencies": {
255
260
  "@dgreenheck/three-pinata": "^2.0.1",
261
+ "@recast-navigation/three": "0.44.0",
256
262
  "@sinclair/typebox": "^0.34.52",
257
263
  "@types/howler": "^2.2.13",
258
264
  "@zylem/behaviors": "^0.8.13",
259
- "@zylem/bridge": "^0.9.9",
265
+ "@zylem/bridge": "^0.9.10",
260
266
  "comlink": "^4.4.2",
261
267
  "howler": "^2.2.4",
262
268
  "idb-keyval": "^6.2.6",
263
269
  "msgpackr": "^1.11.14",
264
270
  "nanoid": "^5.1.16",
271
+ "recast-navigation": "0.44.0",
265
272
  "stats.js": "^0.17.0",
266
273
  "three": "^0.187.0",
267
274
  "tone": "^15.1.23",
@@ -303,6 +310,7 @@
303
310
  "test": "vitest --reporter=verbose",
304
311
  "coverage": "vitest run --coverage",
305
312
  "zw:postunlink": "pnpm -w run deps:latest",
306
- "zw:prerelease": "pnpm -w run deps:latest --check"
313
+ "zw:prerelease": "pnpm -w run deps:latest --check",
314
+ "test:navigation:bundle": "node tests/navigation-bundle.mjs"
307
315
  }
308
316
  }
@@ -1 +0,0 @@
1
- import{b as k,c as I,d as L}from"./chunk-273CUPEO.js";import{d as a,h as g,j as S,l as E,o as P,q as y,r as C,s as w,t as x,v as B,w as D,x as A}from"./chunk-UM5VNQPY.js";function q(){return new Promise(t=>{let e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(void 0)})}async function O(t,e,i={}){let n=Math.max(1,i.batchSize??5),o=0;for(let s of t.entries)await e(s),o+=1,o%n===0&&await q();return o%n!==0&&await q(),{spawned:o}}import{subscribe as W}from"valtio/vanilla";import{announceBridgeReady as j,getZylemBridge as p}from"@zylem/bridge";var re="game",le={side:"editor:side",left:"editor:left",top:"editor:top",bottom:"editor:bottom",isometric:"editor:isometric",isoLeftTop:"editor:iso-left-top",isoRightBottom:"editor:iso-right-bottom",isoLeftBottom:"editor:iso-left-bottom",perspective:"editor:perspective",free:"editor:free"},d=!1,c=new Set;function ce(){return d}function de(t){return c.add(t),d&&t.ensureEditorCameras(),()=>{c.delete(t)}}function u(t){if(!t&&!d)return Promise.resolve();if(d=t,!t){for(let e of c)e.destroyEditorCameras();return Promise.resolve()}return Promise.all([...c].map(e=>e.ensureEditorCameras())).then(()=>{})}function R(){for(let t of c)t.syncFreeCameraToGame()}function V(t){let e=!1;for(let i of c)i.activateCameraById(t)&&(e=!0);return e}function m(t,e){return[t[0]*e.x,t[1]*e.y,t[2]*e.z]}function z(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 $(t,e){let{shape:i}=t,n=t.offset?m(t.offset,e):t.offset,o;switch(i.type){case"box":o={type:"box",halfExtents:m(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:z(i.vertices,e)};break;case"trimesh":o={type:"trimesh",vertices:z(i.vertices,e),indices:i.indices};break;case"heightfield":o={...i,scale:m(i.scale,e)};break;default:o=i;break}return{...t,shape:o,offset:n}}function _(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 T(t){if(!t.colliderScaleDirty)return!1;t.colliderScaleDirty=!1;let e=_(t);if(!e.length)return!1;let i=t.getScale(),n=e.map(r=>$(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 F(t){return(t?.group??t?.mesh)?.scale}function Q(t){let i=(typeof t?.getScale=="function"?t.getScale():void 0)??t?.scale??F(t)??{};return{x:i.x??1,y:i.y??1,z:i.z??1}}var Z={position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0,w:1}};function b(t){return M(t)??K(t,Z)}function M(t){let e=typeof t?.getPose=="function"?t.getPose():null;return e?K(t,e):null}function K(t,e){let{position:i,rotation:n}=e;return{position:{x:i.x,y:i.y,z:i.z},rotation:L(n),quaternion:{x:n.x,y:n.y,z:n.z,w:n.w},scale:Q(t)}}function J(t,e){if(typeof t?.setScale=="function"){t.setScale(e.x,e.y,e.z);return}F(t)?.set?.(e.x,e.y,e.z)}function X(t){!t||typeof t.getScale!="function"||T(t)}function Y(t,e){if(!t)return!1;let i=e.quaternion??(e.rotation?I(e.rotation):void 0),n=!1;return(e.position||i)&&typeof t.setPose=="function"&&(n=t.setPose({position:e.position,rotation:i})),e.scale&&(J(t,e.scale),n=!0),n}function ee(t){let e=t?.constructor?.type;return e?String(e).replace("Symbol(","").replace(")",""):"Unknown"}function G(t,e){let i=t;if(!i?.uuid)return;let n=p().channel;if(!n.hasSubscribers("entity:upsert"))return;let o=e??b(t);n.queue("entity:upsert",[{uuid:i.uuid,name:i.name||"Unnamed",type:ee(t),position:o.position,rotation:o.rotation,scale:o.scale,quaternion:o.quaternion}])}function Ee(t,e){p().channel.send("game:notice",{level:t,message:e})}function te(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}`}var h=1e-5;function f(t,e){return Math.abs(t.x-e.x)<=h&&Math.abs(t.y-e.y)<=h&&Math.abs(t.z-e.z)<=h}function ne(t,e){return f(t.position,e.position)&&f(t.scale,e.scale)&&f(t.quaternion,e.quaternion)&&Math.abs(t.quaternion.w-e.quaternion.w)<=h}function ie(t,e){return!e||t.length!==e.length?!1:t.every((i,n)=>i===e[n])}function oe(t,e){switch(e){case"add":C(t);break;case"subtract":w(t);break;case"toggle":for(let i of t)x(i);break;default:y(t);break}}function se(t,e){return t.on.bind(t)("camera:activate",({id:n})=>e(n))}var U=class{channel;unsubscribes=[];host=null;editorKnown={};applyingSceneOperation=!1;editorCameraFrame=0;publishedPoses=new Map;constructor(){this.channel=p().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,n&&R()}),this.channel.on("tool:set",({tool:n})=>{S(n)}),this.channel.on("playback:set",({paused:n})=>{this.editorKnown.paused=n,g(n)}),this.channel.on("entity:select",({uuid:n,uuids:o,mode:s})=>{o?oe(o,s??"replace"):P(n),this.editorKnown.selectedUuid=a.selectedEntityId,this.editorKnown.selectedUuids=[...a.selectedEntityIds]}),this.channel.on("entity:focus",({uuid:n})=>{k(n)}),this.channel.on("entity:transform",({uuid:n,position:o,rotation:s,quaternion:r,scale:v})=>{let l=this.host?.resolveEntity(n);if(!l)return;let H=b(l);if(Y(l,{position:o,rotation:s,quaternion:r,scale:v}),v&&X(l),G(l),this.applyingSceneOperation)return;let N=b(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:H,after:N}]})}),this.channel.on("entity:create",({typeId:n,props:o,pose:s})=>{this.host?.createEntity?.(n,o,s)}),this.channel.on("level:load",({buffer:n})=>{this.loadLevel(n)}),this.channel.on("level:sync",n=>{this.host?.levelSync?.(n)}),this.channel.on("level:play",({document:n})=>{this.host?.levelPlay?.(n)}),this.channel.on("level:close",()=>{this.host?.levelClose?.()}),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})=>{A(n,o??null)}),this.channel.on("snap:set",n=>{B(n)}),this.channel.on("grid:set",({visible:n})=>{D(n)}),this.channel.on("stage:variable:set",({key:n,value:o})=>{this.host?.setStageVariable?.(n,o)}),this.channel.on("pick:mode:set",({enabled:n})=>{E(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})}),se(this.channel,V),this.onEditorAttached(()=>{this.attachEditorCameras()}),this.onEditorDetached(()=>{this.detachEditorCameras()}),W(a,()=>this.publishDebugStateChanges())),this.publishDebugStateChanges(),this.editorIsAttached()&&this.attachEditorCameras(),j(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={},this.publishedPoses.clear(),this.detachEditorCameras()}publishSelectedPoses(){if(!this.host||!this.channel.hasSubscribers("entity:upsert")){this.publishedPoses.clear();return}let e=a.selectedEntityIds;for(let i of this.publishedPoses.keys())e.includes(i)||this.publishedPoses.delete(i);for(let i of e){let n=this.host.resolveEntity(i),o=M(n);if(!o)continue;let s=this.publishedPoses.get(i);s&&ne(s,o)||(this.publishedPoses.set(i,o),G(n,o))}}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&&y(o),n.entries.length>0&&!this.applyingSceneOperation&&this.channel.send("scene:operation",{opId:i,kind:"swatch",label:te(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||!ie(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()})}onEditorDetached(e){let i=this.channel;return typeof i.onSubscriberRemoved!="function"?()=>{}:i.onSubscriberRemoved(n=>{if(n!=="entity:upsert"&&n!=="entity:thumbnail")return;let o=n==="entity:upsert"?"entity:thumbnail":"entity:upsert";this.channel.subscriberCount(o)>0||e()})}editorIsAttached(){return this.channel.hasSubscribers("entity:upsert")||this.channel.hasSubscribers("entity:thumbnail")}attachEditorCameras(){u(!0),this.watchEditorDetached()}detachEditorCameras(){this.stopWatchingEditorDetached(),u(!1)}watchEditorDetached(){if(typeof this.channel.onSubscriberRemoved=="function"||this.editorCameraFrame)return;let i=()=>{if(!this.editorIsAttached()){this.editorCameraFrame=0,u(!1);return}this.editorCameraFrame=requestAnimationFrame(i)};this.editorCameraFrame=requestAnimationFrame(i)}stopWatchingEditorDetached(){this.editorCameraFrame&&(cancelAnimationFrame(this.editorCameraFrame),this.editorCameraFrame=0)}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)}async loadLevel(e){let{spawned:i}=await O(e,n=>{this.host?.createEntity?.(n.typeId,void 0,n.pose)});this.publishNotice("info",`Streamed ${i} level entries`)}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 Pe(t){p().channel.send("scene:operation",t)}export{re as a,le as b,ce as c,de as d,O as e,T as f,Q as g,b as h,M as i,X as j,Y as k,ee as l,Ee as m,U as n,Pe as o};
@@ -1 +0,0 @@
1
- import{proxy as c}from"valtio/vanilla";var a=["translate","rotate","scale"];function b(e){return a.includes(e)}var y={enabled:!0,translate:.25,rotate:Math.PI/12,scale:.1},t=c({enabled:!1,paused:!1,tool:"none",selectedEntityId:null,selectedEntityIds:[],hoveredEntityId:null,snap:{...y},gridVisible:!1,addTypeId:null,addTypeProps:null,pickMode:!1,flags:new Set}),l=null;function S(e){return l=e,()=>{l===e&&(l=null)}}function d(e){return!e||!l?null:l(e)}function s(e,n){if(e==null)return null;if(typeof e=="string")return e;let o=e.uuid;if(typeof o=="string")return console.warn(`${n}: received a live entity. Pass the UUID instead \u2014 storing entities in debugState makes valtio deep-proxy the scene graph.`),o;throw new TypeError(`${n} expects an entity UUID string or null, received ${typeof e}.`)}function v(){return t.paused}function T(e){t.paused=e}function m(){return t.tool}function h(e){t.tool=e}function D(){return t.enabled||t.tool!=="none"||t.pickMode}function k(e){t.pickMode=e,!e&&t.tool!=="select"&&t.tool!=="delete"&&x()}function P(){return t.pickMode}function R(){return t.selectedEntityId}function p(e){let n=s(e,"setSelectedEntityId");t.selectedEntityId!==n&&(t.selectedEntityId=n,t.selectedEntityIds=n?[n]:[])}function M(){return[...t.selectedEntityIds]}function u(e){let n=e.map((i,r)=>s(i,`setSelectedEntityIds[${r}]`)).filter(i=>i!==null);n.length===t.selectedEntityIds.length&&n.every((i,r)=>t.selectedEntityIds[r]===i)||(t.selectedEntityIds=n,t.selectedEntityId=n[0]??null)}function g(e){let n=t.selectedEntityIds,o=e.filter((i,r)=>!n.includes(i)&&e.indexOf(i)===r);o.length!==0&&u([...n,...o])}function f(e){let n=new Set(e);u(t.selectedEntityIds.filter(o=>!n.has(o)))}function w(e){let n=s(e,"toggleSelectedEntityId");n&&(t.selectedEntityIds.includes(n)?f([n]):g([n]))}function G(){return{...t.snap}}function O(e){Object.assign(t.snap,e)}function H(e){t.gridVisible=e}function A(e,n){t.addTypeId=e,t.addTypeProps=e?n??null:null}function U(){return t.hoveredEntityId}function E(e){let n=s(e,"setHoveredEntityId");t.hoveredEntityId!==n&&(t.hoveredEntityId=n)}function x(){E(null)}function F(){return d(t.selectedEntityId)}function N(){return d(t.hoveredEntityId)}function V(e){p(s(e,"setSelectedEntity"))}export{a,b,y as c,t as d,S as e,d as f,v as g,T as h,m as i,h as j,D as k,k as l,P as m,R as n,p as o,M as p,u as q,g as r,f as s,w as t,G as u,O as v,H as w,A as x,U as y,E as z,x as A,F as B,N as C,V as D};