@memori.ai/memori-react 7.13.3 → 7.13.4

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/Avatar/AvatarView/AvatarComponent/components/{controllers/MorphTargetController.js → FullbodyAvatar/MorhTargetController.js} +4 -6
  3. package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.js.map +1 -0
  4. package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.d.ts +17 -0
  5. package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js +25 -0
  6. package/dist/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js.map +1 -0
  7. package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +26 -0
  8. package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +166 -0
  9. package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -0
  10. package/dist/components/MemoriWidget/MemoriWidget.js +5 -5
  11. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/esm/components/Avatar/AvatarView/AvatarComponent/components/{controllers/MorphTargetController.js → FullbodyAvatar/MorhTargetController.js} +4 -6
  15. package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.js.map +1 -0
  16. package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.d.ts +17 -0
  17. package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js +22 -0
  18. package/esm/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.js.map +1 -0
  19. package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +26 -0
  20. package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +163 -0
  21. package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -0
  22. package/esm/components/MemoriWidget/MemoriWidget.js +5 -5
  23. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  24. package/esm/index.js +1 -1
  25. package/esm/index.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/components/MemoriWidget/MemoriWidget.tsx +5 -5
  28. package/src/index.tsx +3 -3
  29. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +0 -38
  30. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +0 -181
  31. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +0 -1
  32. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.d.ts +0 -19
  33. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.js +0 -60
  34. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.js.map +0 -1
  35. package/dist/components/Avatar/AvatarView/AvatarComponent/components/controllers/MorphTargetController.js.map +0 -1
  36. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.d.ts +0 -38
  37. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js +0 -177
  38. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AnimationController.js.map +0 -1
  39. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.d.ts +0 -19
  40. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.js +0 -56
  41. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.js.map +0 -1
  42. package/esm/components/Avatar/AvatarView/AvatarComponent/components/controllers/MorphTargetController.js.map +0 -1
  43. /package/dist/components/Avatar/AvatarView/AvatarComponent/components/{controllers/MorphTargetController.d.ts → FullbodyAvatar/MorhTargetController.d.ts} +0 -0
  44. /package/esm/components/Avatar/AvatarView/AvatarComponent/components/{controllers/MorphTargetController.d.ts → FullbodyAvatar/MorhTargetController.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
 
2
2
 
3
+ ## [7.13.4](https://github.com/memori-ai/memori-react/compare/v7.13.3...v7.13.4) (2025-01-15)
4
+
5
+
6
+ ### Maintenance
7
+
8
+ * refactor showOnlyLastMessages and default props, prevents issues ([3e72aff](https://github.com/memori-ai/memori-react/commit/3e72aff6c701f2e4475562254b1e1dff9f524bbd))
9
+
3
10
  ## [7.13.3](https://github.com/memori-ai/memori-react/compare/v7.13.2...v7.13.3) (2025-01-15)
4
11
 
5
12
 
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MorphTargetController = void 0;
4
4
  const three_1 = require("three");
5
- const constants_1 = require("../../constants");
5
+ const constants_1 = require("./constants");
6
6
  class MorphTargetController {
7
7
  constructor(headMesh) {
8
8
  this.currentEmotionValues = {};
@@ -12,7 +12,6 @@ class MorphTargetController {
12
12
  updateMorphTargets(currentTime, emotionMorphTargets, currentViseme, eyeBlink, blinkState) {
13
13
  if (!this.headMesh.morphTargetDictionary ||
14
14
  !this.headMesh.morphTargetInfluences) {
15
- console.error('[MorphTargetController] Missing morphTargetDictionary or morphTargetInfluences');
16
15
  return;
17
16
  }
18
17
  const blinkValue = this.calculateBlinkValue(currentTime, blinkState, eyeBlink);
@@ -24,7 +23,7 @@ class MorphTargetController {
24
23
  if (currentEmotionKeys.has(key)) {
25
24
  const targetEmotionValue = emotionMorphTargets[key];
26
25
  const currentEmotionValue = this.currentEmotionValues[key] || 0;
27
- const newEmotionValue = three_1.MathUtils.lerp(currentEmotionValue, targetEmotionValue * 3, constants_1.EMOTION_SMOOTHING);
26
+ const newEmotionValue = three_1.MathUtils.lerp(currentEmotionValue, targetEmotionValue * 2.5, constants_1.EMOTION_SMOOTHING);
28
27
  this.currentEmotionValues[key] = newEmotionValue;
29
28
  targetValue += newEmotionValue;
30
29
  }
@@ -36,8 +35,7 @@ class MorphTargetController {
36
35
  }
37
36
  targetValue = three_1.MathUtils.clamp(targetValue, 0, 1);
38
37
  if (this.headMesh.morphTargetInfluences) {
39
- const finalValue = three_1.MathUtils.lerp(this.headMesh.morphTargetInfluences[index] || 0, targetValue, constants_1.VISEME_SMOOTHING);
40
- this.headMesh.morphTargetInfluences[index] = finalValue;
38
+ this.headMesh.morphTargetInfluences[index] = three_1.MathUtils.lerp(this.headMesh.morphTargetInfluences[index] || 0, targetValue, constants_1.VISEME_SMOOTHING);
41
39
  }
42
40
  });
43
41
  this.previousEmotionKeys = currentEmotionKeys;
@@ -72,4 +70,4 @@ class MorphTargetController {
72
70
  }
73
71
  }
74
72
  exports.MorphTargetController = MorphTargetController;
75
- //# sourceMappingURL=MorphTargetController.js.map
73
+ //# sourceMappingURL=MorhTargetController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MorhTargetController.js","sourceRoot":"","sources":["../../../../../../../src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/MorhTargetController.ts"],"names":[],"mappings":";;;AACA,iCAAkC;AAClC,2CAAgF;AAEhF,MAAa,qBAAqB;IAKhC,YAAY,QAAqB;QAHzB,yBAAoB,GAA2B,EAAE,CAAC;QAClD,wBAAmB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAGnD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,kBAAkB,CAChB,WAAmB,EACnB,mBAA2C,EAC3C,aAAsD,EACtD,QAAiB,EACjB,UAKC;QAED,IACE,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB;YACpC,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EACpC;YACA,OAAO;SACR;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CACzC,WAAW,EACX,UAAU,EACV,QAAQ,CACT,CAAC;Q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,EACX,4BAAgB,CACjB,CAAC;aACH;QACH,CAAC,CACF,CAAC;QAEF,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC;IAChD,CAAC;IAEO,mBAAmB,CACzB,WAAmB,EACnB,UAKC,EACD,QAAiB;QAEjB,IAAI,CAAC,QAAQ;YAAE,OAAO,CAAC,CAAC;QAExB,IAAI,UAAU,GAAG,CAAC,CAAC;QAEnB,IAAI,WAAW,IAAI,UAAU,CAAC,aAAa,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE;YACrE,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC;YAC7B,UAAU,CAAC,cAAc,GAAG,WAAW,CAAC;YACxC,UAAU,CAAC,aAAa,GAAG,WAAW,CAAC;YACvC,UAAU,CAAC,aAAa;gBACtB,WAAW;oBACX,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAY,CAAC,WAAW,GAAG,wBAAY,CAAC,WAAW,CAAC;oBACrE,wBAAY,CAAC,WAAW,CAAC;SAC5B;QAED,IAAI,UAAU,CAAC,UAAU,EAAE;YACzB,MAAM,aAAa,GACjB,CAAC,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,GAAG,wBAAY,CAAC,aAAa,CAAC;YACzE,IAAI,aAAa,IAAI,GAAG,EAAE;gBACxB,UAAU,GAAG,aAAa,GAAG,CAAC,CAAC;aAChC;iBAAM,IAAI,aAAa,IAAI,CAAC,EAAE;gBAC7B,UAAU,GAAG,CAAC,GAAG,aAAa,GAAG,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC9B,UAAU,GAAG,CAAC,CAAC;aAChB;SACF;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAtHD,sDAsHC"}
@@ -0,0 +1,17 @@
1
+ import { Vector3, Euler } from 'three';
2
+ import { AnimationConfig } from './types';
3
+ export declare const AVATAR_POSITION: Vector3;
4
+ export declare const AVATAR_ROTATION: Euler;
5
+ export declare const AVATAR_POSITION_ZOOMED: Vector3;
6
+ export declare const ANIMATION_URLS: {
7
+ MALE: string;
8
+ FEMALE: string;
9
+ };
10
+ export declare const BLINK_CONFIG: {
11
+ minInterval: number;
12
+ maxInterval: number;
13
+ blinkDuration: number;
14
+ };
15
+ export declare const DEFAULT_CONFIG: AnimationConfig;
16
+ export declare const EMOTION_SMOOTHING = 0.3;
17
+ export declare const VISEME_SMOOTHING = 0.5;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VISEME_SMOOTHING = exports.EMOTION_SMOOTHING = exports.DEFAULT_CONFIG = exports.BLINK_CONFIG = exports.ANIMATION_URLS = exports.AVATAR_POSITION_ZOOMED = exports.AVATAR_ROTATION = exports.AVATAR_POSITION = void 0;
4
+ const three_1 = require("three");
5
+ exports.AVATAR_POSITION = new three_1.Vector3(0, -1, 0);
6
+ exports.AVATAR_ROTATION = new three_1.Euler(0.175, 0, 0);
7
+ exports.AVATAR_POSITION_ZOOMED = new three_1.Vector3(0, -1.45, 0);
8
+ exports.ANIMATION_URLS = {
9
+ MALE: 'https://assets.memori.ai/api/v2/asset/2c5e88a4-cf62-408b-9ef0-518b099dfcb2.glb',
10
+ FEMALE: 'https://assets.memori.ai/api/v2/asset/2adc934b-24b2-45bd-94ad-ffec58d3cb32.glb',
11
+ };
12
+ exports.BLINK_CONFIG = {
13
+ minInterval: 1000,
14
+ maxInterval: 5000,
15
+ blinkDuration: 150,
16
+ };
17
+ exports.DEFAULT_CONFIG = {
18
+ fadeInDuration: 0.8,
19
+ fadeOutDuration: 0.8,
20
+ idleCount: 5,
21
+ timeScale: 1.0,
22
+ };
23
+ exports.EMOTION_SMOOTHING = 0.3;
24
+ exports.VISEME_SMOOTHING = 0.5;
25
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/constants.ts"],"names":[],"mappings":";;;AAAA,iCAAuC;AAG1B,QAAA,eAAe,GAAG,IAAI,eAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxC,QAAA,eAAe,GAAG,IAAI,aAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACzC,QAAA,sBAAsB,GAAG,IAAI,eAAO,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAElD,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,gFAAgF;IACtF,MAAM,EACJ,gFAAgF;CACnF,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,GAAG;CACnB,CAAC;AAEW,QAAA,cAAc,GAAoB;IAC7C,cAAc,EAAE,GAAG;IACnB,eAAe,EAAE,GAAG;IACpB,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;CACf,CAAC;AAEW,QAAA,iBAAiB,GAAG,GAAG,CAAC;AACxB,QAAA,gBAAgB,GAAG,GAAG,CAAC"}
@@ -0,0 +1,26 @@
1
+ interface FullbodyAvatarProps {
2
+ url: string;
3
+ sex: 'MALE' | 'FEMALE';
4
+ onLoaded?: () => void;
5
+ currentBaseAction: {
6
+ action: string;
7
+ weight: number;
8
+ };
9
+ timeScale: number;
10
+ isZoomed?: boolean;
11
+ eyeBlink?: boolean;
12
+ stopProcessing: () => void;
13
+ resetVisemeQueue: () => void;
14
+ updateCurrentViseme: (currentTime: number) => {
15
+ name: string;
16
+ weight: number;
17
+ } | null;
18
+ smoothMorphTarget?: boolean;
19
+ morphTargetSmoothing?: number;
20
+ morphTargetInfluences: Record<string, number>;
21
+ setMorphTargetDictionary: (morphTargetDictionary: Record<string, number>) => void;
22
+ setMorphTargetInfluences: (morphTargetInfluences: Record<string, number>) => void;
23
+ emotionMorphTargets: Record<string, number>;
24
+ }
25
+ export default function FullbodyAvatar({ url, sex, currentBaseAction, timeScale, isZoomed, eyeBlink, updateCurrentViseme, setMorphTargetDictionary, setMorphTargetInfluences, emotionMorphTargets, }: FullbodyAvatarProps): JSX.Element;
26
+ export {};
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const three_1 = require("three");
6
+ const drei_1 = require("@react-three/drei");
7
+ const fiber_1 = require("@react-three/fiber");
8
+ const AVATAR_POSITION = new three_1.Vector3(0, -1, 0);
9
+ const AVATAR_ROTATION = new three_1.Euler(0.175, 0, 0);
10
+ const AVATAR_POSITION_ZOOMED = new three_1.Vector3(0, -1.45, 0);
11
+ const ANIMATION_URLS = {
12
+ MALE: 'https://assets.memori.ai/api/v2/asset/2c5e88a4-cf62-408b-9ef0-518b099dfcb2.glb',
13
+ FEMALE: 'https://assets.memori.ai/api/v2/asset/8d1a5853-f05a-4a34-9f99-6eff64986081.glb',
14
+ };
15
+ const BLINK_CONFIG = {
16
+ minInterval: 1000,
17
+ maxInterval: 5000,
18
+ blinkDuration: 150,
19
+ };
20
+ const EMOTION_SMOOTHING = 0.3;
21
+ const VISME_SMOOTHING = 0.5;
22
+ function FullbodyAvatar({ url, sex, currentBaseAction, timeScale, isZoomed, eyeBlink, updateCurrentViseme, setMorphTargetDictionary, setMorphTargetInfluences, emotionMorphTargets, }) {
23
+ const { scene } = (0, drei_1.useGLTF)(url);
24
+ const { animations } = (0, drei_1.useGLTF)(ANIMATION_URLS[sex]);
25
+ const { actions } = (0, drei_1.useAnimations)(animations, scene);
26
+ const mixerRef = (0, react_1.useRef)();
27
+ const headMeshRef = (0, react_1.useRef)();
28
+ const currentActionRef = (0, react_1.useRef)(null);
29
+ const isTransitioningToIdleRef = (0, react_1.useRef)(false);
30
+ const lastBlinkTimeRef = (0, react_1.useRef)(0);
31
+ const nextBlinkTimeRef = (0, react_1.useRef)(0);
32
+ const isBlinkingRef = (0, react_1.useRef)(false);
33
+ const blinkStartTimeRef = (0, react_1.useRef)(0);
34
+ const currentEmotionRef = (0, react_1.useRef)({});
35
+ const previousEmotionKeysRef = (0, react_1.useRef)(new Set());
36
+ const headMesh = (0, react_1.useMemo)(() => {
37
+ let foundMesh;
38
+ scene.traverse((object) => {
39
+ if (object instanceof three_1.SkinnedMesh &&
40
+ (object.name === 'GBNL__Head' || object.name === 'Wolf3D_Avatar')) {
41
+ foundMesh = object;
42
+ }
43
+ });
44
+ return foundMesh;
45
+ }, [scene]);
46
+ (0, react_1.useEffect)(() => {
47
+ if (headMesh) {
48
+ headMeshRef.current = headMesh;
49
+ if (headMesh.morphTargetDictionary && headMesh.morphTargetInfluences) {
50
+ setMorphTargetDictionary(headMesh.morphTargetDictionary);
51
+ const initialInfluences = Object.keys(headMesh.morphTargetDictionary).reduce((acc, key) => ({ ...acc, [key]: 0 }), {});
52
+ setMorphTargetInfluences(initialInfluences);
53
+ }
54
+ }
55
+ mixerRef.current = new three_1.AnimationMixer(scene);
56
+ }, [headMesh, scene, setMorphTargetDictionary, setMorphTargetInfluences]);
57
+ const handleAnimationChange = (0, react_1.useCallback)(() => {
58
+ if (!actions || !currentBaseAction.action)
59
+ return;
60
+ const newAction = actions[currentBaseAction.action];
61
+ if (!newAction) {
62
+ console.warn(`Animation "${currentBaseAction.action}" not found in actions.`);
63
+ return;
64
+ }
65
+ const fadeOutDuration = 0.8;
66
+ const fadeInDuration = 0.8;
67
+ if (currentActionRef.current) {
68
+ currentActionRef.current.fadeOut(fadeOutDuration);
69
+ }
70
+ newAction.reset().fadeIn(fadeInDuration).play();
71
+ currentActionRef.current = newAction;
72
+ newAction.timeScale = timeScale;
73
+ if (currentBaseAction.action.startsWith('Gioia') ||
74
+ currentBaseAction.action.startsWith('Rabbia') ||
75
+ currentBaseAction.action.startsWith('Sorpresa') ||
76
+ currentBaseAction.action.startsWith('Timore') ||
77
+ currentBaseAction.action.startsWith('Tristezza')) {
78
+ newAction.setLoop(three_1.LoopOnce, 1);
79
+ newAction.clampWhenFinished = true;
80
+ isTransitioningToIdleRef.current = true;
81
+ }
82
+ }, [actions, currentBaseAction, timeScale]);
83
+ (0, react_1.useEffect)(() => {
84
+ handleAnimationChange();
85
+ }, [handleAnimationChange]);
86
+ const updateFrame = (0, react_1.useCallback)((currentTime) => {
87
+ var _a;
88
+ if (!headMeshRef.current ||
89
+ !headMeshRef.current.morphTargetDictionary ||
90
+ !headMeshRef.current.morphTargetInfluences)
91
+ return;
92
+ let blinkValue = 0;
93
+ if (eyeBlink) {
94
+ if (currentTime >= nextBlinkTimeRef.current && !isBlinkingRef.current) {
95
+ isBlinkingRef.current = true;
96
+ blinkStartTimeRef.current = currentTime;
97
+ lastBlinkTimeRef.current = currentTime;
98
+ nextBlinkTimeRef.current =
99
+ currentTime +
100
+ Math.random() *
101
+ (BLINK_CONFIG.maxInterval - BLINK_CONFIG.minInterval) +
102
+ BLINK_CONFIG.minInterval;
103
+ }
104
+ if (isBlinkingRef.current) {
105
+ const blinkProgress = (currentTime - blinkStartTimeRef.current) /
106
+ BLINK_CONFIG.blinkDuration;
107
+ if (blinkProgress <= 0.5) {
108
+ blinkValue = blinkProgress * 2;
109
+ }
110
+ else if (blinkProgress <= 1) {
111
+ blinkValue = 2 - blinkProgress * 2;
112
+ }
113
+ else {
114
+ isBlinkingRef.current = false;
115
+ blinkValue = 0;
116
+ }
117
+ }
118
+ }
119
+ const currentViseme = updateCurrentViseme(currentTime / 1000);
120
+ const currentEmotionKeys = new Set(Object.keys(emotionMorphTargets));
121
+ Object.entries(headMeshRef.current.morphTargetDictionary).forEach(([key, index]) => {
122
+ if (typeof index === 'number') {
123
+ let targetValue = 0;
124
+ if (currentEmotionKeys.has(key)) {
125
+ const targetEmotionValue = emotionMorphTargets[key];
126
+ const currentEmotionValue = currentEmotionRef.current[key] || 0;
127
+ const newEmotionValue = three_1.MathUtils.lerp(currentEmotionValue, targetEmotionValue * 2.5, EMOTION_SMOOTHING);
128
+ currentEmotionRef.current[key] = newEmotionValue;
129
+ targetValue += newEmotionValue;
130
+ }
131
+ if (currentViseme && key === currentViseme.name) {
132
+ targetValue += currentViseme.weight;
133
+ }
134
+ if (key === 'eyesClosed' && eyeBlink) {
135
+ targetValue += blinkValue;
136
+ }
137
+ targetValue = three_1.MathUtils.clamp(targetValue, 0, 1);
138
+ if (headMeshRef.current &&
139
+ headMeshRef.current.morphTargetInfluences) {
140
+ headMeshRef.current.morphTargetInfluences[index] = three_1.MathUtils.lerp(headMeshRef.current.morphTargetInfluences[index], targetValue, VISME_SMOOTHING);
141
+ }
142
+ }
143
+ });
144
+ previousEmotionKeysRef.current = currentEmotionKeys;
145
+ if (isTransitioningToIdleRef.current && currentActionRef.current) {
146
+ if (currentActionRef.current.time >=
147
+ currentActionRef.current.getClip().duration) {
148
+ const idleNumber = Math.floor(Math.random() * 5) + 1;
149
+ const idleAction = actions[`Idle${idleNumber === 3 ? 4 : idleNumber}`];
150
+ if (idleAction) {
151
+ currentActionRef.current.fadeOut(0.5);
152
+ idleAction.reset().fadeIn(0.5).play();
153
+ currentActionRef.current = idleAction;
154
+ isTransitioningToIdleRef.current = false;
155
+ }
156
+ }
157
+ }
158
+ (_a = mixerRef.current) === null || _a === void 0 ? void 0 : _a.update(0.01);
159
+ }, [actions, emotionMorphTargets, eyeBlink, updateCurrentViseme]);
160
+ (0, fiber_1.useFrame)(state => {
161
+ updateFrame(state.clock.elapsedTime * 1000);
162
+ });
163
+ return ((0, jsx_runtime_1.jsx)("group", { position: isZoomed ? AVATAR_POSITION_ZOOMED : AVATAR_POSITION, rotation: AVATAR_ROTATION, children: (0, jsx_runtime_1.jsx)("primitive", { object: scene }) }));
164
+ }
165
+ exports.default = FullbodyAvatar;
166
+ //# sourceMappingURL=fullbodyAvatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fullbodyAvatar.js","sourceRoot":"","sources":["../../../../../../src/components/Avatar/AvatarView/AvatarCom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C,CAC9D,CAAC;IAEF,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAE;QACf,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,kCACE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,EAC7D,QAAQ,EAAE,eAAe,YAEzB,sCAAW,MAAM,EAAE,KAAK,GAAI,GACtB,CACT,CAAC;AACJ,CAAC;AA3ND,iCA2NC"}
@@ -154,7 +154,7 @@ let memoriPassword;
154
154
  let speakerMuted = false;
155
155
  let memoriSpeaking = false;
156
156
  let userToken;
157
- const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, multilingual, integration, layout = 'DEFAULT', customLayout, showShare, preview = false, embed = false, showCopyButton = true, showTranslationOriginal = false, showInputs = true, showDates = false, showContextPerLine = false, showSettings = true, showTypingText = false, showClear = false, showLogin = false, showUpload, showOnlyLastMessages, height = '100vh', secret, baseUrl = 'https://aisuru.com', apiURL = 'https://backend.memori.ai', engineURL = 'https://engine.memori.ai', initialContextVars, initialQuestion, ogImage, sessionID: initialSessionID, tenant, personification, authToken, AZURE_COGNITIVE_SERVICES_TTS_KEY, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, }) => {
157
+ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, multilingual, integration, layout, customLayout, showShare, preview = false, embed = false, showCopyButton = true, showTranslationOriginal = false, showInputs = true, showDates = false, showContextPerLine = false, showSettings = true, showTypingText = false, showClear = false, showLogin = false, showUpload, showOnlyLastMessages, height = '100vh', secret, baseUrl = 'https://aisuru.com', apiURL = 'https://backend.memori.ai', engineURL = 'https://engine.memori.ai', initialContextVars, initialQuestion, ogImage, sessionID: initialSessionID, tenant, personification, authToken, AZURE_COGNITIVE_SERVICES_TTS_KEY, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, }) => {
158
158
  var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
159
159
  const { t, i18n } = (0, react_i18next_1.useTranslation)();
160
160
  const [isClient, setIsClient] = (0, react_1.useState)(false);
@@ -1966,9 +1966,9 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
1966
1966
  }
1967
1967
  }, [tenant === null || tenant === void 0 ? void 0 : tenant.billingDelegation, deepThoughtEnabled]);
1968
1968
  const showFullHistory = showOnlyLastMessages === undefined
1969
- ? layout !== 'TOTEM' &&
1970
- layout !== 'WEBSITE_ASSISTANT' &&
1971
- layout !== 'HIDDEN_CHAT'
1969
+ ? selectedLayout !== 'TOTEM' &&
1970
+ selectedLayout !== 'WEBSITE_ASSISTANT' &&
1971
+ selectedLayout !== 'HIDDEN_CHAT'
1972
1972
  : !showOnlyLastMessages;
1973
1973
  const headerProps = {
1974
1974
  memori,
@@ -2138,7 +2138,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
2138
2138
  : selectedLayout === 'ZOOMED_FULL_BODY'
2139
2139
  ? ZoomedFullBody_1.default
2140
2140
  : FullPage_1.default;
2141
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('memori', 'memori-widget', `memori-layout-${layout.toLowerCase()}`, `memori-controls-${controlsPosition.toLowerCase()}`, `memori--avatar-${(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.avatar) || 'default'}`, {
2141
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('memori', 'memori-widget', `memori-layout-${selectedLayout.toLowerCase()}`, `memori-controls-${controlsPosition.toLowerCase()}`, `memori--avatar-${(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.avatar) || 'default'}`, {
2142
2142
  'memori--auto-start': autoStart,
2143
2143
  'memori--preview': preview,
2144
2144
  'memori--embed': embed,