incanto 0.62.0 → 0.63.1

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 (53) hide show
  1. package/bin/incanto-playtest.mjs +14 -5
  2. package/bin/incanto-verify.mjs +9 -4
  3. package/dist/2d.js +3 -3
  4. package/dist/3d.d.ts +22 -0
  5. package/dist/3d.js +5 -5
  6. package/dist/{create-game-BpunnGPX.js → create-game-BsqKOAFN.js} +6 -6
  7. package/dist/{create-game-Caut3bqN.js → create-game-CSnlQDkz.js} +6 -6
  8. package/dist/{duplicate-E4FUs5Bn.js → duplicate-BOOKmkQ7.js} +1 -1
  9. package/dist/{environment-presets-BAWeOeqf.js → environment-presets-BKRo-HXg.js} +3 -3
  10. package/dist/{gameplay-CaHqDiQD.js → gameplay-Dqm4LyKR.js} +30 -4
  11. package/dist/gameplay.js +1 -1
  12. package/dist/index.js +5 -5
  13. package/dist/{loader-DEe272nY.js → loader-zDynoew_.js} +57 -2
  14. package/dist/net.js +1 -1
  15. package/dist/{physics-2d-BXmu2i7W.js → physics-2d-BUD-MADM.js} +5 -5
  16. package/dist/{physics-3d-ClxP6Uv7.js → physics-3d-BsutZCtX.js} +5 -3
  17. package/dist/react.js +1 -1
  18. package/dist/{register-CNh4FlbD.js → register-BSA93acW.js} +3 -3
  19. package/dist/{register-D3yx8D4r.js → register-Btm7_Emq.js} +1 -1
  20. package/dist/{replay-DlgHItNv.js → replay-DKRmiVjk.js} +42 -2
  21. package/dist/{split-screen-CBM9wcMX.js → split-screen-Dx0LvzqS.js} +2 -2
  22. package/dist/{src-CH00_JsR.js → src-DQzZD_gx.js} +1 -1
  23. package/dist/{teardown-C7qP-dcC.js → teardown-BwhkcNt8.js} +1 -1
  24. package/dist/{test-BMkg8zMV.js → test-wPUuuJpP.js} +50 -18
  25. package/dist/test.d.ts +4 -0
  26. package/dist/test.js +2 -2
  27. package/dist/vite.js +2 -2
  28. package/editor/assets/{agent8-m5mtAO_A.js → agent8-CfacwdPM.js} +1 -1
  29. package/editor/assets/{debug-CPhzCT8f.js → debug-D0kX3cGf.js} +1 -1
  30. package/editor/assets/{index-D422P4kW.js → index-BrG3srCa.js} +92 -92
  31. package/editor/index.html +1 -1
  32. package/package.json +1 -1
  33. package/schemas/scene.schema.json +4 -0
  34. package/skills/README.md +4 -0
  35. package/skills/incanto-game-feel.md +3 -2
  36. package/skills/incanto-gameplay-behaviors.md +37 -6
  37. package/skills/incanto-node-reference.md +1 -0
  38. package/skills/incanto-physics-and-input.md +69 -7
  39. package/skills/incanto-scene-json-authoring.md +15 -1
  40. package/skills/incanto-your-first-game.md +242 -0
  41. package/templates-app/beacon-isle-3d/package.json +1 -1
  42. package/templates-app/platformer-2d/package.json +1 -1
  43. package/templates-app/star-survivor/package.json +1 -1
  44. package/templates-app/star-survivor/src/game.scene.json +4 -2
  45. package/templates-app/tps-3d/PROJECT/Requirements.md +3 -1
  46. package/templates-app/tps-3d/index.html +3 -1
  47. package/templates-app/tps-3d/package.json +1 -1
  48. package/templates-app/tps-3d/src/behaviors.ts +4 -2
  49. package/templates-app/tps-3d/src/game.scene.json +3 -2
  50. package/templates-app/tps-3d/verify.ts +38 -0
  51. package/templates-app/village-quest-3d/package.json +1 -1
  52. package/templates-app/village-quest-3d/src/grove.scene.json +6 -2
  53. package/templates-app/village-quest-3d/src/village.scene.json +8 -4
@@ -180,4 +180,42 @@ const ok = (label: string, cond: boolean): void => {
180
180
  ok('runScript reported no failures (LOSE path)', result.ok);
181
181
  }
182
182
 
183
+ // ---- can an enemy ACTUALLY kill you? ---------------------------------------
184
+ //
185
+ // The LOSE path above emits `triggerEnter` by hand 60 times, which proves
186
+ // DamageOnContact answers an entry event and nothing about whether the game
187
+ // produces those events. It does not: contact fires on ENTRY, so an enemy that
188
+ // closes and rests deals ONE hit unless its hitbox carries `repeatEvery`.
189
+ // Measured on a player parked against an enemy for six seconds, before that
190
+ // prop was added: hp 90. This asserts the drain, from the game's own physics
191
+ // and its own Chase AI — no synthetic signals.
192
+ {
193
+ let hp = 100;
194
+ let hits = 0;
195
+ const result = await runScript(sceneJson, {
196
+ durationMs: 20000,
197
+ seed: 5,
198
+ behaviors,
199
+ steps: [
200
+ {
201
+ atMs: 100,
202
+ label: 'stand still and let the enemies come',
203
+ do: (ctx) => {
204
+ ctx.getNode('/root/Player').on('damaged', () => hits++);
205
+ },
206
+ },
207
+ {
208
+ atMs: 19000,
209
+ label: 'read the health the contact actually took',
210
+ do: (ctx) => {
211
+ hp = (ctx.getNode('/root/Player').behavior as unknown as { current: number }).current;
212
+ },
213
+ },
214
+ ],
215
+ });
216
+
217
+ ok(`enemies that reach you keep hurting — ${hits} hits, hp ${hp}`, hits >= 3);
218
+ ok('runScript reported no failures (CONTACT path)', result.ok);
219
+ }
220
+
183
221
  console.log(process.exitCode ? '\nVERIFY FAILED' : '\nVERIFY OK — Vanguard plays end to end');
@@ -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.62.0",
16
+ "incanto": "^0.63.1",
17
17
  "three": "^0.184.0"
18
18
  },
19
19
  "devDependencies": {
@@ -735,6 +735,10 @@
735
735
  "preset": "hit",
736
736
  "volume": 0.6
737
737
  }
738
+ },
739
+ {
740
+ "name": "Catch",
741
+ "type": "Respawn"
738
742
  }
739
743
  ],
740
744
  "script": {
@@ -801,7 +805,7 @@
801
805
  "type": "UiText",
802
806
  "uid": "n_dg8p7etf1n6lc495",
803
807
  "props": {
804
- "text": "click/F strike · Shift sprint · portal returns home",
808
+ "text": "click/F strike \u00b7 Shift sprint \u00b7 portal returns home",
805
809
  "size": 12,
806
810
  "color": "#cccccc",
807
811
  "anchor": "bottomRight",
@@ -830,7 +834,7 @@
830
834
  "name": "ResumeHint",
831
835
  "type": "UiText",
832
836
  "props": {
833
- "text": "Esc to resume · R to restart",
837
+ "text": "Esc to resume \u00b7 R to restart",
834
838
  "size": 13,
835
839
  "color": "#c9d2dd"
836
840
  }
@@ -7,13 +7,13 @@
7
7
  "en": {
8
8
  "quest.talkElder": "Talk to the Elder [E]",
9
9
  "ui.playAgain": "Play again",
10
- "ui.hint": "WASD move · Shift sprint · E talk · click/F strike",
10
+ "ui.hint": "WASD move \u00b7 Shift sprint \u00b7 E talk \u00b7 click/F strike",
11
11
  "settings.language": "Language"
12
12
  },
13
13
  "ko": {
14
- "quest.talkElder": "촌장에게 말을 걸어보세요 [E]",
15
- "ui.playAgain": "다시 하기",
16
- "settings.language": "언어"
14
+ "quest.talkElder": "\ucd0c\uc7a5\uc5d0\uac8c \ub9d0\uc744 \uac78\uc5b4\ubcf4\uc138\uc694 [E]",
15
+ "ui.playAgain": "\ub2e4\uc2dc \ud558\uae30",
16
+ "settings.language": "\uc5b8\uc5b4"
17
17
  }
18
18
  },
19
19
  "environment": {
@@ -3430,6 +3430,10 @@
3430
3430
  "preset": "hit",
3431
3431
  "volume": 0.6
3432
3432
  }
3433
+ },
3434
+ {
3435
+ "name": "Catch",
3436
+ "type": "Respawn"
3433
3437
  }
3434
3438
  ]
3435
3439
  },