incanto 0.12.0 → 0.13.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 (82) hide show
  1. package/README.md +22 -0
  2. package/bin/incanto-new.mjs +87 -0
  3. package/dist/2d.d.ts +2 -2
  4. package/dist/2d.js +3 -3
  5. package/dist/3d.d.ts +194 -71
  6. package/dist/3d.js +74 -4
  7. package/dist/{behavior-Bod1AyJS.d.ts → behavior-CPibUfnH.d.ts} +4 -2
  8. package/dist/{create-game-C_xf4gm9.js → create-game-Ct86zczq.js} +5 -5
  9. package/dist/{create-game-B2fewJUy.js → create-game-J6g4QInv.js} +5 -5
  10. package/dist/debug.d.ts +1 -1
  11. package/dist/{duplicate-BEvGBtb_.js → duplicate-BINwP0WG.js} +1 -1
  12. package/dist/{gameplay-Dn3yidJw.js → gameplay-sSqrUcnz.js} +75 -3
  13. package/dist/gameplay.d.ts +37 -2
  14. package/dist/gameplay.js +2 -2
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +4 -4
  17. package/dist/{loader-B4OEXDZ8.js → loader-BZqOKfI2.js} +3 -1
  18. package/dist/{loader-BcUDfNHn.d.ts → loader-DILt9PGC.d.ts} +1 -1
  19. package/dist/net.d.ts +1 -1
  20. package/dist/net.js +3 -3
  21. package/dist/{pathfinding-BSiXjd6W.d.ts → pathfinding-RWYkNKx9.d.ts} +1 -1
  22. package/dist/{physics-2d-B6D864oZ.js → physics-2d-BiIdl51r.js} +2 -2
  23. package/dist/{physics-3d-RLNaxRyw.js → physics-3d-DhaAaKJo.js} +2 -2
  24. package/dist/react.d.ts +1 -1
  25. package/dist/react.js +1 -1
  26. package/dist/{register-Cwc-yCYx.js → register-BFFE1Mh1.js} +2 -2
  27. package/dist/{register-ysLR3WQS.js → register-BFw4c83z.js} +508 -123
  28. package/dist/{register-BD6zgrv_.js → register-Djwckzgx.js} +2 -2
  29. package/dist/{register-DJZXxwAn.js → register-nObreUQR.js} +1 -1
  30. package/dist/test.d.ts +2 -2
  31. package/dist/test.js +10 -10
  32. package/editor/assets/{agent8-D_4QY8Aq.js → agent8-BF8Jfbkl.js} +1 -1
  33. package/editor/assets/{index-s0DZuroe.js → index-DSq0gdhE.js} +74 -74
  34. package/editor/index.html +1 -1
  35. package/package.json +4 -2
  36. package/schemas/scene.schema.json +263 -0
  37. package/skills/incanto-3d-character.md +35 -0
  38. package/skills/incanto-building-3d-games.md +48 -0
  39. package/skills/incanto-gameplay-behaviors.md +23 -1
  40. package/skills/incanto-node-reference.md +51 -0
  41. package/templates-app/beacon-isle-3d/PROJECT/Context.md +44 -0
  42. package/templates-app/beacon-isle-3d/PROJECT/Requirements.md +16 -0
  43. package/templates-app/beacon-isle-3d/PROJECT/Status.md +38 -0
  44. package/templates-app/beacon-isle-3d/PROJECT/Structure.md +24 -0
  45. package/templates-app/beacon-isle-3d/docs/project-3d-rules.md +38 -0
  46. package/templates-app/beacon-isle-3d/generate-world.ts +814 -0
  47. package/templates-app/beacon-isle-3d/index.html +68 -0
  48. package/templates-app/beacon-isle-3d/package.json +26 -0
  49. package/templates-app/beacon-isle-3d/src/behaviors.ts +570 -0
  50. package/templates-app/beacon-isle-3d/src/game.scene.json +2992 -0
  51. package/templates-app/beacon-isle-3d/src/main.ts +33 -0
  52. package/templates-app/beacon-isle-3d/tsconfig.json +13 -0
  53. package/templates-app/beacon-isle-3d/verify.ts +285 -0
  54. package/templates-app/beacon-isle-3d/vite.config.ts +5 -0
  55. package/templates-app/tps-3d/PROJECT/Context.md +49 -0
  56. package/templates-app/tps-3d/PROJECT/Requirements.md +38 -0
  57. package/templates-app/tps-3d/PROJECT/Status.md +41 -0
  58. package/templates-app/tps-3d/PROJECT/Structure.md +44 -0
  59. package/templates-app/tps-3d/docs/project-3d-rules.md +38 -0
  60. package/templates-app/tps-3d/index.html +244 -0
  61. package/templates-app/tps-3d/package.json +25 -0
  62. package/templates-app/tps-3d/src/behaviors.ts +405 -0
  63. package/templates-app/tps-3d/src/game.scene.json +677 -0
  64. package/templates-app/tps-3d/src/main.ts +64 -0
  65. package/templates-app/tps-3d/tsconfig.json +13 -0
  66. package/templates-app/tps-3d/verify.ts +167 -0
  67. package/templates-app/tps-3d/vite.config.ts +5 -0
  68. package/templates-app/village-quest-3d/PROJECT/Context.md +39 -0
  69. package/templates-app/village-quest-3d/PROJECT/Requirements.md +36 -0
  70. package/templates-app/village-quest-3d/PROJECT/Status.md +26 -0
  71. package/templates-app/village-quest-3d/PROJECT/Structure.md +30 -0
  72. package/templates-app/village-quest-3d/docs/project-3d-rules.md +38 -0
  73. package/templates-app/village-quest-3d/index.html +68 -0
  74. package/templates-app/village-quest-3d/package.json +25 -0
  75. package/templates-app/village-quest-3d/src/behaviors.ts +529 -0
  76. package/templates-app/village-quest-3d/src/grove.scene.json +826 -0
  77. package/templates-app/village-quest-3d/src/main.ts +35 -0
  78. package/templates-app/village-quest-3d/src/quest.ts +18 -0
  79. package/templates-app/village-quest-3d/src/village.scene.json +680 -0
  80. package/templates-app/village-quest-3d/tsconfig.json +13 -0
  81. package/templates-app/village-quest-3d/verify.ts +254 -0
  82. package/templates-app/village-quest-3d/vite.config.ts +5 -0
@@ -1,7 +1,7 @@
1
- import { _ as registerBehavior, m as Behavior, n as loadScene } from "./loader-B4OEXDZ8.js";
1
+ import { _ as registerBehavior, m as Behavior, n as loadScene } from "./loader-BZqOKfI2.js";
2
2
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
3
3
  import { t as jsonClone } from "./json-BLk7H2Qa.js";
4
- import { t as duplicateNode } from "./duplicate-BEvGBtb_.js";
4
+ import { t as duplicateNode } from "./duplicate-BINwP0WG.js";
5
5
  //#region src/gameplay/spatial.ts
6
6
  /** Duck-type test: every spatial node (Node2D/Node3D) exposes `position: number[]`. */
7
7
  function hasPosition$1(node) {
@@ -428,6 +428,77 @@ function findHealth(node) {
428
428
  return null;
429
429
  }
430
430
  //#endregion
431
+ //#region src/gameplay/day-night.ts
432
+ var DayNight = class extends Behavior {
433
+ static signals = ["dayPhaseChanged"];
434
+ static props = {
435
+ /** Real seconds for a full 24h cycle. */
436
+ daySeconds: { default: 240 },
437
+ /** Clock position at scene start (0-24; 12 = noon). */
438
+ startHour: { default: 10 },
439
+ /** Noon sun elevation, degrees. */
440
+ maxSunElevationDeg: { default: 55 },
441
+ /** How dark midnight gets: 0 = unchanged, 1 = black. */
442
+ nightDarkness: { default: .75 },
443
+ /** Freeze the clock (drive `hour` yourself). */
444
+ paused: { default: false }
445
+ };
446
+ daySeconds = 240;
447
+ startHour = 10;
448
+ maxSunElevationDeg = 55;
449
+ nightDarkness = .75;
450
+ paused = false;
451
+ /** Current clock hour (0-24). Write it to jump the time of day. */
452
+ hour = 0;
453
+ phase = "";
454
+ applyClock = 0;
455
+ baseAmbient = .3;
456
+ baseExposure = 1;
457
+ captured = false;
458
+ onReady() {
459
+ this.hour = this.startHour;
460
+ }
461
+ update(dt) {
462
+ if (!this.paused) this.hour = (this.hour + dt / this.daySeconds * 24) % 24;
463
+ this.applyClock -= dt;
464
+ if (this.applyClock > 0) return;
465
+ this.applyClock = .2;
466
+ this.applyHour();
467
+ const next = phaseOf(this.hour);
468
+ if (next !== this.phase) {
469
+ this.phase = next;
470
+ this.emit("dayPhaseChanged", next);
471
+ }
472
+ }
473
+ applyHour() {
474
+ const engine = this.node.tree?.engine;
475
+ const env = engine?.scene?.environment;
476
+ if (!engine || !env?.sky) return;
477
+ if (!this.captured) {
478
+ this.captured = true;
479
+ this.baseAmbient = env.ambient?.intensity ?? .3;
480
+ this.baseExposure = env.exposure ?? 1;
481
+ }
482
+ const t = (this.hour - 6) / 12 * Math.PI;
483
+ const sun = Math.sin(t);
484
+ env.sky.elevationDeg = sun * this.maxSunElevationDeg + (sun < 0 ? sun * 10 : 0);
485
+ env.sky.azimuthDeg = this.hour / 24 * 360 + 90;
486
+ const daylight = Math.max(0, sun);
487
+ const dark = this.nightDarkness;
488
+ env.ambient = {
489
+ ...env.ambient ?? {},
490
+ intensity: this.baseAmbient * (1 - dark + dark * daylight)
491
+ };
492
+ env.exposure = this.baseExposure * (1 - dark * .55 * (1 - daylight));
493
+ }
494
+ };
495
+ function phaseOf(hour) {
496
+ if (hour < 5 || hour >= 20) return "night";
497
+ if (hour < 7.5) return "dawn";
498
+ if (hour < 17.5) return "day";
499
+ return "dusk";
500
+ }
501
+ //#endregion
431
502
  //#region src/gameplay/follow-camera.ts
432
503
  /**
433
504
  * Make the node it sits on chase a target's position — THE camera-follow
@@ -1873,6 +1944,7 @@ var ZombieAI = class extends Behavior {
1873
1944
  /** Every built-in gameplay behavior, keyed by its registration name. */
1874
1945
  const GAMEPLAY_BEHAVIORS = {
1875
1946
  CameraShake,
1947
+ DayNight,
1876
1948
  GameFlow,
1877
1949
  PathFollow,
1878
1950
  Health,
@@ -1903,4 +1975,4 @@ function registerGameplayBehaviors(opts) {
1903
1975
  for (const [name, ctor] of Object.entries(GAMEPLAY_BEHAVIORS)) registerBehavior(name, ctor, { replace });
1904
1976
  }
1905
1977
  //#endregion
1906
- export { FollowCamera as C, Chase as D, Collector as E, restartScene as S, Health as T, hitStop as _, Wander as a, GameFlow as b, Projectile as c, PathFollow as d, Oscillate as f, Cooldown as g, CameraShake as h, WaveSpawner as i, Pickup as l, Lifetime as m, registerGameplayBehaviors as n, Spawner as o, MoveTo as p, ZombieAI as r, ScoreKeeper as s, GAMEPLAY_BEHAVIORS as t, Patrol as u, screenFlash as v, DamageOnContact as w, goToScene as x, Interactable as y };
1978
+ export { FollowCamera as C, Health as D, DamageOnContact as E, Collector as O, restartScene as S, phaseOf as T, hitStop as _, Wander as a, GameFlow as b, Projectile as c, PathFollow as d, Oscillate as f, Cooldown as g, CameraShake as h, WaveSpawner as i, Chase as k, Pickup as l, Lifetime as m, registerGameplayBehaviors as n, Spawner as o, MoveTo as p, ZombieAI as r, ScoreKeeper as s, GAMEPLAY_BEHAVIORS as t, Patrol as u, screenFlash as v, DayNight as w, goToScene as x, Interactable as y };
@@ -1,5 +1,5 @@
1
1
  import { c as JsonValue, s as JsonObject } from "./schema-CcoWb32N.js";
2
- import { $ as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-Bod1AyJS.js";
2
+ import { $ as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-CPibUfnH.js";
3
3
 
4
4
  //#region src/gameplay/chase.d.ts
5
5
  /**
@@ -540,6 +540,41 @@ declare class ZombieAI extends Behavior {
540
540
  private pickGoal;
541
541
  }
542
542
  //#endregion
543
+ //#region src/gameplay/day-night.d.ts
544
+ /**
545
+ * A live day/night cycle — drives the scene's `environment` (sun elevation +
546
+ * azimuth, ambient, exposure) through a full 24-hour loop. Attach anywhere
547
+ * (the scene root is natural); requires a 3D scene with an atmosphere sky.
548
+ *
549
+ * { "script": { "name": "DayNight", "props": { "daySeconds": 240, "startHour": 9 } } }
550
+ *
551
+ * `hour` (0-24, readable/writable) is the single source of truth — set it to
552
+ * jump to a time of day, or set `paused: true` and animate it yourself.
553
+ * Emits `dayPhaseChanged('dawn'|'day'|'dusk'|'night')` on transitions — hook
554
+ * spawners/lights/music to it.
555
+ */
556
+ type DayPhase = "dawn" | "day" | "dusk" | "night";
557
+ declare class DayNight extends Behavior {
558
+ static readonly signals: readonly string[];
559
+ static readonly props: PropSchema;
560
+ daySeconds: number;
561
+ startHour: number;
562
+ maxSunElevationDeg: number;
563
+ nightDarkness: number;
564
+ paused: boolean;
565
+ /** Current clock hour (0-24). Write it to jump the time of day. */
566
+ hour: number;
567
+ private phase;
568
+ private applyClock;
569
+ private baseAmbient;
570
+ private baseExposure;
571
+ private captured;
572
+ override onReady(): void;
573
+ override update(dt: number): void;
574
+ private applyHour;
575
+ }
576
+ declare function phaseOf(hour: number): DayPhase;
577
+ //#endregion
543
578
  //#region src/gameplay/game-flow.d.ts
544
579
  /**
545
580
  * Reload the CURRENT scene from its source JSON — fresh nodes, reset physics,
@@ -699,4 +734,4 @@ declare function registerGameplayBehaviors(opts?: {
699
734
  replace?: boolean;
700
735
  }): void;
701
736
  //#endregion
702
- export { CameraShake, Chase, Collector, Cooldown, DamageOnContact, FollowCamera, GAMEPLAY_BEHAVIORS, GameFlow, type GameFlowState, Health, Interactable, Lifetime, MoveTo, Oscillate, PathFollow, Patrol, Pickup, Projectile, ScoreKeeper, Spawner, Wander, WaveSpawner, ZombieAI, goToScene, hitStop, registerGameplayBehaviors, restartScene, screenFlash };
737
+ export { CameraShake, Chase, Collector, Cooldown, DamageOnContact, DayNight, type DayPhase, FollowCamera, GAMEPLAY_BEHAVIORS, GameFlow, type GameFlowState, Health, Interactable, Lifetime, MoveTo, Oscillate, PathFollow, Patrol, Pickup, Projectile, ScoreKeeper, Spawner, Wander, WaveSpawner, ZombieAI, goToScene, hitStop, phaseOf, registerGameplayBehaviors, restartScene, screenFlash };
package/dist/gameplay.js CHANGED
@@ -1,2 +1,2 @@
1
- import { C as FollowCamera, D as Chase, E as Collector, S as restartScene, T as Health, _ as hitStop, a as Wander, b as GameFlow, c as Projectile, d as PathFollow, f as Oscillate, g as Cooldown, h as CameraShake, i as WaveSpawner, l as Pickup, m as Lifetime, n as registerGameplayBehaviors, o as Spawner, p as MoveTo, r as ZombieAI, s as ScoreKeeper, t as GAMEPLAY_BEHAVIORS, u as Patrol, v as screenFlash, w as DamageOnContact, x as goToScene, y as Interactable } from "./gameplay-Dn3yidJw.js";
2
- export { CameraShake, Chase, Collector, Cooldown, DamageOnContact, FollowCamera, GAMEPLAY_BEHAVIORS, GameFlow, Health, Interactable, Lifetime, MoveTo, Oscillate, PathFollow, Patrol, Pickup, Projectile, ScoreKeeper, Spawner, Wander, WaveSpawner, ZombieAI, goToScene, hitStop, registerGameplayBehaviors, restartScene, screenFlash };
1
+ import { C as FollowCamera, D as Health, E as DamageOnContact, O as Collector, S as restartScene, T as phaseOf, _ as hitStop, a as Wander, b as GameFlow, c as Projectile, d as PathFollow, f as Oscillate, g as Cooldown, h as CameraShake, i as WaveSpawner, k as Chase, l as Pickup, m as Lifetime, n as registerGameplayBehaviors, o as Spawner, p as MoveTo, r as ZombieAI, s as ScoreKeeper, t as GAMEPLAY_BEHAVIORS, u as Patrol, v as screenFlash, w as DayNight, x as goToScene, y as Interactable } from "./gameplay-sSqrUcnz.js";
2
+ export { CameraShake, Chase, Collector, Cooldown, DamageOnContact, DayNight, FollowCamera, GAMEPLAY_BEHAVIORS, GameFlow, Health, Interactable, Lifetime, MoveTo, Oscillate, PathFollow, Patrol, Pickup, Projectile, ScoreKeeper, Spawner, Wander, WaveSpawner, ZombieAI, goToScene, hitStop, phaseOf, registerGameplayBehaviors, restartScene, screenFlash };
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 Node, A as SfxPlayOptions, B as spatialPan, C as RendererStats, D as LogManager, E as LogLevel, F as ROLLOFF_MODELS, G as SynthOptions, H as SFX_PRESET_NAMES, I as RolloffModel, J as MusicManager, K as synthSfx, L as SpatialParams, M as Voice, N as VoicePreset, O as InputMap, P as Listener, Q as BusName, R as Vec3, S as GameStats, T as LogEntry, U as SfxParams, V as SFX_PRESETS, W as SfxWave, X as PlayMusicOptions, Y as MusicTrack, Z as AudioBuses, _ as registeredTypes, a as registerBehavior, b as Scheduler, c as PropDef, d as createNode, et as NodeLifecycle, f as getNodeSchema, g as registerNode, h as mergeStaticSignals, i as getBehavior, j as isAudioContextAvailable, k as SfxEngine, l as PropSchema, m as getNodeType, n as BehaviorCtor, nt as SignalListener, o as registeredBehaviors, p as getNodeSignals, q as MusicBackend, r as clearBehaviors, rt as SceneTree, s as NodeCtor, t as Behavior, tt as Signal, u as clearRegistry, v as Engine, w as Scene, x as EngineStats, y as EngineOptions, z as spatialGain } from "./behavior-Bod1AyJS.js";
3
- import { n as loadScene, t as LoadSceneOptions } from "./loader-BcUDfNHn.js";
2
+ import { $ as Node, A as SfxPlayOptions, B as spatialPan, C as RendererStats, D as LogManager, E as LogLevel, F as ROLLOFF_MODELS, G as SynthOptions, H as SFX_PRESET_NAMES, I as RolloffModel, J as MusicManager, K as synthSfx, L as SpatialParams, M as Voice, N as VoicePreset, O as InputMap, P as Listener, Q as BusName, R as Vec3, S as GameStats, T as LogEntry, U as SfxParams, V as SFX_PRESETS, W as SfxWave, X as PlayMusicOptions, Y as MusicTrack, Z as AudioBuses, _ as registeredTypes, a as registerBehavior, b as Scheduler, c as PropDef, d as createNode, et as NodeLifecycle, f as getNodeSchema, g as registerNode, h as mergeStaticSignals, i as getBehavior, j as isAudioContextAvailable, k as SfxEngine, l as PropSchema, m as getNodeType, n as BehaviorCtor, nt as SignalListener, o as registeredBehaviors, p as getNodeSignals, q as MusicBackend, r as clearBehaviors, rt as SceneTree, s as NodeCtor, t as Behavior, tt as Signal, u as clearRegistry, v as Engine, w as Scene, x as EngineStats, y as EngineOptions, z as spatialGain } from "./behavior-CPibUfnH.js";
3
+ import { n as loadScene, t as LoadSceneOptions } from "./loader-DILt9PGC.js";
4
4
  import { n as ParticleSimConfig, r as ParticleView, t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
5
- import { a as AudioElementLike, i as gridFromRows, n as PathGrid, o as AudioPlayer, r as findPath, t as FindPathOptions } from "./pathfinding-BSiXjd6W.js";
5
+ import { a as AudioElementLike, i as gridFromRows, n as PathGrid, o as AudioPlayer, r as findPath, t as FindPathOptions } from "./pathfinding-RWYkNKx9.js";
6
6
  import { i as auditScene, n as IncantoErrorCode, r as IncantoErrorDetails, t as IncantoError } from "./errors-1dXlIwoR.js";
7
7
 
8
8
  //#region src/core/audio/crossfade.d.ts
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
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 { C as crossfadeGains, S as WebAudioMusicBackend, T as AudioBuses, _ as spatialPan, a as HudLayer, b as synthSfx, c as UiText, d as LogManager, f as InputMap, g as spatialGain, h as ROLLOFF_MODELS, i as UiDialogue, l as AudioPlayer, m as isAudioContextAvailable, n as Timer, o as UiBanner, p as SfxEngine, r as UiButton, s as UiBar, t as registerCoreNodes, u as Engine, v as SFX_PRESETS, w as fadeGain, x as MusicManager, y as SFX_PRESET_NAMES } from "./register-DJZXxwAn.js";
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-BZqOKfI2.js";
2
+ import { C as crossfadeGains, S as WebAudioMusicBackend, T as AudioBuses, _ as spatialPan, a as HudLayer, b as synthSfx, c as UiText, d as LogManager, f as InputMap, g as spatialGain, h as ROLLOFF_MODELS, i as UiDialogue, l as AudioPlayer, m as isAudioContextAvailable, n as Timer, o as UiBanner, p as SfxEngine, r as UiButton, s as UiBar, t as registerCoreNodes, u as Engine, v as SFX_PRESETS, w as fadeGain, x as MusicManager, y as SFX_PRESET_NAMES } from "./register-nObreUQR.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 { t as auditScene } from "./audit-C6rMyict.js";
@@ -8,7 +8,7 @@ import { a as getNodeSignals, c as mergeStaticSignals, i as getNodeSchema, l as
8
8
  import { t as createNoise2D } from "./noise-CGUMx44x.js";
9
9
  import { a as ORDER_GROUP_BASE, i as applyParticlePreset, n as PARTICLE_PRESETS, o as effectiveOrder, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-CyUU7HVU.js";
10
10
  import { i as resolveRendering, n as attachTouchControls, r as joystickVector, t as TouchControls } from "./touch-031PxtCR.js";
11
- import { t as duplicateNode } from "./duplicate-BEvGBtb_.js";
11
+ import { t as duplicateNode } from "./duplicate-BINwP0WG.js";
12
12
  //#region src/core/pathfinding.ts
13
13
  /**
14
14
  * A* from `from` to `to` (inclusive cell coords). Returns the cell path
@@ -295,6 +295,6 @@ function newUid() {
295
295
  //#endregion
296
296
  //#region src/index.ts
297
297
  /** Engine version. Kept in sync with package.json by the release pipeline. */
298
- const VERSION = "0.12.0";
298
+ const VERSION = "0.13.0";
299
299
  //#endregion
300
300
  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, UiButton, UiDialogue, UiText, VERSION, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, auditScene, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, findPath, getBehavior, getNodeSchema, getNodeSignals, getNodeType, gridFromRows, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, mergeStaticSignals, newUid, parseNodePath, preloadUrls, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, replay, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, startRecording, synthSfx };
@@ -751,7 +751,9 @@ var Scene = class {
751
751
  dimension;
752
752
  root;
753
753
  tree;
754
- /** Scene-level rendering environment (read by renderer adapters). */
754
+ /** Scene-level rendering environment (read by renderer adapters EVERY
755
+ * frame, cheap when unchanged) — mutable so runtime look changes
756
+ * (setEnvironment3D, DayNight) are just writes to this object. */
755
757
  environment;
756
758
  /** Asset declarations (consumed by renderer/asset layers, `$key` references). */
757
759
  assets;
@@ -1,5 +1,5 @@
1
1
  import { i as SceneJson } from "./schema-CcoWb32N.js";
2
- import { v as Engine, w as Scene } from "./behavior-Bod1AyJS.js";
2
+ import { v as Engine, w as Scene } from "./behavior-CPibUfnH.js";
3
3
 
4
4
  //#region src/core/scene/loader.d.ts
5
5
  interface LoadSceneOptions {
package/dist/net.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c as JsonValue, i as SceneJson, s as JsonObject } from "./schema-CcoWb32N.js";
2
- import { $ as Node, l as PropSchema, tt as Signal, v as Engine } from "./behavior-Bod1AyJS.js";
2
+ import { $ as Node, l as PropSchema, tt as Signal, v as Engine } from "./behavior-CPibUfnH.js";
3
3
 
4
4
  //#region src/net/types.d.ts
5
5
  type Unsubscribe = () => void;
package/dist/net.js CHANGED
@@ -1,9 +1,9 @@
1
- import { n as loadScene } from "./loader-B4OEXDZ8.js";
2
- import { u as Engine } from "./register-DJZXxwAn.js";
1
+ import { n as loadScene } from "./loader-BZqOKfI2.js";
2
+ import { u as Engine } from "./register-nObreUQR.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { t as jsonClone } from "./json-BLk7H2Qa.js";
5
5
  import { n as createAgent8Server } from "./agent8-CvsfVskX.js";
6
- import { i as applySyncPatch, n as NetworkSpawner, r as NetworkManager, t as registerNodesNet } from "./register-Cwc-yCYx.js";
6
+ import { i as applySyncPatch, n as NetworkSpawner, r as NetworkManager, t as registerNodesNet } from "./register-BFFE1Mh1.js";
7
7
  //#region src/net/loopback.ts
8
8
  /**
9
9
  * In-memory multiplayer hub implementing the SAME kernel contract as
@@ -1,4 +1,4 @@
1
- import { $ as Node, P as Listener, l as PropSchema } from "./behavior-Bod1AyJS.js";
1
+ import { $ as Node, P as Listener, l as PropSchema } from "./behavior-CPibUfnH.js";
2
2
 
3
3
  //#region src/core/nodes/audio-player.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
3
- import { _ as RigidBody2D, b as validateCollider2D, g as PhysicsBody2D, h as CharacterBody2D, m as Area2D, p as Joint2D, y as Node2D } from "./register-BD6zgrv_.js";
3
+ import { _ as RigidBody2D, b as validateCollider2D, g as PhysicsBody2D, h as CharacterBody2D, m as Area2D, p as Joint2D, y as Node2D } from "./register-Djwckzgx.js";
4
4
  import { n as registerDebugSource } from "./debug-draw-CZmOYjL2.js";
5
5
  //#region src/2d/physics/physics-2d.ts
6
6
  var physics_2d_exports = /* @__PURE__ */ __exportAll({
@@ -16,7 +16,7 @@ const DEG = Math.PI / 180;
16
16
  */
17
17
  async function enablePhysics2D(engine, opts) {
18
18
  const R = await import("@dimforge/rapier2d-compat");
19
- await R.init();
19
+ await R.init({});
20
20
  return new Physics2D(R, engine, opts);
21
21
  }
22
22
  /**
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
3
3
  import { n as registerDebugSource } from "./debug-draw-CZmOYjL2.js";
4
- import { A as PhysicsBody3D, C as Terrain3D, D as Joint3D, N as Node3D, O as Area3D, P as validateCollider3D, j as RigidBody3D, k as CharacterBody3D } from "./register-ysLR3WQS.js";
4
+ import { A as Area3D, F as Node3D, I as validateCollider3D, M as PhysicsBody3D, N as RigidBody3D, T as Terrain3D, j as CharacterBody3D, k as Joint3D } from "./register-BFw4c83z.js";
5
5
  import { Euler, Quaternion } from "three";
6
6
  //#region src/3d/physics/physics-3d.ts
7
7
  var physics_3d_exports = /* @__PURE__ */ __exportAll({
@@ -16,7 +16,7 @@ const DEG = Math.PI / 180;
16
16
  */
17
17
  async function enablePhysics3D(engine, opts) {
18
18
  const R = await import("@dimforge/rapier3d-compat");
19
- await R.init();
19
+ await R.init({});
20
20
  return new Physics3D(R, engine, opts);
21
21
  }
22
22
  /** Per-engine 3D physics world. Same contract as Physics2D. */
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c as JsonValue } from "./schema-CcoWb32N.js";
2
- import { n as BehaviorCtor, v as Engine, w as Scene } from "./behavior-Bod1AyJS.js";
2
+ import { n as BehaviorCtor, v as Engine, w as Scene } from "./behavior-CPibUfnH.js";
3
3
  import { CSSProperties, ReactNode } from "react";
4
4
 
5
5
  //#region src/react/index.d.ts
package/dist/react.js CHANGED
@@ -156,7 +156,7 @@ function IncantoCanvas(props) {
156
156
  pointer: latest.pointer,
157
157
  ...keyboard !== void 0 ? { keyboard } : {}
158
158
  };
159
- const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-B2fewJUy.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-C_xf4gm9.js").then((n) => n.n)).createGame2D(o)))(opts);
159
+ const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-J6g4QInv.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-Ct86zczq.js").then((n) => n.n)).createGame2D(o)))(opts);
160
160
  if (disposed) {
161
161
  next.dispose();
162
162
  return;
@@ -1,5 +1,5 @@
1
- import { f as Node, t as buildNodeJson, y as Signal } from "./loader-B4OEXDZ8.js";
2
- import { t as registerCoreNodes } from "./register-DJZXxwAn.js";
1
+ import { f as Node, t as buildNodeJson, y as Signal } from "./loader-BZqOKfI2.js";
2
+ import { t as registerCoreNodes } from "./register-nObreUQR.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { n as jsonEquals, t as jsonClone } from "./json-BLk7H2Qa.js";
5
5
  import { l as registerNode } from "./registry-BVJ2HbCn.js";