Options
All
  • Public
  • Public/Protected
  • All
Menu

A class for spawning particles in a circle or ring. Can optionally apply rotation to particles so that they are aimed away from the center of the circle.

Example config:

{
type: 'torus',
data: {
radius: 30,
x: 0,
y: 0,
innerRadius: 10,
rotation: true
}
}

Hierarchy

  • Torus

Implements

Index

Constructors

  • new Torus(config: { affectRotation?: boolean; innerRadius?: number; radius: number; x: number; y: number }): Torus
  • Parameters

    • config: { affectRotation?: boolean; innerRadius?: number; radius: number; x: number; y: number }
      • Optional affectRotation?: boolean

        If rotation should be applied to particles, pointing them away from the center of the torus. Defaults to false.

      • Optional innerRadius?: number

        Inner radius of a ring. Omit, or use 0, to have a circle.

      • radius: number

        Radius of circle, or outer radius of a ring. Note that this uses the full name of 'radius', where earlier versions of the library may have used 'r'.

      • x: number

        X position of the center of the shape.

      • y: number

        Y position of the center of the shape.

    Returns Torus

Properties

innerRadius: number

Inner radius of a ring. Use 0 to have a circle.

radius: number

Radius of circle, or outer radius of a ring.

rotation: boolean

If rotation should be applied to particles.

x: number

X position of the center of the shape.

y: number

Y position of the center of the shape.

editorConfig: ObjectProperty = null
type: string = 'torus'

Methods

Generated using TypeDoc