Skip to content

Latest commit

 

History

History
73 lines (59 loc) · 5.21 KB

three-avatar.md

File metadata and controls

73 lines (59 loc) · 5.21 KB

Home > @verseengine/three-avatar

three-avatar package

Avatar system

Classes

Class Description
AutoWalker Avatar extension for automatic walking animation when moving.
Avatar Avatar
AvatarIK IK (Inverse Kinematics) to move the avatar's arms in sync with the XR controller's movements. (Experimental Features)
Blinker Avatar extension to implement blink.
SimpleBoundingBoxCollider Avatar extension to determine collision using BoundingBox.

Functions

Function Description
addMirrorHUD(avatar, container, options) Create a mirror in front of the avatar.
createAvatar(avatarData, renderer, frustumCulled, options) Create Avatar
createAvatarIK(avatar, handGetter, option) Create AvatarIK. (Experimental Features)
getDefaultRotationLimitSet(t) Default value of RotationLimitSet.
getDefaultWristRotationOffsetSet(t) Default value of WristRotationOffsetSet.
getRenderInfo() Get GPU information. See also WEBGL_debug_renderer_info
isAndroid()
isAnimationDataLoaded() Whether animation data is pre-loaded or not
isIOS()
isLowSpecDevice() Whether the device does not have a GPU capable of processing enough. (Experimental Features)
isTouchDevice()
Lipsync(context, ms, threshold, smoothness, pitch) Slightly customized threelipsync module.
loadAvatarModel(avatarData, renderer, frustumCulled, options) Load avatar file data.
preLoadAnimationData(source, fetchFunc) Pre-load animation data.
registerSyncAvatarHeadAndCamera(xr, nonVrCamera, head, headOffset, getAvatar, options) Automatically adjust camera when switching between VR and non-VR modes.
setDefaultExtensions(avatar) Set up default extensions for Avatar
setNonVRCameraMode(camera, cameraOffset, avatar, isFirstPerson) Adjust the camera for non-VR mode.

Interfaces

Interface Description
AddMirrorHUDOptions
AvatarExtension Interface to extend Avatar.
AvatarModel Avatar model.
AvatarOptions
CreateAvatarIKOptions
CreateAvatarOptions

Variables

Variable Description
AvatarTypeReadyPlayerMe Ready Player Me | Avatar Data Types
AvatarTypeVrmV0 VRM version less than 1 | Avatar Data Types
AvatarTypeVrmV1 VRM version 1.x | Avatar Data Types

Type Aliases

Type Alias Description
AvatarAnimationDataSource mixamo animation file URLs
AvatarType Avatar Data Types
DecordersOptions URL of the library required if GLTF data is compressed. If omitted, decompress with default values.
IKTargetBones Shoulder, Elbow, Wrist
RotationLimit Limit the range of rotation of joint.
RotationLimitSet Limit the range of rotation of joints.
Vector3Tupple x,y,z
VRHandGetter Get XR controller objects. Use to get the position of the IK hand.
WristRotationOffsetSet Offset of rotation angle between the XR controller and the avatar's wrist.