incanto 0.78.2 → 0.79.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/assets/backdrops/sky_gradient.png +0 -0
- package/assets/catalog.json +8 -0
- package/dist/2d.js +4 -4
- package/dist/3d.d.ts +39 -0
- package/dist/3d.js +5 -5
- package/dist/{agent8-B-bh3n0X.js → agent8---rIaJ3j.js} +1 -1
- package/dist/{create-game-BMIPKrQW.js → create-game-CtYQT8Uk.js} +6 -6
- package/dist/{create-game-Dai5vfVu.js → create-game-Cxx820o9.js} +67 -9
- package/dist/editor.js +37 -25
- package/dist/{environment-presets-e_9YCnGu.js → environment-presets-fGpZHUab.js} +3 -3
- package/dist/{gameplay-Bfff_beb.js → gameplay-CplbZE7c.js} +1 -1
- package/dist/gameplay.js +2 -2
- package/dist/index.js +3 -3
- package/dist/net.js +2 -2
- package/dist/{physics-2d-Tuf5LAyq.js → physics-2d-Cm1DIjk2.js} +3 -3
- package/dist/{physics-3d-C5MOujfQ.js → physics-3d-CwJzo3fP.js} +3 -3
- package/dist/{picking-DIwE48sU.js → picking-DxHiUoLo.js} +2 -2
- package/dist/{pose-ByFB_J3O.js → pose-O50uVW-j.js} +18 -1
- package/dist/react.js +1 -1
- package/dist/{register-B768Qedj.js → register-CIDbUbFG.js} +1 -1
- package/dist/{register-7E3P1gz6.js → register-l4ZWcLwD.js} +3 -3
- package/dist/{replay-DrqQ6dZj.js → replay-CooHM9lL.js} +2 -2
- package/dist/{split-screen-B-dIcQsQ.js → split-screen-BRbSkBMO.js} +3 -3
- package/dist/{test-CVbxnXlv.js → test-Def33MoL.js} +13 -13
- package/dist/test.js +2 -2
- package/dist/vite.js +2 -2
- package/editor/assets/{agent8-DA-I5qhv.js → agent8-WXuvhs5H.js} +1 -1
- package/editor/assets/{debug-99tEPoGm.js → debug-xpJQqbx1.js} +1 -1
- package/editor/assets/{index-Db74LZY-.js → index-DJryzpvb.js} +102 -102
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/skills/incanto-assets.md +15 -0
- package/skills/incanto-building-3d-games.md +39 -0
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-DJryzpvb.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/GameServer-C56iOUgF.js">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
package/skills/incanto-assets.md
CHANGED
|
@@ -56,6 +56,7 @@ second copy, and it drifted: `2dbasic` said 192×192 for art whose real grid is
|
|
|
56
56
|
| `foliage` | `bark_oak/birch/pine_{color,normal,roughness}` | **Tree3D** trunk bark (sampled by default) |
|
|
57
57
|
| `foliage` | `ground_grass`, `ground_dirt`, `ground_dirt_normal` | **Terrain3D** grassland ground textures |
|
|
58
58
|
| `audio` | `explosion`, `gold-loot`, `slash`, `heal`, `ui-click`, … | **AudioPlayer** `src` sound files (see below) |
|
|
59
|
+
| `backdrop` | `sky_gradient` | **`environment.skybox`** — an equirect picture behind the scene, never a light |
|
|
59
60
|
|
|
60
61
|
### 1b. The `url` contract — referencing each kind
|
|
61
62
|
|
|
@@ -86,6 +87,20 @@ Every catalog entry has a `url` that is directly usable; there are two classes:
|
|
|
86
87
|
For zero-asset sound, prefer the procedural SFX **presets** instead of a file.
|
|
87
88
|
Full guide: **incanto-audio.md** (presets, AudioPlayer, volume buses).
|
|
88
89
|
|
|
90
|
+
- **Backdrop (`kind: "backdrop"`)** — an equirectangular picture for
|
|
91
|
+
`environment.skybox`. `url` is `incanto/assets/backdrops/<file>`, which the
|
|
92
|
+
dev server serves as written — but a **built** game has no such route, so
|
|
93
|
+
`incanto-assets copy sky_gradient --out public` and write the copied name:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
"environment": { "sky": { "type": "atmosphere" }, "skybox": "sky_gradient.png" }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
It is a picture behind the scene and NEVER a light source (an 8-bit image as
|
|
100
|
+
light turns every metal into plastic); keep `sky` or `preset` for lighting.
|
|
101
|
+
Why the two roles are separate, and what `.hdr` is for: the "A picture as
|
|
102
|
+
the sky" section of **incanto-building-3d-games.md**.
|
|
103
|
+
|
|
89
104
|
- **Packaged 2D sprites (character / tile / item / effect)** — `url` is
|
|
90
105
|
`incanto/assets/<file>` (e.g. `incanto/assets/items/coin.png`). This is the
|
|
91
106
|
**bundler-import / copy** reference. In a bundler game (vite, the usual target)
|
|
@@ -595,6 +595,45 @@ show it as the background (otherwise `background` color applies). Standard
|
|
|
595
595
|
materials need this OR explicit lights to be visible. An explicit HDRI wins
|
|
596
596
|
over the `sky`'s image-based ambience.
|
|
597
597
|
|
|
598
|
+
`hdri` is **`.hdr` only**, on purpose: that texture is the scene's LIGHT, and an
|
|
599
|
+
8-bit jpg fed to it clips the sun to flat white — chrome loses its highlight,
|
|
600
|
+
`metalness: 1` reads as plastic, `clearcoat` paint goes matte, `Water3D` loses
|
|
601
|
+
its glint. A jpg cannot get that range back; it was never in the file.
|
|
602
|
+
|
|
603
|
+
### A picture as the sky (`skybox: "<url>"`)
|
|
604
|
+
|
|
605
|
+
What is VISIBLE behind the scene is a different question from what lights it,
|
|
606
|
+
and for the visible half a picture is the right tool — a 2k `.hdr` is ~10 MB, a
|
|
607
|
+
2k `.jpg` is ~300 KB. So `skybox` also takes a url:
|
|
608
|
+
|
|
609
|
+
```json
|
|
610
|
+
"environment": {
|
|
611
|
+
"sky": { "type": "atmosphere", "elevationDeg": 30, "azimuthDeg": 150 },
|
|
612
|
+
"skybox": "sky_gradient.png"
|
|
613
|
+
}
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
| `skybox` | you SEE | the scene is LIT by |
|
|
617
|
+
|---|---|---|
|
|
618
|
+
| `true` | the `hdri`/`preset` | the `hdri`/`preset` |
|
|
619
|
+
| `"<url>"` (`.jpg` `.png` `.webp`, or `.hdr`) | that picture | `hdri`/`preset` if set → else the `sky`'s PMREM → else `ambient` only |
|
|
620
|
+
| absent | `background` colour | same |
|
|
621
|
+
|
|
622
|
+
The picture is assigned to the background **only** — it never reaches
|
|
623
|
+
`scene.environment` — so the composition above is the intended one: a free
|
|
624
|
+
procedural `sky` doing the lighting and the sun, and a cheap painted panorama
|
|
625
|
+
doing the looking. The `sky` mesh stops drawing while a picture is up (it is a
|
|
626
|
+
450 km sphere and would paint over it) but keeps aiming the sun and feeding the
|
|
627
|
+
PMREM. Underwater still wins. `fog` does not tint a background image (three
|
|
628
|
+
does not fog `scene.background`) — pick a picture whose horizon already matches.
|
|
629
|
+
|
|
630
|
+
The url must look like one — a path (`sky.png`, `/textures/night.hdr`) or an
|
|
631
|
+
https url. A bare word (`"yes"`) is refused at load: it would be fetched
|
|
632
|
+
verbatim and 404 into a black sky with nothing to grep for. A picture that
|
|
633
|
+
does 404 is reported by `game.assetErrors()` under the url you wrote, like any
|
|
634
|
+
texture. The built-in `sky_gradient` (`bunx incanto-assets copy sky_gradient
|
|
635
|
+
--out public`) is the zero-setup starting point.
|
|
636
|
+
|
|
598
637
|
## NEVER compute a Y against the terrain by hand
|
|
599
638
|
|
|
600
639
|
This is the single most repeated mistake in scene authoring, and it is not a
|