API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classOrbitalForce
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.
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.
new(x: number, y: number, angularSpeed: number): OrbitalForce apply(system: ParticleSystem, dt: number): void destroy(): void uploadTextures(device: GPUDevice, textures: ReadonlyMap<string, GPUTexture>): void wgsl(): WgslContribution writeUniforms(view: DataView, offset: number): void angularSpeed: number x: number y: number