API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classColorOverLifetime
Per-frame, per-particle color sampler. Each live particle's tint is set to the gradient evaluated at the particle's current `elapsed / lifetime` ratio, packed RGBA. Replaces the per-particle blend of `ColorAffector` (legacy) with a multi-keyframe gradient. GPU-eligible: the gradient is uploaded once as a 256-tap 1D RGBA8 texture and sampled with linear filtering on the GPU.
import { ColorOverLifetime } from '@codexo/exojs-particles' Per-frame, per-particle color sampler. Each live particle's tint is set to the gradient evaluated at the particle's current `elapsed / lifetime` ratio, packed RGBA. Replaces the per-particle blend of `ColorAffector` (legacy) with a multi-keyframe gradient.
GPU-eligible: the gradient is uploaded once as a 256-tap 1D RGBA8 texture and sampled with linear filtering on the GPU.
new(gradient: ColorGradient): ColorOverLifetime apply(system: ParticleSystem, _dt: number): void destroy(): void uploadTextures(device: GPUDevice, textures: ReadonlyMap<string, GPUTexture>): void wgsl(): WgslContribution writeUniforms(view: DataView, byteOffset: number, dt: number): void gradient: ColorGradient