Skip to main content

Module: index

Namespaces#

Classes#

Interfaces#

References#

Circle#

Re-exports: Circle


Color#

Re-exports: Color


Gradient#

Re-exports: Gradient


NumericSpline#

Re-exports: NumericSpline


Rect#

Re-exports: Rect


Vector#

Re-exports: Vector


default#

Renames and exports: index


util#

Re-exports: util

Type aliases#

DrivableFactor#

Ƭ DrivableFactor: "lifetime" | "relativeLifetime" | "size"

Represents the possible factors of drivable values.

Defined in#

systems/modules.ts:38


DrivableKey#

Ƭ DrivableKey: keyof DrivableProperties

Represents the possible, drivable keys of a particle.

Defined in#

systems/modules.ts:30


DrivableProperties#

Ƭ DrivableProperties: Pick<Particle, "color" | "opacity" | "rotation" | "size">

Represents the properties of a particle that are drivable through modules.

Defined in#

systems/modules.ts:22


DrivableType#

Ƭ DrivableType: ValueOf<DrivableProperties>

Represents the possible types of drivable keys.

Defined in#

systems/modules.ts:34


ModuleDriverValue#

Ƭ ModuleDriverValue<T>: T | Spline<T> | (factor: number, particle?: Particle) => T

Represents a value that can be used to drive a particle module.

Type parameters#

Name
T

Defined in#

systems/modules.ts:10


ModuleFunction#

Ƭ ModuleFunction: (particle: Particle) => void

Type declaration#

▸ (particle): void

Represents a value that can be used to modify the properties of a particle over it's lifetime.

Parameters#
NameType
particleParticle
Returns#

void

Defined in#

systems/modules.ts:17

Variables#

resolvableShapes#

Const resolvableShapes: Record<string, string>

Represents the lookup that maps resolveable element keys to their HTML strings.

remarks The default shapes are made to fit inside a dimension of 10x10 pixels, except the 'star' shape, which exceeds it slightly.

Defined in#

systems/shapes.ts:10


scene#

Const scene: Lazy<Scene>

Defined in#

index.ts:10


settings#

Const settings: Settings

Defined in#

settings.ts:27

Functions#

confetti#

confetti(source, options?): Emitter

The standard confetti template.

Parameters#

NameTypeDescription
sourceDynamicSourceTypeThe source to emit the confetti from.
options?Partial<ConfettiConfiguration>The (optional) configuration overrides.

Returns#

Emitter

Defined in#

templates/confetti.ts:29


forceInit#

forceInit(): void

Forces the initialization of the otherwise lazy scene.

Returns#

void

Defined in#

index.ts:33


resolveShapeFactory#

resolveShapeFactory(factory): HTMLElement

Resolves the specified element factory using the resolvable elements, if needed.

Parameters#

NameType
factoryVariation<string | HTMLElement>

Returns#

HTMLElement

Defined in#

systems/shapes.ts:22


sparkles#

sparkles(source, options?): Emitter

The standard sparkles template.

Parameters#

NameTypeDescription
sourceDynamicSourceTypeThe source to emit the sparkles from.
options?Partial<SparkleConfiguration>The (optional) configuration overrides.

Returns#

Emitter

Defined in#

templates/sparkles.ts:27