API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classRibbonParticles
A connected triangle strip through the system's particles: one ribbon per system, drawn as a single non-instanced draw. Every particle contributes two vertices, offset either side of the path running through its neighbours, so the whole live range becomes one continuous band - the shape a sword arc, a projectile streak or a smoke plume wants, where a quad-per-particle would show as a dotted line. Layout of the per-vertex buffer build fills (20 bytes, 3 attributes): ``` a_position f32x2 (offset 0, 8 bytes) strip vertex (system-local) a_texcoord f32x2 (offset 8, 8 bytes) u along the strip, v across it a_color u8x4 (offset 16, 4 bytes) RGBA tint, normalised ``` **No ribbon-specific styling parameters.** Half-width comes from the particle's `scaleX` and the tint from its `color`, so the existing update modules already produce the expected look: `ScaleOverLifetime` tapers the tail, `ColorOverLifetime` gradients along the streak, and `AlphaFadeOverLifetime` fades it out. RibbonParticlesOptions.width only sets the base the scale multiplies. **The strip is built on the CPU**, so this mode is not GPU-eligible and a system using it stays on the CPU simulation path (observable through `ParticleSystem.gpuMode`). That is what guarantees the builder reads valid positions in emission order: CPU-mode slots are dense and compaction copies survivors forward stably, which is exactly the ordering a connected strip needs.
import { RibbonParticles } from '@codexo/exojs-particles'A connected triangle strip through the system's particles: one ribbon per system, drawn as a single non-instanced draw.
Every particle contributes two vertices, offset either side of the path running through its neighbours, so the whole live range becomes one continuous band - the shape a sword arc, a projectile streak or a smoke plume wants, where a quad-per-particle would show as a dotted line.
Layout of the per-vertex buffer build fills (20 bytes, 3 attributes):
``` a_position f32x2 (offset 0, 8 bytes) strip vertex (system-local) a_texcoord f32x2 (offset 8, 8 bytes) u along the strip, v across it a_color u8x4 (offset 16, 4 bytes) RGBA tint, normalised ```
**No ribbon-specific styling parameters.** Half-width comes from the particle's `scaleX` and the tint from its `color`, so the existing update modules already produce the expected look: `ScaleOverLifetime` tapers the tail, `ColorOverLifetime` gradients along the streak, and `AlphaFadeOverLifetime` fades it out. RibbonParticlesOptions.width only sets the base the scale multiplies.
**The strip is built on the CPU**, so this mode is not GPU-eligible and a system using it stays on the CPU simulation path (observable through `ParticleSystem.gpuMode`). That is what guarantees the builder reads valid positions in emission order: CPU-mode slots are dense and compaction copies survivors forward stably, which is exactly the ordering a connected strip needs.
new(options: RibbonParticlesOptionsConstruction options for RibbonParticles.): RibbonParticles_ensureCapacity(byteLength: number): void_onBufferGrown(data: ArrayBuffer): void_setCount(count: number): voidbuild(_system: ParticleSystemThe central coordinator of the particle pipeline. `ParticleSystem` is a Drawable that owns: - **Particle storage** - one channel per attribute (position, veloc…, particles: ParticleBatchThe live particles of one system, addressed by semantic channel. This is the bulk surface an UpdateModule and a ParticleRenderMode operate on. Channels are nam…): voiddestroy(): voidfloatsPerVertex: numbergpuEligible: booleaninstanced: falsecount: numberdata: ArrayBuffer