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#
DrivableKey#
Ƭ DrivableKey: keyof DrivableProperties
Represents the possible, drivable keys of a particle.
Defined in#
DrivableProperties#
Ƭ DrivableProperties: Pick<Particle, "color" | "opacity" | "rotation" | "size">
Represents the properties of a particle that are drivable through modules.
Defined in#
DrivableType#
Ƭ DrivableType: ValueOf<DrivableProperties>
Represents the possible types of drivable keys.
Defined in#
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#
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#
| Name | Type |
|---|---|
particle | Particle |
Returns#
void
Defined in#
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#
scene#
• Const scene: Lazy<Scene>
Defined in#
settings#
• Const settings: Settings
Defined in#
Functions#
confetti#
â–¸ confetti(source, options?): Emitter
The standard confetti template.
Parameters#
| Name | Type | Description |
|---|---|---|
source | DynamicSourceType | The source to emit the confetti from. |
options? | Partial<ConfettiConfiguration> | The (optional) configuration overrides. |
Returns#
Defined in#
forceInit#
â–¸ forceInit(): void
Forces the initialization of the otherwise lazy scene.
Returns#
void
Defined in#
resolveShapeFactory#
â–¸ resolveShapeFactory(factory): HTMLElement
Resolves the specified element factory using the resolvable elements, if needed.
Parameters#
| Name | Type |
|---|---|
factory | Variation<string | HTMLElement> |
Returns#
HTMLElement
Defined in#
sparkles#
â–¸ sparkles(source, options?): Emitter
The standard sparkles template.
Parameters#
| Name | Type | Description |
|---|---|---|
source | DynamicSourceType | The source to emit the sparkles from. |
options? | Partial<SparkleConfiguration> | The (optional) configuration overrides. |