@memori.ai/memori-react 7.7.1 → 7.8.0-rc.0
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/CHANGELOG.md +22 -0
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.d.ts +6 -3
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js +10 -6
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +13 -17
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +110 -111
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +3 -4
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js +77 -52
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/index.d.ts +7 -3
- package/dist/components/Avatar/AvatarView/index.js +2 -2
- package/dist/components/Avatar/AvatarView/index.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +34 -22
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/layouts/ZoomedFullBody.js +1 -8
- package/dist/components/layouts/ZoomedFullBody.js.map +1 -1
- package/dist/components/layouts/zoomed-full-body.css +5 -1
- package/dist/context/visemeContext.d.ts +9 -15
- package/dist/context/visemeContext.js +73 -190
- package/dist/context/visemeContext.js.map +1 -1
- package/esm/components/Avatar/Avatar.js +2 -2
- package/esm/components/Avatar/Avatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.d.ts +6 -3
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js +10 -6
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +13 -17
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +112 -113
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +3 -4
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js +81 -55
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/index.d.ts +7 -3
- package/esm/components/Avatar/AvatarView/index.js +2 -2
- package/esm/components/Avatar/AvatarView/index.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +34 -22
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/layouts/ZoomedFullBody.js +1 -8
- package/esm/components/layouts/ZoomedFullBody.js.map +1 -1
- package/esm/components/layouts/zoomed-full-body.css +5 -1
- package/esm/context/visemeContext.d.ts +9 -15
- package/esm/context/visemeContext.js +74 -191
- package/esm/context/visemeContext.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.tsx +5 -5
- package/src/components/Avatar/AvatarView/AvatarComponent/avatarComponent.tsx +33 -19
- package/src/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.tsx +181 -158
- package/src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx +116 -71
- package/src/components/Avatar/AvatarView/AvatarView.stories.tsx +12 -24
- package/src/components/Avatar/AvatarView/index.tsx +9 -8
- package/src/components/MemoriWidget/MemoriWidget.tsx +45 -38
- package/src/components/layouts/ZoomedFullBody.tsx +6 -11
- package/src/components/layouts/zoomed-full-body.css +5 -1
- package/src/context/visemeContext.tsx +130 -283
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.d.ts +0 -14
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js +0 -66
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/controls.d.ts +0 -23
- package/dist/components/Avatar/AvatarView/components/controls.js +0 -55
- package/dist/components/Avatar/AvatarView/components/controls.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +0 -19
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js +0 -61
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +0 -9
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js +0 -39
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/loader.d.ts +0 -5
- package/dist/components/Avatar/AvatarView/components/loader.js +0 -12
- package/dist/components/Avatar/AvatarView/components/loader.js.map +0 -1
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js +0 -68
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/dist/components/AvatarView/components/avatar.d.ts +0 -9
- package/dist/components/AvatarView/components/avatar.js +0 -35
- package/dist/components/AvatarView/components/avatar.js.map +0 -1
- package/dist/components/AvatarView/components/fullbodyAvatar.d.ts +0 -10
- package/dist/components/AvatarView/components/fullbodyAvatar.js +0 -62
- package/dist/components/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/dist/components/AvatarView/components/loader.d.ts +0 -5
- package/dist/components/AvatarView/components/loader.js +0 -12
- package/dist/components/AvatarView/components/loader.js.map +0 -1
- package/dist/components/AvatarView/index.d.ts +0 -17
- package/dist/components/AvatarView/index.js +0 -35
- package/dist/components/AvatarView/index.js.map +0 -1
- package/dist/components/AvatarView/utils/useEyeBlink.d.ts +0 -2
- package/dist/components/AvatarView/utils/useEyeBlink.js +0 -40
- package/dist/components/AvatarView/utils/useEyeBlink.js.map +0 -1
- package/dist/components/AvatarView/utils/useHeadMovement.d.ts +0 -2
- package/dist/components/AvatarView/utils/useHeadMovement.js +0 -53
- package/dist/components/AvatarView/utils/useHeadMovement.js.map +0 -1
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.d.ts +0 -2
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.js +0 -34
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.js.map +0 -1
- package/dist/components/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/dist/components/AvatarView/utils/useMouthSpeaking.js +0 -60
- package/dist/components/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/dist/components/AvatarView/utils/useSmile.d.ts +0 -2
- package/dist/components/AvatarView/utils/useSmile.js +0 -30
- package/dist/components/AvatarView/utils/useSmile.js.map +0 -1
- package/dist/components/AvatarView/utils/utils.d.ts +0 -13
- package/dist/components/AvatarView/utils/utils.js +0 -42
- package/dist/components/AvatarView/utils/utils.js.map +0 -1
- package/dist/components/ImageUpload/ImageUpload.css +0 -168
- package/dist/components/ImageUpload/ImageUpload.d.ts +0 -28
- package/dist/components/ImageUpload/ImageUpload.js +0 -163
- package/dist/components/ImageUpload/ImageUpload.js.map +0 -1
- package/dist/components/layouts/Default.d.ts +0 -17
- package/dist/components/layouts/Default.js +0 -8
- package/dist/components/layouts/Default.js.map +0 -1
- package/dist/components/ui/Message.d.ts +0 -17
- package/dist/components/ui/Message.js +0 -13
- package/dist/components/ui/Message.js.map +0 -1
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.d.ts +0 -14
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js +0 -63
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/controls.d.ts +0 -23
- package/esm/components/Avatar/AvatarView/components/controls.js +0 -52
- package/esm/components/Avatar/AvatarView/components/controls.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +0 -19
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js +0 -57
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +0 -9
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js +0 -35
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/loader.d.ts +0 -5
- package/esm/components/Avatar/AvatarView/components/loader.js +0 -9
- package/esm/components/Avatar/AvatarView/components/loader.js.map +0 -1
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js +0 -65
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/esm/components/AvatarView/components/avatar.d.ts +0 -9
- package/esm/components/AvatarView/components/avatar.js +0 -31
- package/esm/components/AvatarView/components/avatar.js.map +0 -1
- package/esm/components/AvatarView/components/fullbodyAvatar.d.ts +0 -10
- package/esm/components/AvatarView/components/fullbodyAvatar.js +0 -58
- package/esm/components/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/esm/components/AvatarView/components/loader.d.ts +0 -5
- package/esm/components/AvatarView/components/loader.js +0 -9
- package/esm/components/AvatarView/components/loader.js.map +0 -1
- package/esm/components/AvatarView/index.d.ts +0 -17
- package/esm/components/AvatarView/index.js +0 -31
- package/esm/components/AvatarView/index.js.map +0 -1
- package/esm/components/AvatarView/utils/useEyeBlink.d.ts +0 -2
- package/esm/components/AvatarView/utils/useEyeBlink.js +0 -37
- package/esm/components/AvatarView/utils/useEyeBlink.js.map +0 -1
- package/esm/components/AvatarView/utils/useHeadMovement.d.ts +0 -2
- package/esm/components/AvatarView/utils/useHeadMovement.js +0 -50
- package/esm/components/AvatarView/utils/useHeadMovement.js.map +0 -1
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.d.ts +0 -2
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.js +0 -31
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.js.map +0 -1
- package/esm/components/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/esm/components/AvatarView/utils/useMouthSpeaking.js +0 -57
- package/esm/components/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/esm/components/AvatarView/utils/useSmile.d.ts +0 -2
- package/esm/components/AvatarView/utils/useSmile.js +0 -27
- package/esm/components/AvatarView/utils/useSmile.js.map +0 -1
- package/esm/components/AvatarView/utils/utils.d.ts +0 -13
- package/esm/components/AvatarView/utils/utils.js +0 -33
- package/esm/components/AvatarView/utils/utils.js.map +0 -1
- package/esm/components/ImageUpload/ImageUpload.css +0 -168
- package/esm/components/ImageUpload/ImageUpload.d.ts +0 -28
- package/esm/components/ImageUpload/ImageUpload.js +0 -160
- package/esm/components/ImageUpload/ImageUpload.js.map +0 -1
- package/esm/components/layouts/Default.d.ts +0 -17
- package/esm/components/layouts/Default.js +0 -5
- package/esm/components/layouts/Default.js.map +0 -1
- package/esm/components/ui/Message.d.ts +0 -17
- package/esm/components/ui/Message.js +0 -10
- package/esm/components/ui/Message.js.map +0 -1
|
@@ -1,77 +1,102 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
4
|
const react_1 = require("react");
|
|
6
5
|
const three_1 = require("three");
|
|
7
6
|
const drei_1 = require("@react-three/drei");
|
|
8
7
|
const utils_1 = require("../../../../../helpers/utils");
|
|
9
8
|
const fiber_1 = require("@react-three/fiber");
|
|
10
|
-
const
|
|
11
|
-
const useHeadMovement_1 = tslib_1.__importDefault(require("../../utils/useHeadMovement"));
|
|
12
|
-
const utils_2 = require("../../utils/utils");
|
|
9
|
+
const three_2 = require("three");
|
|
13
10
|
const AVATAR_POSITION = new three_1.Vector3(0, -0.6, 0);
|
|
14
|
-
const
|
|
15
|
-
|
|
11
|
+
const BLINK_CONFIG = {
|
|
12
|
+
minInterval: 1000,
|
|
13
|
+
maxInterval: 5000,
|
|
14
|
+
blinkDuration: 150,
|
|
16
15
|
};
|
|
17
|
-
function HalfBodyAvatar({ url, setMorphTargetInfluences, setMorphTargetDictionary,
|
|
16
|
+
function HalfBodyAvatar({ url, setMorphTargetInfluences, setMorphTargetDictionary, eyeBlink, onLoaded, morphTargetSmoothing = 0.5, updateCurrentViseme, }) {
|
|
18
17
|
const { scene } = (0, drei_1.useGLTF)(url);
|
|
19
18
|
const { nodes, materials } = (0, fiber_1.useGraph)(scene);
|
|
19
|
+
const mixer = (0, react_1.useRef)(new three_2.AnimationMixer(scene));
|
|
20
20
|
const avatarMeshRef = (0, react_1.useRef)(null);
|
|
21
|
-
(0,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
maxInterval: 4000,
|
|
27
|
-
blinkDuration: 120
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
(0, useHeadMovement_1.default)(headMovement, nodes);
|
|
21
|
+
const lastBlinkTime = (0, react_1.useRef)(0);
|
|
22
|
+
const nextBlinkTime = (0, react_1.useRef)(0);
|
|
23
|
+
const isBlinking = (0, react_1.useRef)(false);
|
|
24
|
+
const blinkStartTime = (0, react_1.useRef)(0);
|
|
25
|
+
const headMeshRef = (0, react_1.useRef)();
|
|
31
26
|
(0, react_1.useEffect)(() => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
setMorphTargetInfluences(initialInfluences);
|
|
27
|
+
(0, utils_1.correctMaterials)(materials);
|
|
28
|
+
scene.traverse((object) => {
|
|
29
|
+
if (object instanceof three_1.SkinnedMesh) {
|
|
30
|
+
if (object.name === 'GBNL__Head' || object.name === 'Wolf3D_Avatar') {
|
|
31
|
+
headMeshRef.current = object;
|
|
32
|
+
if (object.morphTargetDictionary && object.morphTargetInfluences) {
|
|
33
|
+
setMorphTargetDictionary(object.morphTargetDictionary);
|
|
34
|
+
const initialInfluences = Object.keys(object.morphTargetDictionary).reduce((acc, key) => ({ ...acc, [key]: 0 }), {});
|
|
35
|
+
setMorphTargetInfluences(initialInfluences);
|
|
36
|
+
}
|
|
43
37
|
}
|
|
44
38
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
setupAvatar();
|
|
39
|
+
});
|
|
40
|
+
onLoaded === null || onLoaded === void 0 ? void 0 : onLoaded();
|
|
48
41
|
return () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
disposeObjects();
|
|
42
|
+
Object.values(materials).forEach(material => material.dispose());
|
|
43
|
+
Object.values(nodes)
|
|
44
|
+
.filter(utils_1.isSkinnedMesh)
|
|
45
|
+
.forEach(mesh => mesh.geometry.dispose());
|
|
55
46
|
};
|
|
56
|
-
}, [materials, nodes, url, onLoaded,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
47
|
+
}, [materials, nodes, url, onLoaded, scene]);
|
|
48
|
+
(0, fiber_1.useFrame)(state => {
|
|
49
|
+
if (headMeshRef.current &&
|
|
50
|
+
headMeshRef.current.morphTargetDictionary &&
|
|
51
|
+
headMeshRef.current.morphTargetInfluences) {
|
|
52
|
+
const currentTime = state.clock.getElapsedTime() * 1000;
|
|
53
|
+
let blinkValue = 0;
|
|
54
|
+
if (eyeBlink) {
|
|
55
|
+
if (currentTime >= nextBlinkTime.current && !isBlinking.current) {
|
|
56
|
+
isBlinking.current = true;
|
|
57
|
+
blinkStartTime.current = currentTime;
|
|
58
|
+
lastBlinkTime.current = currentTime;
|
|
59
|
+
nextBlinkTime.current =
|
|
60
|
+
currentTime +
|
|
61
|
+
Math.random() *
|
|
62
|
+
(BLINK_CONFIG.maxInterval - BLINK_CONFIG.minInterval) +
|
|
63
|
+
BLINK_CONFIG.minInterval;
|
|
64
|
+
}
|
|
65
|
+
if (isBlinking.current) {
|
|
66
|
+
const blinkProgress = (currentTime - blinkStartTime.current) / BLINK_CONFIG.blinkDuration;
|
|
67
|
+
if (blinkProgress <= 0.5) {
|
|
68
|
+
blinkValue = blinkProgress * 2;
|
|
69
|
+
}
|
|
70
|
+
else if (blinkProgress <= 1) {
|
|
71
|
+
blinkValue = 2 - blinkProgress * 2;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
isBlinking.current = false;
|
|
75
|
+
blinkValue = 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const currentViseme = updateCurrentViseme(currentTime / 1000);
|
|
80
|
+
Object.entries(headMeshRef.current.morphTargetDictionary).forEach(([key, index]) => {
|
|
81
|
+
if (typeof index === 'number') {
|
|
82
|
+
let targetValue = 0;
|
|
83
|
+
if (currentViseme && key === currentViseme.name) {
|
|
84
|
+
targetValue += currentViseme.weight * 1.3;
|
|
85
|
+
}
|
|
86
|
+
if (key === 'eyesClosed' && eyeBlink) {
|
|
87
|
+
targetValue += blinkValue;
|
|
88
|
+
}
|
|
89
|
+
targetValue = three_2.MathUtils.clamp(targetValue, 0, 1);
|
|
90
|
+
if (headMeshRef.current &&
|
|
91
|
+
headMeshRef.current.morphTargetInfluences) {
|
|
92
|
+
headMeshRef.current.morphTargetInfluences[index] = three_2.MathUtils.lerp(headMeshRef.current.morphTargetInfluences[index], targetValue, morphTargetSmoothing);
|
|
93
|
+
}
|
|
70
94
|
}
|
|
71
95
|
});
|
|
96
|
+
mixer.current.update(0.01);
|
|
72
97
|
}
|
|
73
98
|
});
|
|
74
|
-
return ((0, jsx_runtime_1.
|
|
99
|
+
return ((0, jsx_runtime_1.jsx)("group", { position: AVATAR_POSITION, children: (0, jsx_runtime_1.jsx)("primitive", { object: scene }) }));
|
|
75
100
|
}
|
|
76
101
|
exports.default = HalfBodyAvatar;
|
|
77
102
|
//# sourceMappingURL=halfbodyAvatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halfbodyAvatar.js","sourceRoot":"","sources":["../../../../../../src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"halfbodyAvatar.js","sourceRoot":"","sources":["../../../../../../src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx"],"names":[],"mappings":";;;AAAA,iCAA0D;AAC1D,iCAAuD;AACvD,4CAA4C;AAC5C,wDAA+E;AAC/E,8CAAiE;AAIjE,iCAAkD;AAelD,MAAM,eAAe,GAAG,IAAI,eAAO,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAEhD,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,GAAG;CACnB,CAAC;AAEF,SAAwB,cAAc,CAAC,EACrC,GAAG,EACH,wBAAwB,EACxB,wBAAwB,EACxB,QAAQ,EACR,QAAQ,EACR,oBAAoB,GAAG,GAAG,EAC1B,mBAAmB,GACC;IACpB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,cAAO,EAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,IAAA,cAAM,EAAC,IAAI,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,MAAM,aAAa,GAAG,IAAA,cAAM,EAAqB,IAAI,CAAC,CAAC;IAGvD,MAA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,iCAwIC"}
|
|
@@ -17,7 +17,11 @@ export interface Props {
|
|
|
17
17
|
isZoomed?: boolean;
|
|
18
18
|
chatEmission?: any;
|
|
19
19
|
setMeshRef?: any;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
stopProcessing: () => void;
|
|
21
|
+
resetVisemeQueue: () => void;
|
|
22
|
+
updateCurrentViseme: (currentTime: number) => {
|
|
23
|
+
name: string;
|
|
24
|
+
weight: number;
|
|
25
|
+
} | null;
|
|
22
26
|
}
|
|
23
|
-
export default function ContainerAvatarView({ url, sex, style, rotateAvatar, eyeBlink, headMovement, speaking, fallback, fallbackImg, halfBody, loading, animation, showControls, isZoomed, chatEmission,
|
|
27
|
+
export default function ContainerAvatarView({ url, sex, style, rotateAvatar, eyeBlink, headMovement, speaking, fallback, fallbackImg, halfBody, loading, animation, showControls, isZoomed, chatEmission, stopProcessing, resetVisemeQueue, updateCurrentViseme, }: Props): JSX.Element;
|
|
@@ -34,8 +34,8 @@ const getCameraSettings = (halfBody, isZoomed) => halfBody
|
|
|
34
34
|
}
|
|
35
35
|
: { fov: 40, position: [0, 0.0000175, 3] };
|
|
36
36
|
const getLightingComponent = () => (0, utils_1.isAndroid)() || (0, utils_1.isiOS)() ? ((0, jsx_runtime_1.jsx)(drei_1.SpotLight, { distance: 100, position: [-0.3, 0.2, 1.25], angle: Math.PI / 2, attenuation: 5, anglePower: 5 })) : ((0, jsx_runtime_1.jsx)(drei_1.Environment, { files: "https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/venice_sunset_1k.hdr" }));
|
|
37
|
-
function ContainerAvatarView({ url, sex, style, rotateAvatar, eyeBlink, headMovement, speaking, fallback, fallbackImg, halfBody = true, loading, animation, showControls = false, isZoomed, chatEmission,
|
|
38
|
-
return ((0, jsx_runtime_1.jsx)(fiber_1.Canvas, { style: style || (halfBody ? defaultStyles.halfBody : defaultStyles.fullBody), camera: getCameraSettings(halfBody, isZoomed), children: (0, jsx_runtime_1.jsxs)(react_1.Suspense, { fallback: fallback || (0, jsx_runtime_1.jsx)(loader_1.default, { fallbackImg: fallbackImg }), children: [getLightingComponent(), rotateAvatar && (0, jsx_runtime_1.jsx)(drei_1.OrbitControls, { enablePan: false, enableZoom: false }), (0, jsx_runtime_1.jsx)(avatarComponent_1.AvatarView, { url: url, sex: sex, showControls: showControls, loading: loading || false, animation: animation, isZoomed: isZoomed || false, eyeBlink: eyeBlink || false, headMovement: headMovement || false, speaking: speaking || false, halfBody: halfBody || false, chatEmission: chatEmission,
|
|
37
|
+
function ContainerAvatarView({ url, sex, style, rotateAvatar, eyeBlink, headMovement, speaking, fallback, fallbackImg, halfBody = true, loading, animation, showControls = false, isZoomed, chatEmission, stopProcessing, resetVisemeQueue, updateCurrentViseme, }) {
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(fiber_1.Canvas, { style: style || (halfBody ? defaultStyles.halfBody : defaultStyles.fullBody), camera: getCameraSettings(halfBody, isZoomed), children: (0, jsx_runtime_1.jsxs)(react_1.Suspense, { fallback: fallback || (0, jsx_runtime_1.jsx)(loader_1.default, { fallbackImg: fallbackImg }), children: [getLightingComponent(), rotateAvatar && (0, jsx_runtime_1.jsx)(drei_1.OrbitControls, { enablePan: false, enableZoom: false }), (0, jsx_runtime_1.jsx)(avatarComponent_1.AvatarView, { url: url, sex: sex, showControls: showControls, loading: loading || false, animation: animation, isZoomed: isZoomed || false, eyeBlink: eyeBlink || false, headMovement: headMovement || false, speaking: speaking || false, halfBody: halfBody || false, chatEmission: chatEmission, updateCurrentViseme: updateCurrentViseme, stopProcessing: stopProcessing, resetVisemeQueue: resetVisemeQueue })] }) }));
|
|
39
39
|
}
|
|
40
40
|
exports.default = ContainerAvatarView;
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Avatar/AvatarView/index.tsx"],"names":[],"mappings":";;;;AACA,iCA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AmB,EAAE,mBAAmB,EACxC,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,GAClC,IACO,GACJ,CACV,CAAC;AACJ,CAAC;AAjDD,sCAiDC"}
|
|
@@ -219,7 +219,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
219
219
|
const [isPlayingAudio, setIsPlayingAudio] = (0, react_1.useState)(false);
|
|
220
220
|
const [controlsPosition, setControlsPosition] = (0, react_1.useState)('center');
|
|
221
221
|
const [hideEmissions, setHideEmissions] = (0, react_1.useState)(false);
|
|
222
|
-
const {
|
|
222
|
+
const { updateCurrentViseme, startProcessing, resetAndStartProcessing, isProcessing, addViseme, stopProcessing, resetVisemeQueue, } = (0, visemeContext_1.useViseme)();
|
|
223
223
|
(0, react_1.useEffect)(() => {
|
|
224
224
|
setIsPlayingAudio(!!speechSynthesizer);
|
|
225
225
|
memoriSpeaking = !!speechSynthesizer;
|
|
@@ -1306,51 +1306,58 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1306
1306
|
emitEndSpeakEvent();
|
|
1307
1307
|
onEndSpeakStartListen();
|
|
1308
1308
|
};
|
|
1309
|
-
|
|
1309
|
+
resetVisemeQueue();
|
|
1310
1310
|
speechSynthesizer.visemeReceived = function (_, e) {
|
|
1311
|
-
|
|
1312
|
-
visemeId: e.visemeId,
|
|
1313
|
-
audioOffset: e.audioOffset,
|
|
1314
|
-
});
|
|
1311
|
+
addViseme(e.visemeId, e.audioOffset);
|
|
1315
1312
|
};
|
|
1316
1313
|
const textToSpeak = (0, utils_1.escapeHTML)((0, utils_1.stripMarkdown)((0, utils_1.stripEmojis)((0, utils_1.stripHTML)((0, utils_1.stripOutputTags)(text)))));
|
|
1317
|
-
speechSynthesizer.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${getCultureCodeByLanguage(userLang)}"><voice name="${getTTSVoice(userLang)}"><
|
|
1314
|
+
speechSynthesizer.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${getCultureCodeByLanguage(userLang)}"><voice name="${getTTSVoice(userLang)}"><s>${replaceTextWithPhonemes(textToSpeak, userLang.toLowerCase())}</s></voice></speak>`, result => {
|
|
1318
1315
|
if (result) {
|
|
1319
1316
|
setIsPlayingAudio(true);
|
|
1320
1317
|
memoriSpeaking = true;
|
|
1321
|
-
processVisemeQueue();
|
|
1322
1318
|
try {
|
|
1323
1319
|
audioContext.decodeAudioData(result.audioData, function (buffer) {
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1320
|
+
console.log('decoded');
|
|
1321
|
+
const currentSource = audioContext.createBufferSource();
|
|
1322
|
+
currentSource.buffer = buffer;
|
|
1323
|
+
currentSource.connect(audioContext.destination);
|
|
1324
|
+
startProcessing();
|
|
1325
|
+
currentSource.start();
|
|
1326
|
+
currentSource.onended = () => {
|
|
1327
|
+
console.log('ended');
|
|
1328
|
+
setIsPlayingAudio(false);
|
|
1329
|
+
memoriSpeaking = false;
|
|
1330
|
+
stopProcessing();
|
|
1331
|
+
resetVisemeQueue();
|
|
1332
|
+
emitEndSpeakEvent();
|
|
1333
|
+
};
|
|
1329
1334
|
});
|
|
1330
1335
|
audioContext.onstatechange = () => {
|
|
1331
1336
|
if (audioContext.state === 'suspended' ||
|
|
1332
1337
|
audioContext.state === 'closed') {
|
|
1338
|
+
console.log('suspended');
|
|
1333
1339
|
source.disconnect();
|
|
1334
1340
|
setIsPlayingAudio(false);
|
|
1335
|
-
|
|
1341
|
+
stopProcessing();
|
|
1342
|
+
resetVisemeQueue();
|
|
1336
1343
|
memoriSpeaking = false;
|
|
1344
|
+
emitEndSpeakEvent();
|
|
1337
1345
|
}
|
|
1338
1346
|
else if (audioContext.state === 'interrupted') {
|
|
1347
|
+
console.log('interrupted');
|
|
1348
|
+
stopProcessing();
|
|
1349
|
+
resetVisemeQueue();
|
|
1339
1350
|
audioContext.resume();
|
|
1340
1351
|
}
|
|
1341
1352
|
};
|
|
1342
|
-
audioContext.resume();
|
|
1343
|
-
if (speechSynthesizer) {
|
|
1344
|
-
speechSynthesizer.close();
|
|
1345
|
-
speechSynthesizer = null;
|
|
1346
|
-
}
|
|
1347
1353
|
}
|
|
1348
1354
|
catch (e) {
|
|
1349
1355
|
console.warn('speak error: ', e);
|
|
1350
1356
|
window.speechSynthesis.speak(new SpeechSynthesisUtterance(text));
|
|
1351
|
-
clearVisemes();
|
|
1352
1357
|
setIsPlayingAudio(false);
|
|
1353
1358
|
memoriSpeaking = false;
|
|
1359
|
+
stopProcessing();
|
|
1360
|
+
resetVisemeQueue();
|
|
1354
1361
|
if (speechSynthesizer) {
|
|
1355
1362
|
speechSynthesizer.close();
|
|
1356
1363
|
speechSynthesizer = null;
|
|
@@ -1360,7 +1367,8 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1360
1367
|
}
|
|
1361
1368
|
else {
|
|
1362
1369
|
audioContext.resume();
|
|
1363
|
-
|
|
1370
|
+
stopProcessing();
|
|
1371
|
+
resetVisemeQueue();
|
|
1364
1372
|
setIsPlayingAudio(false);
|
|
1365
1373
|
memoriSpeaking = false;
|
|
1366
1374
|
emitEndSpeakEvent();
|
|
@@ -1370,6 +1378,8 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1370
1378
|
window.speechSynthesis.speak(new SpeechSynthesisUtterance(text));
|
|
1371
1379
|
setIsPlayingAudio(false);
|
|
1372
1380
|
memoriSpeaking = false;
|
|
1381
|
+
stopProcessing();
|
|
1382
|
+
resetVisemeQueue();
|
|
1373
1383
|
emitEndSpeakEvent();
|
|
1374
1384
|
});
|
|
1375
1385
|
setMemoriTyping(false);
|
|
@@ -2087,7 +2097,9 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
2087
2097
|
}
|
|
2088
2098
|
}, [tenant === null || tenant === void 0 ? void 0 : tenant.billingDelegation, deepThoughtEnabled]);
|
|
2089
2099
|
const showFullHistory = showOnlyLastMessages === undefined
|
|
2090
|
-
? layout !== 'TOTEM' &&
|
|
2100
|
+
? layout !== 'TOTEM' &&
|
|
2101
|
+
layout !== 'WEBSITE_ASSISTANT' &&
|
|
2102
|
+
layout !== 'HIDDEN_CHAT'
|
|
2091
2103
|
: !showOnlyLastMessages;
|
|
2092
2104
|
const headerProps = {
|
|
2093
2105
|
memori,
|