Module: features/particles/particles
Interfaces
BaseParticles
• 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. |
Defined in
profectus/src/features/particles/particles.tsx:31
ParticlesOptions
• 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. |
Defined in
profectus/src/features/particles/particles.tsx:17
Type Aliases
GenericParticles
Ƭ GenericParticles: Particles
<ParticlesOptions
>
A type that matches any valid Particles object.
Defined in
profectus/src/features/particles/particles.tsx:63
Particles
Ƭ 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.
Type parameters
Name | Type |
---|---|
T | extends ParticlesOptions |
Defined in
profectus/src/features/particles/particles.tsx:54
Variables
ParticlesType
• Const
ParticlesType: typeof ParticlesType
A symbol used to identify Particles features.
Defined in
profectus/src/features/particles/particles.tsx:12
Functions
createParticles
▸ createParticles<T
>(optionsFunc?
): Particles
<T
>
Lazily creates particles with the given options.
Type parameters
Name | Type |
---|---|
T | extends ParticlesOptions |
Parameters
Name | Type | Description |
---|---|---|
optionsFunc? | OptionsFunc <T , BaseParticles , GenericParticles > | Particles options. |
Returns
Particles
<T
>
Defined in
profectus/src/features/particles/particles.tsx:69
Components
Particles Component
Props
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 |