API reference

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

C

classOrbitalForce

@codexo/exojs-particles / particles / stable

Applies a tangential acceleration around a center point — perpendicular to the radial vector `(particle − center)`. Combined with an attract / repel module that controls the radial distance, this produces orbital, spiral, or vortex motion. `angularSpeed` is the target angular velocity in radians/second. The effective tangential acceleration scales with `radius * angularSpeed`, so distant particles get pushed harder (matching uniform circular motion). Positive values orbit counter-clockwise, negative clockwise. Use cases: galactic spirals, smoke vortices around an attractor, wind eddies. Layer with AttractToPoint for stable orbits. GPU-eligible.

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

Applies a tangential acceleration around a center point — perpendicular to the radial vector `(particle − center)`. Combined with an attract / repel module that controls the radial distance, this produces orbital, spiral, or vortex motion.

`angularSpeed` is the target angular velocity in radians/second. The effective tangential acceleration scales with `radius * angularSpeed`, so distant particles get pushed harder (matching uniform circular motion). Positive values orbit counter-clockwise, negative clockwise.

Use cases: galactic spirals, smoke vortices around an attractor, wind eddies. Layer with AttractToPoint for stable orbits.

GPU-eligible.

Constructors 1
new(x: number, y: number, angularSpeed: number): OrbitalForce
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 3
angularSpeed: number
x: number
y: number
Source