Skip to content

EventLook beta ​

Interface of @v12-engine/client

ts
export interface EventLook

How the view reacts to one of the game's events, declared (GameView.on: 'mine.exploded': fx: 'explosion', sound: 'boom' ): an effect played where the event says (its x, zandy, or on its entity, id or on), a sound heard from there, the view shaken. where and params decide from the event's payload in code

Members ​

fx ​

ts
fx?: string | FxDef;

An effect of the view's by name (GameView.fx.defs), or as it is

params ​

ts
params?: FxParams | ((payload: any) => FxParams | undefined);

Its knobs, or decided from the event

shake ​

ts
shake?: number;

How hard the view shakes there, about 1 for a big blast

sound ​

ts
sound?: string;

A sound of the game's, heard from where the event is, and how loud

volume ​

ts
volume?: number;

How loud the sound is, 0..1

where ​

ts
where?: (payload: any) => FxPlay | undefined;

Where it plays, from the event, over where the event's own fields say