incanto 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/2d.d.ts +14 -3
  2. package/dist/2d.js +3 -3
  3. package/dist/3d.d.ts +36 -3
  4. package/dist/3d.js +3 -3
  5. package/dist/{audio-player-DkBqRTs4.d.ts → audio-player-VSjk_vG8.d.ts} +1 -1
  6. package/dist/{behavior-CWhW3oa6.d.ts → behavior-e3kAmPGC.d.ts} +11 -0
  7. package/dist/{create-game-D8UvwXme.js → create-game-CEFoFN8d.js} +64 -9
  8. package/dist/{create-game-BFESHv1X.js → create-game-X5iRu6pf.js} +28 -8
  9. package/dist/debug.d.ts +3 -1
  10. package/dist/debug.js +56 -6
  11. package/dist/gameplay.d.ts +1 -1
  12. package/dist/index.d.ts +21 -4
  13. package/dist/index.js +3 -3
  14. package/dist/{loader-D2u0fVW2.d.ts → loader-y_X4zYO0.d.ts} +1 -1
  15. package/dist/net.d.ts +1 -1
  16. package/dist/{particle-sim-CFkILGwh.js → particle-sim-CrTE7c02.js} +36 -2
  17. package/dist/{physics-2d-KXn1N1jF.js → physics-2d-DmQ540uR.js} +1 -1
  18. package/dist/{physics-3d-C58oQzTX.js → physics-3d-CDjuhtt_.js} +1 -1
  19. package/dist/react.d.ts +1 -1
  20. package/dist/react.js +1 -1
  21. package/dist/{register-D71C4rDC.js → register-ClKnoILk.js} +37 -5
  22. package/dist/{register-DvPHJdVj.js → register-CscQqB7V.js} +54 -3
  23. package/dist/test.d.ts +2 -2
  24. package/dist/test.js +7 -7
  25. package/editor/assets/{agent8-DruKhR22.js → agent8-1WJU-yXr.js} +1 -1
  26. package/editor/assets/{index-D2qufqUo.js → index-DzYFgZbl.js} +81 -81
  27. package/editor/index.html +1 -1
  28. package/package.json +1 -1
  29. package/schemas/scene.schema.json +315 -0
  30. package/skills/incanto-behaviors-and-scripts.md +25 -0
  31. package/skills/incanto-building-2d-games.md +6 -0
  32. package/skills/incanto-building-3d-games.md +13 -0
  33. package/skills/incanto-node-reference.md +70 -0
  34. package/skills/incanto-scene-json-authoring.md +19 -0
package/dist/2d.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { s as JsonObject } from "./schema-CcoWb32N.js";
2
- import { C as RendererStats, S as GameStats, T as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-CWhW3oa6.js";
3
- import { t as LoadSceneOptions } from "./loader-D2u0fVW2.js";
2
+ import { C as RendererStats, S as GameStats, T as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-e3kAmPGC.js";
3
+ import { t as LoadSceneOptions } from "./loader-y_X4zYO0.js";
4
4
  import { t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
5
5
  import { Group, Mesh, Object3D, Scene, Texture } from "three";
6
6
  import * as RapierNs from "@dimforge/rapier2d-compat";
@@ -52,9 +52,15 @@ declare class Node2D extends Node {
52
52
  position: number[];
53
53
  /** Degrees, clockwise. */
54
54
  rotation: number;
55
+ /** Frozen after first sync — see Node3D.static (same semantics in 2D). */
56
+ static: boolean;
55
57
  scale: number[];
56
58
  /** Draw order among 2D drawables (higher = on top); matches 3D `renderOrder`. */
57
59
  renderOrder: number;
60
+ /** Named draw-order band; `renderOrder` is the fine offset inside it. */
61
+ orderGroup: string;
62
+ /** What three actually sorts by: band base + renderOrder. */
63
+ get effectiveRenderOrder(): number;
58
64
  visible: boolean;
59
65
  private _object2D;
60
66
  /** @internal The backing three object (lazily created). */
@@ -505,6 +511,7 @@ declare class Label extends Node2D {
505
511
  * Simulation is deterministic under the engine seed.
506
512
  */
507
513
  declare class Particles2D extends Node2D {
514
+ override orderGroup: string;
508
515
  static override readonly typeName: string;
509
516
  static override readonly signals: readonly string[];
510
517
  static override readonly props: PropSchema;
@@ -636,6 +643,8 @@ declare class Renderer2D {
636
643
  private readonly webgl;
637
644
  private readonly worldScene;
638
645
  private readonly syncScratch;
646
+ /** Editors set this: keep syncing `static: true` subtrees every frame. */
647
+ ignoreStatic: boolean;
639
648
  private readonly uiScene;
640
649
  private readonly worldCam;
641
650
  private readonly uiCam;
@@ -705,6 +714,8 @@ interface Sync2DScratch {
705
714
  visited: Set<Object3D>;
706
715
  cameras: Camera2D[];
707
716
  }
708
- declare function syncTree2D(root: Node, world: Scene, ui: Scene, assets: AssetStore2D | null, uiSize?: UiSize, scratch?: Sync2DScratch): Sync2DResult;
717
+ declare function syncTree2D(root: Node, world: Scene, ui: Scene, assets: AssetStore2D | null, uiSize?: UiSize, scratch?: Sync2DScratch, opts?: {
718
+ ignoreStatic?: boolean;
719
+ }): Sync2DResult;
709
720
  //#endregion
710
721
  export { AnimatedSprite2D, type AnimationDef, Area2D, type AssetStatus, AssetStore2D, Camera2D, CharacterBody2D, CharacterController2D, ColorRect2D, type CreateGame2DOptions, type Game2D, Joint2D, type JointType2D, Label, Node2D, Particles2D, Physics2D, type Physics2DOptions, PhysicsBody2D, Renderer2D, type Renderer2DOptions, type ResolvedSpriteTexture, RigidBody2D, type SheetInfo, Sprite2D, type SpriteFromLibraryResult, StaticBody2D, type Sync2DResult, type TextureLoadCallbacks, type UIAnchor, UILayer, createGame2D, enablePhysics2D, registerNodes2D, spriteFromLibraryMeta, syncTree2D };
package/dist/2d.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
2
- import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-BFESHv1X.js";
3
- import { a as ColorRect2D, c as AnimatedSprite2D, d as Area2D, f as CharacterBody2D, g as Node2D, h as StaticBody2D, i as Label, l as Sprite2D, m as RigidBody2D, n as UILayer, o as CharacterController2D, p as PhysicsBody2D, r as Particles2D, s as Camera2D, t as registerNodes2D, u as Joint2D } from "./register-D71C4rDC.js";
4
- import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-KXn1N1jF.js";
2
+ import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-X5iRu6pf.js";
3
+ import { a as ColorRect2D, c as AnimatedSprite2D, d as Area2D, f as CharacterBody2D, g as Node2D, h as StaticBody2D, i as Label, l as Sprite2D, m as RigidBody2D, n as UILayer, o as CharacterController2D, p as PhysicsBody2D, r as Particles2D, s as Camera2D, t as registerNodes2D, u as Joint2D } from "./register-ClKnoILk.js";
4
+ import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-DmQ540uR.js";
5
5
  //#region src/2d/library-sprite.ts
6
6
  /**
7
7
  * Turn a library sprite-animation JSON into a scene-ready spritesheet asset
package/dist/3d.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { s as JsonObject } from "./schema-CcoWb32N.js";
2
- import { C as RendererStats, S as GameStats, T as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-CWhW3oa6.js";
3
- import { t as LoadSceneOptions } from "./loader-D2u0fVW2.js";
2
+ import { C as RendererStats, S as GameStats, T as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-e3kAmPGC.js";
3
+ import { t as LoadSceneOptions } from "./loader-y_X4zYO0.js";
4
4
  import { t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
5
- import { r as SpatialPose } from "./audio-player-DkBqRTs4.js";
5
+ import { r as SpatialPose } from "./audio-player-VSjk_vG8.js";
6
6
  import { AnimationClip, BufferGeometry, Color, DirectionalLight, InstancedMesh, MeshPhysicalMaterial, Object3D, PerspectiveCamera, Scene, Vector3, WebGLRenderer } from "three";
7
7
  import { VRM } from "@pixiv/three-vrm";
8
8
  import { Sky } from "three/examples/jsm/objects/Sky.js";
@@ -137,12 +137,25 @@ declare class Node3D extends Node {
137
137
  position: number[];
138
138
  /** Euler XYZ in degrees. */
139
139
  rotation: number[];
140
+ /**
141
+ * This subtree never changes after load: the renderer syncs it ONCE and
142
+ * skips it every frame after (transforms, materials, animations frozen).
143
+ * The per-frame walk is O(nodes) — marking terrain/buildings/decor static
144
+ * removes most of a big scene from it. Set `static = false` to resume
145
+ * live syncing. Do NOT mark animated nodes (Water3D, Particles3D,
146
+ * AnimatedSprite3D, ModelInstance3D with clips) or cameras static.
147
+ */
148
+ static: boolean;
140
149
  scale: number[];
141
150
  visible: boolean;
142
151
  /** Draw-order priority (higher = drawn later / on top). Only affects TRANSPARENT
143
152
  * materials — three sorts the transparent pass by renderOrder, then depth.
144
153
  * Pairs with named scene constants (e.g. `{"@const": "UI"}`) for sorting tiers. */
145
154
  renderOrder: number;
155
+ /** Named draw-order band; `renderOrder` is the fine offset inside it. */
156
+ orderGroup: string;
157
+ /** What three actually sorts by: band base + renderOrder. */
158
+ get effectiveRenderOrder(): number;
146
159
  private _object3D;
147
160
  /**
148
161
  * @internal Fixed-step render interpolation. A physics body fills these with
@@ -412,6 +425,14 @@ interface ShadowsEnvironment {
412
425
  mapSize: 1024 | 2048;
413
426
  /** Shadow edge softening radius (PCF blur, default 1). */
414
427
  radius: number;
428
+ /**
429
+ * `true` = shadow casters never move or animate: the shadow pass renders
430
+ * ONCE (and again on scene/environment change) instead of every frame —
431
+ * measured ~42% of a dense-forest frame. Characters under a static-shadow
432
+ * scene should use blob/sprite shadows. `Renderer3D.refreshShadows()`
433
+ * forces a re-render after a one-off world edit.
434
+ */
435
+ static: boolean;
415
436
  }
416
437
  interface CloudsEnvironment {
417
438
  /** How much of the sky is cloudy, 0..1. */
@@ -1274,6 +1295,7 @@ declare class ModelInstance3D extends Node3D {
1274
1295
  * tilts emission out of the plane too).
1275
1296
  */
1276
1297
  declare class Particles3D extends Node3D {
1298
+ override orderGroup: string;
1277
1299
  static override readonly typeName: string;
1278
1300
  static override readonly signals: readonly string[];
1279
1301
  static override readonly props: PropSchema;
@@ -1469,6 +1491,7 @@ declare function terrainThemeLayers(theme: TerrainTheme, textureBase: string): T
1469
1491
  * real numbers off `heightAt`.
1470
1492
  */
1471
1493
  declare class Terrain3D extends Node3D {
1494
+ override orderGroup: string;
1472
1495
  static override readonly typeName: string;
1473
1496
  static override readonly props: PropSchema;
1474
1497
  /** [width, depth] extent in meters, centered on the node. */
@@ -1914,6 +1937,8 @@ declare class Renderer3D {
1914
1937
  private compiledScene;
1915
1938
  /** Reused per-frame walk scratch (instance-scoped — never a module global). */
1916
1939
  private readonly syncScratch;
1940
+ /** Editors set this: keep syncing `static: true` subtrees every frame. */
1941
+ ignoreStatic: boolean;
1917
1942
  /** Reused render-hook context — gl/scene are stable, camera reassigned/frame. */
1918
1943
  private renderCtx;
1919
1944
  /** Underwater caustics pass (lazy — only created the first time submerged). */
@@ -2000,6 +2025,11 @@ declare class Renderer3D {
2000
2025
  up: Vector3;
2001
2026
  forward: Vector3;
2002
2027
  };
2028
+ /**
2029
+ * Re-render the shadow pass once (static-shadow scenes,
2030
+ * `environment.shadows.static: true`) after a one-off world edit.
2031
+ */
2032
+ refreshShadows(): void;
2003
2033
  dispose(): void;
2004
2034
  }
2005
2035
  //#endregion
@@ -2043,6 +2073,8 @@ interface SyncScratch {
2043
2073
  }
2044
2074
  interface SyncOptions {
2045
2075
  assets?: AssetStore3D;
2076
+ /** Sync `static: true` subtrees every frame anyway (the editor's edit mode). */
2077
+ ignoreStatic?: boolean;
2046
2078
  /**
2047
2079
  * The environment sky's unit sun direction. Pushed to every
2048
2080
  * `_applySunDirection` node (Water3D, Foliage3D) right after its own sync —
@@ -2079,6 +2111,7 @@ interface WalkState {
2079
2111
  sunDirection: readonly [number, number, number] | null;
2080
2112
  sunLight: DirectionalLight3D | null;
2081
2113
  alpha: number;
2114
+ ignoreStatic: boolean;
2082
2115
  }
2083
2116
  //#endregion
2084
2117
  export { Area3D, AssetStore3D, Billboard3D, type BillboardGroupMode, Camera3D, CharacterBody3D, CharacterController3D, type CreateGame3DOptions, DEFAULT_TERRAIN_TEXTURE_BASE, DirectionalLight3D, Environment3D, type Environment3DConfig, DENSITY_PRESETS as FLOWER_DENSITY_PRESETS, FLOWER_VARIETIES, type FlowerVariety, Flowers3D, type FogEnvironment, Foliage3D, type FoliageKind, type FoliageStyle, type Game3D, type Heightmap, type HeightmapOptions, Joint3D, type JointType3D, LoftMesh3D, type LoftSection, MeshInstance3D, type MeshKind, type MeshMaterialProps, type ModelEntry, ModelInstance3D, Node3D, OmniLight3D, Particles3D, Physics3D, type Physics3DOptions, PhysicsBody3D, QUARTER_PITCH, type RenderContext3D, type RenderHook3D, Renderer3D, type Renderer3DOptions, type RigView, RigidBody3D, type Ripple, type ShadowsEnvironment, type SkyEnvironment, StaticBody3D, type SunConsumer3D, type SyncOptions, type SyncResult, TERRAIN_THEMES, Terrain3D, type TerrainLayer, type TerrainTheme, Tree3D, type TreeTier, type TreeType, VOXEL_PALETTE, type VoxelBlock, VoxelGrid3D, WATER_MAX_RIPPLES, Water3D, buildHeightmap, cameraRelative, createGame3D, enablePhysics3D, horizonColorFromSky, keyboardIntensity, movementState, parseEnvironment3D, registerNodes3D, resolveFlowerDensity, rigPose, splatWeights, sunDirectionFromElevationAzimuth, sunDirectionFromSky, syncTree, terrainThemeLayers };
package/dist/3d.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as Environment3D, c as sunDirectionFromElevationAzimuth, i as syncTree, l as sunDirectionFromSky, o as horizonColorFromSky, r as Renderer3D, s as parseEnvironment3D, t as createGame3D, u as AssetStore3D } from "./create-game-D8UvwXme.js";
2
- import { A as StaticBody3D, C as TERRAIN_THEMES, D as CharacterBody3D, E as Area3D, F as keyboardIntensity, I as movementState, L as rigPose, N as QUARTER_PITCH, O as PhysicsBody3D, P as cameraRelative, S as DEFAULT_TERRAIN_TEXTURE_BASE, T as Joint3D, _ as FLOWER_VARIETIES, a as VoxelGrid3D, b as Billboard3D, c as ModelInstance3D, d as DirectionalLight3D, f as OmniLight3D, g as resolveFlowerDensity, h as Flowers3D, i as VOXEL_PALETTE, j as Node3D, k as RigidBody3D, l as LoftMesh3D, m as DENSITY_PRESETS, n as Water3D, o as Tree3D, p as Foliage3D, r as WATER_MAX_RIPPLES, s as Particles3D, t as registerNodes3D, u as MeshInstance3D, v as CharacterController3D, w as terrainThemeLayers, x as Terrain3D, y as Camera3D } from "./register-DvPHJdVj.js";
1
+ import { a as Environment3D, c as sunDirectionFromElevationAzimuth, i as syncTree, l as sunDirectionFromSky, o as horizonColorFromSky, r as Renderer3D, s as parseEnvironment3D, t as createGame3D, u as AssetStore3D } from "./create-game-CEFoFN8d.js";
2
+ import { A as StaticBody3D, C as TERRAIN_THEMES, D as CharacterBody3D, E as Area3D, F as keyboardIntensity, I as movementState, L as rigPose, N as QUARTER_PITCH, O as PhysicsBody3D, P as cameraRelative, S as DEFAULT_TERRAIN_TEXTURE_BASE, T as Joint3D, _ as FLOWER_VARIETIES, a as VoxelGrid3D, b as Billboard3D, c as ModelInstance3D, d as DirectionalLight3D, f as OmniLight3D, g as resolveFlowerDensity, h as Flowers3D, i as VOXEL_PALETTE, j as Node3D, k as RigidBody3D, l as LoftMesh3D, m as DENSITY_PRESETS, n as Water3D, o as Tree3D, p as Foliage3D, r as WATER_MAX_RIPPLES, s as Particles3D, t as registerNodes3D, u as MeshInstance3D, v as CharacterController3D, w as terrainThemeLayers, x as Terrain3D, y as Camera3D } from "./register-CscQqB7V.js";
3
3
  import { n as splatWeights, t as buildHeightmap } from "./heightmap-CroQPEER.js";
4
- import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-C58oQzTX.js";
4
+ import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-CDjuhtt_.js";
5
5
  export { Area3D, AssetStore3D, Billboard3D, Camera3D, CharacterBody3D, CharacterController3D, DEFAULT_TERRAIN_TEXTURE_BASE, DirectionalLight3D, Environment3D, DENSITY_PRESETS as FLOWER_DENSITY_PRESETS, FLOWER_VARIETIES, Flowers3D, Foliage3D, Joint3D, LoftMesh3D, MeshInstance3D, ModelInstance3D, Node3D, OmniLight3D, Particles3D, Physics3D, PhysicsBody3D, QUARTER_PITCH, Renderer3D, RigidBody3D, StaticBody3D, TERRAIN_THEMES, Terrain3D, Tree3D, VOXEL_PALETTE, VoxelGrid3D, WATER_MAX_RIPPLES, Water3D, buildHeightmap, cameraRelative, createGame3D, enablePhysics3D, horizonColorFromSky, keyboardIntensity, movementState, parseEnvironment3D, registerNodes3D, resolveFlowerDensity, rigPose, splatWeights, sunDirectionFromElevationAzimuth, sunDirectionFromSky, syncTree, terrainThemeLayers };
@@ -1,4 +1,4 @@
1
- import { F as Listener, T as Node, l as PropSchema } from "./behavior-CWhW3oa6.js";
1
+ import { F as Listener, T as Node, l as PropSchema } from "./behavior-e3kAmPGC.js";
2
2
 
3
3
  //#region src/core/nodes/audio-player.d.ts
4
4
  /**
@@ -773,6 +773,17 @@ declare class Engine {
773
773
  * timers, behaviors all breathe together. See `gameplay` `hitStop()`.
774
774
  */
775
775
  timeScale: number;
776
+ private _time;
777
+ private _unscaledTime;
778
+ /**
779
+ * Elapsed GAME time in seconds since the scene started — the sum of every
780
+ * scaled dt (freezes at timeScale 0, crawls in slow motion). Unity's
781
+ * `Time.time`. Resets on `setScene`.
782
+ */
783
+ get time(): number;
784
+ /** Elapsed REAL time in seconds since the scene started (ignores timeScale) —
785
+ * UI animations that must keep moving during slow-mo/pause read this. */
786
+ get unscaledTime(): number;
776
787
  constructor(opts?: EngineOptions);
777
788
  get scene(): Scene | null;
778
789
  /** Replace the active scene. The previous scene's root is freed. */
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { _ as registerBehavior, n as loadScene } from "./loader-B4OEXDZ8.js";
3
- import { a as Engine } from "./particle-sim-CFkILGwh.js";
3
+ import { s as Engine } from "./particle-sim-CrTE7c02.js";
4
4
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
5
5
  import { s as AudioPlayer } from "./register-Dl_ixIJe.js";
6
6
  import { i as resolveRendering, n as attachTouchControls } from "./touch-031PxtCR.js";
7
7
  import { n as registerGameplayBehaviors } from "./gameplay-CDFgSG6z.js";
8
8
  import { t as debugSources } from "./debug-draw-CZmOYjL2.js";
9
- import { O as PhysicsBody3D, c as ModelInstance3D, d as DirectionalLight3D, j as Node3D, t as registerNodes3D, y as Camera3D } from "./register-DvPHJdVj.js";
10
- import { n as enablePhysics3D } from "./physics-3d-C58oQzTX.js";
9
+ import { O as PhysicsBody3D, c as ModelInstance3D, d as DirectionalLight3D, j as Node3D, t as registerNodes3D, y as Camera3D } from "./register-CscQqB7V.js";
10
+ import { n as enablePhysics3D } from "./physics-3d-CDjuhtt_.js";
11
11
  import { ACESFilmicToneMapping, AmbientLight, BufferAttribute, BufferGeometry, Color, DepthTexture, EquirectangularReflectionMapping, FloatType, Fog, HalfFloatType, LineBasicMaterial, LineSegments, Matrix4, Mesh, PCFShadowMap, PMREMGenerator, PerspectiveCamera, PlaneGeometry, Quaternion, Raycaster, Scene, ShaderMaterial, Vector2, Vector3, WebGLRenderTarget, WebGLRenderer } from "three";
12
12
  import { VRMLoaderPlugin, VRMUtils } from "@pixiv/three-vrm";
13
13
  import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
@@ -563,7 +563,11 @@ const CLOUD_KEYS = [
563
563
  "scale"
564
564
  ];
565
565
  const BLOOM_KEYS = ["threshold", "strength"];
566
- const SHADOW_KEYS = ["mapSize", "radius"];
566
+ const SHADOW_KEYS = [
567
+ "mapSize",
568
+ "radius",
569
+ "static"
570
+ ];
567
571
  const SHADOW_MAP_SIZES = [1024, 2048];
568
572
  const DEFAULT_TURBIDITY = 2;
569
573
  const DEFAULT_RAYLEIGH = 1;
@@ -756,7 +760,8 @@ function parseShadows(value) {
756
760
  if (value === false) return false;
757
761
  if (value === true) return {
758
762
  mapSize: 2048,
759
- radius: 1
763
+ radius: 1,
764
+ static: false
760
765
  };
761
766
  if (typeof value !== "object" || value === null || Array.isArray(value)) throw new IncantoError("BAD_FORMAT", `environment.shadows must be true, false or an object ({ mapSize?, radius? }), got ${JSON.stringify(value)}.`, { prop: "shadows" });
762
767
  const shadows = value;
@@ -771,9 +776,12 @@ function parseShadows(value) {
771
776
  });
772
777
  const radius = numberOr(shadows.radius, 1, "shadows.radius");
773
778
  if (radius < 0) throw new IncantoError("BAD_FORMAT", `environment.shadows.radius must be >= 0, got ${radius}.`, { prop: "shadows" });
779
+ const staticShadows = shadows.static === void 0 ? false : shadows.static;
780
+ if (typeof staticShadows !== "boolean") throw new IncantoError("BAD_FORMAT", `environment.shadows.static must be a boolean, got ${JSON.stringify(shadows.static)}.`, { prop: "shadows" });
774
781
  return {
775
782
  mapSize,
776
- radius
783
+ radius,
784
+ static: staticShadows
777
785
  };
778
786
  }
779
787
  function numberOr(value, fallback, at) {
@@ -887,6 +895,12 @@ var Environment3D = class {
887
895
  if (gl) {
888
896
  gl.toneMappingExposure = cfg.exposure;
889
897
  gl.shadowMap.enabled = cfg.shadows !== false;
898
+ if (cfg.shadows !== false && cfg.shadows !== null && cfg.shadows.static) {
899
+ if (gl.shadowMap.autoUpdate) {
900
+ gl.shadowMap.autoUpdate = false;
901
+ gl.shadowMap.needsUpdate = true;
902
+ }
903
+ } else if (!gl.shadowMap.autoUpdate) gl.shadowMap.autoUpdate = true;
890
904
  }
891
905
  this.applyHdri(env);
892
906
  this.applySky(cfg.sky, gl);
@@ -1081,7 +1095,8 @@ function createSyncScratch() {
1081
1095
  assets: void 0,
1082
1096
  sunDirection: null,
1083
1097
  sunLight: null,
1084
- alpha: 1
1098
+ alpha: 1,
1099
+ ignoreStatic: false
1085
1100
  }
1086
1101
  };
1087
1102
  }
@@ -1105,6 +1120,7 @@ function syncTree(root, threeScene, assets, opts, scratch) {
1105
1120
  const state = s.state;
1106
1121
  state.assets = assets;
1107
1122
  state.sunDirection = opts?.sunDirection ?? null;
1123
+ state.ignoreStatic = opts?.ignoreStatic === true;
1108
1124
  state.sunLight = null;
1109
1125
  state.alpha = opts?.alpha ?? 1;
1110
1126
  walk(root, threeScene, state);
@@ -1176,6 +1192,11 @@ function walk(node, parentObj, state) {
1176
1192
  let nextParent = parentObj;
1177
1193
  if (node instanceof Node3D) {
1178
1194
  const obj = node._ensureObject3D();
1195
+ if (node.static && !state.ignoreStatic && obj.userData.incantoStaticSynced === true) {
1196
+ obj.userData.incantoStatic = true;
1197
+ state.visited.add(obj);
1198
+ return;
1199
+ }
1179
1200
  if (obj.parent !== parentObj) parentObj.add(obj);
1180
1201
  node._syncObject3D(state.alpha);
1181
1202
  if (state.assets && node instanceof ModelInstance3D) node._syncModel(state.assets);
@@ -1195,13 +1216,37 @@ function walk(node, parentObj, state) {
1195
1216
  parent: nextParent
1196
1217
  });
1197
1218
  for (const child of node.children) walk(child, nextParent, state);
1219
+ if (node instanceof Node3D) {
1220
+ const obj = node._ensureObject3D();
1221
+ if (node.static && !state.ignoreStatic) {
1222
+ obj.userData.incantoStaticSynced = true;
1223
+ obj.userData.incantoStatic = true;
1224
+ warnStaticHazards(node);
1225
+ } else if (obj.userData.incantoStaticSynced === true) {
1226
+ obj.userData.incantoStaticSynced = false;
1227
+ obj.userData.incantoStatic = false;
1228
+ }
1229
+ }
1230
+ }
1231
+ const warnedStatic = /* @__PURE__ */ new WeakSet();
1232
+ /** One-time warning when animated machinery is frozen under a static root. */
1233
+ function warnStaticHazards(root) {
1234
+ if (warnedStatic.has(root)) return;
1235
+ warnedStatic.add(root);
1236
+ const hazards = [];
1237
+ const scan = (n) => {
1238
+ if (typeof n._onRender3D === "function" || n instanceof Camera3D) hazards.push(`${n.name} (${n.constructor.typeName ?? "?"})`);
1239
+ for (const c of n.children) scan(c);
1240
+ };
1241
+ scan(root);
1242
+ if (hazards.length > 0) console.warn(`[incanto] static subtree '${root.name}' freezes animated/per-frame nodes: ${hazards.join(", ")} — they will stop updating. Unmark static or move them out.`);
1198
1243
  }
1199
1244
  function prune(obj, visited) {
1200
1245
  const ch = obj.children;
1201
1246
  for (let i = ch.length - 1; i >= 0; i--) {
1202
1247
  const child = ch[i];
1203
1248
  if (child.userData.incantoNode && !visited.has(child)) obj.remove(child);
1204
- else prune(child, visited);
1249
+ else if (child.userData.incantoStatic !== true) prune(child, visited);
1205
1250
  }
1206
1251
  }
1207
1252
  //#endregion
@@ -1348,6 +1393,8 @@ var Renderer3D = class {
1348
1393
  compiledScene = null;
1349
1394
  /** Reused per-frame walk scratch (instance-scoped — never a module global). */
1350
1395
  syncScratch = createSyncScratch();
1396
+ /** Editors set this: keep syncing `static: true` subtrees every frame. */
1397
+ ignoreStatic = false;
1351
1398
  /** Reused render-hook context — gl/scene are stable, camera reassigned/frame. */
1352
1399
  renderCtx = null;
1353
1400
  /** Underwater caustics pass (lazy — only created the first time submerged). */
@@ -1425,7 +1472,8 @@ var Renderer3D = class {
1425
1472
  this.environment.apply(scene.environment, this.webgl);
1426
1473
  const { activeCamera: sceneCamera, renderHooks, sunLight } = syncTree(scene.root, this.threeScene, this.assets, {
1427
1474
  sunDirection: this.environment.sunDirection,
1428
- alpha: this.engine.interpolationAlpha
1475
+ alpha: this.engine.interpolationAlpha,
1476
+ ignoreStatic: this.ignoreStatic
1429
1477
  }, this.syncScratch);
1430
1478
  let activeCamera = sceneCamera;
1431
1479
  if (this.viewOverride) {
@@ -1763,6 +1811,13 @@ var Renderer3D = class {
1763
1811
  forward: new Vector3(0, 0, -1).applyQuaternion(q)
1764
1812
  };
1765
1813
  }
1814
+ /**
1815
+ * Re-render the shadow pass once (static-shadow scenes,
1816
+ * `environment.shadows.static: true`) after a one-off world edit.
1817
+ */
1818
+ refreshShadows() {
1819
+ this.webgl.shadowMap.needsUpdate = true;
1820
+ }
1766
1821
  dispose() {
1767
1822
  this.disconnect();
1768
1823
  this.threeScene.traverse((obj) => {
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { _ as registerBehavior, n as loadScene, o as computeViewport, s as resolveViewport } from "./loader-B4OEXDZ8.js";
3
- import { a as Engine } from "./particle-sim-CFkILGwh.js";
3
+ import { s as Engine } from "./particle-sim-CrTE7c02.js";
4
4
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
5
5
  import { s as AudioPlayer } from "./register-Dl_ixIJe.js";
6
6
  import { i as resolveRendering, n as attachTouchControls } from "./touch-031PxtCR.js";
7
7
  import { n as registerGameplayBehaviors } from "./gameplay-CDFgSG6z.js";
8
- import { g as Node2D, n as UILayer, p as PhysicsBody2D, s as Camera2D, t as registerNodes2D } from "./register-D71C4rDC.js";
8
+ import { g as Node2D, n as UILayer, p as PhysicsBody2D, s as Camera2D, t as registerNodes2D } from "./register-ClKnoILk.js";
9
9
  import { t as debugSources } from "./debug-draw-CZmOYjL2.js";
10
- import { n as enablePhysics2D } from "./physics-2d-KXn1N1jF.js";
10
+ import { n as enablePhysics2D } from "./physics-2d-DmQ540uR.js";
11
11
  import { Box3, BufferAttribute, BufferGeometry, Color, LineBasicMaterial, LineSegments, LinearFilter, NearestFilter, OrthographicCamera, Raycaster, SRGBColorSpace, Scene, TextureLoader, Vector2, Vector3, WebGLRenderer } from "three";
12
12
  //#region src/2d/assets.ts
13
13
  /**
@@ -108,11 +108,11 @@ function createSync2DScratch() {
108
108
  cameras: []
109
109
  };
110
110
  }
111
- function syncTree2D(root, world, ui, assets, uiSize, scratch) {
111
+ function syncTree2D(root, world, ui, assets, uiSize, scratch, opts) {
112
112
  const s = scratch ?? createSync2DScratch();
113
113
  s.visited.clear();
114
114
  s.cameras.length = 0;
115
- walk(root, world, ui, false, s.visited, s.cameras, assets, uiSize);
115
+ walk(root, world, ui, false, s.visited, s.cameras, assets, uiSize, opts?.ignoreStatic === true);
116
116
  prune(world, s.visited);
117
117
  prune(ui, s.visited);
118
118
  let current = null;
@@ -126,9 +126,17 @@ function syncTree2D(root, world, ui, assets, uiSize, scratch) {
126
126
  if (!current) current = s.cameras[0] ?? null;
127
127
  return { activeCamera: current };
128
128
  }
129
- function walk(node, parentObj, ui, inUi, visited, cameras, assets, uiSize) {
129
+ function walk(node, parentObj, ui, inUi, visited, cameras, assets, uiSize, ignoreStatic) {
130
130
  let nextParent = parentObj;
131
131
  let nextInUi = inUi;
132
+ if (node instanceof Node2D && !(node instanceof UILayer)) {
133
+ const frozen = node._ensureObject2D();
134
+ if (node.static && !ignoreStatic && frozen.userData.incantoStaticSynced === true) {
135
+ frozen.userData.incantoStatic = true;
136
+ visited.add(frozen);
137
+ return;
138
+ }
139
+ }
132
140
  if (node instanceof UILayer) {
133
141
  const group = node._ensureGroup();
134
142
  if (group.parent !== ui) ui.add(group);
@@ -148,14 +156,24 @@ function walk(node, parentObj, ui, inUi, visited, cameras, assets, uiSize) {
148
156
  if (node instanceof Camera2D && !inUi) cameras.push(node);
149
157
  nextParent = obj;
150
158
  }
151
- for (const child of node.children) walk(child, nextParent, ui, nextInUi, visited, cameras, assets, uiSize);
159
+ for (const child of node.children) walk(child, nextParent, ui, nextInUi, visited, cameras, assets, uiSize, ignoreStatic);
160
+ if (node instanceof Node2D && !(node instanceof UILayer)) {
161
+ const obj = node._ensureObject2D();
162
+ if (node.static && !ignoreStatic) {
163
+ obj.userData.incantoStaticSynced = true;
164
+ obj.userData.incantoStatic = true;
165
+ } else if (obj.userData.incantoStaticSynced === true) {
166
+ obj.userData.incantoStaticSynced = false;
167
+ obj.userData.incantoStatic = false;
168
+ }
169
+ }
152
170
  }
153
171
  function prune(obj, visited) {
154
172
  const ch = obj.children;
155
173
  for (let i = ch.length - 1; i >= 0; i--) {
156
174
  const child = ch[i];
157
175
  if (child.userData.incantoNode && !visited.has(child)) obj.remove(child);
158
- else prune(child, visited);
176
+ else if (child.userData.incantoStatic !== true) prune(child, visited);
159
177
  }
160
178
  }
161
179
  //#endregion
@@ -175,6 +193,8 @@ var Renderer2D = class {
175
193
  webgl;
176
194
  worldScene = new Scene();
177
195
  syncScratch = createSync2DScratch();
196
+ /** Editors set this: keep syncing `static: true` subtrees every frame. */
197
+ ignoreStatic = false;
178
198
  uiScene = new Scene();
179
199
  worldCam = new OrthographicCamera(-1, 1, 1, -1, -1e3, 1e3);
180
200
  uiCam = new OrthographicCamera(-1, 1, 1, -1, -1e3, 1e3);
package/dist/debug.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as RendererStats, k as LogLevel, v as Engine } from "./behavior-CWhW3oa6.js";
1
+ import { C as RendererStats, k as LogLevel, v as Engine } from "./behavior-e3kAmPGC.js";
2
2
 
3
3
  //#region src/debug/panel.d.ts
4
4
  /** Minimal document surface the overlay needs (injectable for tests). */
@@ -32,6 +32,8 @@ declare class DebugOverlay {
32
32
  private readonly menuButton;
33
33
  private dropdown;
34
34
  private selected;
35
+ /** Explorer subtrees the user collapsed (nodes keep identity across frames). */
36
+ private readonly collapsedFlags;
35
37
  private statsChip;
36
38
  private readonly logRows;
37
39
  private readonly levelEnabled;
package/dist/debug.js CHANGED
@@ -178,6 +178,8 @@ var DebugOverlay = class {
178
178
  menuButton;
179
179
  dropdown = null;
180
180
  selected = null;
181
+ /** Explorer subtrees the user collapsed (nodes keep identity across frames). */
182
+ collapsedFlags = /* @__PURE__ */ new Map();
181
183
  statsChip = null;
182
184
  logRows = [];
183
185
  levelEnabled = {
@@ -418,26 +420,74 @@ var DebugOverlay = class {
418
420
  clear(panel.body);
419
421
  const root = this.engine.scene?.root;
420
422
  if (!root) return;
421
- const renderNode = (node, depth) => {
423
+ const renderNode = (node, container) => {
422
424
  const ctor = node.constructor;
425
+ const hasKids = node.children.length > 0;
426
+ const isCollapsed = this.collapsedFlags.get(node) === true;
423
427
  const row = this.doc.createElement("div");
424
- row.textContent = `${" ".repeat(depth)}${node.name} (${ctor.typeName})`;
425
428
  applyStyle(row, {
426
- whiteSpace: "pre",
429
+ display: "flex",
430
+ alignItems: "center",
427
431
  cursor: "pointer",
428
432
  padding: "1px 2px",
433
+ borderRadius: "3px",
429
434
  background: node === this.selected ? "rgba(110,160,255,0.25)" : "transparent"
430
435
  });
436
+ const chevron = this.doc.createElement("span");
437
+ chevron.textContent = hasKids ? isCollapsed ? "▸" : "▾" : "·";
438
+ applyStyle(chevron, {
439
+ width: "14px",
440
+ flex: "none",
441
+ textAlign: "center",
442
+ opacity: hasKids ? "0.85" : "0.25",
443
+ userSelect: "none"
444
+ });
445
+ if (hasKids) chevron.addEventListener("click", (e) => {
446
+ e.stopPropagation?.();
447
+ this.collapsedFlags.set(node, !isCollapsed);
448
+ this.renderExplorer();
449
+ });
450
+ row.appendChild(chevron);
451
+ const label = this.doc.createElement("span");
452
+ label.textContent = node.name;
453
+ applyStyle(label, { whiteSpace: "nowrap" });
454
+ row.appendChild(label);
455
+ const type = this.doc.createElement("span");
456
+ type.textContent = ` ${ctor.typeName}`;
457
+ applyStyle(type, {
458
+ opacity: "0.45",
459
+ whiteSpace: "nowrap",
460
+ fontSize: "10px"
461
+ });
462
+ row.appendChild(type);
463
+ if (hasKids && isCollapsed) {
464
+ const count = this.doc.createElement("span");
465
+ count.textContent = ` (${node.children.length})`;
466
+ applyStyle(count, {
467
+ opacity: "0.35",
468
+ fontSize: "10px"
469
+ });
470
+ row.appendChild(count);
471
+ }
431
472
  row.addEventListener("click", () => {
432
473
  this.selected = node;
433
474
  this.open("inspector");
434
475
  this.renderExplorer();
435
476
  this.renderInspector();
436
477
  });
437
- panel.body.appendChild(row);
438
- for (const child of node.children) renderNode(child, depth + 1);
478
+ container.appendChild(row);
479
+ if (hasKids && !isCollapsed) {
480
+ const kids = this.doc.createElement("div");
481
+ applyStyle(kids, {
482
+ marginLeft: "8px",
483
+ paddingLeft: "8px",
484
+ borderLeft: "1px solid rgba(255,255,255,0.14)"
485
+ });
486
+ for (const child of node.children) renderNode(child, kids);
487
+ container.appendChild(kids);
488
+ }
439
489
  };
440
- renderNode(root, 0);
490
+ renderNode(root, panel.body);
441
491
  }
442
492
  renderInspector() {
443
493
  const panel = this.panels.get("inspector");
@@ -1,5 +1,5 @@
1
1
  import { c as JsonValue } from "./schema-CcoWb32N.js";
2
- import { T as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-CWhW3oa6.js";
2
+ import { T as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-e3kAmPGC.js";
3
3
 
4
4
  //#region src/gameplay/chase.d.ts
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as Rng, c as JsonValue, d as jsonKind, i as SceneJson, l as jsonClone, n as NodeJson, o as JsonKind, r as SCENE_FORMAT, s as JsonObject, t as ConnectionJson, u as jsonEquals } from "./schema-CcoWb32N.js";
2
- import { $ as BusName, A as LogManager, B as spatialGain, C as RendererStats, D as SceneTree, E as NodeLifecycle, F as Listener, G as SfxWave, H as SFX_PRESETS, I as ROLLOFF_MODELS, J as MusicBackend, K as SynthOptions, L as RolloffModel, M as SfxEngine, N as SfxPlayOptions, O as LogEntry, P as isAudioContextAvailable, Q as AudioBuses, R as SpatialParams, S as GameStats, T as Node, U as SFX_PRESET_NAMES, V as spatialPan, W as SfxParams, X as MusicTrack, Y as MusicManager, Z as PlayMusicOptions, _ as registeredTypes, a as registerBehavior, b as Scheduler, c as PropDef, d as createNode, et as Signal, f as getNodeSchema, g as registerNode, h as mergeStaticSignals, i as getBehavior, j as InputMap, k as LogLevel, l as PropSchema, m as getNodeType, n as BehaviorCtor, o as registeredBehaviors, p as getNodeSignals, q as synthSfx, r as clearBehaviors, s as NodeCtor, t as Behavior, tt as SignalListener, u as clearRegistry, v as Engine, w as Scene, x as EngineStats, y as EngineOptions, z as Vec3 } from "./behavior-CWhW3oa6.js";
3
- import { n as loadScene, t as LoadSceneOptions } from "./loader-D2u0fVW2.js";
2
+ import { $ as BusName, A as LogManager, B as spatialGain, C as RendererStats, D as SceneTree, E as NodeLifecycle, F as Listener, G as SfxWave, H as SFX_PRESETS, I as ROLLOFF_MODELS, J as MusicBackend, K as SynthOptions, L as RolloffModel, M as SfxEngine, N as SfxPlayOptions, O as LogEntry, P as isAudioContextAvailable, Q as AudioBuses, R as SpatialParams, S as GameStats, T as Node, U as SFX_PRESET_NAMES, V as spatialPan, W as SfxParams, X as MusicTrack, Y as MusicManager, Z as PlayMusicOptions, _ as registeredTypes, a as registerBehavior, b as Scheduler, c as PropDef, d as createNode, et as Signal, f as getNodeSchema, g as registerNode, h as mergeStaticSignals, i as getBehavior, j as InputMap, k as LogLevel, l as PropSchema, m as getNodeType, n as BehaviorCtor, o as registeredBehaviors, p as getNodeSignals, q as synthSfx, r as clearBehaviors, s as NodeCtor, t as Behavior, tt as SignalListener, u as clearRegistry, v as Engine, w as Scene, x as EngineStats, y as EngineOptions, z as Vec3 } from "./behavior-e3kAmPGC.js";
3
+ import { n as loadScene, t as LoadSceneOptions } from "./loader-y_X4zYO0.js";
4
4
  import { n as ParticleSimConfig, r as ParticleView, t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
5
- import { n as AudioPlayer, t as AudioElementLike } from "./audio-player-DkBqRTs4.js";
5
+ import { n as AudioPlayer, t as AudioElementLike } from "./audio-player-VSjk_vG8.js";
6
6
  import { n as IncantoErrorCode, r as IncantoErrorDetails, t as IncantoError } from "./errors-BMFaY68Q.js";
7
7
 
8
8
  //#region src/core/audio/crossfade.d.ts
@@ -218,6 +218,23 @@ declare class Timer extends Node {
218
218
  */
219
219
  declare function createNoise2D(seed: number): (x: number, y: number) => number;
220
220
  //#endregion
221
+ //#region src/core/order-groups.d.ts
222
+ /**
223
+ * Named draw-order bands — Unity's "sorting layers" for both dimensions.
224
+ * A node's effective render order is `base(orderGroup) + renderOrder`, so
225
+ * `renderOrder` stays a FINE offset within its band and whole categories
226
+ * layer correctly without magic numbers:
227
+ *
228
+ * background < terrain < default < characters < effects < overlay
229
+ *
230
+ * Engine type defaults: particles sit in `effects`, Terrain3D in `terrain`;
231
+ * everything else is `default` (base 0 — identical to pre-band behavior).
232
+ */
233
+ type OrderGroup = "background" | "terrain" | "default" | "characters" | "effects" | "overlay";
234
+ declare const ORDER_GROUP_BASE: Record<OrderGroup, number>;
235
+ /** base + fine offset (unknown group names fall back to `default`). */
236
+ declare function effectiveOrder(group: string, renderOrder: number): number;
237
+ //#endregion
221
238
  //#region src/core/particle-presets.d.ts
222
239
  /**
223
240
  * Predefined particle looks. A node's `preset` seeds these values UNDER its
@@ -436,4 +453,4 @@ declare function computeViewport(canvasW: number, canvasH: number, viewport: {
436
453
  /** Engine version. Kept in sync with package.json by the release pipeline. */
437
454
  declare const VERSION: string;
438
455
  //#endregion
439
- export { AudioBuses, type AudioElementLike, AudioPlayer, Behavior, type BehaviorCtor, type BusName, CONST_REF_KEY, type ComputedViewport, type ConnectionJson, type CrossfadeGains, type DebugLineSource, Engine, type EngineOptions, type EngineStats, type GameStats, type HudAnchor, HudLayer, IncantoError, type IncantoErrorCode, type IncantoErrorDetails, InputMap, type JsonKind, type JsonObject, type JsonValue, type Listener, type LoadSceneOptions, type LogEntry, type LogLevel, LogManager, type MusicBackend, MusicManager, type MusicTrack, Node, type NodeCtor, type NodeJson, type NodeLifecycle, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, type ParsedNodePath, type ParticlePresetValues, ParticleSim, type ParticleSimConfig, type ParticleView, type PlayMusicOptions, type PreloadResult, type PropDef, type PropSchema, ROLLOFF_MODELS, type RendererStats, type ResolvedRendering, type ResolvedViewport, Rng, type RolloffModel, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, type SaveStore, Scene, type SceneJson, SceneTree, type Scheduler, SfxEngine, type SfxParams, type SfxPlayOptions, type SfxWave, Signal, type SignalListener, type SpatialParams, type SynthOptions, Timer, TouchControls, type TouchControlsOptions, UiBanner, UiBar, UiText, VERSION, type Vec3, type ViewportFit, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, fadeGain, getBehavior, getNodeSchema, getNodeSignals, getNodeType, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, mergeStaticSignals, newUid, parseNodePath, preloadUrls, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, synthSfx };
456
+ export { AudioBuses, type AudioElementLike, AudioPlayer, Behavior, type BehaviorCtor, type BusName, CONST_REF_KEY, type ComputedViewport, type ConnectionJson, type CrossfadeGains, type DebugLineSource, Engine, type EngineOptions, type EngineStats, type GameStats, type HudAnchor, HudLayer, IncantoError, type IncantoErrorCode, type IncantoErrorDetails, InputMap, type JsonKind, type JsonObject, type JsonValue, type Listener, type LoadSceneOptions, type LogEntry, type LogLevel, LogManager, type MusicBackend, MusicManager, type MusicTrack, Node, type NodeCtor, type NodeJson, type NodeLifecycle, ORDER_GROUP_BASE, type OrderGroup, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, type ParsedNodePath, type ParticlePresetValues, ParticleSim, type ParticleSimConfig, type ParticleView, type PlayMusicOptions, type PreloadResult, type PropDef, type PropSchema, ROLLOFF_MODELS, type RendererStats, type ResolvedRendering, type ResolvedViewport, Rng, type RolloffModel, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, type SaveStore, Scene, type SceneJson, SceneTree, type Scheduler, SfxEngine, type SfxParams, type SfxPlayOptions, type SfxWave, Signal, type SignalListener, type SpatialParams, type SynthOptions, Timer, TouchControls, type TouchControlsOptions, UiBanner, UiBar, UiText, VERSION, type Vec3, type ViewportFit, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, getBehavior, getNodeSchema, getNodeSignals, getNodeType, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, mergeStaticSignals, newUid, parseNodePath, preloadUrls, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, synthSfx };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { _ as registerBehavior, a as SCENE_FORMAT, c as SceneTree, d as resolveConstants, f as Node, g as getBehavior, h as clearBehaviors, i as serializeNode, l as CONST_REF_KEY, m as Behavior, n as loadScene, o as computeViewport, p as parseNodePath, r as Scene, s as resolveViewport, u as isConstRef, v as registeredBehaviors, y as Signal } from "./loader-B4OEXDZ8.js";
2
- import { a as Engine, c as SfxEngine, d as WebAudioMusicBackend, f as crossfadeGains, i as applyParticlePreset, l as isAudioContextAvailable, m as AudioBuses, n as PARTICLE_PRESETS, o as LogManager, p as fadeGain, r as PARTICLE_PRESET_NAMES, s as InputMap, t as ParticleSim, u as MusicManager } from "./particle-sim-CFkILGwh.js";
2
+ import { a as ORDER_GROUP_BASE, c as LogManager, d as isAudioContextAvailable, f as MusicManager, g as AudioBuses, h as fadeGain, i as applyParticlePreset, l as InputMap, m as crossfadeGains, n as PARTICLE_PRESETS, o as effectiveOrder, p as WebAudioMusicBackend, r as PARTICLE_PRESET_NAMES, s as Engine, t as ParticleSim, u as SfxEngine } from "./particle-sim-CrTE7c02.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { t as Rng } from "./rng-DP-SR7eg.js";
5
5
  import { a as UiBar, c as ROLLOFF_MODELS, d as SFX_PRESETS, f as SFX_PRESET_NAMES, i as UiBanner, l as spatialGain, n as Timer, o as UiText, p as synthSfx, r as HudLayer, s as AudioPlayer, t as registerCoreNodes, u as spatialPan } from "./register-Dl_ixIJe.js";
@@ -110,6 +110,6 @@ function newUid() {
110
110
  //#endregion
111
111
  //#region src/index.ts
112
112
  /** Engine version. Kept in sync with package.json by the release pipeline. */
113
- const VERSION = "0.5.0";
113
+ const VERSION = "0.7.0";
114
114
  //#endregion
115
- export { AudioBuses, AudioPlayer, Behavior, CONST_REF_KEY, Engine, HudLayer, IncantoError, InputMap, LogManager, MusicManager, Node, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, ParticleSim, ROLLOFF_MODELS, Rng, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, Scene, SceneTree, SfxEngine, Signal, Timer, TouchControls, UiBanner, UiBar, UiText, VERSION, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, fadeGain, getBehavior, getNodeSchema, getNodeSignals, getNodeType, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, mergeStaticSignals, newUid, parseNodePath, preloadUrls, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, synthSfx };
115
+ export { AudioBuses, AudioPlayer, Behavior, CONST_REF_KEY, Engine, HudLayer, IncantoError, InputMap, LogManager, MusicManager, Node, ORDER_GROUP_BASE, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, ParticleSim, ROLLOFF_MODELS, Rng, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, Scene, SceneTree, SfxEngine, Signal, Timer, TouchControls, UiBanner, UiBar, UiText, VERSION, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, getBehavior, getNodeSchema, getNodeSignals, getNodeType, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, mergeStaticSignals, newUid, parseNodePath, preloadUrls, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, synthSfx };