xverse-components-character-creator
Version:
xverse components character-creator
493 lines (492 loc) • 14.2 kB
TypeScript
export declare enum EType {
DiyFace = 0,
DressUp = 1,
AIFace = 2,
AvatarSelect = 3,
Skin = 4
}
export declare enum EDiyFaceModel {
'Face_Whole' = "\u8138\u578B",
'Face_Applezone' = "\u82F9\u679C\u808C",
'Face_Cheek' = "\u8138\u988A",
'Face_LowerJaw' = "\u4E0B\u988C",
'Face_Jaw' = "\u4E0B\u5DF4",
'EyeBrow_Whole' = "\u6574\u4F53",
'EyeBrow_Inner' = "\u7709\u5934",
'EyeBrow_Middle' = "\u7709\u5CF0",
'EyeBrow_Outter' = "\u7709\u5C3E",
'Eye_Whole' = "\u6574\u4F53",
'Eye_Whole2' = "\u8F6E\u5ED3",
'Eye_CornInner' = "\u5185\u773C\u89D2",
'Eye_CornOutter' = "\u5916\u773C\u89D2",
'Eye_UpEyelid' = "\u4E0A\u773C\u76AE",
'Eye_LowEyelid' = "\u4E0B\u773C\u76AE",
'Nose_Whole' = "\u6574\u4F53",
'Nose_NasalTip' = "\u9F3B\u5934",
'Nose_NoseWing' = "\u9F3B\u7FFC",
'Nose_NoseBridge' = "\u9F3B\u6881",
'Mouth_Whole' = "\u6574\u4F53",
'Mouth_UpLip' = "\u4E0A\u5507",
'Mouth_Lip' = "\u5507\u5F62",
'Mouth_LipMark' = "\u5507\u73E0",
'Mouth_LowLip' = "\u4E0B\u5507",
'Mouth_Corn' = "\u5634\u89D2"
}
export interface IActiveStyle {
'--xv-brand-primary-default'?: string;
}
export interface IDiyFaceImg {
/**
* @title 捏脸模型默认图片
* @setter ImageSetter
*/
defaultImage: string;
/**
* @title 捏脸模型选中图片
* @setter ImageSetter
*/
activeImage: string;
}
interface IFaceModel {
type: 'Face_Whole' | 'Face_Applezone' | 'Face_Cheek' | 'Face_LowerJaw' | 'Face_Jaw';
image: IDiyFaceImg;
}
export interface IFaceTypeModel {
/**
* @title 捏脸 脸部部位 Tab默认图片
* @setter ImageSetter
*/
defaultImage: string;
/**
* @title 捏脸 脸部部位 Tab选中图片
* @setter ImageSetter
*/
activeImage: string;
/**
* @title 部位名称
*/
name: 'Face';
/**
* @title 脸部模型
*/
model: IFaceModel[];
}
interface IEyeModel {
type: 'Eye_Whole' | 'Eye_Whole2' | 'Eye_CornInner' | 'Eye_CornOutter' | 'Eye_UpEyelid' | 'Eye_LowEyelid';
image: IDiyFaceImg;
}
export interface IEyeTypeModel {
/**
* @title 捏脸 脸部部位 Tab默认图片
* @setter ImageSetter
*/
defaultImage: string;
/**
* @title 捏脸 脸部部位 Tab选中图片
* @setter ImageSetter
*/
activeImage: string;
/**
* @title 部位名称
*/
name: 'Eye';
/**
* @title 眼部模型
*/
model: IEyeModel[];
}
interface IEyeBrowModel {
type: 'EyeBrow_Whole' | 'EyeBrow_Inner' | 'EyeBrow_Middle' | 'EyeBrow_Outter';
image: IDiyFaceImg;
}
export interface IEyeBrowTypeModel {
/**
* @title 捏脸 脸部部位 Tab默认图片
* @setter ImageSetter
*/
defaultImage: string;
/**
* @title 捏脸 脸部部位 Tab选中图片
* @setter ImageSetter
*/
activeImage: string;
/**
* @title 部位名称
*/
name: 'EyeBrow';
/**
* @title 眉部模型
*/
model: IEyeBrowModel[];
}
interface INoseModel {
type: 'Nose_Whole' | 'Nose_NasalTip' | 'Nose_NoseWing' | 'Nose_NoseBridge';
image: IDiyFaceImg;
}
export interface INoseTypeModel {
/**
* @title 捏脸 脸部部位 Tab默认图片
* @setter ImageSetter
*/
defaultImage: string;
/**
* @title 捏脸 脸部部位 Tab选中图片
* @setter ImageSetter
*/
activeImage: string;
/**
* @title 部位名称
*/
name: 'Nose';
/**
* @title 鼻子模型
*/
model: INoseModel[];
}
interface IMouthModel {
type: 'Mouth_Whole' | 'Mouth_UpLip' | 'Mouth_Lip' | 'Mouth_LowLip' | 'Mouth_Corn';
image: IDiyFaceImg;
}
export interface IMouthTypeModel {
/**
* @title 捏脸 脸部部位 Tab默认图片
* @setter ImageSetter
*/
defaultImage: string;
/**
* @title 捏脸 脸部部位 Tab选中图片
* @setter ImageSetter
*/
activeImage: string;
/**
* @title 部位名称
*/
name: 'Mouth';
/**
* @title 嘴巴模型
*/
model: IMouthModel[];
}
/**
* @title BODY: 身体 | SUIT: 套装 | Hair: 头发 | Head: 头发 | CLOTHES: 上衣 | Pendant: 挂件 | PANTS: 裤子 | SHOES: 鞋子
*/
export type DressUpType = 'SUIT' | 'HAIR' | 'CLOTHES' | 'PANTS' | 'PENDANT' | 'SHOES';
export interface IDressUpNavImg {
/**
* @title 换装Tab默认图片
* @setter ImageSetter
*/
defaultImage: string;
/**
* @title 换装Tab选中图片
* @setter ImageSetter
*/
activeImage: string;
/**
* @title 部位名称
*/
name: DressUpType;
}
export type DiyFaceAllModel = IFaceModel | IEyeModel | IEyeBrowModel | INoseModel | IMouthModel;
export type FaceType = 'Face' | 'Eye' | 'EyeBrow' | 'Mouth' | 'Nose';
export interface IAvatarUnitsComponent {
type: DressUpType;
unitList: {
id: string;
isDefault: boolean;
name: string;
thumbnail: string;
url: string;
}[];
}
export declare const COMPONENT_TYPE_LIST: DressUpType[];
export declare enum EProfileList {
ANIMATION = "animations",
COMPONENT = "components",
FACELIFT = "diyFace",
FACESOLTS = "faceSolts"
}
export type ProfileList = 'ANIMATION' | 'COMPONENT' | 'FACELIFT' | 'FACESOLTS' | 'SKIN';
export interface IProfileListType {
data: string;
type: ProfileList;
}
export interface IFormatDataFaceSoltsData {
id: number;
imgUrl: string;
faceDiyMap: Record<SliderListType, number>;
}
export interface IFormatDataDressUpData {
diyFace?: Record<SliderListType, number>;
components?: string[];
animations?: string[];
faceSolts?: IFormatDataFaceSoltsData[];
}
export type SVGType = (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
export declare const DEFAULT_DIY_FACE_LIST: FaceType[];
export declare const DEFAULT_BACKGROUND_IMAGE = "https://appasset.xverse.cn/20/image/19e20c71483d4367961e9dec28c2a829/background.png";
export declare const EDiyFaceAndDressImg: {
/**换装所需图片 */
Nav_Clothes: string;
Hair: string;
Clothes: string;
Pants: string;
Shoes: string;
Nav_Clothes_Active: string;
Hair_Active: string;
Clothes_Active: string;
Pants_Active: string;
Shoes_Active: string;
/**捏脸所需图片 */
Nav_DiyFace: string;
Face: string;
EyeBrow: string;
Eye: string;
Nose: string;
Mouth: string;
Nav_DiyFace_Active: string;
Face_Active: string;
EyeBrow_Active: string;
Eye_Active: string;
Nose_Active: string;
Mouth_Active: string;
Face_Whole: string;
Face_Apple: string;
Face_Cheek: string;
Face_LowerJaw: string;
Face_Jaw: string;
Eye_Whole: string;
Eye_Profile: string;
Eye_CornInner: string;
Eye_CornOuter: string;
Eye_UpEyelid: string;
Eye_LowEyelid: string;
EyeBrow_Whole: string;
EyeBrow_Inner: string;
EyeBrow_Middle: string;
EyeBrow_End: string;
Nose_Whole: string;
Nose_Tip: string;
Nose_Wing: string;
Nose_Bridge: string;
Mouth_Whole: string;
Mouth_UpLip: string;
Mouth_LipMark: string;
Mouth_LowLip: string;
Mouth_Corn: string;
Nav_AIFace: string;
Nav_AIFace_Active: string;
};
export interface IDiyFaceItem {
defaultImage: string;
activeImage: string;
name: FaceType;
model: DiyFaceAllModel[];
}
export declare const DEFAULT_DRESS_NAV_LIST: DressUpType[];
export interface IClothesItem {
defaultImage: string;
activeImage: string;
name: DressUpType;
}
export declare const formatImgConfigFrom: (config?: string) => {
firstNav: {
DressUp: {
defaultImage: string;
activeImage: string;
};
DiyFace: {
defaultImage: string;
activeImage: string;
};
AIFace: {
defaultImage: string;
activeImage: string;
};
Skin: {
defaultImage: string;
activeImage: string;
};
};
clothes: IClothesItem[];
diyFace: IDiyFaceItem[];
diyFaceNav: FaceType[];
};
export declare const DiyFaceSliderList: {
Face_Whole_Height: string;
Face_Applezone_Width: string;
Face_Applezone_VerticalPos: string;
Face_Applezone_Thick: string;
Face_Cheek_Width: string;
Face_Cheek_VerticalPos: string;
Face_Cheek_Thick: string;
Face_LowerJaw_Width: string;
Face_LowerJaw_VerticalPos: string;
Face_Jaw_Wdith: string;
Face_Jaw_Height: string;
Face_Jaw_ZPos: string;
EyeBrow_Whole_Margin: string;
EyeBrow_Whole_VerticalPos: string;
EyeBrow_Inner_HorizonPos: string;
EyeBrow_Inner_VerticalPos: string;
EyeBrow_Middle_HorizonPos: string;
EyeBrow_Middle_VerticalPos: string;
EyeBrow_Outter_HorizonPos: string;
EyeBrow_Outter_VerticalPos: string;
Eye_Whole_Scale: string;
Eye_Whole_Margin: string;
Eye_Whole_VerticalPos: string;
Eye_Whole2_ZPos: string;
Eye_Whole2_Rotate: string;
Eye_Whole2_Eyelid: string;
Eye_CornInner_Margin: string;
Eye_CornInner_VerticalPos: string;
Eye_CornOutter_Margin: string;
Eye_CornOutter_VerticalPos: string;
Eye_UpEyelid_Shape: string;
Eye_UpEyelid_VerticalPos: string;
Eye_LowEyelid_Shape: string;
Eye_LowEyelid_VerticalPos: string;
Nose_Whole_Width: string;
Nose_Whole_Height: string;
Nose_NasalTip_Scale: string;
Nose_NasalTip_VerticalPos: string;
Nose_NasalTip_ZPos: string;
Nose_NoseWing_Width: string;
Nose_NoseWing_VerticalPos: string;
Nose_NoseBridge_Width: string;
Nose_NoseBridge_ZPos: string;
Mouth_Whole_Scale: string;
Mouth_Whole_VerticalPos: string;
Mouth_Whole_ZPos: string;
Mouth_UpLip_Width: string;
Mouth_UpLip_Height: string;
Mouth_Lip_MShape: string;
Mouth_Lip_VerticalPos: string;
Mouth_LowLip_Width: string;
Mouth_LowLip_Height: string;
Mouth_Corn_Width: string;
Mouth_Corn_VerticalPos: string;
};
export type SliderListType = keyof typeof DiyFaceSliderList;
export declare const DIY_FACE_CONFIG_NAMES: SliderListType[];
export declare enum EFaceSecondTab {
'Face_Whole' = "\u8138\u578B",
'Face_Applezone' = "\u82F9\u679C\u808C",
'Face_Cheek' = "\u8138\u988A",
'Face_LowerJaw' = "\u4E0B\u988C",
'Face_Jaw' = "\u4E0B\u5DF4",
'EyeBrow_Whole' = "\u6574\u4F53",
'EyeBrow_Inner' = "\u7709\u5934",
'EyeBrow_Middle' = "\u7709\u5CF0",
'EyeBrow_Outter' = "\u7709\u5C3E",
'Eye_Whole' = "\u6574\u4F53",
'Eye_Whole2' = "\u8F6E\u5ED3",
'Eye_CornInner' = "\u5185\u773C\u89D2",
'Eye_CornOutter' = "\u5916\u773C\u89D2",
'Eye_UpEyelid' = "\u4E0A\u773C\u76AE",
'Eye_LowEyelid' = "\u4E0B\u773C\u76AE",
'Nose_Whole' = "\u6574\u4F53",
'Nose_NasalTip' = "\u9F3B\u5934",
'Nose_NoseWing' = "\u9F3B\u7FFC",
'Nose_NoseBridge' = "\u9F3B\u6881",
'Mouth_Whole' = "\u6574\u4F53",
'Mouth_UpLip' = "\u4E0A\u5507",
'Mouth_Lip' = "\u5507\u5F62",
'Mouth_LipMark' = "\u5507\u73E0",
'Mouth_LowLip' = "\u4E0B\u5507",
'Mouth_Corn' = "\u5634\u89D2"
}
export type FaceSecondTabType = keyof typeof EFaceSecondTab;
/**捏脸时avatar的位置 */
export declare const FACE_PANEL_AVATAR_POSITION: {
x: number;
y: number;
z: number;
};
/**换装时avatar的位置 */
export declare const COMP_PANEL_AVATAR_POSITION: {
x: number;
y: number;
z: number;
};
/**换装时avatar的角度 */
export declare const AVATAR_ROTATION: {
yaw: number;
pitch: number;
roll: number;
};
/**换装时camera */
export declare const CAMERA_POSE: {
position: {
x: number;
y: number;
z: number;
};
rotation: {
pitch: number;
yaw: number;
roll: number;
};
};
export declare const AIFaceData: {
data: {
face_params: {
EyeBrow_Inner_HorizonPos: number;
EyeBrow_Inner_VerticalPos: number;
EyeBrow_Middle_HorizonPos: number;
EyeBrow_Middle_VerticalPos: number;
EyeBrow_Outter_HorizonPos: number;
EyeBrow_Outter_VerticalPos: number;
EyeBrow_Whole_Margin: number;
EyeBrow_Whole_VerticalPos: number;
Eye_CornInner_Margin: number;
Eye_CornInner_VerticalPos: number;
Eye_CornOutter_Margin: number;
Eye_CornOutter_VerticalPos: number;
Eye_LowEyelid_Shape: number;
Eye_LowEyelid_VerticalPos: number;
Eye_UpEyelid_Shape: number;
Eye_UpEyelid_VerticalPos: number;
Eye_Whole2_Eyelid: number;
Eye_Whole2_Rotate: number;
Eye_Whole2_ZPos: number;
Eye_Whole_Margin: number;
Eye_Whole_Scale: number;
Eye_Whole_VerticalPos: number;
Face_Applezone_Thick: number;
Face_Applezone_VerticalPos: number;
Face_Applezone_Width: number;
Face_Cheek_Thick: number;
Face_Cheek_VerticalPos: number;
Face_Cheek_Width: number;
Face_Jaw_Height: number;
Face_Jaw_Wdith: number;
Face_Jaw_ZPos: number;
Face_LowerJaw_VerticalPos: number;
Face_LowerJaw_Width: number;
Face_Whole_Height: number;
Mouth_Corn_VerticalPos: number;
Mouth_Corn_Width: number;
Mouth_Lip_MShape: number;
Mouth_Lip_VerticalPos: number;
Mouth_LowLip_Height: number;
Mouth_LowLip_Width: number;
Mouth_UpLip_Height: number;
Mouth_UpLip_Width: number;
Mouth_Whole_Scale: number;
Mouth_Whole_VerticalPos: number;
Mouth_Whole_ZPos: number;
Nose_NasalTip_Scale: number;
Nose_NasalTip_VerticalPos: number;
Nose_NasalTip_ZPos: number;
Nose_NoseBridge_Width: number;
Nose_NoseBridge_ZPos: number;
Nose_NoseWing_VerticalPos: number;
Nose_NoseWing_Width: number;
Nose_Whole_Height: number;
Nose_Whole_Width: number;
};
};
};
export {};