incanto 0.60.0 → 0.62.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 +13 -0
- package/bin/incanto-verify.mjs +134 -55
- package/dist/2d.d.ts +64 -3
- package/dist/2d.js +3 -3
- package/dist/3d.d.ts +5 -5
- package/dist/3d.js +5 -4
- package/dist/{pathfinding-BqWBb0kh.d.ts → audio-player-D5GJgb_x.d.ts} +103 -38
- package/dist/{behavior-DWKTUzKI.d.ts → behavior-DsgayMsH.d.ts} +79 -1
- package/dist/{create-game-ClnIb_M5.js → create-game-BpunnGPX.js} +78 -13
- package/dist/{create-game-BCm38FJV.js → create-game-Caut3bqN.js} +21 -294
- package/dist/debug.d.ts +1 -1
- package/dist/debug.js +1 -1
- package/dist/{duplicate-DJQd44CD.js → duplicate-E4FUs5Bn.js} +1 -1
- package/dist/editor.js +41 -19
- package/dist/{environment-presets-8cjF3t6w.js → environment-presets-BAWeOeqf.js} +50 -13
- package/dist/{gameplay-BBEjPFsR.js → gameplay-CaHqDiQD.js} +177 -24
- package/dist/gameplay.d.ts +1 -1
- package/dist/gameplay.js +1 -1
- package/dist/index.d.ts +97 -6
- package/dist/index.js +7 -7
- package/dist/{loader-D8n7TU8W.js → loader-DEe272nY.js} +900 -2
- package/dist/{loader-TvkRFbyL.d.ts → loader-DolLJWJn.d.ts} +13 -1
- package/dist/net.d.ts +2 -2
- package/dist/net.js +1 -1
- package/dist/pathfinding-_fGrCFmH.d.ts +28 -0
- package/dist/{physics-2d-DqdVp1bt.js → physics-2d-BXmu2i7W.js} +11 -3
- package/dist/{physics-3d-BP0DZb_1.js → physics-3d-ClxP6Uv7.js} +121 -17
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{register-BSu2dWGC.js → register-CNh4FlbD.js} +104 -16
- package/dist/{register-Da3hXh2H.js → register-D3yx8D4r.js} +228 -16
- package/dist/{registry-WWcQcfMr.js → registry-CF70EArN.js} +55 -3
- package/dist/{replay-BCMK_VRP.d.ts → replay-C5x2vPF5.d.ts} +2 -2
- package/dist/{replay-BlNuIDdg.js → replay-DlgHItNv.js} +57 -197
- package/dist/{split-screen-CL5Yvxse.js → split-screen-CBM9wcMX.js} +3 -3
- package/dist/{split-screen-BQ3tAsf-.d.ts → split-screen-D7OopelJ.d.ts} +2 -2
- package/dist/{src-DFpXBMJN.js → src-CH00_JsR.js} +1 -1
- package/dist/{teardown-CTTwhWSe.js → teardown-C7qP-dcC.js} +1 -1
- package/dist/{test-BeZ95pqw.js → test-BMkg8zMV.js} +29 -16
- package/dist/test.d.ts +45 -4
- package/dist/test.js +2 -2
- package/dist/vite.js +2 -2
- package/editor/assets/{agent8-DSJries_.js → agent8-m5mtAO_A.js} +1 -1
- package/editor/assets/{debug-D15Wi5TO.js → debug-CPhzCT8f.js} +1 -1
- package/editor/assets/{index-BjC88k97.js → index-D422P4kW.js} +92 -92
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/schemas/scene.schema.json +91 -0
- package/skills/incanto-3d-models.md +1 -1
- package/skills/incanto-assets.md +10 -1
- package/skills/incanto-audio.md +21 -13
- package/skills/incanto-behaviors-and-scripts.md +44 -3
- package/skills/incanto-building-2d-games.md +32 -4
- package/skills/incanto-building-3d-games.md +1 -1
- package/skills/incanto-editor.md +1 -1
- package/skills/incanto-gameplay-behaviors.md +39 -2
- package/skills/incanto-hud.md +5 -3
- package/skills/incanto-localization.md +7 -0
- package/skills/incanto-node-reference.md +12 -0
- package/skills/incanto-physics-and-input.md +23 -2
- package/skills/incanto-scene-json-authoring.md +6 -1
- package/skills/incanto-verifying-your-game.md +31 -1
- package/templates-app/beacon-isle-3d/package.json +1 -1
- package/templates-app/platformer-2d/package.json +1 -1
- package/templates-app/star-survivor/package.json +1 -1
- package/templates-app/tps-3d/package.json +1 -1
- package/templates-app/village-quest-3d/package.json +1 -1
- package/dist/particle-sim-C5OfBbmU.d.ts +0 -77
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { a as Rng } from "./schema-CFeioQRE.js";
|
|
2
|
-
|
|
3
|
-
//#region src/core/particle-sim.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Deterministic particle pool — pure math, renderer-agnostic, headless-
|
|
6
|
-
* testable. 2D uses the xy plane (y-down, directionDeg 0 = +x, -90 = up);
|
|
7
|
-
* 3D feeds the same sim with a z spread.
|
|
8
|
-
*/
|
|
9
|
-
interface ParticleSimConfig {
|
|
10
|
-
/** Particles per second (0 = burst-only). */
|
|
11
|
-
rate: number;
|
|
12
|
-
/** Seconds, [min, max]. */
|
|
13
|
-
lifetime: [number, number];
|
|
14
|
-
/** Initial speed, [min, max] (units/sec — px in 2D, meters in 3D). */
|
|
15
|
-
speed: [number, number];
|
|
16
|
-
/** Emission direction center, degrees (0 = +x, -90 = up in y-down 2D). */
|
|
17
|
-
directionDeg: number;
|
|
18
|
-
/** Cone width, degrees (360 = all directions). */
|
|
19
|
-
spreadDeg: number;
|
|
20
|
-
/** Constant acceleration (y-down in 2D). */
|
|
21
|
-
gravity: [number, number, number];
|
|
22
|
-
/** Exponential velocity damping per second (0 = none). */
|
|
23
|
-
drag: number;
|
|
24
|
-
maxParticles: number;
|
|
25
|
-
/** Spread emission into the z axis too (3D). */
|
|
26
|
-
spreadZ?: boolean;
|
|
27
|
-
}
|
|
28
|
-
interface ParticleView {
|
|
29
|
-
x: number;
|
|
30
|
-
y: number;
|
|
31
|
-
z: number;
|
|
32
|
-
vx: number;
|
|
33
|
-
vy: number;
|
|
34
|
-
vz: number;
|
|
35
|
-
/** Seconds alive. */
|
|
36
|
-
age: number;
|
|
37
|
-
/** Total lifetime in seconds. */
|
|
38
|
-
life: number;
|
|
39
|
-
/** age/life in [0, 1] — drives size/color/alpha ramps. */
|
|
40
|
-
t: number;
|
|
41
|
-
/** Per-particle random in [0, 1) — stable for the particle's lifetime. */
|
|
42
|
-
seed: number;
|
|
43
|
-
}
|
|
44
|
-
declare class ParticleSim {
|
|
45
|
-
private readonly config;
|
|
46
|
-
private readonly rng;
|
|
47
|
-
private readonly data;
|
|
48
|
-
private alive;
|
|
49
|
-
private spawnAccumulator;
|
|
50
|
-
private everSpawned;
|
|
51
|
-
constructor(config: ParticleSimConfig, rng: Rng);
|
|
52
|
-
/**
|
|
53
|
-
* Shift every live particle — how world-space emission is done.
|
|
54
|
-
*
|
|
55
|
-
* The pool is in the emitter's LOCAL space, so a moving emitter drags its
|
|
56
|
-
* whole plume with it: dust glued to a running player instead of left behind,
|
|
57
|
-
* and the documented "move the emitter and replay" recipe for a one-shot
|
|
58
|
-
* teleporting the previous explosion across the level. Counter-translating by
|
|
59
|
-
* the emitter's own motion each frame leaves the particles where they were
|
|
60
|
-
* born, exactly, and costs one pass over the live ones.
|
|
61
|
-
*/
|
|
62
|
-
translateAll(dx: number, dy: number, dz: number): void;
|
|
63
|
-
/** Change the emission rate LIVE (particles/sec; 0 pauses emission) — lets an
|
|
64
|
-
* emitter toggle on/off at runtime (drift smoke, throttle flames). */
|
|
65
|
-
setRate(rate: number): void;
|
|
66
|
-
get count(): number;
|
|
67
|
-
/** True when nothing is alive and at least one particle has ever spawned. */
|
|
68
|
-
get done(): boolean;
|
|
69
|
-
/** Spawn n particles immediately (fireworks, explosions, flashes). */
|
|
70
|
-
burst(n: number): void;
|
|
71
|
-
update(dt: number): void;
|
|
72
|
-
forEach(fn: (p: ParticleView) => void): void;
|
|
73
|
-
private spawn;
|
|
74
|
-
private kill;
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
export { ParticleSimConfig as n, ParticleView as r, ParticleSim as t };
|