Skip to content

Class: MockParticleObject ​

Mock of the X-Ray engine particles object.

Implements ​

  • particles_object

Constructors ​

Constructor ​

ts
new MockParticleObject(name: string): MockParticleObject;

Parameters ​

ParameterType
namestring

Returns ​

MockParticleObject

Methods ​

create() ​

ts
static create(name: string): MockParticleObject;

Parameters ​

ParameterType
namestring

Returns ​

MockParticleObject


mock() ​

ts
static mock(name: string): particles_object;

Parameters ​

ParameterType
namestring

Returns ​

particles_object

Properties ​

direction ​

ts
direction: MockVector;

isLooped ​

ts
isLooped: boolean = false;

isPaused ​

ts
isPaused: boolean = false;

isPlaying ​

ts
isPlaying: boolean = false;

last_position ​

ts
last_position: Mock<() => MockVector>;

Returns ​

Last particle position.

Implementation of ​

ts
particles_object.last_position

load_path ​

ts
load_path: Mock<UnknownFunction>;

Load an object animator path for the particle system.

Remarks ​

Reuses the current animator when the same path is already loaded.

Param ​

path

Path name.

Implementation of ​

ts
particles_object.load_path

looped ​

ts
looped: Mock<() => boolean>;

Returns ​

Whether the particle system is looped.

Implementation of ​

ts
particles_object.looped

move_to ​

ts
move_to: Mock<(position: vector) => void>;

Move particles and provide velocity for interpolation.

Remarks ​

Use this while an effect is already playing to keep its parent transform current.

Param ​

position

New world position.

Param ​

velocity

Current movement velocity.

Implementation of ​

ts
particles_object.move_to

name ​

ts
name: string;

pause_path ​

ts
pause_path: Mock<(isPaused: boolean) => void>;

Pause or resume the loaded particle path.

Remarks ​

Requires load_path() to have created the internal animator.

Param ​

is_paused

Whether path playback is paused.

Implementation of ​

ts
particles_object.pause_path

play ​

ts
play: Mock<() => void>;

Start particle playback at the current transform.

Implementation of ​

ts
particles_object.play

play_at_pos ​

ts
play_at_pos: Mock<() => void>;

Play particles at a world position.

Remarks ​

Updates the particle transform and starts non-looped playback.

Param ​

position

World position.

Implementation of ​

ts
particles_object.play_at_pos

playing ​

ts
playing: Mock<() => boolean>;

Returns ​

Whether particles are currently playing.

Implementation of ​

ts
particles_object.playing

position ​

ts
position: MockVector;

set_direction ​

ts
set_direction: Mock<(direction: vector) => void>;

Set particle forward direction.

Remarks ​

Pass a meaningful direction vector; the engine builds the remaining basis vectors from it.

Param ​

direction

New normalized direction.

Implementation of ​

ts
particles_object.set_direction

set_orientation ​

ts
set_orientation: Mock<UnknownFunction>;

Set particle orientation.

Param ​

yaw

Yaw angle.

Param ​

pitch

Pitch angle.

Param ​

roll

Roll angle.

Implementation of ​

ts
particles_object.set_orientation

start_path ​

ts
start_path: Mock<(isLooped: boolean) => void>;

Start moving along the loaded path.

Remarks ​

Requires load_path() first.

Param ​

is_looped

Whether path playback loops.

Implementation of ​

ts
particles_object.start_path

stop ​

ts
stop: Mock<() => void>;

Stop particles immediately.

Implementation of ​

ts
particles_object.stop

stop_deferred ​

ts
stop_deferred: Mock<() => void>;

Stop particles after existing particles finish.

Implementation of ​

ts
particles_object.stop_deferred

stop_deffered ​

ts
stop_deffered: Mock<() => void>;

Stop particles after existing particles finish.

Implementation of ​

ts
particles_object.stop_deffered

stop_path ​

ts
stop_path: Mock<() => void>;

Stop path playback.

Remarks ​

Requires load_path() first.

Implementation of ​

ts
particles_object.stop_path

REGISTRY ​

ts
static REGISTRY: Map<string, MockParticleObject>;