Class: MockParticleObject
Mock of the X-Ray engine particles object.
Implements
particles_object
Constructors
Constructor
new MockParticleObject(name: string): MockParticleObject;Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
MockParticleObject
Methods
create()
static create(name: string): MockParticleObject;Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
MockParticleObject
mock()
static mock(name: string): particles_object;Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
particles_object
Properties
direction
direction: MockVector;isLooped
isLooped: boolean = false;isPaused
isPaused: boolean = false;isPlaying
isPlaying: boolean = false;last_position
last_position: Mock<() => MockVector>;Returns
Last particle position.
Implementation of
particles_object.last_positionload_path
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
particles_object.load_pathlooped
looped: Mock<() => boolean>;Returns
Whether the particle system is looped.
Implementation of
particles_object.loopedmove_to
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
particles_object.move_toname
name: string;pause_path
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
particles_object.pause_pathplay
play: Mock<() => void>;Start particle playback at the current transform.
Implementation of
particles_object.playplay_at_pos
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
particles_object.play_at_posplaying
playing: Mock<() => boolean>;Returns
Whether particles are currently playing.
Implementation of
particles_object.playingposition
position: MockVector;set_direction
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
particles_object.set_directionset_orientation
set_orientation: Mock<UnknownFunction>;Set particle orientation.
Param
yaw
Yaw angle.
Param
pitch
Pitch angle.
Param
roll
Roll angle.
Implementation of
particles_object.set_orientationstart_path
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
particles_object.start_pathstop
stop: Mock<() => void>;Stop particles immediately.
Implementation of
particles_object.stopstop_deferred
stop_deferred: Mock<() => void>;Stop particles after existing particles finish.
Implementation of
particles_object.stop_deferredstop_deffered
stop_deffered: Mock<() => void>;Stop particles after existing particles finish.
Implementation of
particles_object.stop_defferedstop_path
stop_path: Mock<() => void>;Stop path playback.
Remarks
Requires load_path() first.
Implementation of
particles_object.stop_pathREGISTRY
static REGISTRY: Map<string, MockParticleObject>;