Skip to content

FxPart beta ​

TypeAlias of @v12-engine/client

ts
export type FxPart = PartTiming & ({
    particles: ParticleDef;
} | {
    model: FxModel;
} | {
    light: FxLight;
} | {
    decal: FxDecal;
} | {
    sound: Param<string | {
        name: string;
        volume?: number;
    } | undefined>;
} | {
    shake: Param<number | {
        strength: number;
        time?: number;
    }>;
} | {
    flash: {
        color?: Param<FxColor>;
        time?: number;
    };
} | {
    trail: FxTrail;
} | {
    fx: string | FxDef;
    params?: Param<FxParams>;
} | {
    make: (context: FxContext) => FxInstance;
});

A part of an effect: when it starts and how long it lasts (PartTiming), and one thing: - particles: an emitter (ParticleDef); - model: a model (FxModel); - light: a light (FxLight, through the scene's lights); - decal: a mark on the ground (FxDecal); - sound: a sound of the game's (GameView.sounds), heard from where the effect is (none for nothing: a knob that may name one); - shake: the view shaken as by something heavy there, strength about 1 for a big blast, over time seconds; - flash: the entity the effect is on in a colour for time seconds (a hit); - trail: a ribbon behind it as it moves (FxTrail); - fx: another effect, by name or as it is, with knobs of its own (params): effects are made of effects; - make: the game's own, in code (FxContext)