@zylem/behaviors 0.2.0 → 0.3.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/LICENSE +21 -0
- package/dist/chunk-7JJEIADR.js +2631 -0
- package/dist/chunk-7JJEIADR.js.map +1 -0
- package/dist/{chunk-POZER3MQ.js → chunk-ZPSAXX73.js} +100 -94
- package/dist/chunk-ZPSAXX73.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/particle-emitter/presets.d.ts +2 -2
- package/dist/particle-emitter/presets.js +1 -1
- package/dist/particle-emitter.d.ts +9 -4
- package/dist/particle-emitter.js +2 -2
- package/dist/spark-Dx3cJbTW.d.ts +356 -0
- package/package.json +159 -159
- package/dist/chunk-GYURWCIQ.js +0 -1985
- package/dist/chunk-GYURWCIQ.js.map +0 -1
- package/dist/chunk-POZER3MQ.js.map +0 -1
- package/dist/spark-DDlIg1nM.d.ts +0 -148
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/behaviors/particle-emitter/presets/electricity/arc.ts","../src/lib/behaviors/particle-emitter/preset-builder.ts","../src/lib/behaviors/particle-emitter/presets/electricity/pulse.ts","../src/lib/behaviors/particle-emitter/presets/electricity/spark.ts","../src/lib/behaviors/particle-emitter/presets/electricity/storm.ts","../src/lib/behaviors/particle-emitter/presets/electricity/surge.ts","../src/lib/behaviors/particle-emitter/presets/electricity/index.ts","../src/lib/behaviors/particle-emitter/presets/fire/blaze.ts","../src/lib/behaviors/particle-emitter/presets/fire/ember.ts","../src/lib/behaviors/particle-emitter/presets/fire/flamelet.ts","../src/lib/behaviors/particle-emitter/presets/fire/smolder.ts","../src/lib/behaviors/particle-emitter/presets/fire/spark.ts","../src/lib/behaviors/particle-emitter/presets/fire/index.ts","../src/lib/behaviors/particle-emitter/presets/gas/haze.ts","../src/lib/behaviors/particle-emitter/presets/gas/miasma.ts","../src/lib/behaviors/particle-emitter/presets/gas/plume.ts","../src/lib/behaviors/particle-emitter/presets/gas/smoke.ts","../src/lib/behaviors/particle-emitter/presets/gas/vapor.ts","../src/lib/behaviors/particle-emitter/presets/gas/index.ts","../src/lib/behaviors/particle-emitter/presets/magic/arcane.ts","../src/lib/behaviors/particle-emitter/presets/magic/corrupted.ts","../src/lib/behaviors/particle-emitter/presets/magic/holy.ts","../src/lib/behaviors/particle-emitter/presets/magic/nature.ts","../src/lib/behaviors/particle-emitter/presets/magic/psychic.ts","../src/lib/behaviors/particle-emitter/presets/magic/void.ts","../src/lib/behaviors/particle-emitter/presets/magic/index.ts","../src/lib/behaviors/particle-emitter/presets/water/drizzle.ts","../src/lib/behaviors/particle-emitter/presets/water/mist.ts","../src/lib/behaviors/particle-emitter/presets/water/splash.ts","../src/lib/behaviors/particle-emitter/presets/water/spray.ts","../src/lib/behaviors/particle-emitter/presets/water/torrent.ts","../src/lib/behaviors/particle-emitter/presets/water/index.ts"],"sourcesContent":["import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const electricityArcPreset = defineSemanticParticlePreset({\n\tfamily: 'electricity',\n\tvariant: 'arc',\n\tdescription: 'directed snapping bridge of charge',\n\taxes: {\n\t\t'continuity vs discontinuity': 'semi-continuous',\n\t\t'branching tendency': 'medium',\n\t\t'snap/crackle quality': 'high',\n\t\t'seeking behavior': 'medium',\n\t\t'charge buildup': 'medium',\n\t\t'rhythmic pulsing': 'low',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 0.7,\n\t\t\tlooping: true,\n\t\t\tcolor: '#60a5fa',\n\t\t\tlife: [0.12, 0.26],\n\t\t\tsize: [0.06, 0.14],\n\t\t\tspeed: [2.4, 4],\n\t\t\trotation: [-0.3, 0.3],\n\t\t\topacity: 0.96,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'rate', rate: 28 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.06,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.05,\n\t\t\tspeed: [1.2, 2.4],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#7dd3fc', 0.3],\n\t\t\t\t\t['#2563eb', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.2, 0],\n\t\t\t\t\t[1, 0.05],\n\t\t\t\t\t[0.46, 0.5],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.7, 0.96, 0.82, 0.26],\n\t\t\tspeedOverLife: [1.08, 0.94, 0.7, 0.38],\n\t\t\tnoise: {\n\t\t\t\tfrequency: [2.4, 4.8],\n\t\t\t\tpower: [0.05, 0.12],\n\t\t\t\tpositionAmount: [0.14, 0.28],\n\t\t\t\trotationAmount: [0.04, 0.12],\n\t\t\t},\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.62,\n\t\t\tlengthFactor: 1.16,\n\t\t},\n\t},\n});\n\nexport function arc(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(electricityArcPreset, options);\n}\n","import {\n\tAdditiveBlending,\n\tColor,\n\tMeshBasicMaterial,\n\ttype Blending,\n\ttype ColorRepresentation,\n\ttype MeshBasicMaterialParameters,\n\ttype Texture,\n} from 'three';\nimport {\n\tBezier,\n\tColorOverLife,\n\tConeEmitter,\n\tConstantColor,\n\tConstantValue,\n\tForceOverLife,\n\tGradient,\n\tIntervalValue,\n\tNoise,\n\tOrbitOverLife,\n\tParticleSystem,\n\tPiecewiseBezier,\n\tPointEmitter,\n\tRenderMode,\n\tRotationOverLife,\n\tSizeOverLife,\n\tSpeedOverLife,\n\tSphereEmitter,\n\tVector3,\n\tVector4,\n\ttype Behavior,\n\ttype RendererEmitterSettings,\n} from 'three.quarks';\n\nexport interface ParticleEffectDefinition {\n\tcreate(): ParticleSystem;\n}\n\nexport interface ParticlePresetMaterialOptions {\n\ttexture?: Texture;\n\topacity?: number;\n\tdepthWrite?: boolean;\n\talphaTest?: number;\n\tblending?: Blending;\n\tuTileCount?: number;\n\tvTileCount?: number;\n\tblendTiles?: boolean;\n}\n\nexport type NumericRange = number | readonly [number, number];\nexport type CurvePoints = readonly [number, number, number, number];\nexport type ColorStop = readonly [ColorRepresentation, number];\nexport type AlphaStop = readonly [number, number];\n\nexport interface ParticleColorOverLifeConfig {\n\tcolors: readonly ColorStop[];\n\talpha: readonly AlphaStop[];\n}\n\nexport interface ParticleForceOverLifeConfig {\n\tx?: NumericRange;\n\ty?: NumericRange;\n\tz?: NumericRange;\n}\n\nexport interface ParticleNoiseConfig {\n\tfrequency: NumericRange;\n\tpower: NumericRange;\n\tpositionAmount?: NumericRange;\n\trotationAmount?: NumericRange;\n}\n\nexport interface ParticleOrbitConfig {\n\tspeed: NumericRange;\n\taxis?: readonly [number, number, number];\n}\n\nexport interface ParticleBehaviorConfig {\n\tcolorOverLife?: ParticleColorOverLifeConfig;\n\tsizeOverLife?: CurvePoints;\n\tspeedOverLife?: CurvePoints;\n\trotationOverLife?: NumericRange;\n\tforceOverLife?: ParticleForceOverLifeConfig;\n\tnoise?: ParticleNoiseConfig;\n\torbitOverLife?: ParticleOrbitConfig;\n}\n\nexport interface ParticleBehaviorOverrides {\n\tcolorOverLife?: ParticleColorOverLifeConfig | null;\n\tsizeOverLife?: CurvePoints | null;\n\tspeedOverLife?: CurvePoints | null;\n\trotationOverLife?: NumericRange | null;\n\tforceOverLife?: Partial<ParticleForceOverLifeConfig> | null;\n\tnoise?: Partial<ParticleNoiseConfig> | null;\n\torbitOverLife?: Partial<ParticleOrbitConfig> | null;\n}\n\nexport type ParticleShapeConfig =\n\t| { type: 'point' }\n\t| {\n\t\t\ttype: 'cone';\n\t\t\tradius?: number;\n\t\t\tthickness?: number;\n\t\t\tangle?: number;\n\t\t\tspeed?: NumericRange;\n\t }\n\t| {\n\t\t\ttype: 'sphere';\n\t\t\tradius?: number;\n\t\t\tthickness?: number;\n\t\t\tspeed?: NumericRange;\n\t };\n\ntype ParticleEmissionConfig =\n\t| {\n\t\t\ttype: 'burst';\n\t\t\tcount: number;\n\t }\n\t| {\n\t\t\ttype: 'rate';\n\t\t\trate: number;\n\t };\n\ninterface SemanticParticleSystemConfig {\n\tdefaults: {\n\t\tduration: number;\n\t\tlooping?: boolean;\n\t\tworldSpace?: boolean;\n\t\tcolor: ColorRepresentation;\n\t\tlife: NumericRange;\n\t\tsize: NumericRange;\n\t\tspeed: NumericRange;\n\t\trotation?: NumericRange;\n\t\topacity?: number;\n\t\trenderMode?: RenderMode;\n\t};\n\temission: ParticleEmissionConfig;\n\tshape?: ParticleShapeConfig;\n\tbehaviors?: ParticleBehaviorConfig;\n\trendererEmitterSettings?: RendererEmitterSettings;\n}\n\nexport interface SemanticParticlePresetDefinition<\n\tFamily extends string = string,\n\tVariant extends string = string,\n> {\n\tfamily: Family;\n\tvariant: Variant;\n\tdescription: string;\n\taxes: Readonly<Record<string, string>>;\n\tsystem: SemanticParticleSystemConfig;\n}\n\nexport type ParticleMagicAlignment =\n\t| 'arcane'\n\t| 'holy'\n\t| 'corrupted'\n\t| 'nature'\n\t| 'void'\n\t| 'psychic';\n\nexport type ParticleMagicTemperament =\n\t| 'calm'\n\t| 'ominous'\n\t| 'playful'\n\t| 'regal'\n\t| 'predatory';\n\nexport type ParticleMagicAgency =\n\t| 'passive'\n\t| 'reactive'\n\t| 'seeking'\n\t| 'sentient-feeling';\n\nexport type ParticleMagicOrder = 'geometric' | 'organic' | 'chaotic';\n\nexport type ParticleMagicRealityEffect =\n\t| 'warping'\n\t| 'illuminating'\n\t| 'binding'\n\t| 'decaying'\n\t| 'healing';\n\nexport interface ParticleMagicModifierOptions {\n\talignment: ParticleMagicAlignment;\n\ttemperament?: ParticleMagicTemperament;\n\tagency?: ParticleMagicAgency;\n\torder?: ParticleMagicOrder;\n\trealityEffect?: ParticleMagicRealityEffect;\n\tintensity?: number;\n}\n\nexport type ParticleMagicModifierInput =\n\t| ParticleMagicAlignment\n\t| ParticleMagicModifierOptions;\n\nexport interface SemanticParticlePresetOptions\n\textends ParticlePresetMaterialOptions {\n\tbehaviors?: ParticleBehaviorOverrides;\n\tcolor?: ColorRepresentation;\n\tcount?: number;\n\tduration?: number;\n\temissionRate?: number;\n\tlife?: NumericRange;\n\tlooping?: boolean;\n\tmagic?: ParticleMagicModifierInput;\n\trenderMode?: RenderMode;\n\trendererEmitterSettings?: Partial<RendererEmitterSettings>;\n\trotation?: NumericRange;\n\tshape?: ParticleShapeConfig;\n\tsize?: NumericRange;\n\tspeed?: NumericRange;\n\tworldSpace?: boolean;\n}\n\ninterface MagicPalette {\n\tstart: ColorRepresentation;\n\tmid: ColorRepresentation;\n\tend: ColorRepresentation;\n}\n\nconst DEFAULT_MAGIC_BEHAVIOR_BY_ALIGNMENT: Record<\n\tParticleMagicAlignment,\n\tOmit<ParticleMagicModifierOptions, 'alignment'>\n> = {\n\tarcane: {\n\t\ttemperament: 'regal',\n\t\tagency: 'reactive',\n\t\torder: 'geometric',\n\t\trealityEffect: 'warping',\n\t\tintensity: 1,\n\t},\n\tholy: {\n\t\ttemperament: 'calm',\n\t\tagency: 'passive',\n\t\torder: 'geometric',\n\t\trealityEffect: 'illuminating',\n\t\tintensity: 1,\n\t},\n\tcorrupted: {\n\t\ttemperament: 'ominous',\n\t\tagency: 'seeking',\n\t\torder: 'chaotic',\n\t\trealityEffect: 'decaying',\n\t\tintensity: 1.05,\n\t},\n\tnature: {\n\t\ttemperament: 'calm',\n\t\tagency: 'reactive',\n\t\torder: 'organic',\n\t\trealityEffect: 'healing',\n\t\tintensity: 0.9,\n\t},\n\tvoid: {\n\t\ttemperament: 'ominous',\n\t\tagency: 'seeking',\n\t\torder: 'chaotic',\n\t\trealityEffect: 'warping',\n\t\tintensity: 1.15,\n\t},\n\tpsychic: {\n\t\ttemperament: 'predatory',\n\t\tagency: 'sentient-feeling',\n\t\torder: 'organic',\n\t\trealityEffect: 'binding',\n\t\tintensity: 1,\n\t},\n};\n\nconst MAGIC_PALETTES: Record<ParticleMagicAlignment, MagicPalette> = {\n\tarcane: {\n\t\tstart: '#dbeafe',\n\t\tmid: '#60a5fa',\n\t\tend: '#1d4ed8',\n\t},\n\tholy: {\n\t\tstart: '#fff7d1',\n\t\tmid: '#fde68a',\n\t\tend: '#f59e0b',\n\t},\n\tcorrupted: {\n\t\tstart: '#bef264',\n\t\tmid: '#84cc16',\n\t\tend: '#4d7c0f',\n\t},\n\tnature: {\n\t\tstart: '#dcfce7',\n\t\tmid: '#4ade80',\n\t\tend: '#15803d',\n\t},\n\tvoid: {\n\t\tstart: '#c4b5fd',\n\t\tmid: '#475569',\n\t\tend: '#0f172a',\n\t},\n\tpsychic: {\n\t\tstart: '#fce7f3',\n\t\tmid: '#f472b6',\n\t\tend: '#db2777',\n\t},\n};\n\nexport function particleEffect(\n\tcreate: () => ParticleSystem,\n): ParticleEffectDefinition {\n\treturn { create };\n}\n\nexport function defineSemanticParticlePreset<\n\tT extends SemanticParticlePresetDefinition,\n>(preset: T): T {\n\treturn preset;\n}\n\nexport function createMagicModifier(\n\talignment: ParticleMagicAlignment,\n\toverrides: Omit<ParticleMagicModifierOptions, 'alignment'> = {},\n): ParticleMagicModifierOptions {\n\treturn {\n\t\talignment,\n\t\t...DEFAULT_MAGIC_BEHAVIOR_BY_ALIGNMENT[alignment],\n\t\t...overrides,\n\t};\n}\n\nexport function createRangeValue(\n\tvalue: NumericRange,\n\tdefaultValue: readonly [number, number],\n) {\n\tif (Array.isArray(value)) {\n\t\tconst min = value[0] ?? defaultValue[0];\n\t\tconst max = value[1] ?? defaultValue[1];\n\t\treturn min === max ? new ConstantValue(min) : new IntervalValue(min, max);\n\t}\n\n\treturn new ConstantValue(value as number);\n}\n\nexport function toColorVector(color: ColorRepresentation): Vector4 {\n\tconst parsed = new Color(color);\n\treturn new Vector4(parsed.r, parsed.g, parsed.b, 1);\n}\n\nexport function createParticleMaterial(\n\tcolor: ColorRepresentation,\n\toptions: ParticlePresetMaterialOptions,\n\tdefaultOpacity?: number,\n) {\n\tconst materialOptions: MeshBasicMaterialParameters = {\n\t\tcolor,\n\t\ttransparent: true,\n\t};\n\n\tif (options.texture) {\n\t\tmaterialOptions.map = options.texture;\n\t\tmaterialOptions.depthWrite = options.depthWrite ?? false;\n\t\tmaterialOptions.alphaTest = options.alphaTest ?? 0.01;\n\t} else {\n\t\tif (options.depthWrite !== undefined) {\n\t\t\tmaterialOptions.depthWrite = options.depthWrite;\n\t\t}\n\n\t\tif (options.alphaTest !== undefined) {\n\t\t\tmaterialOptions.alphaTest = options.alphaTest;\n\t\t}\n\t}\n\n\tconst opacity = options.opacity ?? defaultOpacity;\n\tif (opacity !== undefined) {\n\t\tmaterialOptions.opacity = opacity;\n\t}\n\n\tif (options.blending !== undefined) {\n\t\tmaterialOptions.blending = options.blending;\n\t}\n\n\treturn new MeshBasicMaterial(materialOptions);\n}\n\nexport function createTextureSystemOptions(options: ParticlePresetMaterialOptions) {\n\tconst systemOptions: {\n\t\tuTileCount?: number;\n\t\tvTileCount?: number;\n\t\tblendTiles?: boolean;\n\t} = {};\n\n\tif (options.uTileCount !== undefined) {\n\t\tsystemOptions.uTileCount = options.uTileCount;\n\t}\n\n\tif (options.vTileCount !== undefined) {\n\t\tsystemOptions.vTileCount = options.vTileCount;\n\t}\n\n\tif (options.blendTiles !== undefined) {\n\t\tsystemOptions.blendTiles = options.blendTiles;\n\t}\n\n\treturn systemOptions;\n}\n\nexport function createSemanticParticleEffect(\n\tpreset: SemanticParticlePresetDefinition,\n\toptions: SemanticParticlePresetOptions = {},\n): ParticleEffectDefinition {\n\treturn particleEffect(() => {\n\t\tconst magic = normalizeMagicModifier(options.magic);\n\t\tconst resolvedShape = mergeShapeConfig(preset.system.shape, options.shape);\n\t\tconst baseBehaviors = mergeBehaviorConfig(\n\t\t\tpreset.system.behaviors,\n\t\t\toptions.behaviors,\n\t\t);\n\t\tconst baseColor = options.color ?? preset.system.defaults.color;\n\t\tconst resolvedColor = magic\n\t\t\t? mixColors(baseColor, MAGIC_PALETTES[magic.alignment].start, 0.2)\n\t\t\t: baseColor;\n\t\tconst resolvedBehaviors = magic\n\t\t\t? applyMagicBehaviors(baseBehaviors, resolvedColor, magic)\n\t\t\t: baseBehaviors;\n\t\tconst resolvedBlending =\n\t\t\toptions.blending ?? (magic ? AdditiveBlending : undefined);\n\t\tconst materialOptions: ParticlePresetMaterialOptions = {\n\t\t\t...options,\n\t\t\tblending: resolvedBlending,\n\t\t};\n\t\tconst resolvedRendererEmitterSettings = {\n\t\t\t...preset.system.rendererEmitterSettings,\n\t\t\t...options.rendererEmitterSettings,\n\t\t};\n\n\t\treturn new ParticleSystem({\n\t\t\tduration: options.duration ?? preset.system.defaults.duration,\n\t\t\tlooping:\n\t\t\t\toptions.looping\n\t\t\t\t?? preset.system.defaults.looping\n\t\t\t\t?? preset.system.emission.type === 'rate',\n\t\t\tworldSpace: options.worldSpace ?? preset.system.defaults.worldSpace ?? false,\n\t\t\tstartLife: createRangeValue(\n\t\t\t\toptions.life ?? preset.system.defaults.life,\n\t\t\t\ttoRange(preset.system.defaults.life),\n\t\t\t),\n\t\t\tstartSpeed: createRangeValue(\n\t\t\t\toptions.speed ?? preset.system.defaults.speed,\n\t\t\t\ttoRange(preset.system.defaults.speed),\n\t\t\t),\n\t\t\tstartSize: createRangeValue(\n\t\t\t\toptions.size ?? preset.system.defaults.size,\n\t\t\t\ttoRange(preset.system.defaults.size),\n\t\t\t),\n\t\t\tstartRotation:\n\t\t\t\toptions.rotation !== undefined\n\t\t\t\t|| preset.system.defaults.rotation !== undefined\n\t\t\t\t\t? createRangeValue(\n\t\t\t\t\t\t\toptions.rotation ?? preset.system.defaults.rotation ?? 0,\n\t\t\t\t\t\t\ttoRange(preset.system.defaults.rotation ?? 0),\n\t\t\t\t\t\t)\n\t\t\t\t\t: undefined,\n\t\t\tstartColor: new ConstantColor(toColorVector(resolvedColor)),\n\t\t\temissionOverTime:\n\t\t\t\tpreset.system.emission.type === 'rate'\n\t\t\t\t\t? new ConstantValue(\n\t\t\t\t\t\t\toptions.emissionRate ?? preset.system.emission.rate,\n\t\t\t\t\t\t)\n\t\t\t\t\t: new ConstantValue(0),\n\t\t\temissionBursts:\n\t\t\t\tpreset.system.emission.type === 'burst'\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: 0,\n\t\t\t\t\t\t\t\tcount: new ConstantValue(\n\t\t\t\t\t\t\t\t\toptions.count ?? preset.system.emission.count,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tcycle: 1,\n\t\t\t\t\t\t\t\tinterval: 0,\n\t\t\t\t\t\t\t\tprobability: 1,\n\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t: undefined,\n\t\t\tshape: createEmitterShape(resolvedShape),\n\t\t\tmaterial: createParticleMaterial(\n\t\t\t\tresolvedColor,\n\t\t\t\tmaterialOptions,\n\t\t\t\tpreset.system.defaults.opacity,\n\t\t\t),\n\t\t\tbehaviors: createBehaviors(resolvedBehaviors),\n\t\t\t...createTextureSystemOptions(materialOptions),\n\t\t\trenderMode:\n\t\t\t\toptions.renderMode\n\t\t\t\t?? (magic && magic.agency === 'seeking'\n\t\t\t\t\t? RenderMode.StretchedBillBoard\n\t\t\t\t\t: undefined)\n\t\t\t\t?? preset.system.defaults.renderMode\n\t\t\t\t?? RenderMode.BillBoard,\n\t\t\trendererEmitterSettings: resolvedRendererEmitterSettings,\n\t\t});\n\t});\n}\n\nfunction normalizeMagicModifier(\n\tinput?: ParticleMagicModifierInput,\n): ParticleMagicModifierOptions | null {\n\tif (!input) {\n\t\treturn null;\n\t}\n\n\tif (typeof input === 'string') {\n\t\treturn createMagicModifier(input);\n\t}\n\n\treturn createMagicModifier(input.alignment, input);\n}\n\nfunction applyMagicBehaviors(\n\tbase: ParticleBehaviorConfig | undefined,\n\tbaseColor: ColorRepresentation,\n\tmagic: ParticleMagicModifierOptions,\n): ParticleBehaviorConfig {\n\tconst intensity = clamp(magic.intensity ?? 1, 0.25, 1.5);\n\tconst palette = MAGIC_PALETTES[magic.alignment];\n\n\treturn {\n\t\t...base,\n\t\tcolorOverLife: tintColorOverLife(\n\t\t\tbase?.colorOverLife,\n\t\t\tbaseColor,\n\t\t\tpalette,\n\t\t\tintensity,\n\t\t),\n\t\trotationOverLife: addRanges(\n\t\t\tbase?.rotationOverLife,\n\t\t\tresolveMagicRotation(magic, intensity),\n\t\t),\n\t\tforceOverLife: mergeForce(\n\t\t\tbase?.forceOverLife,\n\t\t\tresolveMagicForce(magic, intensity),\n\t\t),\n\t\tnoise: mergeNoise(base?.noise, resolveMagicNoise(magic, intensity)),\n\t\torbitOverLife:\n\t\t\tresolveMagicOrbit(magic, intensity) ?? base?.orbitOverLife,\n\t};\n}\n\nfunction resolveMagicRotation(\n\tmagic: ParticleMagicModifierOptions,\n\tintensity: number,\n): NumericRange | undefined {\n\tconst amount = 0.7 + intensity * 1.4;\n\n\tswitch (magic.order) {\n\t\tcase 'geometric':\n\t\t\treturn [amount * 0.45, amount];\n\t\tcase 'organic':\n\t\t\treturn [-amount * 0.55, amount * 0.55];\n\t\tcase 'chaotic':\n\t\t\treturn [-amount * 2.4, amount * 2.4];\n\t\tdefault:\n\t\t\treturn undefined;\n\t}\n}\n\nfunction resolveMagicForce(\n\tmagic: ParticleMagicModifierOptions,\n\tintensity: number,\n): ParticleForceOverLifeConfig | undefined {\n\tconst amount = 0.2 + intensity * 0.55;\n\n\tswitch (magic.realityEffect) {\n\t\tcase 'illuminating':\n\t\tcase 'healing':\n\t\t\treturn { y: [amount * 0.6, amount] };\n\t\tcase 'decaying':\n\t\t\treturn { y: [-amount, -amount * 0.5] };\n\t\tcase 'binding':\n\t\t\treturn { y: [-amount * 0.35, amount * 0.15] };\n\t\tcase 'warping':\n\t\t\treturn { x: [-amount * 0.35, amount * 0.35], z: [-amount * 0.35, amount * 0.35] };\n\t\tdefault:\n\t\t\treturn undefined;\n\t}\n}\n\nfunction resolveMagicNoise(\n\tmagic: ParticleMagicModifierOptions,\n\tintensity: number,\n): ParticleNoiseConfig {\n\tconst calmMultiplier = magic.temperament === 'calm' ? 0.6 : 1;\n\tconst ominousBoost = magic.temperament === 'ominous' ? 1.25 : 1;\n\tconst basePower =\n\t\t(0.08 + intensity * 0.1) * calmMultiplier * ominousBoost;\n\n\tswitch (magic.order) {\n\t\tcase 'geometric':\n\t\t\treturn {\n\t\t\t\tfrequency: [1.5, 3.5],\n\t\t\t\tpower: [basePower * 0.4, basePower * 0.8],\n\t\t\t\tpositionAmount: [0.08, 0.2],\n\t\t\t\trotationAmount: [0.1, 0.2],\n\t\t\t};\n\t\tcase 'organic':\n\t\t\treturn {\n\t\t\t\tfrequency: [2.5, 5.5],\n\t\t\t\tpower: [basePower * 0.7, basePower * 1.2],\n\t\t\t\tpositionAmount: [0.12, 0.3],\n\t\t\t\trotationAmount: [0.14, 0.26],\n\t\t\t};\n\t\tcase 'chaotic':\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\tfrequency: [4, 8],\n\t\t\t\tpower: [basePower, basePower * 1.7],\n\t\t\t\tpositionAmount: [0.18, 0.38],\n\t\t\t\trotationAmount: [0.18, 0.34],\n\t\t\t};\n\t}\n}\n\nfunction resolveMagicOrbit(\n\tmagic: ParticleMagicModifierOptions,\n\tintensity: number,\n): ParticleOrbitConfig | undefined {\n\tif (magic.order === 'geometric') {\n\t\treturn {\n\t\t\tspeed: [3 + intensity * 2, 6 + intensity * 3],\n\t\t\taxis: [0, 1, 0],\n\t\t};\n\t}\n\n\tif (magic.agency === 'sentient-feeling') {\n\t\treturn {\n\t\t\tspeed: [1 + intensity, 2.5 + intensity * 1.2],\n\t\t\taxis: [0, 1, 0],\n\t\t};\n\t}\n\n\treturn undefined;\n}\n\nfunction tintColorOverLife(\n\tbase: ParticleColorOverLifeConfig | undefined,\n\tbaseColor: ColorRepresentation,\n\tpalette: MagicPalette,\n\tintensity: number,\n): ParticleColorOverLifeConfig {\n\tif (!base) {\n\t\treturn {\n\t\t\tcolors: [\n\t\t\t\t[mixColors(baseColor, palette.start, 0.25), 0],\n\t\t\t\t[mixColors(baseColor, palette.mid, 0.55), 0.45],\n\t\t\t\t[mixColors(baseColor, palette.end, 0.75), 1],\n\t\t\t],\n\t\t\talpha: [\n\t\t\t\t[0.22, 0],\n\t\t\t\t[1, 0.12],\n\t\t\t\t[0.52 + intensity * 0.08, 0.64],\n\t\t\t\t[0, 1],\n\t\t\t],\n\t\t};\n\t}\n\n\treturn {\n\t\tcolors: base.colors.map(([color, stop], index) => {\n\t\t\tconst target =\n\t\t\t\tindex === 0\n\t\t\t\t\t? palette.start\n\t\t\t\t\t: index === base.colors.length - 1\n\t\t\t\t\t\t? palette.end\n\t\t\t\t\t\t: palette.mid;\n\t\t\tconst amount = index === 0 ? 0.18 : 0.3 + intensity * 0.15;\n\t\t\treturn [mixColors(color, target, amount), stop] as const;\n\t\t}),\n\t\talpha: base.alpha,\n\t};\n}\n\nfunction mergeNoise(\n\tbase: ParticleNoiseConfig | undefined,\n\toverlay: ParticleNoiseConfig | undefined,\n): ParticleNoiseConfig | undefined {\n\tif (!base) {\n\t\treturn overlay;\n\t}\n\n\tif (!overlay) {\n\t\treturn base;\n\t}\n\n\treturn {\n\t\tfrequency: addRanges(base.frequency, overlay.frequency) ?? base.frequency,\n\t\tpower: addRanges(base.power, overlay.power) ?? base.power,\n\t\tpositionAmount: addRanges(base.positionAmount, overlay.positionAmount),\n\t\trotationAmount: addRanges(base.rotationAmount, overlay.rotationAmount),\n\t};\n}\n\nfunction mergeForce(\n\tbase: ParticleForceOverLifeConfig | undefined,\n\toverlay: ParticleForceOverLifeConfig | undefined,\n): ParticleForceOverLifeConfig | undefined {\n\tif (!base) {\n\t\treturn overlay;\n\t}\n\n\tif (!overlay) {\n\t\treturn base;\n\t}\n\n\treturn {\n\t\tx: addRanges(base.x, overlay.x),\n\t\ty: addRanges(base.y, overlay.y),\n\t\tz: addRanges(base.z, overlay.z),\n\t};\n}\n\nfunction mergeBehaviorConfig(\n\tbase: ParticleBehaviorConfig | undefined,\n\toverrides: ParticleBehaviorOverrides | undefined,\n): ParticleBehaviorConfig | undefined {\n\tif (!base && !overrides) {\n\t\treturn undefined;\n\t}\n\n\tconst merged: ParticleBehaviorConfig = {};\n\n\tassignIfDefined(\n\t\tmerged,\n\t\t'colorOverLife',\n\t\tresolveOverrideValue(base?.colorOverLife, overrides?.colorOverLife),\n\t);\n\tassignIfDefined(\n\t\tmerged,\n\t\t'sizeOverLife',\n\t\tresolveOverrideValue(base?.sizeOverLife, overrides?.sizeOverLife),\n\t);\n\tassignIfDefined(\n\t\tmerged,\n\t\t'speedOverLife',\n\t\tresolveOverrideValue(base?.speedOverLife, overrides?.speedOverLife),\n\t);\n\tassignIfDefined(\n\t\tmerged,\n\t\t'rotationOverLife',\n\t\tresolveOverrideValue(base?.rotationOverLife, overrides?.rotationOverLife),\n\t);\n\tassignIfDefined(\n\t\tmerged,\n\t\t'forceOverLife',\n\t\tresolvePartialOverride(base?.forceOverLife, overrides?.forceOverLife),\n\t);\n\tassignIfDefined(\n\t\tmerged,\n\t\t'noise',\n\t\tresolveNoiseOverride(base?.noise, overrides?.noise),\n\t);\n\tassignIfDefined(\n\t\tmerged,\n\t\t'orbitOverLife',\n\t\tresolveOrbitOverride(base?.orbitOverLife, overrides?.orbitOverLife),\n\t);\n\n\treturn Object.keys(merged).length > 0 ? merged : undefined;\n}\n\nfunction mergeShapeConfig(\n\tbase: ParticleShapeConfig | undefined,\n\toverride: ParticleShapeConfig | undefined,\n): ParticleShapeConfig | undefined {\n\tif (!override) {\n\t\treturn base;\n\t}\n\n\tif (!base || override.type !== base.type) {\n\t\treturn override;\n\t}\n\n\tif (override.type === 'point') {\n\t\treturn override;\n\t}\n\n\tif (override.type === 'cone' && base.type === 'cone') {\n\t\treturn {\n\t\t\t...base,\n\t\t\t...override,\n\t\t};\n\t}\n\n\tif (override.type === 'sphere' && base.type === 'sphere') {\n\t\treturn {\n\t\t\t...base,\n\t\t\t...override,\n\t\t};\n\t}\n\n\treturn override;\n}\n\nfunction addRanges(\n\tbase: NumericRange | undefined,\n\toverlay: NumericRange | undefined,\n): NumericRange | undefined {\n\tif (base === undefined) {\n\t\treturn overlay;\n\t}\n\n\tif (overlay === undefined) {\n\t\treturn base;\n\t}\n\n\tconst [baseMin, baseMax] = toRange(base);\n\tconst [overlayMin, overlayMax] = toRange(overlay);\n\treturn [baseMin + overlayMin, baseMax + overlayMax];\n}\n\nfunction resolveOverrideValue<T>(\n\tbase: T | undefined,\n\toverride: T | null | undefined,\n): T | undefined {\n\tif (override === null) {\n\t\treturn undefined;\n\t}\n\n\treturn override ?? base;\n}\n\nfunction resolvePartialOverride<T extends object>(\n\tbase: T | undefined,\n\toverride: Partial<T> | null | undefined,\n): T | undefined {\n\tif (override === null) {\n\t\treturn undefined;\n\t}\n\n\tif (!override) {\n\t\treturn base;\n\t}\n\n\tconst resolved = {\n\t\t...base,\n\t\t...override,\n\t};\n\n\treturn Object.keys(resolved).length > 0 ? (resolved as T) : undefined;\n}\n\nfunction resolveNoiseOverride(\n\tbase: ParticleNoiseConfig | undefined,\n\toverride: Partial<ParticleNoiseConfig> | null | undefined,\n): ParticleNoiseConfig | undefined {\n\tif (override === null) {\n\t\treturn undefined;\n\t}\n\n\tif (!override) {\n\t\treturn base;\n\t}\n\n\tconst frequency = override.frequency ?? base?.frequency;\n\tconst power = override.power ?? base?.power;\n\tif (frequency === undefined || power === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\t...base,\n\t\t...override,\n\t\tfrequency,\n\t\tpower,\n\t};\n}\n\nfunction resolveOrbitOverride(\n\tbase: ParticleOrbitConfig | undefined,\n\toverride: Partial<ParticleOrbitConfig> | null | undefined,\n): ParticleOrbitConfig | undefined {\n\tif (override === null) {\n\t\treturn undefined;\n\t}\n\n\tif (!override) {\n\t\treturn base;\n\t}\n\n\tconst speed = override.speed ?? base?.speed;\n\tif (speed === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\t...base,\n\t\t...override,\n\t\tspeed,\n\t};\n}\n\nfunction assignIfDefined<\n\tT extends object,\n\tK extends keyof T,\n>(target: T, key: K, value: T[K] | undefined) {\n\tif (value !== undefined) {\n\t\ttarget[key] = value;\n\t}\n}\n\nfunction createBehaviors(\n\tconfig?: ParticleBehaviorConfig,\n): Behavior[] | undefined {\n\tif (!config) {\n\t\treturn undefined;\n\t}\n\n\tconst behaviors: Behavior[] = [];\n\n\tif (config.colorOverLife) {\n\t\tbehaviors.push(\n\t\t\tnew ColorOverLife(\n\t\t\t\tnew Gradient(\n\t\t\t\t\tconfig.colorOverLife.colors.map(\n\t\t\t\t\t\t([color, stop]) =>\n\t\t\t\t\t\t\t[toColorVector3(color), stop] as [Vector3, number],\n\t\t\t\t\t),\n\t\t\t\t\tconfig.colorOverLife.alpha.map(\n\t\t\t\t\t\t([value, stop]) => [value, stop] as [number, number],\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}\n\n\tif (config.sizeOverLife) {\n\t\tbehaviors.push(new SizeOverLife(createCurve(config.sizeOverLife)));\n\t}\n\n\tif (config.speedOverLife) {\n\t\tbehaviors.push(new SpeedOverLife(createCurve(config.speedOverLife)));\n\t}\n\n\tif (config.rotationOverLife !== undefined) {\n\t\tbehaviors.push(\n\t\t\tnew RotationOverLife(\n\t\t\t\tcreateRangeValue(config.rotationOverLife, toRange(config.rotationOverLife)),\n\t\t\t),\n\t\t);\n\t}\n\n\tif (config.forceOverLife) {\n\t\tbehaviors.push(\n\t\t\tnew ForceOverLife(\n\t\t\t\tcreateRangeValue(config.forceOverLife.x ?? 0, toRange(config.forceOverLife.x ?? 0)),\n\t\t\t\tcreateRangeValue(config.forceOverLife.y ?? 0, toRange(config.forceOverLife.y ?? 0)),\n\t\t\t\tcreateRangeValue(config.forceOverLife.z ?? 0, toRange(config.forceOverLife.z ?? 0)),\n\t\t\t),\n\t\t);\n\t}\n\n\tif (config.noise) {\n\t\tbehaviors.push(\n\t\t\tnew Noise(\n\t\t\t\tcreateRangeValue(config.noise.frequency, toRange(config.noise.frequency)),\n\t\t\t\tcreateRangeValue(config.noise.power, toRange(config.noise.power)),\n\t\t\t\tcreateRangeValue(\n\t\t\t\t\tconfig.noise.positionAmount ?? 0,\n\t\t\t\t\ttoRange(config.noise.positionAmount ?? 0),\n\t\t\t\t),\n\t\t\t\tcreateRangeValue(\n\t\t\t\t\tconfig.noise.rotationAmount ?? 0,\n\t\t\t\t\ttoRange(config.noise.rotationAmount ?? 0),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}\n\n\tif (config.orbitOverLife) {\n\t\tconst axis = config.orbitOverLife.axis ?? [0, 1, 0];\n\t\tbehaviors.push(\n\t\t\tnew OrbitOverLife(\n\t\t\t\tcreateRangeValue(\n\t\t\t\t\tconfig.orbitOverLife.speed,\n\t\t\t\t\ttoRange(config.orbitOverLife.speed),\n\t\t\t\t),\n\t\t\t\tnew Vector3(axis[0], axis[1], axis[2]),\n\t\t\t),\n\t\t);\n\t}\n\n\treturn behaviors.length > 0 ? behaviors : undefined;\n}\n\nfunction createEmitterShape(shape?: ParticleShapeConfig) {\n\tif (!shape || shape.type === 'point') {\n\t\treturn new PointEmitter();\n\t}\n\n\tif (shape.type === 'cone') {\n\t\treturn new ConeEmitter({\n\t\t\tradius: shape.radius,\n\t\t\tthickness: shape.thickness,\n\t\t\tangle: shape.angle,\n\t\t\tspeed:\n\t\t\t\tshape.speed !== undefined\n\t\t\t\t\t? createRangeValue(shape.speed, toRange(shape.speed))\n\t\t\t\t\t: undefined,\n\t\t});\n\t}\n\n\treturn new SphereEmitter({\n\t\tradius: shape.radius,\n\t\tthickness: shape.thickness,\n\t\tspeed:\n\t\t\tshape.speed !== undefined\n\t\t\t\t? createRangeValue(shape.speed, toRange(shape.speed))\n\t\t\t\t: undefined,\n\t});\n}\n\nfunction createCurve(points: CurvePoints) {\n\treturn new PiecewiseBezier([[new Bezier(...points), 0]]);\n}\n\nfunction toColorVector3(color: ColorRepresentation): Vector3 {\n\tconst parsed = new Color(color);\n\treturn new Vector3(parsed.r, parsed.g, parsed.b);\n}\n\nfunction toRange(value: NumericRange): readonly [number, number] {\n\tif (Array.isArray(value)) {\n\t\treturn [value[0] ?? 0, value[1] ?? value[0] ?? 0];\n\t}\n\n\treturn [value as number, value as number];\n}\n\nfunction mixColors(\n\tbase: ColorRepresentation,\n\toverlay: ColorRepresentation,\n\tamount: number,\n): string {\n\tconst color = new Color(base);\n\tcolor.lerp(new Color(overlay), clamp(amount, 0, 1));\n\treturn `#${color.getHexString()}`;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n\treturn Math.min(Math.max(value, min), max);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const electricityPulsePreset = defineSemanticParticlePreset({\n\tfamily: 'electricity',\n\tvariant: 'pulse',\n\tdescription: 'rhythmic swelling packet of charge',\n\taxes: {\n\t\t'continuity vs discontinuity': 'discrete rhythmic',\n\t\t'branching tendency': 'low',\n\t\t'snap/crackle quality': 'medium',\n\t\t'seeking behavior': 'low',\n\t\t'charge buildup': 'medium',\n\t\t'rhythmic pulsing': 'high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 0.28,\n\t\t\tcolor: '#a5f3fc',\n\t\t\tlife: [0.14, 0.3],\n\t\t\tsize: [0.18, 0.34],\n\t\t\tspeed: [0.18, 0.42],\n\t\t\topacity: 0.88,\n\t\t},\n\t\temission: { type: 'burst', count: 10 },\n\t\tshape: {\n\t\t\ttype: 'sphere',\n\t\t\tradius: 0.04,\n\t\t\tthickness: 0.5,\n\t\t\tspeed: [0.02, 0.08],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#a5f3fc', 0.4],\n\t\t\t\t\t['#0891b2', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.14, 0],\n\t\t\t\t\t[0.92, 0.08],\n\t\t\t\t\t[0.42, 0.54],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.2, 0.92, 1.26, 0.18],\n\t\t},\n\t},\n});\n\nexport function pulse(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(electricityPulsePreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const electricitySparkPreset = defineSemanticParticlePreset({\n\tfamily: 'electricity',\n\tvariant: 'spark',\n\tdescription: 'tiny discontinuous discharge',\n\taxes: {\n\t\t'continuity vs discontinuity': 'highly discontinuous',\n\t\t'branching tendency': 'low',\n\t\t'snap/crackle quality': 'high',\n\t\t'seeking behavior': 'low',\n\t\t'charge buildup': 'low',\n\t\t'rhythmic pulsing': 'low',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 0.2,\n\t\t\tcolor: '#7dd3fc',\n\t\t\tlife: [0.08, 0.18],\n\t\t\tsize: [0.08, 0.16],\n\t\t\tspeed: [2.2, 4.2],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.92,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'burst', count: 12 },\n\t\tshape: {\n\t\t\ttype: 'sphere',\n\t\t\tradius: 0.06,\n\t\t\tthickness: 0.95,\n\t\t\tspeed: [0.8, 1.6],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#bae6fd', 0.3],\n\t\t\t\t\t['#38bdf8', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.22, 0],\n\t\t\t\t\t[1, 0.06],\n\t\t\t\t\t[0.48, 0.4],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.44, 0.98, 0.7, 0.04],\n\t\t\tspeedOverLife: [1.24, 0.9, 0.36, 0.04],\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.46,\n\t\t\tlengthFactor: 1.02,\n\t\t},\n\t},\n});\n\nexport function spark(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(electricitySparkPreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const electricityStormPreset = defineSemanticParticlePreset({\n\tfamily: 'electricity',\n\tvariant: 'storm',\n\tdescription: 'restless volume of crackling atmospheric charge',\n\taxes: {\n\t\t'continuity vs discontinuity': 'mixed',\n\t\t'branching tendency': 'high',\n\t\t'snap/crackle quality': 'high',\n\t\t'seeking behavior': 'medium-high',\n\t\t'charge buildup': 'high',\n\t\t'rhythmic pulsing': 'medium',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 1.2,\n\t\t\tlooping: true,\n\t\t\tcolor: '#38bdf8',\n\t\t\tlife: [0.32, 0.82],\n\t\t\tsize: [0.08, 0.2],\n\t\t\tspeed: [2.2, 4.8],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.94,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'rate', rate: 34 },\n\t\tshape: {\n\t\t\ttype: 'sphere',\n\t\t\tradius: 0.16,\n\t\t\tthickness: 0.98,\n\t\t\tspeed: [1, 2],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#67e8f9', 0.25],\n\t\t\t\t\t['#2563eb', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.18, 0],\n\t\t\t\t\t[0.98, 0.06],\n\t\t\t\t\t[0.5, 0.5],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.62, 0.96, 0.84, 0.26],\n\t\t\tspeedOverLife: [1.18, 0.94, 0.66, 0.32],\n\t\t\tnoise: {\n\t\t\t\tfrequency: [4.8, 8.4],\n\t\t\t\tpower: [0.08, 0.18],\n\t\t\t\tpositionAmount: [0.18, 0.38],\n\t\t\t\trotationAmount: [0.08, 0.18],\n\t\t\t},\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.66,\n\t\t\tlengthFactor: 1.18,\n\t\t},\n\t},\n});\n\nexport function storm(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(electricityStormPreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const electricitySurgePreset = defineSemanticParticlePreset({\n\tfamily: 'electricity',\n\tvariant: 'surge',\n\tdescription: 'charge-rich spike that overwhelms the space',\n\taxes: {\n\t\t'continuity vs discontinuity': 'bursting',\n\t\t'branching tendency': 'medium',\n\t\t'snap/crackle quality': 'high',\n\t\t'seeking behavior': 'medium',\n\t\t'charge buildup': 'high',\n\t\t'rhythmic pulsing': 'medium',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 0.34,\n\t\t\tcolor: '#38bdf8',\n\t\t\tlife: [0.18, 0.36],\n\t\t\tsize: [0.12, 0.26],\n\t\t\tspeed: [2.8, 5.2],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.98,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'burst', count: 24 },\n\t\tshape: {\n\t\t\ttype: 'sphere',\n\t\t\tradius: 0.08,\n\t\t\tthickness: 0.98,\n\t\t\tspeed: [1.1, 2.2],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#67e8f9', 0.22],\n\t\t\t\t\t['#0ea5e9', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.22, 0],\n\t\t\t\t\t[1, 0.04],\n\t\t\t\t\t[0.52, 0.44],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.32, 0.9, 0.84, 0.08],\n\t\t\tspeedOverLife: [1.22, 0.88, 0.42, 0.06],\n\t\t\tnoise: {\n\t\t\t\tfrequency: [4.5, 8],\n\t\t\t\tpower: [0.08, 0.18],\n\t\t\t\tpositionAmount: [0.22, 0.42],\n\t\t\t\trotationAmount: [0.08, 0.16],\n\t\t\t},\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.68,\n\t\t\tlengthFactor: 1.2,\n\t\t},\n\t},\n});\n\nexport function surge(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(electricitySurgePreset, options);\n}\n","export { arc, electricityArcPreset } from './arc';\nexport { pulse, electricityPulsePreset } from './pulse';\nexport { spark, electricitySparkPreset } from './spark';\nexport { storm, electricityStormPreset } from './storm';\nexport { surge, electricitySurgePreset } from './surge';\n\nimport { arc } from './arc';\nimport { pulse } from './pulse';\nimport { spark } from './spark';\nimport { storm } from './storm';\nimport { surge } from './surge';\n\nexport const electricityPresets = {\n\tspark,\n\tarc,\n\tsurge,\n\tpulse,\n\tstorm,\n} as const;\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const fireBlazePreset = defineSemanticParticlePreset({\n\tfamily: 'fire',\n\tvariant: 'blaze',\n\tdescription: 'sustained, strong open burning',\n\taxes: {\n\t\t'heat feel': 'intense',\n\t\t'hunger/spread tendency': 'high',\n\t\t'smoke affinity': 'medium',\n\t\tturbulence: 'high',\n\t\tresiduality: 'medium',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 1.8,\n\t\t\tlooping: true,\n\t\t\tcolor: '#f97316',\n\t\t\tlife: [0.55, 1.1],\n\t\t\tsize: [0.32, 0.62],\n\t\t\tspeed: [0.55, 1.4],\n\t\t\trotation: [-0.24, 0.24],\n\t\t\topacity: 0.96,\n\t\t\trenderMode: RenderMode.VerticalBillBoard,\n\t\t},\n\t\temission: { type: 'rate', rate: 42 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.18,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.28,\n\t\t\tspeed: [0.35, 0.95],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#fde68a', 0.18],\n\t\t\t\t\t['#fb923c', 0.5],\n\t\t\t\t\t['#ef4444', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.18, 0],\n\t\t\t\t\t[1, 0.08],\n\t\t\t\t\t[0.56, 0.54],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.45, 0.92, 1.14, 0.22],\n\t\t\tspeedOverLife: [1.08, 0.96, 0.62, 0.16],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.38, 0.72],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [4.5, 6.5],\n\t\t\t\tpower: [0.1, 0.18],\n\t\t\t\tpositionAmount: [0.32, 0.55],\n\t\t\t\trotationAmount: [0.18, 0.3],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function blaze(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(fireBlazePreset, options);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const fireEmberPreset = defineSemanticParticlePreset({\n\tfamily: 'fire',\n\tvariant: 'ember',\n\tdescription: 'lingering, warm, residual, drifting',\n\taxes: {\n\t\t'heat feel': 'warm',\n\t\t'hunger/spread tendency': 'low',\n\t\t'smoke affinity': 'medium',\n\t\tturbulence: 'low',\n\t\tresiduality: 'high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 2.2,\n\t\t\tlooping: true,\n\t\t\tcolor: '#fb923c',\n\t\t\tlife: [1.1, 2.2],\n\t\t\tsize: [0.05, 0.14],\n\t\t\tspeed: [0.08, 0.32],\n\t\t\trotation: [-0.45, 0.45],\n\t\t\topacity: 0.9,\n\t\t},\n\t\temission: { type: 'rate', rate: 8 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.12,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.22,\n\t\t\tspeed: [0.08, 0.26],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#fff7d1', 0],\n\t\t\t\t\t['#fb923c', 0.35],\n\t\t\t\t\t['#b45309', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.12, 0],\n\t\t\t\t\t[0.9, 0.12],\n\t\t\t\t\t[0.42, 0.7],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.42, 0.9, 0.72, 0.18],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.18, 0.42],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1.2, 2.6],\n\t\t\t\tpower: [0.02, 0.08],\n\t\t\t\tpositionAmount: [0.06, 0.14],\n\t\t\t\trotationAmount: [0.04, 0.1],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function ember(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(fireEmberPreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const fireFlameletPreset = defineSemanticParticlePreset({\n\tfamily: 'fire',\n\tvariant: 'flamelet',\n\tdescription: 'small coherent tongue of flame',\n\taxes: {\n\t\t'heat feel': 'hot',\n\t\t'hunger/spread tendency': 'medium',\n\t\t'smoke affinity': 'low',\n\t\tturbulence: 'medium',\n\t\tresiduality: 'low',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 1.2,\n\t\t\tlooping: true,\n\t\t\tcolor: '#fb923c',\n\t\t\tlife: [0.48, 0.9],\n\t\t\tsize: [0.2, 0.38],\n\t\t\tspeed: [0.35, 0.9],\n\t\t\trotation: [-0.18, 0.18],\n\t\t\topacity: 0.94,\n\t\t\trenderMode: RenderMode.VerticalBillBoard,\n\t\t},\n\t\temission: { type: 'rate', rate: 22 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.1,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.18,\n\t\t\tspeed: [0.3, 0.72],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#fff7d1', 0],\n\t\t\t\t\t['#fbbf24', 0.24],\n\t\t\t\t\t['#fb923c', 0.62],\n\t\t\t\t\t['#ef4444', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.16, 0],\n\t\t\t\t\t[0.94, 0.1],\n\t\t\t\t\t[0.48, 0.58],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.44, 0.92, 1.08, 0.16],\n\t\t\tspeedOverLife: [1.08, 0.95, 0.62, 0.18],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.3, 0.55],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [3, 5],\n\t\t\t\tpower: [0.08, 0.14],\n\t\t\t\tpositionAmount: [0.24, 0.42],\n\t\t\t\trotationAmount: [0.16, 0.24],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function flamelet(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(fireFlameletPreset, options);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const fireSmolderPreset = defineSemanticParticlePreset({\n\tfamily: 'fire',\n\tvariant: 'smolder',\n\tdescription: 'low-oxygen, persistent, smoky heat',\n\taxes: {\n\t\t'heat feel': 'buried-hot',\n\t\t'hunger/spread tendency': 'low',\n\t\t'smoke affinity': 'high',\n\t\tturbulence: 'low',\n\t\tresiduality: 'high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 2.6,\n\t\t\tlooping: true,\n\t\t\tcolor: '#c2410c',\n\t\t\tlife: [1.4, 2.8],\n\t\t\tsize: [0.28, 0.58],\n\t\t\tspeed: [0.06, 0.22],\n\t\t\trotation: [-0.35, 0.35],\n\t\t\topacity: 0.76,\n\t\t},\n\t\temission: { type: 'rate', rate: 14 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.16,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.12,\n\t\t\tspeed: [0.04, 0.16],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#fed7aa', 0],\n\t\t\t\t\t['#c2410c', 0.28],\n\t\t\t\t\t['#525252', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.14, 0],\n\t\t\t\t\t[0.76, 0.12],\n\t\t\t\t\t[0.4, 0.68],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.34, 0.86, 1.08, 0.46],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.08, 0.2],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1.6, 3.1],\n\t\t\t\tpower: [0.04, 0.12],\n\t\t\t\tpositionAmount: [0.12, 0.26],\n\t\t\t\trotationAmount: [0.06, 0.14],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function smolder(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(fireSmolderPreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const fireSparkPreset = defineSemanticParticlePreset({\n\tfamily: 'fire',\n\tvariant: 'spark',\n\tdescription: 'tiny, sudden, energetic, fleeting',\n\taxes: {\n\t\t'heat feel': 'sharp-hot',\n\t\t'hunger/spread tendency': 'low',\n\t\t'smoke affinity': 'low',\n\t\tturbulence: 'high',\n\t\tresiduality: 'low',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 0.24,\n\t\t\tcolor: '#ffd166',\n\t\t\tlife: [0.12, 0.24],\n\t\t\tsize: [0.08, 0.16],\n\t\t\tspeed: [1.8, 4.6],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'burst', count: 10 },\n\t\tshape: {\n\t\t\ttype: 'sphere',\n\t\t\tradius: 0.05,\n\t\t\tthickness: 0.92,\n\t\t\tspeed: [0.45, 1.2],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#fde68a', 0.2],\n\t\t\t\t\t['#fb923c', 0.62],\n\t\t\t\t\t['#ef4444', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.18, 0],\n\t\t\t\t\t[1, 0.08],\n\t\t\t\t\t[0.52, 0.5],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.48, 1.08, 0.88, 0.06],\n\t\t\tspeedOverLife: [1.18, 0.88, 0.42, 0.04],\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.55,\n\t\t\tlengthFactor: 1.08,\n\t\t},\n\t},\n});\n\nexport function spark(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(fireSparkPreset, options);\n}\n","export { blaze, fireBlazePreset } from './blaze';\nexport { ember, fireEmberPreset } from './ember';\nexport { flamelet, fireFlameletPreset } from './flamelet';\nexport { smolder, fireSmolderPreset } from './smolder';\nexport { spark, fireSparkPreset } from './spark';\n\nimport { blaze } from './blaze';\nimport { ember } from './ember';\nimport { flamelet } from './flamelet';\nimport { smolder } from './smolder';\nimport { spark } from './spark';\n\nexport const firePresets = {\n\tspark,\n\tember,\n\tflamelet,\n\tblaze,\n\tsmolder,\n} as const;\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const gasHazePreset = defineSemanticParticlePreset({\n\tfamily: 'gas',\n\tvariant: 'haze',\n\tdescription: 'broad, thin atmospheric contamination',\n\taxes: {\n\t\t'opacity feel': 'low',\n\t\ttoxicity: 'low-medium',\n\t\tbuoyancy: 'neutral',\n\t\t'spread tendency': 'high',\n\t\tthickness: 'thin',\n\t\t'staining / contaminating character': 'low',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 4.4,\n\t\t\tlooping: true,\n\t\t\tcolor: '#cbd5e1',\n\t\t\tlife: [3.4, 5.4],\n\t\t\tsize: [0.9, 1.7],\n\t\t\tspeed: [0.02, 0.08],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.18,\n\t\t},\n\t\temission: { type: 'rate', rate: 10 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.64,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.5,\n\t\t\tspeed: [0.01, 0.04],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#f8fafc', 0],\n\t\t\t\t\t['#cbd5e1', 0.4],\n\t\t\t\t\t['#94a3b8', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.04, 0],\n\t\t\t\t\t[0.2, 0.24],\n\t\t\t\t\t[0.08, 0.88],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.88, 1.08, 1.28, 1.42],\n\t\t\tnoise: {\n\t\t\t\tfrequency: [0.6, 1.4],\n\t\t\t\tpower: [0.02, 0.06],\n\t\t\t\tpositionAmount: [0.08, 0.16],\n\t\t\t\trotationAmount: [0.06, 0.1],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function haze(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(gasHazePreset, options);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const gasMiasmaPreset = defineSemanticParticlePreset({\n\tfamily: 'gas',\n\tvariant: 'miasma',\n\tdescription: 'thick, toxic, contaminating exhalation',\n\taxes: {\n\t\t'opacity feel': 'medium',\n\t\ttoxicity: 'high',\n\t\tbuoyancy: 'low-medium',\n\t\t'spread tendency': 'high',\n\t\tthickness: 'sticky',\n\t\t'staining / contaminating character': 'high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 3.8,\n\t\t\tlooping: true,\n\t\t\tcolor: '#84cc16',\n\t\t\tlife: [2.8, 4.6],\n\t\t\tsize: [0.52, 1.08],\n\t\t\tspeed: [0.03, 0.16],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.5,\n\t\t},\n\t\temission: { type: 'rate', rate: 16 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.3,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.3,\n\t\t\tspeed: [0.02, 0.08],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ecfccb', 0],\n\t\t\t\t\t['#84cc16', 0.4],\n\t\t\t\t\t['#3f6212', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.08, 0],\n\t\t\t\t\t[0.58, 0.14],\n\t\t\t\t\t[0.24, 0.8],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.4, 0.92, 1.3, 1.9],\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1.8, 3.8],\n\t\t\t\tpower: [0.08, 0.18],\n\t\t\t\tpositionAmount: [0.16, 0.34],\n\t\t\t\trotationAmount: [0.08, 0.18],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function miasma(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(gasMiasmaPreset, options);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const gasPlumePreset = defineSemanticParticlePreset({\n\tfamily: 'gas',\n\tvariant: 'plume',\n\tdescription: 'columnar rising release with strong lift',\n\taxes: {\n\t\t'opacity feel': 'medium',\n\t\ttoxicity: 'medium',\n\t\tbuoyancy: 'very-high',\n\t\t'spread tendency': 'medium',\n\t\tthickness: 'medium',\n\t\t'staining / contaminating character': 'medium',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 2.8,\n\t\t\tlooping: true,\n\t\t\tcolor: '#94a3b8',\n\t\t\tlife: [1.8, 3.2],\n\t\t\tsize: [0.32, 0.72],\n\t\t\tspeed: [0.16, 0.52],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.48,\n\t\t},\n\t\temission: { type: 'rate', rate: 22 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.18,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.18,\n\t\t\tspeed: [0.08, 0.24],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#e2e8f0', 0],\n\t\t\t\t\t['#94a3b8', 0.36],\n\t\t\t\t\t['#475569', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.06, 0],\n\t\t\t\t\t[0.54, 0.14],\n\t\t\t\t\t[0.2, 0.84],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.42, 0.92, 1.36, 1.84],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.28, 0.6],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1.6, 3.4],\n\t\t\t\tpower: [0.08, 0.14],\n\t\t\t\tpositionAmount: [0.14, 0.28],\n\t\t\t\trotationAmount: [0.08, 0.16],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function plume(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(gasPlumePreset, options);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const gasSmokePreset = defineSemanticParticlePreset({\n\tfamily: 'gas',\n\tvariant: 'smoke',\n\tdescription: 'opaque, buoyant, lingering combustion residue',\n\taxes: {\n\t\t'opacity feel': 'medium-high',\n\t\ttoxicity: 'medium',\n\t\tbuoyancy: 'high',\n\t\t'spread tendency': 'medium',\n\t\tthickness: 'medium',\n\t\t'staining / contaminating character': 'medium',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 3.2,\n\t\t\tlooping: true,\n\t\t\tcolor: '#737373',\n\t\t\tlife: [2.4, 4.2],\n\t\t\tsize: [0.45, 0.92],\n\t\t\tspeed: [0.08, 0.3],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.58,\n\t\t},\n\t\temission: { type: 'rate', rate: 14 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.24,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.28,\n\t\t\tspeed: [0.04, 0.14],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#d4d4d8', 0],\n\t\t\t\t\t['#737373', 0.4],\n\t\t\t\t\t['#404040', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.08, 0],\n\t\t\t\t\t[0.68, 0.14],\n\t\t\t\t\t[0.24, 0.84],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.38, 0.88, 1.4, 2.08],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.12, 0.28],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1.2, 2.8],\n\t\t\t\tpower: [0.08, 0.16],\n\t\t\t\tpositionAmount: [0.12, 0.26],\n\t\t\t\trotationAmount: [0.08, 0.18],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function smoke(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(gasSmokePreset, options);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const gasVaporPreset = defineSemanticParticlePreset({\n\tfamily: 'gas',\n\tvariant: 'vapor',\n\tdescription: 'visible gaseous release with light buoyancy',\n\taxes: {\n\t\t'opacity feel': 'light',\n\t\ttoxicity: 'neutral',\n\t\tbuoyancy: 'high',\n\t\t'spread tendency': 'medium',\n\t\tthickness: 'thin',\n\t\t'staining / contaminating character': 'low',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 3,\n\t\t\tlooping: true,\n\t\t\tcolor: '#e2e8f0',\n\t\t\tlife: [2.2, 3.6],\n\t\t\tsize: [0.38, 0.78],\n\t\t\tspeed: [0.04, 0.18],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.28,\n\t\t},\n\t\temission: { type: 'rate', rate: 18 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.28,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.36,\n\t\t\tspeed: [0.02, 0.08],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#f8fafc', 0],\n\t\t\t\t\t['#e2e8f0', 0.36],\n\t\t\t\t\t['#cbd5e1', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.06, 0],\n\t\t\t\t\t[0.34, 0.22],\n\t\t\t\t\t[0.12, 0.84],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.42, 0.9, 1.38, 1.98],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.06, 0.18],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1, 2],\n\t\t\t\tpower: [0.04, 0.08],\n\t\t\t\tpositionAmount: [0.1, 0.2],\n\t\t\t\trotationAmount: [0.08, 0.14],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function vapor(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(gasVaporPreset, options);\n}\n","export { haze, gasHazePreset } from './haze';\nexport { miasma, gasMiasmaPreset } from './miasma';\nexport { plume, gasPlumePreset } from './plume';\nexport { smoke, gasSmokePreset } from './smoke';\nexport { vapor, gasVaporPreset } from './vapor';\n\nimport { haze } from './haze';\nimport { miasma } from './miasma';\nimport { plume } from './plume';\nimport { smoke } from './smoke';\nimport { vapor } from './vapor';\n\nexport const gasPresets = {\n\tvapor,\n\tsmoke,\n\thaze,\n\tplume,\n\tmiasma,\n} as const;\n","import {\n\tcreateMagicModifier,\n\ttype ParticleMagicModifierOptions,\n} from '../../preset-builder';\n\nexport function arcane(\n\toptions: Omit<ParticleMagicModifierOptions, 'alignment'> = {},\n) {\n\treturn createMagicModifier('arcane', options);\n}\n","import {\n\tcreateMagicModifier,\n\ttype ParticleMagicModifierOptions,\n} from '../../preset-builder';\n\nexport function corrupted(\n\toptions: Omit<ParticleMagicModifierOptions, 'alignment'> = {},\n) {\n\treturn createMagicModifier('corrupted', options);\n}\n","import {\n\tcreateMagicModifier,\n\ttype ParticleMagicModifierOptions,\n} from '../../preset-builder';\n\nexport function holy(\n\toptions: Omit<ParticleMagicModifierOptions, 'alignment'> = {},\n) {\n\treturn createMagicModifier('holy', options);\n}\n","import {\n\tcreateMagicModifier,\n\ttype ParticleMagicModifierOptions,\n} from '../../preset-builder';\n\nexport function nature(\n\toptions: Omit<ParticleMagicModifierOptions, 'alignment'> = {},\n) {\n\treturn createMagicModifier('nature', options);\n}\n","import {\n\tcreateMagicModifier,\n\ttype ParticleMagicModifierOptions,\n} from '../../preset-builder';\n\nexport function psychic(\n\toptions: Omit<ParticleMagicModifierOptions, 'alignment'> = {},\n) {\n\treturn createMagicModifier('psychic', options);\n}\n","import {\n\tcreateMagicModifier,\n\ttype ParticleMagicModifierOptions,\n} from '../../preset-builder';\n\nexport function voidMagic(\n\toptions: Omit<ParticleMagicModifierOptions, 'alignment'> = {},\n) {\n\treturn createMagicModifier('void', options);\n}\n","export { arcane } from './arcane';\nexport { corrupted } from './corrupted';\nexport { holy } from './holy';\nexport { nature } from './nature';\nexport { psychic } from './psychic';\nexport { voidMagic } from './void';\n\nimport { arcane } from './arcane';\nimport { corrupted } from './corrupted';\nimport { holy } from './holy';\nimport { nature } from './nature';\nimport { psychic } from './psychic';\nimport { voidMagic } from './void';\n\nexport const magicPresets = {\n\tarcane,\n\tholy,\n\tcorrupted,\n\tnature,\n\tvoid: voidMagic,\n\tpsychic,\n} as const;\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const waterDrizzlePreset = defineSemanticParticlePreset({\n\tfamily: 'water',\n\tvariant: 'drizzle',\n\tdescription: 'soft, continuous, light fall',\n\taxes: {\n\t\tpressure: 'low',\n\t\t'surface tension feel': 'light',\n\t\taeration: 'low',\n\t\tcoherence: 'discrete',\n\t\t'gravitational obedience': 'very-high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 1.4,\n\t\t\tlooping: true,\n\t\t\tcolor: '#e0f2fe',\n\t\t\tlife: [0.6, 1.05],\n\t\t\tsize: [0.05, 0.1],\n\t\t\tspeed: [2.8, 4.4],\n\t\t\topacity: 0.62,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'rate', rate: 26 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.46,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.04,\n\t\t\tspeed: [1.8, 2.6],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#f8fafc', 0],\n\t\t\t\t\t['#e0f2fe', 0.45],\n\t\t\t\t\t['#7dd3fc', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.12, 0],\n\t\t\t\t\t[0.78, 0.08],\n\t\t\t\t\t[0.52, 0.58],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tspeedOverLife: [1.02, 1, 0.94, 0.88],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [-8.2, -6.4],\n\t\t\t},\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.42,\n\t\t\tlengthFactor: 1.24,\n\t\t},\n\t},\n});\n\nexport function drizzle(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(waterDrizzlePreset, options);\n}\n","import {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const waterMistPreset = defineSemanticParticlePreset({\n\tfamily: 'water',\n\tvariant: 'mist',\n\tdescription: 'diffuse suspended moisture',\n\taxes: {\n\t\tpressure: 'low',\n\t\t'surface tension feel': 'soft',\n\t\taeration: 'low',\n\t\tcoherence: 'diffuse',\n\t\t'gravitational obedience': 'low',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 3.2,\n\t\t\tlooping: true,\n\t\t\tcolor: '#dbeafe',\n\t\t\tlife: [2.4, 3.8],\n\t\t\tsize: [0.4, 0.82],\n\t\t\tspeed: [0.05, 0.2],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.36,\n\t\t},\n\t\temission: { type: 'rate', rate: 16 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.32,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.42,\n\t\t\tspeed: [0.02, 0.08],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#f8fafc', 0],\n\t\t\t\t\t['#dbeafe', 0.35],\n\t\t\t\t\t['#bfdbfe', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.08, 0],\n\t\t\t\t\t[0.44, 0.2],\n\t\t\t\t\t[0.18, 0.82],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.38, 0.86, 1.42, 2.02],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [0.02, 0.12],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [0.8, 1.8],\n\t\t\t\tpower: [0.04, 0.1],\n\t\t\t\tpositionAmount: [0.1, 0.18],\n\t\t\t\trotationAmount: [0.08, 0.14],\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport function mist(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(waterMistPreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const waterSplashPreset = defineSemanticParticlePreset({\n\tfamily: 'water',\n\tvariant: 'splash',\n\tdescription: 'sudden impact-driven burst',\n\taxes: {\n\t\tpressure: 'impact-driven',\n\t\t'surface tension feel': 'beaded',\n\t\taeration: 'medium',\n\t\tcoherence: 'shattering',\n\t\t'gravitational obedience': 'high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 0.34,\n\t\t\tcolor: '#7dd3fc',\n\t\t\tlife: [0.26, 0.55],\n\t\t\tsize: [0.1, 0.22],\n\t\t\tspeed: [1.4, 3.1],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.82,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'burst', count: 18 },\n\t\tshape: {\n\t\t\ttype: 'sphere',\n\t\t\tradius: 0.08,\n\t\t\tthickness: 0.96,\n\t\t\tspeed: [0.7, 1.4],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#ffffff', 0],\n\t\t\t\t\t['#bae6fd', 0.4],\n\t\t\t\t\t['#38bdf8', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.18, 0],\n\t\t\t\t\t[0.88, 0.08],\n\t\t\t\t\t[0.42, 0.54],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.32, 0.86, 0.92, 0.08],\n\t\t\tspeedOverLife: [1.12, 0.88, 0.46, 0.08],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [-4.4, -2.6],\n\t\t\t},\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.36,\n\t\t\tlengthFactor: 0.88,\n\t\t},\n\t},\n});\n\nexport function splash(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(waterSplashPreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const waterSprayPreset = defineSemanticParticlePreset({\n\tfamily: 'water',\n\tvariant: 'spray',\n\tdescription: 'fine ejected droplets',\n\taxes: {\n\t\tpressure: 'medium-high',\n\t\t'surface tension feel': 'light',\n\t\taeration: 'medium',\n\t\tcoherence: 'broken',\n\t\t'gravitational obedience': 'high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 1,\n\t\t\tlooping: true,\n\t\t\tcolor: '#93c5fd',\n\t\t\tlife: [0.45, 0.9],\n\t\t\tsize: [0.08, 0.16],\n\t\t\tspeed: [1.1, 2.3],\n\t\t\trotation: [-Math.PI, Math.PI],\n\t\t\topacity: 0.72,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'rate', rate: 38 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.12,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.24,\n\t\t\tspeed: [0.85, 1.8],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#eff6ff', 0],\n\t\t\t\t\t['#93c5fd', 0.45],\n\t\t\t\t\t['#60a5fa', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.16, 0],\n\t\t\t\t\t[0.82, 0.08],\n\t\t\t\t\t[0.52, 0.58],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.72, 0.96, 0.82, 0.28],\n\t\t\tspeedOverLife: [1.04, 0.92, 0.68, 0.38],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [-5.8, -3.8],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1.2, 2.2],\n\t\t\t\tpower: [0.04, 0.08],\n\t\t\t\tpositionAmount: [0.08, 0.16],\n\t\t\t\trotationAmount: [0.04, 0.08],\n\t\t\t},\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.5,\n\t\t\tlengthFactor: 0.95,\n\t\t},\n\t},\n});\n\nexport function spray(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(waterSprayPreset, options);\n}\n","import { RenderMode } from 'three.quarks';\n\nimport {\n\tcreateSemanticParticleEffect,\n\tdefineSemanticParticlePreset,\n\ttype SemanticParticlePresetOptions,\n} from '../../preset-builder';\n\nexport const waterTorrentPreset = defineSemanticParticlePreset({\n\tfamily: 'water',\n\tvariant: 'torrent',\n\tdescription: 'strong, forceful, dense flow',\n\taxes: {\n\t\tpressure: 'high',\n\t\t'surface tension feel': 'driven',\n\t\taeration: 'medium',\n\t\tcoherence: 'strong',\n\t\t'gravitational obedience': 'high',\n\t},\n\tsystem: {\n\t\tdefaults: {\n\t\t\tduration: 1,\n\t\t\tlooping: true,\n\t\t\tcolor: '#38bdf8',\n\t\t\tlife: [0.35, 0.75],\n\t\t\tsize: [0.1, 0.22],\n\t\t\tspeed: [2.6, 4.9],\n\t\t\trotation: [-0.3, 0.3],\n\t\t\topacity: 0.84,\n\t\t\trenderMode: RenderMode.StretchedBillBoard,\n\t\t},\n\t\temission: { type: 'rate', rate: 60 },\n\t\tshape: {\n\t\t\ttype: 'cone',\n\t\t\tradius: 0.18,\n\t\t\tthickness: 1,\n\t\t\tangle: 0.12,\n\t\t\tspeed: [1.8, 3.1],\n\t\t},\n\t\tbehaviors: {\n\t\t\tcolorOverLife: {\n\t\t\t\tcolors: [\n\t\t\t\t\t['#f0f9ff', 0],\n\t\t\t\t\t['#7dd3fc', 0.35],\n\t\t\t\t\t['#0ea5e9', 1],\n\t\t\t\t],\n\t\t\t\talpha: [\n\t\t\t\t\t[0.18, 0],\n\t\t\t\t\t[0.92, 0.08],\n\t\t\t\t\t[0.56, 0.52],\n\t\t\t\t\t[0, 1],\n\t\t\t\t],\n\t\t\t},\n\t\t\tsizeOverLife: [0.72, 0.94, 0.84, 0.28],\n\t\t\tspeedOverLife: [1.04, 0.92, 0.68, 0.34],\n\t\t\tforceOverLife: {\n\t\t\t\ty: [-6.8, -4.8],\n\t\t\t},\n\t\t\tnoise: {\n\t\t\t\tfrequency: [1.4, 2.6],\n\t\t\t\tpower: [0.04, 0.09],\n\t\t\t\tpositionAmount: [0.08, 0.14],\n\t\t\t\trotationAmount: [0.06, 0.1],\n\t\t\t},\n\t\t},\n\t\trendererEmitterSettings: {\n\t\t\tspeedFactor: 0.56,\n\t\t\tlengthFactor: 1.08,\n\t\t},\n\t},\n});\n\nexport function torrent(\n\toptions: SemanticParticlePresetOptions = {},\n) {\n\treturn createSemanticParticleEffect(waterTorrentPreset, options);\n}\n","export { drizzle, waterDrizzlePreset } from './drizzle';\nexport { mist, waterMistPreset } from './mist';\nexport { splash, waterSplashPreset } from './splash';\nexport { spray, waterSprayPreset } from './spray';\nexport { torrent, waterTorrentPreset } from './torrent';\n\nimport { drizzle } from './drizzle';\nimport { mist } from './mist';\nimport { splash } from './splash';\nimport { spray } from './spray';\nimport { torrent } from './torrent';\n\nexport const waterPresets = {\n\tmist,\n\tspray,\n\tsplash,\n\tdrizzle,\n\ttorrent,\n} as const;\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OAKM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGM;AA6LP,IAAM,sCAGF;AAAA,EACH,QAAQ;AAAA,IACP,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAW;AAAA,EACZ;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAW;AAAA,EACZ;AAAA,EACA,WAAW;AAAA,IACV,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAW;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACP,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAW;AAAA,EACZ;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAW;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACR,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,eAAe;AAAA,IACf,WAAW;AAAA,EACZ;AACD;AAEA,I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AAI;AAAA,MACrC,eAAe,CAAC,MAAM,MAAM,MAAM,IAAI;AAAA,MACtC,eAAe;AAAA,QACd,GAAG,CAAC,MAAM,IAAI;AAAA,MACf;AAAA,MACA,OAAO;AAAA,QACN,WAAW,CAAC,KAAK,GAAG;AAAA,QACpB,OAAO,CAAC,MAAM,IAAI;AAAA,QAClB,gBAAgB,CAAC,MAAM,IAAI;AAAA,QAC3B,gBAAgB,CAAC,MAAM,GAAG;AAAA,MAC3B;AAAA,IACD;AAAA,IACA,yBAAyB;AAAA,MACxB,aAAa;AAAA,MACb,cAAc;AAAA,IACf;AAAA,EACD;AACD,CAAC;AAEM,SAAS,QACf,UAAyC,CAAC,GACzC;AACD,SAAO,6BAA6B,oBAAoB,OAAO;AAChE;;;AChEO,IAAM,eAAe;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":["RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","spark","spark","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode","RenderMode"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/behaviors/particle-emitter/particle-emitter.descriptor.ts","../src/lib/behaviors/particle-emitter/particle-effect.ts"],"sourcesContent":["import { Group, Object3D, Quaternion, Vector3 } from 'three';\nimport {\n\tBatchedRenderer,\n\tParticleSystem,\n\ttype ParticleSystemEvent,\n} from 'three.quarks';\n\nimport { defineBehavior, type BehaviorRef } from '../behavior-descriptor';\nimport type { BehaviorEntityLink, BehaviorSystem } from '../behavior-system';\nimport { VEC3_ZERO, type Vec3Input, normalizeVec3, toThreeVector3 } from '../../core/vector';\nfunction getRefGlobals(\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n): (() => any) | null {\n\treturn ((ref as any).__getGlobals ?? null) as (() => any) | null;\n}\nimport type { ParticleEffectDefinition } from './particle-effect';\n\nexport interface ParticleEmitterBehaviorOptions {\n\teffect: ParticleEffectDefinition;\n\tautoplay: boolean;\n\tlocalOffset?: Vec3Input;\n\tfollowPosition: boolean;\n\tfollowRotation: boolean;\n\tautoDestroy: boolean;\n}\n\nexport interface ParticleEmitterHandle {\n\tplay(): void;\n\tstop(): void;\n\tpause(): void;\n\trestart(): void;\n\tburst(): void;\n\tisPlaying(): boolean;\n\tgetSystem(): ParticleSystem | null;\n}\n\ntype DesiredParticleState = 'playing' | 'paused' | 'stopped';\n\ninterface ParticleEmitterControlState {\n\tdesiredState: DesiredParticleState;\n\tpendingRestart: boolean;\n\truntime: ParticleEmitterRuntime | null;\n}\n\ninterface ParticleEmitterRuntime {\n\tsystem: ParticleSystem;\n\tanchor: Group;\n\tservice: ParticleRendererService;\n\tinitialPosition: Vector3;\n\tinitialQuaternion: Quaternion;\n\tonDestroy: (event: ParticleSystemEvent) => void;\n}\n\ninterface ParticleEmitterHostEntity {\n\tuuid: string;\n\tname?: string;\n\tbody?: {\n\t\ttranslation(): { x: number; y: number; z: number };\n\t\trotation?(): { x: number; y: number; z: number; w: number };\n\t} | null;\n\tgroup?: Object3D | null;\n\tmesh?: Object3D | null;\n\toptions?: {\n\t\tposition?: Vec3Input;\n\t};\n\tmarkedForRemoval?: boolean;\n\tnodeDestroy?(params: { me: unknown; globals: unknown }): void;\n\t__zylemParticleSystemEntity?: boolean;\n}\n\nconst PARTICLE_EMITTER_BEHAVIOR_KEY = Symbol.for(\n\t'zylem:behavior:particle-emitter',\n);\n\nconst DEFAULT_PARTICLE_EFFECT: ParticleEffectDefinition = {\n\tcreate() {\n\t\tthrow new Error(\n\t\t\t'ParticleEmitterBehavior requires an effect definition created with particleEffect(...).',\n\t\t);\n\t},\n};\n\nconst defaultOptions: ParticleEmitterBehaviorOptions = {\n\teffect: DEFAULT_PARTICLE_EFFECT,\n\tautoplay: true,\n\tlocalOffset: undefined,\n\tfollowPosition: true,\n\tfollowRotation: true,\n\tautoDestroy: false,\n};\n\nclass ParticleRendererService {\n\treadonly renderer = new BatchedRenderer();\n\tprivate readonly systems = new Set<ParticleSystem>();\n\n\tconstructor(private readonly sceneRoot: Object3D) {\n\t\tthis.renderer.name = 'zylem-particle-batch-renderer';\n\t\tthis.sceneRoot.add(this.renderer);\n\t}\n\n\tregister(system: ParticleSystem): void {\n\t\tif (this.systems.has(system)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.renderer.addSystem(system);\n\t\tthis.systems.add(system);\n\t}\n\n\tforget(system: ParticleSystem): void {\n\t\tthis.systems.delete(system);\n\t}\n\n\tupdate(delta: number): void {\n\t\tthis.renderer.update(delta);\n\t}\n\n\tdestroy(): void {\n\t\tthis.systems.clear();\n\t\tthis.renderer.removeFromParent();\n\t}\n}\n\nfunction getParticleControlState(\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n): ParticleEmitterControlState {\n\tconst runtimeState = (ref as any).__particleEmitterControlState as\n\t\t| ParticleEmitterControlState\n\t\t| undefined;\n\tif (runtimeState) {\n\t\treturn runtimeState;\n\t}\n\n\tconst nextState: ParticleEmitterControlState = {\n\t\tdesiredState: ref.options.autoplay ? 'playing' : 'stopped',\n\t\tpendingRestart: false,\n\t\truntime: null,\n\t};\n\t(ref as any).__particleEmitterControlState = nextState;\n\treturn nextState;\n}\n\nfunction shouldCreateRuntime(\n\tstate: ParticleEmitterControlState,\n): boolean {\n\treturn state.runtime == null\n\t\t&& (state.desiredState !== 'stopped' || state.pendingRestart);\n}\n\nfunction getLocalOffset(options: ParticleEmitterBehaviorOptions): Vector3 {\n\treturn toThreeVector3(options.localOffset, VEC3_ZERO);\n}\n\nfunction readHostTransform(entity: ParticleEmitterHostEntity): {\n\tposition: Vector3;\n\tquaternion: Quaternion;\n} {\n\tconst wasmPose = (entity as any).getPose?.();\n\tif (wasmPose && (entity as any).runtimeHandle >= 0) {\n\t\treturn {\n\t\t\tposition: new Vector3(wasmPose.position.x, wasmPose.position.y, wasmPose.position.z),\n\t\t\tquaternion: new Quaternion(\n\t\t\t\twasmPose.rotation.x,\n\t\t\t\twasmPose.rotation.y,\n\t\t\t\twasmPose.rotation.z,\n\t\t\t\twasmPose.rotation.w,\n\t\t\t),\n\t\t};\n\t}\n\n\tif (entity.body?.translation) {\n\t\tconst position = entity.body.translation();\n\t\tconst rotation = entity.body.rotation?.() ?? { x: 0, y: 0, z: 0, w: 1 };\n\t\treturn {\n\t\t\tposition: new Vector3(position.x, position.y, position.z),\n\t\t\tquaternion: new Quaternion(rotation.x, rotation.y, rotation.z, rotation.w),\n\t\t};\n\t}\n\n\tconst visualRoot = entity.group ?? entity.mesh;\n\tif (visualRoot) {\n\t\tconst position = new Vector3();\n\t\tconst quaternion = new Quaternion();\n\t\tvisualRoot.getWorldPosition(position);\n\t\tvisualRoot.getWorldQuaternion(quaternion);\n\t\treturn { position, quaternion };\n\t}\n\n\tconst position = normalizeVec3(entity.options?.position, VEC3_ZERO);\n\treturn {\n\t\tposition: new Vector3(position.x, position.y, position.z),\n\t\tquaternion: new Quaternion(),\n\t};\n}\n\nfunction syncRuntimeTransform(\n\tentity: ParticleEmitterHostEntity,\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n\truntime: ParticleEmitterRuntime,\n): void {\n\tconst current = readHostTransform(entity);\n\tconst options = ref.options;\n\tconst basePosition = options.followPosition\n\t\t? current.position\n\t\t: runtime.initialPosition;\n\tconst baseQuaternion = options.followRotation\n\t\t? current.quaternion\n\t\t: runtime.initialQuaternion;\n\tconst offset = getLocalOffset(options);\n\n\tif (options.followRotation) {\n\t\toffset.applyQuaternion(baseQuaternion);\n\t}\n\n\truntime.anchor.position.copy(basePosition).add(offset);\n\truntime.anchor.quaternion.copy(baseQuaternion);\n}\n\nfunction applyRuntimeState(\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n): void {\n\tconst state = getParticleControlState(ref);\n\tconst runtime = state.runtime;\n\tif (!runtime) {\n\t\treturn;\n\t}\n\n\tif (state.pendingRestart) {\n\t\truntime.system.restart();\n\t\tstate.pendingRestart = false;\n\t}\n\n\tif (state.desiredState === 'paused') {\n\t\truntime.system.pause();\n\t\treturn;\n\t}\n\n\tif (state.desiredState === 'stopped') {\n\t\truntime.system.stop();\n\t\treturn;\n\t}\n\n\truntime.system.play();\n}\n\nfunction releaseRuntime(\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n\treason: 'manual' | 'system-destroyed',\n): void {\n\tconst state = getParticleControlState(ref);\n\tconst runtime = state.runtime;\n\tif (!runtime) {\n\t\treturn;\n\t}\n\n\tstate.runtime = null;\n\tstate.pendingRestart = false;\n\n\truntime.system.removeEventListener('destroy', runtime.onDestroy);\n\truntime.service.forget(runtime.system);\n\n\tif (reason === 'manual') {\n\t\truntime.system.dispose();\n\t}\n\n\truntime.anchor.removeFromParent();\n}\n\nfunction handleSystemDestroyed(\n\tentity: ParticleEmitterHostEntity,\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n): void {\n\treleaseRuntime(ref, 'system-destroyed');\n\tconst state = getParticleControlState(ref);\n\tstate.desiredState = 'stopped';\n\n\tif (\n\t\tref.options.autoDestroy\n\t\t&& entity.__zylemParticleSystemEntity\n\t\t&& !entity.markedForRemoval\n\t) {\n\t\tentity.nodeDestroy?.({ me: entity, globals: getRefGlobals(ref)?.() ?? {} });\n\t}\n}\n\nfunction createRuntime(\n\tentity: ParticleEmitterHostEntity,\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n\tservice: ParticleRendererService,\n): ParticleEmitterRuntime {\n\tconst system = ref.options.effect.create();\n\tconst anchor = new Group();\n\tconst initialTransform = readHostTransform(entity);\n\tconst runtime: ParticleEmitterRuntime = {\n\t\tsystem,\n\t\tanchor,\n\t\tservice,\n\t\tinitialPosition: initialTransform.position.clone(),\n\t\tinitialQuaternion: initialTransform.quaternion.clone(),\n\t\tonDestroy: () => handleSystemDestroyed(entity, ref),\n\t};\n\n\tanchor.name = `${entity.name || entity.uuid}:particle-anchor`;\n\tsystem.autoDestroy = ref.options.autoDestroy;\n\tanchor.add(system.emitter);\n\tservice.register(system);\n\tservice.renderer.parent?.add(anchor);\n\tsystem.addEventListener('destroy', runtime.onDestroy);\n\n\tsyncRuntimeTransform(entity, ref, runtime);\n\treturn runtime;\n}\n\nfunction createParticleEmitterHandle(\n\tref: BehaviorRef<ParticleEmitterBehaviorOptions>,\n): ParticleEmitterHandle {\n\treturn {\n\t\tplay: () => {\n\t\t\tconst state = getParticleControlState(ref);\n\t\t\tstate.desiredState = 'playing';\n\t\t\tapplyRuntimeState(ref);\n\t\t},\n\t\tstop: () => {\n\t\t\tconst state = getParticleControlState(ref);\n\t\t\tstate.desiredState = 'stopped';\n\t\t\tstate.pendingRestart = false;\n\t\t\tapplyRuntimeState(ref);\n\t\t},\n\t\tpause: () => {\n\t\t\tconst state = getParticleControlState(ref);\n\t\t\tstate.desiredState = 'paused';\n\t\t\tapplyRuntimeState(ref);\n\t\t},\n\t\trestart: () => {\n\t\t\tconst state = getParticleControlState(ref);\n\t\t\tstate.desiredState = 'playing';\n\t\t\tstate.pendingRestart = true;\n\t\t\tapplyRuntimeState(ref);\n\t\t},\n\t\tburst: () => {\n\t\t\tconst state = getParticleControlState(ref);\n\t\t\tstate.desiredState = 'playing';\n\t\t\tstate.pendingRestart = true;\n\t\t\tapplyRuntimeState(ref);\n\t\t},\n\t\tisPlaying: () => {\n\t\t\tconst runtime = getParticleControlState(ref).runtime;\n\t\t\tif (!runtime) {\n\t\t\t\treturn getParticleControlState(ref).desiredState === 'playing';\n\t\t\t}\n\t\t\treturn !runtime.system.paused;\n\t\t},\n\t\tgetSystem: () => getParticleControlState(ref).runtime?.system ?? null,\n\t};\n}\n\nclass ParticleEmitterBehaviorSystem implements BehaviorSystem {\n\tprivate rendererService: ParticleRendererService | null = null;\n\n\tconstructor(\n\t\tprivate readonly scene: { scene: Object3D },\n\t\tprivate readonly getBehaviorLinks?: (key: symbol) => Iterable<BehaviorEntityLink>,\n\t\tprivate readonly getGlobals?: () => any,\n\t) {}\n\n\tprivate getRendererService(): ParticleRendererService {\n\t\tif (!this.rendererService) {\n\t\t\tthis.rendererService = new ParticleRendererService(this.scene.scene);\n\t\t}\n\t\treturn this.rendererService;\n\t}\n\n\tupdate(_ecs: unknown, delta: number): void {\n\t\tconst links = this.getBehaviorLinks?.(PARTICLE_EMITTER_BEHAVIOR_KEY);\n\t\tif (!links) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet hasRuntime = false;\n\t\tlet rendererService = this.rendererService;\n\n\t\tfor (const link of links) {\n\t\t\tconst entity = link.entity as ParticleEmitterHostEntity;\n\t\t\tconst ref = link.ref as BehaviorRef<ParticleEmitterBehaviorOptions>;\n\t\t\t(ref as any).__getGlobals = this.getGlobals;\n\t\t\tconst state = getParticleControlState(ref);\n\n\t\t\tif (shouldCreateRuntime(state)) {\n\t\t\t\ttry {\n\t\t\t\t\trendererService ??= this.getRendererService();\n\t\t\t\t\tstate.runtime = createRuntime(entity, ref, rendererService);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tstate.desiredState = 'stopped';\n\t\t\t\t\tstate.pendingRestart = false;\n\t\t\t\t\tconsole.error('Failed to create particle runtime:', error);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!state.runtime) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\thasRuntime = true;\n\t\t\tsyncRuntimeTransform(entity, ref, state.runtime);\n\t\t\tapplyRuntimeState(ref);\n\t\t}\n\n\t\tif (hasRuntime && rendererService) {\n\t\t\trendererService.update(delta);\n\t\t}\n\t}\n\n\tdetach(link: BehaviorEntityLink): void {\n\t\treleaseRuntime(\n\t\t\tlink.ref as BehaviorRef<ParticleEmitterBehaviorOptions>,\n\t\t\t'manual',\n\t\t);\n\t}\n\n\tdestroy(_ecs: unknown): void {\n\t\tconst links = this.getBehaviorLinks?.(PARTICLE_EMITTER_BEHAVIOR_KEY);\n\t\tif (links) {\n\t\t\tfor (const link of links) {\n\t\t\t\treleaseRuntime(\n\t\t\t\t\tlink.ref as BehaviorRef<ParticleEmitterBehaviorOptions>,\n\t\t\t\t\t'manual',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.rendererService?.destroy();\n\t\tthis.rendererService = null;\n\t}\n}\n\nexport const ParticleEmitterBehavior = defineBehavior<\n\tParticleEmitterBehaviorOptions,\n\tParticleEmitterHandle\n>({\n\tname: 'particle-emitter',\n\tdefaultOptions,\n\tsystemFactory: (ctx) =>\n\t\tnew ParticleEmitterBehaviorSystem(ctx.scene, ctx.getBehaviorLinks, ctx.getGlobals),\n\tcreateHandle: createParticleEmitterHandle,\n});\n","import type { ColorRepresentation } from 'three';\nimport {\n\tConstantColor,\n\tConstantValue,\n\tParticleSystem,\n\tPointEmitter,\n\tRenderMode,\n} from 'three.quarks';\n\nimport {\n\tcreateParticleMaterial,\n\tcreateRangeValue,\n\tcreateTextureSystemOptions,\n\tparticleEffect,\n\ttoColorVector,\n\ttype ParticleEffectDefinition,\n\ttype ParticlePresetMaterialOptions,\n} from './preset-builder';\nimport { electricityPresets, firePresets, gasPresets, magicPresets, waterPresets } from './presets';\n\nexport type {\n\tParticleEffectDefinition,\n\tParticleMagicAgency,\n\tParticleMagicAlignment,\n\tParticleMagicModifierInput,\n\tParticleMagicModifierOptions,\n\tParticleMagicOrder,\n\tParticleMagicRealityEffect,\n\tParticleMagicTemperament,\n\tParticlePresetMaterialOptions,\n\tSemanticParticlePresetOptions,\n} from './preset-builder';\n\nexport interface BurstParticlePresetOptions extends ParticlePresetMaterialOptions {\n\tcolor?: ColorRepresentation;\n\tcount?: number;\n\tduration?: number;\n\tlife?: number | readonly [number, number];\n\tsize?: number | readonly [number, number];\n\tspeed?: number | readonly [number, number];\n\tworldSpace?: boolean;\n}\n\nexport const particlePresets = {\n\tburst(\n\t\toptions: BurstParticlePresetOptions = {},\n\t): ParticleEffectDefinition {\n\t\treturn particleEffect(\n\t\t\t() =>\n\t\t\t\tnew ParticleSystem({\n\t\t\t\t\tduration: options.duration ?? 0.25,\n\t\t\t\t\tlooping: false,\n\t\t\t\t\tworldSpace: options.worldSpace ?? false,\n\t\t\t\t\tstartLife: createRangeValue(options.life ?? [0.3, 0.7], [0.3, 0.7]),\n\t\t\t\t\tstartSpeed: createRangeValue(options.speed ?? [1.5, 4], [1.5, 4]),\n\t\t\t\t\tstartSize: createRangeValue(options.size ?? [0.08, 0.18], [0.08, 0.18]),\n\t\t\t\t\tstartColor: new ConstantColor(\n\t\t\t\t\t\ttoColorVector(options.color ?? '#ffffff'),\n\t\t\t\t\t),\n\t\t\t\t\temissionOverTime: new ConstantValue(0),\n\t\t\t\t\temissionBursts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttime: 0,\n\t\t\t\t\t\t\tcount: new ConstantValue(options.count ?? 18),\n\t\t\t\t\t\t\tcycle: 1,\n\t\t\t\t\t\t\tinterval: 0,\n\t\t\t\t\t\t\tprobability: 1,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tshape: new PointEmitter(),\n\t\t\t\t\tmaterial: createParticleMaterial(\n\t\t\t\t\t\toptions.color ?? '#ffffff',\n\t\t\t\t\t\toptions,\n\t\t\t\t\t),\n\t\t\t\t\t...createTextureSystemOptions(options),\n\t\t\t\t\trenderMode: RenderMode.BillBoard,\n\t\t\t\t}),\n\t\t);\n\t},\n\tsmoke(\n\t\toptions: BurstParticlePresetOptions = {},\n\t): ParticleEffectDefinition {\n\t\treturn particleEffect(\n\t\t\t() =>\n\t\t\t\tnew ParticleSystem({\n\t\t\t\t\tduration: options.duration ?? 1.1,\n\t\t\t\t\tlooping: false,\n\t\t\t\t\tworldSpace: options.worldSpace ?? false,\n\t\t\t\t\tstartLife: createRangeValue(options.life ?? [0.8, 1.6], [0.8, 1.6]),\n\t\t\t\t\tstartSpeed: createRangeValue(options.speed ?? [0.2, 0.8], [0.2, 0.8]),\n\t\t\t\t\tstartSize: createRangeValue(options.size ?? [0.2, 0.5], [0.2, 0.5]),\n\t\t\t\t\tstartColor: new ConstantColor(\n\t\t\t\t\t\ttoColorVector(options.color ?? '#999999'),\n\t\t\t\t\t),\n\t\t\t\t\temissionOverTime: new ConstantValue(0),\n\t\t\t\t\temissionBursts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttime: 0,\n\t\t\t\t\t\t\tcount: new ConstantValue(options.count ?? 10),\n\t\t\t\t\t\t\tcycle: 1,\n\t\t\t\t\t\t\tinterval: 0,\n\t\t\t\t\t\t\tprobability: 1,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tshape: new PointEmitter(),\n\t\t\t\t\tmaterial: createParticleMaterial(\n\t\t\t\t\t\toptions.color ?? '#999999',\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\t0.85,\n\t\t\t\t\t),\n\t\t\t\t\t...createTextureSystemOptions(options),\n\t\t\t\t\trenderMode: RenderMode.BillBoard,\n\t\t\t\t}),\n\t\t);\n\t},\n\tfire: firePresets,\n\twater: waterPresets,\n\tgas: gasPresets,\n\telectricity: electricityPresets,\n\tmagic: magicPresets,\n} as const;\n\nexport { particleEffect } from './preset-builder';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,OAAiB,YAAY,eAAe;AACrD;AAAA,EACC;AAAA,OAGM;AAKP,SAAS,cACR,KACqB;AACrB,SAAS,IAAY,gBAAgB;AACtC;AAwDA,IAAM,gCAAgC,uBAAO;AAAA,EAC5C;AACD;AAEA,IAAM,0BAAoD;AAAA,EACzD,SAAS;AACR,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAM,iBAAiD;AAAA,EACtD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,aAAa;AACd;AAEA,IAAM,0BAAN,MAA8B;AAAA,EAI7B,YAA6B,WAAqB;AAArB;AAC5B,SAAK,SAAS,O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xB,CAAC;AAAA,IACH;AAAA,EACD;AAAA,EACA,MACC,UAAsC,CAAC,GACZ;AAC3B,WAAO;AAAA,MACN,MACC,IAAIA,gBAAe;AAAA,QAClB,UAAU,QAAQ,YAAY;AAAA,QAC9B,SAAS;AAAA,QACT,YAAY,QAAQ,cAAc;AAAA,QAClC,WAAW,iBAAiB,QAAQ,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC;AAAA,QAClE,YAAY,iBAAiB,QAAQ,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC;AAAA,QACpE,WAAW,iBAAiB,QAAQ,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC;AAAA,QAClE,YAAY,IAAI;AAAA,UACf,cAAc,QAAQ,SAAS,SAAS;AAAA,QACzC;AAAA,QACA,kBAAkB,IAAI,cAAc,CAAC;AAAA,QACrC,gBAAgB;AAAA,UACf;AAAA,YACC,MAAM;AAAA,YACN,OAAO,IAAI,cAAc,QAAQ,SAAS,EAAE;AAAA,YAC5C,OAAO;AAAA,YACP,UAAU;AAAA,YACV,aAAa;AAAA,UACd;AAAA,QACD;AAAA,QACA,OAAO,IAAI,aAAa;AAAA,QACxB,UAAU;AAAA,UACT,QAAQ,SAAS;AAAA,UACjB;AAAA,UACA;AAAA,QACD;AAAA,QACA,GAAG,2BAA2B,OAAO;AAAA,QACrC,YAAY,WAAW;AAAA,MACxB,CAAC;AAAA,IACH;AAAA,EACD;AAAA,EACA,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,aAAa;AAAA,EACb,OAAO;AACR;","names":["position","ParticleSystem","ParticleSystem"]}
|
package/dist/spark-DDlIg1nM.d.ts
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { Texture, Blending, ColorRepresentation } from 'three';
|
|
2
|
-
import { ParticleSystem, RenderMode, RendererEmitterSettings } from 'three.quarks';
|
|
3
|
-
|
|
4
|
-
interface ParticleEffectDefinition {
|
|
5
|
-
create(): ParticleSystem;
|
|
6
|
-
}
|
|
7
|
-
interface ParticlePresetMaterialOptions {
|
|
8
|
-
texture?: Texture;
|
|
9
|
-
opacity?: number;
|
|
10
|
-
depthWrite?: boolean;
|
|
11
|
-
alphaTest?: number;
|
|
12
|
-
blending?: Blending;
|
|
13
|
-
uTileCount?: number;
|
|
14
|
-
vTileCount?: number;
|
|
15
|
-
blendTiles?: boolean;
|
|
16
|
-
}
|
|
17
|
-
type NumericRange = number | readonly [number, number];
|
|
18
|
-
type CurvePoints = readonly [number, number, number, number];
|
|
19
|
-
type ColorStop = readonly [ColorRepresentation, number];
|
|
20
|
-
type AlphaStop = readonly [number, number];
|
|
21
|
-
interface ParticleColorOverLifeConfig {
|
|
22
|
-
colors: readonly ColorStop[];
|
|
23
|
-
alpha: readonly AlphaStop[];
|
|
24
|
-
}
|
|
25
|
-
interface ParticleForceOverLifeConfig {
|
|
26
|
-
x?: NumericRange;
|
|
27
|
-
y?: NumericRange;
|
|
28
|
-
z?: NumericRange;
|
|
29
|
-
}
|
|
30
|
-
interface ParticleNoiseConfig {
|
|
31
|
-
frequency: NumericRange;
|
|
32
|
-
power: NumericRange;
|
|
33
|
-
positionAmount?: NumericRange;
|
|
34
|
-
rotationAmount?: NumericRange;
|
|
35
|
-
}
|
|
36
|
-
interface ParticleOrbitConfig {
|
|
37
|
-
speed: NumericRange;
|
|
38
|
-
axis?: readonly [number, number, number];
|
|
39
|
-
}
|
|
40
|
-
interface ParticleBehaviorOverrides {
|
|
41
|
-
colorOverLife?: ParticleColorOverLifeConfig | null;
|
|
42
|
-
sizeOverLife?: CurvePoints | null;
|
|
43
|
-
speedOverLife?: CurvePoints | null;
|
|
44
|
-
rotationOverLife?: NumericRange | null;
|
|
45
|
-
forceOverLife?: Partial<ParticleForceOverLifeConfig> | null;
|
|
46
|
-
noise?: Partial<ParticleNoiseConfig> | null;
|
|
47
|
-
orbitOverLife?: Partial<ParticleOrbitConfig> | null;
|
|
48
|
-
}
|
|
49
|
-
type ParticleShapeConfig = {
|
|
50
|
-
type: 'point';
|
|
51
|
-
} | {
|
|
52
|
-
type: 'cone';
|
|
53
|
-
radius?: number;
|
|
54
|
-
thickness?: number;
|
|
55
|
-
angle?: number;
|
|
56
|
-
speed?: NumericRange;
|
|
57
|
-
} | {
|
|
58
|
-
type: 'sphere';
|
|
59
|
-
radius?: number;
|
|
60
|
-
thickness?: number;
|
|
61
|
-
speed?: NumericRange;
|
|
62
|
-
};
|
|
63
|
-
type ParticleMagicAlignment = 'arcane' | 'holy' | 'corrupted' | 'nature' | 'void' | 'psychic';
|
|
64
|
-
type ParticleMagicTemperament = 'calm' | 'ominous' | 'playful' | 'regal' | 'predatory';
|
|
65
|
-
type ParticleMagicAgency = 'passive' | 'reactive' | 'seeking' | 'sentient-feeling';
|
|
66
|
-
type ParticleMagicOrder = 'geometric' | 'organic' | 'chaotic';
|
|
67
|
-
type ParticleMagicRealityEffect = 'warping' | 'illuminating' | 'binding' | 'decaying' | 'healing';
|
|
68
|
-
interface ParticleMagicModifierOptions {
|
|
69
|
-
alignment: ParticleMagicAlignment;
|
|
70
|
-
temperament?: ParticleMagicTemperament;
|
|
71
|
-
agency?: ParticleMagicAgency;
|
|
72
|
-
order?: ParticleMagicOrder;
|
|
73
|
-
realityEffect?: ParticleMagicRealityEffect;
|
|
74
|
-
intensity?: number;
|
|
75
|
-
}
|
|
76
|
-
type ParticleMagicModifierInput = ParticleMagicAlignment | ParticleMagicModifierOptions;
|
|
77
|
-
interface SemanticParticlePresetOptions extends ParticlePresetMaterialOptions {
|
|
78
|
-
behaviors?: ParticleBehaviorOverrides;
|
|
79
|
-
color?: ColorRepresentation;
|
|
80
|
-
count?: number;
|
|
81
|
-
duration?: number;
|
|
82
|
-
emissionRate?: number;
|
|
83
|
-
life?: NumericRange;
|
|
84
|
-
looping?: boolean;
|
|
85
|
-
magic?: ParticleMagicModifierInput;
|
|
86
|
-
renderMode?: RenderMode;
|
|
87
|
-
rendererEmitterSettings?: Partial<RendererEmitterSettings>;
|
|
88
|
-
rotation?: NumericRange;
|
|
89
|
-
shape?: ParticleShapeConfig;
|
|
90
|
-
size?: NumericRange;
|
|
91
|
-
speed?: NumericRange;
|
|
92
|
-
worldSpace?: boolean;
|
|
93
|
-
}
|
|
94
|
-
declare function particleEffect(create: () => ParticleSystem): ParticleEffectDefinition;
|
|
95
|
-
|
|
96
|
-
declare function arcane(options?: Omit<ParticleMagicModifierOptions, 'alignment'>): ParticleMagicModifierOptions;
|
|
97
|
-
|
|
98
|
-
declare function corrupted(options?: Omit<ParticleMagicModifierOptions, 'alignment'>): ParticleMagicModifierOptions;
|
|
99
|
-
|
|
100
|
-
declare function holy(options?: Omit<ParticleMagicModifierOptions, 'alignment'>): ParticleMagicModifierOptions;
|
|
101
|
-
|
|
102
|
-
declare function nature(options?: Omit<ParticleMagicModifierOptions, 'alignment'>): ParticleMagicModifierOptions;
|
|
103
|
-
|
|
104
|
-
declare function psychic(options?: Omit<ParticleMagicModifierOptions, 'alignment'>): ParticleMagicModifierOptions;
|
|
105
|
-
|
|
106
|
-
declare function voidMagic(options?: Omit<ParticleMagicModifierOptions, 'alignment'>): ParticleMagicModifierOptions;
|
|
107
|
-
|
|
108
|
-
declare function arc(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
109
|
-
|
|
110
|
-
declare function pulse(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
111
|
-
|
|
112
|
-
declare function spark$1(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
113
|
-
|
|
114
|
-
declare function storm(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
115
|
-
|
|
116
|
-
declare function surge(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
117
|
-
|
|
118
|
-
declare function haze(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
119
|
-
|
|
120
|
-
declare function miasma(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
121
|
-
|
|
122
|
-
declare function plume(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
123
|
-
|
|
124
|
-
declare function smoke(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
125
|
-
|
|
126
|
-
declare function vapor(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
127
|
-
|
|
128
|
-
declare function drizzle(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
129
|
-
|
|
130
|
-
declare function mist(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
131
|
-
|
|
132
|
-
declare function splash(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
133
|
-
|
|
134
|
-
declare function spray(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
135
|
-
|
|
136
|
-
declare function torrent(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
137
|
-
|
|
138
|
-
declare function blaze(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
139
|
-
|
|
140
|
-
declare function ember(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
141
|
-
|
|
142
|
-
declare function flamelet(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
143
|
-
|
|
144
|
-
declare function smolder(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
145
|
-
|
|
146
|
-
declare function spark(options?: SemanticParticlePresetOptions): ParticleEffectDefinition;
|
|
147
|
-
|
|
148
|
-
export { spark$1 as A, spark as B, splash as C, spray as D, storm as E, surge as F, torrent as G, vapor as H, voidMagic as I, type ParticleEffectDefinition as P, type SemanticParticlePresetOptions as S, type ParticleMagicAgency as a, type ParticleMagicAlignment as b, type ParticleMagicModifierInput as c, type ParticleMagicModifierOptions as d, type ParticleMagicOrder as e, type ParticleMagicRealityEffect as f, type ParticleMagicTemperament as g, type ParticlePresetMaterialOptions as h, arc as i, arcane as j, blaze as k, corrupted as l, drizzle as m, ember as n, flamelet as o, haze as p, holy as q, miasma as r, mist as s, nature as t, particleEffect as u, plume as v, psychic as w, pulse as x, smoke as y, smolder as z };
|