incanto 0.50.0 → 0.51.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 (45) hide show
  1. package/dist/2d.d.ts +3 -2
  2. package/dist/2d.js +3 -3
  3. package/dist/3d.d.ts +4 -3
  4. package/dist/3d.js +4 -4
  5. package/dist/{behavior-62q0HWBO.d.ts → behavior-rZNfzVbH.d.ts} +37 -3
  6. package/dist/{create-game-DqqxEax1.js → create-game-BNaOC3Px.js} +5 -5
  7. package/dist/{create-game-BLDjy_PW.js → create-game-CkzKZ4v5.js} +5 -5
  8. package/dist/debug.d.ts +1 -1
  9. package/dist/{duplicate-CI9WF_bg.js → duplicate-EybyYeyL.js} +1 -1
  10. package/dist/{environment-presets-XFuqu5jv.js → environment-presets-C08pOC6H.js} +2 -2
  11. package/dist/{gameplay-DbaI313d.js → gameplay-bStgtZBV.js} +159 -4
  12. package/dist/gameplay.d.ts +79 -2
  13. package/dist/gameplay.js +2 -2
  14. package/dist/index.d.ts +14 -5
  15. package/dist/index.js +6 -6
  16. package/dist/{loader-DwazzlQb.js → loader-B2asghWa.js} +350 -1
  17. package/dist/{loader-CeyU_bm1.d.ts → loader-Dkbn56KC.d.ts} +1 -1
  18. package/dist/net.d.ts +1 -1
  19. package/dist/net.js +3 -3
  20. package/dist/{pathfinding-C49JSNNq.d.ts → pathfinding-Bz34pvQD.d.ts} +1 -1
  21. package/dist/{physics-2d-_9VBOHn6.js → physics-2d-Ccq2L9R0.js} +7 -2
  22. package/dist/{physics-3d-DrpF5hcG.js → physics-3d-B2c5KNYh.js} +8 -3
  23. package/dist/react.d.ts +1 -1
  24. package/dist/react.js +1 -1
  25. package/dist/{register-BNPZYJmd.js → register-B_BaaGx-.js} +2 -2
  26. package/dist/{register-uvaZj1KX.js → register-CGq-Hee8.js} +19 -265
  27. package/dist/{register-CB11yp21.js → register-CLVhzWcI.js} +2 -2
  28. package/dist/{replay-j-m6lJ4W.js → replay-BgKxGcXH.js} +20 -1
  29. package/dist/{replay-DYdy1wb0.d.ts → replay-DIP2_as4.d.ts} +1 -1
  30. package/dist/{src-B3HrKuAi.js → src-C3UwzYXl.js} +1 -1
  31. package/dist/{test-D16igj4C.js → test-D2gRpk5V.js} +11 -11
  32. package/dist/test.d.ts +3 -3
  33. package/dist/test.js +2 -2
  34. package/dist/vite.js +2 -2
  35. package/editor/assets/{agent8-t3kl5q9K.js → agent8-DbX_msaO.js} +1 -1
  36. package/editor/assets/{debug-Bu3eeAlO.js → debug-C-kMxdl1.js} +1 -1
  37. package/editor/assets/{index-Df5g8ofT.js → index-CUc1U7wm.js} +91 -91
  38. package/editor/index.html +1 -1
  39. package/package.json +1 -1
  40. package/skills/incanto-building-2d-games.md +6 -1
  41. package/skills/incanto-node-reference.md +13 -0
  42. package/skills/incanto-save-slots.md +134 -12
  43. package/templates-app/beacon-isle-3d/package.json +1 -1
  44. package/templates-app/tps-3d/package.json +1 -1
  45. package/templates-app/village-quest-3d/package.json +1 -1
package/dist/2d.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Et as Node, P as Scene$1, S as Scheduler, T as RendererStats, b as Engine, d as PropSchema, n as BehaviorCtor, w as GameStats } from "./behavior-62q0HWBO.js";
1
+ import { Dt as Node, P as Scene$1, S as Scheduler, T as RendererStats, b as Engine, d as PropSchema, n as BehaviorCtor, w as GameStats } from "./behavior-rZNfzVbH.js";
2
2
  import { n as DiagnosticSink, t as EditorSwitchOptions } from "./editor-switch-DAvWQeld.js";
3
3
  import { i as SceneJson, s as JsonObject } from "./schema-CFeioQRE.js";
4
- import { t as LoadSceneOptions } from "./loader-CeyU_bm1.js";
4
+ import { t as LoadSceneOptions } from "./loader-Dkbn56KC.js";
5
5
  import { n as AnimationEntry } from "./sprite-animation-CMr6f1K2.js";
6
6
  import { t as ParticleSim } from "./particle-sim-BzJ1yxoE.js";
7
7
  import { Group, Mesh, Object3D, Scene, Texture } from "three";
@@ -206,6 +206,7 @@ declare class Physics2D {
206
206
  private readonly world;
207
207
  private readonly events;
208
208
  private readonly kcc;
209
+ private readonly disconnectScene;
209
210
  private readonly disconnect;
210
211
  private lastDt;
211
212
  private readonly optsGravity;
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-BLDjy_PW.js";
3
- import { _ as RigidBody2D, a as parseCells, c as ColorRect2D, d as AnimatedSprite2D, f as Sprite2D, g as PhysicsBody2D, h as CharacterBody2D, i as mergeSolidRects, l as CharacterController2D, m as Area2D, n as UILayer, o as Particles2D, p as Joint2D, r as TileMap2D, s as Label, t as registerNodes2D, u as Camera2D, v as StaticBody2D, y as Node2D } from "./register-BNPZYJmd.js";
4
- import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-_9VBOHn6.js";
2
+ import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-CkzKZ4v5.js";
3
+ import { _ as RigidBody2D, a as parseCells, c as ColorRect2D, d as AnimatedSprite2D, f as Sprite2D, g as PhysicsBody2D, h as CharacterBody2D, i as mergeSolidRects, l as CharacterController2D, m as Area2D, n as UILayer, o as Particles2D, p as Joint2D, r as TileMap2D, s as Label, t as registerNodes2D, u as Camera2D, v as StaticBody2D, y as Node2D } from "./register-B_BaaGx-.js";
4
+ import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-Ccq2L9R0.js";
5
5
  //#region src/2d/library-sprite.ts
6
6
  /**
7
7
  * What a `CharacterController2D`/`3D` will ask a skin to play, and the clip in
package/dist/3d.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { D as QualityCaps, Et as Node, P as Scene$1, S as Scheduler, T as RendererStats, b as Engine, d as PropSchema, n as BehaviorCtor, w as GameStats } from "./behavior-62q0HWBO.js";
1
+ import { D as QualityCaps, Dt as Node, P as Scene$1, S as Scheduler, T as RendererStats, b as Engine, d as PropSchema, n as BehaviorCtor, w as GameStats } from "./behavior-rZNfzVbH.js";
2
2
  import { n as DiagnosticSink, t as EditorSwitchOptions } from "./editor-switch-DAvWQeld.js";
3
3
  import { i as SceneJson$1, s as JsonObject } from "./schema-CFeioQRE.js";
4
- import { t as LoadSceneOptions } from "./loader-CeyU_bm1.js";
4
+ import { t as LoadSceneOptions } from "./loader-Dkbn56KC.js";
5
5
  import { t as ParticleSim } from "./particle-sim-BzJ1yxoE.js";
6
6
  import { a as GridCell, c as diffText, d as frameText, i as FrameStatsOptions, l as frameSignature, n as FrameSignature, o as SIGNATURE_GRID, r as FrameStats, s as diffSignatures, t as FrameDiff, u as frameStats } from "./frame-report-DZ70IY26.js";
7
- import { n as PathGrid, s as SpatialPose } from "./pathfinding-C49JSNNq.js";
7
+ import { n as PathGrid, s as SpatialPose } from "./pathfinding-Bz34pvQD.js";
8
8
  import { AnimationClip, AnimationMixer, BufferGeometry, Color, DirectionalLight, Group, InstancedMesh, Mesh, MeshPhysicalMaterial, Object3D, PerspectiveCamera, Scene, ShaderMaterial, Texture, Vector3, WebGLRenderer } from "three";
9
9
  import { VRM } from "@pixiv/three-vrm";
10
10
  import { Sky } from "three/examples/jsm/objects/Sky.js";
@@ -439,6 +439,7 @@ declare class Physics3D {
439
439
  private readonly world;
440
440
  private readonly events;
441
441
  private readonly kcc;
442
+ private readonly disconnectScene;
442
443
  private readonly disconnect;
443
444
  private lastDt;
444
445
  private readonly optsGravity;
package/dist/3d.js CHANGED
@@ -1,9 +1,9 @@
1
- import { A as Water3D, F as PhysicsBody3D, I as RigidBody3D, L as StaticBody3D, M as WaterCutout3D, N as Area3D, P as CharacterBody3D, R as Node3D, V as WATER_MAX_RIPPLES, j as WATER_CUTOUT_MAX } from "./gameplay-DbaI313d.js";
2
- import { A as Terrain3D, B as keyboardIntensity, C as resolveFlowerDensity, D as BoneLookAt3D, E as Camera3D, F as InstancedMesh3D, G as acquireTexture, H as rigPose, I as MeshInstance3D, M as TERRAIN_THEMES, N as terrainThemeLayers, O as BoneAttachment3D, P as Joint3D, R as QUARTER_PITCH, S as Flowers3D, T as CharacterController3D, U as TextureCache3D, V as movementState, W as acquireOwnTexture, _ as LoftMesh3D, a as Tree3D, b as Foliage3D, c as buildRiverRings, d as riverCarveChannels, f as riverStepFor, g as ModelInstance3D, h as Particles3D, i as VoxelGrid3D, j as DEFAULT_TERRAIN_TEXTURE_BASE, k as Billboard3D, l as findRiverCoverageGaps, m as traceDownhillPath, n as registerNodes3D, o as Trail3D, p as smoothCourse, r as VOXEL_PALETTE, s as River3D, u as projectToRiver, v as DirectionalLight3D, w as FLOWER_VARIETIES, x as DENSITY_PRESETS, y as OmniLight3D, z as cameraRelative } from "./environment-presets-XFuqu5jv.js";
3
- import { a as Environment3D, c as parseEnvironment3D, d as AssetStore3D, i as syncTree, l as sunDirectionFromElevationAzimuth, o as setEnvironment3D, r as Renderer3D, s as horizonColorFromSky, t as createGame3D, u as sunDirectionFromSky } from "./create-game-DqqxEax1.js";
1
+ import { F as CharacterBody3D, H as WATER_MAX_RIPPLES, I as PhysicsBody3D, L as RigidBody3D, M as WATER_CUTOUT_MAX, N as WaterCutout3D, P as Area3D, R as StaticBody3D, j as Water3D, z as Node3D } from "./gameplay-bStgtZBV.js";
2
+ import { A as Terrain3D, B as keyboardIntensity, C as resolveFlowerDensity, D as BoneLookAt3D, E as Camera3D, F as InstancedMesh3D, G as acquireTexture, H as rigPose, I as MeshInstance3D, M as TERRAIN_THEMES, N as terrainThemeLayers, O as BoneAttachment3D, P as Joint3D, R as QUARTER_PITCH, S as Flowers3D, T as CharacterController3D, U as TextureCache3D, V as movementState, W as acquireOwnTexture, _ as LoftMesh3D, a as Tree3D, b as Foliage3D, c as buildRiverRings, d as riverCarveChannels, f as riverStepFor, g as ModelInstance3D, h as Particles3D, i as VoxelGrid3D, j as DEFAULT_TERRAIN_TEXTURE_BASE, k as Billboard3D, l as findRiverCoverageGaps, m as traceDownhillPath, n as registerNodes3D, o as Trail3D, p as smoothCourse, r as VOXEL_PALETTE, s as River3D, u as projectToRiver, v as DirectionalLight3D, w as FLOWER_VARIETIES, x as DENSITY_PRESETS, y as OmniLight3D, z as cameraRelative } from "./environment-presets-C08pOC6H.js";
3
+ import { a as Environment3D, c as parseEnvironment3D, d as AssetStore3D, i as syncTree, l as sunDirectionFromElevationAzimuth, o as setEnvironment3D, r as Renderer3D, s as horizonColorFromSky, t as createGame3D, u as sunDirectionFromSky } from "./create-game-BNaOC3Px.js";
4
4
  import { a as frameSignature, n as diffSignatures, o as frameStats, r as diffText, s as frameText, t as SIGNATURE_GRID } from "./frame-report-njybhZon.js";
5
5
  import { n as splatWeights, t as buildHeightmap } from "./heightmap-CRK0M4jT.js";
6
- import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-DrpF5hcG.js";
6
+ import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-B2c5KNYh.js";
7
7
  //#region src/3d/model-verdict.ts
8
8
  /** Mixamo exports every bone as `mixamorigX`; the retargeter binds by that name. */
9
9
  const MIXAMO = /^mixamorig[:_]?/i;
@@ -151,6 +151,14 @@ declare class SceneTree {
151
151
  _queueFree(node: Node): void;
152
152
  /** @internal Called by Node.free(): a freed root must not be re-drivable. */
153
153
  _detachRoot(node: Node): void;
154
+ /**
155
+ * @internal Is this node already on its way out?
156
+ *
157
+ * A save taken from a `collected` handler runs BEFORE the deferred free, so
158
+ * the pickup that triggered the checkpoint is still in the tree — and came
159
+ * back on the next run while its score did not.
160
+ */
161
+ _isQueuedFree(node: Node): boolean;
154
162
  private flushFreeQueue;
155
163
  }
156
164
  //#endregion
@@ -968,6 +976,18 @@ interface RestoreReport {
968
976
  skipped: string[];
969
977
  /** How many behaviors actually took their state back. */
970
978
  restored: number;
979
+ /**
980
+ * How much state this tree HAD to give back — every behavior in it with a
981
+ * `serialize`, addressable or not.
982
+ *
983
+ * `restored: 0` is ambiguous on its own and the ambiguity is expensive: a
984
+ * hand-written scene with no uids saves `{}`, and the documented check
985
+ * (`if (report.missing.length)`) passes on it while the whole run is gone.
986
+ * `restored: 0, expected: 2` cannot be read as success.
987
+ */
988
+ expected: number;
989
+ /** Authored nodes the save says the run consumed, and that were freed again. */
990
+ freed: number;
971
991
  }
972
992
  /**
973
993
  * Every behavior in the tree that has something to say, by uid.
@@ -980,9 +1000,10 @@ interface RestoreReport {
980
1000
  * cannot be given back. The editor assigns a uid to every node it touches; a
981
1001
  * hand-written scene may not have.
982
1002
  */
983
- declare function captureBehaviors(root: Node): {
1003
+ declare function captureBehaviors(root: Node, source?: JsonValue): {
984
1004
  state: BehaviorState; /** Paths of nodes that had state to save and no uid to save it under. */
985
- unaddressable: string[];
1005
+ unaddressable: string[]; /** Behaviors in this tree that have something to save — addressable or not. */
1006
+ saveable: number;
986
1007
  };
987
1008
  /**
988
1009
  * Hand each behavior its state back.
@@ -1032,6 +1053,19 @@ declare class SaveSlots {
1032
1053
  * and the caller decides.
1033
1054
  */
1034
1055
  declare function behaviorsWithoutSave(root: Node): string[];
1056
+ /**
1057
+ * Behaviors that DO save, on nodes with no uid to save them under — the state
1058
+ * that goes nowhere.
1059
+ *
1060
+ * `incanto-check` warns about the built-ins it can recognise from the JSON
1061
+ * (Health, ScoreKeeper, Collector), but a scene file cannot be asked whether
1062
+ * YOUR behavior has a `serialize`. This can: it walks the live tree, so a quest
1063
+ * log or a wallet of your own is named too.
1064
+ *
1065
+ * The pair to read before shipping: `behaviorsWithoutSave` is "did you forget
1066
+ * to write serialize", this is "did you forget the uid that makes it count".
1067
+ */
1068
+ declare function savesWithoutUid(root: Node): string[];
1035
1069
  //#endregion
1036
1070
  //#region src/core/scene/scene.d.ts
1037
1071
  /**
@@ -1682,4 +1716,4 @@ declare function registeredBehaviors(): string[];
1682
1716
  /** Test isolation helper. */
1683
1717
  declare function clearBehaviors(): void;
1684
1718
  //#endregion
1685
- export { suggestLocale as $, SettingsValues as A, LogLevel as At, captureBehaviors as B, EngineStats as C, PlayMusicOptions as Ct, QualityCaps as D, NodeLifecycle as Dt, DeviceHints as E, Node as Et, BehaviorState as F, OrderGroup as G, SaveStore as H, RestoreReport as I, resolveOrderGroups as J, OrderGroupTable as K, SaveSlot as L, readDeviceHints as M, Signal as Mt, suggestQuality as N, SignalListener as Nt, QualityTier as O, SceneTree as Ot, Scene as P, T_PREFIX as Q, SaveSlots as R, Scheduler as S, MusicTrack as St, RendererStats as T, BusName as Tt, createSaveStore as U, restoreBehaviors as V, ORDER_GROUP_BASE as W, LocaleTables as X, BASE_LOCALE as Y, Localization as Z, mergeStaticSignals as _, SfxWave as _t, clearBehaviors as a, Voice as at, Engine as b, MusicBackend as bt, registeredBehaviors as c, ROLLOFF_MODELS as ct, PropSchema as d, Vec3 as dt, translationKey as et, clearRegistry as f, spatialGain as ft, getNodeType as g, SfxParams as gt, getNodeSignals as h, SFX_PRESET_NAMES as ht, behaviorSignals as i, isAudioContextAvailable as it, qualityEnvironment as j, LogManager as jt, Settings as k, LogEntry as kt, NodeCtor as l, RolloffModel as lt, getNodeSchema as m, SFX_PRESETS as mt, BehaviorCtor as n, SfxEngine as nt, getBehavior as o, VoicePreset as ot, createNode as p, spatialPan as pt, effectiveOrder as q, behaviorSchema as r, SfxPlayOptions as rt, registerBehavior as s, Listener as st, Behavior as t, InputMap as tt, PropDef as u, SpatialParams as ut, registerNode as v, SynthOptions as vt, GameStats as w, AudioBuses as wt, EngineOptions as x, MusicManager as xt, registeredTypes as y, synthSfx as yt, behaviorsWithoutSave as z };
1719
+ export { T_PREFIX as $, SettingsValues as A, LogEntry as At, captureBehaviors as B, EngineStats as C, MusicTrack as Ct, QualityCaps as D, Node as Dt, DeviceHints as E, BusName as Et, BehaviorState as F, ORDER_GROUP_BASE as G, savesWithoutUid as H, RestoreReport as I, effectiveOrder as J, OrderGroup as K, SaveSlot as L, readDeviceHints as M, LogManager as Mt, suggestQuality as N, Signal as Nt, QualityTier as O, NodeLifecycle as Ot, Scene as P, SignalListener as Pt, Localization as Q, SaveSlots as R, Scheduler as S, MusicManager as St, RendererStats as T, AudioBuses as Tt, SaveStore as U, restoreBehaviors as V, createSaveStore as W, BASE_LOCALE as X, resolveOrderGroups as Y, LocaleTables as Z, mergeStaticSignals as _, SfxParams as _t, clearBehaviors as a, isAudioContextAvailable as at, Engine as b, synthSfx as bt, registeredBehaviors as c, Listener as ct, PropSchema as d, SpatialParams as dt, suggestLocale as et, clearRegistry as f, Vec3 as ft, getNodeType as g, SFX_PRESET_NAMES as gt, getNodeSignals as h, SFX_PRESETS as ht, behaviorSignals as i, SfxPlayOptions as it, qualityEnvironment as j, LogLevel as jt, Settings as k, SceneTree as kt, NodeCtor as l, ROLLOFF_MODELS as lt, getNodeSchema as m, spatialPan as mt, BehaviorCtor as n, InputMap as nt, getBehavior as o, Voice as ot, createNode as p, spatialGain as pt, OrderGroupTable as q, behaviorSchema as r, SfxEngine as rt, registerBehavior as s, VoicePreset as st, Behavior as t, translationKey as tt, PropDef as u, RolloffModel as ut, registerNode as v, SfxWave as vt, GameStats as w, PlayMusicOptions as wt, EngineOptions as x, MusicBackend as xt, registeredTypes as y, SynthOptions as yt, behaviorsWithoutSave as z };
@@ -1,15 +1,15 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { n as loadScene, v as diagnose, w as registerBehavior } from "./loader-DwazzlQb.js";
3
- import { _ as qualityCaps, h as Engine, m as AudioPlayer, y as qualityRendering } from "./register-uvaZj1KX.js";
2
+ import { A as registerBehavior, n as loadScene, w as diagnose } from "./loader-B2asghWa.js";
3
+ import { _ as qualityCaps, h as Engine, m as AudioPlayer, y as qualityRendering } from "./register-CGq-Hee8.js";
4
4
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
5
5
  import { r as parseDrive, t as logReport } from "./log-report-lxrQY9cH.js";
6
6
  import { i as resolveRendering, n as attachTouchControls } from "./touch-BoNg_MnF.js";
7
7
  import { a as openBundledEditor, i as devServerLibrary, n as pauseWhenHidden, o as poseFromRenderer, r as crossFade, t as teardown } from "./teardown-BKTCzLek.js";
8
- import { B as createCausticsQuad, F as PhysicsBody3D, R as Node3D, n as registerGameplayBehaviors } from "./gameplay-DbaI313d.js";
8
+ import { I as PhysicsBody3D, V as createCausticsQuad, n as registerGameplayBehaviors, z as Node3D } from "./gameplay-bStgtZBV.js";
9
9
  import { t as debugSources } from "./debug-draw-BM3DsvtT.js";
10
- import { E as Camera3D, U as TextureCache3D, g as ModelInstance3D, n as registerNodes3D, t as resolveEnvironmentHdri, v as DirectionalLight3D } from "./environment-presets-XFuqu5jv.js";
10
+ import { E as Camera3D, U as TextureCache3D, g as ModelInstance3D, n as registerNodes3D, t as resolveEnvironmentHdri, v as DirectionalLight3D } from "./environment-presets-C08pOC6H.js";
11
11
  import { a as frameSignature, i as frameImage, o as frameStats } from "./frame-report-njybhZon.js";
12
- import { n as enablePhysics3D } from "./physics-3d-DrpF5hcG.js";
12
+ import { n as enablePhysics3D } from "./physics-3d-B2c5KNYh.js";
13
13
  import { ACESFilmicToneMapping, AmbientLight, Box3, 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";
14
14
  import { VRMLoaderPlugin, VRMUtils } from "@pixiv/three-vrm";
15
15
  import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { n as loadScene, o as computeViewport, s as resolveViewport, v as diagnose, w as registerBehavior } from "./loader-DwazzlQb.js";
3
- import { h as Engine, m as AudioPlayer } from "./register-uvaZj1KX.js";
2
+ import { A as registerBehavior, n as loadScene, o as computeViewport, s as resolveViewport, w as diagnose } from "./loader-B2asghWa.js";
3
+ import { h as Engine, m as AudioPlayer } from "./register-CGq-Hee8.js";
4
4
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
5
5
  import { i as resolveRendering, n as attachTouchControls } from "./touch-BoNg_MnF.js";
6
6
  import { a as openBundledEditor, i as devServerLibrary, n as pauseWhenHidden, r as crossFade, t as teardown } from "./teardown-BKTCzLek.js";
7
- import { n as registerGameplayBehaviors } from "./gameplay-DbaI313d.js";
8
- import { g as PhysicsBody2D, n as UILayer, t as registerNodes2D, u as Camera2D, y as Node2D } from "./register-BNPZYJmd.js";
7
+ import { n as registerGameplayBehaviors } from "./gameplay-bStgtZBV.js";
8
+ import { g as PhysicsBody2D, n as UILayer, t as registerNodes2D, u as Camera2D, y as Node2D } from "./register-B_BaaGx-.js";
9
9
  import { t as debugSources } from "./debug-draw-BM3DsvtT.js";
10
- import { n as enablePhysics2D } from "./physics-2d-_9VBOHn6.js";
10
+ import { n as enablePhysics2D } from "./physics-2d-Ccq2L9R0.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
  /**
package/dist/debug.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { At as LogLevel, T as RendererStats, b as Engine } from "./behavior-62q0HWBO.js";
1
+ import { T as RendererStats, b as Engine, jt as LogLevel } from "./behavior-rZNfzVbH.js";
2
2
 
3
3
  //#region src/debug/panel.d.ts
4
4
  /** Minimal document surface the overlay needs (injectable for tests). */
@@ -1,4 +1,4 @@
1
- import { i as serializeNode, t as buildNodeJson } from "./loader-DwazzlQb.js";
1
+ import { i as serializeNode, t as buildNodeJson } from "./loader-B2asghWa.js";
2
2
  //#region src/core/scene/duplicate.ts
3
3
  function stripUids(json) {
4
4
  const { uid: _uid, ...rest } = json;
@@ -1,10 +1,10 @@
1
- import { t as registerCoreNodes } from "./register-uvaZj1KX.js";
1
+ import { t as registerCoreNodes } from "./register-CGq-Hee8.js";
2
2
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
3
3
  import { t as Rng } from "./rng-DP-SR7eg.js";
4
4
  import { i as getNodeSchema, l as registerNode } from "./registry-IyWCGe4q.js";
5
5
  import { t as createNoise2D } from "./noise-CGUMx44x.js";
6
6
  import { i as ParticleSim, n as resolveFrames, o as PARTICLE_PRESET_NAMES, r as validateAnimationAliases, s as applyParticlePreset, t as resolveAnimation } from "./sprite-animation-D_p28jwU.js";
7
- import { A as Water3D, F as PhysicsBody3D, H as colliderFootDrop, I as RigidBody3D, L as StaticBody3D, M as WaterCutout3D, N as Area3D, P as CharacterBody3D, R as Node3D } from "./gameplay-DbaI313d.js";
7
+ import { F as CharacterBody3D, I as PhysicsBody3D, L as RigidBody3D, N as WaterCutout3D, P as Area3D, R as StaticBody3D, U as colliderFootDrop, j as Water3D, z as Node3D } from "./gameplay-bStgtZBV.js";
8
8
  import { n as splatWeights, t as buildHeightmap } from "./heightmap-CRK0M4jT.js";
9
9
  import { AdditiveBlending, AnimationClip, AnimationMixer, Box3, BoxGeometry, BufferAttribute, BufferGeometry, CanvasTexture, CapsuleGeometry, ClampToEdgeWrapping, Color, ConeGeometry, CylinderGeometry, DataTexture, DirectionalLight, DoubleSide, DynamicDrawUsage, Euler, Group, IcosahedronGeometry, ImageBitmapLoader, InstancedBufferAttribute, InstancedMesh, LinearFilter, LinearMipmapLinearFilter, LoopOnce, LoopRepeat, Matrix4, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshPhysicalMaterial, MeshStandardMaterial, NearestFilter, NoBlending, NoColorSpace, NormalBlending, PerspectiveCamera, PlaneGeometry, PointLight, Points, PointsMaterial, Quaternion, QuaternionKeyframeTrack, RGBADepthPacking, RGBAFormat, RepeatWrapping, SRGBColorSpace, ShaderChunk, ShaderMaterial, SphereGeometry, Texture, TextureLoader, UniformsLib, UniformsUtils, Vector3, Vector4, VectorKeyframeTrack } from "three";
10
10
  import { clone } from "three/addons/utils/SkeletonUtils.js";
@@ -1,7 +1,7 @@
1
- import { f as Node, h as effectiveOrder, n as loadScene, w as registerBehavior, y as Behavior } from "./loader-DwazzlQb.js";
1
+ import { A as registerBehavior, T as Behavior, f as Node, m as SaveSlots, n as loadScene, x as effectiveOrder } from "./loader-B2asghWa.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-CI9WF_bg.js";
4
+ import { t as duplicateNode } from "./duplicate-EybyYeyL.js";
5
5
  import { Color, CubeCamera, DepthTexture, DoubleSide, Euler, FloatType, Frustum, HalfFloatType, LinearMipmapLinearFilter, MathUtils, Matrix4, Mesh, MeshDepthMaterial, Object3D, PerspectiveCamera, Plane, PlaneGeometry, Quaternion, ShaderMaterial, Sphere, Vector2, Vector3, Vector4, WebGLCubeRenderTarget, WebGLRenderTarget } from "three";
6
6
  //#region src/3d/frustum.ts
7
7
  const scratchFrustum = new Frustum();
@@ -5754,8 +5754,8 @@ var Pickup = class extends Behavior {
5754
5754
  const collector = findCollector(other, this.collectorGroup);
5755
5755
  if (!collector) return;
5756
5756
  this.collectedAlready = true;
5757
- this.emit("collected", this.value, collector);
5758
5757
  this.node.queueFree();
5758
+ this.emit("collected", this.value, collector);
5759
5759
  }
5760
5760
  };
5761
5761
  /**
@@ -5856,6 +5856,160 @@ var Projectile = class extends Behavior {
5856
5856
  }
5857
5857
  };
5858
5858
  //#endregion
5859
+ //#region src/gameplay/save-point.ts
5860
+ /**
5861
+ * The save, as something the scene can point a signal at.
5862
+ *
5863
+ * Every other common wiring in this engine became declarative — score to
5864
+ * screen, damage to health bar, waves, win and lose — and saving stayed the one
5865
+ * thing that needed TypeScript. The skill's own autosave example is a
5866
+ * connection to `Game.onCheckpoint`, a method the author has to go and write.
5867
+ *
5868
+ * "*When* to save is a design decision and only your game knows" is right, and
5869
+ * it is untouched here: the SCENE still says when, by choosing which signal to
5870
+ * wire — a level exit's `triggerEnter`, `won`, a key. What it gets is something
5871
+ * to wire TO.
5872
+ *
5873
+ * ```json
5874
+ * { "name": "Save", "type": "Node", "uid": "n_…",
5875
+ * "script": { "name": "SavePoint", "props": { "game": "vault", "slot": "1" } } }
5876
+ * ```
5877
+ * ```json
5878
+ * { "signal": "triggerEnter", "from": "Level/Exit", "to": "Save", "handler": "save" }
5879
+ * ```
5880
+ */
5881
+ var SavePoint = class extends Behavior {
5882
+ static props = {
5883
+ /** Namespace for this game's slots — keeps two games on one origin apart. */
5884
+ game: { default: "game" },
5885
+ /** Which slot this node writes and reads. */
5886
+ slot: { default: "1" },
5887
+ /** Shown in a load menu. */
5888
+ label: { default: "" },
5889
+ /**
5890
+ * The scene key a load should route back to. Empty = this scene's `name`.
5891
+ * The engine does not route scenes; it records what your loader will need.
5892
+ */
5893
+ scene: { default: "" },
5894
+ /** Read the slot back as soon as the scene is ready — a "Continue" boot. */
5895
+ restoreOnReady: { default: false },
5896
+ /**
5897
+ * Ask, without loading: on the first frame, emit `hasSave(label, playtime)`
5898
+ * or `noSave`. A title screen needs this and nothing else — the scene can
5899
+ * then wire `noSave → Continue.hide` and `hasSave → SlotInfo.setText`.
5900
+ */
5901
+ probeOnReady: { default: false }
5902
+ };
5903
+ static signals = [
5904
+ "saved",
5905
+ "restored",
5906
+ "noSave",
5907
+ "hasSave"
5908
+ ];
5909
+ game = "game";
5910
+ slot = "1";
5911
+ label = "";
5912
+ scene = "";
5913
+ restoreOnReady = false;
5914
+ probeOnReady = false;
5915
+ /** Seconds this run has been playing — written into the slot as `playtime`. */
5916
+ elapsed = 0;
5917
+ slots = null;
5918
+ store() {
5919
+ this.slots ??= new SaveSlots(this.game);
5920
+ return this.slots;
5921
+ }
5922
+ pendingRestore = false;
5923
+ pendingProbe = false;
5924
+ onReady() {
5925
+ this.pendingRestore = this.restoreOnReady;
5926
+ this.pendingProbe = this.probeOnReady;
5927
+ }
5928
+ update(dt) {
5929
+ if (this.pendingProbe) {
5930
+ this.pendingProbe = false;
5931
+ this.probe();
5932
+ }
5933
+ if (this.pendingRestore) {
5934
+ this.pendingRestore = false;
5935
+ this.restore();
5936
+ }
5937
+ this.elapsed += dt;
5938
+ }
5939
+ /**
5940
+ * Is there anything to continue? Emits `hasSave(label, playtime, scene)` or
5941
+ * `noSave`, and touches nothing.
5942
+ *
5943
+ * The label leads because that is what a menu shows; an unlabelled slot
5944
+ * falls back to its scene key, so `hasSave → SlotInfo.setText` always says
5945
+ * something rather than nothing.
5946
+ */
5947
+ probe() {
5948
+ const slot = this.store().read(this.slot);
5949
+ if (!slot) {
5950
+ this.emit("noSave");
5951
+ return;
5952
+ }
5953
+ this.emit("hasSave", slot.label || slot.scene, slot.playtime, slot.scene);
5954
+ }
5955
+ /** Seconds this run has been playing, including time carried over a continue. */
5956
+ get playtime() {
5957
+ return Math.round(this.elapsed);
5958
+ }
5959
+ /**
5960
+ * The scene key this slot was saved from — what a loader needs to route.
5961
+ * Null when the slot is empty.
5962
+ */
5963
+ slotScene() {
5964
+ return this.store().read(this.slot)?.scene ?? null;
5965
+ }
5966
+ /**
5967
+ * Write the run to its slot. Emits `saved(slotId)`.
5968
+ *
5969
+ * Wire it to whatever marks the moment. Extra signal arguments are ignored,
5970
+ * so `triggerEnter → save` works as-is.
5971
+ */
5972
+ save() {
5973
+ const engine = this.engine;
5974
+ this.store().write(this.slot, {
5975
+ scene: this.scene || (engine.scene?.source.name ?? ""),
5976
+ state: engine.captureState(),
5977
+ label: this.label,
5978
+ savedAt: Date.now(),
5979
+ playtime: Math.round(this.elapsed)
5980
+ });
5981
+ this.emit("saved", this.slot);
5982
+ }
5983
+ /**
5984
+ * Give this scene the slot's state back. Emits `restored(count)`, or
5985
+ * `noSave` when the slot is empty — which is what greys out a Continue button.
5986
+ *
5987
+ * Restoring does NOT route: if the slot names another scene, that is your
5988
+ * loader's business, and `slot.scene` is the key it needs.
5989
+ */
5990
+ restore() {
5991
+ const slot = this.store().read(this.slot);
5992
+ if (!slot) {
5993
+ this.emit("noSave");
5994
+ return;
5995
+ }
5996
+ const report = this.engine.restoreState(slot.state);
5997
+ this.emit("restored", report.restored);
5998
+ }
5999
+ /** Forget this slot — a "delete save" button. */
6000
+ clear() {
6001
+ this.store().remove(this.slot);
6002
+ }
6003
+ /** The run's own clock survives a save/continue cycle. */
6004
+ serialize() {
6005
+ return { playtime: Math.round(this.elapsed) };
6006
+ }
6007
+ deserialize(data) {
6008
+ const d = data;
6009
+ if (typeof d.playtime === "number" && d.playtime >= 0) this.elapsed = d.playtime;
6010
+ }
6011
+ };
6012
+ //#endregion
5859
6013
  //#region src/gameplay/score-keeper.ts
5860
6014
  /**
5861
6015
  * The game's state hub — score, lives, and win/lose detection. Put it on the
@@ -6460,6 +6614,7 @@ const GAMEPLAY_BEHAVIORS = {
6460
6614
  DamageOnContact,
6461
6615
  Interactable,
6462
6616
  Clickable,
6617
+ SavePoint,
6463
6618
  FollowCamera,
6464
6619
  Patrol,
6465
6620
  Chase,
@@ -6482,4 +6637,4 @@ function registerGameplayBehaviors(opts) {
6482
6637
  for (const [name, ctor] of Object.entries(GAMEPLAY_BEHAVIORS)) registerBehavior(name, ctor, { replace });
6483
6638
  }
6484
6639
  //#endregion
6485
- export { Water3D as A, createCausticsQuad as B, FollowCamera as C, Health as D, DamageOnContact as E, PhysicsBody3D as F, colliderFootDrop as H, RigidBody3D as I, StaticBody3D as L, WaterCutout3D as M, Area3D as N, Collector as O, CharacterBody3D as P, Node3D as R, restartScene as S, phaseOf as T, WATER_MAX_RIPPLES as V, 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, WATER_CUTOUT_MAX as j, 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, validateCollider3D as z };
6640
+ export { Chase as A, validateCollider3D as B, restartScene as C, DamageOnContact as D, phaseOf as E, CharacterBody3D as F, WATER_MAX_RIPPLES as H, PhysicsBody3D as I, RigidBody3D as L, WATER_CUTOUT_MAX as M, WaterCutout3D as N, Health as O, Area3D as P, StaticBody3D as R, goToScene as S, DayNight as T, colliderFootDrop as U, createCausticsQuad as V, Cooldown as _, Wander as a, Interactable as b, SavePoint as c, Patrol as d, PathFollow as f, CameraShake as g, Lifetime as h, WaveSpawner as i, Water3D as j, Collector as k, Projectile as l, MoveTo as m, registerGameplayBehaviors as n, Spawner as o, Oscillate as p, ZombieAI as r, ScoreKeeper as s, GAMEPLAY_BEHAVIORS as t, Pickup as u, hitStop as v, FollowCamera as w, GameFlow as x, screenFlash as y, Node3D as z };
@@ -1,4 +1,4 @@
1
- import { Et as Node, b as Engine, d as PropSchema, n as BehaviorCtor, t as Behavior } from "./behavior-62q0HWBO.js";
1
+ import { Dt as Node, b as Engine, d as PropSchema, n as BehaviorCtor, t as Behavior } from "./behavior-rZNfzVbH.js";
2
2
  import { c as JsonValue, s as JsonObject } from "./schema-CFeioQRE.js";
3
3
 
4
4
  //#region src/gameplay/chase.d.ts
@@ -375,6 +375,83 @@ declare class Projectile extends Behavior {
375
375
  private forwardFromRotation;
376
376
  }
377
377
  //#endregion
378
+ //#region src/gameplay/save-point.d.ts
379
+ /**
380
+ * The save, as something the scene can point a signal at.
381
+ *
382
+ * Every other common wiring in this engine became declarative — score to
383
+ * screen, damage to health bar, waves, win and lose — and saving stayed the one
384
+ * thing that needed TypeScript. The skill's own autosave example is a
385
+ * connection to `Game.onCheckpoint`, a method the author has to go and write.
386
+ *
387
+ * "*When* to save is a design decision and only your game knows" is right, and
388
+ * it is untouched here: the SCENE still says when, by choosing which signal to
389
+ * wire — a level exit's `triggerEnter`, `won`, a key. What it gets is something
390
+ * to wire TO.
391
+ *
392
+ * ```json
393
+ * { "name": "Save", "type": "Node", "uid": "n_…",
394
+ * "script": { "name": "SavePoint", "props": { "game": "vault", "slot": "1" } } }
395
+ * ```
396
+ * ```json
397
+ * { "signal": "triggerEnter", "from": "Level/Exit", "to": "Save", "handler": "save" }
398
+ * ```
399
+ */
400
+ declare class SavePoint extends Behavior {
401
+ static readonly props: PropSchema;
402
+ static readonly signals: readonly string[];
403
+ game: string;
404
+ slot: string;
405
+ label: string;
406
+ scene: string;
407
+ restoreOnReady: boolean;
408
+ probeOnReady: boolean;
409
+ /** Seconds this run has been playing — written into the slot as `playtime`. */
410
+ private elapsed;
411
+ private slots;
412
+ private store;
413
+ private pendingRestore;
414
+ private pendingProbe;
415
+ override onReady(): void;
416
+ override update(dt: number): void;
417
+ /**
418
+ * Is there anything to continue? Emits `hasSave(label, playtime, scene)` or
419
+ * `noSave`, and touches nothing.
420
+ *
421
+ * The label leads because that is what a menu shows; an unlabelled slot
422
+ * falls back to its scene key, so `hasSave → SlotInfo.setText` always says
423
+ * something rather than nothing.
424
+ */
425
+ probe(): void;
426
+ /** Seconds this run has been playing, including time carried over a continue. */
427
+ get playtime(): number;
428
+ /**
429
+ * The scene key this slot was saved from — what a loader needs to route.
430
+ * Null when the slot is empty.
431
+ */
432
+ slotScene(): string | null;
433
+ /**
434
+ * Write the run to its slot. Emits `saved(slotId)`.
435
+ *
436
+ * Wire it to whatever marks the moment. Extra signal arguments are ignored,
437
+ * so `triggerEnter → save` works as-is.
438
+ */
439
+ save(): void;
440
+ /**
441
+ * Give this scene the slot's state back. Emits `restored(count)`, or
442
+ * `noSave` when the slot is empty — which is what greys out a Continue button.
443
+ *
444
+ * Restoring does NOT route: if the slot names another scene, that is your
445
+ * loader's business, and `slot.scene` is the key it needs.
446
+ */
447
+ restore(): void;
448
+ /** Forget this slot — a "delete save" button. */
449
+ clear(): void;
450
+ /** The run's own clock survives a save/continue cycle. */
451
+ override serialize(): JsonValue;
452
+ override deserialize(data: JsonValue): void;
453
+ }
454
+ //#endregion
378
455
  //#region src/gameplay/score-keeper.d.ts
379
456
  /**
380
457
  * The game's state hub — score, lives, and win/lose detection. Put it on the
@@ -787,4 +864,4 @@ declare function registerGameplayBehaviors(opts?: {
787
864
  replace?: boolean;
788
865
  }): void;
789
866
  //#endregion
790
- 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 };
867
+ export { CameraShake, Chase, Collector, Cooldown, DamageOnContact, DayNight, type DayPhase, FollowCamera, GAMEPLAY_BEHAVIORS, GameFlow, type GameFlowState, Health, Interactable, Lifetime, MoveTo, Oscillate, PathFollow, Patrol, Pickup, Projectile, SavePoint, 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 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-DbaI313d.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 };
1
+ import { A as Chase, C as restartScene, D as DamageOnContact, E as phaseOf, O as Health, S as goToScene, T as DayNight, _ as Cooldown, a as Wander, b as Interactable, c as SavePoint, d as Patrol, f as PathFollow, g as CameraShake, h as Lifetime, i as WaveSpawner, k as Collector, l as Projectile, m as MoveTo, n as registerGameplayBehaviors, o as Spawner, p as Oscillate, r as ZombieAI, s as ScoreKeeper, t as GAMEPLAY_BEHAVIORS, u as Pickup, v as hitStop, w as FollowCamera, x as GameFlow, y as screenFlash } from "./gameplay-bStgtZBV.js";
2
+ export { CameraShake, Chase, Collector, Cooldown, DamageOnContact, DayNight, FollowCamera, GAMEPLAY_BEHAVIORS, GameFlow, Health, Interactable, Lifetime, MoveTo, Oscillate, PathFollow, Patrol, Pickup, Projectile, SavePoint, ScoreKeeper, Spawner, Wander, WaveSpawner, ZombieAI, goToScene, hitStop, phaseOf, registerGameplayBehaviors, restartScene, screenFlash };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { $ as suggestLocale, A as SettingsValues, At as LogLevel, B as captureBehaviors, C as EngineStats, Ct as PlayMusicOptions, Dt as NodeLifecycle, E as DeviceHints, Et as Node, F as BehaviorState, G as OrderGroup, H as SaveStore, I as RestoreReport, J as resolveOrderGroups, K as OrderGroupTable, L as SaveSlot, M as readDeviceHints, Mt as Signal, N as suggestQuality, Nt as SignalListener, O as QualityTier, Ot as SceneTree, P as Scene, Q as T_PREFIX, R as SaveSlots, S as Scheduler, St as MusicTrack, T as RendererStats, Tt as BusName, U as createSaveStore, V as restoreBehaviors, W as ORDER_GROUP_BASE, X as LocaleTables, Y as BASE_LOCALE, Z as Localization, _ as mergeStaticSignals, _t as SfxWave, a as clearBehaviors, at as Voice, b as Engine, bt as MusicBackend, c as registeredBehaviors, ct as ROLLOFF_MODELS, d as PropSchema, dt as Vec3, et as translationKey, f as clearRegistry, ft as spatialGain, g as getNodeType, gt as SfxParams, h as getNodeSignals, ht as SFX_PRESET_NAMES, i as behaviorSignals, it as isAudioContextAvailable, j as qualityEnvironment, jt as LogManager, k as Settings, kt as LogEntry, l as NodeCtor, lt as RolloffModel, m as getNodeSchema, mt as SFX_PRESETS, n as BehaviorCtor, nt as SfxEngine, o as getBehavior, ot as VoicePreset, p as createNode, pt as spatialPan, q as effectiveOrder, r as behaviorSchema, rt as SfxPlayOptions, s as registerBehavior, st as Listener, t as Behavior, tt as InputMap, u as PropDef, ut as SpatialParams, v as registerNode, vt as SynthOptions, w as GameStats, wt as AudioBuses, x as EngineOptions, xt as MusicManager, y as registeredTypes, yt as synthSfx, z as behaviorsWithoutSave } from "./behavior-62q0HWBO.js";
1
+ import { $ as T_PREFIX, A as SettingsValues, At as LogEntry, B as captureBehaviors, C as EngineStats, Ct as MusicTrack, Dt as Node, E as DeviceHints, Et as BusName, F as BehaviorState, G as ORDER_GROUP_BASE, H as savesWithoutUid, I as RestoreReport, J as effectiveOrder, K as OrderGroup, L as SaveSlot, M as readDeviceHints, Mt as LogManager, N as suggestQuality, Nt as Signal, O as QualityTier, Ot as NodeLifecycle, P as Scene, Pt as SignalListener, Q as Localization, R as SaveSlots, S as Scheduler, St as MusicManager, T as RendererStats, Tt as AudioBuses, U as SaveStore, V as restoreBehaviors, W as createSaveStore, X as BASE_LOCALE, Y as resolveOrderGroups, Z as LocaleTables, _ as mergeStaticSignals, _t as SfxParams, a as clearBehaviors, at as isAudioContextAvailable, b as Engine, bt as synthSfx, c as registeredBehaviors, ct as Listener, d as PropSchema, dt as SpatialParams, et as suggestLocale, f as clearRegistry, ft as Vec3, g as getNodeType, gt as SFX_PRESET_NAMES, h as getNodeSignals, ht as SFX_PRESETS, i as behaviorSignals, it as SfxPlayOptions, j as qualityEnvironment, jt as LogLevel, k as Settings, kt as SceneTree, l as NodeCtor, lt as ROLLOFF_MODELS, m as getNodeSchema, mt as spatialPan, n as BehaviorCtor, nt as InputMap, o as getBehavior, ot as Voice, p as createNode, pt as spatialGain, q as OrderGroupTable, r as behaviorSchema, rt as SfxEngine, s as registerBehavior, st as VoicePreset, t as Behavior, tt as translationKey, u as PropDef, ut as RolloffModel, v as registerNode, vt as SfxWave, w as GameStats, wt as PlayMusicOptions, x as EngineOptions, xt as MusicBackend, y as registeredTypes, yt as SynthOptions, z as behaviorsWithoutSave } from "./behavior-rZNfzVbH.js";
2
2
  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-CFeioQRE.js";
3
- import { n as loadScene, t as LoadSceneOptions } from "./loader-CeyU_bm1.js";
3
+ import { n as loadScene, t as LoadSceneOptions } from "./loader-Dkbn56KC.js";
4
4
  import { i as resolveFrames, n as AnimationEntry, r as resolveAnimation, t as AnimationDef } from "./sprite-animation-CMr6f1K2.js";
5
5
  import { n as ParticleSimConfig, r as ParticleView, t as ParticleSim } from "./particle-sim-BzJ1yxoE.js";
6
- import { a as AudioElementLike, i as gridFromRows, n as PathGrid, o as AudioPlayer, r as findPath, t as FindPathOptions } from "./pathfinding-C49JSNNq.js";
7
- import { a as startRecording, c as IncantoErrorDetails, i as replay, l as auditScene, n as ReplayEvent, o as IncantoError, r as ReplayJson, s as IncantoErrorCode, t as Recorder } from "./replay-DYdy1wb0.js";
6
+ import { a as AudioElementLike, i as gridFromRows, n as PathGrid, o as AudioPlayer, r as findPath, t as FindPathOptions } from "./pathfinding-Bz34pvQD.js";
7
+ import { a as startRecording, c as IncantoErrorDetails, i as replay, l as auditScene, n as ReplayEvent, o as IncantoError, r as ReplayJson, s as IncantoErrorCode, t as Recorder } from "./replay-DIP2_as4.js";
8
8
 
9
9
  //#region src/core/audio/crossfade.d.ts
10
10
  /**
@@ -258,6 +258,15 @@ declare class HudLayer extends Node {
258
258
  }
259
259
  /** Shared plumbing: mount into the parent HudLayer's anchor slot. */
260
260
  declare abstract class HudWidgetBase extends Node {
261
+ /**
262
+ * Wireable visibility: `noSave → Continue.hide`.
263
+ *
264
+ * `visible` is a prop, and a `connections[]` handler has to be a METHOD — the
265
+ * same wall that kept a score off the screen until widgets grew `setText`. A
266
+ * title screen greying out its own Continue button is the case that asked.
267
+ */
268
+ show(..._args: unknown[]): void;
269
+ hide(): void;
261
270
  static readonly props: PropSchema;
262
271
  static readonly signals: readonly string[];
263
272
  anchor: HudAnchor;
@@ -848,4 +857,4 @@ declare function computeViewport(canvasW: number, canvasH: number, viewport: {
848
857
  /** Engine version. Kept in sync with package.json by the release pipeline. */
849
858
  declare const VERSION: string;
850
859
  //#endregion
851
- export { type AnimationDef, type AnimationEntry, type AssetFailure, AudioBuses, type AudioElementLike, AudioPlayer, BASE_LOCALE, Behavior, type BehaviorCtor, type BehaviorState, type BusName, CONST_REF_KEY, type ComputedViewport, type ConnectionJson, type CrossfadeGains, type DebugLineSource, type DeviceHints, type DriveScript, type DriveStep, Engine, type EngineOptions, type EngineStats, type FindPathOptions, type GameStats, type GroupedLog, type HudAnchor, HudLayer, IncantoError, type IncantoErrorCode, type IncantoErrorDetails, InputMap, type JsonKind, type JsonObject, type JsonValue, type Listener, type LiveInput, type LiveReport, type LoadSceneOptions, type LocaleTables, Localization, type LogEntry, type LogLevel, LogManager, type MusicBackend, MusicManager, type MusicTrack, Node, type NodeCtor, type NodeJson, type NodeLifecycle, ORDER_GROUP_BASE, type OrderGroup, type OrderGroupTable, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, type ParsedNodePath, type ParticlePresetValues, ParticleSim, type ParticleSimConfig, type ParticleView, type PathGrid, type PlayMusicOptions, type PreloadResult, type PropDef, type PropSchema, type QualityTier, ROLLOFF_MODELS, type Recorder, type RendererStats, type ReplayEvent, type ReplayJson, type ResolvedRendering, type ResolvedViewport, type RestoreReport, Rng, type RolloffModel, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, type SaveSlot, SaveSlots, type SaveStore, Scene, type SceneJson, SceneTree, type Scheduler, Settings, type SettingsValues, SfxEngine, type SfxParams, type SfxPlayOptions, type SfxWave, Signal, type SignalListener, type SpatialParams, type SynthOptions, T_PREFIX, Timer, TouchControls, type TouchControlsOptions, UiBanner, UiBar, UiButton, UiDialogue, UiImage, UiPanel, UiSelect, UiSlider, UiText, UiToggle, VERSION, type Vec3, type ViewportFit, type Voice, type VoicePreset, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, auditScene, behaviorSchema, behaviorSignals, behaviorsWithoutSave, captureBehaviors, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, findPath, getBehavior, getNodeSchema, getNodeSignals, getNodeType, gridFromRows, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, logReport, logText, mergeStaticSignals, newUid, parseDrive, parseNodePath, preloadUrls, qualityEnvironment, readDeviceHints, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, replay, resolveAnimation, resolveConstants, resolveFrames, resolveOrderGroups, resolveRendering, resolveViewport, restoreBehaviors, serializeNode, spatialGain, spatialPan, startRecording, suggestLocale, suggestQuality, synthSfx, translationKey };
860
+ export { type AnimationDef, type AnimationEntry, type AssetFailure, AudioBuses, type AudioElementLike, AudioPlayer, BASE_LOCALE, Behavior, type BehaviorCtor, type BehaviorState, type BusName, CONST_REF_KEY, type ComputedViewport, type ConnectionJson, type CrossfadeGains, type DebugLineSource, type DeviceHints, type DriveScript, type DriveStep, Engine, type EngineOptions, type EngineStats, type FindPathOptions, type GameStats, type GroupedLog, type HudAnchor, HudLayer, IncantoError, type IncantoErrorCode, type IncantoErrorDetails, InputMap, type JsonKind, type JsonObject, type JsonValue, type Listener, type LiveInput, type LiveReport, type LoadSceneOptions, type LocaleTables, Localization, type LogEntry, type LogLevel, LogManager, type MusicBackend, MusicManager, type MusicTrack, Node, type NodeCtor, type NodeJson, type NodeLifecycle, ORDER_GROUP_BASE, type OrderGroup, type OrderGroupTable, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, type ParsedNodePath, type ParticlePresetValues, ParticleSim, type ParticleSimConfig, type ParticleView, type PathGrid, type PlayMusicOptions, type PreloadResult, type PropDef, type PropSchema, type QualityTier, ROLLOFF_MODELS, type Recorder, type RendererStats, type ReplayEvent, type ReplayJson, type ResolvedRendering, type ResolvedViewport, type RestoreReport, Rng, type RolloffModel, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, type SaveSlot, SaveSlots, type SaveStore, Scene, type SceneJson, SceneTree, type Scheduler, Settings, type SettingsValues, SfxEngine, type SfxParams, type SfxPlayOptions, type SfxWave, Signal, type SignalListener, type SpatialParams, type SynthOptions, T_PREFIX, Timer, TouchControls, type TouchControlsOptions, UiBanner, UiBar, UiButton, UiDialogue, UiImage, UiPanel, UiSelect, UiSlider, UiText, UiToggle, VERSION, type Vec3, type ViewportFit, type Voice, type VoicePreset, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, auditScene, behaviorSchema, behaviorSignals, behaviorsWithoutSave, captureBehaviors, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, findPath, getBehavior, getNodeSchema, getNodeSignals, getNodeType, gridFromRows, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, logReport, logText, mergeStaticSignals, newUid, parseDrive, parseNodePath, preloadUrls, qualityEnvironment, readDeviceHints, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, replay, resolveAnimation, resolveConstants, resolveFrames, resolveOrderGroups, resolveRendering, resolveViewport, restoreBehaviors, savesWithoutUid, serializeNode, spatialGain, spatialPan, startRecording, suggestLocale, suggestQuality, synthSfx, translationKey };
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { C as getBehavior, E as Signal, S as clearBehaviors, T as registeredBehaviors, _ as InputMap, a as SCENE_FORMAT, b as behaviorSchema, c as SceneTree, d as resolveConstants, f as Node, g as resolveOrderGroups, h as effectiveOrder, i as serializeNode, l as CONST_REF_KEY, m as ORDER_GROUP_BASE, n as loadScene, o as computeViewport, p as parseNodePath, r as Scene, s as resolveViewport, u as isConstRef, w as registerBehavior, x as behaviorSignals, y as Behavior } from "./loader-DwazzlQb.js";
2
- import { A as T_PREFIX, B as synthSfx, C as behaviorsWithoutSave, D as LogManager, E as createSaveStore, F as ROLLOFF_MODELS, G as AudioBuses, H as WebAudioMusicBackend, I as spatialGain, L as spatialPan, M as translationKey, N as SfxEngine, O as BASE_LOCALE, P as isAudioContextAvailable, R as SFX_PRESETS, S as SaveSlots, T as restoreBehaviors, U as crossfadeGains, V as MusicManager, W as fadeGain, a as UiSlider, b as readDeviceHints, c as UiButton, d as UiBanner, f as UiBar, g as Settings, h as Engine, i as UiSelect, j as suggestLocale, k as Localization, l as UiDialogue, m as AudioPlayer, n as UiImage, o as UiToggle, p as UiText, r as UiPanel, s as Timer, t as registerCoreNodes, u as HudLayer, v as qualityEnvironment, w as captureBehaviors, x as suggestQuality, z as SFX_PRESET_NAMES } from "./register-uvaZj1KX.js";
1
+ import { A as registerBehavior, C as InputMap, D as behaviorSignals, E as behaviorSchema, M as Signal, O as clearBehaviors, S as resolveOrderGroups, T as Behavior, _ as restoreBehaviors, a as SCENE_FORMAT, b as ORDER_GROUP_BASE, c as SceneTree, d as resolveConstants, f as Node, g as captureBehaviors, h as behaviorsWithoutSave, i as serializeNode, j as registeredBehaviors, k as getBehavior, l as CONST_REF_KEY, m as SaveSlots, n as loadScene, o as computeViewport, p as parseNodePath, r as Scene, s as resolveViewport, u as isConstRef, v as savesWithoutUid, x as effectiveOrder, y as createSaveStore } from "./loader-B2asghWa.js";
2
+ import { A as ROLLOFF_MODELS, B as AudioBuses, C as BASE_LOCALE, D as translationKey, E as suggestLocale, F as synthSfx, I as MusicManager, L as WebAudioMusicBackend, M as spatialPan, N as SFX_PRESETS, O as SfxEngine, P as SFX_PRESET_NAMES, R as crossfadeGains, S as LogManager, T as T_PREFIX, a as UiSlider, b as readDeviceHints, c as UiButton, d as UiBanner, f as UiBar, g as Settings, h as Engine, i as UiSelect, j as spatialGain, k as isAudioContextAvailable, l as UiDialogue, m as AudioPlayer, n as UiImage, o as UiToggle, p as UiText, r as UiPanel, s as Timer, t as registerCoreNodes, u as HudLayer, v as qualityEnvironment, w as Localization, x as suggestQuality, z as fadeGain } from "./register-CGq-Hee8.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { t as Rng } from "./rng-DP-SR7eg.js";
5
- import { n as startRecording, r as auditScene, t as replay } from "./replay-j-m6lJ4W.js";
5
+ import { n as startRecording, r as auditScene, t as replay } from "./replay-BgKxGcXH.js";
6
6
  import { n as jsonEquals, r as jsonKind, t as jsonClone } from "./json-BLk7H2Qa.js";
7
7
  import { a as getNodeSignals, c as mergeStaticSignals, i as getNodeSchema, l as registerNode, n as clearRegistry, o as getNodeType, r as createNode, u as registeredTypes } from "./registry-IyWCGe4q.js";
8
8
  import { n as logText, r as parseDrive, t as logReport } from "./log-report-lxrQY9cH.js";
9
9
  import { t as createNoise2D } from "./noise-CGUMx44x.js";
10
10
  import { a as PARTICLE_PRESETS, i as ParticleSim, n as resolveFrames, o as PARTICLE_PRESET_NAMES, s as applyParticlePreset, t as resolveAnimation } from "./sprite-animation-D_p28jwU.js";
11
- import { a as findPath, i as preloadUrls, n as newUid, o as gridFromRows, r as assetUrls, t as VERSION } from "./src-B3HrKuAi.js";
11
+ import { a as findPath, i as preloadUrls, n as newUid, o as gridFromRows, r as assetUrls, t as VERSION } from "./src-C3UwzYXl.js";
12
12
  import { i as resolveRendering, n as attachTouchControls, r as joystickVector, t as TouchControls } from "./touch-BoNg_MnF.js";
13
- import { t as duplicateNode } from "./duplicate-CI9WF_bg.js";
14
- export { AudioBuses, AudioPlayer, BASE_LOCALE, Behavior, CONST_REF_KEY, Engine, HudLayer, IncantoError, InputMap, Localization, LogManager, MusicManager, Node, ORDER_GROUP_BASE, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, ParticleSim, ROLLOFF_MODELS, Rng, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, SaveSlots, Scene, SceneTree, Settings, SfxEngine, Signal, T_PREFIX, Timer, TouchControls, UiBanner, UiBar, UiButton, UiDialogue, UiImage, UiPanel, UiSelect, UiSlider, UiText, UiToggle, VERSION, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, auditScene, behaviorSchema, behaviorSignals, behaviorsWithoutSave, captureBehaviors, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, findPath, getBehavior, getNodeSchema, getNodeSignals, getNodeType, gridFromRows, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, logReport, logText, mergeStaticSignals, newUid, parseDrive, parseNodePath, preloadUrls, qualityEnvironment, readDeviceHints, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, replay, resolveAnimation, resolveConstants, resolveFrames, resolveOrderGroups, resolveRendering, resolveViewport, restoreBehaviors, serializeNode, spatialGain, spatialPan, startRecording, suggestLocale, suggestQuality, synthSfx, translationKey };
13
+ import { t as duplicateNode } from "./duplicate-EybyYeyL.js";
14
+ export { AudioBuses, AudioPlayer, BASE_LOCALE, Behavior, CONST_REF_KEY, Engine, HudLayer, IncantoError, InputMap, Localization, LogManager, MusicManager, Node, ORDER_GROUP_BASE, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, ParticleSim, ROLLOFF_MODELS, Rng, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, SaveSlots, Scene, SceneTree, Settings, SfxEngine, Signal, T_PREFIX, Timer, TouchControls, UiBanner, UiBar, UiButton, UiDialogue, UiImage, UiPanel, UiSelect, UiSlider, UiText, UiToggle, VERSION, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, auditScene, behaviorSchema, behaviorSignals, behaviorsWithoutSave, captureBehaviors, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, findPath, getBehavior, getNodeSchema, getNodeSignals, getNodeType, gridFromRows, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, logReport, logText, mergeStaticSignals, newUid, parseDrive, parseNodePath, preloadUrls, qualityEnvironment, readDeviceHints, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, replay, resolveAnimation, resolveConstants, resolveFrames, resolveOrderGroups, resolveRendering, resolveViewport, restoreBehaviors, savesWithoutUid, serializeNode, spatialGain, spatialPan, startRecording, suggestLocale, suggestQuality, synthSfx, translationKey };