API reference

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

C

classParticleModuleKeyCollisionError

@codexo/exojs-particles / particles / stable

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.

5
props
0
methods
0
events
Import
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.

Constructors1
new(key: string, firstModule: string, secondModule: string): ParticleModuleKeyCollisionError
Properties5
cause?: unknown
key: string
The contested WgslContribution.key.
message: string
name: string
stack?: string
Source