FxView beta
Class of @v12-engine/client/lite-views
export declare class FxViewThe 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
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
clear(): void;Stops every effect at once: a new game, a scene going
create
static create(renderer: Renderer, host: FxViewHost, options?: FxViewOptions): Promise<FxView>;Makes the effects' view on a renderer, once their pictures are made
decals
readonly decals: FxDecals;The marks the effects leave on the ground
define
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
defs: Readonly<Record<string, FxDef>>;The game's effects by name, as its view declares them (GameView.fx.defs)
detail
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
detailScale: () => number;How far everything drawn by distance goes: the quality's detail
dispose
dispose(): void;Stops every effect and takes its lamps, decals, trails, glows, particles and pictures away
draw
readonly draw: ParticleDraw;What draws the particles of every effect
dropped
dropped: number;Effects ended for the budget since it was made
for
for?: (id: string) => FxDef | undefined;An effect decided in code by its name, before those declared or defined (GameView.fx.for)
forget
forget(playing: PlayingFx): void;Lets go of an effect that is over
get
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
giveLamp(lamp: import('@v12-engine/render').Lamp): void;Puts a lamp away, out, for the next effect that wants one
giveModel
giveModel(src: string, copy: FxModelCopy): void;A copy put away for the next (giveModel): hidden; past eight of a model, taken away
glow
readonly glow: FxGlow;The rods, rings and plates that glow: what beams and links are drawn with
host
readonly host: FxViewHost;What the effects ask of the game around them: the ground, the wind, the entities, sounds
list
list(): readonly FxHandle[];Every effect playing now, those it is made of left out
names
names(): string[];The names of every effect there is: declared and defined
noiseTime
noiseTime: number;The clock of the particles' noise: three a second, as Babylon's noise texture went
now
get now(): number;Seconds since it was made, for what is drawn by the clock
particleHost
readonly particleHost: Omit<ParticleHost, 'surface'>;What every run of particles is made in
pick
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
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
refuse(message: string): void;Says once that something is not played
renderer
readonly renderer: Renderer;The renderer the effects are drawn with
sheets
readonly sheets: FxSheets;The pictures the particles, marks and glows are drawn with
start
start(effect: string | FxDef, options: FxPlay, parent?: PlayingFx): PlayingFx;Plays one, under another effect where it is a part of it
stats
stats(): FxStats;What is alive now: effects, particles, systems, lights, marks on the ground
store
readonly store: ParticleStore;The systems of particles alive and put away
takeLamp
takeLamp(): import('@v12-engine/render').Lamp;A lamp of the renderer's for an effect, one put away if there is one
takeModel
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
readonly trails: FxTrails;The ribbons of light behind the effects' parts as they move, and behind whatever else asks for one
undefine
undefine(id: string): void;Takes away an effect defined in code: the declared one of the name, if any, is back
update
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