API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classColorOverSpeed
Per-frame, per-particle color sampler driven by velocity magnitude rather than lifetime ratio. Each live particle's tint is set to the gradient evaluated at `clamp((|velocity| - minSpeed) / (maxSpeed - minSpeed), 0, 1)`. Use cases: heat-mapping (slow=blue, fast=red), velocity-tinted trails, speed-gated highlights. GPU-eligible: gradient uploaded as a 256-tap 1D RGBA8 texture, sampled with linear filtering. Replaces the full color word - pair with a separate AlphaFadeOverLifetime after this module if you want to keep alpha controlled by lifetime.
import { ColorOverSpeed } from '@codexo/exojs-particles'Per-frame, per-particle color sampler driven by velocity magnitude rather than lifetime ratio. Each live particle's tint is set to the gradient evaluated at `clamp((|velocity| - minSpeed) / (maxSpeed - minSpeed), 0, 1)`.
Use cases: heat-mapping (slow=blue, fast=red), velocity-tinted trails, speed-gated highlights.
GPU-eligible: gradient uploaded as a 256-tap 1D RGBA8 texture, sampled with linear filtering. Replaces the full color word - pair with a separate AlphaFadeOverLifetime after this module if you want to keep alpha controlled by lifetime.
new(gradient: ColorGradientPiecewise-linear color gradient sampled by lifetime ratio `t` in `[0, 1]`. Keyframes are stored sorted by `t`; sampling outside the range returns the nearest e…, minSpeed: number, maxSpeed: number): ColorOverSpeeddestroy(): voiduploadTextures(device: GPUDevice, textures: ReadonlyMap<string, GPUTexture>): voidwriteUniforms(view: DataView, offset: number): voidmaxSpeed: numberminSpeed: number