AvatarPreview
constAvatarPreview:object
Defined in: client/api.d.ts:7226
A live figure of yourself framed into a rect, for a gear pane: the world backend puts it in front of a camera-locked slab.
Type Declaration
Section titled “Type Declaration”create()
Section titled “create()”create(
options):number
Starts an avatar preview and returns its id, or 0 when refused (state(0).status says why). One at a time: a new one replaces the last, and emotePreview’s show takes the figure back.
Parameters
Section titled “Parameters”options
Section titled “options”anchor is required.
Returns
Section titled “Returns”number
destroy()
Section titled “destroy()”destroy(
id):boolean
Drops the figure and gives back every view setting it held.
Parameters
Section titled “Parameters”number
From create.
Returns
Section titled “Returns”boolean
play()
Section titled “play()”play(
id,clip,loop?):boolean
Plays a clip on the figure, the same machinery as emotePreview.
Parameters
Section titled “Parameters”number
From create.
string
AnimSequence object path; “” returns to the default looping idle.
boolean
Default true.
Returns
Section titled “Returns”boolean
state()
Section titled “state()”state(
id):AvatarPreviewState
What the avatar preview is showing now.
Parameters
Section titled “Parameters”number
From create, or 0.
Returns
Section titled “Returns”update()
Section titled “update()”update(
id,options):boolean
False for a dead id or a malformed field (state(id).status names it); nothing is applied then.
Parameters
Section titled “Parameters”number
From create.
options
Section titled “options”Partial<AvatarPreviewOptions>
Merged into the current options.
Returns
Section titled “Returns”boolean