PortraitBox beta
Interface of @v12-engine/client
ts
export interface PortraitBoxA portrait box: one canvas and one render target, showing one portrait after another (the selection's unit, then a speaker's line, then the selection's again) without making its target again. client.portraits.box(canvas)
Members
live
ts
readonly live: boolean;Whether what it shows now is live
setTalking
ts
setTalking(talking: boolean, emotion?: string): void;Starts or stops the talk of who it shows, with the line's mood
setVisible
ts
setVisible(visible: boolean): void;Draws or stops drawing: a box out of sight draws nothing
show
ts
show(spec: PortraitSpec | undefined, options?: Pick<PortraitOptions, 'talking' | 'emotion'>): boolean;Shows someone in the box (nothing: the box is empty), live where it can be, a still of the type else (unless the box says still: false). Whether it is live. The same someone again only changes whether they talk
spec
ts
readonly spec: PortraitSpec | undefined;What it shows now
stop
ts
stop(): void;Takes the box away: its model, its target, its reads