Skip to content

ViewFx beta ​

Interface of @v12-engine/client

ts
export interface ViewFx

The game's effects as its view says them (GameView.fx): its effects by id (fx.json over them) and by event in code, how much they may cost and how much of them is drawn, the looks of its abilities and spells, and the marks on the ground

Members ​

abilities ​

ts
abilities?: ViewAbilityLooks;

What the abilities and buffs look like: their colours, decided in code, their styles (ViewAbilityLooks)

budget ​

ts
budget?: Partial<FxBudget>;

How much of the effects may be alive at once at full quality (FxBudget: particles, systems, lights, effects), over the client's (FX_BUDGET); a part of it at a lower quality. Past it, the least important and farthest go. In code: client.fx.budget

defs ​

ts
defs?: Record<string, FxDef>;

The game's effects by name (FxDef): fire, a blast, a glow, each a timeline of particles, a model, a light, a mark on the ground, a sound, a shake, other effects; with knobs (params) that tune it without copying it. Played in code (kit.fx.play, client.fx.play), by the rules for every player (world.fx), and by what names them (a death, a building going up). Ready-made ones are there to take (presetFx). None when left out: the client plays no effect a game did not ask for

detail ​

ts
detail?: Partial<FxDetail>;

How many of an effect's particles there are by its distance (FxDetail), over the client's (FX_DETAIL). In code: client.fx.detail, and client.fx.pick to decide effect by effect

for ​

ts
for?: (id: string) => FxDef | undefined;

An effect decided in code by its name, before those of defs: one made for this game's settings, a mod's. Nothing leaves it to them

marks ​

ts
marks?: MarksLook;

The marks on the ground for what happens: impacts, levelling up, areas revealed, the aim indicator (MarksLook)