incanto 0.35.0 → 0.36.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 (50) hide show
  1. package/dist/2d.d.ts +5 -5
  2. package/dist/2d.js +3 -3
  3. package/dist/3d.d.ts +6 -6
  4. package/dist/3d.js +4 -4
  5. package/dist/{audit-C5oZGAru.js → audit-D7F3n3Nt.js} +1 -1
  6. package/dist/{behavior-CGSCWOHB.d.ts → behavior-DibCwrW7.d.ts} +52 -3
  7. package/dist/{create-game-BUD89Kqh.js → create-game-BBD3iUFZ.js} +5 -5
  8. package/dist/{create-game-B0Wfhi2-.js → create-game-WmNFluFz.js} +5 -5
  9. package/dist/debug.d.ts +1 -1
  10. package/dist/debug.js +1 -1
  11. package/dist/{duplicate-C716f-97.js → duplicate-Cvb1BSca.js} +2 -16
  12. package/dist/{editor-switch-DyXEtH36.d.ts → editor-switch-DVwIGZdK.d.ts} +1 -1
  13. package/dist/editor.js +1211 -1126
  14. package/dist/env.d.ts +1 -1
  15. package/dist/{environment-presets-TAGvmM3z.js → environment-presets-fK9oyrrR.js} +3 -3
  16. package/dist/{errors-BY2kL0hv.d.ts → errors-DGRtWlSx.d.ts} +1 -1
  17. package/dist/{gameplay-BvhcQbfJ.js → gameplay-C0MUMSak.js} +3 -3
  18. package/dist/gameplay.d.ts +2 -2
  19. package/dist/gameplay.js +1 -1
  20. package/dist/index.d.ts +7 -24
  21. package/dist/index.js +7 -7
  22. package/dist/{loader-CUcj00M8.d.ts → loader-BqigZsfF.d.ts} +2 -2
  23. package/dist/{loader-Mig5fY4n.js → loader-DAZlgqeC.js} +47 -10
  24. package/dist/net.d.ts +2 -2
  25. package/dist/net.js +3 -3
  26. package/dist/{particle-sim-B-vZBF5R.d.ts → particle-sim-BzJ1yxoE.d.ts} +1 -1
  27. package/dist/{pathfinding-DgOo2KNF.d.ts → pathfinding-B3QtdhvZ.d.ts} +1 -1
  28. package/dist/{physics-2d-DqAclql-.js → physics-2d-B4v39hca.js} +2 -2
  29. package/dist/{physics-3d-DxBH4sIF.js → physics-3d-DFJVMYET.js} +3 -3
  30. package/dist/react.d.ts +2 -2
  31. package/dist/react.js +1 -1
  32. package/dist/{register-BFLg0-_i.js → register-BHAwM4bK.js} +8 -2
  33. package/dist/{register-DSmIRAf7.js → register-COGCNitr.js} +4 -5
  34. package/dist/{register-BjbPMA5B.js → register-DXwtIVqP.js} +3 -3
  35. package/dist/{registry-CJdGpT2V.js → registry-IyWCGe4q.js} +6 -4
  36. package/dist/{schema-3ywbdlrv.d.ts → schema-CFeioQRE.d.ts} +10 -0
  37. package/dist/{test-9EokzbRd.js → test-X_xE6Yay.js} +11 -11
  38. package/dist/test.d.ts +4 -4
  39. package/dist/test.js +2 -2
  40. package/dist/vite.js +1 -1
  41. package/editor/assets/{agent8-D3_GWeuh.js → agent8-BfxUNrEe.js} +1 -1
  42. package/editor/assets/{debug-CX0LDd1r.js → debug-wSa-vYHO.js} +1 -1
  43. package/editor/assets/{index-CMlKFT0C.js → index-BkIuXIjp.js} +181 -96
  44. package/editor/index.html +1 -1
  45. package/package.json +1 -1
  46. package/schemas/scene.schema.json +21 -0
  47. package/skills/incanto-scene-json-authoring.md +30 -0
  48. package/templates-app/beacon-isle-3d/package.json +1 -1
  49. package/templates-app/tps-3d/package.json +1 -1
  50. package/templates-app/village-quest-3d/package.json +1 -1
package/editor/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Incanto Scene Editor</title>
7
7
  <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect width='16' height='16' rx='3' fill='%236ee7dc'/><text x='8' y='12' text-anchor='middle' font-size='11' font-family='monospace' fill='%230e1018'>i</text></svg>" />
8
- <script type="module" crossorigin src="./assets/index-CMlKFT0C.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-BkIuXIjp.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="./assets/GameServer-C56iOUgF.js">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incanto",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Vibe-coding-first web game engine SDK — JSON-driven scenes on three.js",
5
5
  "keywords": [
6
6
  "game-engine",
@@ -20,6 +20,27 @@
20
20
  "assets": {
21
21
  "type": "object"
22
22
  },
23
+ "constants": {
24
+ "type": "object",
25
+ "description": "Named reusable values. A prop references one as {\"@const\": \"NAME\"}; resolved to the literal AT LOAD."
26
+ },
27
+ "strings": {
28
+ "type": "object",
29
+ "description": "Translations, locale then key: {\"en\": {\"hud.score\": \"Score\"}}. A text prop references one as \"@t:hud.score\". `en` is the base — a key a locale omits falls back to it silently.",
30
+ "additionalProperties": {
31
+ "type": "object",
32
+ "additionalProperties": {
33
+ "type": "string"
34
+ }
35
+ }
36
+ },
37
+ "orderGroups": {
38
+ "type": "object",
39
+ "description": "Extra draw-order bands as name → BASE OFFSET, layered over the built-in six (background -2000 … overlay 3000). Effective order is base(orderGroup) + renderOrder, so a band is a number; a bare name would sort as default. Re-declaring a built-in re-bases it for this scene.",
40
+ "additionalProperties": {
41
+ "type": "number"
42
+ }
43
+ },
23
44
  "input": {
24
45
  "type": "object",
25
46
  "description": "Declarative input actions (loaded into Engine.input on setScene; shape hard-validated at declare). Key arrays are KeyboardEvent.code strings.",
@@ -125,6 +125,36 @@ In 3D the bands order the TRANSPARENT pass (opaque geometry is depth-
125
125
  tested regardless); in 2D they are the layering system. 2D `zIndex` is an
126
126
  accepted alias for `renderOrder`.
127
127
 
128
+ The six built-in bases: `background -2000`, `terrain -1000`, `default 0`,
129
+ `characters 1000`, `effects 2000`, `overlay 3000`.
130
+
131
+ ### Your own bands
132
+
133
+ A band is a **number**, not a name — `base(orderGroup) + renderOrder` is the
134
+ whole sort — so a scene declares what its band is WORTH:
135
+
136
+ ```json
137
+ {
138
+ "format": 1, "type": "scene", "name": "Level",
139
+ "orderGroups": { "ui-back": 2500, "ui-front": 3500 },
140
+ "root": { "...": "..." }
141
+ }
142
+ ```
143
+ ```json
144
+ { "name": "Panel", "type": "Sprite2D", "props": { "orderGroup": "ui-back" } }
145
+ ```
146
+
147
+ Re-declaring a built-in re-bases it for this scene (`{"terrain": 500}`) — a 2D
148
+ game with no terrain can reclaim that band.
149
+
150
+ **Typos still hard-fail.** The valid set is the six built-ins plus what THIS
151
+ scene declares, so `"ui-bakc"` is a load error naming the valid options, exactly
152
+ as `"charcters"` always was. A band declared without a finite number is also a
153
+ load error: a bare name would sort identically to `default` and mean nothing.
154
+
155
+ Bands are per-scene and are REPLACED on a scene swap — level 2 does not inherit
156
+ level 1's layers.
157
+
128
158
  ## Parents and children
129
159
 
130
160
  EVERY node type can hold children — `children` is universal, so any node works
@@ -14,7 +14,7 @@
14
14
  "@dimforge/rapier2d-compat": "0.19.3",
15
15
  "@dimforge/rapier3d-compat": "0.19.3",
16
16
  "@pixiv/three-vrm": "^3.5.3",
17
- "incanto": "^0.35.0",
17
+ "incanto": "^0.36.0",
18
18
  "three": "^0.184.0"
19
19
  },
20
20
  "devDependencies": {
@@ -13,7 +13,7 @@
13
13
  "@dimforge/rapier2d-compat": "0.19.3",
14
14
  "@dimforge/rapier3d-compat": "0.19.3",
15
15
  "@pixiv/three-vrm": "^3.5.3",
16
- "incanto": "^0.35.0",
16
+ "incanto": "^0.36.0",
17
17
  "three": "^0.184.0"
18
18
  },
19
19
  "devDependencies": {
@@ -13,7 +13,7 @@
13
13
  "@dimforge/rapier2d-compat": "0.19.3",
14
14
  "@dimforge/rapier3d-compat": "0.19.3",
15
15
  "@pixiv/three-vrm": "^3.5.3",
16
- "incanto": "^0.35.0",
16
+ "incanto": "^0.36.0",
17
17
  "three": "^0.184.0"
18
18
  },
19
19
  "devDependencies": {