API reference

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

C

classRepelFromPoint

@codexo/exojs-particles / particles / stable

Pushes every live particle away from a fixed point in the system's local coordinate space. Acceleration magnitude is `strength` (units / s²) along the direction `(particle − point)`. The optional `radius` controls the influence range — particles farther than `radius` are unaffected. Setting `radius = 0` (default) means infinite range with no falloff. Use cases: shockwaves, explosion blast, mouse-cursor repel field. GPU-eligible.

4
props
5
methods
0
events
Import
import { RepelFromPoint } from '@codexo/exojs-particles'

Pushes every live particle away from a fixed point in the system's local coordinate space. Acceleration magnitude is `strength` (units / s²) along the direction `(particle − point)`. The optional `radius` controls the influence range — particles farther than `radius` are unaffected. Setting `radius = 0` (default) means infinite range with no falloff.

Use cases: shockwaves, explosion blast, mouse-cursor repel field.

GPU-eligible.

Constructors 1
new(x: number, y: number, strength: number, radius: number): RepelFromPoint
Methods 5
apply(system: ParticleSystem, dt: number): void
destroy(): void
uploadTextures(device: GPUDevice, textures: ReadonlyMap<string, GPUTexture>): void
wgsl(): WgslContribution
writeUniforms(view: DataView, offset: number): void
Properties 4
radius: number
strength: number
x: number
y: number
Source