incanto 0.11.0 → 0.13.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/README.md +22 -0
- package/bin/incanto-new.mjs +87 -0
- package/dist/2d.d.ts +2 -2
- package/dist/2d.js +3 -3
- package/dist/3d.d.ts +246 -71
- package/dist/3d.js +143 -4
- package/dist/{behavior-Bod1AyJS.d.ts → behavior-CPibUfnH.d.ts} +4 -2
- package/dist/{create-game-CdWhP6ve.js → create-game-Ct86zczq.js} +5 -5
- package/dist/{create-game-DZ_4Nfq8.js → create-game-J6g4QInv.js} +75 -24
- package/dist/debug.d.ts +1 -1
- package/dist/{duplicate-BEvGBtb_.js → duplicate-BINwP0WG.js} +1 -1
- package/dist/{gameplay-Dn3yidJw.js → gameplay-sSqrUcnz.js} +75 -3
- package/dist/gameplay.d.ts +37 -2
- package/dist/gameplay.js +2 -2
- package/dist/index.d.ts +3 -30
- package/dist/index.js +4 -4
- package/dist/{loader-B4OEXDZ8.js → loader-BZqOKfI2.js} +3 -1
- package/dist/{loader-BcUDfNHn.d.ts → loader-DILt9PGC.d.ts} +1 -1
- package/dist/net.d.ts +1 -1
- package/dist/net.js +3 -3
- package/dist/{audio-player-Dyjg5k92.d.ts → pathfinding-RWYkNKx9.d.ts} +29 -2
- package/dist/{physics-2d-DweTURFt.js → physics-2d-BiIdl51r.js} +8 -4
- package/dist/{physics-3d-Br97Ans2.js → physics-3d-DhaAaKJo.js} +8 -4
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{register-Cwc-yCYx.js → register-BFFE1Mh1.js} +2 -2
- package/dist/{register-ysLR3WQS.js → register-BFw4c83z.js} +508 -123
- package/dist/{register-BD6zgrv_.js → register-Djwckzgx.js} +2 -2
- package/dist/{register-DJZXxwAn.js → register-nObreUQR.js} +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.js +10 -10
- package/editor/assets/{agent8-BxNvAcLA.js → agent8-BF8Jfbkl.js} +1 -1
- package/editor/assets/{index-DMCQXowF.js → index-DSq0gdhE.js} +53 -41
- package/editor/index.html +1 -1
- package/package.json +4 -2
- package/schemas/scene.schema.json +263 -0
- package/skills/incanto-3d-character.md +37 -1
- package/skills/incanto-building-3d-games.md +83 -0
- package/skills/incanto-editor.md +3 -3
- package/skills/incanto-gameplay-behaviors.md +23 -1
- package/skills/incanto-node-reference.md +51 -0
- package/templates-app/beacon-isle-3d/PROJECT/Context.md +44 -0
- package/templates-app/beacon-isle-3d/PROJECT/Requirements.md +16 -0
- package/templates-app/beacon-isle-3d/PROJECT/Status.md +38 -0
- package/templates-app/beacon-isle-3d/PROJECT/Structure.md +24 -0
- package/templates-app/beacon-isle-3d/docs/project-3d-rules.md +38 -0
- package/templates-app/beacon-isle-3d/generate-world.ts +814 -0
- package/templates-app/beacon-isle-3d/index.html +68 -0
- package/templates-app/beacon-isle-3d/package.json +26 -0
- package/templates-app/beacon-isle-3d/src/behaviors.ts +570 -0
- package/templates-app/beacon-isle-3d/src/game.scene.json +2992 -0
- package/templates-app/beacon-isle-3d/src/main.ts +33 -0
- package/templates-app/beacon-isle-3d/tsconfig.json +13 -0
- package/templates-app/beacon-isle-3d/verify.ts +285 -0
- package/templates-app/beacon-isle-3d/vite.config.ts +5 -0
- package/templates-app/tps-3d/PROJECT/Context.md +49 -0
- package/templates-app/tps-3d/PROJECT/Requirements.md +38 -0
- package/templates-app/tps-3d/PROJECT/Status.md +41 -0
- package/templates-app/tps-3d/PROJECT/Structure.md +44 -0
- package/templates-app/tps-3d/docs/project-3d-rules.md +38 -0
- package/templates-app/tps-3d/index.html +244 -0
- package/templates-app/tps-3d/package.json +25 -0
- package/templates-app/tps-3d/src/behaviors.ts +405 -0
- package/templates-app/tps-3d/src/game.scene.json +677 -0
- package/templates-app/tps-3d/src/main.ts +64 -0
- package/templates-app/tps-3d/tsconfig.json +13 -0
- package/templates-app/tps-3d/verify.ts +167 -0
- package/templates-app/tps-3d/vite.config.ts +5 -0
- package/templates-app/village-quest-3d/PROJECT/Context.md +39 -0
- package/templates-app/village-quest-3d/PROJECT/Requirements.md +36 -0
- package/templates-app/village-quest-3d/PROJECT/Status.md +26 -0
- package/templates-app/village-quest-3d/PROJECT/Structure.md +30 -0
- package/templates-app/village-quest-3d/docs/project-3d-rules.md +38 -0
- package/templates-app/village-quest-3d/index.html +68 -0
- package/templates-app/village-quest-3d/package.json +25 -0
- package/templates-app/village-quest-3d/src/behaviors.ts +529 -0
- package/templates-app/village-quest-3d/src/grove.scene.json +826 -0
- package/templates-app/village-quest-3d/src/main.ts +35 -0
- package/templates-app/village-quest-3d/src/quest.ts +18 -0
- package/templates-app/village-quest-3d/src/village.scene.json +680 -0
- package/templates-app/village-quest-3d/tsconfig.json +13 -0
- package/templates-app/village-quest-3d/verify.ts +254 -0
- package/templates-app/village-quest-3d/vite.config.ts +5 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Beacon Isle — Status
|
|
2
|
+
|
|
3
|
+
## Round 2 (2026-07-12)
|
|
4
|
+
|
|
5
|
+
- **The Shadeheart**: lighting the third ward summons a glowing violet
|
|
6
|
+
colossus (primitive-built — a keeper.glb attempt rendered at zero scale,
|
|
7
|
+
see Learnings below) that hunts the player across the island via the
|
|
8
|
+
terrain nav; five strikes (recoil + eye-flare per hit) fell it in a triple
|
|
9
|
+
burst; only then does the keeper's report end the quest.
|
|
10
|
+
- **The clock IS the quest** (paused DayNight, director-lerped `hour`):
|
|
11
|
+
dusk start → each lit ward buys back light → the boss drags the isle to a
|
|
12
|
+
deep-red horizon (17.8 — sun kept ABOVE the horizon; below it the
|
|
13
|
+
atmosphere sky and its IBL go black) → victory brings morning.
|
|
14
|
+
- **Gliding**: hold JUMP while falling — capped descent + dash trail.
|
|
15
|
+
- Keeper NPC tracks the player with `BoneLookAt3D`; shoreline rocks are one
|
|
16
|
+
`InstancedMesh3D` draw call.
|
|
17
|
+
|
|
18
|
+
## Round 1 (2026-07-11)
|
|
19
|
+
|
|
20
|
+
- Full quest loop, terrain-nav shade AI, bone-mounted sword, golden-hour
|
|
21
|
+
grade, headless verify + replay determinism, 4-iteration visual pass.
|
|
22
|
+
|
|
23
|
+
## Learnings
|
|
24
|
+
|
|
25
|
+
- `PathFollow` writes WORLD coordinates into `node.position` — such nodes
|
|
26
|
+
must be ROOT children. Parenting one under a positioned wrapper doubles
|
|
27
|
+
the offset ON SCREEN while all position-based gameplay math stays
|
|
28
|
+
self-consistent: invisible-boss bugs that verify green.
|
|
29
|
+
- keeper.glb mounts at a degenerate scale through ModelInstance3D's
|
|
30
|
+
targetHeight fit (the known "explicit scale" trap) — primitives with
|
|
31
|
+
emissive materials are the reliable monster path.
|
|
32
|
+
- Atmosphere rule: keep `elevationDeg` (or DayNight `hour`) sun-above-horizon
|
|
33
|
+
in playable scenes; the sky + IBL die within ~1° below.
|
|
34
|
+
|
|
35
|
+
## Ideas next
|
|
36
|
+
|
|
37
|
+
- Boss attack telegraphs (charge-up glow, ground slam particles).
|
|
38
|
+
- A hurt/attack clip for shades once one lands in the catalog.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Beacon Isle — Structure
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
generate-world.ts the WORLD AUTHORING script (bun run world):
|
|
5
|
+
island terrain + sea + groves/grass/flowers +
|
|
6
|
+
quest sites on walkable ground → src/game.scene.json
|
|
7
|
+
index.html canvas + loading bar
|
|
8
|
+
src/main.ts preload → createGame3D
|
|
9
|
+
src/game.scene.json GENERATED — do not hand-edit; edit generate-world.ts
|
|
10
|
+
src/behaviors.ts IsleDirector (quest FSM, terrain-nav shade AI,
|
|
11
|
+
ward relighting, fireworks, respawn) + SwordStrike
|
|
12
|
+
verify.ts audit + quest E2E + hunt + death/respawn + replay
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Key decisions
|
|
16
|
+
|
|
17
|
+
- The nav grid is built ONCE in `IsleDirector.onReady` from the live
|
|
18
|
+
Terrain3D; shade hunts re-path every 0.4 s with `findPath` (cheap A*).
|
|
19
|
+
- Shades are primitive-built (capsule + gem hood + emissive eyes + Trail3D
|
|
20
|
+
wisp) — zero external meshes, instantly reskinnable.
|
|
21
|
+
- Quest state is a module singleton (`quest`) so death → `goToScene` respawn
|
|
22
|
+
keeps lit wards; `IsleDirector.onReady` re-applies their glow.
|
|
23
|
+
- The whole Terrain subtree is static EXCEPT Sea and Clouds (auditScene
|
|
24
|
+
catches the freeze-the-water mistake if you regress this).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<userRequest>
|
|
2
|
+
YOU MUST follow these rules EXACTLY when vibe-coding on this Incanto template:
|
|
3
|
+
|
|
4
|
+
1. 📖 READ THE SKILLS FIRST: `node_modules/incanto/skills/` is the engine
|
|
5
|
+
manual, version-pinned to what is installed. Start with
|
|
6
|
+
`incanto-building-3d-games.md`, `incanto-3d-character.md`,
|
|
7
|
+
`incanto-gameplay-behaviors.md`, `incanto-environment.md` and
|
|
8
|
+
`incanto-audio.md` — this template composes all five.
|
|
9
|
+
2. 🧱 STRUCTURE IS JSON: scenes, nodes, props, assets, input maps and
|
|
10
|
+
replication all live in `src/game.scene.json`. Add nodes there (or with
|
|
11
|
+
`npx incanto-editor`), NOT by constructing them ad-hoc in code.
|
|
12
|
+
3. 🧠 LOGIC IS BEHAVIORS: gameplay code = small TypeScript Behavior classes,
|
|
13
|
+
registered with `registerBehavior('Name', Class)` and attached in JSON via
|
|
14
|
+
`"script": { "name": "Name" }`. Reach for a BUILT-IN gameplay behavior
|
|
15
|
+
(Health, Chase, WaveSpawner, DamageOnContact, ScoreKeeper…) before writing
|
|
16
|
+
your own — this game's only custom behaviors are `Shoot` and `HudUpdater`.
|
|
17
|
+
4. 🔑 UIDS ARE GENERATED: every node uid comes from
|
|
18
|
+
`import { newUid } from 'incanto'`. NEVER invent readable uid strings.
|
|
19
|
+
5. 📦 ASSETS ARE DECLARED: `assets` entries need `type` + `url`; reference
|
|
20
|
+
them as `"$key"`. Free extra key-values are preserved — use them to leave
|
|
21
|
+
notes for yourself (license, palette, source prompt).
|
|
22
|
+
6. ⬆️ Y IS UP: 3D space is y-UP meters, +Z is "south", rotations are degrees
|
|
23
|
+
(Euler XYZ). Negative gravity falls.
|
|
24
|
+
7. 🧲 COLLIDERS ARE PROPS: `"collider": { "shape": "box"|"sphere"|"capsule", … }`
|
|
25
|
+
on a body node — never child shape nodes. Wrong shapes hard-fail at load.
|
|
26
|
+
8. 🖥️ THE HUD IS DOM, NOT NODES: 3D scenes have no 2D `UILayer`/`Label` nodes
|
|
27
|
+
(those are `incanto/2d`). The HUD + crosshair + banner are plain HTML in
|
|
28
|
+
`index.html`; `HudUpdater` writes the live numbers into them (guarded so
|
|
29
|
+
headless runs are a no-op).
|
|
30
|
+
9. 🐛 DEBUG WHEN UNSURE: `physics.debugDraw = true` (the object
|
|
31
|
+
`enablePhysics3D` returns) draws every collider in the running game; or boot
|
|
32
|
+
with `?incanto_debug=1` for the live Explorer/Inspector/Stats overlay.
|
|
33
|
+
10. 🎬 DELTA DISCIPLINE: only write props that differ from defaults — the
|
|
34
|
+
loader treats unknown/garbage props as hard errors, which is your friend.
|
|
35
|
+
11. ✅ VERIFY LIKE A USER: `bun run check` validates the scene, `bun run verify`
|
|
36
|
+
proves the loop headlessly, then `bun run dev` and actually PLAY what you
|
|
37
|
+
changed (move, shoot, clear a wave) before declaring it done.
|
|
38
|
+
</userRequest>
|