API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classConstant
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.
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.
new(value: T): Constant<T> evaluate(_t: number, out?: T): T sample(out?: T): T value: T