incanto 0.71.0 → 0.73.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.
- package/bin/incanto-check.mjs +114 -42
- package/bin/incanto-editor.mjs +15 -9
- package/bin/incanto-feel.mjs +11 -1
- package/bin/incanto-play.mjs +11 -1
- package/bin/incanto-playtest.mjs +11 -1
- package/bin/incanto-verify.mjs +9 -2
- package/dist/2d.d.ts +29 -4
- package/dist/2d.js +3 -3
- package/dist/3d.d.ts +137 -15
- package/dist/3d.js +6 -6
- package/dist/{agent8-Cfmd3ar_.js → agent8-CHTT4unP.js} +1 -1
- package/dist/{audio-player-L8yccdMP.d.ts → audio-player-BOrk4eQx.d.ts} +1 -1
- package/dist/{behavior-Dcz0fr1S.d.ts → behavior-J1cmVah0.d.ts} +9 -1
- package/dist/{create-game-LCHBLfA4.js → create-game-CAu-ucHg.js} +8 -7
- package/dist/{create-game-CH4kt78v.js → create-game-CbTLFjis.js} +37 -13
- package/dist/debug.d.ts +1 -1
- package/dist/debug.js +1 -1
- package/dist/editor.js +1036 -930
- package/dist/{environment-presets-99BzP_L-.js → environment-presets-BsFJM3v0.js} +277 -60
- package/dist/{gameplay-CNULJvwh.js → gameplay-CRte0OVf.js} +589 -35
- package/dist/gameplay.d.ts +136 -4
- package/dist/gameplay.js +2 -2
- package/dist/index.d.ts +6 -4
- package/dist/index.js +6 -6
- package/dist/{loader-8-IHvbKD.d.ts → loader-BAeWMYfF.d.ts} +10 -3
- package/dist/net.d.ts +2 -2
- package/dist/net.js +2 -2
- package/dist/{physics-2d-FhrXUc6B.js → physics-2d-CovokK7s.js} +94 -11
- package/dist/{physics-3d-CFEGxBXZ.js → physics-3d-BiK6Emwn.js} +202 -15
- package/dist/{picking-DVo7fI13.js → picking-Dtd8JInh.js} +2 -2
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{register-BYQCBySi.js → register-CY9QCCZs.js} +45 -9
- package/dist/{register-DuVdzxbq.js → register-CjociOtt.js} +19 -4
- package/dist/{replay-DEvp3kyV.js → replay-B6BbgGM_.js} +55 -12
- package/dist/{replay-F7IZHdFR.d.ts → replay-wZK5Ok5c.d.ts} +2 -2
- package/dist/{save-slots-Bvuh2p_r.js → save-slots-CEUGeLuB.js} +57 -3
- package/dist/{split-screen-eULetcg-.js → split-screen-BxZ5rBe7.js} +4 -4
- package/dist/{split-screen-CIYf1zSf.d.ts → split-screen-D6sx8z3Z.d.ts} +2 -2
- package/dist/{sprite-animation-CqR2o3SA.js → sprite-animation-Bz3DHD_4.js} +1 -1
- package/dist/{src-_jk0qLsS.js → src-D-dnVrFY.js} +1 -1
- package/dist/{test-CmN54kWv.js → test-DZmCFz0Q.js} +162 -30
- package/dist/test.d.ts +56 -5
- package/dist/test.js +2 -2
- package/dist/{touch-BnCyPA0G.js → touch-CioTZB-y.js} +1 -1
- package/dist/vite.d.ts +8 -1
- package/dist/vite.js +22 -5
- package/editor/assets/{agent8-yLIEYHbd.js → agent8-GuZ5u5bi.js} +1 -1
- package/editor/assets/{debug-u31w_yhq.js → debug-BbxionO2.js} +1 -1
- package/editor/assets/{index-DK9xMGpW.js → index-CNlTzQbm.js} +92 -92
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/schemas/scene.schema.json +634 -10
- package/skills/incanto-3d-character.md +113 -5
- package/skills/incanto-assets.md +9 -3
- package/skills/incanto-behaviors-and-scripts.md +26 -2
- package/skills/incanto-building-2d-games.md +15 -0
- package/skills/incanto-building-3d-games.md +45 -0
- package/skills/incanto-editor.md +10 -1
- package/skills/incanto-environment.md +7 -2
- package/skills/incanto-game-feel.md +16 -11
- package/skills/incanto-gameplay-behaviors.md +174 -15
- package/skills/incanto-node-reference.md +122 -45
- package/skills/incanto-physics-and-input.md +67 -5
- package/skills/incanto-scene-json-authoring.md +37 -1
- package/skills/incanto-verifying-your-game.md +19 -2
- package/templates-app/beacon-isle-3d/PROJECT/Status.md +8 -0
- package/templates-app/beacon-isle-3d/PROJECT/Structure.md +3 -0
- package/templates-app/beacon-isle-3d/package.json +1 -1
- package/templates-app/beacon-isle-3d/src/game.scene.json +512 -184
- package/templates-app/beacon-isle-3d/verify.ts +144 -0
- package/templates-app/molehill-2d/package.json +1 -1
- package/templates-app/platformer-2d/PROJECT/Status.md +7 -0
- package/templates-app/platformer-2d/PROJECT/Structure.md +3 -0
- package/templates-app/platformer-2d/package.json +1 -1
- package/templates-app/platformer-2d/src/game.scene.json +319 -93
- package/templates-app/platformer-2d/verify.ts +54 -0
- package/templates-app/star-survivor/package.json +1 -1
- package/templates-app/star-survivor/src/game.scene.json +18 -9
- package/templates-app/tps-3d/PROJECT/Context.md +1 -1
- package/templates-app/tps-3d/PROJECT/Status.md +40 -1
- package/templates-app/tps-3d/PROJECT/Structure.md +19 -0
- package/templates-app/tps-3d/package.json +1 -1
- package/templates-app/tps-3d/src/behaviors.ts +9 -0
- package/templates-app/tps-3d/src/cover.scene.json +26 -0
- package/templates-app/tps-3d/src/game.scene.json +379 -80
- package/templates-app/tps-3d/src/main.ts +14 -0
- package/templates-app/tps-3d/src/pillar.scene.json +25 -0
- package/templates-app/tps-3d/verify.ts +582 -3
- package/templates-app/village-quest-3d/package.json +1 -1
- package/templates-app/village-quest-3d/src/grove.scene.json +98 -46
- package/templates-app/village-quest-3d/src/village.scene.json +449 -223
|
@@ -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
|
+
}
|