Class: Avatar

(abstract) Avatar(scene, folder, shadowGenerator)

Base avatar class, provides common methods for actual humanoid/video/mesh avatars

Constructor

(abstract) new Avatar(scene, folder, shadowGenerator)

Parameters:
Name Type Description
scene
folder ServerFolder with the content
shadowGenerator optional to cast shadows
Source:

Classes

Avatar

Members

displayName

Whether to display the name above the head, default true
Source:

displayName

Whether to display the name above the head, defaults to value of static displayName
Source:

displayText

Should written/spoken text be displayed above the head, default true
Source:

displayText

Should written/spoken text be displayed above the head, defaults to value of static displayText
Source:

name

Name of the avatar/user
Source:

textOffset

Distance for text above the avatar
Source:

use3dText

Should 3d text be used for name/spoken text, defaults to value of static use3dText
Source:

use3dText

Should we use 3d text (as opposed to Label and TextArea) - performance penalty
Source:

userHeight

Height of the user, default 1.8
Source:

Methods

baseMesh()

Returns the top-level mesh of the avatar
Source:

basePosition()

Returns the current base position of the avatar, e.g. where the feet are
Source:

(async) emoji()

Remote emoji event routed by WorldManager
Source:

getUrl()

Returns the URL of the avatar file
Source:

(async) setName(name)

Set the name and display it above the avatar
Parameters:
Name Type Description
name
Source:

textPositionRelative()

Position of text above the avatar, default implementation returns topPositionRelative()+textOffset
Source:

topPositionAbsolute()

Position of top of the avatar, default implementation returns basePosition()+topPositionRelative()
Source:

topPositionRelative()

Position of top of the avatar, default implementation returns userHeight Vector3
Source:

(async) write(wrote)

Write locally generated text, used internally
Parameters:
Name Type Description
wrote text to write above the head
Source:

(async) wrote(client)

Remote event routed by WorldManager, displays whatever user wrote above avatar's head
Parameters:
Name Type Description
client Client that wrote a text
Source: