Skip to content

Commit

Permalink
fix(avatar): blendshape type moved to types.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
BDenysovets committed Jul 25, 2022
1 parent d4219f1 commit c83b26e
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 66 deletions.
67 changes: 1 addition & 66 deletions src/components/Avatar/Avatar.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PresetsType } from '@react-three/drei/helpers/environment-assets';
import { Vector3 } from 'three';
import { CameraLighting } from 'src/components/SceneControls/CameraLighting.component';
import { AnimationModel } from 'src/components/Models/AnimationModel/AnimationModel.component';
import { LightingProps } from 'src/types';
import { HeadBlendShapeType, LightingProps } from 'src/types';
import { BaseCanvas } from 'src/components/BaseCanvas';
import { HalfBodyModel, StaticModel, PoseModel } from 'src/components/Models';
import { isValidGlbUrl } from 'src/services';
Expand Down Expand Up @@ -32,71 +32,6 @@ export const CAMERA = {
}
};

export type HeadBlendShapeType =
| 'browDownLeft'
| 'browDownRight'
| 'browInnerUp'
| 'browOuterUpLeft'
| 'browOuterUpRight'
| 'cheekPuff'
| 'cheekSquintLeft'
| 'cheekSquintRight'
| 'eyeBlinkLeft'
| 'eyeBlinkRight'
| 'eyeSquintLeft'
| 'eyeSquintRight'
| 'eyeWideLeft'
| 'eyeWideRight'
| 'eyesClosed'
| 'eyesLookDown'
| 'eyesLookUp'
| 'jawForward'
| 'jawLeft'
| 'jawOpen'
| 'jawRight'
| 'mouthClose'
| 'mouthDimpleLeft'
| 'mouthDimpleRight'
| 'mouthFrownLeft'
| 'mouthFrownRight'
| 'mouthFunnel'
| 'mouthLeft'
| 'mouthLowerDownLeft'
| 'mouthLowerDownRight'
| 'mouthOpen'
| 'mouthPressLeft'
| 'mouthPressRight'
| 'mouthPucker'
| 'mouthRight'
| 'mouthRollLower'
| 'mouthRollUpper'
| 'mouthShrugLower'
| 'mouthShrugUpper'
| 'mouthSmile'
| 'mouthSmileLeft'
| 'mouthSmileRight'
| 'mouthStretchLeft'
| 'mouthStretchRight'
| 'mouthUpperUpLeft'
| 'mouthUpperUpRight'
| 'noseSneerLeft'
| 'noseSneerRight'
| 'viseme_CH'
| 'viseme_DD'
| 'viseme_E'
| 'viseme_FF'
| 'viseme_I'
| 'viseme_O'
| 'viseme_PP'
| 'viseme_RR'
| 'viseme_SS'
| 'viseme_TH'
| 'viseme_U'
| 'viseme_aa'
| 'viseme_kk'
| 'viseme_nn'
| 'viseme_sil';

export type Emotion = Record<HeadBlendShapeType, number>;

export interface AvatarProps extends LightingProps {
Expand Down
65 changes: 65 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,68 @@ export interface LightingProps {
spotLightColor?: string;
spotLightAngle?: number;
}

export type HeadBlendShapeType =
| 'browDownLeft'
| 'browDownRight'
| 'browInnerUp'
| 'browOuterUpLeft'
| 'browOuterUpRight'
| 'cheekPuff'
| 'cheekSquintLeft'
| 'cheekSquintRight'
| 'eyeBlinkLeft'
| 'eyeBlinkRight'
| 'eyeSquintLeft'
| 'eyeSquintRight'
| 'eyeWideLeft'
| 'eyeWideRight'
| 'eyesClosed'
| 'eyesLookDown'
| 'eyesLookUp'
| 'jawForward'
| 'jawLeft'
| 'jawOpen'
| 'jawRight'
| 'mouthClose'
| 'mouthDimpleLeft'
| 'mouthDimpleRight'
| 'mouthFrownLeft'
| 'mouthFrownRight'
| 'mouthFunnel'
| 'mouthLeft'
| 'mouthLowerDownLeft'
| 'mouthLowerDownRight'
| 'mouthOpen'
| 'mouthPressLeft'
| 'mouthPressRight'
| 'mouthPucker'
| 'mouthRight'
| 'mouthRollLower'
| 'mouthRollUpper'
| 'mouthShrugLower'
| 'mouthShrugUpper'
| 'mouthSmile'
| 'mouthSmileLeft'
| 'mouthSmileRight'
| 'mouthStretchLeft'
| 'mouthStretchRight'
| 'mouthUpperUpLeft'
| 'mouthUpperUpRight'
| 'noseSneerLeft'
| 'noseSneerRight'
| 'viseme_CH'
| 'viseme_DD'
| 'viseme_E'
| 'viseme_FF'
| 'viseme_I'
| 'viseme_O'
| 'viseme_PP'
| 'viseme_RR'
| 'viseme_SS'
| 'viseme_TH'
| 'viseme_U'
| 'viseme_aa'
| 'viseme_kk'
| 'viseme_nn'
| 'viseme_sil';

0 comments on commit c83b26e

Please sign in to comment.