API reference

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

C

classCurve

@codexo/exojs-particles / particles / stable

Piecewise-linear keyframe curve sampled by lifetime ratio `t` in `[0, 1]`. Keyframes are stored sorted by `t` and clamped at the endpoints — sampling outside the keyframe range returns the nearest endpoint value. The implementation tracks the last accessed segment so monotonically advancing `t` (the typical case for per-particle lifetime sampling) costs O(1) amortized per call instead of O(log n).

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

Piecewise-linear keyframe curve sampled by lifetime ratio `t` in `[0, 1]`.

Keyframes are stored sorted by `t` and clamped at the endpoints — sampling outside the keyframe range returns the nearest endpoint value. The implementation tracks the last accessed segment so monotonically advancing `t` (the typical case for per-particle lifetime sampling) costs O(1) amortized per call instead of O(log n).

Constructors 1
new(keys: readonly CurveKey[]): Curve
Methods 1
evaluate(t: number): number
Source