UNPKG

xverse-components-character-creator

Version:

xverse components character-creator

181 lines (180 loc) 4.46 kB
import { ISnippet } from '@xverse/matrix-shared-types'; import { CSSProperties } from 'react'; import { IButtonProps } from 'xverse-components-button'; import { IModalProps } from 'xverse-components-modal'; export declare const snippet: ISnippet; type UseType = 0 | 1 | 2 | 3 | 4; type IAvatarConfig = { /** * @title Avatar 角色 * @setter AvatarIdSetter */ avatarId: string; /** * @title Avatar 性别标识 图片地址 * @setter ImageSetter */ sexImageUrl: string; }; /** * @componentName CharacterCreator * @title 捏脸换装 * @type 3D * @contributor 时猛 甘晶 * @imgLink https://appasset.xverse.cn/20/image/be61cb7a2abd462f80a8e95713d1738c/charactor-creator.png */ export interface ICharacterCreatorProps { /** * @title 背景图 * @setter ImageSetter */ backgroundImg?: string; /** * @title 点击保存按钮时都保存 * @notExternal */ saveAll?: boolean; /** * @title 点击保存按钮时自动关闭 */ autoClose?: boolean; /** * @title 包含捏脸换装两个功能中的哪些2 * @description 0:为捏脸 1:为换装 2:为AI换脸 3:性别选择 4.换肤 */ use?: UseType[]; /** * @title 面板配置项 * @setter JsonSetter * @description 为json格式,内容样例子见捏脸换装imgJsonExample.json * @notExternal */ configJson?: string; /** * @title 一、二级菜单样式设置 * @setter StyleSetter */ navStyle?: CSSProperties; /** * @title 一、二级菜单选中样式设置 * @setter StyleSetter * @notExternal */ navActiveStyle?: CSSProperties; /** * @title 捏脸图标选中样式设置 * @setter StyleSetter * @notExternal */ diyFaceItemActiveStyle?: CSSProperties; /** * @title 装扮图标样式设置 * @setter StyleSetter * @notExternal */ clothesItemStyle?: CSSProperties; /** * @title 装扮图标选中样式设置 * @setter StyleSetter * @notExternal */ clothesItemActiveStyle?: CSSProperties; /** * @title 底部遮盖层样式设置 * @setter StyleSetter * @notExternal */ bottomCoverStyle?: CSSProperties; /** * @title 是否从云端读取数据且把数据存到云端, * @default false * @description false: 表示不从云端存储和读取用户数据 * @notExternal */ isFromCloud?: boolean; /** * @title 退出提示弹窗 * @slot Modal * @description 配置的最后一个按钮是确认键 * @notExternal */ exitModalProps?: IModalProps; /** * @title 保存按钮 * @slot Button */ saveButtonProps?: IButtonProps; /** * @title avatar性别 * @notExternal */ avatarGender?: 'girl' | 'boy'; /** * @title 未解锁的装扮Id * @description 可以将装扮的Id用,分割 * @notExternal */ lockedComponents?: string; /** * @title 未解锁图标样式设置 * @setter StyleSetter * @notExternal */ lockedImgStyle?: CSSProperties; /** * @title 返回按钮样式 * @setter StyleSetter * @notExternal */ backBtnStyle?: CSSProperties; /** * @title avatar 配置信息 * @notExternal */ avatars?: IAvatarConfig[]; /** * @title 性别切换按钮图标 * @setter ImageSetter * @notExternal */ switchIconImageUrl?: string; /** * @title 未保存时点击退出 触发事件 */ onCloseWhenUnSave?: () => void; /** * @title 已保存时点击退出 触发事件 */ onCloseWhenSaved?: () => void; /** * @title 点击保存时触发事件 */ onSave?: () => void; /** * @title 进入捏脸换装时失败的事件 * @notExternal */ onError?: () => void; /** * @title 更新捏脸换装到服务器报错 * @notExternal */ onUpdateError?: () => void; /** * @title 更新捏脸换装到服务器成功 * @notExternal */ onUpdateSuccess?: () => void; className?: string; /** * @title 解锁装扮操作 * @notExternal */ onUnLockedComponent?: () => void; /** * @title 点击隐私条款后的回调 * @notExternal */ onClickPrivateRule?: () => void; } export {};