@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.
- package/CHANGELOG.md +31 -4
- package/LICENSE.md +61 -18
- package/README.md +9 -8
- package/dist/authoring/index.cjs +7 -2
- package/dist/authoring/index.d.cts +102 -4
- package/dist/authoring/index.d.ts +102 -4
- package/dist/authoring/index.js +6 -1
- package/dist/authoring/index.js.map +1 -1
- package/dist/{chunk-PT7F7TTB.cjs → chunk-443SQYAB.cjs} +216 -179
- package/dist/{chunk-ON4JV4BI.js → chunk-AVYXWDFD.js} +39 -2
- package/dist/chunk-AVYXWDFD.js.map +1 -0
- package/dist/{chunk-GDXCMDJ6.js → chunk-BEDH7OYG.js} +25 -3
- package/dist/chunk-BEDH7OYG.js.map +1 -0
- package/dist/{chunk-Q2HLLGJ7.cjs → chunk-WEQPSGPS.cjs} +23 -2
- package/dist/chunk-ZIMCQTYK.cjs +5 -0
- package/dist/chunk-ZTG42LPX.js +6 -0
- package/dist/{colors-CUEeQ78V.d.cts → colors-CCeWL9q4.d.cts} +362 -12
- package/dist/{colors-pshUJaKB.d.ts → colors-CGWrMf4V.d.ts} +362 -12
- package/dist/core/index.cjs +8 -3
- package/dist/core/index.d.cts +4 -3
- package/dist/core/index.d.ts +4 -3
- package/dist/core/index.js +8 -3
- package/dist/index.cjs +8 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -3
- package/dist/pixi-v7/index.cjs +79 -5
- package/dist/pixi-v7/index.d.cts +106 -7
- package/dist/pixi-v7/index.d.ts +106 -7
- package/dist/pixi-v7/index.js +77 -3
- package/dist/pixi-v7/index.js.map +1 -1
- package/dist/pixi-v8/index.cjs +78 -7
- package/dist/pixi-v8/index.d.cts +81 -9
- package/dist/pixi-v8/index.d.ts +81 -9
- package/dist/pixi-v8/index.js +76 -5
- package/dist/pixi-v8/index.js.map +1 -1
- package/dist/{rendering-DeUo1BsK.d.cts → rendering-dYQXmGTV.d.cts} +29 -2
- package/dist/{rendering-DeUo1BsK.d.ts → rendering-dYQXmGTV.d.ts} +29 -2
- package/dist/testing/index.cjs +23 -0
- package/dist/testing/index.d.cts +19 -1
- package/dist/testing/index.d.ts +19 -1
- package/dist/testing/index.js +24 -0
- package/dist/testing/index.js.map +1 -1
- package/package.json +145 -148
- package/dist/chunk-GDXCMDJ6.js.map +0 -1
- package/dist/chunk-ON4JV4BI.js.map +0 -1
- package/dist/chunk-SVI6WUOB.js +0 -1
- /package/dist/{chunk-SVI6WUOB.js.map → chunk-ZTG42LPX.js.map} +0 -0
package/dist/core/index.cjs
CHANGED
|
@@ -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
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-ZIMCQTYK.cjs');
|
|
2
7
|
|
|
3
8
|
|
|
@@ -10,10 +15,10 @@
|
|
|
10
15
|
|
|
11
16
|
|
|
12
17
|
|
|
13
|
-
var
|
|
18
|
+
var _chunk443SQYABcjs = require('../chunk-443SQYAB.cjs');
|
|
14
19
|
|
|
15
20
|
|
|
16
|
-
var
|
|
21
|
+
var _chunkWEQPSGPScjs = require('../chunk-WEQPSGPS.cjs');
|
|
17
22
|
|
|
18
23
|
|
|
19
24
|
|
|
@@ -26,4 +31,4 @@ var _chunkQ2HLLGJ7cjs = require('../chunk-Q2HLLGJ7.cjs');
|
|
|
26
31
|
|
|
27
32
|
|
|
28
33
|
|
|
29
|
-
exports.Emitter =
|
|
34
|
+
exports.Emitter = _chunk443SQYABcjs.EmitterView; exports.LocalDefaultHandle = _chunk443SQYABcjs.LocalDefaultHandle; exports.LocalParameterHandle = _chunk443SQYABcjs.LocalParameterHandle; exports.ParameterHandle = _chunk443SQYABcjs.ParameterHandle; exports.ParticleItem = _chunk443SQYABcjs.ParticleItem; exports.ParticleLayer = _chunk443SQYABcjs.ParticleLayerView; exports.PerseonAnimation = _chunk443SQYABcjs.PerseonAnimation; exports.PerseonConfigError = _chunkWEQPSGPScjs.PerseonConfigError; exports.PerseonIntegration = _chunk443SQYABcjs.PerseonIntegration; exports.PerseonPlayback = _chunk443SQYABcjs.PerseonPlayback; exports.parseAnimationOptions = _chunk443SQYABcjs.parseAnimationOptions;
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as
|
|
3
|
-
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from '../rendering-
|
|
1
|
+
import { a1 as ParticleAnimationOptions } from '../colors-CCeWL9q4.cjs';
|
|
2
|
+
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as ExternalForcesOptions, z as ExternalForcesTypes, G as GlobalParameterOption, I as InitialStateOptions, K as KineticsOptions, L as LayerOptionPath, B as LayerOptionType, F as LocalDefaultHandle, H as LocalParameterHandle, M as ModifierBlendMode, J as ModulatableNumber, N as ModulatedValue, O as ModulatorOptions, Q as ModulatorShape, R as NumberOptions, S as NumericDomain, T as OptionNodeKind, U as OptionStage, V as OptionStrategy, W as ParameterDescription, X as ParameterHandle, Y as ParameterInitOptions, Z as ParameterLinkRelation, _ as ParameterModifier, $ as ParameterModifierSource, a0 as ParameterUpdateOptions, a2 as ParticleEventBinding, a3 as ParticleEventBindings, a4 as ParticleEventTrigger, a5 as ParticleEventsByTrigger, a6 as ParticleHookEmitter, a7 as ParticleHookPlayback, a8 as ParticleHookRandom, a9 as ParticleItem, aa as ParticleLayer, ab as ParticleLayerOptions, ac as ParticleLimitStrategy, ad as ParticleRegionRef, ae as ParticleSnapshot, af as ParticleSnapshotObject, ag as ParticleSpawnStrategy, ah as ParticleSpriteAnimationParameters, ai as PerformanceOptions, aj as PerseonAnimation, ak as PerseonEvent, P as PerseonIntegration, al as PerseonPlayback, am as PlaybackFinishedReason, an as PlaybackFinishedResult, ao as PlaybackHost, ap as PlaybackOptionPath, aq as PlaybackOptionType, ar as PlaybackOptions, as as PointForceConfig, at as PointForceFalloff, au as PointForceMode, av as PointValue, aw as PolygonArea, ax as ProbabilityCurveKind, ay as ProbabilityCurvePreset, az as ProbabilityCurvePresetId, aA as RandomListState, aB as RandomValueList, aC as RandomValueListMode, aD as RandomValueRange, aE as RandomnessOptions, aF as RandomnessSeedMode, aG as RectangleArea, aH as RegionBehavior, aI as RegionOptions, aJ as RingArea, aK as ScaleOptions, aL as ShapeArea, aM as SingleTextureOption, aN as SpawnColor, aO as SpawnNumber, aP as SpawnPoint, aQ as SpawnPosition, aR as SpawnVector, aS as SpriteAnimationOptions, aT as SpriteAnimationTexturesOptions, aU as TextDomain, aV as TextureElement, aW as Unsubscribe, aX as ValueProbability, aY as VectorValue } from '../colors-CCeWL9q4.cjs';
|
|
3
|
+
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from '../rendering-dYQXmGTV.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Turn the contents of an animation file into a typed `ParticleAnimationOptions`.
|
|
@@ -33,6 +33,7 @@ declare const parseAnimationOptions: (input: unknown) => ParticleAnimationOption
|
|
|
33
33
|
declare class PerseonConfigError extends Error {
|
|
34
34
|
/** Where the config failed: the node, or the field inside it. */
|
|
35
35
|
readonly path: string;
|
|
36
|
+
/** Creates the error. `message` says what is wrong, `path` where, and `options` is the standard `ErrorOptions` (for instance a `cause`). */
|
|
36
37
|
constructor(message: string, path: string, options?: ErrorOptions);
|
|
37
38
|
}
|
|
38
39
|
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as
|
|
3
|
-
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from '../rendering-
|
|
1
|
+
import { a1 as ParticleAnimationOptions } from '../colors-CGWrMf4V.js';
|
|
2
|
+
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as ExternalForcesOptions, z as ExternalForcesTypes, G as GlobalParameterOption, I as InitialStateOptions, K as KineticsOptions, L as LayerOptionPath, B as LayerOptionType, F as LocalDefaultHandle, H as LocalParameterHandle, M as ModifierBlendMode, J as ModulatableNumber, N as ModulatedValue, O as ModulatorOptions, Q as ModulatorShape, R as NumberOptions, S as NumericDomain, T as OptionNodeKind, U as OptionStage, V as OptionStrategy, W as ParameterDescription, X as ParameterHandle, Y as ParameterInitOptions, Z as ParameterLinkRelation, _ as ParameterModifier, $ as ParameterModifierSource, a0 as ParameterUpdateOptions, a2 as ParticleEventBinding, a3 as ParticleEventBindings, a4 as ParticleEventTrigger, a5 as ParticleEventsByTrigger, a6 as ParticleHookEmitter, a7 as ParticleHookPlayback, a8 as ParticleHookRandom, a9 as ParticleItem, aa as ParticleLayer, ab as ParticleLayerOptions, ac as ParticleLimitStrategy, ad as ParticleRegionRef, ae as ParticleSnapshot, af as ParticleSnapshotObject, ag as ParticleSpawnStrategy, ah as ParticleSpriteAnimationParameters, ai as PerformanceOptions, aj as PerseonAnimation, ak as PerseonEvent, P as PerseonIntegration, al as PerseonPlayback, am as PlaybackFinishedReason, an as PlaybackFinishedResult, ao as PlaybackHost, ap as PlaybackOptionPath, aq as PlaybackOptionType, ar as PlaybackOptions, as as PointForceConfig, at as PointForceFalloff, au as PointForceMode, av as PointValue, aw as PolygonArea, ax as ProbabilityCurveKind, ay as ProbabilityCurvePreset, az as ProbabilityCurvePresetId, aA as RandomListState, aB as RandomValueList, aC as RandomValueListMode, aD as RandomValueRange, aE as RandomnessOptions, aF as RandomnessSeedMode, aG as RectangleArea, aH as RegionBehavior, aI as RegionOptions, aJ as RingArea, aK as ScaleOptions, aL as ShapeArea, aM as SingleTextureOption, aN as SpawnColor, aO as SpawnNumber, aP as SpawnPoint, aQ as SpawnPosition, aR as SpawnVector, aS as SpriteAnimationOptions, aT as SpriteAnimationTexturesOptions, aU as TextDomain, aV as TextureElement, aW as Unsubscribe, aX as ValueProbability, aY as VectorValue } from '../colors-CGWrMf4V.js';
|
|
3
|
+
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from '../rendering-dYQXmGTV.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Turn the contents of an animation file into a typed `ParticleAnimationOptions`.
|
|
@@ -33,6 +33,7 @@ declare const parseAnimationOptions: (input: unknown) => ParticleAnimationOption
|
|
|
33
33
|
declare class PerseonConfigError extends Error {
|
|
34
34
|
/** Where the config failed: the node, or the field inside it. */
|
|
35
35
|
readonly path: string;
|
|
36
|
+
/** Creates the error. `message` says what is wrong, `path` where, and `options` is the standard `ErrorOptions` (for instance a `cause`). */
|
|
36
37
|
constructor(message: string, path: string, options?: ErrorOptions);
|
|
37
38
|
}
|
|
38
39
|
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
6
|
+
import "../chunk-ZTG42LPX.js";
|
|
2
7
|
import {
|
|
3
8
|
EmitterView,
|
|
4
9
|
LocalDefaultHandle,
|
|
@@ -10,10 +15,10 @@ import {
|
|
|
10
15
|
PerseonIntegration,
|
|
11
16
|
PerseonPlayback,
|
|
12
17
|
parseAnimationOptions
|
|
13
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-AVYXWDFD.js";
|
|
14
19
|
import {
|
|
15
20
|
PerseonConfigError
|
|
16
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-BEDH7OYG.js";
|
|
17
22
|
export {
|
|
18
23
|
EmitterView as Emitter,
|
|
19
24
|
LocalDefaultHandle,
|
package/dist/index.cjs
CHANGED
|
@@ -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
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-ZIMCQTYK.cjs');
|
|
2
7
|
|
|
3
8
|
|
|
@@ -10,10 +15,10 @@
|
|
|
10
15
|
|
|
11
16
|
|
|
12
17
|
|
|
13
|
-
var
|
|
18
|
+
var _chunk443SQYABcjs = require('./chunk-443SQYAB.cjs');
|
|
14
19
|
|
|
15
20
|
|
|
16
|
-
var
|
|
21
|
+
var _chunkWEQPSGPScjs = require('./chunk-WEQPSGPS.cjs');
|
|
17
22
|
|
|
18
23
|
|
|
19
24
|
|
|
@@ -26,4 +31,4 @@ var _chunkQ2HLLGJ7cjs = require('./chunk-Q2HLLGJ7.cjs');
|
|
|
26
31
|
|
|
27
32
|
|
|
28
33
|
|
|
29
|
-
exports.Emitter =
|
|
34
|
+
exports.Emitter = _chunk443SQYABcjs.EmitterView; exports.LocalDefaultHandle = _chunk443SQYABcjs.LocalDefaultHandle; exports.LocalParameterHandle = _chunk443SQYABcjs.LocalParameterHandle; exports.ParameterHandle = _chunk443SQYABcjs.ParameterHandle; exports.ParticleItem = _chunk443SQYABcjs.ParticleItem; exports.ParticleLayer = _chunk443SQYABcjs.ParticleLayerView; exports.PerseonAnimation = _chunk443SQYABcjs.PerseonAnimation; exports.PerseonConfigError = _chunkWEQPSGPScjs.PerseonConfigError; exports.PerseonIntegration = _chunk443SQYABcjs.PerseonIntegration; exports.PerseonPlayback = _chunk443SQYABcjs.PerseonPlayback; exports.parseAnimationOptions = _chunk443SQYABcjs.parseAnimationOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as
|
|
2
|
-
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from './rendering-
|
|
1
|
+
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as ExternalForcesOptions, z as ExternalForcesTypes, G as GlobalParameterOption, I as InitialStateOptions, K as KineticsOptions, L as LayerOptionPath, B as LayerOptionType, F as LocalDefaultHandle, H as LocalParameterHandle, M as ModifierBlendMode, J as ModulatableNumber, N as ModulatedValue, O as ModulatorOptions, Q as ModulatorShape, R as NumberOptions, S as NumericDomain, T as OptionNodeKind, U as OptionStage, V as OptionStrategy, W as ParameterDescription, X as ParameterHandle, Y as ParameterInitOptions, Z as ParameterLinkRelation, _ as ParameterModifier, $ as ParameterModifierSource, a0 as ParameterUpdateOptions, a1 as ParticleAnimationOptions, a2 as ParticleEventBinding, a3 as ParticleEventBindings, a4 as ParticleEventTrigger, a5 as ParticleEventsByTrigger, a6 as ParticleHookEmitter, a7 as ParticleHookPlayback, a8 as ParticleHookRandom, a9 as ParticleItem, aa as ParticleLayer, ab as ParticleLayerOptions, ac as ParticleLimitStrategy, ad as ParticleRegionRef, ae as ParticleSnapshot, af as ParticleSnapshotObject, ag as ParticleSpawnStrategy, ah as ParticleSpriteAnimationParameters, ai as PerformanceOptions, aj as PerseonAnimation, ak as PerseonEvent, P as PerseonIntegration, al as PerseonPlayback, am as PlaybackFinishedReason, an as PlaybackFinishedResult, ao as PlaybackHost, ap as PlaybackOptionPath, aq as PlaybackOptionType, ar as PlaybackOptions, as as PointForceConfig, at as PointForceFalloff, au as PointForceMode, av as PointValue, aw as PolygonArea, ax as ProbabilityCurveKind, ay as ProbabilityCurvePreset, az as ProbabilityCurvePresetId, aA as RandomListState, aB as RandomValueList, aC as RandomValueListMode, aD as RandomValueRange, aE as RandomnessOptions, aF as RandomnessSeedMode, aG as RectangleArea, aH as RegionBehavior, aI as RegionOptions, aJ as RingArea, aK as ScaleOptions, aL as ShapeArea, aM as SingleTextureOption, aN as SpawnColor, aO as SpawnNumber, aP as SpawnPoint, aQ as SpawnPosition, aR as SpawnVector, aS as SpriteAnimationOptions, aT as SpriteAnimationTexturesOptions, aU as TextDomain, aV as TextureElement, aW as Unsubscribe, aX as ValueProbability, aY as VectorValue } from './colors-CCeWL9q4.cjs';
|
|
2
|
+
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from './rendering-dYQXmGTV.cjs';
|
|
3
3
|
export { PerseonConfigError, parseAnimationOptions } from './core/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as
|
|
2
|
-
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from './rendering-
|
|
1
|
+
export { A as AnimationDescription, a as AnimationPlayOptions, b as AnimationRandomnessOptions, C as CapacityOptions, c as CapsuleArea, d as CircleArea, e as ColorGradientDefinition, f as ColorOptions, g as ColorRandomRange, h as ColorStop, i as CurveDefinition, j as CustomParameterOption, k as CustomParameterSampleScope, l as CustomParameterType, m as CustomParameterValue, D as DiagnosticsPolicy, E as EmissionOptions, n as EmissionTransform, o as Emitter, p as EmitterEventBinding, q as EmitterEventBindings, r as EmitterEventTrigger, s as EmitterEventsByTrigger, t as EmitterOptionPath, u as EmitterOptionType, v as EmitterOptions, w as EventTrigger, x as ExternalForcesFactorOptions, y as ExternalForcesOptions, z as ExternalForcesTypes, G as GlobalParameterOption, I as InitialStateOptions, K as KineticsOptions, L as LayerOptionPath, B as LayerOptionType, F as LocalDefaultHandle, H as LocalParameterHandle, M as ModifierBlendMode, J as ModulatableNumber, N as ModulatedValue, O as ModulatorOptions, Q as ModulatorShape, R as NumberOptions, S as NumericDomain, T as OptionNodeKind, U as OptionStage, V as OptionStrategy, W as ParameterDescription, X as ParameterHandle, Y as ParameterInitOptions, Z as ParameterLinkRelation, _ as ParameterModifier, $ as ParameterModifierSource, a0 as ParameterUpdateOptions, a1 as ParticleAnimationOptions, a2 as ParticleEventBinding, a3 as ParticleEventBindings, a4 as ParticleEventTrigger, a5 as ParticleEventsByTrigger, a6 as ParticleHookEmitter, a7 as ParticleHookPlayback, a8 as ParticleHookRandom, a9 as ParticleItem, aa as ParticleLayer, ab as ParticleLayerOptions, ac as ParticleLimitStrategy, ad as ParticleRegionRef, ae as ParticleSnapshot, af as ParticleSnapshotObject, ag as ParticleSpawnStrategy, ah as ParticleSpriteAnimationParameters, ai as PerformanceOptions, aj as PerseonAnimation, ak as PerseonEvent, P as PerseonIntegration, al as PerseonPlayback, am as PlaybackFinishedReason, an as PlaybackFinishedResult, ao as PlaybackHost, ap as PlaybackOptionPath, aq as PlaybackOptionType, ar as PlaybackOptions, as as PointForceConfig, at as PointForceFalloff, au as PointForceMode, av as PointValue, aw as PolygonArea, ax as ProbabilityCurveKind, ay as ProbabilityCurvePreset, az as ProbabilityCurvePresetId, aA as RandomListState, aB as RandomValueList, aC as RandomValueListMode, aD as RandomValueRange, aE as RandomnessOptions, aF as RandomnessSeedMode, aG as RectangleArea, aH as RegionBehavior, aI as RegionOptions, aJ as RingArea, aK as ScaleOptions, aL as ShapeArea, aM as SingleTextureOption, aN as SpawnColor, aO as SpawnNumber, aP as SpawnPoint, aQ as SpawnPosition, aR as SpawnVector, aS as SpriteAnimationOptions, aT as SpriteAnimationTexturesOptions, aU as TextDomain, aV as TextureElement, aW as Unsubscribe, aX as ValueProbability, aY as VectorValue } from './colors-CGWrMf4V.js';
|
|
2
|
+
export { B as BlendModeSupport, I as IParticleGroup, a as IParticleGroupOptions, b as IParticleVisualState, d as IRenderNode, c as IRenderRootNode, f as IRenderer, h as IRendererCapabilities, i as IShape, g as ITextureRef, e as ITicker, P as ParticleBlendMode } from './rendering-dYQXmGTV.js';
|
|
3
3
|
export { PerseonConfigError, parseAnimationOptions } from './core/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
6
|
+
import "./chunk-ZTG42LPX.js";
|
|
2
7
|
import {
|
|
3
8
|
EmitterView,
|
|
4
9
|
LocalDefaultHandle,
|
|
@@ -10,10 +15,10 @@ import {
|
|
|
10
15
|
PerseonIntegration,
|
|
11
16
|
PerseonPlayback,
|
|
12
17
|
parseAnimationOptions
|
|
13
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AVYXWDFD.js";
|
|
14
19
|
import {
|
|
15
20
|
PerseonConfigError
|
|
16
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BEDH7OYG.js";
|
|
17
22
|
export {
|
|
18
23
|
EmitterView as Emitter,
|
|
19
24
|
LocalDefaultHandle,
|
package/dist/pixi-v7/index.cjs
CHANGED
|
@@ -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
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5;
|
|
2
7
|
|
|
3
8
|
|
|
@@ -9,10 +14,10 @@
|
|
|
9
14
|
|
|
10
15
|
|
|
11
16
|
|
|
12
|
-
var
|
|
17
|
+
var _chunk443SQYABcjs = require('../chunk-443SQYAB.cjs');
|
|
13
18
|
|
|
14
19
|
|
|
15
|
-
var
|
|
20
|
+
var _chunkWEQPSGPScjs = require('../chunk-WEQPSGPS.cjs');
|
|
16
21
|
|
|
17
22
|
// src/pixi-v7/PixiV7Renderer.ts
|
|
18
23
|
var _pixijs = require('pixi.js');
|
|
@@ -53,7 +58,11 @@ var PIXI_V7_BLEND_MODES = {
|
|
|
53
58
|
exclusion: 12
|
|
54
59
|
};
|
|
55
60
|
var PixiV7ParticleGroup = (_class = class {
|
|
61
|
+
/**
|
|
62
|
+
* The Pixi `ParticleContainer` that draws this layer's sprites. The render node that created the group adds it to its own container; `destroy` destroys it.
|
|
63
|
+
*/
|
|
56
64
|
|
|
65
|
+
/** Pairs each engine particle with the `Sprite` that mirrors it inside the container. */
|
|
57
66
|
__init() {this._mirror = /* @__PURE__ */ new Map()}
|
|
58
67
|
get size() {
|
|
59
68
|
return this._mirror.size;
|
|
@@ -65,6 +74,11 @@ var PixiV7ParticleGroup = (_class = class {
|
|
|
65
74
|
set visible(value) {
|
|
66
75
|
this.container.visible = value;
|
|
67
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates an auto-resizing `ParticleContainer`. Only the properties that `options.dynamicProperties` marks as changing (plus position, always) are re-uploaded each frame, and `options.blendMode` (`normal` when omitted) becomes the container's numeric blend mode. Modes v7 cannot blend on WebGL draw as `normal`; `PixiV7RendererCapabilities` reports them as `unsupported`.
|
|
79
|
+
*
|
|
80
|
+
* @param options - The layer's dynamic properties and blend mode.
|
|
81
|
+
*/
|
|
68
82
|
constructor(options) {;_class.prototype.__init.call(this);
|
|
69
83
|
const ContainerCtor = _pixijs.ParticleContainer;
|
|
70
84
|
this.container = new ContainerCtor(
|
|
@@ -105,6 +119,7 @@ var PixiV7ParticleGroup = (_class = class {
|
|
|
105
119
|
this.container.destroy();
|
|
106
120
|
this._mirror.clear();
|
|
107
121
|
}
|
|
122
|
+
/** Copies the engine particle's position, scale, rotation, anchor, alpha, tint and texture onto its `Sprite`. */
|
|
108
123
|
_writeState(p, sprite) {
|
|
109
124
|
sprite.position.set(p.x, p.y);
|
|
110
125
|
sprite.scale.set(p.scaleX, p.scaleY);
|
|
@@ -120,30 +135,46 @@ var PixiV7ParticleGroup = (_class = class {
|
|
|
120
135
|
|
|
121
136
|
// src/pixi-v7/PixiV7RenderNode.ts
|
|
122
137
|
var PixiV7RenderNode = (_class2 = class _PixiV7RenderNode {
|
|
138
|
+
/**
|
|
139
|
+
* The Pixi `Container` this node wraps. It is created with the node and destroyed when the node is destroyed.
|
|
140
|
+
*/
|
|
123
141
|
__init2() {this.container = new (0, _pixijs.Container)()}
|
|
142
|
+
/** The particle groups created through this node and not yet removed with `destroyParticleGroup`. They are destroyed with it. */
|
|
124
143
|
__init3() {this._groups = []}
|
|
125
144
|
/** Child nodes (an emitter's, when this is a playback root). */
|
|
126
145
|
__init4() {this._children = []}
|
|
146
|
+
/**
|
|
147
|
+
* Callback run once, from `destroy`, so whoever created this node (the renderer for a root, the parent node for a child) stops tracking it.
|
|
148
|
+
*/
|
|
127
149
|
|
|
150
|
+
/** Set by the first `destroy`, so that later calls do nothing. */
|
|
128
151
|
__init5() {this._destroyed = false}
|
|
152
|
+
/**
|
|
153
|
+
* Creates the node with an empty Pixi container.
|
|
154
|
+
*
|
|
155
|
+
* @param release - Called with this node when it is destroyed, so its creator can drop it.
|
|
156
|
+
*/
|
|
129
157
|
constructor(release) {;_class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this);_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);
|
|
130
158
|
this._release = release;
|
|
131
159
|
}
|
|
132
160
|
get hostDestroyed() {
|
|
133
161
|
return this.container.destroyed;
|
|
134
162
|
}
|
|
163
|
+
/** Whether the node's container is shown. Hidden, Pixi draws neither it nor anything under it. */
|
|
135
164
|
get visible() {
|
|
136
165
|
return this.container.visible;
|
|
137
166
|
}
|
|
138
167
|
set visible(value) {
|
|
139
168
|
this.container.visible = value;
|
|
140
169
|
}
|
|
170
|
+
/** Horizontal position of the node's container, in its parent's local coordinates. */
|
|
141
171
|
get x() {
|
|
142
172
|
return this.container.x;
|
|
143
173
|
}
|
|
144
174
|
set x(value) {
|
|
145
175
|
this.container.x = value;
|
|
146
176
|
}
|
|
177
|
+
/** Vertical position of the node's container, in its parent's local coordinates. */
|
|
147
178
|
get y() {
|
|
148
179
|
return this.container.y;
|
|
149
180
|
}
|
|
@@ -170,6 +201,9 @@ var PixiV7RenderNode = (_class2 = class _PixiV7RenderNode {
|
|
|
170
201
|
this._children.push(node);
|
|
171
202
|
return node;
|
|
172
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Drops a destroyed child node from this node's list. It is the release callback `createChildNode` hands to each child.
|
|
206
|
+
*/
|
|
173
207
|
_releaseChild(node) {
|
|
174
208
|
const index = this._children.indexOf(node);
|
|
175
209
|
if (index >= 0) this._children.splice(index, 1);
|
|
@@ -205,8 +239,18 @@ var PixiV7RenderNode = (_class2 = class _PixiV7RenderNode {
|
|
|
205
239
|
|
|
206
240
|
// src/pixi-v7/PixiV7TickerAdapter.ts
|
|
207
241
|
var PixiV7TickerAdapter = (_class3 = class {
|
|
242
|
+
/** The Pixi ticker being wrapped. */
|
|
208
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Pairs each function given to `add` with the wrapper registered on the Pixi ticker, so `remove` can unregister that same wrapper.
|
|
246
|
+
*/
|
|
209
247
|
__init6() {this._wrapped = /* @__PURE__ */ new Map()}
|
|
248
|
+
/**
|
|
249
|
+
* Wraps a Pixi ticker. The constructor neither starts nor stops it, but Pixi starts a ticker whose
|
|
250
|
+
* `autoStart` is set (such as `Ticker.shared`) when `add` registers the first function.
|
|
251
|
+
*
|
|
252
|
+
* @param ticker - The Pixi `Ticker` whose frames drive the functions added to this adapter.
|
|
253
|
+
*/
|
|
210
254
|
constructor(ticker) {;_class3.prototype.__init6.call(this);
|
|
211
255
|
this._ticker = ticker;
|
|
212
256
|
}
|
|
@@ -245,8 +289,19 @@ var PixiV7Renderer = (_class4 = class {
|
|
|
245
289
|
|
|
246
290
|
/** What this backend does with each blend mode — see `IRendererCapabilities`. */
|
|
247
291
|
__init7() {this.capabilities = new PixiV7RendererCapabilities()}
|
|
292
|
+
/**
|
|
293
|
+
* Textures already resolved, keyed by the `source` value given to `resolveTexture`. Emptied by `clearTextureCache` and `destroy`.
|
|
294
|
+
*/
|
|
248
295
|
__init8() {this._textureCache = /* @__PURE__ */ new Map()}
|
|
296
|
+
/**
|
|
297
|
+
* 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.
|
|
298
|
+
*/
|
|
249
299
|
__init9() {this._nodes = []}
|
|
300
|
+
/**
|
|
301
|
+
* Creates the renderer, wrapping `options.ticker` (or Pixi's shared ticker) in an adapter.
|
|
302
|
+
*
|
|
303
|
+
* @param options - Optional settings; see `PixiV7RendererOptions`.
|
|
304
|
+
*/
|
|
250
305
|
constructor(options = {}) {;_class4.prototype.__init7.call(this);_class4.prototype.__init8.call(this);_class4.prototype.__init9.call(this);
|
|
251
306
|
this.ticker = new PixiV7TickerAdapter(_nullishCoalesce(options.ticker, () => ( _pixijs.Ticker.shared)));
|
|
252
307
|
}
|
|
@@ -261,6 +316,13 @@ var PixiV7Renderer = (_class4 = class {
|
|
|
261
316
|
const index = this._nodes.indexOf(node);
|
|
262
317
|
if (index >= 0) this._nodes.splice(index, 1);
|
|
263
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* The texture a scene's `texture.source` names. The id must have been published to
|
|
321
|
+
* Pixi's `Assets.cache` beforehand (see `PixiV7ParticleAtlas`); an unknown id, or a
|
|
322
|
+
* source that is not a string, resolves to an empty texture. Answers are memoized
|
|
323
|
+
* until `clearTextureCache`, so an id resolved before it was published stays empty
|
|
324
|
+
* until then.
|
|
325
|
+
*/
|
|
264
326
|
resolveTexture(source) {
|
|
265
327
|
const cached = this._textureCache.get(source);
|
|
266
328
|
if (cached) return cached;
|
|
@@ -285,7 +347,13 @@ var isPixiTicker = (ticker) => {
|
|
|
285
347
|
const candidate = ticker;
|
|
286
348
|
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";
|
|
287
349
|
};
|
|
288
|
-
var Perseon = class extends
|
|
350
|
+
var Perseon = class extends _chunk443SQYABcjs.PerseonIntegration {
|
|
351
|
+
/**
|
|
352
|
+
* Creates the integration for PixiJS v7. A Pixi `Ticker` is wrapped by the renderer this builds; any other
|
|
353
|
+
* `ITicker` is used as the frame source as it is.
|
|
354
|
+
*
|
|
355
|
+
* @param options - Optional settings; see `PerseonOptions`.
|
|
356
|
+
*/
|
|
289
357
|
constructor(options = {}) {
|
|
290
358
|
const { ticker } = options;
|
|
291
359
|
if (ticker === void 0 || isPixiTicker(ticker)) {
|
|
@@ -304,7 +372,9 @@ var urlHolders = /* @__PURE__ */ new Map();
|
|
|
304
372
|
var published = /* @__PURE__ */ new WeakSet();
|
|
305
373
|
var unloading = /* @__PURE__ */ new Map();
|
|
306
374
|
var PixiV7ParticleAtlas = (_class5 = class {
|
|
375
|
+
/** The key the spritesheet is published under in `Assets.cache`. */
|
|
307
376
|
|
|
377
|
+
/** The sheet published by the last successful `load`; cleared by `destroy`. */
|
|
308
378
|
|
|
309
379
|
/** URL this instance acquired through `Assets`, so it releases exactly what it took. */
|
|
310
380
|
|
|
@@ -314,7 +384,11 @@ var PixiV7ParticleAtlas = (_class5 = class {
|
|
|
314
384
|
* publish its sheet over the winner's and leak the winner's.
|
|
315
385
|
*/
|
|
316
386
|
__init10() {this._loadToken = 0}
|
|
317
|
-
/**
|
|
387
|
+
/**
|
|
388
|
+
* Creates an empty atlas; nothing is published until `load`.
|
|
389
|
+
*
|
|
390
|
+
* @param cacheKey - The key the spritesheet is registered under in `Assets.cache`; give distinct keys to atlases that coexist.
|
|
391
|
+
*/
|
|
318
392
|
constructor(cacheKey = PARTICLE_ATLAS_CACHE_KEY) {;_class5.prototype.__init10.call(this);
|
|
319
393
|
this._cacheKey = cacheKey;
|
|
320
394
|
}
|
|
@@ -510,4 +584,4 @@ var PixiV7ParticleAtlas = (_class5 = class {
|
|
|
510
584
|
|
|
511
585
|
|
|
512
586
|
|
|
513
|
-
exports.Emitter =
|
|
587
|
+
exports.Emitter = _chunk443SQYABcjs.EmitterView; exports.LocalDefaultHandle = _chunk443SQYABcjs.LocalDefaultHandle; exports.LocalParameterHandle = _chunk443SQYABcjs.LocalParameterHandle; exports.PARTICLE_ATLAS_CACHE_KEY = PARTICLE_ATLAS_CACHE_KEY; exports.ParameterHandle = _chunk443SQYABcjs.ParameterHandle; exports.ParticleItem = _chunk443SQYABcjs.ParticleItem; exports.ParticleLayer = _chunk443SQYABcjs.ParticleLayerView; exports.Perseon = Perseon; exports.PerseonAnimation = _chunk443SQYABcjs.PerseonAnimation; exports.PerseonConfigError = _chunkWEQPSGPScjs.PerseonConfigError; exports.PerseonPlayback = _chunk443SQYABcjs.PerseonPlayback; exports.PixiV7ParticleAtlas = PixiV7ParticleAtlas; exports.PixiV7ParticleGroup = PixiV7ParticleGroup; exports.PixiV7RenderNode = PixiV7RenderNode; exports.PixiV7Renderer = PixiV7Renderer; exports.PixiV7RendererCapabilities = PixiV7RendererCapabilities; exports.PixiV7TickerAdapter = PixiV7TickerAdapter; exports.parseAnimationOptions = _chunk443SQYABcjs.parseAnimationOptions; exports.textureFromSource = textureFromSource;
|