Avatarcomponent

AvatarComponent class

Avatar component, used to display VRM avatars in the game (for more info on VRM files, see VRM site (opens in a new tab))

See AvatarComponentData for the data schema used to create an audio component

Signature:

export declare class AvatarComponent extends Component3D<AvatarComponentData> 

Extends: Component3D<AvatarComponentData>

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the AvatarComponent class.

Properties

PropertyModifiersTypeDescription
animationstringset the animation of the avatar
avatarScalenumberget the scale of the avatar vrm
textstringget the text displayed on top of the avatar
visiblebooleanSee Threejs doc (opens in a new tab)
vrmUrlreadonlystringget the url of the vrm displayed by the avatar component

Methods

MethodModifiersDescription
getBBox(target)see
getTransformData()
updateAnimationMode(mode)the render mode of the avatar component
updateRenderMode(mode)the render mode of the avatar component
updateVRM(url, data)Updates the vrm displayed by the avatar component