Atlas Engine
API Referenceatlasatlas/particle

ParticleEmitter

Particle system with a fixed capacity, configurable spawning, and optional texturing.

Module: atlas/particle

Particle system with a fixed capacity, configurable spawning, and optional texturing.

Declaration

export class ParticleEmitter extends GameObject { ... }

Extends: GameObject

Constructors

Creates a new particle emitter.

constructor(maxParticles: number);

Properties

settings

The settings.

settings: ParticleSettings;

Methods

attachTexture

Attaches a texture to this object.

override attachTexture(texture: Texture): void;

setColor

Updates the color used by this object.

setColor(color: Color): void;

enableTexture

Enables texture.

enableTexture(): void;

disableTexture

Disables texture.

disableTexture(): void;

setPosition

Sets the position to an absolute value.

override setPosition(position: Position3d): void;

move

Translates by the supplied offset.

override move(position: Position3d): void;

getPosition

Returns the current position.

getPosition(): Position3d;

setEmissionType

Sets emission type.

setEmissionType(type: ParticleEmissionType): void;

setDirection

Sets the particle emission direction.

setDirection(direction: Magnitude3d): void;

setSpawnRadius

Sets spawn radius.

setSpawnRadius(radius: number): void;

setSpawnRate

Sets spawn rate.

setSpawnRate(rate: number): void;

setParticleSettings

Replaces the emitter's particle settings and sends them to the runtime.

setParticleSettings(settings: ParticleSettings): void;

emitOnce

Emit once.

emitOnce(): void;

emitContinuous

Emit continuous.

emitContinuous(): void;

startEmission

Starts particle emission.

startEmission(): void;

stopEmission

Stops spawning new particles.

stopEmission(): void;

emitBurst

Requests emission of the specified number of particles.

emitBurst(count: number): void;

setRotation

This transform operation is unsupported by particle emitters and has no effect.

override setRotation(rotation: Rotation3d): void;

setScale

This transform operation is unsupported by particle emitters and has no effect.

override setScale(scale: Scale3d): void;

lookAt

This transform operation is unsupported by particle emitters and has no effect.

override lookAt(target: Position3d, up?: Normal3d): void;

rotate

This transform operation is unsupported by particle emitters and has no effect.

override rotate(rotation: Rotation3d): void;

scaleBy

This transform operation is unsupported by particle emitters and has no effect.

override scaleBy(scale: Scale3d): void;

show

Makes the object visible.

override show(): void;

hide

Makes the object invisible.

override hide(): void;

On this page