incanto 0.72.0 → 0.74.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 (84) hide show
  1. package/bin/incanto-check.mjs +114 -42
  2. package/bin/incanto-verify.mjs +9 -2
  3. package/dist/2d.d.ts +29 -4
  4. package/dist/2d.js +3 -3
  5. package/dist/3d.d.ts +137 -15
  6. package/dist/3d.js +6 -6
  7. package/dist/{agent8-BqZ0_O1u.js → agent8-CHTT4unP.js} +1 -1
  8. package/dist/{audio-player-ioZ7VKC6.d.ts → audio-player-BOrk4eQx.d.ts} +1 -1
  9. package/dist/{behavior-Bf9P9oB2.d.ts → behavior-J1cmVah0.d.ts} +8 -0
  10. package/dist/{create-game-CmFAtLZp.js → create-game-BAiA-FjP.js} +7 -7
  11. package/dist/{create-game-C9rWqqAC.js → create-game-ssvGvP7W.js} +7 -7
  12. package/dist/debug.d.ts +1 -1
  13. package/dist/debug.js +1 -1
  14. package/dist/editor.js +965 -893
  15. package/dist/{environment-presets-BeHoaGhy.js → environment-presets-BkqlWewf.js} +277 -60
  16. package/dist/{gameplay-BlQe-M07.js → gameplay-Bxe1sMVT.js} +611 -39
  17. package/dist/gameplay.d.ts +141 -7
  18. package/dist/gameplay.js +2 -2
  19. package/dist/index.d.ts +6 -4
  20. package/dist/index.js +6 -6
  21. package/dist/{loader-CBfQzB6S.d.ts → loader-BAeWMYfF.d.ts} +1 -1
  22. package/dist/net.d.ts +2 -2
  23. package/dist/net.js +2 -2
  24. package/dist/{physics-2d-DrIgTlLk.js → physics-2d-C-SfvjzH.js} +94 -11
  25. package/dist/{physics-3d-BzOCw1VS.js → physics-3d-rOzeg890.js} +202 -15
  26. package/dist/{picking-C9McVJrO.js → picking-BMV34Pjl.js} +2 -2
  27. package/dist/react.d.ts +1 -1
  28. package/dist/react.js +1 -1
  29. package/dist/{register-5IYfooAN.js → register-CjociOtt.js} +19 -4
  30. package/dist/{register-C8HuRkOf.js → register-DRQyZKGU.js} +45 -9
  31. package/dist/{replay-datiAE-b.js → replay-B6BbgGM_.js} +42 -6
  32. package/dist/{replay-CBEChqXq.d.ts → replay-wZK5Ok5c.d.ts} +1 -1
  33. package/dist/{save-slots-CEuJPUle.js → save-slots-CEUGeLuB.js} +11 -2
  34. package/dist/{split-screen-Bm5DTElG.js → split-screen-BxZ5rBe7.js} +4 -4
  35. package/dist/{split-screen-DkqLng6q.d.ts → split-screen-D6sx8z3Z.d.ts} +2 -2
  36. package/dist/{sprite-animation-CqR2o3SA.js → sprite-animation-Bz3DHD_4.js} +1 -1
  37. package/dist/{src-DRSsRleD.js → src-CqtvYtSN.js} +1 -1
  38. package/dist/{test-Djuq3Vhq.js → test-CEl0y2Sw.js} +162 -30
  39. package/dist/test.d.ts +56 -5
  40. package/dist/test.js +2 -2
  41. package/dist/{touch-BnCyPA0G.js → touch-CioTZB-y.js} +1 -1
  42. package/dist/vite.js +3 -3
  43. package/editor/assets/{agent8-CMKz2cax.js → agent8-BlzturGi.js} +1 -1
  44. package/editor/assets/{debug-DLrQm-az.js → debug-BMUi8usj.js} +1 -1
  45. package/editor/assets/{index-BEKuxYcE.js → index-CrUCQoaB.js} +53 -53
  46. package/editor/index.html +1 -1
  47. package/package.json +1 -1
  48. package/schemas/scene.schema.json +634 -10
  49. package/skills/incanto-3d-character.md +113 -5
  50. package/skills/incanto-assets.md +9 -3
  51. package/skills/incanto-behaviors-and-scripts.md +26 -2
  52. package/skills/incanto-building-2d-games.md +9 -0
  53. package/skills/incanto-building-3d-games.md +45 -0
  54. package/skills/incanto-editor.md +6 -1
  55. package/skills/incanto-environment.md +7 -2
  56. package/skills/incanto-game-feel.md +16 -11
  57. package/skills/incanto-gameplay-behaviors.md +179 -16
  58. package/skills/incanto-node-reference.md +124 -45
  59. package/skills/incanto-physics-and-input.md +67 -5
  60. package/skills/incanto-scene-json-authoring.md +9 -3
  61. package/skills/incanto-verifying-your-game.md +19 -2
  62. package/templates-app/beacon-isle-3d/PROJECT/Status.md +8 -0
  63. package/templates-app/beacon-isle-3d/PROJECT/Structure.md +3 -0
  64. package/templates-app/beacon-isle-3d/package.json +1 -1
  65. package/templates-app/beacon-isle-3d/src/game.scene.json +136 -0
  66. package/templates-app/beacon-isle-3d/verify.ts +144 -0
  67. package/templates-app/molehill-2d/package.json +1 -1
  68. package/templates-app/platformer-2d/PROJECT/Status.md +7 -0
  69. package/templates-app/platformer-2d/PROJECT/Structure.md +3 -0
  70. package/templates-app/platformer-2d/package.json +1 -1
  71. package/templates-app/platformer-2d/src/game.scene.json +126 -0
  72. package/templates-app/platformer-2d/verify.ts +54 -0
  73. package/templates-app/star-survivor/package.json +1 -1
  74. package/templates-app/tps-3d/PROJECT/Context.md +1 -1
  75. package/templates-app/tps-3d/PROJECT/Status.md +40 -1
  76. package/templates-app/tps-3d/PROJECT/Structure.md +19 -0
  77. package/templates-app/tps-3d/package.json +1 -1
  78. package/templates-app/tps-3d/src/behaviors.ts +9 -0
  79. package/templates-app/tps-3d/src/cover.scene.json +26 -0
  80. package/templates-app/tps-3d/src/game.scene.json +331 -75
  81. package/templates-app/tps-3d/src/main.ts +14 -0
  82. package/templates-app/tps-3d/src/pillar.scene.json +25 -0
  83. package/templates-app/tps-3d/verify.ts +582 -3
  84. package/templates-app/village-quest-3d/package.json +1 -1
@@ -60,6 +60,10 @@
60
60
  "anims/jump": {
61
61
  "type": "animation",
62
62
  "url": "https://agent8-games.verse8.io/assets/3d/animations/mixamorig/jump.glb"
63
+ },
64
+ "anims/shoot": {
65
+ "type": "animation",
66
+ "url": "https://agent8-games.verse8.io/assets/3d/animations/mixamorig/shoot.glb"
63
67
  }
64
68
  },
65
69
  "root": {
@@ -189,10 +193,34 @@
189
193
  },
190
194
  {
191
195
  "name": "Cover1",
196
+ "instance": "cover.scene.json",
197
+ "overrides": { "position": [-8, 0.6, -8] },
198
+ "uid": "n_wrzlr0jqbyxh7m11"
199
+ },
200
+ {
201
+ "name": "Cover2",
202
+ "instance": "cover.scene.json",
203
+ "overrides": { "position": [8, 0.6, -8] },
204
+ "uid": "n_6ailumev172o037a"
205
+ },
206
+ {
207
+ "name": "Pillar1",
208
+ "instance": "pillar.scene.json",
209
+ "overrides": { "position": [-14, 2, 6] },
210
+ "uid": "n_xeh6r9631usk2i6w"
211
+ },
212
+ {
213
+ "name": "Pillar2",
214
+ "instance": "pillar.scene.json",
215
+ "overrides": { "position": [14, 2, 6] },
216
+ "uid": "n_7ksm42z50jbh13np"
217
+ },
218
+ {
219
+ "name": "Ramp",
192
220
  "type": "StaticBody3D",
193
221
  "props": {
194
- "collider": { "shape": "box", "size": [2, 1.2, 2] },
195
- "position": [-8, 0.6, -8]
222
+ "collider": { "shape": "box", "size": [5, 0.6, 3] },
223
+ "position": [0, 0.3, -14]
196
224
  },
197
225
  "children": [
198
226
  {
@@ -200,123 +228,324 @@
200
228
  "type": "MeshInstance3D",
201
229
  "props": {
202
230
  "mesh": "box",
203
- "size": [2, 1.2, 2],
204
- "material": { "color": "#5b6678", "roughness": 0.85, "metalness": 0.1 },
231
+ "size": [5, 0.6, 3],
232
+ "material": { "color": "#5b6678", "roughness": 0.85 },
205
233
  "castShadow": true,
206
234
  "receiveShadow": true
207
235
  },
208
- "uid": "n_hsy2c0ukmioj0611"
236
+ "uid": "n_fgwyll0y26mldnum"
209
237
  }
210
238
  ],
211
- "uid": "n_wrzlr0jqbyxh7m11"
239
+ "uid": "n_3jp7mtbnbx0rhv29"
212
240
  },
213
241
  {
214
- "name": "Cover2",
242
+ "name": "Sun",
243
+ "type": "DirectionalLight3D",
244
+ "props": {
245
+ "position": [38, 70, 28],
246
+ "intensity": 2,
247
+ "castShadow": true,
248
+ "shadowArea": 58,
249
+ "shadowMapSize": 2048
250
+ },
251
+ "uid": "n_23zij3jcjcb72y70"
252
+ },
253
+ {
254
+ "name": "FillLight",
255
+ "type": "DirectionalLight3D",
256
+ "props": { "position": [-38, 36, -28], "intensity": 0.4, "color": "#b9d4ff" },
257
+ "uid": "n_28u31t86eb8xnyjc"
258
+ },
259
+ {
260
+ "name": "Curb",
215
261
  "type": "StaticBody3D",
262
+ "uid": "n_m7pib5xw39k54m05",
216
263
  "props": {
217
- "collider": { "shape": "box", "size": [2, 1.2, 2] },
218
- "position": [8, 0.6, -8]
264
+ "position": [6, 0.15, -12],
265
+ "collider": { "shape": "box", "size": [1, 0.3, 3] }
219
266
  },
220
267
  "children": [
221
268
  {
222
269
  "name": "Skin",
223
270
  "type": "MeshInstance3D",
271
+ "uid": "n_rt7knp3ltzhzozar",
224
272
  "props": {
225
273
  "mesh": "box",
226
- "size": [2, 1.2, 2],
227
- "material": { "color": "#5b6678", "roughness": 0.85, "metalness": 0.1 },
274
+ "size": [1, 0.3, 3],
228
275
  "castShadow": true,
229
- "receiveShadow": true
230
- },
231
- "uid": "n_jap0t9ofeggpl03j"
276
+ "receiveShadow": true,
277
+ "material": { "color": "#8a8f98", "roughness": 0.9 }
278
+ }
232
279
  }
233
- ],
234
- "uid": "n_6ailumev172o037a"
280
+ ]
235
281
  },
236
282
  {
237
- "name": "Pillar1",
283
+ "name": "Ledge",
238
284
  "type": "StaticBody3D",
285
+ "uid": "n_yic221rb7bf3dqlp",
239
286
  "props": {
240
- "collider": { "shape": "box", "size": [1.1, 4, 1.1] },
241
- "position": [-14, 2, 6]
287
+ "position": [-6, 0.45, -12],
288
+ "collider": { "shape": "box", "size": [1, 0.9, 3] }
242
289
  },
243
290
  "children": [
244
291
  {
245
292
  "name": "Skin",
246
293
  "type": "MeshInstance3D",
294
+ "uid": "n_h0518v6sh56dkggp",
247
295
  "props": {
248
296
  "mesh": "box",
249
- "size": [1.1, 4, 1.1],
250
- "material": { "color": "#454f61", "roughness": 0.95 },
251
- "castShadow": true
252
- },
253
- "uid": "n_0pm93he7baqzdk5d"
297
+ "size": [1, 0.9, 3],
298
+ "castShadow": true,
299
+ "receiveShadow": true,
300
+ "material": { "color": "#6b7078", "roughness": 0.9 }
301
+ }
254
302
  }
255
- ],
256
- "uid": "n_xeh6r9631usk2i6w"
303
+ ]
257
304
  },
258
305
  {
259
- "name": "Pillar2",
306
+ "name": "Hill",
260
307
  "type": "StaticBody3D",
308
+ "uid": "n_d0fkn4oeipz3zeqs",
261
309
  "props": {
262
- "collider": { "shape": "box", "size": [1.1, 4, 1.1] },
263
- "position": [14, 2, 6]
310
+ "position": [10, 1.286, -20],
311
+ "collider": { "shape": "box", "size": [4, 0.3, 3] },
312
+ "rotation": [0, 0, 40]
264
313
  },
265
314
  "children": [
266
315
  {
267
316
  "name": "Skin",
268
317
  "type": "MeshInstance3D",
318
+ "uid": "n_9ee5kmwfusu9g3qy",
269
319
  "props": {
270
320
  "mesh": "box",
271
- "size": [1.1, 4, 1.1],
272
- "material": { "color": "#454f61", "roughness": 0.95 },
273
- "castShadow": true
274
- },
275
- "uid": "n_mkfowx2du427b74v"
321
+ "size": [4, 0.3, 3],
322
+ "castShadow": true,
323
+ "receiveShadow": true,
324
+ "material": { "color": "#7a8a5a", "roughness": 0.9 }
325
+ }
276
326
  }
277
- ],
278
- "uid": "n_7ksm42z50jbh13np"
327
+ ]
279
328
  },
280
329
  {
281
- "name": "Ramp",
330
+ "name": "HillTop",
282
331
  "type": "StaticBody3D",
332
+ "uid": "n_glh0dpbpa5i8izg3",
283
333
  "props": {
284
- "collider": { "shape": "box", "size": [5, 0.6, 3] },
285
- "position": [0, 0.3, -14]
334
+ "position": [13.032, 1.286, -20],
335
+ "collider": { "shape": "box", "size": [3, 2.571, 3] }
286
336
  },
287
337
  "children": [
288
338
  {
289
339
  "name": "Skin",
290
340
  "type": "MeshInstance3D",
341
+ "uid": "n_5283g7n7zukt91tz",
291
342
  "props": {
292
343
  "mesh": "box",
293
- "size": [5, 0.6, 3],
294
- "material": { "color": "#5b6678", "roughness": 0.85 },
344
+ "size": [3, 2.571, 3],
295
345
  "castShadow": true,
296
- "receiveShadow": true
297
- },
298
- "uid": "n_fgwyll0y26mldnum"
346
+ "receiveShadow": true,
347
+ "material": { "color": "#7a8a5a", "roughness": 0.9 }
348
+ }
299
349
  }
300
- ],
301
- "uid": "n_3jp7mtbnbx0rhv29"
350
+ ]
302
351
  },
303
352
  {
304
- "name": "Sun",
305
- "type": "DirectionalLight3D",
353
+ "name": "Cliff",
354
+ "type": "StaticBody3D",
355
+ "uid": "n_khek9wvhy0l8ks8r",
306
356
  "props": {
307
- "position": [38, 70, 28],
308
- "intensity": 2,
309
- "castShadow": true,
310
- "shadowArea": 58,
311
- "shadowMapSize": 2048
357
+ "position": [18, 1.879, -20],
358
+ "collider": { "shape": "box", "size": [4, 0.3, 3] },
359
+ "rotation": [0, 0, 70]
312
360
  },
313
- "uid": "n_23zij3jcjcb72y70"
361
+ "children": [
362
+ {
363
+ "name": "Skin",
364
+ "type": "MeshInstance3D",
365
+ "uid": "n_1px010aspvz8bjlo",
366
+ "props": {
367
+ "mesh": "box",
368
+ "size": [4, 0.3, 3],
369
+ "castShadow": true,
370
+ "receiveShadow": true,
371
+ "material": { "color": "#5a5a66", "roughness": 0.9 }
372
+ }
373
+ }
374
+ ]
314
375
  },
315
376
  {
316
- "name": "FillLight",
317
- "type": "DirectionalLight3D",
318
- "props": { "position": [-38, 36, -28], "intensity": 0.4, "color": "#b9d4ff" },
319
- "uid": "n_28u31t86eb8xnyjc"
377
+ "name": "CliffTop",
378
+ "type": "StaticBody3D",
379
+ "uid": "n_z257x74mbjjdrhjg",
380
+ "props": {
381
+ "position": [20.184, 1.879, -20],
382
+ "collider": { "shape": "box", "size": [3, 3.759, 3] }
383
+ },
384
+ "children": [
385
+ {
386
+ "name": "Skin",
387
+ "type": "MeshInstance3D",
388
+ "uid": "n_q5lamsioudv2pvos",
389
+ "props": {
390
+ "mesh": "box",
391
+ "size": [3, 3.759, 3],
392
+ "castShadow": true,
393
+ "receiveShadow": true,
394
+ "material": { "color": "#5a5a66", "roughness": 0.9 }
395
+ }
396
+ }
397
+ ]
398
+ },
399
+ {
400
+ "name": "Lift",
401
+ "type": "StaticBody3D",
402
+ "uid": "n_dof21x23423au6ry",
403
+ "props": {
404
+ "position": [-18, 0.3, -20],
405
+ "collider": { "shape": "box", "size": [3, 0.6, 3] }
406
+ },
407
+ "script": {
408
+ "name": "Patrol",
409
+ "props": {
410
+ "points": [[-18, 0.3, -20], [-10, 0.3, -20]],
411
+ "speed": 2,
412
+ "mode": "pingpong",
413
+ "facePath": "Skin",
414
+ "turnSpeed": 2
415
+ }
416
+ },
417
+ "children": [
418
+ {
419
+ "name": "Skin",
420
+ "type": "MeshInstance3D",
421
+ "uid": "n_7fz2e5w5tg0dww78",
422
+ "props": {
423
+ "mesh": "box",
424
+ "size": [3, 0.6, 3],
425
+ "castShadow": true,
426
+ "receiveShadow": true,
427
+ "material": { "color": "#b08a4a", "roughness": 0.8 }
428
+ }
429
+ }
430
+ ]
431
+ },
432
+ {
433
+ "name": "Mortar",
434
+ "type": "Node3D",
435
+ "uid": "n_i8b5hrnspxz4ayz8",
436
+ "props": { "position": [-20, 0.5, 20] },
437
+ "script": {
438
+ "name": "Spawner",
439
+ "props": {
440
+ "prefab": "Shell",
441
+ "interval": 1,
442
+ "max": 4,
443
+ "at": [0, 1, 0],
444
+ "autoStart": false
445
+ }
446
+ },
447
+ "children": [
448
+ {
449
+ "name": "Skin",
450
+ "type": "MeshInstance3D",
451
+ "uid": "n_hfpshodulxhpuojh",
452
+ "props": {
453
+ "mesh": "box",
454
+ "size": [0.8, 1, 0.8],
455
+ "castShadow": true,
456
+ "material": { "color": "#4b5563", "roughness": 0.9 }
457
+ }
458
+ },
459
+ {
460
+ "name": "Shell",
461
+ "type": "Node3D",
462
+ "uid": "n_izn5k1gxwrolcoi7",
463
+ "props": { "visible": false },
464
+ "script": {
465
+ "name": "Projectile",
466
+ "props": { "speed": 8, "direction": [0.8, 0.6, 0], "gravity": 9.81 }
467
+ },
468
+ "children": [
469
+ {
470
+ "name": "Skin",
471
+ "type": "MeshInstance3D",
472
+ "uid": "n_s0naouowv8dl2qtv",
473
+ "props": {
474
+ "mesh": "sphere",
475
+ "size": [0.15, 0.15, 0.15],
476
+ "material": {
477
+ "color": "#f97316",
478
+ "emissive": "#f97316",
479
+ "emissiveIntensity": 0.8
480
+ }
481
+ }
482
+ },
483
+ {
484
+ "name": "Life",
485
+ "type": "Node3D",
486
+ "uid": "n_silxb3jtl0ymj60m",
487
+ "script": { "name": "Lifetime", "props": { "seconds": 3, "freeParent": true } }
488
+ }
489
+ ]
490
+ }
491
+ ]
492
+ },
493
+ {
494
+ "name": "Mine",
495
+ "type": "Node3D",
496
+ "uid": "n_k7e92pmsstpjdwnz",
497
+ "props": { "position": [20, 0.5, 20] },
498
+ "script": { "name": "Lifetime", "props": { "seconds": 1.5, "startOnSignal": true } },
499
+ "children": [
500
+ {
501
+ "name": "Skin",
502
+ "type": "MeshInstance3D",
503
+ "uid": "n_cnf1w18yth1dqgdk",
504
+ "props": {
505
+ "mesh": "cylinder",
506
+ "size": [0.35, 0.2, 0.35],
507
+ "castShadow": true,
508
+ "material": { "color": "#dc2626", "roughness": 0.5 }
509
+ }
510
+ },
511
+ {
512
+ "name": "Trigger",
513
+ "type": "Area3D",
514
+ "uid": "n_oiuomj18rhutetd5",
515
+ "props": { "collider": { "shape": "sphere", "radius": 1 } }
516
+ }
517
+ ]
518
+ },
519
+ {
520
+ "name": "Bait",
521
+ "type": "Area3D",
522
+ "uid": "n_aogqugzbj5id2h6o",
523
+ "groups": ["pickup"],
524
+ "props": {
525
+ "position": [21, 0.5, 12],
526
+ "collider": { "shape": "sphere", "radius": 0.8 }
527
+ },
528
+ "script": {
529
+ "name": "Pickup",
530
+ "props": { "value": 1, "kind": "bait", "collectorGroup": "enemy" }
531
+ },
532
+ "children": [
533
+ {
534
+ "name": "Skin",
535
+ "type": "MeshInstance3D",
536
+ "uid": "n_b406hxmbano9gtyh",
537
+ "props": {
538
+ "mesh": "sphere",
539
+ "size": [0.25, 0.25, 0.25],
540
+ "castShadow": true,
541
+ "material": {
542
+ "color": "#22c55e",
543
+ "emissive": "#22c55e",
544
+ "emissiveIntensity": 0.5
545
+ }
546
+ }
547
+ }
548
+ ]
320
549
  }
321
550
  ],
322
551
  "uid": "n_9yavlr08c9026im9"
@@ -345,7 +574,15 @@
345
574
  "pitchMin": -0.5,
346
575
  "pitchMax": 1.1,
347
576
  "coyoteSeconds": 0.12,
348
- "jumpBufferSeconds": 0.15
577
+ "jumpBufferSeconds": 0.15,
578
+ "jumpCutMultiplier": 0.45,
579
+ "maxJumps": 2,
580
+ "airControl": 0.5,
581
+ "fallGravity": 3,
582
+ "stepHeight": 0.4,
583
+ "jumpVelocity": 5,
584
+ "cameraCollision": true,
585
+ "platformCarry": true
349
586
  },
350
587
  "script": { "name": "Shoot" },
351
588
  "uid": "n_ltyrn17s5l9tizgp"
@@ -405,7 +642,8 @@
405
642
  }
406
643
  ],
407
644
  "uid": "n_jstha9c29p0dlioy"
408
- }
645
+ },
646
+ { "name": "Catch", "type": "Respawn", "uid": "n_ygw9hloc5vihrr6l" }
409
647
  ],
410
648
  "uid": "n_nx7dsn65lts2arru"
411
649
  },
@@ -443,7 +681,10 @@
443
681
  "props": {
444
682
  "position": [0, 0.95, -20],
445
683
  "visible": false,
446
- "collider": { "shape": "capsule", "radius": 0.4, "height": 1.1 }
684
+ "collider": { "shape": "capsule", "radius": 0.4, "height": 1.1 },
685
+ "slopeLimitDeg": 50,
686
+ "stickToGround": true,
687
+ "stepHeight": 0.7
447
688
  },
448
689
  "script": { "name": "Health", "props": { "max": 30, "freeOnDeath": true } },
449
690
  "children": [
@@ -461,18 +702,24 @@
461
702
  },
462
703
  "castShadow": true
463
704
  },
464
- "uid": "n_cn4tjqgi2tk2t724"
465
- },
466
- {
467
- "name": "Eye",
468
- "type": "MeshInstance3D",
469
- "props": {
470
- "mesh": "sphere",
471
- "size": [0.12, 0.12, 0.12],
472
- "position": [0, 0.55, 0.32],
473
- "material": { "color": "#ffec5c", "emissive": "#ffd000", "emissiveIntensity": 2 }
474
- },
475
- "uid": "n_xjsfyhxuxp0wkse1"
705
+ "uid": "n_cn4tjqgi2tk2t724",
706
+ "children": [
707
+ {
708
+ "name": "Eye",
709
+ "type": "MeshInstance3D",
710
+ "props": {
711
+ "mesh": "sphere",
712
+ "size": [0.12, 0.12, 0.12],
713
+ "position": [0, 0.55, 0.32],
714
+ "material": {
715
+ "color": "#ffec5c",
716
+ "emissive": "#ffd000",
717
+ "emissiveIntensity": 2
718
+ }
719
+ },
720
+ "uid": "n_xjsfyhxuxp0wkse1"
721
+ }
722
+ ]
476
723
  },
477
724
  {
478
725
  "name": "AI",
@@ -483,7 +730,9 @@
483
730
  "target": "/root/Player",
484
731
  "speed": 2.6,
485
732
  "stopRange": 1.8,
486
- "moveParent": true
733
+ "moveParent": true,
734
+ "facePath": "../Skin",
735
+ "turnSpeed": 3
487
736
  }
488
737
  },
489
738
  "uid": "n_9qza6f0diwm3b24n"
@@ -587,6 +836,13 @@
587
836
  { "signal": "died", "from": "Player", "to": "/root", "handler": "loseLife" },
588
837
  { "signal": "lifeLost", "from": "/root", "to": "Player", "handler": "reviveFull" },
589
838
  { "signal": "damaged", "from": "Player", "to": "HurtSfx", "handler": "play" },
590
- { "signal": "allCleared", "from": "Spawner", "to": "Hud", "handler": "onAllCleared" }
839
+ { "signal": "allCleared", "from": "Spawner", "to": "Hud", "handler": "onAllCleared" },
840
+ {
841
+ "signal": "triggerEnter",
842
+ "from": "Arena/Mine/Trigger",
843
+ "to": "Arena/Mine",
844
+ "handler": "startTimer",
845
+ "filter": { "group": "player" }
846
+ }
591
847
  ]
592
848
  }
@@ -13,6 +13,8 @@
13
13
  * `Shoot` (the click-to-fire hitscan + face-aim) and `HudUpdater` (the HUD +
14
14
  * win/lose banner).
15
15
  */
16
+
17
+ import type { SceneJson } from 'incanto';
16
18
  import { assetUrls, preloadUrls } from 'incanto';
17
19
  import { createGame3D, showBootFailure } from 'incanto/3d';
18
20
  // A bundled clip looped as low ambience (no large music files ship in the
@@ -21,6 +23,17 @@ import musicUrl from 'incanto/assets/audio/spells_cast.mp3';
21
23
  import { HudUpdater, Shoot } from './behaviors';
22
24
  import sceneJson from './game.scene.json';
23
25
 
26
+ /**
27
+ * The sub-scenes this scene `instance:`s — `cover.scene.json` and
28
+ * `pillar.scene.json` — handed to the loader by path. `loadScene` never reads
29
+ * files; vite's `import.meta.glob` gathers every scene beside this one.
30
+ */
31
+ const prefabs = import.meta.glob('./*.scene.json', {
32
+ eager: true,
33
+ import: 'default',
34
+ }) as Record<string, SceneJson>;
35
+ const resolveScene = (path: string): SceneJson | null => prefabs[`./${path}`] ?? null;
36
+
24
37
  // The soldier is a real GLB character (base-model.glb) animated by mixamo clips
25
38
  // (idle/walk/run/jump) — declared in the scene `assets`. Warm the HTTP cache with
26
39
  // a progress bar before booting; the arena, enemies, SFX + music stay zero-fetch.
@@ -50,6 +63,7 @@ const game = await createGame3D({
50
63
  editor: DEBUG && { library: true },
51
64
  canvas,
52
65
  scene: sceneJson,
66
+ resolveScene,
53
67
  behaviors: { Shoot, HudUpdater },
54
68
  pointer: true, // pointer-lock mouse look (lockOnClick) — drives the free-view yaw/pitch
55
69
  }).catch((e) => {
@@ -0,0 +1,25 @@
1
+ {
2
+ "format": 1,
3
+ "type": "scene",
4
+ "dimension": "3d",
5
+ "name": "Pillar",
6
+ "root": {
7
+ "name": "Pillar",
8
+ "type": "StaticBody3D",
9
+ "props": { "collider": { "shape": "box", "size": [1.1, 4, 1.1] } },
10
+ "children": [
11
+ {
12
+ "name": "Skin",
13
+ "type": "MeshInstance3D",
14
+ "props": {
15
+ "mesh": "box",
16
+ "size": [1.1, 4, 1.1],
17
+ "material": { "color": "#454f61", "roughness": 0.95 },
18
+ "castShadow": true
19
+ },
20
+ "uid": "n_lfda1tis5dtjjebu"
21
+ }
22
+ ],
23
+ "uid": "n_k1evvnmzx0j4bzpq"
24
+ }
25
+ }