API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classConstant

@codexo/exojs-particles / particles / stable

Distribution that always returns the same value. Implements both Distribution and LifetimeFunction so it can stand in wherever a randomized or time-parameterised value is expected. For mutable types (Vector, Color, ...) the constant value is copied into `out` if provided, otherwise the constructor's value is returned directly. Mutating that returned reference mutates the distribution's source.

1
props
2
methods
0
events
Import
import { Constant } from '@codexo/exojs-particles'

Distribution that always returns the same value. Implements both Distribution and LifetimeFunction so it can stand in wherever a randomized or time-parameterised value is expected.

For mutable types (Vector, Color, ...) the constant value is copied into `out` if provided, otherwise the constructor's value is returned directly. Mutating that returned reference mutates the distribution's source.

Constructors 1
new(value: T): Constant<T>
Methods 2
evaluate(_t: number, out?: T): T
sample(out?: T): T
Properties 1
value: T
Source