@silentstatestudio/perseon 0.1.0 → 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.
Files changed (48) hide show
  1. package/CHANGELOG.md +31 -4
  2. package/LICENSE.md +61 -18
  3. package/README.md +9 -8
  4. package/dist/authoring/index.cjs +7 -2
  5. package/dist/authoring/index.d.cts +102 -4
  6. package/dist/authoring/index.d.ts +102 -4
  7. package/dist/authoring/index.js +6 -1
  8. package/dist/authoring/index.js.map +1 -1
  9. package/dist/{chunk-PT7F7TTB.cjs → chunk-443SQYAB.cjs} +216 -179
  10. package/dist/{chunk-ON4JV4BI.js → chunk-AVYXWDFD.js} +39 -2
  11. package/dist/chunk-AVYXWDFD.js.map +1 -0
  12. package/dist/{chunk-GDXCMDJ6.js → chunk-BEDH7OYG.js} +25 -3
  13. package/dist/chunk-BEDH7OYG.js.map +1 -0
  14. package/dist/{chunk-Q2HLLGJ7.cjs → chunk-WEQPSGPS.cjs} +23 -2
  15. package/dist/chunk-ZIMCQTYK.cjs +5 -0
  16. package/dist/chunk-ZTG42LPX.js +6 -0
  17. package/dist/{colors-CUEeQ78V.d.cts → colors-CCeWL9q4.d.cts} +362 -12
  18. package/dist/{colors-pshUJaKB.d.ts → colors-CGWrMf4V.d.ts} +362 -12
  19. package/dist/core/index.cjs +8 -3
  20. package/dist/core/index.d.cts +4 -3
  21. package/dist/core/index.d.ts +4 -3
  22. package/dist/core/index.js +8 -3
  23. package/dist/index.cjs +8 -3
  24. package/dist/index.d.cts +2 -2
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +8 -3
  27. package/dist/pixi-v7/index.cjs +79 -5
  28. package/dist/pixi-v7/index.d.cts +106 -7
  29. package/dist/pixi-v7/index.d.ts +106 -7
  30. package/dist/pixi-v7/index.js +77 -3
  31. package/dist/pixi-v7/index.js.map +1 -1
  32. package/dist/pixi-v8/index.cjs +78 -7
  33. package/dist/pixi-v8/index.d.cts +81 -9
  34. package/dist/pixi-v8/index.d.ts +81 -9
  35. package/dist/pixi-v8/index.js +76 -5
  36. package/dist/pixi-v8/index.js.map +1 -1
  37. package/dist/{rendering-DeUo1BsK.d.cts → rendering-dYQXmGTV.d.cts} +29 -2
  38. package/dist/{rendering-DeUo1BsK.d.ts → rendering-dYQXmGTV.d.ts} +29 -2
  39. package/dist/testing/index.cjs +23 -0
  40. package/dist/testing/index.d.cts +19 -1
  41. package/dist/testing/index.d.ts +19 -1
  42. package/dist/testing/index.js +24 -0
  43. package/dist/testing/index.js.map +1 -1
  44. package/package.json +145 -148
  45. package/dist/chunk-GDXCMDJ6.js.map +0 -1
  46. package/dist/chunk-ON4JV4BI.js.map +0 -1
  47. package/dist/chunk-SVI6WUOB.js +0 -1
  48. /package/dist/{chunk-SVI6WUOB.js.map → chunk-ZTG42LPX.js.map} +0 -0
@@ -1,3 +1,8 @@
1
+ /*!
2
+ * @silentstatestudio/perseon v0.1.1
3
+ * Required Notice: Copyright 2026 Jesús Pérez de Miguel, trading as Silent State Studio (https://perseon.dev)
4
+ * PolyForm Perimeter License 1.0.1 <https://polyformproject.org/licenses/perimeter/1.0.1>
5
+ */
1
6
  import {
2
7
  EmitterView,
3
8
  LocalDefaultHandle,
@@ -9,10 +14,10 @@ import {
9
14
  PerseonIntegration,
10
15
  PerseonPlayback,
11
16
  parseAnimationOptions
12
- } from "../chunk-ON4JV4BI.js";
17
+ } from "../chunk-AVYXWDFD.js";
13
18
  import {
14
19
  PerseonConfigError
15
- } from "../chunk-GDXCMDJ6.js";
20
+ } from "../chunk-BEDH7OYG.js";
16
21
 
17
22
  // src/pixi-v8/PixiV8Renderer.ts
18
23
  import { Ticker as PixiTicker } from "pixi.js";
@@ -56,6 +61,9 @@ var registerAdvancedBlendFilters = () => {
56
61
  areAdvancedBlendFiltersRegistered = true;
57
62
  };
58
63
  var PixiV8RendererCapabilities = class {
64
+ /**
65
+ * Registers the advanced blend filters with Pixi the first time any instance is created; later instances reuse that registration.
66
+ */
59
67
  constructor() {
60
68
  registerAdvancedBlendFilters();
61
69
  }
@@ -78,6 +86,9 @@ var PIXI_V8_BLEND_MODES = {
78
86
  var isAdvancedBlendMode = (mode) => Object.hasOwn(ADVANCED_BLEND_FILTERS, mode);
79
87
  var BLEND_PASS_EXTENT = 1e7;
80
88
  var PixiV8ParticleGroup = class {
89
+ /**
90
+ * The Pixi `ParticleContainer` that draws this layer's particles. The render node that created the group adds it to its own container; `destroy` destroys it.
91
+ */
81
92
  container;
82
93
  /**
83
94
  * Engine particles mirrored by this group, in the same order as the
@@ -97,6 +108,11 @@ var PixiV8ParticleGroup = class {
97
108
  set visible(value) {
98
109
  this.container.visible = value;
99
110
  }
111
+ /**
112
+ * Creates the `ParticleContainer` with `options.dynamicProperties` (position stays dynamic, Pixi's default) and applies `options.blendMode` (`normal` when omitted). Fixed-function modes are set as the container's blend mode; every other mode puts a blend filter on the container itself.
113
+ *
114
+ * @param options - The layer's dynamic properties and blend mode.
115
+ */
100
116
  constructor(options) {
101
117
  this.container = new ParticleContainer({ dynamicProperties: options.dynamicProperties });
102
118
  const mode = options.blendMode ?? "normal";
@@ -173,6 +189,9 @@ var PixiV8ParticleGroup = class {
173
189
  _syncBlendPass() {
174
190
  if (this._blendFilter) this._blendFilter.enabled = this._particles.length > 0;
175
191
  }
192
+ /**
193
+ * Copies the engine particle's position, scale, rotation, alpha, tint, anchor and texture onto its Pixi `Particle`.
194
+ */
176
195
  _writeState(p, pixi) {
177
196
  pixi.x = p.x;
178
197
  pixi.y = p.y;
@@ -189,30 +208,46 @@ var PixiV8ParticleGroup = class {
189
208
 
190
209
  // src/pixi-v8/PixiV8RenderNode.ts
191
210
  var PixiV8RenderNode = class _PixiV8RenderNode {
211
+ /**
212
+ * The Pixi `Container` this node wraps. It is created with the node and destroyed when the node is destroyed.
213
+ */
192
214
  container = new Container();
215
+ /** The particle groups created through this node and not yet removed with `destroyParticleGroup`. They are destroyed with it. */
193
216
  _groups = [];
194
217
  /** Child nodes (an emitter's, when this is a playback root). */
195
218
  _children = [];
219
+ /**
220
+ * Callback run once, from `destroy`, so whoever created this node (the renderer for a root, the parent node for a child) stops tracking it.
221
+ */
196
222
  _release;
223
+ /** Set by the first `destroy`, so that later calls do nothing. */
197
224
  _destroyed = false;
225
+ /**
226
+ * Creates the node with an empty Pixi container.
227
+ *
228
+ * @param release - Called with this node when it is destroyed, so its creator can drop it.
229
+ */
198
230
  constructor(release) {
199
231
  this._release = release;
200
232
  }
201
233
  get hostDestroyed() {
202
234
  return this.container.destroyed;
203
235
  }
236
+ /** Whether the node's container is shown. Hidden, Pixi draws neither it nor anything under it. */
204
237
  get visible() {
205
238
  return this.container.visible;
206
239
  }
207
240
  set visible(value) {
208
241
  this.container.visible = value;
209
242
  }
243
+ /** Horizontal position of the node's container, in its parent's local coordinates. */
210
244
  get x() {
211
245
  return this.container.x;
212
246
  }
213
247
  set x(value) {
214
248
  this.container.x = value;
215
249
  }
250
+ /** Vertical position of the node's container, in its parent's local coordinates. */
216
251
  get y() {
217
252
  return this.container.y;
218
253
  }
@@ -239,6 +274,9 @@ var PixiV8RenderNode = class _PixiV8RenderNode {
239
274
  this._children.push(node);
240
275
  return node;
241
276
  }
277
+ /**
278
+ * Drops a destroyed child node from this node's list. It is the release callback `createChildNode` hands to each child.
279
+ */
242
280
  _releaseChild(node) {
243
281
  const index = this._children.indexOf(node);
244
282
  if (index >= 0) this._children.splice(index, 1);
@@ -274,8 +312,18 @@ var PixiV8RenderNode = class _PixiV8RenderNode {
274
312
 
275
313
  // src/pixi-v8/PixiV8TickerAdapter.ts
276
314
  var PixiV8TickerAdapter = class {
315
+ /** The Pixi ticker being wrapped. */
277
316
  _ticker;
317
+ /**
318
+ * Pairs each function given to `add` with the wrapper registered on the Pixi ticker, so `remove` can unregister that same wrapper.
319
+ */
278
320
  _wrapped = /* @__PURE__ */ new Map();
321
+ /**
322
+ * Wraps a Pixi ticker. The constructor neither starts nor stops it, but Pixi starts a ticker whose
323
+ * `autoStart` is set (such as `Ticker.shared`) when `add` registers the first function.
324
+ *
325
+ * @param ticker - The Pixi `Ticker` whose frames drive the functions added to this adapter.
326
+ */
279
327
  constructor(ticker) {
280
328
  this._ticker = ticker;
281
329
  }
@@ -313,9 +361,19 @@ var PixiV8Renderer = class {
313
361
  ticker;
314
362
  /** What this backend does with each blend mode — see `IRendererCapabilities`. */
315
363
  capabilities = new PixiV8RendererCapabilities();
364
+ /**
365
+ * Textures already resolved, keyed by the `source` value given to `resolveTexture`. Emptied by `clearTextureCache` and `destroy`.
366
+ */
316
367
  _textureCache = /* @__PURE__ */ new Map();
368
+ /**
369
+ * The root nodes this renderer created and that are still alive, so `destroy` can tear them down. A node leaves the list when it is destroyed.
370
+ */
317
371
  _nodes = [];
318
- /** @param options - Optional settings; see `PixiV8RendererOptions`. */
372
+ /**
373
+ * Creates the renderer, wrapping `options.ticker` (or Pixi's shared ticker) in an adapter.
374
+ *
375
+ * @param options - Optional settings; see `PixiV8RendererOptions`.
376
+ */
319
377
  constructor(options = {}) {
320
378
  this.ticker = new PixiV8TickerAdapter(options.ticker ?? PixiTicker.shared);
321
379
  }
@@ -334,7 +392,8 @@ var PixiV8Renderer = class {
334
392
  * The texture a scene's `texture.source` names. The id must have been published to
335
393
  * Pixi's `Assets.cache` beforehand (see `PixiV8ParticleAtlas`); an unknown id, or a
336
394
  * source that is not a string, resolves to an empty texture. Answers are memoized
337
- * until `clearTextureCache`.
395
+ * until `clearTextureCache`, so an id resolved before it was published stays empty
396
+ * until then.
338
397
  */
339
398
  resolveTexture(source) {
340
399
  const cached = this._textureCache.get(source);
@@ -362,6 +421,12 @@ var isPixiTicker = (ticker) => {
362
421
  return typeof candidate.deltaMS === "number" && typeof candidate.deltaTime === "number" && typeof candidate.elapsedMS === "number" && typeof candidate.speed === "number" && typeof candidate.add === "function" && typeof candidate.remove === "function" && typeof candidate.addOnce === "function" && typeof candidate.start === "function" && typeof candidate.stop === "function";
363
422
  };
364
423
  var Perseon = class extends PerseonIntegration {
424
+ /**
425
+ * Creates the integration for PixiJS v8. A Pixi `Ticker` is wrapped by the renderer this builds; any other
426
+ * `ITicker` is used as the frame source as it is.
427
+ *
428
+ * @param options - Optional settings; see `PerseonOptions`.
429
+ */
365
430
  constructor(options = {}) {
366
431
  const { ticker } = options;
367
432
  if (ticker === void 0 || isPixiTicker(ticker)) {
@@ -397,7 +462,9 @@ var urlHolders = /* @__PURE__ */ new Map();
397
462
  var published = /* @__PURE__ */ new WeakSet();
398
463
  var unloading = /* @__PURE__ */ new Map();
399
464
  var PixiV8ParticleAtlas = class {
465
+ /** The key the spritesheet is published under in `Assets.cache`. */
400
466
  _cacheKey;
467
+ /** The sheet published by the last successful `load`; cleared by `destroy`. */
401
468
  _spritesheet;
402
469
  /** URL this instance acquired through `Assets`, so it releases exactly what it took. */
403
470
  _loadedImageUrl;
@@ -407,7 +474,11 @@ var PixiV8ParticleAtlas = class {
407
474
  * publish its sheet over the winner's and leak the winner's.
408
475
  */
409
476
  _loadToken = 0;
410
- /** @param cacheKey - The key the spritesheet is registered under in `Assets.cache`; give distinct keys to atlases that coexist. */
477
+ /**
478
+ * Creates an empty atlas; nothing is published until `load`.
479
+ *
480
+ * @param cacheKey - The key the spritesheet is registered under in `Assets.cache`; give distinct keys to atlases that coexist.
481
+ */
411
482
  constructor(cacheKey = PARTICLE_ATLAS_CACHE_KEY) {
412
483
  this._cacheKey = cacheKey;
413
484
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/pixi-v8/PixiV8Renderer.ts","../../src/pixi-v8/PixiV8RendererCapabilities.ts","../../src/pixi-v8/PixiV8RenderNode.ts","../../src/pixi-v8/PixiV8ParticleGroup.ts","../../src/pixi-v8/PixiV8TickerAdapter.ts","../../src/pixi-v8/textureLoader.ts","../../src/pixi-v8/Perseon.ts","../../src/pixi-v8/createPixiApplication.ts","../../src/pixi-v8/PixiV8ParticleAtlas.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAoB,UAAU,kBAAkB;;;ACAhD;A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;AACA,cAAU,IAAI,KAAK,OAAO;AAC1B,QAAI;AACA,YAAM;AAAA,IACV,UAAE;AACE,UAAI,UAAU,IAAI,GAAG,MAAM,QAAS,WAAU,OAAO,GAAG;AAAA,IAC5D;AAAA,EACJ;AACJ;","names":["Assets"]}
1
+ {"version":3,"sources":["../../src/pixi-v8/PixiV8Renderer.ts","../../src/pixi-v8/PixiV8RendererCapabilities.ts","../../src/pixi-v8/PixiV8RenderNode.ts","../../src/pixi-v8/PixiV8ParticleGroup.ts","../../src/pixi-v8/PixiV8TickerAdapter.ts","../../src/pixi-v8/textureLoader.ts","../../src/pixi-v8/Perseon.ts","../../src/pixi-v8/createPixiApplication.ts","../../src/pixi-v8/PixiV8ParticleAtlas.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAoB,UAAU,kBAAkB;;;ACAhD;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEG;AAeP,IAAM,6BAA6D,oBAAI,IAA4B;AAAA,EAC/F;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAsBM,IAAM,yBAET;AAAA,EACA,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AACf;AAEA,IAAI,oCAAoC;AAExC,IAAM,+BAA+B,MAAM;AACvC,MAAI,kCAAmC;AAGvC,aAAW,IAAI,GAAG,OAAO,OAAO,sBAAsB,CAAC;AACvD,sCAAoC;AACxC;AASO,IAAM,6BAAN,MAAkE;AAAA;AAAA;AAAA;AAAA,EAIrE,cAAc;AACV,iCAA6B;AAAA,EACjC;AAAA,EAEO,iBAAiB,MAA2C;AAC/D,WAAO,2BAA2B,IAAI,IA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YAAM,UAAUA,QAAO,MAAM,IAAI,EAAE;AACnC,UAAI,YAAY,MAAO,WAAU,IAAI,IAAI,OAAO;AAAA,IACpD;AAEA,IAAAA,QAAO,MAAM,OAAO,KAAK,SAAS;AAClC,eAAW,CAAC,IAAI,KAAK,KAAK,UAAW,CAAAA,QAAO,MAAM,IAAI,IAAI,KAAK;AAAA,EACnE;AAAA;AAAA,EAGU,YAAY,KAAa;AAC/B,eAAW,IAAI,MAAM,WAAW,IAAI,GAAG,KAAK,KAAK,CAAC;AAAA,EACtD;AAAA;AAAA,EAGU,WAAW,KAAyB;AAC1C,QAAI,QAAQ,OAAW;AAEvB,UAAM,UAAU,WAAW,IAAI,GAAG;AAClC,QAAI,YAAY,OAAW;AAC3B,QAAI,UAAU,EAAG,YAAW,IAAI,KAAK,UAAU,CAAC;AAAA,QAC3C,YAAW,OAAO,GAAG;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAgB,YAAY,KAAwC;AAChE,QAAI,QAAQ,OAAW;AAEvB,UAAM,UAAU,WAAW,IAAI,GAAG;AAClC,QAAI,YAAY,OAAW;AAC3B,QAAI,UAAU,GAAG;AACb,iBAAW,IAAI,KAAK,UAAU,CAAC;AAC/B;AAAA,IACJ;AAEA,eAAW,OAAO,GAAG;AACrB,UAAM,WAAW,QAAQ,QAAQA,QAAO,OAAO,GAAG,CAAC;AACnD,UAAM,UAAU,SAAS;AAAA,MACrB,MAAM;AAAA,MACN,MAAM;AAAA,IACV;AACA,cAAU,IAAI,KAAK,OAAO;AAC1B,QAAI;AACA,YAAM;AAAA,IACV,UAAE;AACE,UAAI,UAAU,IAAI,GAAG,MAAM,QAAS,WAAU,OAAO,GAAG;AAAA,IAC5D;AAAA,EACJ;AACJ;","names":["Assets"]}
@@ -47,11 +47,14 @@ interface IRendererCapabilities {
47
47
 
48
48
  /** Opaque reference to a renderer-resolved texture resource. */
49
49
  interface ITextureRef {
50
+ /** Width of the texture, in the units it is drawn at (in Pixi, image pixels divided by the texture's resolution). */
50
51
  readonly width: number;
52
+ /** Height of the texture, in the same units as `width`. */
51
53
  readonly height: number;
52
54
  }
53
55
  /** Geometric containment test, used for spawn areas and regions. */
54
56
  interface IShape {
57
+ /** Whether the point (`x`, `y`) lies inside the shape, in the same coordinate space the shape is defined in. */
55
58
  contains(x: number, y: number): boolean;
56
59
  }
57
60
  /** Frame ticker abstraction (Pixi.Ticker, requestAnimationFrame, etc.). */
@@ -66,15 +69,28 @@ interface ITicker {
66
69
  * The engine writes these fields; the renderer mirrors them to its backend.
67
70
  */
68
71
  interface IParticleVisualState {
72
+ /** Horizontal position, in the local coordinates of the node the particle is drawn under. */
69
73
  x: number;
74
+ /** Vertical position, in the same coordinates as `x`. */
70
75
  y: number;
76
+ /** Horizontal scale factor: 1 draws the texture at its own width. */
71
77
  scaleX: number;
78
+ /** Vertical scale factor: 1 draws the texture at its own height. */
72
79
  scaleY: number;
80
+ /** Rotation, in radians, around the anchor. */
73
81
  rotation: number;
82
+ /** Opacity, from 0 (invisible) to 1 (opaque). */
74
83
  alpha: number;
84
+ /** Color multiplied over the texture, as a `0xRRGGBB` number; `0xffffff` leaves it as it is. */
75
85
  tint: number;
86
+ /** Horizontal anchor as a fraction of the texture's width; 0.5 is the center. */
76
87
  anchorX: number;
88
+ /** Vertical anchor as a fraction of the texture's height; 0.5 is the center. */
77
89
  anchorY: number;
90
+ /**
91
+ * The texture to draw, as returned by `IRenderer.resolveTexture`. With the Pixi
92
+ * adapters, every particle of one layer must use frames of the same image.
93
+ */
78
94
  texture: ITextureRef;
79
95
  /**
80
96
  * Opaque backend slot. A render adapter may stash the object mirroring this
@@ -86,10 +102,13 @@ interface IParticleVisualState {
86
102
  */
87
103
  renderHandle?: unknown;
88
104
  }
105
+ /** What a node needs to know to create a particle group: which per-particle properties change at runtime and how the group is composited. */
89
106
  interface IParticleGroupOptions {
107
+ /** Which per-particle properties change at runtime. A backend can use it to keep the ones declared `false` in static buffers, so a particle's value for them should not be expected to update after it is added. */
90
108
  dynamicProperties: {
91
- /** Position/scale/anchor change at runtime. */
109
+ /** Scale, anchor and texture size (the corners of each particle's quad) change at runtime. Position is updated every frame regardless. */
92
110
  vertex: boolean;
111
+ /** Rotation changes at runtime. */
93
112
  rotation: boolean;
94
113
  /** tint/alpha change at runtime. */
95
114
  color: boolean;
@@ -143,8 +162,11 @@ interface IParticleGroup {
143
162
  * `setGroupIndex` re-sequences them in place, without recreating any container.
144
163
  */
145
164
  interface IRenderNode {
165
+ /** Whether the node and everything under it is drawn. A hidden node keeps its groups and particles. */
146
166
  visible: boolean;
167
+ /** Horizontal offset of the node in its parent's local coordinates; it moves everything under the node. */
147
168
  x: number;
169
+ /** Vertical offset of the node in its parent's local coordinates; it moves everything under the node. */
148
170
  y: number;
149
171
  /** One group per Particle Layer of the emitter that owns this node. */
150
172
  createParticleGroup(options: IParticleGroupOptions): IParticleGroup;
@@ -208,6 +230,11 @@ interface IRenderer<TParent = unknown> {
208
230
  readonly capabilities?: IRendererCapabilities;
209
231
  /** Creates one detached root node per playback, for the host to mount. */
210
232
  createRootNode(): IRenderRootNode<TParent>;
233
+ /**
234
+ * Turns a texture source from an animation's configuration into a texture
235
+ * reference, memoizing the result per source until `clearTextureCache`. The
236
+ * Pixi adapters answer an unknown source with an empty texture.
237
+ */
211
238
  resolveTexture(source: unknown): ITextureRef;
212
239
  /**
213
240
  * Forget every memoized texture lookup, so the next `resolveTexture` asks the
@@ -221,7 +248,7 @@ interface IRenderer<TParent = unknown> {
221
248
  * the animations that use those ids are rebuilt.
222
249
  */
223
250
  clearTextureCache(): void;
224
- /** Releases the renderer's own resources. Does not destroy live nodes. */
251
+ /** Destroys every root node it created that is still alive, and empties its texture cache. */
225
252
  destroy(): void;
226
253
  }
227
254
 
@@ -47,11 +47,14 @@ interface IRendererCapabilities {
47
47
 
48
48
  /** Opaque reference to a renderer-resolved texture resource. */
49
49
  interface ITextureRef {
50
+ /** Width of the texture, in the units it is drawn at (in Pixi, image pixels divided by the texture's resolution). */
50
51
  readonly width: number;
52
+ /** Height of the texture, in the same units as `width`. */
51
53
  readonly height: number;
52
54
  }
53
55
  /** Geometric containment test, used for spawn areas and regions. */
54
56
  interface IShape {
57
+ /** Whether the point (`x`, `y`) lies inside the shape, in the same coordinate space the shape is defined in. */
55
58
  contains(x: number, y: number): boolean;
56
59
  }
57
60
  /** Frame ticker abstraction (Pixi.Ticker, requestAnimationFrame, etc.). */
@@ -66,15 +69,28 @@ interface ITicker {
66
69
  * The engine writes these fields; the renderer mirrors them to its backend.
67
70
  */
68
71
  interface IParticleVisualState {
72
+ /** Horizontal position, in the local coordinates of the node the particle is drawn under. */
69
73
  x: number;
74
+ /** Vertical position, in the same coordinates as `x`. */
70
75
  y: number;
76
+ /** Horizontal scale factor: 1 draws the texture at its own width. */
71
77
  scaleX: number;
78
+ /** Vertical scale factor: 1 draws the texture at its own height. */
72
79
  scaleY: number;
80
+ /** Rotation, in radians, around the anchor. */
73
81
  rotation: number;
82
+ /** Opacity, from 0 (invisible) to 1 (opaque). */
74
83
  alpha: number;
84
+ /** Color multiplied over the texture, as a `0xRRGGBB` number; `0xffffff` leaves it as it is. */
75
85
  tint: number;
86
+ /** Horizontal anchor as a fraction of the texture's width; 0.5 is the center. */
76
87
  anchorX: number;
88
+ /** Vertical anchor as a fraction of the texture's height; 0.5 is the center. */
77
89
  anchorY: number;
90
+ /**
91
+ * The texture to draw, as returned by `IRenderer.resolveTexture`. With the Pixi
92
+ * adapters, every particle of one layer must use frames of the same image.
93
+ */
78
94
  texture: ITextureRef;
79
95
  /**
80
96
  * Opaque backend slot. A render adapter may stash the object mirroring this
@@ -86,10 +102,13 @@ interface IParticleVisualState {
86
102
  */
87
103
  renderHandle?: unknown;
88
104
  }
105
+ /** What a node needs to know to create a particle group: which per-particle properties change at runtime and how the group is composited. */
89
106
  interface IParticleGroupOptions {
107
+ /** Which per-particle properties change at runtime. A backend can use it to keep the ones declared `false` in static buffers, so a particle's value for them should not be expected to update after it is added. */
90
108
  dynamicProperties: {
91
- /** Position/scale/anchor change at runtime. */
109
+ /** Scale, anchor and texture size (the corners of each particle's quad) change at runtime. Position is updated every frame regardless. */
92
110
  vertex: boolean;
111
+ /** Rotation changes at runtime. */
93
112
  rotation: boolean;
94
113
  /** tint/alpha change at runtime. */
95
114
  color: boolean;
@@ -143,8 +162,11 @@ interface IParticleGroup {
143
162
  * `setGroupIndex` re-sequences them in place, without recreating any container.
144
163
  */
145
164
  interface IRenderNode {
165
+ /** Whether the node and everything under it is drawn. A hidden node keeps its groups and particles. */
146
166
  visible: boolean;
167
+ /** Horizontal offset of the node in its parent's local coordinates; it moves everything under the node. */
147
168
  x: number;
169
+ /** Vertical offset of the node in its parent's local coordinates; it moves everything under the node. */
148
170
  y: number;
149
171
  /** One group per Particle Layer of the emitter that owns this node. */
150
172
  createParticleGroup(options: IParticleGroupOptions): IParticleGroup;
@@ -208,6 +230,11 @@ interface IRenderer<TParent = unknown> {
208
230
  readonly capabilities?: IRendererCapabilities;
209
231
  /** Creates one detached root node per playback, for the host to mount. */
210
232
  createRootNode(): IRenderRootNode<TParent>;
233
+ /**
234
+ * Turns a texture source from an animation's configuration into a texture
235
+ * reference, memoizing the result per source until `clearTextureCache`. The
236
+ * Pixi adapters answer an unknown source with an empty texture.
237
+ */
211
238
  resolveTexture(source: unknown): ITextureRef;
212
239
  /**
213
240
  * Forget every memoized texture lookup, so the next `resolveTexture` asks the
@@ -221,7 +248,7 @@ interface IRenderer<TParent = unknown> {
221
248
  * the animations that use those ids are rebuilt.
222
249
  */
223
250
  clearTextureCache(): void;
224
- /** Releases the renderer's own resources. Does not destroy live nodes. */
251
+ /** Destroys every root node it created that is still alive, and empties its texture cache. */
225
252
  destroy(): void;
226
253
  }
227
254
 
@@ -1,13 +1,26 @@
1
+ /*!
2
+ * @silentstatestudio/perseon v0.1.1
3
+ * Required Notice: Copyright 2026 Jesús Pérez de Miguel, trading as Silent State Studio (https://perseon.dev)
4
+ * PolyForm Perimeter License 1.0.1 <https://polyformproject.org/licenses/perimeter/1.0.1>
5
+ */
1
6
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class; var _class2; var _class3; var _class4;// src/core/testing/FakeParticleGroup.ts
2
7
  var FakeParticleGroup = (_class = class {
8
+ /** The options the group was created with. */
3
9
 
10
+ /** The particles currently held, in the order `addParticle` placed them (index 0 would be drawn first). */
4
11
  __init() {this.particles = []}
12
+ /** How many times `addParticle` has been called. */
5
13
  __init2() {this.addCalls = 0}
14
+ /** How many times `removeParticle` has been called, whether or not the particle was held. */
6
15
  __init3() {this.removeCalls = 0}
16
+ /** How many times `removeAll` has been called. */
7
17
  __init4() {this.removeAllCalls = 0}
18
+ /** How many times `syncFrame` has been called. */
8
19
  __init5() {this.syncFrameCalls = 0}
20
+ /** Whether `destroy` has been called. */
9
21
  __init6() {this.destroyed = false}
10
22
  __init7() {this.visible = true}
23
+ /** Creates an empty, visible group that records `options`. */
11
24
  constructor(options) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);
12
25
  this.options = options;
13
26
  }
@@ -41,19 +54,24 @@ var FakeRenderNode = (_class2 = class _FakeRenderNode {
41
54
  __init8() {this.visible = true}
42
55
  __init9() {this.x = 0}
43
56
  __init10() {this.y = 0}
57
+ /** The groups this node created and still holds, in z-order. After `destroy` they stay listed, destroyed, for inspection. */
44
58
  __init11() {this.groups = []}
59
+ /** Whether `destroy` has been called. */
45
60
  __init12() {this.destroyed = false}
61
+ /** Called once, at the end of `destroy`, so the owner can stop tracking this node. */
46
62
 
47
63
  /** The same flag as `destroyed`, under the name of `IRenderRootNode`. */
48
64
  get hostDestroyed() {
49
65
  return this.destroyed;
50
66
  }
67
+ /** Creates a detached, visible node at (0, 0). `release` is called when the node is destroyed. */
51
68
  constructor(release = () => {
52
69
  }) {;_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_class2.prototype.__init14.call(this);
53
70
  this._release = release;
54
71
  }
55
72
  /** Whatever a test mounted this under, or `undefined` while detached. */
56
73
  __init13() {this.parent = void 0}
74
+ /** The child nodes created through `createChildNode` and not yet destroyed. */
57
75
  __init14() {this.children = []}
58
76
  mount(parent) {
59
77
  this.parent = parent;
@@ -97,6 +115,7 @@ var FakeRenderNode = (_class2 = class _FakeRenderNode {
97
115
 
98
116
  // src/core/testing/FakeTicker.ts
99
117
  var FakeTicker = (_class3 = class {constructor() { _class3.prototype.__init15.call(this); }
118
+ /** The callbacks currently registered, in the order they were added. */
100
119
  __init15() {this.callbacks = []}
101
120
  add(callback) {
102
121
  this.callbacks.push(callback);
@@ -113,8 +132,11 @@ var FakeTicker = (_class3 = class {constructor() { _class3.prototype.__init15.ca
113
132
  // src/core/testing/FakeRenderer.ts
114
133
  var FakeRenderer = (_class4 = class {constructor() { _class4.prototype.__init16.call(this);_class4.prototype.__init17.call(this);_class4.prototype.__init18.call(this);_class4.prototype.__init19.call(this); }
115
134
  __init16() {this.ticker = new FakeTicker()}
135
+ /** The root nodes created through `createRootNode` that have not been destroyed. */
116
136
  __init17() {this.nodes = []}
137
+ /** The texture references handed out so far, by source, until `clearTextureCache` or `destroy`. */
117
138
  __init18() {this.textureCache = /* @__PURE__ */ new Map()}
139
+ /** Whether `destroy` has been called. */
118
140
  __init19() {this.destroyed = false}
119
141
  /** Every emitter node, across every playback root. */
120
142
  get emitterNodes() {
@@ -134,6 +156,7 @@ var FakeRenderer = (_class4 = class {constructor() { _class4.prototype.__init16.
134
156
  const index = this.nodes.indexOf(node);
135
157
  if (index >= 0) this.nodes.splice(index, 1);
136
158
  }
159
+ /** Returns a 1x1 texture reference for any source, the same one each time for the same source. */
137
160
  resolveTexture(source) {
138
161
  const cached = this.textureCache.get(source);
139
162
  if (cached) return cached;
@@ -1,18 +1,26 @@
1
- import { I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, c as IRenderRootNode, d as IRenderNode, e as ITicker, f as IRenderer, g as ITextureRef } from '../rendering-DeUo1BsK.cjs';
1
+ import { I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, c as IRenderRootNode, d as IRenderNode, e as ITicker, f as IRenderer, g as ITextureRef } from '../rendering-dYQXmGTV.cjs';
2
2
 
3
3
  /**
4
4
  * In-memory IParticleGroup for tests. Counts every call the engine makes so
5
5
  * assertions can cover grouped particle count, `syncFrame` invocations, etc.
6
6
  */
7
7
  declare class FakeParticleGroup implements IParticleGroup {
8
+ /** The options the group was created with. */
8
9
  options: IParticleGroupOptions;
10
+ /** The particles currently held, in the order `addParticle` placed them (index 0 would be drawn first). */
9
11
  particles: IParticleVisualState[];
12
+ /** How many times `addParticle` has been called. */
10
13
  addCalls: number;
14
+ /** How many times `removeParticle` has been called, whether or not the particle was held. */
11
15
  removeCalls: number;
16
+ /** How many times `removeAll` has been called. */
12
17
  removeAllCalls: number;
18
+ /** How many times `syncFrame` has been called. */
13
19
  syncFrameCalls: number;
20
+ /** Whether `destroy` has been called. */
14
21
  destroyed: boolean;
15
22
  visible: boolean;
23
+ /** Creates an empty, visible group that records `options`. */
16
24
  constructor(options: IParticleGroupOptions);
17
25
  get size(): number;
18
26
  addParticle(particle: IParticleVisualState, index: number): void;
@@ -31,14 +39,19 @@ declare class FakeRenderNode implements IRenderRootNode {
31
39
  visible: boolean;
32
40
  x: number;
33
41
  y: number;
42
+ /** The groups this node created and still holds, in z-order. After `destroy` they stay listed, destroyed, for inspection. */
34
43
  groups: FakeParticleGroup[];
44
+ /** Whether `destroy` has been called. */
35
45
  destroyed: boolean;
46
+ /** Called once, at the end of `destroy`, so the owner can stop tracking this node. */
36
47
  protected _release: (node: FakeRenderNode) => void;
37
48
  /** The same flag as `destroyed`, under the name of `IRenderRootNode`. */
38
49
  get hostDestroyed(): boolean;
50
+ /** Creates a detached, visible node at (0, 0). `release` is called when the node is destroyed. */
39
51
  constructor(release?: (node: FakeRenderNode) => void);
40
52
  /** Whatever a test mounted this under, or `undefined` while detached. */
41
53
  parent: unknown;
54
+ /** The child nodes created through `createChildNode` and not yet destroyed. */
42
55
  children: FakeRenderNode[];
43
56
  mount(parent: unknown): void;
44
57
  unmount(): void;
@@ -54,6 +67,7 @@ declare class FakeRenderNode implements IRenderRootNode {
54
67
  * driven by a real render loop.
55
68
  */
56
69
  declare class FakeTicker implements ITicker {
70
+ /** The callbacks currently registered, in the order they were added. */
57
71
  callbacks: Array<(deltaMS: number) => void>;
58
72
  add(callback: (deltaMS: number) => void): void;
59
73
  remove(callback: (deltaMS: number) => void): void;
@@ -67,8 +81,11 @@ declare class FakeTicker implements ITicker {
67
81
  */
68
82
  declare class FakeRenderer implements IRenderer {
69
83
  readonly ticker: FakeTicker;
84
+ /** The root nodes created through `createRootNode` that have not been destroyed. */
70
85
  nodes: FakeRenderNode[];
86
+ /** The texture references handed out so far, by source, until `clearTextureCache` or `destroy`. */
71
87
  textureCache: Map<unknown, ITextureRef>;
88
+ /** Whether `destroy` has been called. */
72
89
  destroyed: boolean;
73
90
  /** Every emitter node, across every playback root. */
74
91
  get emitterNodes(): FakeRenderNode[];
@@ -77,6 +94,7 @@ declare class FakeRenderer implements IRenderer {
77
94
  createRootNode(): IRenderRootNode;
78
95
  /** Mirrors the adapters: a destroyed node stops being a live one. */
79
96
  protected _releaseNode(node: FakeRenderNode): void;
97
+ /** Returns a 1x1 texture reference for any source, the same one each time for the same source. */
80
98
  resolveTexture(source: unknown): ITextureRef;
81
99
  clearTextureCache(): void;
82
100
  destroy(): void;