import{_ as e,c as t,o as a,N as r}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Module: features/particles/particles","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/particles.md","lastUpdated":null}'),l={name:"api/modules/features/particles.md"},o=r('
• BaseParticles: Object
The properties that are added onto a processed ParticlesOptions to create an Particles.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
addEmitter | (config : EmitterConfigV3 ) => Promise <Emitter > | A function to asynchronously add an emitter to the canvas. The returned emitter can then be positioned as appropriate and started. See Particles |
app | Ref <null | Application > | The Pixi.JS Application powering this particles canvas. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof ParticlesType | A symbol that helps identify features of the same type. |
profectus/src/features/particles/particles.tsx:31
• ParticlesOptions: Object
An object that configures Particles.
Name | Type | Description |
---|---|---|
classes? | Computable <Record <string , boolean >> | Dictionary of CSS classes to apply to this feature. |
onContainerResized? | (boundingRect : DOMRect ) => void | A function that is called when the particles canvas is resized. |
onHotReload? | VoidFunction | A function that is called whenever the particles element is reloaded during development. For restarting particle effects. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
profectus/src/features/particles/particles.tsx:17
Ƭ GenericParticles: Particles
<ParticlesOptions
>
A type that matches any valid Particles object.
profectus/src/features/particles/particles.tsx:63
Ƭ Particles<T
>: Replace
<T
& BaseParticles
, { classes
: GetComputableType
<T
["classes"
]> ; style
: GetComputableType
<T
["style"
]> }>
An object that represents a feature that display particle effects on the screen. The config should typically be gotten by designing the effect using the online particle effect editor and passing it into the upgradeConfig from @pixi/particle-emitter.
Name | Type |
---|---|
T | extends ParticlesOptions |
profectus/src/features/particles/particles.tsx:54
• Const
ParticlesType: typeof ParticlesType
A symbol used to identify Particles features.
profectus/src/features/particles/particles.tsx:12
▸ createParticles<T
>(optionsFunc?
): Particles
<T
>
Lazily creates particles with the given options.
Name | Type |
---|---|
T | extends ParticlesOptions |
Name | Type | Description |
---|---|---|
optionsFunc? | OptionsFunc <T , BaseParticles , GenericParticles > | Particles options. |
Particles
<T
>
profectus/src/features/particles/particles.tsx:69
Name | Type |
---|---|
style | processedPropType<StyleValue>(String, Object, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
onInit * | (app: Application) => void |
id * | string |
onContainerResized | (rect: DOMRect) => void |
onHotReload | VoidFunction |