incanto 0.41.0 → 0.42.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-frame.mjs +144 -0
- package/dist/2d.d.ts +2 -2
- package/dist/2d.js +3 -3
- package/dist/3d.d.ts +76 -4
- package/dist/3d.js +5 -5
- package/dist/{behavior-TA8nySqb.d.ts → behavior-62q0HWBO.d.ts} +3 -1
- package/dist/{create-game-CZpENyin.js → create-game-9KPppR0L.js} +4 -4
- package/dist/{create-game-u7TDbvln.js → create-game-DItIRyXH.js} +158 -5
- package/dist/debug.d.ts +1 -1
- package/dist/{environment-presets-pGTHb_V4.js → environment-presets-Vl5xBsXp.js} +2 -2
- package/dist/{gameplay-By8mslMc.js → gameplay-DRi9524r.js} +13 -0
- package/dist/gameplay.d.ts +13 -1
- package/dist/gameplay.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -167
- package/dist/{loader-CvSDKC3v.d.ts → loader-CeyU_bm1.d.ts} +1 -1
- package/dist/net.d.ts +1 -1
- package/dist/net.js +2 -2
- package/dist/{pathfinding-_UlKUoox.d.ts → pathfinding-C49JSNNq.d.ts} +1 -1
- package/dist/{physics-2d-CEnZFcpM.js → physics-2d-BmgXBNDB.js} +1 -1
- package/dist/{physics-3d-CumBBvQo.js → physics-3d-C2G604O1.js} +2 -2
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{register-DuTlY56W.js → register-BSXV8T9F.js} +3 -1
- package/dist/{register-DnycZ91Q.js → register-D651it1J.js} +1 -1
- package/dist/{register-MSZvnHkp.js → register-R2JTnIMw.js} +1 -1
- package/dist/{replay-DN-kG4va.d.ts → replay-CAphXMyM.d.ts} +1 -1
- package/dist/{replay-DcWg4LT5.js → replay-DilbZgQI.js} +1 -1
- package/dist/src-cU57Uwdw.js +166 -0
- package/dist/{test-B4kSwQzq.js → test-DuOD1DO8.js} +22 -11
- package/dist/test.d.ts +3 -3
- package/dist/test.js +2 -2
- package/dist/vite.d.ts +61 -1
- package/dist/vite.js +149 -2
- package/editor/assets/{agent8-DCHkff44.js → agent8-Csw0T7jh.js} +1 -1
- package/editor/assets/{debug-uHHxqj0a.js → debug-C3qeBD4X.js} +1 -1
- package/editor/assets/{index-i1mIkyMA.js → index-B1rUkWxB.js} +49 -49
- package/editor/index.html +1 -1
- package/package.json +3 -2
- package/skills/incanto-audio.md +6 -2
- package/skills/incanto-verifying-your-game.md +41 -0
- package/templates-app/beacon-isle-3d/package.json +1 -1
- package/templates-app/tps-3d/package.json +1 -1
- 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-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-B1rUkWxB.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.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Vibe-coding-first web game engine SDK — JSON-driven scenes on three.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"game-engine",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"incanto-play": "bin/incanto-play.mjs",
|
|
98
98
|
"incanto-playtest": "bin/incanto-playtest.mjs",
|
|
99
99
|
"incanto-feel": "bin/incanto-feel.mjs",
|
|
100
|
-
"incanto-new": "bin/incanto-new.mjs"
|
|
100
|
+
"incanto-new": "bin/incanto-new.mjs",
|
|
101
|
+
"incanto-frame": "bin/incanto-frame.mjs"
|
|
101
102
|
}
|
|
102
103
|
}
|
package/skills/incanto-audio.md
CHANGED
|
@@ -274,9 +274,13 @@ For **background music** you usually want ONE track at a time and the ability to
|
|
|
274
274
|
**crossfade** to another (exploration → boss, level A → level B). That's
|
|
275
275
|
`engine.music` — a single-track manager that streams a clip and ramps gains:
|
|
276
276
|
|
|
277
|
+
**The bundle ships SFX only** — twelve effects, no music track. A background
|
|
278
|
+
track is your game's own file (`public/audio/…`) or a URL; `incanto/assets/audio/…`
|
|
279
|
+
has nothing to loop.
|
|
280
|
+
|
|
277
281
|
```ts
|
|
278
|
-
// Loop a track (full volume, music bus)
|
|
279
|
-
engine.music.play('
|
|
282
|
+
// Loop a track (full volume, music bus) — YOUR file, from public/:
|
|
283
|
+
engine.music.play('/audio/theme.mp3');
|
|
280
284
|
|
|
281
285
|
// Options: { loop = true, fadeIn = 0 (seconds), bus = 'music' }
|
|
282
286
|
engine.music.play('intro.mp3', { loop: false, fadeIn: 2 });
|
|
@@ -320,6 +320,47 @@ ceiling — drive `engine.timeScale`, with `0.25× 0.5× 1× 2×` presets:
|
|
|
320
320
|
number is refused and negatives clamp to 0: the scale multiplies every dt in
|
|
321
321
|
the engine, so one NaN would take physics, timers and animation with it.
|
|
322
322
|
|
|
323
|
+
### `bunx incanto-frame` — what is actually on screen
|
|
324
|
+
|
|
325
|
+
The rung above framing. `framing` PREDICTS what the camera should see from the
|
|
326
|
+
scene graph; this measures what the GPU drew — the only one that can catch a
|
|
327
|
+
black screen, a material that failed, or a shader drawing where it should not.
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
$ bunx incanto-frame
|
|
331
|
+
frame 1280×720 · luminance 0.62
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
$ bunx incanto-frame
|
|
336
|
+
BLACK SCREEN — nothing was drawn (no light, no camera, or nothing in view)
|
|
337
|
+
frame 1280×720 · luminance 0.00
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Start your game's dev server and open the page first: **the pixels are in the
|
|
341
|
+
browser, not in the dev server.** You do not have to tell it where anything is —
|
|
342
|
+
it reads the ports that are actually listening, asks each one whether it is an
|
|
343
|
+
incanto dev server, and asks that page for a frame over vite's own HMR channel.
|
|
344
|
+
|
|
345
|
+
It writes **no files**. `--json` gives the full report, including a 16×9 grid of
|
|
346
|
+
mean cell colours — enough to answer *where* the frame changed, small enough to
|
|
347
|
+
read. From game code or the console, `game.frame()` returns the same object.
|
|
348
|
+
|
|
349
|
+
Three outcomes, each with its own fix:
|
|
350
|
+
|
|
351
|
+
| | |
|
|
352
|
+
| --- | --- |
|
|
353
|
+
| `no incanto dev server found` | start the dev server |
|
|
354
|
+
| `running on :5173, but no page is connected` | open the preview |
|
|
355
|
+
| a report | read it |
|
|
356
|
+
|
|
357
|
+
Exit code 1 on a black screen, so CI can gate on it.
|
|
358
|
+
|
|
359
|
+
**What it cannot do:** a 16×9 grid does not see a one-pixel seam. It answers
|
|
360
|
+
"did anything render, and roughly what does it look like", not "is this frame
|
|
361
|
+
pixel-identical to last week's". For exact regression detection use the numbers
|
|
362
|
+
(`incanto-feel`, conformance baselines), which are diffable and do not flap.
|
|
363
|
+
|
|
323
364
|
The Inspector HOLDS STILL while you use it: it stops refreshing whenever an
|
|
324
365
|
input has focus or the pointer is inside the panel, and it keeps your scroll
|
|
325
366
|
position across refreshes. Live values resume the moment you move away.
|