incanto 0.45.0 → 0.46.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 (31) hide show
  1. package/dist/2d.d.ts +1 -1
  2. package/dist/2d.js +1 -1
  3. package/dist/3d.d.ts +1 -1
  4. package/dist/3d.js +3 -3
  5. package/dist/{create-game-CCFUOWfb.js → create-game-BtCNdkjI.js} +3 -3
  6. package/dist/{create-game-DFRbG0Bj.js → create-game-CniOiWzN.js} +1 -1
  7. package/dist/{editor-switch-DVwIGZdK.d.ts → editor-switch-DAvWQeld.d.ts} +1 -1
  8. package/dist/editor.js +4674 -4346
  9. package/dist/{environment-presets-2GgTlPt1.js → environment-presets-D1b0ydTS.js} +11 -6
  10. package/dist/index.js +1 -1
  11. package/dist/{physics-3d-nLI_8bUR.js → physics-3d-CSoGjM8P.js} +1 -1
  12. package/dist/react.js +1 -1
  13. package/dist/{src-CV_uN7j4.js → src-B43b6bZo.js} +1 -1
  14. package/dist/{teardown-yePMOE1K.js → teardown-BKTCzLek.js} +3 -2
  15. package/dist/{test-R8JCuDlv.js → test-BboGNQr-.js} +3 -3
  16. package/dist/test.js +1 -1
  17. package/dist/vite.d.ts +21 -1
  18. package/dist/vite.js +79 -5
  19. package/editor/assets/{agent8-Cw3Qoi5e.js → agent8-Dl5ZZLu-.js} +1 -1
  20. package/editor/assets/{debug-Mac205vz.js → debug-j9Pi6RvO.js} +1 -1
  21. package/editor/assets/{index-BGYeGNEh.js → index-Y-93awAL.js} +172 -95
  22. package/editor/index.html +1 -1
  23. package/package.json +1 -1
  24. package/skills/incanto-3d-character.md +2 -1
  25. package/skills/incanto-3d-models.md +22 -7
  26. package/skills/incanto-audio.md +1 -1
  27. package/skills/incanto-editor.md +6 -1
  28. package/skills/incanto-scene-json-authoring.md +1 -1
  29. package/templates-app/beacon-isle-3d/package.json +1 -1
  30. package/templates-app/tps-3d/package.json +1 -1
  31. 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-BGYeGNEh.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-Y-93awAL.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.45.0",
3
+ "version": "0.46.0",
4
4
  "description": "Vibe-coding-first web game engine SDK — JSON-driven scenes on three.js",
5
5
  "keywords": [
6
6
  "game-engine",
@@ -110,7 +110,8 @@ enemy never yanks the camera in. `firstPerson` skips it (the camera is at the ey
110
110
 
111
111
  `controller.state` is `idle | walk | run | fastRun | airborne`; the
112
112
  `movementStateChanged` signal fires on transitions — map states to clips
113
- (`$animation` assets retarget onto VRM automatically):
113
+ (`$animation` assets are retargeted onto the skin's own rig — GLB and VRM alike — so a
114
+ clip never changes your character's proportions):
114
115
 
115
116
  ```ts
116
117
  controller.on('movementStateChanged', (state) => {
@@ -27,7 +27,10 @@ animation clip names + durations, materials/textures/skins, and for VRM the avat
27
27
  meta (name/authors) + humanoid bone count. Decision rules:
28
28
 
29
29
  - **size.y** tells you the model's natural height → pick `targetHeight` (characters in a
30
- meters-scale scene: 1.6–1.9) or leave 0 and use the node's `scale`.
30
+ meters-scale scene: 1.6–1.9) or leave 0 and use the node's `scale`. Note the CLI reports
31
+ the BIND pose; a rigged character on screen is measured as drawn, so the two can differ
32
+ by a few percent. `targetHeight` uses the drawn size — the number you write is the
33
+ height you get.
31
34
  - **center** ≠ [0,0,0] means the model is off-origin — compensate with the node `position`
32
35
  (a center.y of half the height usually means feet at origin: good).
33
36
  - **animation names** are exact strings for the `animation` prop.
@@ -49,8 +52,8 @@ meta (name/authors) + humanoid bone count. Decision rules:
49
52
  ```
50
53
 
51
54
  `ModelInstance3D` props: `model` (`$key` or a direct URL), `targetHeight` (>0 uniformly
52
- scales so the bounding box stands that many units tall — composes with the node `scale`,
53
- reactive at runtime), `animation` (see below), `tint` (hex; `""`=off — multiplies into
55
+ scales the model to stand that many units tall — composes with the node `scale`, reactive
56
+ at runtime; see "Sizing" below), `animation` (see below), `tint` (hex; `""`=off — multiplies into
54
57
  every material to RESKIN one shared GLB into many variants, e.g. base human → green
55
58
  zombie; clones materials per instance so other instances are untouched),
56
59
  `metalness`/`roughness` (0..1 overrides applied to EVERY material; `-1`=keep authored —
@@ -138,7 +141,16 @@ model file, or an animation-asset reference:
138
141
 
139
142
  - GLB models bind asset clips by NODE NAME — the animation file's rig must use the same
140
143
  bone names as the model (e.g. both exported from the same skeleton).
141
- - **VRM models retarget automatically**: Mixamo-rigged animation GLBs
144
+ - **The animation never reshapes the model.** A Mixamo clip carries a position AND a
145
+ scale track for every bone, not just rotations, so binding it raw would replace your
146
+ character's skeleton with the one the clip was authored on — a stocky model silently
147
+ becoming the proportions of whoever the animation was made from. Incanto retargets
148
+ instead: rotations cross over untouched, the hips translation is scaled to THIS model's
149
+ hip height (hip travel is in the source rig's units — a short character given a tall
150
+ rig's stride slides its feet), and every other bone translation and scale is dropped.
151
+ Your model keeps the proportions it was authored with. A clip whose bones this model
152
+ does not have at all is played as-is, with a warning.
153
+ - **VRM models retarget through the humanoid rig**: Mixamo-rigged animation GLBs
142
154
  (`mixamorigHips`…) are mapped through the mixamo→VRM humanoid rigmap
143
155
  (rest-pose-compensated rotations, hips height scaling, VRM 0.x axis flips) and played
144
156
  on the VRM's normalized rig. Unmapped bones are logged. This is how you give any VRM
@@ -207,6 +219,9 @@ viewport (game-logic time stays frozen; only model animation previews).
207
219
  - A VRM mounts its source scene: humanoid rig + springbones stay live via `vrm.update`,
208
220
  but ONE node per VRM asset (a second node warns and stays empty). GLB models clone
209
221
  freely.
210
- - GLB↔GLB cross-file animation needs matching bone names (no generic retargeting);
211
- no animation blending yet.
212
- - Bounding boxes for skinned meshes are bind-pose.
222
+ - GLB↔GLB cross-file animation needs matching BONE NAMES. Retargeting adapts the
223
+ animation to your model's proportions; it does not map one naming scheme onto another.
224
+ No animation blending yet.
225
+ - `targetHeight` measures a rigged character ONCE, on the first frame after it is posed —
226
+ so it cannot resize mid-stride, and a model whose clip has not loaded yet renders at its
227
+ file size for a frame or two before settling.
@@ -347,7 +347,7 @@ already making.
347
347
 
348
348
  ```ts
349
349
  engine.settings.get('quality'); // 'low' | 'medium' | 'high'
350
- engine.settings.set('sensitivity', 1.4);
350
+ engine.settings.set('sensitivity', 1.4); // CharacterController3D mouse look reads this
351
351
  engine.settings.all(); // the whole options screen at once
352
352
  engine.settings.reset();
353
353
  engine.settings.changed.connect((k) => …); // k is the key that changed
@@ -253,9 +253,14 @@ so the page cannot call it directly — `incanto-editor` proxies it at
253
253
  ```bash
254
254
  bunx incanto-editor --token <v8 access token>
255
255
  INCANTO_V8_TOKEN=<token> bunx incanto-editor # same thing
256
+ # either way the panel header shows WHICH token is in use, wallet-style
257
+ # (`v8_abc…wxyz · INCANTO_V8_TOKEN`) — enough to recognise, never enough to use
256
258
  ```
257
259
 
258
- With no token the 📚 panel asks for one and keeps it in the browser
260
+ With no token the 📚 panel offers **sign in with Verse8** the same device flow
261
+ agent8's own local-dev login uses. It opens the Verse8 approval page in a new
262
+ tab, shows you the code to approve, and stores the token it comes back with in
263
+ this browser
259
264
  (`localStorage`), which is the right answer for a shared machine — the token is
260
265
  sent only to your own editor server, never written to disk by it, and forwarded
261
266
  upstream as a bearer. `INCANTO_LIBRARY_URL` points the proxy somewhere else
@@ -220,7 +220,7 @@ Supported `type` values:
220
220
  | `animation` | a GLB's animation clips (memory only — drawn nowhere) | `ModelInstance3D.animation` |
221
221
 
222
222
  Nodes reference entries as `"$key"` (`"$characters/knight"`). `model`/`animation`
223
- details — sizing, VRM retargeting, the `incanto-model` CLI — live in
223
+ details — sizing, animation retargeting, the `incanto-model` CLI — live in
224
224
  `incanto-3d-models.md`.
225
225
 
226
226
  ## Asset groups
@@ -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.45.0",
17
+ "incanto": "^0.46.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.45.0",
16
+ "incanto": "^0.46.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.45.0",
16
+ "incanto": "^0.46.0",
17
17
  "three": "^0.184.0"
18
18
  },
19
19
  "devDependencies": {