@silentstatestudio/perseon 0.0.0-stage → 0.1.1
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/CHANGELOG.md +219 -0
- package/LICENSE.md +73 -0
- package/README.md +849 -2
- package/dist/authoring/index.cjs +218 -0
- package/dist/authoring/index.d.cts +964 -0
- package/dist/authoring/index.d.ts +964 -0
- package/dist/authoring/index.js +219 -0
- package/dist/authoring/index.js.map +1 -0
- package/dist/chunk-443SQYAB.cjs +8468 -0
- package/dist/chunk-AVYXWDFD.js +8469 -0
- package/dist/chunk-AVYXWDFD.js.map +1 -0
- package/dist/chunk-BEDH7OYG.js +5484 -0
- package/dist/chunk-BEDH7OYG.js.map +1 -0
- package/dist/chunk-WEQPSGPS.cjs +5482 -0
- package/dist/chunk-ZIMCQTYK.cjs +6 -0
- package/dist/chunk-ZTG42LPX.js +6 -0
- package/dist/chunk-ZTG42LPX.js.map +1 -0
- package/dist/colors-CCeWL9q4.d.cts +2597 -0
- package/dist/colors-CGWrMf4V.d.ts +2597 -0
- package/dist/core/index.cjs +34 -0
- package/dist/core/index.d.cts +40 -0
- package/dist/core/index.d.ts +40 -0
- package/dist/core/index.js +35 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.cjs +34 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/pixi-v7/index.cjs +587 -0
- package/dist/pixi-v7/index.d.cts +471 -0
- package/dist/pixi-v7/index.d.ts +471 -0
- package/dist/pixi-v7/index.js +588 -0
- package/dist/pixi-v7/index.js.map +1 -0
- package/dist/pixi-v8/index.cjs +679 -0
- package/dist/pixi-v8/index.d.cts +452 -0
- package/dist/pixi-v8/index.d.ts +452 -0
- package/dist/pixi-v8/index.js +680 -0
- package/dist/pixi-v8/index.js.map +1 -0
- package/dist/rendering-dYQXmGTV.d.cts +264 -0
- package/dist/rendering-dYQXmGTV.d.ts +264 -0
- package/dist/testing/index.cjs +182 -0
- package/dist/testing/index.d.cts +103 -0
- package/dist/testing/index.d.ts +103 -0
- package/dist/testing/index.js +184 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +144 -5
|
@@ -0,0 +1,964 @@
|
|
|
1
|
+
import { S as NumericDomain, aU as TextDomain, az as ProbabilityCurvePresetId, i as CurveDefinition, ay as ProbabilityCurvePreset, ab as ParticleLayerOptions, a1 as ParticleAnimationOptions, av as PointValue } from '../colors-CCeWL9q4.cjs';
|
|
2
|
+
export { k as CustomParameterSampleScope, aZ as EMITTER_EVENT_TRIGGERS, r as EmitterEventTrigger, w as EventTrigger, a_ as OPTION_PATH_CATALOG, T as OptionNodeKind, a$ as OptionPathEntry, b0 as OptionScope, U as OptionStage, V as OptionStrategy, b1 as PARTICLE_EVENT_TRIGGERS, a4 as ParticleEventTrigger, b2 as findOptionPathEntry, b3 as isEmitterEventTrigger, b4 as isEventTrigger, b5 as isParticleEventTrigger, b6 as isValidEventName } from '../colors-CCeWL9q4.cjs';
|
|
3
|
+
import { P as ParticleBlendMode } from '../rendering-dYQXmGTV.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The bound most numeric domains are built from (`signedInteger`, `nonNegativeDecimal`…), often divided down.
|
|
7
|
+
* Some domains go past it, such as `uint32` and `COLOR_DOMAIN`.
|
|
8
|
+
*/
|
|
9
|
+
declare const MAX_PARAMETER_VALUE = 1000000;
|
|
10
|
+
/** Lowest value a numeric parameter may take by default (the negative of `MAX_PARAMETER_VALUE`). */
|
|
11
|
+
declare const MIN_PARAMETER_VALUE = -1000000;
|
|
12
|
+
/**
|
|
13
|
+
* Shared upper bound for every user-facing name that travels through a config —
|
|
14
|
+
* point forces, event names, custom parameter labels, and (editor-side) emitter,
|
|
15
|
+
* particle and region names. 50 sits in the sweet spot for name-type inputs:
|
|
16
|
+
* comfortably above real-world names yet short enough not to truncate in a narrow
|
|
17
|
+
* layers panel. The single source of truth; the editor imports it rather than
|
|
18
|
+
* redeclaring its own.
|
|
19
|
+
*/
|
|
20
|
+
declare const NAME_MAX_LENGTH = 50;
|
|
21
|
+
/**
|
|
22
|
+
* Domains of name-like text values. `name` bounds the length of any user-facing name to `NAME_MAX_LENGTH` characters
|
|
23
|
+
* and trims surrounding whitespace.
|
|
24
|
+
*/
|
|
25
|
+
declare const TEXT_DOMAINS: {
|
|
26
|
+
name: {
|
|
27
|
+
minLength: number;
|
|
28
|
+
maxLength: number;
|
|
29
|
+
trim: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Reusable numeric domains the other catalogs are built from: integers, decimals, normalized `0..1` values,
|
|
34
|
+
* a percentage, an angle in radians (a full turn either way) and an unsigned 32-bit integer.
|
|
35
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
36
|
+
*/
|
|
37
|
+
declare const COMMON_NUMERIC_DOMAINS: {
|
|
38
|
+
signedInteger: {
|
|
39
|
+
min: number;
|
|
40
|
+
max: number;
|
|
41
|
+
step: number;
|
|
42
|
+
decimals: number;
|
|
43
|
+
};
|
|
44
|
+
nonNegativeInteger: {
|
|
45
|
+
min: number;
|
|
46
|
+
max: number;
|
|
47
|
+
step: number;
|
|
48
|
+
decimals: number;
|
|
49
|
+
};
|
|
50
|
+
positiveInteger: {
|
|
51
|
+
min: number;
|
|
52
|
+
max: number;
|
|
53
|
+
step: number;
|
|
54
|
+
decimals: number;
|
|
55
|
+
};
|
|
56
|
+
signedDecimal: {
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
step: number;
|
|
60
|
+
decimals: number;
|
|
61
|
+
};
|
|
62
|
+
nonNegativeDecimal: {
|
|
63
|
+
min: number;
|
|
64
|
+
max: number;
|
|
65
|
+
step: number;
|
|
66
|
+
decimals: number;
|
|
67
|
+
};
|
|
68
|
+
normalized: {
|
|
69
|
+
min: number;
|
|
70
|
+
max: number;
|
|
71
|
+
step: number;
|
|
72
|
+
decimals: number;
|
|
73
|
+
};
|
|
74
|
+
normalizedPrecise: {
|
|
75
|
+
min: number;
|
|
76
|
+
max: number;
|
|
77
|
+
step: number;
|
|
78
|
+
decimals: number;
|
|
79
|
+
};
|
|
80
|
+
signedNormalizedPrecise: {
|
|
81
|
+
min: number;
|
|
82
|
+
max: number;
|
|
83
|
+
step: number;
|
|
84
|
+
decimals: number;
|
|
85
|
+
};
|
|
86
|
+
percentage: {
|
|
87
|
+
min: number;
|
|
88
|
+
max: number;
|
|
89
|
+
step: number;
|
|
90
|
+
decimals: number;
|
|
91
|
+
};
|
|
92
|
+
angleRadians: {
|
|
93
|
+
min: number;
|
|
94
|
+
max: number;
|
|
95
|
+
step: number;
|
|
96
|
+
decimals: number;
|
|
97
|
+
};
|
|
98
|
+
uint32: {
|
|
99
|
+
min: number;
|
|
100
|
+
max: number;
|
|
101
|
+
step: number;
|
|
102
|
+
decimals: number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Domains for custom parameters declared by the animation: `continuous` (decimal), `discrete` (integer)
|
|
107
|
+
* and `labelIndex` (a non-negative integer).
|
|
108
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
109
|
+
*/
|
|
110
|
+
declare const CUSTOM_PARAMETER_DOMAINS: {
|
|
111
|
+
continuous: {
|
|
112
|
+
min: number;
|
|
113
|
+
max: number;
|
|
114
|
+
step: number;
|
|
115
|
+
decimals: number;
|
|
116
|
+
};
|
|
117
|
+
discrete: {
|
|
118
|
+
min: number;
|
|
119
|
+
max: number;
|
|
120
|
+
step: number;
|
|
121
|
+
decimals: number;
|
|
122
|
+
};
|
|
123
|
+
labelIndex: {
|
|
124
|
+
min: number;
|
|
125
|
+
max: number;
|
|
126
|
+
step: number;
|
|
127
|
+
decimals: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Domains of the per-particle parameters: life, position, velocity, acceleration, scale, rotation and alpha,
|
|
132
|
+
* including their rates of change. Keyed by parameter name.
|
|
133
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
134
|
+
*/
|
|
135
|
+
declare const PARTICLE_PARAMETER_DOMAINS: {
|
|
136
|
+
lifeProgress: {
|
|
137
|
+
min: number;
|
|
138
|
+
max: number;
|
|
139
|
+
step: number;
|
|
140
|
+
decimals: number;
|
|
141
|
+
};
|
|
142
|
+
lifetime: {
|
|
143
|
+
min: number;
|
|
144
|
+
max: number;
|
|
145
|
+
step: number;
|
|
146
|
+
decimals: number;
|
|
147
|
+
};
|
|
148
|
+
lifeElapsed: {
|
|
149
|
+
min: number;
|
|
150
|
+
max: number;
|
|
151
|
+
step: number;
|
|
152
|
+
decimals: number;
|
|
153
|
+
};
|
|
154
|
+
positionX: {
|
|
155
|
+
min: number;
|
|
156
|
+
max: number;
|
|
157
|
+
step: number;
|
|
158
|
+
decimals: number;
|
|
159
|
+
};
|
|
160
|
+
positionY: {
|
|
161
|
+
min: number;
|
|
162
|
+
max: number;
|
|
163
|
+
step: number;
|
|
164
|
+
decimals: number;
|
|
165
|
+
};
|
|
166
|
+
velocityX: {
|
|
167
|
+
min: number;
|
|
168
|
+
max: number;
|
|
169
|
+
step: number;
|
|
170
|
+
decimals: number;
|
|
171
|
+
};
|
|
172
|
+
velocityY: {
|
|
173
|
+
min: number;
|
|
174
|
+
max: number;
|
|
175
|
+
step: number;
|
|
176
|
+
decimals: number;
|
|
177
|
+
};
|
|
178
|
+
velocityMagnitude: {
|
|
179
|
+
min: number;
|
|
180
|
+
max: number;
|
|
181
|
+
step: number;
|
|
182
|
+
decimals: number;
|
|
183
|
+
};
|
|
184
|
+
velocityAngle: {
|
|
185
|
+
min: number;
|
|
186
|
+
max: number;
|
|
187
|
+
step: number;
|
|
188
|
+
decimals: number;
|
|
189
|
+
};
|
|
190
|
+
accelerationX: {
|
|
191
|
+
min: number;
|
|
192
|
+
max: number;
|
|
193
|
+
step: number;
|
|
194
|
+
decimals: number;
|
|
195
|
+
};
|
|
196
|
+
accelerationY: {
|
|
197
|
+
min: number;
|
|
198
|
+
max: number;
|
|
199
|
+
step: number;
|
|
200
|
+
decimals: number;
|
|
201
|
+
};
|
|
202
|
+
accelerationMagnitude: {
|
|
203
|
+
min: number;
|
|
204
|
+
max: number;
|
|
205
|
+
step: number;
|
|
206
|
+
decimals: number;
|
|
207
|
+
};
|
|
208
|
+
accelerationAngle: {
|
|
209
|
+
min: number;
|
|
210
|
+
max: number;
|
|
211
|
+
step: number;
|
|
212
|
+
decimals: number;
|
|
213
|
+
};
|
|
214
|
+
scaleX: {
|
|
215
|
+
min: number;
|
|
216
|
+
max: number;
|
|
217
|
+
step: number;
|
|
218
|
+
decimals: number;
|
|
219
|
+
};
|
|
220
|
+
scaleY: {
|
|
221
|
+
min: number;
|
|
222
|
+
max: number;
|
|
223
|
+
step: number;
|
|
224
|
+
decimals: number;
|
|
225
|
+
};
|
|
226
|
+
scaleVelocityX: {
|
|
227
|
+
min: number;
|
|
228
|
+
max: number;
|
|
229
|
+
step: number;
|
|
230
|
+
decimals: number;
|
|
231
|
+
};
|
|
232
|
+
scaleVelocityY: {
|
|
233
|
+
min: number;
|
|
234
|
+
max: number;
|
|
235
|
+
step: number;
|
|
236
|
+
decimals: number;
|
|
237
|
+
};
|
|
238
|
+
scaleAccelerationX: {
|
|
239
|
+
min: number;
|
|
240
|
+
max: number;
|
|
241
|
+
step: number;
|
|
242
|
+
decimals: number;
|
|
243
|
+
};
|
|
244
|
+
scaleAccelerationY: {
|
|
245
|
+
min: number;
|
|
246
|
+
max: number;
|
|
247
|
+
step: number;
|
|
248
|
+
decimals: number;
|
|
249
|
+
};
|
|
250
|
+
rotation: {
|
|
251
|
+
min: number;
|
|
252
|
+
max: number;
|
|
253
|
+
step: number;
|
|
254
|
+
decimals: number;
|
|
255
|
+
};
|
|
256
|
+
rotationVelocity: {
|
|
257
|
+
min: number;
|
|
258
|
+
max: number;
|
|
259
|
+
step: number;
|
|
260
|
+
decimals: number;
|
|
261
|
+
};
|
|
262
|
+
rotationAcceleration: {
|
|
263
|
+
min: number;
|
|
264
|
+
max: number;
|
|
265
|
+
step: number;
|
|
266
|
+
decimals: number;
|
|
267
|
+
};
|
|
268
|
+
alpha: {
|
|
269
|
+
min: number;
|
|
270
|
+
max: number;
|
|
271
|
+
step: number;
|
|
272
|
+
decimals: number;
|
|
273
|
+
};
|
|
274
|
+
alphaVelocity: {
|
|
275
|
+
min: number;
|
|
276
|
+
max: number;
|
|
277
|
+
step: number;
|
|
278
|
+
decimals: number;
|
|
279
|
+
};
|
|
280
|
+
alphaAcceleration: {
|
|
281
|
+
min: number;
|
|
282
|
+
max: number;
|
|
283
|
+
step: number;
|
|
284
|
+
decimals: number;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Domains of the particle options: `lifetime` and the gravity, damping, wind and point-force factors.
|
|
289
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
290
|
+
*/
|
|
291
|
+
declare const PARTICLE_OPTION_DOMAINS: {
|
|
292
|
+
lifetime: {
|
|
293
|
+
min: number;
|
|
294
|
+
max: number;
|
|
295
|
+
step: number;
|
|
296
|
+
decimals: number;
|
|
297
|
+
};
|
|
298
|
+
gravityFactor: {
|
|
299
|
+
min: number;
|
|
300
|
+
max: number;
|
|
301
|
+
step: number;
|
|
302
|
+
decimals: number;
|
|
303
|
+
};
|
|
304
|
+
dampingFactor: {
|
|
305
|
+
min: number;
|
|
306
|
+
max: number;
|
|
307
|
+
step: number;
|
|
308
|
+
decimals: number;
|
|
309
|
+
};
|
|
310
|
+
windFactor: {
|
|
311
|
+
min: number;
|
|
312
|
+
max: number;
|
|
313
|
+
step: number;
|
|
314
|
+
decimals: number;
|
|
315
|
+
};
|
|
316
|
+
pointForceFactor: {
|
|
317
|
+
min: number;
|
|
318
|
+
max: number;
|
|
319
|
+
step: number;
|
|
320
|
+
decimals: number;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Domains of a point force: `strength`, `radius` and the `positionX` / `positionY` of its center.
|
|
325
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
326
|
+
*/
|
|
327
|
+
declare const POINT_FORCE_DOMAINS: {
|
|
328
|
+
strength: {
|
|
329
|
+
min: number;
|
|
330
|
+
max: number;
|
|
331
|
+
step: number;
|
|
332
|
+
decimals: number;
|
|
333
|
+
};
|
|
334
|
+
radius: {
|
|
335
|
+
min: number;
|
|
336
|
+
max: number;
|
|
337
|
+
step: number;
|
|
338
|
+
decimals: number;
|
|
339
|
+
};
|
|
340
|
+
positionX: {
|
|
341
|
+
min: number;
|
|
342
|
+
max: number;
|
|
343
|
+
step: number;
|
|
344
|
+
decimals: number;
|
|
345
|
+
};
|
|
346
|
+
positionY: {
|
|
347
|
+
min: number;
|
|
348
|
+
max: number;
|
|
349
|
+
step: number;
|
|
350
|
+
decimals: number;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* Domains of the emitter and playback parameters, such as gravity, damping, wind and the spawn values.
|
|
355
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
356
|
+
*/
|
|
357
|
+
declare const EMITTER_PARAMETER_DOMAINS: {
|
|
358
|
+
gravity: {
|
|
359
|
+
min: number;
|
|
360
|
+
max: number;
|
|
361
|
+
step: number;
|
|
362
|
+
decimals: number;
|
|
363
|
+
};
|
|
364
|
+
damping: {
|
|
365
|
+
min: number;
|
|
366
|
+
max: number;
|
|
367
|
+
step: number;
|
|
368
|
+
decimals: number;
|
|
369
|
+
};
|
|
370
|
+
windX: {
|
|
371
|
+
min: number;
|
|
372
|
+
max: number;
|
|
373
|
+
step: number;
|
|
374
|
+
decimals: number;
|
|
375
|
+
};
|
|
376
|
+
windY: {
|
|
377
|
+
min: number;
|
|
378
|
+
max: number;
|
|
379
|
+
step: number;
|
|
380
|
+
decimals: number;
|
|
381
|
+
};
|
|
382
|
+
windMagnitude: {
|
|
383
|
+
min: number;
|
|
384
|
+
max: number;
|
|
385
|
+
step: number;
|
|
386
|
+
decimals: number;
|
|
387
|
+
};
|
|
388
|
+
windAngle: {
|
|
389
|
+
min: number;
|
|
390
|
+
max: number;
|
|
391
|
+
step: number;
|
|
392
|
+
decimals: number;
|
|
393
|
+
};
|
|
394
|
+
spawnRate: {
|
|
395
|
+
min: number;
|
|
396
|
+
max: number;
|
|
397
|
+
step: number;
|
|
398
|
+
decimals: number;
|
|
399
|
+
};
|
|
400
|
+
spawnCount: {
|
|
401
|
+
min: number;
|
|
402
|
+
max: number;
|
|
403
|
+
step: number;
|
|
404
|
+
decimals: number;
|
|
405
|
+
};
|
|
406
|
+
spawnDuration: {
|
|
407
|
+
min: number;
|
|
408
|
+
max: number;
|
|
409
|
+
step: number;
|
|
410
|
+
decimals: number;
|
|
411
|
+
};
|
|
412
|
+
numberOfParticles: {
|
|
413
|
+
min: number;
|
|
414
|
+
max: number;
|
|
415
|
+
step: number;
|
|
416
|
+
decimals: number;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Domains of the emitter options: pool sizes, alive limits, delays, repeats, the random seed and update limits.
|
|
421
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
422
|
+
*/
|
|
423
|
+
declare const EMITTER_OPTION_DOMAINS: {
|
|
424
|
+
maxAlive: {
|
|
425
|
+
min: number;
|
|
426
|
+
max: number;
|
|
427
|
+
step: number;
|
|
428
|
+
decimals: number;
|
|
429
|
+
};
|
|
430
|
+
initialPoolSize: {
|
|
431
|
+
min: number;
|
|
432
|
+
max: number;
|
|
433
|
+
step: number;
|
|
434
|
+
decimals: number;
|
|
435
|
+
};
|
|
436
|
+
simulateTime: {
|
|
437
|
+
min: number;
|
|
438
|
+
max: number;
|
|
439
|
+
step: number;
|
|
440
|
+
decimals: number;
|
|
441
|
+
};
|
|
442
|
+
ensureAliveCount: {
|
|
443
|
+
min: number;
|
|
444
|
+
max: number;
|
|
445
|
+
step: number;
|
|
446
|
+
decimals: number;
|
|
447
|
+
};
|
|
448
|
+
startDelay: {
|
|
449
|
+
min: number;
|
|
450
|
+
max: number;
|
|
451
|
+
step: number;
|
|
452
|
+
decimals: number;
|
|
453
|
+
};
|
|
454
|
+
repeat: {
|
|
455
|
+
min: number;
|
|
456
|
+
max: number;
|
|
457
|
+
step: number;
|
|
458
|
+
decimals: number;
|
|
459
|
+
};
|
|
460
|
+
repeatInterval: {
|
|
461
|
+
min: number;
|
|
462
|
+
max: number;
|
|
463
|
+
step: number;
|
|
464
|
+
decimals: number;
|
|
465
|
+
};
|
|
466
|
+
seed: {
|
|
467
|
+
min: number;
|
|
468
|
+
max: number;
|
|
469
|
+
step: number;
|
|
470
|
+
decimals: number;
|
|
471
|
+
};
|
|
472
|
+
maxUpdateRate: {
|
|
473
|
+
min: number;
|
|
474
|
+
max: number;
|
|
475
|
+
step: number;
|
|
476
|
+
decimals: number;
|
|
477
|
+
};
|
|
478
|
+
warmUpMaxTicks: {
|
|
479
|
+
min: number;
|
|
480
|
+
max: number;
|
|
481
|
+
step: number;
|
|
482
|
+
decimals: number;
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
/**
|
|
486
|
+
* Domains of the numbers inside a parameter definition: random-list weights, curve axes and bends,
|
|
487
|
+
* color stop positions and area coordinates, sizes and rotation.
|
|
488
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
489
|
+
*/
|
|
490
|
+
declare const PARAMETER_OPTION_DOMAINS: {
|
|
491
|
+
randomListWeight: {
|
|
492
|
+
min: number;
|
|
493
|
+
max: number;
|
|
494
|
+
step: number;
|
|
495
|
+
decimals: number;
|
|
496
|
+
};
|
|
497
|
+
curveAxis: {
|
|
498
|
+
min: number;
|
|
499
|
+
max: number;
|
|
500
|
+
step: number;
|
|
501
|
+
decimals: number;
|
|
502
|
+
};
|
|
503
|
+
curveSegmentBend: {
|
|
504
|
+
min: number;
|
|
505
|
+
max: number;
|
|
506
|
+
step: number;
|
|
507
|
+
decimals: number;
|
|
508
|
+
};
|
|
509
|
+
colorStopPosition: {
|
|
510
|
+
min: number;
|
|
511
|
+
max: number;
|
|
512
|
+
step: number;
|
|
513
|
+
decimals: number;
|
|
514
|
+
};
|
|
515
|
+
areaCoordinate: {
|
|
516
|
+
min: number;
|
|
517
|
+
max: number;
|
|
518
|
+
step: number;
|
|
519
|
+
decimals: number;
|
|
520
|
+
};
|
|
521
|
+
areaSize: {
|
|
522
|
+
min: number;
|
|
523
|
+
max: number;
|
|
524
|
+
step: number;
|
|
525
|
+
decimals: number;
|
|
526
|
+
};
|
|
527
|
+
areaRotation: {
|
|
528
|
+
min: number;
|
|
529
|
+
max: number;
|
|
530
|
+
step: number;
|
|
531
|
+
decimals: number;
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
535
|
+
* Domains of the numbers of a modifier. `strength` ranges from -10 to 10.
|
|
536
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
537
|
+
*/
|
|
538
|
+
declare const MODIFIER_DOMAINS: {
|
|
539
|
+
strength: {
|
|
540
|
+
min: number;
|
|
541
|
+
max: number;
|
|
542
|
+
step: number;
|
|
543
|
+
decimals: number;
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
/**
|
|
547
|
+
* Domains of a modulator's numbers: `frequency`, `amplitude`, `offset` and `phase` (a fraction of one cycle).
|
|
548
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
549
|
+
*/
|
|
550
|
+
declare const MODULATOR_DOMAINS: {
|
|
551
|
+
frequency: {
|
|
552
|
+
min: number;
|
|
553
|
+
max: number;
|
|
554
|
+
step: number;
|
|
555
|
+
decimals: number;
|
|
556
|
+
};
|
|
557
|
+
amplitude: {
|
|
558
|
+
min: number;
|
|
559
|
+
max: number;
|
|
560
|
+
step: number;
|
|
561
|
+
decimals: number;
|
|
562
|
+
};
|
|
563
|
+
offset: {
|
|
564
|
+
min: number;
|
|
565
|
+
max: number;
|
|
566
|
+
step: number;
|
|
567
|
+
decimals: number;
|
|
568
|
+
};
|
|
569
|
+
phase: {
|
|
570
|
+
min: number;
|
|
571
|
+
max: number;
|
|
572
|
+
step: number;
|
|
573
|
+
decimals: number;
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* Domains of a sprite animation: `animationFPS` (a positive integer) and `startFrame`,
|
|
578
|
+
* a zero-based frame index where -1 means a random start frame.
|
|
579
|
+
* Each entry is a numeric domain: `min`, `max`, and optionally the `step` and `decimals` an authoring tool should use for it.
|
|
580
|
+
*/
|
|
581
|
+
declare const SPRITE_ANIMATION_DOMAINS: {
|
|
582
|
+
animationFPS: {
|
|
583
|
+
min: number;
|
|
584
|
+
max: number;
|
|
585
|
+
step: number;
|
|
586
|
+
decimals: number;
|
|
587
|
+
};
|
|
588
|
+
startFrame: {
|
|
589
|
+
min: number;
|
|
590
|
+
max: number;
|
|
591
|
+
step: number;
|
|
592
|
+
decimals: number;
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Single source of truth for particle blend modes.
|
|
598
|
+
*
|
|
599
|
+
* The `ParticleBlendMode` type is the union of all valid blend mode ids. This
|
|
600
|
+
* catalog is the single source of truth for the set of valid modes; adapters exhaustively map these in their backend
|
|
601
|
+
* implementations (pixi-v8 / pixi-v7).
|
|
602
|
+
*
|
|
603
|
+
* Blend is a container-level property (the GPU sets it per draw call, not per
|
|
604
|
+
* instance); the engine renders one container per Particle Layer, so each layer
|
|
605
|
+
* carries a fixed mode from this catalog.
|
|
606
|
+
*
|
|
607
|
+
* What a mode COSTS, and whether a backend can honor it at all, is deliberately
|
|
608
|
+
* not here. It is not a property of the mode: `overlay` is a shader pass on the
|
|
609
|
+
* v8 adapter and plain `normal` on the v7 one, and `subtract` is the reverse —
|
|
610
|
+
* fixed-function on v7, a shader pass on v8. A renderer answers that about
|
|
611
|
+
* itself through `IRendererCapabilities.blendModeSupport`.
|
|
612
|
+
*/
|
|
613
|
+
/**
|
|
614
|
+
* Ordered catalog. Order is the display order; the cheap, universal modes first.
|
|
615
|
+
* Each entry is an object whose `id` is one blend mode, a valid `ParticleBlendMode`.
|
|
616
|
+
*
|
|
617
|
+
* What a mode costs, and whether a backend can honor it at all, is not part of
|
|
618
|
+
* the catalog: it depends on the renderer, which answers it about itself through
|
|
619
|
+
* `IRendererCapabilities.blendModeSupport`.
|
|
620
|
+
*/
|
|
621
|
+
declare const BLEND_MODE_CATALOG: readonly [{
|
|
622
|
+
readonly id: "normal";
|
|
623
|
+
}, {
|
|
624
|
+
readonly id: "add";
|
|
625
|
+
}, {
|
|
626
|
+
readonly id: "screen";
|
|
627
|
+
}, {
|
|
628
|
+
readonly id: "multiply";
|
|
629
|
+
}, {
|
|
630
|
+
readonly id: "subtract";
|
|
631
|
+
}, {
|
|
632
|
+
readonly id: "overlay";
|
|
633
|
+
}, {
|
|
634
|
+
readonly id: "darken";
|
|
635
|
+
}, {
|
|
636
|
+
readonly id: "lighten";
|
|
637
|
+
}, {
|
|
638
|
+
readonly id: "color-dodge";
|
|
639
|
+
}, {
|
|
640
|
+
readonly id: "color-burn";
|
|
641
|
+
}, {
|
|
642
|
+
readonly id: "hard-light";
|
|
643
|
+
}, {
|
|
644
|
+
readonly id: "soft-light";
|
|
645
|
+
}, {
|
|
646
|
+
readonly id: "difference";
|
|
647
|
+
}, {
|
|
648
|
+
readonly id: "exclusion";
|
|
649
|
+
}];
|
|
650
|
+
/** Default applied when a layer omits a blend mode. */
|
|
651
|
+
declare const DEFAULT_BLEND_MODE: ParticleBlendMode;
|
|
652
|
+
/** Narrows an unknown value to a catalog blend mode (used to validate configs). */
|
|
653
|
+
declare const isParticleBlendMode: (value: unknown) => value is ParticleBlendMode;
|
|
654
|
+
|
|
655
|
+
/** `timeSource` value that drives a modulator with the engine's clock. */
|
|
656
|
+
declare const MODULATOR_TIME_ELAPSED_SOURCE = "timeElapsed";
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Version of the animation format this engine reads (`formatVersion`). A file
|
|
660
|
+
* without the field, or with another value, is rejected at load naming both.
|
|
661
|
+
*/
|
|
662
|
+
declare const ANIMATION_FORMAT_VERSION = 2;
|
|
663
|
+
|
|
664
|
+
/** The range a packed `0xRRGGBB` color number must sit in: `0` to `0xffffff` (24 bits, no alpha). It does not have to be an integer. */
|
|
665
|
+
declare const COLOR_DOMAIN: NumericDomain;
|
|
666
|
+
/**
|
|
667
|
+
* Coerce a name-like string into its `TextDomain`: trim (when the domain asks)
|
|
668
|
+
* then clamp to `maxLength`. This is the lenient counterpart to the strict name check, which throws —
|
|
669
|
+
* it always returns a conforming value rather than throwing, so hosts can pass
|
|
670
|
+
* raw user input straight through. Its output always passes that check for the
|
|
671
|
+
* same domain.
|
|
672
|
+
*/
|
|
673
|
+
declare const sanitizeName: (value: string, domain?: TextDomain) => string;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Paths a Linked parameter may read, per scope. Each scope lists only the
|
|
677
|
+
* fields it owns; a wider context (an emitter, a particle) also sees the outer
|
|
678
|
+
* scopes. Every path resolves to a number.
|
|
679
|
+
*/
|
|
680
|
+
declare const LINKED_SOURCE_CATALOG: {
|
|
681
|
+
/** Paths of the playback-wide values: gravity, damping and the wind's magnitude and angle. */
|
|
682
|
+
readonly playback: readonly ["gravity", "damping", "windMagnitude", "windAngle"];
|
|
683
|
+
/** Paths of the emitter values: spawn rate, spawn count and spawn duration. */
|
|
684
|
+
readonly emitter: readonly ["spawnRate", "spawnCount", "spawnDuration"];
|
|
685
|
+
/** Paths of the per-particle values: life progress, lifetime, time lived, position, velocity, acceleration, scale, rotation and alpha, plus their rates of change. */
|
|
686
|
+
readonly particle: readonly ["lifeProgress", "lifetime", "lifeElapsed", "positionX", "positionY", "velocityX", "velocityY", "velocityMagnitude", "velocityAngle", "accelerationX", "accelerationY", "accelerationMagnitude", "accelerationAngle", "scaleX", "scaleY", "scaleVelocityX", "scaleVelocityY", "scaleAccelerationX", "scaleAccelerationY", "rotation", "rotationVelocity", "rotationAcceleration", "alpha", "alphaVelocity", "alphaAcceleration"];
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
/** The preset used when none is given: `'uniform'`. */
|
|
690
|
+
declare const DEFAULT_PROBABILITY_CURVE_PRESET_ID: ProbabilityCurvePresetId;
|
|
691
|
+
/**
|
|
692
|
+
* The built-in probability curve presets. Each has an `id`, a `label`, a `description`, an optional `iconKey`
|
|
693
|
+
* and a `curve` defined over x in `0..1` that `createProbabilityCurveFromPreset` can rescale.
|
|
694
|
+
*/
|
|
695
|
+
declare const PROBABILITY_CURVE_PRESETS: readonly [{
|
|
696
|
+
readonly id: "uniform";
|
|
697
|
+
readonly label: "Uniform";
|
|
698
|
+
readonly description: "Equal probability across the full range.";
|
|
699
|
+
readonly iconKey: "line-horizontal";
|
|
700
|
+
readonly curve: {
|
|
701
|
+
readonly points: [{
|
|
702
|
+
readonly x: 0;
|
|
703
|
+
readonly y: 1;
|
|
704
|
+
}, {
|
|
705
|
+
readonly x: 1;
|
|
706
|
+
readonly y: 1;
|
|
707
|
+
}];
|
|
708
|
+
readonly segmentBends: [0];
|
|
709
|
+
};
|
|
710
|
+
}, {
|
|
711
|
+
readonly id: "lowBias";
|
|
712
|
+
readonly label: "Low Bias";
|
|
713
|
+
readonly description: "Higher probability near the minimum side.";
|
|
714
|
+
readonly iconKey: "slope-down";
|
|
715
|
+
readonly curve: {
|
|
716
|
+
readonly points: [{
|
|
717
|
+
readonly x: 0;
|
|
718
|
+
readonly y: 1;
|
|
719
|
+
}, {
|
|
720
|
+
readonly x: 1;
|
|
721
|
+
readonly y: 0.15;
|
|
722
|
+
}];
|
|
723
|
+
readonly segmentBends: [0];
|
|
724
|
+
};
|
|
725
|
+
}, {
|
|
726
|
+
readonly id: "highBias";
|
|
727
|
+
readonly label: "High Bias";
|
|
728
|
+
readonly description: "Higher probability near the maximum side.";
|
|
729
|
+
readonly iconKey: "slope-up";
|
|
730
|
+
readonly curve: {
|
|
731
|
+
readonly points: [{
|
|
732
|
+
readonly x: 0;
|
|
733
|
+
readonly y: 0.15;
|
|
734
|
+
}, {
|
|
735
|
+
readonly x: 1;
|
|
736
|
+
readonly y: 1;
|
|
737
|
+
}];
|
|
738
|
+
readonly segmentBends: [0];
|
|
739
|
+
};
|
|
740
|
+
}, {
|
|
741
|
+
readonly id: "centerBias";
|
|
742
|
+
readonly label: "Center Bias";
|
|
743
|
+
readonly description: "Smooth preference for the middle of the range.";
|
|
744
|
+
readonly iconKey: "peak-center";
|
|
745
|
+
readonly curve: {
|
|
746
|
+
readonly points: [{
|
|
747
|
+
readonly x: 0;
|
|
748
|
+
readonly y: 0.12;
|
|
749
|
+
}, {
|
|
750
|
+
readonly x: 0.5;
|
|
751
|
+
readonly y: 1;
|
|
752
|
+
}, {
|
|
753
|
+
readonly x: 1;
|
|
754
|
+
readonly y: 0.12;
|
|
755
|
+
}];
|
|
756
|
+
readonly segmentBends: [0.25, 0.25];
|
|
757
|
+
};
|
|
758
|
+
}, {
|
|
759
|
+
readonly id: "edgeBias";
|
|
760
|
+
readonly label: "Edge Bias";
|
|
761
|
+
readonly description: "Higher probability near both edges.";
|
|
762
|
+
readonly iconKey: "peak-edges";
|
|
763
|
+
readonly curve: {
|
|
764
|
+
readonly points: [{
|
|
765
|
+
readonly x: 0;
|
|
766
|
+
readonly y: 1;
|
|
767
|
+
}, {
|
|
768
|
+
readonly x: 0.5;
|
|
769
|
+
readonly y: 0.12;
|
|
770
|
+
}, {
|
|
771
|
+
readonly x: 1;
|
|
772
|
+
readonly y: 1;
|
|
773
|
+
}];
|
|
774
|
+
readonly segmentBends: [-0.25, -0.25];
|
|
775
|
+
};
|
|
776
|
+
}, {
|
|
777
|
+
readonly id: "bell";
|
|
778
|
+
readonly label: "Bell";
|
|
779
|
+
readonly description: "Gaussian-like central bell curve.";
|
|
780
|
+
readonly iconKey: "bell";
|
|
781
|
+
readonly curve: {
|
|
782
|
+
readonly points: [{
|
|
783
|
+
readonly x: 0;
|
|
784
|
+
readonly y: 0.04;
|
|
785
|
+
}, {
|
|
786
|
+
readonly x: 0.25;
|
|
787
|
+
readonly y: 0.42;
|
|
788
|
+
}, {
|
|
789
|
+
readonly x: 0.5;
|
|
790
|
+
readonly y: 1;
|
|
791
|
+
}, {
|
|
792
|
+
readonly x: 0.75;
|
|
793
|
+
readonly y: 0.42;
|
|
794
|
+
}, {
|
|
795
|
+
readonly x: 1;
|
|
796
|
+
readonly y: 0.04;
|
|
797
|
+
}];
|
|
798
|
+
readonly segmentBends: [-0.45, 0.35, 0.35, -0.45];
|
|
799
|
+
};
|
|
800
|
+
}, {
|
|
801
|
+
readonly id: "doublePeak";
|
|
802
|
+
readonly label: "Double Peak";
|
|
803
|
+
readonly description: "Two smooth internal probability peaks.";
|
|
804
|
+
readonly iconKey: "double-peak";
|
|
805
|
+
readonly curve: {
|
|
806
|
+
readonly points: [{
|
|
807
|
+
readonly x: 0;
|
|
808
|
+
readonly y: 0.12;
|
|
809
|
+
}, {
|
|
810
|
+
readonly x: 0.25;
|
|
811
|
+
readonly y: 1;
|
|
812
|
+
}, {
|
|
813
|
+
readonly x: 0.5;
|
|
814
|
+
readonly y: 0.18;
|
|
815
|
+
}, {
|
|
816
|
+
readonly x: 0.75;
|
|
817
|
+
readonly y: 1;
|
|
818
|
+
}, {
|
|
819
|
+
readonly x: 1;
|
|
820
|
+
readonly y: 0.12;
|
|
821
|
+
}];
|
|
822
|
+
readonly segmentBends: [0.22, 0.18, 0.18, 0.22];
|
|
823
|
+
};
|
|
824
|
+
}];
|
|
825
|
+
/** The presets as `{ value, label, description }` options, ready to fill a selection list. */
|
|
826
|
+
declare const PROBABILITY_CURVE_PRESET_OPTIONS: {
|
|
827
|
+
value: "uniform" | "lowBias" | "highBias" | "centerBias" | "edgeBias" | "bell" | "doublePeak";
|
|
828
|
+
label: "Uniform" | "Low Bias" | "High Bias" | "Center Bias" | "Edge Bias" | "Bell" | "Double Peak";
|
|
829
|
+
description: "Equal probability across the full range." | "Higher probability near the minimum side." | "Higher probability near the maximum side." | "Smooth preference for the middle of the range." | "Higher probability near both edges." | "Gaussian-like central bell curve." | "Two smooth internal probability peaks.";
|
|
830
|
+
}[];
|
|
831
|
+
/** Returns the preset with the given id, or the first preset (`uniform`) if the id is unknown. */
|
|
832
|
+
declare const getProbabilityCurvePreset: (presetId: ProbabilityCurvePresetId) => ProbabilityCurvePreset;
|
|
833
|
+
/**
|
|
834
|
+
* Builds a fresh copy of a preset's curve (the default preset when no id is given). With `xDomain`,
|
|
835
|
+
* the curve's x values are rescaled from `0..1` to that range.
|
|
836
|
+
*/
|
|
837
|
+
declare const createProbabilityCurveFromPreset: (presetId?: ProbabilityCurvePresetId, xDomain?: Pick<NumericDomain, "min" | "max">) => CurveDefinition;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Type guards for parameter definitions. Used at runtime to discriminate the
|
|
841
|
+
* union variants of SpawnNumber / SpawnPoint / SpawnVector / SpawnPosition.
|
|
842
|
+
*
|
|
843
|
+
* Naming note: `isPointValue` / `isVectorValue` also act as the structural
|
|
844
|
+
* discriminator for the "Separated" variants `{x: SpawnNumber, y: SpawnNumber}`
|
|
845
|
+
* and `{angle: SpawnNumber, magnitude: SpawnNumber}` — those unions have the
|
|
846
|
+
* same object shape at runtime, since `SpawnNumber` extends `number`.
|
|
847
|
+
*/
|
|
848
|
+
declare class ParameterTypeChecker {
|
|
849
|
+
/** Whether `object` is a non-null object (arrays included). */
|
|
850
|
+
static isObject(object: unknown): boolean;
|
|
851
|
+
/** Whether `object` has exactly the keys `x` and `y`: a point, or the separated form of a number pair. */
|
|
852
|
+
static isPointValue(object: unknown): boolean;
|
|
853
|
+
/** Whether `object` has exactly the keys `angle` and `magnitude`: a vector in polar form. */
|
|
854
|
+
static isVectorValue(object: unknown): boolean;
|
|
855
|
+
/** Whether `object` has `min` and `max` keys (extra keys are allowed): a random range. */
|
|
856
|
+
static isRandomValueRange(object: unknown): boolean;
|
|
857
|
+
/** Whether `object` has `center`, `width` and `height`: a rectangle area. */
|
|
858
|
+
static isRectangleArea(object: unknown): boolean;
|
|
859
|
+
/** Whether `object` has `center` and `radius`. Also true for a capsule, so test `isCapsuleArea` first. */
|
|
860
|
+
static isCircleArea(object: unknown): boolean;
|
|
861
|
+
/** Whether `object` has `center`, `innerRadius` and `outerRadius`: a ring area. */
|
|
862
|
+
static isRingArea(object: unknown): boolean;
|
|
863
|
+
/** Whether `object` has `center`, `radius` and `length`: a capsule area. */
|
|
864
|
+
static isCapsuleArea(object: unknown): boolean;
|
|
865
|
+
/** Whether `object` has a `points` array: a polygon area. */
|
|
866
|
+
static isPolygonArea(object: unknown): boolean;
|
|
867
|
+
/** Whether `object` has a `values` array: a weighted list of values to pick from. */
|
|
868
|
+
static isRandomValueList(object: unknown): boolean;
|
|
869
|
+
/** Whether `object` has `sourceParameterId` and `transferFunction`: a value linked to another parameter. */
|
|
870
|
+
static isParameterLinkRelation(object: unknown): boolean;
|
|
871
|
+
/** Whether `object` has a `stops` array: a color gradient. Also true for a `ColorRandomRange`, so test `isColorRandomRange` first. */
|
|
872
|
+
static isColorGradientDefinition(object: unknown): boolean;
|
|
873
|
+
/**
|
|
874
|
+
* A spawn-time random pick over a gradient: has `stops` but NO
|
|
875
|
+
* `sourceParameterId` (the discriminator vs `ColorGradientDefinition`, which
|
|
876
|
+
* always carries a source it re-samples every frame). Must be tested BEFORE
|
|
877
|
+
* `isColorGradientDefinition` since both shapes carry `stops`.
|
|
878
|
+
*/
|
|
879
|
+
static isColorRandomRange(object: unknown): boolean;
|
|
880
|
+
/**
|
|
881
|
+
* A numeric value wrapped with a modifier stack: `{ base, modifiers[] }`.
|
|
882
|
+
* Detected before the bare-SpawnNumber variants so the compiler can peel the
|
|
883
|
+
* wrapper off and compile the base + stack.
|
|
884
|
+
*/
|
|
885
|
+
static isModulatedValue(object: unknown): boolean;
|
|
886
|
+
/** Whether `value` is a number strictly greater than zero. */
|
|
887
|
+
static isPositiveNumber(value: unknown): boolean;
|
|
888
|
+
/** Whether `object` has a `textures` array: a sprite animation definition. */
|
|
889
|
+
static isSpriteAnimationOptions(object: unknown): boolean;
|
|
890
|
+
/**
|
|
891
|
+
* Recognises any variant of SpawnNumber: plain number, RandomValueRange,
|
|
892
|
+
* RandomValueList<number>, or ParameterLinkRelation. Used by Scale's dual
|
|
893
|
+
* `SpawnNumber | SpawnPoint` discrimination — must NOT match
|
|
894
|
+
* `{x, y}` (Separated point) nor `RandomValueList<PointValue>`.
|
|
895
|
+
*/
|
|
896
|
+
static isSpawnNumber(value: unknown): boolean;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Every texture id an animation will ask its renderer to resolve, in declaration
|
|
901
|
+
* order and without duplicates.
|
|
902
|
+
*
|
|
903
|
+
* This exists so a host can answer the one question an animation file cannot answer
|
|
904
|
+
* on its own: are the textures it names actually available? Ids are resolved
|
|
905
|
+
* against whatever the renderer has been given — for the Pixi adapters, the
|
|
906
|
+
* frames of a loaded atlas — and a missing one resolves to an empty texture
|
|
907
|
+
* *silently*. The animation then runs perfectly and draws nothing, which is the
|
|
908
|
+
* hardest failure in this pipeline to diagnose by eye.
|
|
909
|
+
*
|
|
910
|
+
* Walking the options tree belongs here rather than in each host: the shape of
|
|
911
|
+
* `particles` (one layer or a weighted list) and of `texture` (an id or a sprite
|
|
912
|
+
* animation) is the library's own vocabulary, and a host re-deriving it would be
|
|
913
|
+
* a second definition to keep in sync.
|
|
914
|
+
*/
|
|
915
|
+
declare const collectTextureSources: (options: ParticleAnimationOptions) => string[];
|
|
916
|
+
/**
|
|
917
|
+
* The texture ids ONE Particle Layer names, in declaration order and without
|
|
918
|
+
* duplicates.
|
|
919
|
+
*
|
|
920
|
+
* A layer draws through a single render group, and a render group draws from a
|
|
921
|
+
* single texture source — so this is also the set that has to be packed
|
|
922
|
+
* together, whatever else the animation names.
|
|
923
|
+
*/
|
|
924
|
+
declare const collectLayerTextureSources: (layer: ParticleLayerOptions) => string[];
|
|
925
|
+
/**
|
|
926
|
+
* The same ids as {@link collectTextureSources}, kept GROUPED by the layer that
|
|
927
|
+
* names them, in declaration order.
|
|
928
|
+
*
|
|
929
|
+
* A host packing those ids into atlases needs the grouping and not the flat
|
|
930
|
+
* set: every id one layer names has to end up in the same atlas, while two
|
|
931
|
+
* layers are free to come from different ones. Answering that from the flat set
|
|
932
|
+
* is impossible, and re-deriving the grouping outside the library would be a
|
|
933
|
+
* second definition of what `particles` and `texture` are shaped like.
|
|
934
|
+
*/
|
|
935
|
+
declare const collectTextureSourcesByLayer: (options: ParticleAnimationOptions) => string[][];
|
|
936
|
+
/** Ids the animation names that `isAvailable` does not know about. */
|
|
937
|
+
declare const findMissingTextureSources: (options: ParticleAnimationOptions, isAvailable: (source: string) => boolean) => string[];
|
|
938
|
+
|
|
939
|
+
type CompiledCurveSegment = {
|
|
940
|
+
start: PointValue;
|
|
941
|
+
end: PointValue;
|
|
942
|
+
midpoint: PointValue;
|
|
943
|
+
leftControl: PointValue;
|
|
944
|
+
rightControl: PointValue;
|
|
945
|
+
bend: number;
|
|
946
|
+
leftXSpan: number;
|
|
947
|
+
rightXSpan: number;
|
|
948
|
+
segmentXSpan: number;
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* Precompiles every segment of `curve` (its points sorted by x), one per pair of consecutive points,
|
|
952
|
+
* with the segment bends applied. An empty array when the curve has fewer than two points.
|
|
953
|
+
*/
|
|
954
|
+
declare const compileCurveSegments: (curve: CurveDefinition) => CompiledCurveSegment[];
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* The shortest slice, in seconds, the warm-up steps the animation by. The warm-up runs in slices of the
|
|
958
|
+
* clock's shortest interval, which at a `maxUpdateRate` with no limit is a microsecond: a second of
|
|
959
|
+
* `simulateTime` would be a million ticks inside `start()`. At or under 1000 Hz the slices are the clock's own;
|
|
960
|
+
* above it they are this long, and the same simulated time is covered in fewer ticks.
|
|
961
|
+
*/
|
|
962
|
+
declare const WARM_UP_MIN_STEP_SECONDS: number;
|
|
963
|
+
|
|
964
|
+
export { ANIMATION_FORMAT_VERSION, BLEND_MODE_CATALOG, COLOR_DOMAIN, COMMON_NUMERIC_DOMAINS, CUSTOM_PARAMETER_DOMAINS, DEFAULT_BLEND_MODE, DEFAULT_PROBABILITY_CURVE_PRESET_ID, EMITTER_OPTION_DOMAINS, EMITTER_PARAMETER_DOMAINS, LINKED_SOURCE_CATALOG, MAX_PARAMETER_VALUE, MIN_PARAMETER_VALUE, MODIFIER_DOMAINS, MODULATOR_DOMAINS, MODULATOR_TIME_ELAPSED_SOURCE, NAME_MAX_LENGTH, PARAMETER_OPTION_DOMAINS, PARTICLE_OPTION_DOMAINS, PARTICLE_PARAMETER_DOMAINS, POINT_FORCE_DOMAINS, PROBABILITY_CURVE_PRESETS, PROBABILITY_CURVE_PRESET_OPTIONS, ParameterTypeChecker, SPRITE_ANIMATION_DOMAINS, TEXT_DOMAINS, WARM_UP_MIN_STEP_SECONDS, collectLayerTextureSources, collectTextureSources, collectTextureSourcesByLayer, compileCurveSegments, createProbabilityCurveFromPreset, findMissingTextureSources, getProbabilityCurvePreset, isParticleBlendMode, sanitizeName };
|