@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.
Files changed (47) hide show
  1. package/CHANGELOG.md +219 -0
  2. package/LICENSE.md +73 -0
  3. package/README.md +849 -2
  4. package/dist/authoring/index.cjs +218 -0
  5. package/dist/authoring/index.d.cts +964 -0
  6. package/dist/authoring/index.d.ts +964 -0
  7. package/dist/authoring/index.js +219 -0
  8. package/dist/authoring/index.js.map +1 -0
  9. package/dist/chunk-443SQYAB.cjs +8468 -0
  10. package/dist/chunk-AVYXWDFD.js +8469 -0
  11. package/dist/chunk-AVYXWDFD.js.map +1 -0
  12. package/dist/chunk-BEDH7OYG.js +5484 -0
  13. package/dist/chunk-BEDH7OYG.js.map +1 -0
  14. package/dist/chunk-WEQPSGPS.cjs +5482 -0
  15. package/dist/chunk-ZIMCQTYK.cjs +6 -0
  16. package/dist/chunk-ZTG42LPX.js +6 -0
  17. package/dist/chunk-ZTG42LPX.js.map +1 -0
  18. package/dist/colors-CCeWL9q4.d.cts +2597 -0
  19. package/dist/colors-CGWrMf4V.d.ts +2597 -0
  20. package/dist/core/index.cjs +34 -0
  21. package/dist/core/index.d.cts +40 -0
  22. package/dist/core/index.d.ts +40 -0
  23. package/dist/core/index.js +35 -0
  24. package/dist/core/index.js.map +1 -0
  25. package/dist/index.cjs +34 -0
  26. package/dist/index.d.cts +3 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.js +35 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/pixi-v7/index.cjs +587 -0
  31. package/dist/pixi-v7/index.d.cts +471 -0
  32. package/dist/pixi-v7/index.d.ts +471 -0
  33. package/dist/pixi-v7/index.js +588 -0
  34. package/dist/pixi-v7/index.js.map +1 -0
  35. package/dist/pixi-v8/index.cjs +679 -0
  36. package/dist/pixi-v8/index.d.cts +452 -0
  37. package/dist/pixi-v8/index.d.ts +452 -0
  38. package/dist/pixi-v8/index.js +680 -0
  39. package/dist/pixi-v8/index.js.map +1 -0
  40. package/dist/rendering-dYQXmGTV.d.cts +264 -0
  41. package/dist/rendering-dYQXmGTV.d.ts +264 -0
  42. package/dist/testing/index.cjs +182 -0
  43. package/dist/testing/index.d.cts +103 -0
  44. package/dist/testing/index.d.ts +103 -0
  45. package/dist/testing/index.js +184 -0
  46. package/dist/testing/index.js.map +1 -0
  47. package/package.json +144 -5
@@ -0,0 +1,218 @@
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
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+ var _chunkWEQPSGPScjs = require('../chunk-WEQPSGPS.cjs');
46
+
47
+ // src/core/parameters/probabilityCurvePresets.ts
48
+ var DEFAULT_PROBABILITY_CURVE_PRESET_ID = "uniform";
49
+ var PROBABILITY_CURVE_PRESETS = [
50
+ {
51
+ id: "uniform",
52
+ label: "Uniform",
53
+ description: "Equal probability across the full range.",
54
+ iconKey: "line-horizontal",
55
+ curve: {
56
+ points: [
57
+ { x: 0, y: 1 },
58
+ { x: 1, y: 1 }
59
+ ],
60
+ segmentBends: [0]
61
+ }
62
+ },
63
+ {
64
+ id: "lowBias",
65
+ label: "Low Bias",
66
+ description: "Higher probability near the minimum side.",
67
+ iconKey: "slope-down",
68
+ curve: {
69
+ points: [
70
+ { x: 0, y: 1 },
71
+ { x: 1, y: 0.15 }
72
+ ],
73
+ segmentBends: [0]
74
+ }
75
+ },
76
+ {
77
+ id: "highBias",
78
+ label: "High Bias",
79
+ description: "Higher probability near the maximum side.",
80
+ iconKey: "slope-up",
81
+ curve: {
82
+ points: [
83
+ { x: 0, y: 0.15 },
84
+ { x: 1, y: 1 }
85
+ ],
86
+ segmentBends: [0]
87
+ }
88
+ },
89
+ {
90
+ id: "centerBias",
91
+ label: "Center Bias",
92
+ description: "Smooth preference for the middle of the range.",
93
+ iconKey: "peak-center",
94
+ curve: {
95
+ points: [
96
+ { x: 0, y: 0.12 },
97
+ { x: 0.5, y: 1 },
98
+ { x: 1, y: 0.12 }
99
+ ],
100
+ segmentBends: [0.25, 0.25]
101
+ }
102
+ },
103
+ {
104
+ id: "edgeBias",
105
+ label: "Edge Bias",
106
+ description: "Higher probability near both edges.",
107
+ iconKey: "peak-edges",
108
+ curve: {
109
+ points: [
110
+ { x: 0, y: 1 },
111
+ { x: 0.5, y: 0.12 },
112
+ { x: 1, y: 1 }
113
+ ],
114
+ segmentBends: [-0.25, -0.25]
115
+ }
116
+ },
117
+ {
118
+ id: "bell",
119
+ label: "Bell",
120
+ description: "Gaussian-like central bell curve.",
121
+ iconKey: "bell",
122
+ curve: {
123
+ points: [
124
+ { x: 0, y: 0.04 },
125
+ { x: 0.25, y: 0.42 },
126
+ { x: 0.5, y: 1 },
127
+ { x: 0.75, y: 0.42 },
128
+ { x: 1, y: 0.04 }
129
+ ],
130
+ segmentBends: [-0.45, 0.35, 0.35, -0.45]
131
+ }
132
+ },
133
+ {
134
+ id: "doublePeak",
135
+ label: "Double Peak",
136
+ description: "Two smooth internal probability peaks.",
137
+ iconKey: "double-peak",
138
+ curve: {
139
+ points: [
140
+ { x: 0, y: 0.12 },
141
+ { x: 0.25, y: 1 },
142
+ { x: 0.5, y: 0.18 },
143
+ { x: 0.75, y: 1 },
144
+ { x: 1, y: 0.12 }
145
+ ],
146
+ segmentBends: [0.22, 0.18, 0.18, 0.22]
147
+ }
148
+ }
149
+ ];
150
+ var PROBABILITY_CURVE_PRESET_OPTIONS = PROBABILITY_CURVE_PRESETS.map((preset) => ({
151
+ value: preset.id,
152
+ label: preset.label,
153
+ description: preset.description
154
+ }));
155
+ var cloneCurveDefinition = (curve) => ({
156
+ points: curve.points.map((point) => ({ ...point })),
157
+ segmentBends: [...curve.segmentBends]
158
+ });
159
+ var scaleCurveToDomain = (curve, xDomain) => {
160
+ const span = xDomain.max - xDomain.min;
161
+ return {
162
+ points: curve.points.map((point) => ({
163
+ ...point,
164
+ x: xDomain.min + point.x * span
165
+ })),
166
+ segmentBends: [...curve.segmentBends]
167
+ };
168
+ };
169
+ var getProbabilityCurvePreset = (presetId) => _nullishCoalesce(PROBABILITY_CURVE_PRESETS.find((preset) => preset.id === presetId), () => ( PROBABILITY_CURVE_PRESETS[0]));
170
+ var createProbabilityCurveFromPreset = (presetId = DEFAULT_PROBABILITY_CURVE_PRESET_ID, xDomain) => {
171
+ const presetCurve = getProbabilityCurvePreset(presetId).curve;
172
+ return xDomain ? scaleCurveToDomain(presetCurve, xDomain) : cloneCurveDefinition(presetCurve);
173
+ };
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ exports.ANIMATION_FORMAT_VERSION = _chunkWEQPSGPScjs.ANIMATION_FORMAT_VERSION; exports.BLEND_MODE_CATALOG = _chunkWEQPSGPScjs.BLEND_MODE_CATALOG; exports.COLOR_DOMAIN = _chunkWEQPSGPScjs.COLOR_DOMAIN; exports.COMMON_NUMERIC_DOMAINS = _chunkWEQPSGPScjs.COMMON_NUMERIC_DOMAINS; exports.CUSTOM_PARAMETER_DOMAINS = _chunkWEQPSGPScjs.CUSTOM_PARAMETER_DOMAINS; exports.DEFAULT_BLEND_MODE = _chunkWEQPSGPScjs.DEFAULT_BLEND_MODE; exports.DEFAULT_PROBABILITY_CURVE_PRESET_ID = DEFAULT_PROBABILITY_CURVE_PRESET_ID; exports.EMITTER_EVENT_TRIGGERS = _chunkWEQPSGPScjs.EMITTER_EVENT_TRIGGERS; exports.EMITTER_OPTION_DOMAINS = _chunkWEQPSGPScjs.EMITTER_OPTION_DOMAINS; exports.EMITTER_PARAMETER_DOMAINS = _chunkWEQPSGPScjs.EMITTER_PARAMETER_DOMAINS; exports.LINKED_SOURCE_CATALOG = _chunkWEQPSGPScjs.LINKED_SOURCE_CATALOG; exports.MAX_PARAMETER_VALUE = _chunkWEQPSGPScjs.MAX_PARAMETER_VALUE; exports.MIN_PARAMETER_VALUE = _chunkWEQPSGPScjs.MIN_PARAMETER_VALUE; exports.MODIFIER_DOMAINS = _chunkWEQPSGPScjs.MODIFIER_DOMAINS; exports.MODULATOR_DOMAINS = _chunkWEQPSGPScjs.MODULATOR_DOMAINS; exports.MODULATOR_TIME_ELAPSED_SOURCE = _chunkWEQPSGPScjs.MODULATOR_TIME_ELAPSED_SOURCE; exports.NAME_MAX_LENGTH = _chunkWEQPSGPScjs.NAME_MAX_LENGTH; exports.OPTION_PATH_CATALOG = _chunkWEQPSGPScjs.OPTION_PATH_CATALOG; exports.PARAMETER_OPTION_DOMAINS = _chunkWEQPSGPScjs.PARAMETER_OPTION_DOMAINS; exports.PARTICLE_EVENT_TRIGGERS = _chunkWEQPSGPScjs.PARTICLE_EVENT_TRIGGERS; exports.PARTICLE_OPTION_DOMAINS = _chunkWEQPSGPScjs.PARTICLE_OPTION_DOMAINS; exports.PARTICLE_PARAMETER_DOMAINS = _chunkWEQPSGPScjs.PARTICLE_PARAMETER_DOMAINS; exports.POINT_FORCE_DOMAINS = _chunkWEQPSGPScjs.POINT_FORCE_DOMAINS; exports.PROBABILITY_CURVE_PRESETS = PROBABILITY_CURVE_PRESETS; exports.PROBABILITY_CURVE_PRESET_OPTIONS = PROBABILITY_CURVE_PRESET_OPTIONS; exports.ParameterTypeChecker = _chunkWEQPSGPScjs.ParameterTypeChecker; exports.SPRITE_ANIMATION_DOMAINS = _chunkWEQPSGPScjs.SPRITE_ANIMATION_DOMAINS; exports.TEXT_DOMAINS = _chunkWEQPSGPScjs.TEXT_DOMAINS; exports.WARM_UP_MIN_STEP_SECONDS = _chunkWEQPSGPScjs.WARM_UP_MIN_STEP_SECONDS; exports.collectLayerTextureSources = _chunkWEQPSGPScjs.collectLayerTextureSources; exports.collectTextureSources = _chunkWEQPSGPScjs.collectTextureSources; exports.collectTextureSourcesByLayer = _chunkWEQPSGPScjs.collectTextureSourcesByLayer; exports.compileCurveSegments = _chunkWEQPSGPScjs.compileCurveSegments; exports.createProbabilityCurveFromPreset = createProbabilityCurveFromPreset; exports.findMissingTextureSources = _chunkWEQPSGPScjs.findMissingTextureSources; exports.findOptionPathEntry = _chunkWEQPSGPScjs.findOptionPathEntry; exports.getProbabilityCurvePreset = getProbabilityCurvePreset; exports.isEmitterEventTrigger = _chunkWEQPSGPScjs.isEmitterEventTrigger; exports.isEventTrigger = _chunkWEQPSGPScjs.isEventTrigger; exports.isParticleBlendMode = _chunkWEQPSGPScjs.isParticleBlendMode; exports.isParticleEventTrigger = _chunkWEQPSGPScjs.isParticleEventTrigger; exports.isValidEventName = _chunkWEQPSGPScjs.isValidEventName; exports.sanitizeName = _chunkWEQPSGPScjs.sanitizeName;