Skip to content
On this page

Module: features/particles/particles

Interfaces

BaseParticles

BaseParticles: Object

The properties that are added onto a processed ParticlesOptions to create an Particles.

NameTypeDescription
[Component]GenericComponentThe 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
appRef<null | Application>The Pixi.JS Application powering this particles canvas.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof ParticlesTypeA 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.

NameTypeDescription
classes?Computable<Record<string, boolean>>Dictionary of CSS classes to apply to this feature.
onContainerResized?(boundingRect: DOMRect) => voidA function that is called when the particles canvas is resized.
onHotReload?VoidFunctionA 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

NameType
Textends 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
NameType
Textends ParticlesOptions
Parameters
NameTypeDescription
optionsFunc?OptionsFunc<T, BaseParticles, GenericParticles>Particles options.
Returns

Particles<T>

Defined in

profectus/src/features/particles/particles.tsx:69

Components

Particles Component

Props

NameType
styleprocessedPropType<StyleValue>(String, Object, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
onInit*(app: Application) => void
id*string
onContainerResized(rect: DOMRect) => void
onHotReloadVoidFunction