@davi-ai/react-bodyengine-three 1.0.34 → 1.0.37
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/EmotionController.d.ts +4 -0
- package/dist/contexts/characterStore.d.ts +1 -4
- package/dist/contexts/speechStore.d.ts +8 -15
- package/dist/index.d.ts +2 -2
- package/dist/index.js +402 -1230
- package/dist/models/enums.d.ts +1 -64
- package/dist/models/types.d.ts +18 -47
- package/dist/stats.html +1 -1
- package/package.json +11 -4
- package/dist/components/PostProcessing/pipelines.d.ts +0 -37
- package/dist/models/constants.d.ts +0 -15
- package/dist/utils/getCameraPositionVector.d.ts +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CharacterProps } from '../models/types';
|
|
3
|
-
declare const Character: ({ url, type, animationsUrl, gender, speechSynthesis, camera, onLoadingCompleted, autoLookAt, breathing, disableAnimations, debug, inspector, enableBml, animationWeights, license, detectGpuData, environmentPreset, tonemapping, targets,
|
|
3
|
+
declare const Character: ({ url, type, animationsUrl, gender, speechSynthesis, camera, onLoadingCompleted, autoLookAt, breathing, disableAnimations, debug, inspector, enableBml, animationWeights, license, detectGpuData, environmentPreset, tonemapping, targets, lipSyncFromAudio, lipSyncAudio, lipSyncAudioContext }: CharacterProps) => React.JSX.Element;
|
|
4
4
|
export default Character;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
interface EmotionControllerProps {
|
|
2
2
|
animationsLoaded: boolean;
|
|
3
3
|
}
|
|
4
|
+
/**
|
|
5
|
+
* Turns the emotions of the emotion store (setEmotions) into the action units played on the face:
|
|
6
|
+
* the strongest one only, or all of them blended (setUseTopEmotionOnly(false)).
|
|
7
|
+
*/
|
|
4
8
|
declare const EmotionController: ({ animationsLoaded }: EmotionControllerProps) => null;
|
|
5
9
|
export default EmotionController;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Character, GlobalManager, LipSyncManager,
|
|
1
|
+
import { Character, GlobalManager, LipSyncManager, 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;
|
|
5
4
|
eyeBlinkManager?: EyeBlinkManager | null;
|
|
6
5
|
animationManager?: AnimationManager | null;
|
|
7
6
|
FACSManager?: FACSManager | null;
|
|
@@ -14,7 +13,6 @@ interface CharacterStore {
|
|
|
14
13
|
globalManager: GlobalManager;
|
|
15
14
|
managers: Managers;
|
|
16
15
|
lipSyncManager: LipSyncManager | null;
|
|
17
|
-
blendshapeManager: BlendshapeManager | null;
|
|
18
16
|
eyeBlinkManager: EyeBlinkManager | null;
|
|
19
17
|
animationManager?: AnimationManager | null;
|
|
20
18
|
FACSManager?: FACSManager | null;
|
|
@@ -32,7 +30,6 @@ export declare const setCharacter: (value: Character | null) => void;
|
|
|
32
30
|
export declare const setManagers: (value: Managers) => void;
|
|
33
31
|
export declare const setGlobalSyncManager: (value: GlobalManager | null) => void;
|
|
34
32
|
export declare const setLipSyncManager: (value: LipSyncManager | null) => void;
|
|
35
|
-
export declare const setBlendshapeManager: (value: BlendshapeManager | null) => void;
|
|
36
33
|
export declare const setEyeBlinkManager: (value: EyeBlinkManager | null) => void;
|
|
37
34
|
export declare const setAnimationManager: (value: AnimationManager | null) => void;
|
|
38
35
|
export declare const setFACSManager: (value: FACSManager | null) => void;
|
|
@@ -1,45 +1,38 @@
|
|
|
1
|
-
import { SpeechSynthesisCredentials
|
|
1
|
+
import { SpeechSynthesisCredentials } 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
|
-
|
|
9
|
-
|
|
10
|
-
currentBlendshapeIndex: number;
|
|
8
|
+
/** Number of leading visemes already handed to the LipSyncManager. */
|
|
9
|
+
playedVisemeCount: number;
|
|
11
10
|
voice: SpeechSynthesisVoice | null;
|
|
12
11
|
voices: Array<SpeechSynthesisVoice>;
|
|
13
12
|
textToSpeak: string | null;
|
|
14
13
|
visemeIntensity: number;
|
|
15
|
-
|
|
14
|
+
/** Lips driven by the speech audio rather than by its visemes. */
|
|
15
|
+
lipSyncFromAudio: boolean;
|
|
16
16
|
}
|
|
17
17
|
export declare const useSpeechStore: import('zustand').UseBoundStore<import('zustand').StoreApi<speechStore>>;
|
|
18
18
|
export declare const setCredentials: (value: SpeechSynthesisCredentials) => void;
|
|
19
19
|
export declare const setCurrentUtterance: (value: SpeechSynthesisUtterance | null) => void;
|
|
20
20
|
export declare const setBoundaries: (value: Array<SpeechSynthesisEventProps>) => void;
|
|
21
21
|
export declare const setVisemes: (value: Array<SpeechSynthesisEventProps>) => void;
|
|
22
|
-
export declare const setBlendshapes: (value: Array<BlendShapesData>) => void;
|
|
23
22
|
export declare const addViseme: (value: SpeechSynthesisEventProps) => void;
|
|
24
|
-
export declare const addBlendshape: (value: BlendShapesData) => void;
|
|
25
23
|
/**
|
|
26
24
|
* Add viseme data extracted in SPPAS format that will be converted to ArKit viseme and played at the right moment.
|
|
27
25
|
* @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).
|
|
28
26
|
* @param {number} factorToSecond (facultative) we use tenth of microsecond as base unit of time for elapsedTime / duration. If another unit is used as entry, set this ratio to convert it to milliseconds (ratio * durationinotherunit = durationintenthofmicrosecond).
|
|
29
27
|
*/
|
|
30
28
|
export declare const addSPPASViseme: (value: SpeechSynthesisEventProps, factorToTenthOfMicroSecond?: number) => void;
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const setCurrentBlendshapeIndex: (value: number) => void;
|
|
29
|
+
export declare const setPlayedVisemeCount: (value: number) => void;
|
|
33
30
|
export declare const flushLipSyncData: () => void;
|
|
34
|
-
export declare const flushBlendshapeData: () => void;
|
|
35
31
|
export declare const setVoice: (value: SpeechSynthesisVoice | null) => void;
|
|
36
32
|
export declare const setVoices: (value: Array<SpeechSynthesisVoice>) => void;
|
|
37
33
|
export declare const setTextToSpeak: (value: string | null) => void;
|
|
38
34
|
export declare const getVoices: () => Array<SpeechSynthesisVoice>;
|
|
39
35
|
export declare const setVisemeIntensity: (value: number) => void;
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
* When switching at runtime, any in-progress animation will be flushed automatically.
|
|
43
|
-
*/
|
|
44
|
-
export declare const setUseBlendshapeManager: (value: boolean) => void;
|
|
36
|
+
/** Drive the lips from the speech audio (true) or from its visemes (false, default), from the next speech on. */
|
|
37
|
+
export declare const setLipSyncFromAudio: (value: boolean) => void;
|
|
45
38
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as Character } from './components/Character';
|
|
2
2
|
export { useCharacterStore, setCharacterState, getCharacterHeight } from './contexts/characterStore';
|
|
3
|
-
export { setTextToSpeak, setCurrentUtterance, setVisemes,
|
|
3
|
+
export { setTextToSpeak, setCurrentUtterance, setVisemes, addViseme, addSPPASViseme, flushLipSyncData, setVoice, getVoices, setVisemeIntensity, setLipSyncFromAudio } from './contexts/speechStore';
|
|
4
4
|
export { getCameraPosition, getLookAt, setCameraPosition, setMovable } from './contexts/cameraStore';
|
|
5
5
|
export { setCurrentAUs, setCurrentGaze, setCurrentHeadPose, setLookAtCamera, lookAtAndKeep, releaseLookAt, setShowFirstTarget } from './contexts/headStore';
|
|
6
6
|
export { setEmotions, setUseTopEmotionOnly, setAutoDecay, playFacialAnimation } from './contexts/emotionStore';
|
|
@@ -8,6 +8,6 @@ export { setAutoPlay, getAnimationsMap, playAnimationByName } from './contexts/a
|
|
|
8
8
|
export { emotionList, CharacterState, CreationTool, bmlTags } from '@davi-ai/bodyengine-three';
|
|
9
9
|
export type { FacialAnimationData } from '@davi-ai/bodyengine-three';
|
|
10
10
|
export { Positions, Distances, Rotations } from './models/enums';
|
|
11
|
-
export { presets } from '
|
|
11
|
+
export { cameraPresets as presets } from '@davi-ai/bodyengine-three';
|
|
12
12
|
export type { EnvironmentPreset } from './models/types';
|
|
13
13
|
export { Object3D } from 'three/webgpu';
|