incanto 0.33.0 → 0.34.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 (42) hide show
  1. package/dist/2d.d.ts +2 -2
  2. package/dist/2d.js +3 -3
  3. package/dist/3d.d.ts +3 -3
  4. package/dist/3d.js +4 -4
  5. package/dist/{behavior-CKwTCjfR.d.ts → behavior-CtPScDMo.d.ts} +9 -0
  6. package/dist/{create-game-D2QU5x7S.js → create-game-CFNqoqOX.js} +5 -5
  7. package/dist/{create-game-sFuTLqjD.js → create-game-QTfghzwM.js} +5 -5
  8. package/dist/debug.d.ts +1 -1
  9. package/dist/{duplicate-BgnG1Lqz.js → duplicate-DlOvknDO.js} +1 -1
  10. package/dist/{environment-presets-CQtEGogB.js → environment-presets-B6WiUsaO.js} +2 -2
  11. package/dist/{gameplay-BpQCbABv.js → gameplay-BxFtmfSe.js} +2 -2
  12. package/dist/gameplay.d.ts +1 -1
  13. package/dist/gameplay.js +1 -1
  14. package/dist/index.d.ts +53 -3
  15. package/dist/index.js +4 -4
  16. package/dist/{loader-Buk8Bu1h.js → loader-BwR0DxeM.js} +13 -0
  17. package/dist/{loader-COn5fS0o.d.ts → loader-DmXfj6Uv.d.ts} +1 -1
  18. package/dist/net.d.ts +1 -1
  19. package/dist/net.js +3 -3
  20. package/dist/{pathfinding-DUw9mir9.d.ts → pathfinding-DRCe89SI.d.ts} +1 -1
  21. package/dist/{physics-2d-DjXR5DMu.js → physics-2d-BuyAwsW5.js} +2 -2
  22. package/dist/{physics-3d-DF8npb1O.js → physics-3d-C8Kn_Nyb.js} +3 -3
  23. package/dist/react.d.ts +1 -1
  24. package/dist/react.js +1 -1
  25. package/dist/{register-FIJtNbub.js → register-BLPC10Mj.js} +3 -3
  26. package/dist/{register-CscIzJEO.js → register-G3edsjJ2.js} +208 -10
  27. package/dist/{register-CtI-itec.js → register-OodmuUMK.js} +2 -2
  28. package/dist/{test-BRxLd2jH.js → test-C4B5znap.js} +10 -10
  29. package/dist/test.d.ts +2 -2
  30. package/dist/test.js +1 -1
  31. package/dist/vite.js +1 -1
  32. package/editor/assets/{agent8-BdDP3xKW.js → agent8-BTODHtdM.js} +1 -1
  33. package/editor/assets/{debug-DbjTyTlC.js → debug-CJEz4EwC.js} +1 -1
  34. package/editor/assets/{index-BWCudoz1.js → index-BYCso8Bf.js} +90 -90
  35. package/editor/index.html +1 -1
  36. package/package.json +1 -1
  37. package/schemas/scene.schema.json +142 -6
  38. package/skills/incanto-hud.md +57 -1
  39. package/skills/incanto-node-reference.md +45 -6
  40. package/templates-app/beacon-isle-3d/package.json +1 -1
  41. package/templates-app/tps-3d/package.json +1 -1
  42. package/templates-app/village-quest-3d/package.json +1 -1
package/dist/2d.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { C as RendererStats, N as Scene$1, S as GameStats, at as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine } from "./behavior-CKwTCjfR.js";
1
+ import { C as RendererStats, N as Scene$1, S as GameStats, at as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine } from "./behavior-CtPScDMo.js";
2
2
  import { n as DiagnosticSink, t as EditorSwitchOptions } from "./editor-switch-BJb-CWfA.js";
3
3
  import { i as SceneJson, s as JsonObject } from "./schema-CcoWb32N.js";
4
- import { t as LoadSceneOptions } from "./loader-COn5fS0o.js";
4
+ import { t as LoadSceneOptions } from "./loader-DmXfj6Uv.js";
5
5
  import { t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
6
6
  import { Group, Mesh, Object3D, Scene, Texture } from "three";
7
7
  import * as RapierNs from "@dimforge/rapier2d-compat";
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-D2QU5x7S.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-FIJtNbub.js";
4
- import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-DjXR5DMu.js";
2
+ import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-CFNqoqOX.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-BLPC10Mj.js";
4
+ import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-BuyAwsW5.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,9 +1,9 @@
1
- import { C as RendererStats, N as Scene$1, S as GameStats, at as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine } from "./behavior-CKwTCjfR.js";
1
+ import { C as RendererStats, N as Scene$1, S as GameStats, at as Node, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine } from "./behavior-CtPScDMo.js";
2
2
  import { n as DiagnosticSink, t as EditorSwitchOptions } from "./editor-switch-BJb-CWfA.js";
3
3
  import { i as SceneJson, s as JsonObject } from "./schema-CcoWb32N.js";
4
- import { t as LoadSceneOptions } from "./loader-COn5fS0o.js";
4
+ import { t as LoadSceneOptions } from "./loader-DmXfj6Uv.js";
5
5
  import { t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
6
- import { n as PathGrid, s as SpatialPose } from "./pathfinding-DUw9mir9.js";
6
+ import { n as PathGrid, s as SpatialPose } from "./pathfinding-DRCe89SI.js";
7
7
  import { AnimationClip, AnimationMixer, BufferGeometry, Color, DirectionalLight, Group, InstancedMesh, Mesh, MeshPhysicalMaterial, Object3D, PerspectiveCamera, Scene, ShaderMaterial, Vector3, WebGLRenderer } from "three";
8
8
  import { VRM } from "@pixiv/three-vrm";
9
9
  import { Sky } from "three/examples/jsm/objects/Sky.js";
package/dist/3d.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
2
- 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-BpQCbABv.js";
3
- 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-sFuTLqjD.js";
4
- import { A as Terrain3D, B as keyboardIntensity, C as resolveFlowerDensity, D as BoneLookAt3D, E as Camera3D, F as InstancedMesh3D, 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, V as movementState, _ 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-CQtEGogB.js";
2
+ 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-BxFtmfSe.js";
3
+ 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-QTfghzwM.js";
4
+ import { A as Terrain3D, B as keyboardIntensity, C as resolveFlowerDensity, D as BoneLookAt3D, E as Camera3D, F as InstancedMesh3D, 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, V as movementState, _ 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-B6WiUsaO.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-DF8npb1O.js";
6
+ import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-C8Kn_Nyb.js";
7
7
  //#region src/3d/environment-runtime.ts
8
8
  /**
9
9
  * Live environment editing — the renderer re-applies `scene.environment`
@@ -734,6 +734,15 @@ declare class InputMap {
734
734
  * is ceremony. Buttons already live in the key set as `Mouse0`/`Mouse1`/…;
735
735
  * these read them directly. 0 left, 1 middle, 2 right.
736
736
  */
737
+ /**
738
+ * Is this raw CODE down / just pressed? (`'ArrowUp'`, `'Enter'`, `'Pad12'`…)
739
+ *
740
+ * Menu navigation is not a bindable action — there is no key to remap, and
741
+ * asking every scene to declare `"menuUp": { "keys": ["ArrowUp", "Pad12"] }`
742
+ * is ceremony for something every menu on every platform does the same way.
743
+ */
744
+ keyPressed(code: string): boolean;
745
+ keyJustPressed(code: string): boolean;
737
746
  mousePressed(button?: number): boolean;
738
747
  mouseJustPressed(button?: number): boolean;
739
748
  mouseJustReleased(button?: number): boolean;
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { m as diagnose, n as loadScene, o as computeViewport, s as resolveViewport, y as registerBehavior } from "./loader-Buk8Bu1h.js";
3
- import { h as Engine, m as AudioPlayer } from "./register-CscIzJEO.js";
2
+ import { m as diagnose, n as loadScene, o as computeViewport, s as resolveViewport, y as registerBehavior } from "./loader-BwR0DxeM.js";
3
+ import { h as Engine, m as AudioPlayer } from "./register-G3edsjJ2.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 { i as openBundledEditor, n as crossFade, r as devServerLibrary, t as teardown } from "./teardown-ByzfDPyu.js";
7
- import { n as registerGameplayBehaviors } from "./gameplay-BpQCbABv.js";
8
- import { g as PhysicsBody2D, n as UILayer, t as registerNodes2D, u as Camera2D, y as Node2D } from "./register-FIJtNbub.js";
7
+ import { n as registerGameplayBehaviors } from "./gameplay-BxFtmfSe.js";
8
+ import { g as PhysicsBody2D, n as UILayer, t as registerNodes2D, u as Camera2D, y as Node2D } from "./register-BLPC10Mj.js";
9
9
  import { t as debugSources } from "./debug-draw-BM3DsvtT.js";
10
- import { n as enablePhysics2D } from "./physics-2d-DjXR5DMu.js";
10
+ import { n as enablePhysics2D } from "./physics-2d-BuyAwsW5.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
  /**
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { m as diagnose, n as loadScene, y as registerBehavior } from "./loader-Buk8Bu1h.js";
3
- import { h as Engine, m as AudioPlayer } from "./register-CscIzJEO.js";
2
+ import { m as diagnose, n as loadScene, y as registerBehavior } from "./loader-BwR0DxeM.js";
3
+ import { h as Engine, m as AudioPlayer } from "./register-G3edsjJ2.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 poseFromRenderer, i as openBundledEditor, n as crossFade, r as devServerLibrary, t as teardown } from "./teardown-ByzfDPyu.js";
7
- import { B as createCausticsQuad, F as PhysicsBody3D, R as Node3D, n as registerGameplayBehaviors } from "./gameplay-BpQCbABv.js";
7
+ import { B as createCausticsQuad, F as PhysicsBody3D, R as Node3D, n as registerGameplayBehaviors } from "./gameplay-BxFtmfSe.js";
8
8
  import { t as debugSources } from "./debug-draw-BM3DsvtT.js";
9
- import { E as Camera3D, g as ModelInstance3D, n as registerNodes3D, t as resolveEnvironmentHdri, v as DirectionalLight3D } from "./environment-presets-CQtEGogB.js";
10
- import { n as enablePhysics3D } from "./physics-3d-DF8npb1O.js";
9
+ import { E as Camera3D, g as ModelInstance3D, n as registerNodes3D, t as resolveEnvironmentHdri, v as DirectionalLight3D } from "./environment-presets-B6WiUsaO.js";
10
+ import { n as enablePhysics3D } from "./physics-3d-C8Kn_Nyb.js";
11
11
  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";
12
12
  import { VRMLoaderPlugin, VRMUtils } from "@pixiv/three-vrm";
13
13
  import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
package/dist/debug.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as RendererStats, lt as LogLevel, v as Engine } from "./behavior-CKwTCjfR.js";
1
+ import { C as RendererStats, lt as LogLevel, v as Engine } from "./behavior-CtPScDMo.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-Buk8Bu1h.js";
1
+ import { i as serializeNode, t as buildNodeJson } from "./loader-BwR0DxeM.js";
2
2
  //#region src/core/order-groups.ts
3
3
  const ORDER_GROUP_BASE = {
4
4
  background: -2e3,
@@ -1,10 +1,10 @@
1
- import { t as registerCoreNodes } from "./register-CscIzJEO.js";
1
+ import { t as registerCoreNodes } from "./register-G3edsjJ2.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-CJdGpT2V.js";
5
5
  import { t as createNoise2D } from "./noise-CGUMx44x.js";
6
6
  import { i as applyParticlePreset, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-Bw7hB93B.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-BpQCbABv.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-BxFtmfSe.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, Color, ConeGeometry, CylinderGeometry, DataTexture, DirectionalLight, DoubleSide, DynamicDrawUsage, Euler, Group, IcosahedronGeometry, ImageBitmapLoader, InstancedBufferAttribute, InstancedMesh, LinearFilter, LoopOnce, LoopRepeat, Matrix4, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshPhysicalMaterial, MeshStandardMaterial, NearestFilter, NoBlending, 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, g as Behavior, n as loadScene, y as registerBehavior } from "./loader-Buk8Bu1h.js";
1
+ import { f as Node, g as Behavior, n as loadScene, y as registerBehavior } from "./loader-BwR0DxeM.js";
2
2
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
3
3
  import { t as jsonClone } from "./json-BLk7H2Qa.js";
4
- import { r as effectiveOrder, t as duplicateNode } from "./duplicate-BgnG1Lqz.js";
4
+ import { r as effectiveOrder, t as duplicateNode } from "./duplicate-DlOvknDO.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();
@@ -1,4 +1,4 @@
1
- import { at as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-CKwTCjfR.js";
1
+ import { at as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-CtPScDMo.js";
2
2
  import { c as JsonValue, s as JsonObject } from "./schema-CcoWb32N.js";
3
3
 
4
4
  //#region src/gameplay/chase.d.ts
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-BpQCbABv.js";
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-BxFtmfSe.js";
2
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
- import { $ as MusicBackend, A as suggestQuality, B as Listener, C as RendererStats, D as SettingsValues, E as Settings, F as SfxEngine, G as spatialGain, H as RolloffModel, I as SfxPlayOptions, J as SFX_PRESET_NAMES, K as spatialPan, L as isAudioContextAvailable, M as createSaveStore, N as Scene, O as qualityEnvironment, P as InputMap, Q as synthSfx, R as Voice, S as GameStats, T as QualityTier, U as SpatialParams, V as ROLLOFF_MODELS, W as Vec3, X as SfxWave, Y as SfxParams, Z as SynthOptions, _ as registeredTypes, a as registerBehavior, at as Node, b as Scheduler, c as PropDef, ct as LogEntry, d as createNode, dt as Signal, et as MusicManager, f as getNodeSchema, ft as SignalListener, g as registerNode, h as mergeStaticSignals, i as getBehavior, it as BusName, j as SaveStore, k as readDeviceHints, l as PropSchema, lt as LogLevel, m as getNodeType, n as BehaviorCtor, nt as PlayMusicOptions, o as registeredBehaviors, ot as NodeLifecycle, p as getNodeSignals, q as SFX_PRESETS, r as clearBehaviors, rt as AudioBuses, s as NodeCtor, st as SceneTree, t as Behavior, tt as MusicTrack, u as clearRegistry, ut as LogManager, v as Engine, w as DeviceHints, x as EngineStats, y as EngineOptions, z as VoicePreset } from "./behavior-CKwTCjfR.js";
1
+ import { $ as MusicBackend, A as suggestQuality, B as Listener, C as RendererStats, D as SettingsValues, E as Settings, F as SfxEngine, G as spatialGain, H as RolloffModel, I as SfxPlayOptions, J as SFX_PRESET_NAMES, K as spatialPan, L as isAudioContextAvailable, M as createSaveStore, N as Scene, O as qualityEnvironment, P as InputMap, Q as synthSfx, R as Voice, S as GameStats, T as QualityTier, U as SpatialParams, V as ROLLOFF_MODELS, W as Vec3, X as SfxWave, Y as SfxParams, Z as SynthOptions, _ as registeredTypes, a as registerBehavior, at as Node, b as Scheduler, c as PropDef, ct as LogEntry, d as createNode, dt as Signal, et as MusicManager, f as getNodeSchema, ft as SignalListener, g as registerNode, h as mergeStaticSignals, i as getBehavior, it as BusName, j as SaveStore, k as readDeviceHints, l as PropSchema, lt as LogLevel, m as getNodeType, n as BehaviorCtor, nt as PlayMusicOptions, o as registeredBehaviors, ot as NodeLifecycle, p as getNodeSignals, q as SFX_PRESETS, r as clearBehaviors, rt as AudioBuses, s as NodeCtor, st as SceneTree, t as Behavior, tt as MusicTrack, u as clearRegistry, ut as LogManager, v as Engine, w as DeviceHints, x as EngineStats, y as EngineOptions, z as VoicePreset } from "./behavior-CtPScDMo.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-CcoWb32N.js";
3
- import { n as loadScene, t as LoadSceneOptions } from "./loader-COn5fS0o.js";
3
+ import { n as loadScene, t as LoadSceneOptions } from "./loader-DmXfj6Uv.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-DUw9mir9.js";
5
+ import { a as AudioElementLike, i as gridFromRows, n as PathGrid, o as AudioPlayer, r as findPath, t as FindPathOptions } from "./pathfinding-DRCe89SI.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
@@ -120,6 +120,7 @@ declare class HudLayer extends Node {
120
120
  static readonly props: PropSchema;
121
121
  zIndex: number;
122
122
  visible: boolean;
123
+ focusNavigation: boolean;
123
124
  /** @internal root overlay element (null headless). */
124
125
  _element: HTMLElement | null;
125
126
  private readonly slots;
@@ -138,14 +139,40 @@ declare class HudLayer extends Node {
138
139
  private _mount;
139
140
  override onExitTree(): void;
140
141
  override update(): void;
142
+ /**
143
+ * Arrow keys / d-pad move the focus, Enter / A activates it.
144
+ *
145
+ * Off by default: a game whose HUD has a button must not lose its arrow keys
146
+ * to a menu the moment one exists. Turn it on for the screens that ARE menus
147
+ * (`"focusNavigation": true` on the pause panel's layer), and off again when
148
+ * play resumes.
149
+ */
150
+ private stepFocus;
151
+ /** Focusable widgets under this layer, in tree order. */
152
+ private focusables;
153
+ /** Move focus to a widget by hand — opening a menu should start somewhere. */
154
+ focus(widget: HudWidgetBase | null): void;
141
155
  /** @internal Widgets mount into per-anchor flex columns. */
142
156
  _slot(anchor: HudAnchor): HTMLElement | null;
143
157
  }
144
158
  /** Shared plumbing: mount into the parent HudLayer's anchor slot. */
145
159
  declare abstract class HudWidgetBase extends Node {
146
160
  static readonly props: PropSchema;
161
+ static readonly signals: readonly string[];
147
162
  anchor: HudAnchor;
148
163
  visible: boolean;
164
+ focusable: boolean;
165
+ draggable: boolean;
166
+ dropTarget: boolean;
167
+ /** @internal Set by the owning HudLayer while this widget has focus. */
168
+ _focused: boolean;
169
+ /**
170
+ * @internal Confirm (`dir` 0) or nudge (-1 left / +1 right) — what pressing
171
+ * A or an arrow ON this widget means. Default: nothing.
172
+ */
173
+ _activate(_dir: number): void;
174
+ /** @internal Draw the focus ring. Overridable if a widget wants its own. */
175
+ _paintFocus(): void;
149
176
  /** @internal */
150
177
  _element: HTMLElement | null;
151
178
  protected abstract _build(): HTMLElement;
@@ -161,6 +188,17 @@ declare abstract class HudWidgetBase extends Node {
161
188
  * anything attached at runtime before its host existed.
162
189
  */
163
190
  _mountWidget(): void;
191
+ /**
192
+ * Drag and drop, on the DOM the engine already builds.
193
+ *
194
+ * An inventory is the one screen where "click it" is not enough, and every
195
+ * game that wanted one dropped out of scene JSON to hand-roll pointer
196
+ * handlers. The whole gesture is four signals and no new node type: a
197
+ * `draggable` widget emits `dragStarted` and, if it lands on one,
198
+ * `droppedOn(target)`; a `dropTarget` emits `dropped(source)`. Who owns the
199
+ * ITEM is the game's business — this reports the gesture, not a model.
200
+ */
201
+ private _wireDrag;
164
202
  /** The nearest ancestor that holds widgets itself (a UiPanel). */
165
203
  private host;
166
204
  override onExitTree(): void;
@@ -244,6 +282,9 @@ declare class UiButton extends HudWidgetBase {
244
282
  color: string;
245
283
  background: string;
246
284
  disabled: boolean;
285
+ override focusable: boolean;
286
+ /** Enter / A on a focused button is a press. */
287
+ override _activate(_dir: number): void;
247
288
  private lastText;
248
289
  /** Programmatic press — same path as a click (tests, gamepad menus). */
249
290
  press(): void;
@@ -392,6 +433,9 @@ declare class UiSlider extends HudWidgetBase {
392
433
  step: number;
393
434
  width: number;
394
435
  color: string;
436
+ override focusable: boolean;
437
+ /** Left/right nudge by one step — the only sane thing a d-pad can mean here. */
438
+ override _activate(dir: number): void;
395
439
  private input;
396
440
  private text;
397
441
  private last;
@@ -405,6 +449,9 @@ declare class UiToggle extends HudWidgetBase {
405
449
  static override readonly signals: readonly string[];
406
450
  label: string;
407
451
  value: boolean;
452
+ override focusable: boolean;
453
+ /** Confirm flips it; left/right set it explicitly, which reads better on a pad. */
454
+ override _activate(dir: number): void;
408
455
  private input;
409
456
  private last;
410
457
  protected _build(): HTMLElement;
@@ -418,6 +465,9 @@ declare class UiSelect extends HudWidgetBase {
418
465
  label: string;
419
466
  options: string;
420
467
  value: string;
468
+ override focusable: boolean;
469
+ /** Left/right (and confirm) walk the list — a select has no other gesture. */
470
+ override _activate(dir: number): void;
421
471
  private select;
422
472
  private lastOptions;
423
473
  private last;
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { _ as clearBehaviors, a as SCENE_FORMAT, b as registeredBehaviors, c as SceneTree, d as resolveConstants, f as Node, g as Behavior, h as InputMap, i as serializeNode, l as CONST_REF_KEY, n as loadScene, o as computeViewport, p as parseNodePath, r as Scene, s as resolveViewport, u as isConstRef, v as getBehavior, x as Signal, y as registerBehavior } from "./loader-Buk8Bu1h.js";
2
- import { A as MusicManager, C as isAudioContextAvailable, D as SFX_PRESETS, E as spatialPan, M as crossfadeGains, N as fadeGain, O as SFX_PRESET_NAMES, P as AudioBuses, S as SfxEngine, T as spatialGain, _ as qualityEnvironment, a as UiSlider, b as createSaveStore, c as UiButton, d as UiBanner, f as UiBar, g as Settings, h as Engine, i as UiSelect, j as WebAudioMusicBackend, k as synthSfx, 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 readDeviceHints, w as ROLLOFF_MODELS, x as LogManager, y as suggestQuality } from "./register-CscIzJEO.js";
1
+ import { _ as clearBehaviors, a as SCENE_FORMAT, b as registeredBehaviors, c as SceneTree, d as resolveConstants, f as Node, g as Behavior, h as InputMap, i as serializeNode, l as CONST_REF_KEY, n as loadScene, o as computeViewport, p as parseNodePath, r as Scene, s as resolveViewport, u as isConstRef, v as getBehavior, x as Signal, y as registerBehavior } from "./loader-BwR0DxeM.js";
2
+ import { A as MusicManager, C as isAudioContextAvailable, D as SFX_PRESETS, E as spatialPan, M as crossfadeGains, N as fadeGain, O as SFX_PRESET_NAMES, P as AudioBuses, S as SfxEngine, T as spatialGain, _ as qualityEnvironment, a as UiSlider, b as createSaveStore, c as UiButton, d as UiBanner, f as UiBar, g as Settings, h as Engine, i as UiSelect, j as WebAudioMusicBackend, k as synthSfx, 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 readDeviceHints, w as ROLLOFF_MODELS, x as LogManager, y as suggestQuality } from "./register-G3edsjJ2.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-C4kmDK0o.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-CJdGpT2V.js";
8
8
  import { t as createNoise2D } from "./noise-CGUMx44x.js";
9
- import { n as ORDER_GROUP_BASE, r as effectiveOrder, t as duplicateNode } from "./duplicate-BgnG1Lqz.js";
9
+ import { n as ORDER_GROUP_BASE, r as effectiveOrder, t as duplicateNode } from "./duplicate-DlOvknDO.js";
10
10
  import { i as applyParticlePreset, n as PARTICLE_PRESETS, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-Bw7hB93B.js";
11
11
  import { i as resolveRendering, n as attachTouchControls, r as joystickVector, t as TouchControls } from "./touch-BoNg_MnF.js";
12
12
  //#region src/core/pathfinding.ts
@@ -242,6 +242,6 @@ function newUid() {
242
242
  //#endregion
243
243
  //#region src/index.ts
244
244
  /** Engine version. Kept in sync with package.json by the release pipeline. */
245
- const VERSION = "0.33.0";
245
+ const VERSION = "0.34.0";
246
246
  //#endregion
247
247
  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, Settings, SfxEngine, Signal, Timer, TouchControls, UiBanner, UiBar, UiButton, UiDialogue, UiImage, UiPanel, UiSelect, UiSlider, UiText, UiToggle, 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, qualityEnvironment, readDeviceHints, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, replay, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, startRecording, suggestQuality, synthSfx };
@@ -453,6 +453,19 @@ var InputMap = class {
453
453
  * is ceremony. Buttons already live in the key set as `Mouse0`/`Mouse1`/…;
454
454
  * these read them directly. 0 left, 1 middle, 2 right.
455
455
  */
456
+ /**
457
+ * Is this raw CODE down / just pressed? (`'ArrowUp'`, `'Enter'`, `'Pad12'`…)
458
+ *
459
+ * Menu navigation is not a bindable action — there is no key to remap, and
460
+ * asking every scene to declare `"menuUp": { "keys": ["ArrowUp", "Pad12"] }`
461
+ * is ceremony for something every menu on every platform does the same way.
462
+ */
463
+ keyPressed(code) {
464
+ return this.down.has(code);
465
+ }
466
+ keyJustPressed(code) {
467
+ return this.pressedEdge.has(code);
468
+ }
456
469
  mousePressed(button = 0) {
457
470
  return this.down.has(`Mouse${button}`);
458
471
  }
@@ -1,4 +1,4 @@
1
- import { N as Scene, v as Engine } from "./behavior-CKwTCjfR.js";
1
+ import { N as Scene, v as Engine } from "./behavior-CtPScDMo.js";
2
2
  import { i as SceneJson } from "./schema-CcoWb32N.js";
3
3
 
4
4
  //#region src/core/scene/loader.d.ts
package/dist/net.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { at as Node, dt as Signal, l as PropSchema, v as Engine } from "./behavior-CKwTCjfR.js";
1
+ import { at as Node, dt as Signal, l as PropSchema, v as Engine } from "./behavior-CtPScDMo.js";
2
2
  import { c as JsonValue, i as SceneJson, s as JsonObject } from "./schema-CcoWb32N.js";
3
3
 
4
4
  //#region src/net/types.d.ts
package/dist/net.js CHANGED
@@ -1,9 +1,9 @@
1
- import { n as loadScene } from "./loader-Buk8Bu1h.js";
2
- import { h as Engine } from "./register-CscIzJEO.js";
1
+ import { n as loadScene } from "./loader-BwR0DxeM.js";
2
+ import { h as Engine } from "./register-G3edsjJ2.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-CtI-itec.js";
6
+ import { i as applySyncPatch, n as NetworkSpawner, r as NetworkManager, t as registerNodesNet } from "./register-OodmuUMK.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 { B as Listener, at as Node, l as PropSchema } from "./behavior-CKwTCjfR.js";
1
+ import { B as Listener, at as Node, l as PropSchema } from "./behavior-CtPScDMo.js";
2
2
 
3
3
  //#region src/core/nodes/audio-player.d.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { m as diagnose } from "./loader-Buk8Bu1h.js";
2
+ import { m as diagnose } from "./loader-BwR0DxeM.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
- import { _ as RigidBody2D, b as validateCollider2D, g as PhysicsBody2D, h as CharacterBody2D, m as Area2D, p as Joint2D, y as Node2D } from "./register-FIJtNbub.js";
4
+ import { _ as RigidBody2D, b as validateCollider2D, g as PhysicsBody2D, h as CharacterBody2D, m as Area2D, p as Joint2D, y as Node2D } from "./register-BLPC10Mj.js";
5
5
  import { n as registerDebugSource } from "./debug-draw-BM3DsvtT.js";
6
6
  //#region src/2d/physics/physics-2d.ts
7
7
  var physics_2d_exports = /* @__PURE__ */ __exportAll({
@@ -1,9 +1,9 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { m as diagnose } from "./loader-Buk8Bu1h.js";
2
+ import { m as diagnose } from "./loader-BwR0DxeM.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
- import { F as PhysicsBody3D, I as RigidBody3D, N as Area3D, P as CharacterBody3D, R as Node3D, z as validateCollider3D } from "./gameplay-BpQCbABv.js";
4
+ import { F as PhysicsBody3D, I as RigidBody3D, N as Area3D, P as CharacterBody3D, R as Node3D, z as validateCollider3D } from "./gameplay-BxFtmfSe.js";
5
5
  import { n as registerDebugSource } from "./debug-draw-BM3DsvtT.js";
6
- import { A as Terrain3D, F as InstancedMesh3D, L as buildMeshGeometry, P as Joint3D } from "./environment-presets-CQtEGogB.js";
6
+ import { A as Terrain3D, F as InstancedMesh3D, L as buildMeshGeometry, P as Joint3D } from "./environment-presets-B6WiUsaO.js";
7
7
  import { Euler, Matrix4, Quaternion, Vector3 } from "three";
8
8
  //#region src/3d/physics/collider-lines.ts
9
9
  /**
package/dist/react.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { N as Scene, n as BehaviorCtor, v as Engine } from "./behavior-CKwTCjfR.js";
1
+ import { N as Scene, n as BehaviorCtor, v as Engine } from "./behavior-CtPScDMo.js";
2
2
  import { c as JsonValue } from "./schema-CcoWb32N.js";
3
3
  import { CSSProperties, ReactNode } from "react";
4
4
 
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-sFuTLqjD.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-D2QU5x7S.js").then((n) => n.n)).createGame2D(o)))(opts);
159
+ const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-QTfghzwM.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-CFNqoqOX.js").then((n) => n.n)).createGame2D(o)))(opts);
160
160
  if (disposed) {
161
161
  next.dispose();
162
162
  return;
@@ -1,9 +1,9 @@
1
- import { f as Node } from "./loader-Buk8Bu1h.js";
2
- import { t as registerCoreNodes } from "./register-CscIzJEO.js";
1
+ import { f as Node } from "./loader-BwR0DxeM.js";
2
+ import { t as registerCoreNodes } from "./register-G3edsjJ2.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 { i as getNodeSchema, l as registerNode } from "./registry-CJdGpT2V.js";
6
- import { r as effectiveOrder } from "./duplicate-BgnG1Lqz.js";
6
+ import { r as effectiveOrder } from "./duplicate-DlOvknDO.js";
7
7
  import { i as applyParticlePreset, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-Bw7hB93B.js";
8
8
  import { AdditiveBlending, BufferAttribute, BufferGeometry, CanvasTexture, Color, DynamicDrawUsage, Group, InstancedMesh, MathUtils, Matrix4, Mesh, MeshBasicMaterial, NearestFilter, NormalBlending, Object3D, PlaneGeometry } from "three";
9
9
  //#region src/2d/physics/collider-validate.ts