xverse-components-avatar
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

API

参数名 类型 说明 默认值 是否必填 备注
componentId string - false 组件 id,由协议透传下来
avatarId string 角色 ID - true -
avatarImg string 角色头像 - false -
birthPointId string 出生点 - true -
userId string 唯一标识 - true -
nickName string 昵称 - false -
isNPC boolean true false -
bubbleOptions IBubbleOptions 添加头顶气泡 - false 非必填
sayWorldsText string 头顶显示固定提示文案 - false 固定展示,不消失
componentOptions IComponentOptions 角色自定义套装 - false 非必填
disposeWhenComponentUnmount boolean 组件卸载时销毁 Avatar 实例 - false -
animationPath string 用户动画 - false -
scaling number 缩放倍数 - false -
nickNameOptions INickNameOption 昵称设置 - false 还没支持同步 仅对自己生效
openTextReader boolean 是否开启文字播报能力 - false -
ttsConfig string ttsConfig - false -
aiName string aiName - false ttsConfig 音色的一个 key
sayText string 语音播报文字内容 - false 推荐用一个变量控制
isSeparateControlVolume boolean 是否单独控制 - false 如果声音开启了单独控制,可以在要控制该音频的组件里选中该组件
isRandomClothing boolean 是否随机服装 - false 若存在自定义服装则不生效
lockedComponents string 未解锁的装扮 Id - false 可以将装扮的 Id 用,分割
onError (err: Error) => any 初始化过程出现错误 - false -
onClick (props: { userId: string }) => any 点击 - false -
onPress (props: { userId: string }) => any 长按 - false -
onLoaded (props: { userId: string }) => any 加载完 - false -
onBubbleClick (props: { userId: string }) => any 头顶气泡点击事件 - false -
onBubbleDispose (props: { userId: string }) => any 头顶气泡消失事件 - false -
onStartRead () => void 开始读一段文字时的事件 - false -
onFinishRead () => void 结束读一段文字时的事件 - false -
onNickNameChange (props: { avatarId: string; nickName: string }) => void nickName 改变 - false -

Readme

Keywords

Package Sidebar

Install

npm i xverse-components-avatar

Weekly Downloads

58

Version

1.0.12

License

MIT

Unpacked Size

170 kB

Total Files

9

Last publish

Collaborators

  • canny_1207
  • joycess
  • shi2800