@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
package/dist/models/enums.d.ts
CHANGED
|
@@ -1,64 +1 @@
|
|
|
1
|
-
|
|
2
|
-
eye = "eye",
|
|
3
|
-
mouth = "mouth",
|
|
4
|
-
neck = "neck",
|
|
5
|
-
clavicle = "clavicle",
|
|
6
|
-
torso = "torso",
|
|
7
|
-
belly = "belly",
|
|
8
|
-
lowerbelly = "lowerbelly",
|
|
9
|
-
hips = "hips",
|
|
10
|
-
higherthigh = "higherthigh",
|
|
11
|
-
thigh = "thigh",
|
|
12
|
-
knee = "knee",
|
|
13
|
-
leg = "leg",
|
|
14
|
-
feet = "feet"
|
|
15
|
-
}
|
|
16
|
-
declare enum Rotations {
|
|
17
|
-
face = 1,
|
|
18
|
-
eighthleft = 2,
|
|
19
|
-
thirdleft = 3,
|
|
20
|
-
quarterleft = 4,
|
|
21
|
-
halfleft = 5,
|
|
22
|
-
eighthright = 6,
|
|
23
|
-
thirdright = 7,
|
|
24
|
-
quarterright = 8,
|
|
25
|
-
halfright = 9
|
|
26
|
-
}
|
|
27
|
-
declare enum Distances {
|
|
28
|
-
veryclose = 1,
|
|
29
|
-
closer = 2,
|
|
30
|
-
close = 3,
|
|
31
|
-
midclose = 4,
|
|
32
|
-
medium = 5,
|
|
33
|
-
midfar = 6,
|
|
34
|
-
far = 7,
|
|
35
|
-
farther = 8,
|
|
36
|
-
veryfar = 9
|
|
37
|
-
}
|
|
38
|
-
declare enum BodyMesh {
|
|
39
|
-
cc3 = "CC_Base_Body",
|
|
40
|
-
avatarsdk = "AvatarBody",
|
|
41
|
-
avaturn = "Body_Mesh"
|
|
42
|
-
}
|
|
43
|
-
declare enum Emotions {
|
|
44
|
-
Jay = "joy",
|
|
45
|
-
Anger = "anger",
|
|
46
|
-
Contempt = "contempt",
|
|
47
|
-
Disgust = "disgust",
|
|
48
|
-
Dislike = "dislike",
|
|
49
|
-
Distress = "distress",
|
|
50
|
-
Fear = "fear",
|
|
51
|
-
Frustration = "frustration",
|
|
52
|
-
Guilt = "guilt",
|
|
53
|
-
Hope = "hope",
|
|
54
|
-
Love = "love",
|
|
55
|
-
Pride = "pride",
|
|
56
|
-
Regret = "regret",
|
|
57
|
-
Relief = "relief",
|
|
58
|
-
Sadness = "sadness",
|
|
59
|
-
Shame = "shame",
|
|
60
|
-
Smile = "smile",
|
|
61
|
-
Surprise = "surprise",
|
|
62
|
-
Neutral = "neutral"
|
|
63
|
-
}
|
|
64
|
-
export { Positions, Rotations, Distances, BodyMesh, Emotions };
|
|
1
|
+
export { Positions, Rotations, Distances, BodyMesh, Emotions } from '@davi-ai/bodyengine-three';
|
package/dist/models/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ToneMapping,
|
|
2
|
-
import { CreationTool, AnimationWeight } from '@davi-ai/bodyengine-three';
|
|
3
|
-
import { Positions, Rotations, Distances, Emotions } from './enums';
|
|
1
|
+
import { ToneMapping, Object3D } from 'three/webgpu';
|
|
2
|
+
import { CreationTool, AnimationWeight, AudioLipSyncSource, EmotionData, CameraPositionData, DefaultDistances, DefaultPositions } from '@davi-ai/bodyengine-three';
|
|
4
3
|
interface SpeechSynthesisCredentials {
|
|
5
4
|
region?: string;
|
|
6
5
|
subscriptionKey?: string;
|
|
@@ -32,53 +31,25 @@ interface CharacterProps extends SpeechSynthesisOptions {
|
|
|
32
31
|
environmentPreset?: EnvironmentPreset;
|
|
33
32
|
tonemapping?: ToneMapping;
|
|
34
33
|
targets?: Object3D[];
|
|
35
|
-
/**
|
|
36
|
-
|
|
34
|
+
/**
|
|
35
|
+
* When true, the lips follow the speech audio itself (level and spectrum) instead of the visemes
|
|
36
|
+
* of the speech synthesis: the fallback used for speech without visemes, here tried on the Azure voices.
|
|
37
|
+
* Default: false.
|
|
38
|
+
*/
|
|
39
|
+
lipSyncFromAudio?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Audio the lips follow for the whole life of the character, whatever the speech synthesis does: a media
|
|
42
|
+
* element (still played), a MediaStream (e.g. WebRTC, only listened to: play it elsewhere) or a Web Audio
|
|
43
|
+
* node (tapped where it is). Visemes, then the speech audio of lipSyncFromAudio, take precedence while
|
|
44
|
+
* there are some. Can change at any time (null / undefined to stop).
|
|
45
|
+
*/
|
|
46
|
+
lipSyncAudio?: AudioLipSyncSource | null;
|
|
47
|
+
/** Audio context for lipSyncAudio, created if needed (a node always uses its own). */
|
|
48
|
+
lipSyncAudioContext?: AudioContext;
|
|
37
49
|
}
|
|
38
50
|
interface Position2D {
|
|
39
51
|
x: number;
|
|
40
52
|
y: number;
|
|
41
53
|
}
|
|
42
|
-
interface DefaultPositions {
|
|
43
|
-
eye: Vector3;
|
|
44
|
-
mouth: Vector3;
|
|
45
|
-
neck: Vector3;
|
|
46
|
-
clavicle: Vector3;
|
|
47
|
-
torso: Vector3;
|
|
48
|
-
belly: Vector3;
|
|
49
|
-
lowerbelly: Vector3;
|
|
50
|
-
hips: Vector3;
|
|
51
|
-
higherthigh: Vector3;
|
|
52
|
-
thigh: Vector3;
|
|
53
|
-
knee: Vector3;
|
|
54
|
-
leg: Vector3;
|
|
55
|
-
feet: Vector3;
|
|
56
|
-
}
|
|
57
|
-
interface DefaultDistances {
|
|
58
|
-
veryclose: number;
|
|
59
|
-
closer: number;
|
|
60
|
-
close: number;
|
|
61
|
-
midclose: number;
|
|
62
|
-
medium: number;
|
|
63
|
-
midfar: number;
|
|
64
|
-
far: number;
|
|
65
|
-
farther: number;
|
|
66
|
-
veryfar: number;
|
|
67
|
-
}
|
|
68
|
-
interface CameraPositionData {
|
|
69
|
-
position?: Positions;
|
|
70
|
-
rotation?: Rotations;
|
|
71
|
-
distance?: Distances;
|
|
72
|
-
lookAt?: Positions;
|
|
73
|
-
movable?: boolean;
|
|
74
|
-
}
|
|
75
|
-
interface EmotionData {
|
|
76
|
-
emotion: Emotions;
|
|
77
|
-
value: number;
|
|
78
|
-
}
|
|
79
54
|
type EnvironmentPreset = 'apartment' | 'city' | 'dawn' | 'forest' | 'lobby' | 'night' | 'park' | 'studio' | 'sunset' | 'warehouse';
|
|
80
|
-
|
|
81
|
-
timestamp_ms: number;
|
|
82
|
-
blendshapes: Record<string, number>;
|
|
83
|
-
}
|
|
84
|
-
export type { CharacterProps, SpeechSynthesisCredentials, Position2D, DefaultPositions, DefaultDistances, CameraPositionData, EmotionData, EnvironmentPreset, BlendShapesData };
|
|
55
|
+
export type { CharacterProps, SpeechSynthesisCredentials, Position2D, DefaultPositions, DefaultDistances, CameraPositionData, EmotionData, EnvironmentPreset };
|
package/dist/stats.html
CHANGED
|
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
|
|
|
4929
4929
|
</script>
|
|
4930
4930
|
<script>
|
|
4931
4931
|
/*<!--*/
|
|
4932
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"D:/a/1/s/packages/reactjs","children":[{"name":"node_modules/zustand/esm","children":[{"uid":"13322081-1","name":"vanilla.mjs"},{"uid":"13322081-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"13322081-5","name":"characterStore.ts"},{"uid":"13322081-7","name":"cameraStore.ts"},{"uid":"13322081-9","name":"headStore.ts"},{"uid":"13322081-11","name":"animationStore.ts"},{"uid":"13322081-17","name":"speechStore.ts"},{"uid":"13322081-41","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"13322081-13","name":"enums.ts"},{"uid":"13322081-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"13322081-19"},{"name":"components","children":[{"name":"PostProcessing","children":[{"uid":"13322081-21","name":"TRAANode.js"},{"uid":"13322081-23","name":"SSGINode.js"},{"uid":"13322081-25","name":"DenoiseNode.js"},{"uid":"13322081-27","name":"CASNode.js"},{"uid":"13322081-29","name":"pipelines.ts"}]},{"uid":"13322081-31","name":"SpeechManager.tsx"},{"uid":"13322081-33","name":"HorizontalLine.tsx"},{"uid":"13322081-35","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"13322081-37"},{"uid":"13322081-39","name":"Character.tsx"}]},{"uid":"13322081-43","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"13322081-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"13322081-0"},"13322081-3":{"renderedLength":593,"gzipLength":285,"brotliLength":235,"metaUid":"13322081-2"},"13322081-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"13322081-4"},"13322081-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"13322081-6"},"13322081-9":{"renderedLength":1154,"gzipLength":359,"brotliLength":315,"metaUid":"13322081-8"},"13322081-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"13322081-10"},"13322081-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"13322081-12"},"13322081-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"13322081-14"},"13322081-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"13322081-16"},"13322081-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"13322081-18"},"13322081-21":{"renderedLength":28077,"gzipLength":7145,"brotliLength":6234,"metaUid":"13322081-20"},"13322081-23":{"renderedLength":25103,"gzipLength":6860,"brotliLength":5937,"metaUid":"13322081-22"},"13322081-25":{"renderedLength":9917,"gzipLength":3018,"brotliLength":2626,"metaUid":"13322081-24"},"13322081-27":{"renderedLength":5776,"gzipLength":2316,"brotliLength":2006,"metaUid":"13322081-26"},"13322081-29":{"renderedLength":4516,"gzipLength":1512,"brotliLength":1368,"metaUid":"13322081-28"},"13322081-31":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"13322081-30"},"13322081-33":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"13322081-32"},"13322081-35":{"renderedLength":10770,"gzipLength":3098,"brotliLength":2740,"metaUid":"13322081-34"},"13322081-37":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"13322081-36"},"13322081-39":{"renderedLength":7070,"gzipLength":1850,"brotliLength":1651,"metaUid":"13322081-38"},"13322081-41":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"13322081-40"},"13322081-43":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"13322081-42"}},"nodeMetas":{"13322081-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"13322081-1"},"imported":[],"importedBy":[{"uid":"13322081-48"},{"uid":"13322081-2"}]},"13322081-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"13322081-3"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-0"}],"importedBy":[{"uid":"13322081-48"}]},"13322081-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"13322081-5"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-44"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-16"},{"uid":"13322081-8"},{"uid":"13322081-40"},{"uid":"13322081-10"},{"uid":"13322081-36"},{"uid":"13322081-30"}]},"13322081-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"13322081-7"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-45"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-8"},{"uid":"13322081-34"},{"uid":"13322081-36"}]},"13322081-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"13322081-9"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-4"},{"uid":"13322081-6"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-34"},{"uid":"13322081-36"}]},"13322081-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"13322081-11"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-4"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"}]},"13322081-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"13322081-13"},"imported":[],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-40"},{"uid":"13322081-14"},{"uid":"13322081-18"}]},"13322081-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"13322081-15"},"imported":[{"uid":"13322081-12"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-16"},{"uid":"13322081-30"}]},"13322081-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"13322081-17"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-4"},{"uid":"13322081-14"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-30"}]},"13322081-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"13322081-19"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-12"}],"importedBy":[{"uid":"13322081-38"}]},"13322081-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/TRAANode.js","moduleParts":{"index.js":"13322081-21"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-22":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/SSGINode.js","moduleParts":{"index.js":"13322081-23"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-24":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/DenoiseNode.js","moduleParts":{"index.js":"13322081-25"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"},{"uid":"13322081-53"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-26":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/CASNode.js","moduleParts":{"index.js":"13322081-27"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-28":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/pipelines.ts","moduleParts":{"index.js":"13322081-29"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"},{"uid":"13322081-44"},{"uid":"13322081-20"},{"uid":"13322081-22"},{"uid":"13322081-24"},{"uid":"13322081-26"}],"importedBy":[{"uid":"13322081-34"}]},"13322081-30":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"13322081-31"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-16"},{"uid":"13322081-4"},{"uid":"13322081-52"},{"uid":"13322081-14"},{"uid":"13322081-44"}],"importedBy":[{"uid":"13322081-34"}]},"13322081-32":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"13322081-33"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-45"}],"importedBy":[{"uid":"13322081-34"}]},"13322081-34":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"13322081-35"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-45"},{"uid":"13322081-49"},{"uid":"13322081-28"},{"uid":"13322081-47"},{"uid":"13322081-50"},{"uid":"13322081-6"},{"uid":"13322081-8"},{"uid":"13322081-30"},{"uid":"13322081-32"},{"uid":"13322081-51","dynamic":true}],"importedBy":[{"uid":"13322081-38"}]},"13322081-36":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"13322081-37"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-4"},{"uid":"13322081-44"},{"uid":"13322081-50"},{"uid":"13322081-8"},{"uid":"13322081-6"}],"importedBy":[{"uid":"13322081-38"}]},"13322081-38":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"13322081-39"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-45"},{"uid":"13322081-44"},{"uid":"13322081-47"},{"uid":"13322081-8"},{"uid":"13322081-4"},{"uid":"13322081-10"},{"uid":"13322081-6"},{"uid":"13322081-16"},{"uid":"13322081-12"},{"uid":"13322081-18"},{"uid":"13322081-34"},{"uid":"13322081-36"}],"importedBy":[{"uid":"13322081-42"}]},"13322081-40":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"13322081-41"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-12"},{"uid":"13322081-4"}],"importedBy":[{"uid":"13322081-42"}]},"13322081-42":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"13322081-43"},"imported":[{"uid":"13322081-38"},{"uid":"13322081-4"},{"uid":"13322081-16"},{"uid":"13322081-6"},{"uid":"13322081-8"},{"uid":"13322081-40"},{"uid":"13322081-10"},{"uid":"13322081-44"},{"uid":"13322081-12"},{"uid":"13322081-14"},{"uid":"13322081-45"}],"importedBy":[],"isEntry":true},"13322081-44":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-4"},{"uid":"13322081-36"},{"uid":"13322081-28"},{"uid":"13322081-30"}],"isExternal":true},"13322081-45":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-6"},{"uid":"13322081-18"},{"uid":"13322081-34"},{"uid":"13322081-28"},{"uid":"13322081-32"},{"uid":"13322081-20"},{"uid":"13322081-22"},{"uid":"13322081-24"},{"uid":"13322081-26"}],"isExternal":true},"13322081-46":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-38"},{"uid":"13322081-34"},{"uid":"13322081-36"},{"uid":"13322081-30"},{"uid":"13322081-32"},{"uid":"13322081-2"}],"isExternal":true},"13322081-47":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-38"},{"uid":"13322081-34"}],"isExternal":true},"13322081-48":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"13322081-0"},{"uid":"13322081-2"}],"importedBy":[{"uid":"13322081-4"},{"uid":"13322081-16"},{"uid":"13322081-6"},{"uid":"13322081-8"},{"uid":"13322081-40"},{"uid":"13322081-10"}]},"13322081-49":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-34"},{"uid":"13322081-28"},{"uid":"13322081-20"},{"uid":"13322081-22"},{"uid":"13322081-24"},{"uid":"13322081-26"}],"isExternal":true},"13322081-50":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-34"},{"uid":"13322081-36"}],"isExternal":true},"13322081-51":{"id":"three/addons/inspector/Inspector.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-34"}],"isExternal":true},"13322081-52":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-30"}],"isExternal":true},"13322081-53":{"id":"three/examples/jsm/math/SimplexNoise.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-24"}],"isExternal":true}},"env":{"rollup":"4.63.6"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
|
|
4932
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"D:/a/1/s/packages/reactjs","children":[{"name":"node_modules/zustand/esm","children":[{"uid":"0d3d19ef-1","name":"vanilla.mjs"},{"uid":"0d3d19ef-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"0d3d19ef-5","name":"characterStore.ts"},{"uid":"0d3d19ef-7","name":"cameraStore.ts"},{"uid":"0d3d19ef-9","name":"headStore.ts"},{"uid":"0d3d19ef-11","name":"animationStore.ts"},{"uid":"0d3d19ef-13","name":"speechStore.ts"},{"uid":"0d3d19ef-23","name":"emotionStore.ts"}]},{"name":"components","children":[{"uid":"0d3d19ef-15","name":"SpeechManager.tsx"},{"uid":"0d3d19ef-17","name":"HorizontalLine.tsx"},{"uid":"0d3d19ef-19","name":"Scene.tsx"},{"name":"Controllers","children":[{"uid":"0d3d19ef-21","name":"CharacterController.ts"},{"uid":"0d3d19ef-25","name":"EmotionController.ts"}]},{"uid":"0d3d19ef-27","name":"Character.tsx"}]},{"uid":"0d3d19ef-29","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"0d3d19ef-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"0d3d19ef-0"},"0d3d19ef-3":{"renderedLength":557,"gzipLength":282,"brotliLength":232,"metaUid":"0d3d19ef-2"},"0d3d19ef-5":{"renderedLength":1893,"gzipLength":420,"brotliLength":362,"metaUid":"0d3d19ef-4"},"0d3d19ef-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"0d3d19ef-6"},"0d3d19ef-9":{"renderedLength":1154,"gzipLength":359,"brotliLength":315,"metaUid":"0d3d19ef-8"},"0d3d19ef-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"0d3d19ef-10"},"0d3d19ef-13":{"renderedLength":1789,"gzipLength":494,"brotliLength":439,"metaUid":"0d3d19ef-12"},"0d3d19ef-15":{"renderedLength":3570,"gzipLength":901,"brotliLength":818,"metaUid":"0d3d19ef-14"},"0d3d19ef-17":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"0d3d19ef-16"},"0d3d19ef-19":{"renderedLength":11534,"gzipLength":3285,"brotliLength":2899,"metaUid":"0d3d19ef-18"},"0d3d19ef-21":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"0d3d19ef-20"},"0d3d19ef-23":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"0d3d19ef-22"},"0d3d19ef-25":{"renderedLength":398,"gzipLength":211,"brotliLength":184,"metaUid":"0d3d19ef-24"},"0d3d19ef-27":{"renderedLength":5785,"gzipLength":1605,"brotliLength":1419,"metaUid":"0d3d19ef-26"},"0d3d19ef-29":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"0d3d19ef-28"}},"nodeMetas":{"0d3d19ef-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"0d3d19ef-1"},"imported":[],"importedBy":[{"uid":"0d3d19ef-35"},{"uid":"0d3d19ef-2"}]},"0d3d19ef-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"0d3d19ef-3"},"imported":[{"uid":"0d3d19ef-33"},{"uid":"0d3d19ef-0"}],"importedBy":[{"uid":"0d3d19ef-35"}]},"0d3d19ef-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"0d3d19ef-5"},"imported":[{"uid":"0d3d19ef-35"},{"uid":"0d3d19ef-30"}],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-12"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-22"},{"uid":"0d3d19ef-10"},{"uid":"0d3d19ef-20"},{"uid":"0d3d19ef-14"}]},"0d3d19ef-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"0d3d19ef-7"},"imported":[{"uid":"0d3d19ef-35"},{"uid":"0d3d19ef-32"}],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-18"},{"uid":"0d3d19ef-20"}]},"0d3d19ef-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"0d3d19ef-9"},"imported":[{"uid":"0d3d19ef-35"},{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-6"}],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-18"},{"uid":"0d3d19ef-20"},{"uid":"0d3d19ef-24"}]},"0d3d19ef-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"0d3d19ef-11"},"imported":[{"uid":"0d3d19ef-35"},{"uid":"0d3d19ef-4"}],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-26"}]},"0d3d19ef-12":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"0d3d19ef-13"},"imported":[{"uid":"0d3d19ef-35"},{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-30"}],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-14"}]},"0d3d19ef-14":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"0d3d19ef-15"},"imported":[{"uid":"0d3d19ef-33"},{"uid":"0d3d19ef-12"},{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-39"},{"uid":"0d3d19ef-30"}],"importedBy":[{"uid":"0d3d19ef-18"}]},"0d3d19ef-16":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"0d3d19ef-17"},"imported":[{"uid":"0d3d19ef-33"},{"uid":"0d3d19ef-32"}],"importedBy":[{"uid":"0d3d19ef-18"}]},"0d3d19ef-18":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"0d3d19ef-19"},"imported":[{"uid":"0d3d19ef-33"},{"uid":"0d3d19ef-32"},{"uid":"0d3d19ef-36"},{"uid":"0d3d19ef-30"},{"uid":"0d3d19ef-34"},{"uid":"0d3d19ef-37"},{"uid":"0d3d19ef-6"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-14"},{"uid":"0d3d19ef-16"},{"uid":"0d3d19ef-38","dynamic":true}],"importedBy":[{"uid":"0d3d19ef-26"}]},"0d3d19ef-20":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"0d3d19ef-21"},"imported":[{"uid":"0d3d19ef-33"},{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-30"},{"uid":"0d3d19ef-37"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-6"}],"importedBy":[{"uid":"0d3d19ef-26"}]},"0d3d19ef-22":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"0d3d19ef-23"},"imported":[{"uid":"0d3d19ef-35"},{"uid":"0d3d19ef-31"},{"uid":"0d3d19ef-4"}],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-24"}]},"0d3d19ef-24":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/EmotionController.ts","moduleParts":{"index.js":"0d3d19ef-25"},"imported":[{"uid":"0d3d19ef-33"},{"uid":"0d3d19ef-22"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-30"}],"importedBy":[{"uid":"0d3d19ef-26"}]},"0d3d19ef-26":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"0d3d19ef-27"},"imported":[{"uid":"0d3d19ef-33"},{"uid":"0d3d19ef-32"},{"uid":"0d3d19ef-30"},{"uid":"0d3d19ef-34"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-10"},{"uid":"0d3d19ef-6"},{"uid":"0d3d19ef-12"},{"uid":"0d3d19ef-18"},{"uid":"0d3d19ef-20"},{"uid":"0d3d19ef-24"}],"importedBy":[{"uid":"0d3d19ef-28"}]},"0d3d19ef-28":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"0d3d19ef-29"},"imported":[{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-12"},{"uid":"0d3d19ef-6"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-22"},{"uid":"0d3d19ef-10"},{"uid":"0d3d19ef-30"},{"uid":"0d3d19ef-31"},{"uid":"0d3d19ef-32"}],"importedBy":[],"isEntry":true},"0d3d19ef-30":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-12"},{"uid":"0d3d19ef-31"},{"uid":"0d3d19ef-18"},{"uid":"0d3d19ef-20"},{"uid":"0d3d19ef-24"},{"uid":"0d3d19ef-14"}],"isExternal":true},"0d3d19ef-31":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{},"imported":[{"uid":"0d3d19ef-30"}],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-22"}]},"0d3d19ef-32":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-28"},{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-6"},{"uid":"0d3d19ef-18"},{"uid":"0d3d19ef-16"}],"isExternal":true},"0d3d19ef-33":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-18"},{"uid":"0d3d19ef-20"},{"uid":"0d3d19ef-24"},{"uid":"0d3d19ef-14"},{"uid":"0d3d19ef-16"},{"uid":"0d3d19ef-2"}],"isExternal":true},"0d3d19ef-34":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-26"},{"uid":"0d3d19ef-18"}],"isExternal":true},"0d3d19ef-35":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"0d3d19ef-0"},{"uid":"0d3d19ef-2"}],"importedBy":[{"uid":"0d3d19ef-4"},{"uid":"0d3d19ef-12"},{"uid":"0d3d19ef-6"},{"uid":"0d3d19ef-8"},{"uid":"0d3d19ef-22"},{"uid":"0d3d19ef-10"}]},"0d3d19ef-36":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-18"}],"isExternal":true},"0d3d19ef-37":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-18"},{"uid":"0d3d19ef-20"}],"isExternal":true},"0d3d19ef-38":{"id":"three/addons/inspector/Inspector.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-18"}],"isExternal":true},"0d3d19ef-39":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"0d3d19ef-14"}],"isExternal":true}},"env":{"rollup":"4.65.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
|
|
4933
4933
|
|
|
4934
4934
|
const run = () => {
|
|
4935
4935
|
const width = window.innerWidth;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davi-ai/react-bodyengine-three",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"description": "Reactjs layer to use animations in a threejs environment",
|
|
5
5
|
"author": "DAVI",
|
|
6
6
|
"licence": "MIT",
|
|
@@ -22,20 +22,27 @@
|
|
|
22
22
|
"build": "vite build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@davi-ai/bodyengine-three": "^1.0.
|
|
25
|
+
"@davi-ai/bodyengine-three": "^1.0.26",
|
|
26
26
|
"@davi-ai/web-speech-cognitive-services-davi": "^3.0.1",
|
|
27
27
|
"@react-three/drei": "^10.0.0",
|
|
28
28
|
"@react-three/fiber": "^9.0.0",
|
|
29
|
-
"@types/three": "^0.186.0",
|
|
30
|
-
"three": "^0.186.0",
|
|
31
29
|
"visualizer": "^3.1.0",
|
|
32
30
|
"zustand": "^5.0.3"
|
|
33
31
|
},
|
|
34
32
|
"peerDependencies": {
|
|
33
|
+
"@types/three": "^0.186.0",
|
|
34
|
+
"three": "^0.186.0",
|
|
35
35
|
"react": "^19.1.0",
|
|
36
36
|
"react-dom": "^19.1.0"
|
|
37
37
|
},
|
|
38
|
+
"peerDependenciesMeta": {
|
|
39
|
+
"@types/three": {
|
|
40
|
+
"optional": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
38
43
|
"devDependencies": {
|
|
44
|
+
"@types/three": "^0.186.0",
|
|
45
|
+
"three": "^0.186.0",
|
|
39
46
|
"@babel/preset-env": "^7.23.3",
|
|
40
47
|
"@babel/preset-react": "^7.23.3",
|
|
41
48
|
"@babel/preset-typescript": "^7.23.3",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three/webgpu";
|
|
2
|
-
/**
|
|
3
|
-
* A render pipeline's output graph plus the nodes a debug panel may want to
|
|
4
|
-
* tweak or display. Only `outputNode` is required to render.
|
|
5
|
-
*/
|
|
6
|
-
export interface PipelineNodes {
|
|
7
|
-
outputNode: any;
|
|
8
|
-
/** The lit scene colour before any post-processing. */
|
|
9
|
-
scenePassColor: any;
|
|
10
|
-
/** Temporal resolve (TRAA) of the frame. */
|
|
11
|
-
traaPass: any;
|
|
12
|
-
giPass?: any;
|
|
13
|
-
denoisePass?: any;
|
|
14
|
-
ao?: any;
|
|
15
|
-
gi?: any;
|
|
16
|
-
/** Share of the SSGI occlusion kept on hair and eyes (see createHighPipeline). */
|
|
17
|
-
hairAO?: any;
|
|
18
|
-
eyeAO?: any;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Full pipeline, for high-end GPUs (the vanilla example's): SSGI at half
|
|
22
|
-
* resolution with a depth-aware upsample and a cross-bilateral denoise,
|
|
23
|
-
* surface-aware multi-bounce AO composite, TRAA, then CAS sharpening.
|
|
24
|
-
*
|
|
25
|
-
* Measured on an RX 470 (new8.glb, bust framing): ≈ 7.7 ms at 1920×1080, of
|
|
26
|
-
* which SSGI + denoise ≈ 1.6 ms and TRAA + CAS ≈ 1.9 ms.
|
|
27
|
-
*/
|
|
28
|
-
export declare function createHighPipeline(scene: THREE.Scene, camera: THREE.Camera): PipelineNodes;
|
|
29
|
-
/**
|
|
30
|
-
* Reduced pipeline, for every tier below high: colour + velocity only (no
|
|
31
|
-
* normal / albedo targets, which only SSGI reads), resolved by TRAA. TRAA stays
|
|
32
|
-
* on every tier: the hair's alpha hash relies on it to converge.
|
|
33
|
-
*
|
|
34
|
-
* Measured on an RX 470 (new8.glb, bust framing): ≈ 5.3 ms at 1920×1080
|
|
35
|
-
* against ≈ 7.7 ms for the full pipeline.
|
|
36
|
-
*/
|
|
37
|
-
export declare function createTraaPipeline(scene: THREE.Scene, camera: THREE.Camera): PipelineNodes;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CameraPositionData } from './types';
|
|
2
|
-
declare const visemeCodes: Map<number, string>;
|
|
3
|
-
declare const SPPASToIPA: Map<string, string>;
|
|
4
|
-
declare const IPAToViseme: Map<string, number>;
|
|
5
|
-
declare const presets: {
|
|
6
|
-
default: CameraPositionData;
|
|
7
|
-
head: CameraPositionData;
|
|
8
|
-
neck: CameraPositionData;
|
|
9
|
-
shoulders: CameraPositionData;
|
|
10
|
-
chest: CameraPositionData;
|
|
11
|
-
belly: CameraPositionData;
|
|
12
|
-
knees: CameraPositionData;
|
|
13
|
-
feet: CameraPositionData;
|
|
14
|
-
};
|
|
15
|
-
export { visemeCodes, SPPASToIPA, IPAToViseme, presets };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { CameraPositionData, DefaultDistances, DefaultPositions } from '../models/types';
|
|
2
|
-
import * as THREE from "three/webgpu";
|
|
3
|
-
export declare const getCameraPositionVector: (data: CameraPositionData, defaultDistances: DefaultDistances, defaultPositions: DefaultPositions) => THREE.Vector3;
|