API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classParticleModuleKeyCollisionError
Thrown when two GPU-eligible update modules on one system contribute the same WgslContribution.key. A key names exactly one struct and one member of the composite compute shader's uniform block, so two contributions under it cannot be told apart: both bodies would read the same uniforms and only one instance's values would ever reach the device. Give one of them a distinct key, or combine them into a single module. Only the WebGPU path builds that shader - the CPU path runs each module's `apply()` independently and is unaffected - which is why the same scene used to run on WebGL2 and die with a raw WGSL error on WebGPU.
import { ParticleModuleKeyCollisionError } from '@codexo/exojs-particles'Thrown when two GPU-eligible update modules on one system contribute the same WgslContribution.key.
A key names exactly one struct and one member of the composite compute shader's uniform block, so two contributions under it cannot be told apart: both bodies would read the same uniforms and only one instance's values would ever reach the device. Give one of them a distinct key, or combine them into a single module.
Only the WebGPU path builds that shader - the CPU path runs each module's `apply()` independently and is unaffected - which is why the same scene used to run on WebGL2 and die with a raw WGSL error on WebGPU.
new(key: string, firstModule: string, secondModule: string): ParticleModuleKeyCollisionErrorcause?: unknownkey: stringmessage: stringname: stringstack?: string