@flighthq/particles 0.1.0 → 0.2.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/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/stepParticleObjects.d.ts +19 -0
- package/dist/stepParticleObjects.d.ts.map +1 -0
- package/dist/stepParticleObjects.js +29 -0
- package/dist/stepParticleObjects.js.map +1 -0
- package/package.json +10 -7
- package/src/applyParticleCollisions.test.ts +20 -32
- package/src/applyParticleForces.test.ts +21 -37
- package/src/curve.test.ts +0 -63
- package/src/particleEmitterSignals.test.ts +0 -83
- package/src/particleEmitterState.test.ts +0 -42
- package/src/stepParticleObjects.test.ts +30 -0
- package/src/validateParticleEmitterConfig.test.ts +0 -32
- package/dist/emitParticleBurst.d.ts +0 -15
- package/dist/emitParticleBurst.d.ts.map +0 -1
- package/dist/emitParticleBurst.js +0 -114
- package/dist/emitParticleBurst.js.map +0 -1
- package/dist/prewarmParticleEmitter.d.ts +0 -5
- package/dist/prewarmParticleEmitter.d.ts.map +0 -1
- package/dist/prewarmParticleEmitter.js +0 -13
- package/dist/prewarmParticleEmitter.js.map +0 -1
- package/dist/stepParticleEmitter.d.ts +0 -38
- package/dist/stepParticleEmitter.d.ts.map +0 -1
- package/dist/stepParticleEmitter.js +0 -57
- package/dist/stepParticleEmitter.js.map +0 -1
- package/dist/updateParticleEmitter.d.ts +0 -8
- package/dist/updateParticleEmitter.d.ts.map +0 -1
- package/dist/updateParticleEmitter.js +0 -315
- package/dist/updateParticleEmitter.js.map +0 -1
- package/src/deterministic.test.ts +0 -54
- package/src/emitParticleBurst.test.ts +0 -103
- package/src/prewarmParticleEmitter.test.ts +0 -68
- package/src/stepParticleEmitter.test.ts +0 -113
- package/src/updateParticleEmitter.test.ts +0 -631
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { reserveParticleEmitter } from '@flighthq/sprite';
|
|
2
|
-
import { sampleParticleColorCurve, sampleParticleCurve } from './curve';
|
|
3
|
-
import { ensureParticleEmitterStateCapacity } from './particleEmitterState';
|
|
4
|
-
const PARTICLE_TRANSFORM_STRIDE = 4;
|
|
5
|
-
const TWO_PI = Math.PI * 2;
|
|
6
|
-
/** Emit `count` particles immediately at an arbitrary point (in the emitter's
|
|
7
|
-
* simulation space), independent of the emitter's own spawn rate, bursts, or
|
|
8
|
-
* duration. Returns the number actually spawned (capped by `maxParticles`).
|
|
9
|
-
*
|
|
10
|
-
* This is the building block for sub-emitters: call it from an `onDeath` /
|
|
11
|
-
* `onSpawn` callback to spawn a child effect at the event position (explosions,
|
|
12
|
-
* debris, impact sparks), or once per live particle for trails. The child
|
|
13
|
-
* emitter/state/config are completely independent of the parent.
|
|
14
|
-
*
|
|
15
|
-
* Spawn randomness is drawn from `state.random`, so a seeded child state keeps
|
|
16
|
-
* sub-emitter output deterministic. */
|
|
17
|
-
export function emitParticleBurst(emitter, state, config, count, x, y) {
|
|
18
|
-
const data = emitter.data;
|
|
19
|
-
const liveCount = data.particleCount;
|
|
20
|
-
let toSpawn = Math.floor(count);
|
|
21
|
-
const maxNew = config.maxParticles - liveCount;
|
|
22
|
-
if (toSpawn > maxNew)
|
|
23
|
-
toSpawn = maxNew;
|
|
24
|
-
if (toSpawn <= 0)
|
|
25
|
-
return 0;
|
|
26
|
-
const hasColorVariance = config.colorStartVarianceR !== 0 ||
|
|
27
|
-
config.colorStartVarianceG !== 0 ||
|
|
28
|
-
config.colorStartVarianceB !== 0 ||
|
|
29
|
-
config.colorEndVarianceR !== 0 ||
|
|
30
|
-
config.colorEndVarianceG !== 0 ||
|
|
31
|
-
config.colorEndVarianceB !== 0;
|
|
32
|
-
const newCount = liveCount + toSpawn;
|
|
33
|
-
reserveParticleEmitter(emitter, newCount);
|
|
34
|
-
ensureParticleEmitterStateCapacity(state, newCount, hasColorVariance);
|
|
35
|
-
const { colorStartR, colorStartG, colorStartB, colorEndR, colorEndG, colorEndB } = config;
|
|
36
|
-
const alphaCurve = config.alphaCurve;
|
|
37
|
-
const colorCurve = config.colorCurve;
|
|
38
|
-
const scaleCurve = config.scaleCurve;
|
|
39
|
-
const hasAlphaCurve = alphaCurve != null && alphaCurve.length > 0;
|
|
40
|
-
const hasColorCurve = colorCurve != null && colorCurve.length >= 3;
|
|
41
|
-
const hasScaleCurve = scaleCurve != null && scaleCurve.length > 0;
|
|
42
|
-
const baseAngle = Math.atan2(config.directionY, config.directionX);
|
|
43
|
-
const regionRange = config.regionIdMax - config.regionIdMin;
|
|
44
|
-
const regionIdMin = config.regionIdMin;
|
|
45
|
-
const rotSpeedRange = config.rotationSpeedMax - config.rotationSpeedMin;
|
|
46
|
-
const hasRotSpeed = config.rotationSpeedMin !== 0 || config.rotationSpeedMax !== 0;
|
|
47
|
-
const random = state.random;
|
|
48
|
-
for (let sIdx = 0; sIdx < toSpawn; sIdx++) {
|
|
49
|
-
const idx = liveCount + sIdx;
|
|
50
|
-
const lifetime = config.lifetimeMin + random() * (config.lifetimeMax - config.lifetimeMin);
|
|
51
|
-
const lt = idx * 2;
|
|
52
|
-
state.lifetimes[lt] = 0;
|
|
53
|
-
state.lifetimes[lt + 1] = lifetime;
|
|
54
|
-
const angle = baseAngle + (random() - 0.5) * 2 * config.spread;
|
|
55
|
-
const speed = config.speedMin + random() * (config.speedMax - config.speedMin);
|
|
56
|
-
state.velocities[idx * 2] = Math.cos(angle) * speed;
|
|
57
|
-
state.velocities[idx * 2 + 1] = Math.sin(angle) * speed;
|
|
58
|
-
// Position = burst point + emitter-shape offset.
|
|
59
|
-
let spawnX = x;
|
|
60
|
-
let spawnY = y;
|
|
61
|
-
if (config.emitterShape === 'circle' && config.emitterRadius > 0) {
|
|
62
|
-
const r = Math.sqrt(random()) * config.emitterRadius;
|
|
63
|
-
const a = random() * TWO_PI;
|
|
64
|
-
spawnX += Math.cos(a) * r;
|
|
65
|
-
spawnY += Math.sin(a) * r;
|
|
66
|
-
}
|
|
67
|
-
else if (config.emitterShape === 'rect' && (config.emitterWidth > 0 || config.emitterHeight > 0)) {
|
|
68
|
-
spawnX += (random() - 0.5) * config.emitterWidth;
|
|
69
|
-
spawnY += (random() - 0.5) * config.emitterHeight;
|
|
70
|
-
}
|
|
71
|
-
const spawnScale = config.scaleMin + random() * (config.scaleMax - config.scaleMin);
|
|
72
|
-
state.scales[idx] = spawnScale;
|
|
73
|
-
const tt = idx * PARTICLE_TRANSFORM_STRIDE;
|
|
74
|
-
data.transforms[tt] = spawnX;
|
|
75
|
-
data.transforms[tt + 1] = spawnY;
|
|
76
|
-
data.transforms[tt + 2] = angle;
|
|
77
|
-
data.transforms[tt + 3] = hasScaleCurve ? spawnScale * sampleParticleCurve(scaleCurve, 0) : spawnScale;
|
|
78
|
-
data.alphas[idx] = hasAlphaCurve ? sampleParticleCurve(alphaCurve, 0) : config.alphaStart;
|
|
79
|
-
const ct = idx * 3;
|
|
80
|
-
if (hasColorCurve) {
|
|
81
|
-
sampleParticleColorCurve(data.colors, ct, colorCurve, 0);
|
|
82
|
-
}
|
|
83
|
-
else if (hasColorVariance) {
|
|
84
|
-
const r0 = clamp01(colorStartR + (random() - 0.5) * 2 * config.colorStartVarianceR);
|
|
85
|
-
const g0 = clamp01(colorStartG + (random() - 0.5) * 2 * config.colorStartVarianceG);
|
|
86
|
-
const b0 = clamp01(colorStartB + (random() - 0.5) * 2 * config.colorStartVarianceB);
|
|
87
|
-
const r1 = clamp01(colorEndR + (random() - 0.5) * 2 * config.colorEndVarianceR);
|
|
88
|
-
const g1 = clamp01(colorEndG + (random() - 0.5) * 2 * config.colorEndVarianceG);
|
|
89
|
-
const b1 = clamp01(colorEndB + (random() - 0.5) * 2 * config.colorEndVarianceB);
|
|
90
|
-
state.colorBirth[ct] = r0;
|
|
91
|
-
state.colorBirth[ct + 1] = g0;
|
|
92
|
-
state.colorBirth[ct + 2] = b0;
|
|
93
|
-
state.colorDeath[ct] = r1;
|
|
94
|
-
state.colorDeath[ct + 1] = g1;
|
|
95
|
-
state.colorDeath[ct + 2] = b1;
|
|
96
|
-
data.colors[ct] = r0;
|
|
97
|
-
data.colors[ct + 1] = g0;
|
|
98
|
-
data.colors[ct + 2] = b0;
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
data.colors[ct] = colorStartR;
|
|
102
|
-
data.colors[ct + 1] = colorStartG;
|
|
103
|
-
data.colors[ct + 2] = colorStartB;
|
|
104
|
-
}
|
|
105
|
-
data.ids[idx] = regionIdMin + (config.frameCount > 1 ? 0 : regionRange > 0 ? (random() * regionRange) | 0 : 0);
|
|
106
|
-
state.rotationSpeeds[idx] = hasRotSpeed ? config.rotationSpeedMin + random() * rotSpeedRange : 0;
|
|
107
|
-
}
|
|
108
|
-
data.particleCount = newCount;
|
|
109
|
-
return toSpawn;
|
|
110
|
-
}
|
|
111
|
-
function clamp01(v) {
|
|
112
|
-
return v < 0 ? 0 : v > 1 ? 1 : v;
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=emitParticleBurst.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emitParticleBurst.js","sourceRoot":"","sources":["../src/emitParticleBurst.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAI1D,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAE5E,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAE3B;;;;;;;;;;wCAUwC;AACxC,MAAM,UAAU,iBAAiB,CAC/B,OAAwB,EACxB,KAA2B,EAC3B,MAAuC,EACvC,KAAa,EACb,CAAS,EACT,CAAS;IAET,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,MAAM,SAAS,GAAG,IAAI,CAA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AAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/G,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,GAAG,MAAM,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACnG,CAAC;IAED,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;IAC9B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,OAAO,CAAC,CAAS;IACxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ParticleEmitter } from '@flighthq/types';
|
|
2
|
-
import type { ParticleEmitterConfig, ParticleEmitterState } from '@flighthq/types';
|
|
3
|
-
import type { ParticleEmitterCallbacks, WorldTransform2D } from './updateParticleEmitter';
|
|
4
|
-
export declare function prewarmParticleEmitter(emitter: ParticleEmitter, state: ParticleEmitterState, config: Readonly<ParticleEmitterConfig>, duration: number, stepDeltaTime?: number, callbacks?: ParticleEmitterCallbacks, worldTransform?: Readonly<WorldTransform2D>): void;
|
|
5
|
-
//# sourceMappingURL=prewarmParticleEmitter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prewarmParticleEmitter.d.ts","sourceRoot":"","sources":["../src/prewarmParticleEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG1F,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,oBAAoB,EAC3B,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACvC,QAAQ,EAAE,MAAM,EAChB,aAAa,SAAS,EACtB,SAAS,CAAC,EAAE,wBAAwB,EACpC,cAAc,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAC1C,IAAI,CAUN"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { updateParticleEmitter } from './updateParticleEmitter';
|
|
2
|
-
export function prewarmParticleEmitter(emitter, state, config, duration, stepDeltaTime = 1 / 60, callbacks, worldTransform) {
|
|
3
|
-
// A non-positive step would never advance `elapsed`, spinning forever; fall back
|
|
4
|
-
// to a single step covering the whole duration instead of hanging.
|
|
5
|
-
const step = stepDeltaTime > 0 ? stepDeltaTime : duration;
|
|
6
|
-
let elapsed = 0;
|
|
7
|
-
while (elapsed < duration) {
|
|
8
|
-
const deltaTime = Math.min(step, duration - elapsed);
|
|
9
|
-
updateParticleEmitter(emitter, state, config, deltaTime, callbacks, worldTransform);
|
|
10
|
-
elapsed += deltaTime;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=prewarmParticleEmitter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prewarmParticleEmitter.js","sourceRoot":"","sources":["../src/prewarmParticleEmitter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,UAAU,sBAAsB,CACpC,OAAwB,EACxB,KAA2B,EAC3B,MAAuC,EACvC,QAAgB,EAChB,aAAa,GAAG,CAAC,GAAG,EAAE,EACtB,SAAoC,EACpC,cAA2C;IAE3C,iFAAiF;IACjF,mEAAmE;IACnE,MAAM,IAAI,GAAG,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC1D,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,OAAO,OAAO,GAAG,QAAQ,EAAE,CAAC;QAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC;QACrD,qBAAqB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;QACpF,OAAO,IAAI,SAAS,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ParticleCollider, ParticleEmitter, ParticleEmitterCallbacks, ParticleEmitterConfig, ParticleEmitterState, ParticleForce, ParticleObject, ParticleObjectsState, ParticleObjectsUpdateOptions, WorldTransform2D } from '@flighthq/types';
|
|
2
|
-
/**
|
|
3
|
-
* Convenience wrapper for the SoA typed-array emitter that folds the canonical three-step update
|
|
4
|
-
* sequence — `applyParticleForces` → `updateParticleEmitter` → `applyParticleCollisions` — into a
|
|
5
|
-
* single call.
|
|
6
|
-
*
|
|
7
|
-
* The three primitives remain exported for advanced use (custom interleaving, per-force-group
|
|
8
|
-
* timing, etc.). Use this function for the common case where all forces and colliders apply each
|
|
9
|
-
* frame in the documented order.
|
|
10
|
-
*
|
|
11
|
-
* @param emitter - The SoA particle emitter node.
|
|
12
|
-
* @param state - Mutable per-emitter simulation state.
|
|
13
|
-
* @param config - Immutable emitter configuration.
|
|
14
|
-
* @param deltaTime - Elapsed time in seconds since the last step.
|
|
15
|
-
* @param forces - Optional force fields to apply before integration (e.g. wind, attractor).
|
|
16
|
-
* @param colliders - Optional colliders to resolve after integration (e.g. plane, circle).
|
|
17
|
-
* @param callbacks - Optional spawn/death callbacks.
|
|
18
|
-
* @param worldTransform - World-space transform for world-space emitters.
|
|
19
|
-
*/
|
|
20
|
-
export declare function stepParticleEmitter(emitter: ParticleEmitter, state: ParticleEmitterState, config: Readonly<ParticleEmitterConfig>, deltaTime: number, forces?: ReadonlyArray<ParticleForce>, colliders?: ReadonlyArray<ParticleCollider>, callbacks?: ParticleEmitterCallbacks, worldTransform?: Readonly<WorldTransform2D>): void;
|
|
21
|
-
/**
|
|
22
|
-
* Convenience wrapper for the object-pool path that folds the canonical three-step update sequence
|
|
23
|
-
* — `applyParticleObjectForces` → `updateParticleObjects` → `applyParticleObjectCollisions` — into
|
|
24
|
-
* a single call.
|
|
25
|
-
*
|
|
26
|
-
* The three primitives remain exported for advanced use. Use this function for the common case
|
|
27
|
-
* where all forces and colliders apply each frame in the documented order.
|
|
28
|
-
*
|
|
29
|
-
* @param objects - The particle object pool (one display object per slot).
|
|
30
|
-
* @param state - Mutable per-emitter simulation state.
|
|
31
|
-
* @param config - Immutable emitter configuration.
|
|
32
|
-
* @param deltaTime - Elapsed time in seconds since the last step.
|
|
33
|
-
* @param forces - Optional force fields to apply before integration.
|
|
34
|
-
* @param colliders - Optional colliders to resolve after integration.
|
|
35
|
-
* @param updateOptions - Optional emitter position, callbacks, and other per-frame options.
|
|
36
|
-
*/
|
|
37
|
-
export declare function stepParticleObjects(objects: readonly ParticleObject[], state: ParticleObjectsState, config: Readonly<ParticleEmitterConfig>, deltaTime: number, forces?: ReadonlyArray<ParticleForce>, colliders?: ReadonlyArray<ParticleCollider>, updateOptions?: ParticleObjectsUpdateOptions): void;
|
|
38
|
-
//# sourceMappingURL=stepParticleEmitter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stepParticleEmitter.d.ts","sourceRoot":"","sources":["../src/stepParticleEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,4BAA4B,EAC5B,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAOzB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,oBAAoB,EAC3B,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACvC,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,EACrC,SAAS,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC3C,SAAS,CAAC,EAAE,wBAAwB,EACpC,cAAc,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAC1C,IAAI,CAQN;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,KAAK,EAAE,oBAAoB,EAC3B,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACvC,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,EACrC,SAAS,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC3C,aAAa,CAAC,EAAE,4BAA4B,GAC3C,IAAI,CAQN"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { applyParticleCollisions, applyParticleObjectCollisions } from './applyParticleCollisions';
|
|
2
|
-
import { applyParticleForces, applyParticleObjectForces } from './applyParticleForces';
|
|
3
|
-
import { updateParticleEmitter } from './updateParticleEmitter';
|
|
4
|
-
import { updateParticleObjects } from './updateParticleObjects';
|
|
5
|
-
/**
|
|
6
|
-
* Convenience wrapper for the SoA typed-array emitter that folds the canonical three-step update
|
|
7
|
-
* sequence — `applyParticleForces` → `updateParticleEmitter` → `applyParticleCollisions` — into a
|
|
8
|
-
* single call.
|
|
9
|
-
*
|
|
10
|
-
* The three primitives remain exported for advanced use (custom interleaving, per-force-group
|
|
11
|
-
* timing, etc.). Use this function for the common case where all forces and colliders apply each
|
|
12
|
-
* frame in the documented order.
|
|
13
|
-
*
|
|
14
|
-
* @param emitter - The SoA particle emitter node.
|
|
15
|
-
* @param state - Mutable per-emitter simulation state.
|
|
16
|
-
* @param config - Immutable emitter configuration.
|
|
17
|
-
* @param deltaTime - Elapsed time in seconds since the last step.
|
|
18
|
-
* @param forces - Optional force fields to apply before integration (e.g. wind, attractor).
|
|
19
|
-
* @param colliders - Optional colliders to resolve after integration (e.g. plane, circle).
|
|
20
|
-
* @param callbacks - Optional spawn/death callbacks.
|
|
21
|
-
* @param worldTransform - World-space transform for world-space emitters.
|
|
22
|
-
*/
|
|
23
|
-
export function stepParticleEmitter(emitter, state, config, deltaTime, forces, colliders, callbacks, worldTransform) {
|
|
24
|
-
if (forces != null && forces.length > 0) {
|
|
25
|
-
applyParticleForces(emitter, state, forces, deltaTime);
|
|
26
|
-
}
|
|
27
|
-
updateParticleEmitter(emitter, state, config, deltaTime, callbacks, worldTransform);
|
|
28
|
-
if (colliders != null && colliders.length > 0) {
|
|
29
|
-
applyParticleCollisions(emitter, state, colliders);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Convenience wrapper for the object-pool path that folds the canonical three-step update sequence
|
|
34
|
-
* — `applyParticleObjectForces` → `updateParticleObjects` → `applyParticleObjectCollisions` — into
|
|
35
|
-
* a single call.
|
|
36
|
-
*
|
|
37
|
-
* The three primitives remain exported for advanced use. Use this function for the common case
|
|
38
|
-
* where all forces and colliders apply each frame in the documented order.
|
|
39
|
-
*
|
|
40
|
-
* @param objects - The particle object pool (one display object per slot).
|
|
41
|
-
* @param state - Mutable per-emitter simulation state.
|
|
42
|
-
* @param config - Immutable emitter configuration.
|
|
43
|
-
* @param deltaTime - Elapsed time in seconds since the last step.
|
|
44
|
-
* @param forces - Optional force fields to apply before integration.
|
|
45
|
-
* @param colliders - Optional colliders to resolve after integration.
|
|
46
|
-
* @param updateOptions - Optional emitter position, callbacks, and other per-frame options.
|
|
47
|
-
*/
|
|
48
|
-
export function stepParticleObjects(objects, state, config, deltaTime, forces, colliders, updateOptions) {
|
|
49
|
-
if (forces != null && forces.length > 0) {
|
|
50
|
-
applyParticleObjectForces(objects, state, forces, deltaTime);
|
|
51
|
-
}
|
|
52
|
-
updateParticleObjects(objects, state, config, deltaTime, updateOptions);
|
|
53
|
-
if (colliders != null && colliders.length > 0) {
|
|
54
|
-
applyParticleObjectCollisions(objects, state, colliders);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=stepParticleEmitter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stepParticleEmitter.js","sourceRoot":"","sources":["../src/stepParticleEmitter.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAwB,EACxB,KAA2B,EAC3B,MAAuC,EACvC,SAAiB,EACjB,MAAqC,EACrC,SAA2C,EAC3C,SAAoC,EACpC,cAA2C;IAE3C,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACzD,CAAC;IACD,qBAAqB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;IACpF,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9C,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAkC,EAClC,KAA2B,EAC3B,MAAuC,EACvC,SAAiB,EACjB,MAAqC,EACrC,SAA2C,EAC3C,aAA4C;IAE5C,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,yBAAyB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IACD,qBAAqB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACxE,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9C,6BAA6B,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ParticleEmitter, ParticleEmitterCallbacks, ParticleEmitterConfig, ParticleEmitterState, WorldTransform2D } from '@flighthq/types';
|
|
2
|
-
export type { ParticleEmitterCallbacks, WorldTransform2D };
|
|
3
|
-
/** True once a finite, non-looping emitter has finished emitting AND all of its
|
|
4
|
-
* particles have died — i.e. a one-shot effect that is safe to recycle/remove.
|
|
5
|
-
* Always false for infinite or looping emitters (they never finish). */
|
|
6
|
-
export declare function isParticleEmitterComplete(emitter: ParticleEmitter, state: Readonly<ParticleEmitterState>, config: Readonly<ParticleEmitterConfig>): boolean;
|
|
7
|
-
export declare function updateParticleEmitter(emitter: ParticleEmitter, state: ParticleEmitterState, config: Readonly<ParticleEmitterConfig>, deltaTime: number, callbacks?: ParticleEmitterCallbacks, worldTransform?: Readonly<WorldTransform2D>): void;
|
|
8
|
-
//# sourceMappingURL=updateParticleEmitter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateParticleEmitter.d.ts","sourceRoot":"","sources":["../src/updateParticleEmitter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAMzB,YAAY,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,CAAC;AAK3D;;yEAEyE;AACzE,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EACrC,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GACtC,OAAO,CAGT;AAQD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,oBAAoB,EAC3B,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACvC,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,wBAAwB,EACpC,cAAc,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAC1C,IAAI,CAgUN"}
|
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
import { invalidateNodeLocalBounds } from '@flighthq/node';
|
|
2
|
-
import { reserveParticleEmitter } from '@flighthq/sprite';
|
|
3
|
-
import { sampleParticleColorCurve, sampleParticleCurve } from './curve';
|
|
4
|
-
import { getParticleEmitterSignals } from './particleEmitterSignals';
|
|
5
|
-
import { ensureParticleEmitterStateCapacity } from './particleEmitterState';
|
|
6
|
-
const PARTICLE_TRANSFORM_STRIDE = 4; // must match scene-sprite/particleEmitter.ts
|
|
7
|
-
const TWO_PI = Math.PI * 2;
|
|
8
|
-
/** True once a finite, non-looping emitter has finished emitting AND all of its
|
|
9
|
-
* particles have died — i.e. a one-shot effect that is safe to recycle/remove.
|
|
10
|
-
* Always false for infinite or looping emitters (they never finish). */
|
|
11
|
-
export function isParticleEmitterComplete(emitter, state, config) {
|
|
12
|
-
if (config.duration <= 0 || config.loop)
|
|
13
|
-
return false;
|
|
14
|
-
return state.emitterAge >= config.duration && emitter.data.particleCount === 0;
|
|
15
|
-
}
|
|
16
|
-
/** Whether an emitter with the given config is still spawning, given how long it
|
|
17
|
-
* has been emitting. Infinite (duration <= 0) and looping emitters always emit. */
|
|
18
|
-
function isEmitting(config, emitterAge) {
|
|
19
|
-
return config.duration <= 0 || config.loop || emitterAge < config.duration;
|
|
20
|
-
}
|
|
21
|
-
export function updateParticleEmitter(emitter, state, config, deltaTime, callbacks, worldTransform) {
|
|
22
|
-
const data = emitter.data;
|
|
23
|
-
// Sync world-space flag to data so renderers can read it.
|
|
24
|
-
data.worldSpace = config.worldSpace;
|
|
25
|
-
// Guard against a zero or negative time step: no time has elapsed, so there is
|
|
26
|
-
// nothing to age, move, or spawn. Critically, this avoids dividing by deltaTime when
|
|
27
|
-
// computing emitter velocity below — a zero-deltaTime frame that still fires a burst
|
|
28
|
-
// would otherwise bake Infinity/NaN velocities into freshly spawned particles
|
|
29
|
-
// and corrupt them for the rest of their lifetime.
|
|
30
|
-
if (deltaTime <= 0)
|
|
31
|
-
return;
|
|
32
|
-
// ── Emitter velocity (for velocity inheritance and trail interpolation) ───────
|
|
33
|
-
// In world-space mode we track the world origin; in local-space mode we track
|
|
34
|
-
// the emitter node position in parent space.
|
|
35
|
-
const trackX = config.worldSpace && worldTransform != null ? worldTransform.tx : emitter.x;
|
|
36
|
-
const trackY = config.worldSpace && worldTransform != null ? worldTransform.ty : emitter.y;
|
|
37
|
-
const hasVelInherit = config.velocityInheritance !== 0;
|
|
38
|
-
let emitterVelX = 0;
|
|
39
|
-
let emitterVelY = 0;
|
|
40
|
-
if (!isNaN(state.prevX)) {
|
|
41
|
-
emitterVelX = (trackX - state.prevX) / deltaTime;
|
|
42
|
-
emitterVelY = (trackY - state.prevY) / deltaTime;
|
|
43
|
-
}
|
|
44
|
-
// ── Phase 1: age all live particles, compact dead ones ──────────────────────
|
|
45
|
-
const lifetimes = state.lifetimes;
|
|
46
|
-
const velocities = state.velocities;
|
|
47
|
-
const scales = state.scales;
|
|
48
|
-
const rotationSpeeds = state.rotationSpeeds;
|
|
49
|
-
const gx = config.gravityX * deltaTime;
|
|
50
|
-
const gy = config.gravityY * deltaTime;
|
|
51
|
-
const { colorStartR, colorStartG, colorStartB, colorEndR, colorEndG, colorEndB } = config;
|
|
52
|
-
const hasColorVariance = config.colorStartVarianceR !== 0 ||
|
|
53
|
-
config.colorStartVarianceG !== 0 ||
|
|
54
|
-
config.colorStartVarianceB !== 0 ||
|
|
55
|
-
config.colorEndVarianceR !== 0 ||
|
|
56
|
-
config.colorEndVarianceG !== 0 ||
|
|
57
|
-
config.colorEndVarianceB !== 0;
|
|
58
|
-
const hasColorGradient = hasColorVariance || colorStartR !== colorEndR || colorStartG !== colorEndG || colorStartB !== colorEndB;
|
|
59
|
-
// Opt-in lifetime curves override the linear paths below; an emitter without
|
|
60
|
-
// curves never touches these branches beyond a predicted-not-taken check.
|
|
61
|
-
const alphaCurve = config.alphaCurve;
|
|
62
|
-
const colorCurve = config.colorCurve;
|
|
63
|
-
const scaleCurve = config.scaleCurve;
|
|
64
|
-
const hasAlphaCurve = alphaCurve != null && alphaCurve.length > 0;
|
|
65
|
-
const hasColorCurve = colorCurve != null && colorCurve.length >= 3;
|
|
66
|
-
const hasScaleCurve = scaleCurve != null && scaleCurve.length > 0;
|
|
67
|
-
const hasScaleAnim = config.scaleEnd !== 1 || hasScaleCurve;
|
|
68
|
-
const hasColorWork = hasColorCurve || hasColorGradient;
|
|
69
|
-
const hasRotationSpeed = config.rotationSpeedMin !== 0 || config.rotationSpeedMax !== 0;
|
|
70
|
-
const hasFlipbook = config.frameCount > 1;
|
|
71
|
-
const onDeath = callbacks?.onDeath;
|
|
72
|
-
const onSpawn = callbacks?.onSpawn;
|
|
73
|
-
// Opt-in signals: null when enableParticleEmitterSignals has not been called on this state.
|
|
74
|
-
const signals = getParticleEmitterSignals(state);
|
|
75
|
-
let liveCount = data.particleCount;
|
|
76
|
-
let i = 0;
|
|
77
|
-
while (i < liveCount) {
|
|
78
|
-
const lt = i * 2;
|
|
79
|
-
lifetimes[lt] += deltaTime;
|
|
80
|
-
if (lifetimes[lt] >= lifetimes[lt + 1]) {
|
|
81
|
-
if (onDeath !== undefined || signals !== null) {
|
|
82
|
-
const tt = i * PARTICLE_TRANSFORM_STRIDE;
|
|
83
|
-
const dx = data.transforms[tt];
|
|
84
|
-
const dy = data.transforms[tt + 1];
|
|
85
|
-
onDeath?.(dx, dy);
|
|
86
|
-
signals?.onParticleDeath.emit(dx, dy);
|
|
87
|
-
}
|
|
88
|
-
liveCount--;
|
|
89
|
-
if (i < liveCount) {
|
|
90
|
-
const lt2 = liveCount * 2;
|
|
91
|
-
lifetimes[lt] = lifetimes[lt2];
|
|
92
|
-
lifetimes[lt + 1] = lifetimes[lt2 + 1];
|
|
93
|
-
const vt = i * 2;
|
|
94
|
-
const vt2 = liveCount * 2;
|
|
95
|
-
velocities[vt] = velocities[vt2];
|
|
96
|
-
velocities[vt + 1] = velocities[vt2 + 1];
|
|
97
|
-
const tt = i * PARTICLE_TRANSFORM_STRIDE;
|
|
98
|
-
const tt2 = liveCount * PARTICLE_TRANSFORM_STRIDE;
|
|
99
|
-
data.transforms[tt] = data.transforms[tt2];
|
|
100
|
-
data.transforms[tt + 1] = data.transforms[tt2 + 1];
|
|
101
|
-
data.transforms[tt + 2] = data.transforms[tt2 + 2];
|
|
102
|
-
data.transforms[tt + 3] = data.transforms[tt2 + 3];
|
|
103
|
-
data.alphas[i] = data.alphas[liveCount];
|
|
104
|
-
data.ids[i] = data.ids[liveCount];
|
|
105
|
-
const ct = i * 3;
|
|
106
|
-
const ct2 = liveCount * 3;
|
|
107
|
-
data.colors[ct] = data.colors[ct2];
|
|
108
|
-
data.colors[ct + 1] = data.colors[ct2 + 1];
|
|
109
|
-
data.colors[ct + 2] = data.colors[ct2 + 2];
|
|
110
|
-
scales[i] = scales[liveCount];
|
|
111
|
-
rotationSpeeds[i] = rotationSpeeds[liveCount];
|
|
112
|
-
if (hasColorVariance) {
|
|
113
|
-
state.colorBirth[ct] = state.colorBirth[ct2];
|
|
114
|
-
state.colorBirth[ct + 1] = state.colorBirth[ct2 + 1];
|
|
115
|
-
state.colorBirth[ct + 2] = state.colorBirth[ct2 + 2];
|
|
116
|
-
state.colorDeath[ct] = state.colorDeath[ct2];
|
|
117
|
-
state.colorDeath[ct + 1] = state.colorDeath[ct2 + 1];
|
|
118
|
-
state.colorDeath[ct + 2] = state.colorDeath[ct2 + 2];
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
const vt = i * 2;
|
|
124
|
-
velocities[vt] += gx;
|
|
125
|
-
velocities[vt + 1] += gy;
|
|
126
|
-
const tt = i * PARTICLE_TRANSFORM_STRIDE;
|
|
127
|
-
data.transforms[tt] += velocities[vt] * deltaTime;
|
|
128
|
-
data.transforms[tt + 1] += velocities[vt + 1] * deltaTime;
|
|
129
|
-
const lifeFraction = lifetimes[lt] / lifetimes[lt + 1];
|
|
130
|
-
data.alphas[i] = hasAlphaCurve
|
|
131
|
-
? sampleParticleCurve(alphaCurve, lifeFraction)
|
|
132
|
-
: config.alphaStart + (config.alphaEnd - config.alphaStart) * lifeFraction;
|
|
133
|
-
if (hasColorWork) {
|
|
134
|
-
const ct = i * 3;
|
|
135
|
-
if (hasColorCurve) {
|
|
136
|
-
sampleParticleColorCurve(data.colors, ct, colorCurve, lifeFraction);
|
|
137
|
-
}
|
|
138
|
-
else if (hasColorVariance) {
|
|
139
|
-
data.colors[ct] = state.colorBirth[ct] + (state.colorDeath[ct] - state.colorBirth[ct]) * lifeFraction;
|
|
140
|
-
data.colors[ct + 1] =
|
|
141
|
-
state.colorBirth[ct + 1] + (state.colorDeath[ct + 1] - state.colorBirth[ct + 1]) * lifeFraction;
|
|
142
|
-
data.colors[ct + 2] =
|
|
143
|
-
state.colorBirth[ct + 2] + (state.colorDeath[ct + 2] - state.colorBirth[ct + 2]) * lifeFraction;
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
data.colors[ct] = colorStartR + (colorEndR - colorStartR) * lifeFraction;
|
|
147
|
-
data.colors[ct + 1] = colorStartG + (colorEndG - colorStartG) * lifeFraction;
|
|
148
|
-
data.colors[ct + 2] = colorStartB + (colorEndB - colorStartB) * lifeFraction;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
if (hasScaleAnim) {
|
|
152
|
-
const scaleFactor = hasScaleCurve
|
|
153
|
-
? sampleParticleCurve(scaleCurve, lifeFraction)
|
|
154
|
-
: 1 + (config.scaleEnd - 1) * lifeFraction;
|
|
155
|
-
data.transforms[tt + 3] = scales[i] * scaleFactor;
|
|
156
|
-
}
|
|
157
|
-
if (hasRotationSpeed) {
|
|
158
|
-
data.transforms[tt + 2] += rotationSpeeds[i] * deltaTime;
|
|
159
|
-
}
|
|
160
|
-
if (hasFlipbook) {
|
|
161
|
-
const frame = Math.floor(lifetimes[lt] * config.frameRate) % config.frameCount;
|
|
162
|
-
data.ids[i] = config.regionIdMin + frame;
|
|
163
|
-
}
|
|
164
|
-
i++;
|
|
165
|
-
}
|
|
166
|
-
data.particleCount = liveCount;
|
|
167
|
-
// ── Phase 2: spawn new particles ─────────────────────────────────────────────
|
|
168
|
-
// A finite, non-looping emitter stops spawning once its duration elapses;
|
|
169
|
-
// existing particles keep ageing out (use isParticleEmitterComplete to detect the end).
|
|
170
|
-
const emitting = isEmitting(config, state.emitterAge);
|
|
171
|
-
if (config.duration > 0 && !config.loop)
|
|
172
|
-
state.emitterAge += deltaTime;
|
|
173
|
-
state.spawnAccumulator += emitting ? config.spawnRate * deltaTime : 0;
|
|
174
|
-
let toSpawn = Math.floor(state.spawnAccumulator);
|
|
175
|
-
state.spawnAccumulator -= toSpawn;
|
|
176
|
-
if (emitting && config.burstCount > 0) {
|
|
177
|
-
state.burstTimer -= deltaTime;
|
|
178
|
-
if (state.burstTimer <= 0) {
|
|
179
|
-
toSpawn += config.burstCount;
|
|
180
|
-
state.burstTimer = config.burstInterval > 0 ? config.burstInterval : Infinity;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const maxNew = config.maxParticles - liveCount;
|
|
184
|
-
if (toSpawn > maxNew)
|
|
185
|
-
toSpawn = maxNew;
|
|
186
|
-
if (toSpawn > 0) {
|
|
187
|
-
const newCount = liveCount + toSpawn;
|
|
188
|
-
reserveParticleEmitter(emitter, newCount);
|
|
189
|
-
ensureParticleEmitterStateCapacity(state, newCount, hasColorVariance);
|
|
190
|
-
const baseAngle = Math.atan2(config.directionY, config.directionX);
|
|
191
|
-
const regionRange = config.regionIdMax - config.regionIdMin;
|
|
192
|
-
const regionIdMin = config.regionIdMin;
|
|
193
|
-
const rotSpeedRange = config.rotationSpeedMax - config.rotationSpeedMin;
|
|
194
|
-
const hasRotSpeed = config.rotationSpeedMin !== 0 || config.rotationSpeedMax !== 0;
|
|
195
|
-
// World-space trail: distribute spawn origins along the path from prevPos → currentPos.
|
|
196
|
-
const doTrail = config.worldSpace && worldTransform != null && !isNaN(state.prevX);
|
|
197
|
-
const prevPathX = doTrail ? state.prevX : trackX;
|
|
198
|
-
const prevPathY = doTrail ? state.prevY : trackY;
|
|
199
|
-
for (let s = 0; s < toSpawn; s++) {
|
|
200
|
-
const idx = liveCount + s;
|
|
201
|
-
// Lifetime
|
|
202
|
-
const lifetime = config.lifetimeMin + state.random() * (config.lifetimeMax - config.lifetimeMin);
|
|
203
|
-
const lt = idx * 2;
|
|
204
|
-
state.lifetimes[lt] = 0;
|
|
205
|
-
state.lifetimes[lt + 1] = lifetime;
|
|
206
|
-
// Velocity direction in local/emitter space
|
|
207
|
-
const angle = baseAngle + (state.random() - 0.5) * 2 * config.spread;
|
|
208
|
-
const speed = config.speedMin + state.random() * (config.speedMax - config.speedMin);
|
|
209
|
-
let vx = Math.cos(angle) * speed;
|
|
210
|
-
let vy = Math.sin(angle) * speed;
|
|
211
|
-
// Spawn position (local to emitter, or shape offset)
|
|
212
|
-
let spawnX = 0;
|
|
213
|
-
let spawnY = 0;
|
|
214
|
-
if (config.emitterShape === 'circle' && config.emitterRadius > 0) {
|
|
215
|
-
const r = Math.sqrt(state.random()) * config.emitterRadius;
|
|
216
|
-
const a = state.random() * TWO_PI;
|
|
217
|
-
spawnX = Math.cos(a) * r;
|
|
218
|
-
spawnY = Math.sin(a) * r;
|
|
219
|
-
}
|
|
220
|
-
else if (config.emitterShape === 'rect' && (config.emitterWidth > 0 || config.emitterHeight > 0)) {
|
|
221
|
-
spawnX = (state.random() - 0.5) * config.emitterWidth;
|
|
222
|
-
spawnY = (state.random() - 0.5) * config.emitterHeight;
|
|
223
|
-
}
|
|
224
|
-
// World-space: transform spawn position and velocity into world space,
|
|
225
|
-
// and distribute origins along the emitter's movement path (trail interpolation).
|
|
226
|
-
if (config.worldSpace && worldTransform != null) {
|
|
227
|
-
const wt = worldTransform;
|
|
228
|
-
// Trail: interpolate origin between prev and current world position
|
|
229
|
-
const t = toSpawn > 1 ? s / (toSpawn - 1) : 1;
|
|
230
|
-
const originX = prevPathX + (trackX - prevPathX) * t;
|
|
231
|
-
const originY = prevPathY + (trackY - prevPathY) * t;
|
|
232
|
-
// Apply rotation+scale of world transform to shape offset, then add trail origin
|
|
233
|
-
const wx = wt.a * spawnX + wt.c * spawnY + originX;
|
|
234
|
-
const wy = wt.b * spawnX + wt.d * spawnY + originY;
|
|
235
|
-
spawnX = wx;
|
|
236
|
-
spawnY = wy;
|
|
237
|
-
// Rotate velocity by world transform (no translation for vectors)
|
|
238
|
-
const wvx = wt.a * vx + wt.c * vy;
|
|
239
|
-
const wvy = wt.b * vx + wt.d * vy;
|
|
240
|
-
vx = wvx;
|
|
241
|
-
vy = wvy;
|
|
242
|
-
}
|
|
243
|
-
// Velocity inheritance: blend emitter velocity into new particle velocity
|
|
244
|
-
if (hasVelInherit && !isNaN(state.prevX)) {
|
|
245
|
-
vx += emitterVelX * config.velocityInheritance;
|
|
246
|
-
vy += emitterVelY * config.velocityInheritance;
|
|
247
|
-
}
|
|
248
|
-
const vt = idx * 2;
|
|
249
|
-
state.velocities[vt] = vx;
|
|
250
|
-
state.velocities[vt + 1] = vy;
|
|
251
|
-
const spawnScale = config.scaleMin + state.random() * (config.scaleMax - config.scaleMin);
|
|
252
|
-
state.scales[idx] = spawnScale;
|
|
253
|
-
const tt = idx * PARTICLE_TRANSFORM_STRIDE;
|
|
254
|
-
data.transforms[tt] = spawnX;
|
|
255
|
-
data.transforms[tt + 1] = spawnY;
|
|
256
|
-
data.transforms[tt + 2] = angle;
|
|
257
|
-
data.transforms[tt + 3] = hasScaleCurve ? spawnScale * sampleParticleCurve(scaleCurve, 0) : spawnScale;
|
|
258
|
-
data.alphas[idx] = hasAlphaCurve ? sampleParticleCurve(alphaCurve, 0) : config.alphaStart;
|
|
259
|
-
// Color — curve takes precedence, then per-particle variance, then constants
|
|
260
|
-
const ct = idx * 3;
|
|
261
|
-
if (hasColorCurve) {
|
|
262
|
-
sampleParticleColorCurve(data.colors, ct, colorCurve, 0);
|
|
263
|
-
}
|
|
264
|
-
else if (hasColorVariance) {
|
|
265
|
-
const r0 = clamp01(colorStartR + (state.random() - 0.5) * 2 * config.colorStartVarianceR);
|
|
266
|
-
const g0 = clamp01(colorStartG + (state.random() - 0.5) * 2 * config.colorStartVarianceG);
|
|
267
|
-
const b0 = clamp01(colorStartB + (state.random() - 0.5) * 2 * config.colorStartVarianceB);
|
|
268
|
-
const r1 = clamp01(colorEndR + (state.random() - 0.5) * 2 * config.colorEndVarianceR);
|
|
269
|
-
const g1 = clamp01(colorEndG + (state.random() - 0.5) * 2 * config.colorEndVarianceG);
|
|
270
|
-
const b1 = clamp01(colorEndB + (state.random() - 0.5) * 2 * config.colorEndVarianceB);
|
|
271
|
-
state.colorBirth[ct] = r0;
|
|
272
|
-
state.colorBirth[ct + 1] = g0;
|
|
273
|
-
state.colorBirth[ct + 2] = b0;
|
|
274
|
-
state.colorDeath[ct] = r1;
|
|
275
|
-
state.colorDeath[ct + 1] = g1;
|
|
276
|
-
state.colorDeath[ct + 2] = b1;
|
|
277
|
-
data.colors[ct] = r0;
|
|
278
|
-
data.colors[ct + 1] = g0;
|
|
279
|
-
data.colors[ct + 2] = b0;
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
data.colors[ct] = colorStartR;
|
|
283
|
-
data.colors[ct + 1] = colorStartG;
|
|
284
|
-
data.colors[ct + 2] = colorStartB;
|
|
285
|
-
}
|
|
286
|
-
data.ids[idx] =
|
|
287
|
-
regionIdMin + (config.frameCount > 1 ? 0 : regionRange > 0 ? (state.random() * regionRange) | 0 : 0);
|
|
288
|
-
state.rotationSpeeds[idx] = hasRotSpeed ? config.rotationSpeedMin + state.random() * rotSpeedRange : 0;
|
|
289
|
-
onSpawn?.(spawnX, spawnY);
|
|
290
|
-
if (signals !== null) {
|
|
291
|
-
signals.onParticleSpawn.emit(spawnX, spawnY, state.velocities[vt], state.velocities[vt + 1]);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
data.particleCount = newCount;
|
|
295
|
-
}
|
|
296
|
-
// Update prev-position tracking for next frame.
|
|
297
|
-
state.prevX = trackX;
|
|
298
|
-
state.prevY = trackY;
|
|
299
|
-
// Mirror the live per-particle velocities into the render data so the velocity G-buffer writer can
|
|
300
|
-
// smear each particle by its own vector. state.velocities is kept aligned with data.transforms by the
|
|
301
|
-
// compaction above, so the leading particleCount entries are the live particles in render order.
|
|
302
|
-
const liveVelocityCount = data.particleCount * 2;
|
|
303
|
-
if (data.velocities.length >= liveVelocityCount) {
|
|
304
|
-
data.velocities.set(state.velocities.subarray(0, liveVelocityCount));
|
|
305
|
-
}
|
|
306
|
-
// Fire onEmitterComplete when a finite emitter has just finished and all particles are gone.
|
|
307
|
-
if (signals !== null && isParticleEmitterComplete(emitter, state, config)) {
|
|
308
|
-
signals.onEmitterComplete.emit();
|
|
309
|
-
}
|
|
310
|
-
invalidateNodeLocalBounds(emitter);
|
|
311
|
-
}
|
|
312
|
-
function clamp01(v) {
|
|
313
|
-
return v < 0 ? 0 : v > 1 ? 1 : v;
|
|
314
|
-
}
|
|
315
|
-
//# sourceMappingURL=updateParticleEmitter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateParticleEmitter.js","sourceRoot":"","sources":["../src/updateParticleEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAS1D,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAI5E,MAAM,yBAAyB,GAAG,CAAC,CAAC,CAAC,6CAA6C;AAClF,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAE3B;;yEAEyE;AACzE,MAAM,UAAU,yBAAyB,CACvC,OAAwB,EACxB,KAAqC,EACrC,MAAuC;IAEvC,IAAI,MAAM,CAAC,QAAQ,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,KAAK,CAAC,UAAU,IAAI,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,aAAa,KAAK,CAAC,CAAC;AACjF,CAAC;AAED;oFACoF;AACpF,SAAS,UAAU,CAAC,MAAuC,EAAE,UAAkB;IAC7E,OAAO,MAAM,CAAC,QAAQ,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,IAAI,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,OAAwB,EACxB,KAA2B,EAC3B,MAAuC,EACvC,SAAiB,EACjB,SAAoC,EACpC,cAA2C;IAE3C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1B,0DAA0D;IA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