Skip to content

FxHandle beta ​

Interface of @v12-engine/client

ts
export interface FxHandle

An effect playing (kit.fx.play): changed, moved, stopped

Members ​

alive ​

ts
readonly alive: boolean;

Whether it is still playing (stopped ones too, until what was alive of them has ended)

def ​

ts
readonly def: FxDef;

The effect it plays

done ​

ts
readonly done: Promise<void>;

Settles when it is over: ended, stopped and finished, or its entity gone

held ​

ts
readonly held: boolean;

Whether it is held where it is (hold): nothing of it moves on, its particles stand in the air

hold ​

ts
hold(held: boolean): void;

Holds it where it is, or lets it go on: what a paused cinematic does to the effects it played. The effects it is made of are held with it

length ​

ts
readonly length: number;

Seconds it lasts by itself (fxLength): Infinity for one that goes on until it is stopped

marks ​

ts
readonly marks: number;

Its marks lying on the ground still (decal parts), after it is over too

move ​

ts
move(to: Pick<FxPlay, 'at' | 'on' | 'point' | 'offset'>): void;

Moves it to a place or onto an entity

params ​

ts
readonly params: FxParams;

Its knobs as they are now

particles ​

ts
readonly particles: number;

Its particles alive now, the effects it is made of included

set ​

ts
set(params: FxParams): void;

Changes knobs while it plays: what reads them follows (set({ size: 0.5 }))

stop ​

ts
stop(options?: {
        mode?: FxStop;
        fade?: number;
        clear?: boolean;
    }): void;

Stops it, as its stop says or as said here; clear takes its marks off the ground too, over or not