API reference

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

C

classCircleArea

@codexo/exojs-particles / particles / stable

Random point on or inside a circle of radius `radius`, centred at `(centerX, centerY)`. With `mode: 'edge'` the result lies exactly on the circumference; with `mode: 'volume'` (default) it lies anywhere in the disk, with uniform area density (sqrt-of-random-radius distribution). Use as a spawn-position distribution for circular emitters.

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

Random point on or inside a circle of radius `radius`, centred at `(centerX, centerY)`. With `mode: 'edge'` the result lies exactly on the circumference; with `mode: 'volume'` (default) it lies anywhere in the disk, with uniform area density (sqrt-of-random-radius distribution).

Use as a spawn-position distribution for circular emitters.

Constructors 1
new(centerX: number, centerY: number, radius: number, mode: "volume" | "edge"): CircleArea
Methods 1
sample(out: Vector): Vector
Properties 4
centerX: number
centerY: number
mode: "volume" | "edge"
radius: number
Source