Skip to content

FxView beta ​

Class of @v12-engine/client/lite-views

ts
export declare class FxView

The effects of a world on the renderer: the game's by name, played, followed and ended. Made by FxView.create, or by createWorldFx for a world's

Members ​

budget ​

ts
budget: FxBudget;

How much may be alive at once, at the quality's full fx (FxBudget): the game's (GameView.fx.budget) over the client's (FX_BUDGET)

clear ​

ts
clear(): void;

Stops every effect at once: a new game, a scene going

create ​

ts
static create(renderer: Renderer, host: FxViewHost, options?: FxViewOptions): Promise<FxView>;

Makes the effects' view on a renderer, once their pictures are made

decals ​

ts
readonly decals: FxDecals;

The marks the effects leave on the ground

define ​

ts
define(id: string, def: FxDef): void;

Adds an effect by name in code, over one declared of the same name (a mod's, one made as the game runs)

defs ​

ts
defs: Readonly<Record<string, FxDef>>;

The game's effects by name, as its view declares them (GameView.fx.defs)

detail ​

ts
detail: FxDetail;

How many of an effect's particles there are by its distance (FxDetail): the game's (GameView.fx.detail) over the client's

detailScale ​

ts
detailScale: () => number;

How far everything drawn by distance goes: the quality's detail

dispose ​

ts
dispose(): void;

Stops every effect and takes its lamps, decals, trails, glows, particles and pictures away

draw ​

ts
readonly draw: ParticleDraw;

What draws the particles of every effect

dropped ​

ts
dropped: number;

Effects ended for the budget since it was made

for ​

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

An effect decided in code by its name, before those declared or defined (GameView.fx.for)

forget ​

ts
forget(playing: PlayingFx): void;

Lets go of an effect that is over

get ​

ts
get(effect: string | FxDef): FxDef | undefined;

An effect by name as it is played: what it extends worked in. Nothing for a name there is none of

giveLamp ​

ts
giveLamp(lamp: import('@v12-engine/render').Lamp): void;

Puts a lamp away, out, for the next effect that wants one

giveModel ​

ts
giveModel(src: string, copy: FxModelCopy): void;

A copy put away for the next (giveModel): hidden; past eight of a model, taken away

glow ​

ts
readonly glow: FxGlow;

The rods, rings and plates that glow: what beams and links are drawn with

host ​

ts
readonly host: FxViewHost;

What the effects ask of the game around them: the ground, the wind, the entities, sounds

list ​

ts
list(): readonly FxHandle[];

Every effect playing now, those it is made of left out

names ​

ts
names(): string[];

The names of every effect there is: declared and defined

noiseTime ​

ts
noiseTime: number;

The clock of the particles' noise: three a second, as Babylon's noise texture went

now ​

ts
get now(): number;

Seconds since it was made, for what is drawn by the clock

particleHost ​

ts
readonly particleHost: Omit<ParticleHost, 'surface'>;

What every run of particles is made in

pick ​

ts
pick?: (effect: FxHandle, context: FxPickContext) => number | undefined;

How much of an effect there is, 0 (not played: paused, hidden) to 1, decided in code from its distance and whether it is in view: what detail says when it gives nothing

play ​

ts
play(effect: string | FxDef, options?: FxPlay): FxHandle;

Plays an effect, by name or as it is, at a place or on an entity. An effect of a name there is none of plays nothing

refuse ​

ts
refuse(message: string): void;

Says once that something is not played

renderer ​

ts
readonly renderer: Renderer;

The renderer the effects are drawn with

sheets ​

ts
readonly sheets: FxSheets;

The pictures the particles, marks and glows are drawn with

start ​

ts
start(effect: string | FxDef, options: FxPlay, parent?: PlayingFx): PlayingFx;

Plays one, under another effect where it is a part of it

stats ​

ts
stats(): FxStats;

What is alive now: effects, particles, systems, lights, marks on the ground

store ​

ts
readonly store: ParticleStore;

The systems of particles alive and put away

takeLamp ​

ts
takeLamp(): import('@v12-engine/render').Lamp;

A lamp of the renderer's for an effect, one put away if there is one

takeModel ​

ts
takeModel(src: string): Promise<FxModelCopy | undefined>;

A copy of a model for a model part: one put away if there is one (the client's takeModel), none where nothing draws one

trails ​

ts
readonly trails: FxTrails;

The ribbons of light behind the effects' parts as they move, and behind whatever else asks for one

undefine ​

ts
undefine(id: string): void;

Takes away an effect defined in code: the declared one of the name, if any, is back

update ​

ts
update(dt: number): void;

A frame: every effect moved on by dt seconds, seen or not, as many as its distance and the budget allow; then everything of them drawn: the particles, the trails, the marks, what glows