incanto 0.55.0 → 0.56.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/dist/2d.js +1 -1
- package/dist/3d.js +4 -4
- package/dist/{create-game-CzK9_pzg.js → create-game-CqJkfMzm.js} +3 -3
- package/dist/{create-game-BRt6XKmP.js → create-game-YvaNWhe6.js} +1 -1
- package/dist/{environment-presets-DAbEdEwh.js → environment-presets-DLHqgNAF.js} +13 -1
- package/dist/{gameplay-CZ2yq37J.js → gameplay-C_SPzmUe.js} +75 -2
- package/dist/gameplay.d.ts +55 -1
- package/dist/gameplay.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{physics-3d-C_ZJ6f_d.js → physics-3d-NzDwWPrF.js} +2 -2
- package/dist/react.js +1 -1
- package/dist/{src-BVOVHRL0.js → src-51GA-9m-.js} +1 -1
- package/dist/{test-Ca5eqELC.js → test-Bu6SPNsV.js} +4 -4
- package/dist/test.js +1 -1
- package/dist/vite.js +2 -2
- package/editor/assets/{agent8-Cz4oHPtm.js → agent8-X0Nesj-k.js} +1 -1
- package/editor/assets/{debug-r-Fi9nZh.js → debug-TXqu-ftX.js} +1 -1
- package/editor/assets/{index-BfqmvXYD.js → index-DTdwKKIv.js} +51 -51
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/skills/incanto-building-3d-games.md +18 -5
- package/skills/incanto-gameplay-behaviors.md +19 -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-DTdwKKIv.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/GameServer-C56iOUgF.js">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
|
@@ -203,11 +203,24 @@ A nameplate, a sign, a damage number:
|
|
|
203
203
|
- It IS a `Sprite3D`, so `anchor`, `tint`, `opacity`, `alphaTest`, `renderOrder`
|
|
204
204
|
and `orderGroup` all work exactly as they do there.
|
|
205
205
|
|
|
206
|
-
A **damage number** is this node plus
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
206
|
+
A **damage number** is this node plus the `FloatAway` behavior, and no
|
|
207
|
+
TypeScript of your own:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{ "name": "Hit", "type": "Label3D",
|
|
211
|
+
"props": { "text": "12", "height": 0.35, "color": "#ff5a5a" },
|
|
212
|
+
"script": { "name": "FloatAway", "props": { "rise": 1.2, "seconds": 0.7, "drift": 0.3 } } }
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
It rises with an ease-out (constant speed reads as a lift, not a hit), holds at
|
|
216
|
+
full opacity for `hold` of its life so the number is readable, fades, and frees
|
|
217
|
+
itself — so a hundred numbers a fight leave nothing in the tree. `drift` keeps
|
|
218
|
+
ten at once from stacking into one. Spawning is `duplicateNode` + set `text` and
|
|
219
|
+
`position`.
|
|
220
|
+
|
|
221
|
+
Re-rasterising is handled: the texture is rebuilt only when the text (or
|
|
222
|
+
size/colour/font) changes, and the old one is disposed, so a number per hit does
|
|
223
|
+
not leak a texture per hit.
|
|
211
224
|
|
|
212
225
|
| Prop | Default | Notes |
|
|
213
226
|
|---|---|---|
|
|
@@ -828,6 +828,25 @@ import { CameraShake, Cooldown, hitStop, screenFlash } from 'incanto/gameplay';
|
|
|
828
828
|
tested. (A stepped frame still HAPPENS while paused: `update` runs with
|
|
829
829
|
`dt = 0`, which is how the pause menu's own key polling keeps working.)
|
|
830
830
|
|
|
831
|
+
### `FloatAway` — rise, fade, gone
|
|
832
|
+
|
|
833
|
+
The second half of a damage number, a pickup puff, a `+50`:
|
|
834
|
+
|
|
835
|
+
```json
|
|
836
|
+
{ "name": "Hit", "type": "Label3D",
|
|
837
|
+
"props": { "text": "12", "height": 0.35 },
|
|
838
|
+
"script": { "name": "FloatAway", "props": { "rise": 1.2, "seconds": 0.7, "drift": 0.3 } } }
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
`rise` (world units, negative sinks) · `seconds` · `hold` (fraction of the life
|
|
842
|
+
at full opacity before the fade) · `drift` (sideways, so ten at once do not
|
|
843
|
+
stack) · `freeOnEnd` (default true).
|
|
844
|
+
|
|
845
|
+
Works on anything with `position` and `opacity` — a `Label3D`, a `Sprite3D`
|
|
846
|
+
puff, a 2D `Label`. It reads the start position ONCE, so the ease does not
|
|
847
|
+
compound, and it frees the node a frame after it is invisible rather than on the
|
|
848
|
+
frame it gets there (which reads as a flicker).
|
|
849
|
+
|
|
831
850
|
## Did the effect fire?
|
|
832
851
|
|
|
833
852
|
Sound has `engine.audio`; vision has **`engine.effects`**, and the question is
|