@davi-ai/react-bodyengine-three 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Character.d.ts +1 -1
- package/dist/components/Controllers/CharacterController.d.ts +1 -1
- package/dist/components/HorizontalLine.d.ts +8 -0
- package/dist/contexts/characterStore.d.ts +4 -1
- package/dist/contexts/emotionStore.d.ts +1 -1
- package/dist/contexts/headStore.d.ts +3 -1
- package/dist/contexts/speechStore.d.ts +13 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7797 -15204
- package/dist/models/enums.d.ts +0 -1
- package/dist/models/types.d.ts +8 -2
- package/dist/stats.html +1 -1
- package/package.json +4 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CharacterProps } from '../models/types';
|
|
2
|
-
declare const Character: ({ url, type, animationsUrl, gender, speechSynthesis, camera, onLoadingCompleted, autoLookAt, breathing, disableAnimations, debug, enableBml, animationWeights, license, detectGpuData, environmentPreset, tonemapping, targets }: CharacterProps) => JSX.Element;
|
|
2
|
+
declare const Character: ({ url, type, animationsUrl, gender, speechSynthesis, camera, onLoadingCompleted, autoLookAt, breathing, disableAnimations, debug, enableBml, animationWeights, license, detectGpuData, environmentPreset, tonemapping, targets, useBlendshapeManager }: CharacterProps) => JSX.Element;
|
|
3
3
|
export default Character;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import * as THREE from "three/webgpu";
|
|
3
|
+
interface HorizontalLineProps {
|
|
4
|
+
points: THREE.Vector3[];
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const HorizontalLine: ({ points, color }: HorizontalLineProps) => React.JSX.Element;
|
|
8
|
+
export default HorizontalLine;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Character, GlobalManager, LipSyncManager, EyeBlinkManager, AnimationManager, FACSManager, HeadPoseManager, GazeManager, BmlManager, CharacterState } from '
|
|
1
|
+
import { Character, GlobalManager, LipSyncManager, BlendshapeManager, EyeBlinkManager, AnimationManager, FACSManager, HeadPoseManager, GazeManager, BmlManager, CharacterState } from '@davi-ai/bodyengine-three';
|
|
2
2
|
interface Managers {
|
|
3
3
|
lipSyncManager?: LipSyncManager | null;
|
|
4
|
+
blendshapeManager?: BlendshapeManager | null;
|
|
4
5
|
eyeBlinkManager?: EyeBlinkManager | null;
|
|
5
6
|
animationManager?: AnimationManager | null;
|
|
6
7
|
FACSManager?: FACSManager | null;
|
|
@@ -13,6 +14,7 @@ interface CharacterStore {
|
|
|
13
14
|
globalManager: GlobalManager;
|
|
14
15
|
managers: Managers;
|
|
15
16
|
lipSyncManager: LipSyncManager | null;
|
|
17
|
+
blendshapeManager: BlendshapeManager | null;
|
|
16
18
|
eyeBlinkManager: EyeBlinkManager | null;
|
|
17
19
|
animationManager?: AnimationManager | null;
|
|
18
20
|
FACSManager?: FACSManager | null;
|
|
@@ -30,6 +32,7 @@ export declare const setCharacter: (value: Character | null) => void;
|
|
|
30
32
|
export declare const setManagers: (value: Managers) => void;
|
|
31
33
|
export declare const setGlobalSyncManager: (value: GlobalManager | null) => void;
|
|
32
34
|
export declare const setLipSyncManager: (value: LipSyncManager | null) => void;
|
|
35
|
+
export declare const setBlendshapeManager: (value: BlendshapeManager | null) => void;
|
|
33
36
|
export declare const setEyeBlinkManager: (value: EyeBlinkManager | null) => void;
|
|
34
37
|
export declare const setAnimationManager: (value: AnimationManager | null) => void;
|
|
35
38
|
export declare const setFACSManager: (value: FACSManager | null) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Emotions } from '../models/enums';
|
|
2
2
|
import { EmotionData } from '../models/types';
|
|
3
|
-
import { FacialAnimationData } from '
|
|
3
|
+
import { FacialAnimationData } from '@davi-ai/bodyengine-three';
|
|
4
4
|
interface EmotionStore {
|
|
5
5
|
emotions: Array<EmotionData>;
|
|
6
6
|
currentTopEmotion: Emotions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionUnitData, GazeData, HeadPoseData } from '
|
|
1
|
+
import { ActionUnitData, GazeData, HeadPoseData } from '@davi-ai/bodyengine-three';
|
|
2
2
|
import * as THREE from "three/webgpu";
|
|
3
3
|
interface HeadStore {
|
|
4
4
|
currentAUs: Array<ActionUnitData> | null;
|
|
@@ -6,6 +6,7 @@ interface HeadStore {
|
|
|
6
6
|
currentHeadPose: HeadPoseData | null;
|
|
7
7
|
lookAtCamera: boolean;
|
|
8
8
|
targets: THREE.Object3D[];
|
|
9
|
+
showFirstTarget: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare const useHeadStore: import('zustand').UseBoundStore<import('zustand').StoreApi<HeadStore>>;
|
|
11
12
|
export declare const setTargets: (targets: THREE.Object3D[]) => void;
|
|
@@ -17,4 +18,5 @@ export declare const setLookAtCamera: (value: boolean) => void;
|
|
|
17
18
|
export declare const lookAtAndSteady: (value: boolean) => void;
|
|
18
19
|
export declare const lookAtAndKeep: (target?: THREE.Camera) => void;
|
|
19
20
|
export declare const releaseLookAt: () => void;
|
|
21
|
+
export declare const setShowFirstTarget: (value: boolean) => void;
|
|
20
22
|
export {};
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import { SpeechSynthesisCredentials } from '../models/types';
|
|
1
|
+
import { SpeechSynthesisCredentials, BlendShapesData } from '../models/types';
|
|
2
2
|
import { SpeechSynthesisUtterance, SpeechSynthesisEventProps } from '@davi-ai/web-speech-cognitive-services-davi';
|
|
3
3
|
interface speechStore {
|
|
4
4
|
credentials?: SpeechSynthesisCredentials;
|
|
5
5
|
currentUtterance: SpeechSynthesisUtterance | null;
|
|
6
6
|
boundaries: Array<SpeechSynthesisEventProps>;
|
|
7
7
|
visemes: Array<SpeechSynthesisEventProps>;
|
|
8
|
+
blendshapes: Array<BlendShapesData>;
|
|
8
9
|
currentVisemeIndex: number;
|
|
10
|
+
currentBlendshapeIndex: number;
|
|
9
11
|
voice: SpeechSynthesisVoice | null;
|
|
10
12
|
voices: Array<SpeechSynthesisVoice>;
|
|
11
13
|
textToSpeak: string | null;
|
|
12
14
|
visemeIntensity: number;
|
|
15
|
+
useBlendshapeManager: boolean;
|
|
13
16
|
}
|
|
14
17
|
export declare const useSpeechStore: import('zustand').UseBoundStore<import('zustand').StoreApi<speechStore>>;
|
|
15
18
|
export declare const setCredentials: (value: SpeechSynthesisCredentials) => void;
|
|
16
19
|
export declare const setCurrentUtterance: (value: SpeechSynthesisUtterance | null) => void;
|
|
17
20
|
export declare const setBoundaries: (value: Array<SpeechSynthesisEventProps>) => void;
|
|
18
21
|
export declare const setVisemes: (value: Array<SpeechSynthesisEventProps>) => void;
|
|
22
|
+
export declare const setBlendshapes: (value: Array<BlendShapesData>) => void;
|
|
19
23
|
export declare const addViseme: (value: SpeechSynthesisEventProps) => void;
|
|
24
|
+
export declare const addBlendshape: (value: BlendShapesData) => void;
|
|
20
25
|
/**
|
|
21
26
|
* Add viseme data extracted in SPPAS format that will be converted to ArKit viseme and played at the right moment.
|
|
22
27
|
* @param {SpeechSynthesisEventProps} value viseme data (id, elapsedTime = time at which the viseme shall begin, duration can be set to 0 because we override it later).
|
|
@@ -24,10 +29,17 @@ export declare const addViseme: (value: SpeechSynthesisEventProps) => void;
|
|
|
24
29
|
*/
|
|
25
30
|
export declare const addSPPASViseme: (value: SpeechSynthesisEventProps, factorToTenthOfMicroSecond?: number) => void;
|
|
26
31
|
export declare const setCurrentVisemeIndex: (value: number) => void;
|
|
32
|
+
export declare const setCurrentBlendshapeIndex: (value: number) => void;
|
|
27
33
|
export declare const flushLipSyncData: () => void;
|
|
34
|
+
export declare const flushBlendshapeData: () => void;
|
|
28
35
|
export declare const setVoice: (value: SpeechSynthesisVoice | null) => void;
|
|
29
36
|
export declare const setVoices: (value: Array<SpeechSynthesisVoice>) => void;
|
|
30
37
|
export declare const setTextToSpeak: (value: string | null) => void;
|
|
31
38
|
export declare const getVoices: () => Array<SpeechSynthesisVoice>;
|
|
32
39
|
export declare const setVisemeIntensity: (value: number) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Switch between LipSyncManager (false, default) and BlendshapeManager (true).
|
|
42
|
+
* When switching at runtime, any in-progress animation will be flushed automatically.
|
|
43
|
+
*/
|
|
44
|
+
export declare const setUseBlendshapeManager: (value: boolean) => void;
|
|
33
45
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { default as Character } from './components/Character';
|
|
2
2
|
export { useCharacterStore, setCharacterState, getCharacterHeight } from './contexts/characterStore';
|
|
3
|
-
export { setTextToSpeak, setCurrentUtterance, setVisemes, addViseme, addSPPASViseme, flushLipSyncData, setVoice, getVoices, setVisemeIntensity } from './contexts/speechStore';
|
|
3
|
+
export { setTextToSpeak, setCurrentUtterance, setVisemes, setBlendshapes, addViseme, addBlendshape, addSPPASViseme, flushLipSyncData, flushBlendshapeData, setVoice, getVoices, setVisemeIntensity } from './contexts/speechStore';
|
|
4
4
|
export { getCameraPosition, getLookAt, setCameraPosition, setMovable } from './contexts/cameraStore';
|
|
5
|
-
export { setCurrentAUs, setCurrentGaze, setCurrentHeadPose, setLookAtCamera, lookAtAndKeep, lookAtAndSteady, releaseLookAt, } from './contexts/headStore';
|
|
5
|
+
export { setCurrentAUs, setCurrentGaze, setCurrentHeadPose, setLookAtCamera, lookAtAndKeep, lookAtAndSteady, releaseLookAt, setShowFirstTarget } from './contexts/headStore';
|
|
6
6
|
export { setEmotions, setUseTopEmotionOnly, setAutoDecay, playFacialAnimation } from './contexts/emotionStore';
|
|
7
7
|
export { setAutoPlay, getAnimationsMap, playAnimationByName } from './contexts/animationStore';
|
|
8
|
-
export { emotionList, CharacterState, CreationTool, bmlTags } from '
|
|
9
|
-
export type { FacialAnimationData } from '
|
|
8
|
+
export { emotionList, CharacterState, CreationTool, bmlTags } from '@davi-ai/bodyengine-three';
|
|
9
|
+
export type { FacialAnimationData } from '@davi-ai/bodyengine-three';
|
|
10
10
|
export { Positions, Distances, Rotations } from './models/enums';
|
|
11
11
|
export { presets } from './models/constants';
|
|
12
12
|
export type { EnvironmentPreset } from './models/types';
|