Skip to content

Sparks beta ​

Class of @v12-engine/client

ts
export declare class Sparks

The sparks of one style: bursts that are over by themselves, and streams that go on until they are let go. Each is a ParticleDef (sparkParticles) played as an effect of the effect system it is given (kit.fx, SpellContext.fx), so they keep to its budget, its detail by distance and the quality's effects, stand still off the screen and out of range, are hidden in the fog of war and counted in its stats, as every other effect is

Members ​

constructor ​

ts
constructor(fx: SparkEffects);

Constructs a new instance of the Sparks class

burst ​

ts
burst(x: number, y: number, z: number, look: SparkLook): FxHandle;

Sparks that come once, around a point, and are gone when they have burnt out

dispose ​

ts
dispose(): void;

Every one of them gone at once

release ​

ts
release(stream: FxHandle): void;

No more of them come. The ones in the air burn out

stream ​

ts
stream(from: {
        x: number;
        y: number;
        z: number;
    }, look: SparkLook): FxHandle;

Sparks that keep coming from wherever from is moved to, until they are let go with release. from is the effect's place itself (FxPlay.at), read again every frame the effect system moves on. Its rate knob is how many a second, look.count until it is set (handle.set({ rate: 0 }): none for now)