@davi-ai/react-bodyengine-three 1.0.29 → 1.0.30

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/index.js CHANGED
@@ -1,38 +1,37 @@
1
- import * as xe from "react";
2
- import y, { useState as E, useMemo as Se, useEffect as M, useRef as te, useCallback as Qe, Suspense as $e } from "react";
3
- import * as w from "three/webgpu";
4
- import { Vector3 as Ye, TempNode as Je, NodeUpdateType as Xe, Vector2 as ye, RenderTarget as be, DepthTexture as ve, HalfFloatType as Te, NodeMaterial as et, NoBlending as tt, Matrix4 as J, RendererUtils as Me, QuadMesh as rt, FloatType as st } from "three/webgpu";
5
- import { Object3D as ts } from "three/webgpu";
6
- import { CharacterState as q, CreationTool as X, AvaturnLoader as nt, AvatarSDKLoader as at, CC3Loader as ot, Character as ue } from "@davi-ai/bodyengine-three";
7
- import { CharacterState as ss, CreationTool as ns, bmlTags as as, emotionList as os } from "@davi-ai/bodyengine-three";
8
- import { usePerformanceMonitor as it, useDetectGPU as ct, PerformanceMonitor as lt, PerspectiveCamera as ht, CameraControls as dt, Environment as ut } from "@react-three/drei";
9
- import { convertToTexture as mt, uniform as Q, passTexture as pt, texture as ke, velocity as Ue, struct as gt, Fn as ee, float as Z, vec2 as me, If as Ae, vec4 as oe, max as ae, ivec2 as ft, luminance as Pe, add as je, uv as yt, mix as St, logarithmicDepthToViewZ as wt, viewZToPerspectiveDepth as Ce, getViewPosition as xt, viewZToOrthographicDepth as bt, pass as vt, mrt as Tt, diffuseColor as Mt, output as kt, packNormalToRGB as At, normalView as Pt, sample as Ct, unpackRGBToNormal as _t } from "three/tsl";
10
- import { ssgi as Nt } from "three/addons/tsl/display/SSGINode.js";
11
- import { useThree as Le, Canvas as Rt, useFrame as Oe } from "@react-three/fiber";
12
- import { createSpeechSynthesisPonyfill as Vt, SpeechSynthesisUtterance as It } from "@davi-ai/web-speech-cognitive-services-davi";
13
- const _e = (e) => {
1
+ import S, { useState as F, useMemo as Se, useEffect as k, useRef as te, useCallback as Ke, Suspense as Ze } from "react";
2
+ import * as b from "three/webgpu";
3
+ import { Vector3 as Qe, TempNode as $e, NodeUpdateType as Ye, Vector2 as ye, RenderTarget as we, DepthTexture as ve, HalfFloatType as xe, NodeMaterial as Je, NoBlending as Xe, Matrix4 as J, RendererUtils as Te, QuadMesh as et, FloatType as tt } from "three/webgpu";
4
+ import { Object3D as Jr } from "three/webgpu";
5
+ import { CharacterState as q, CreationTool as X, AvaturnLoader as rt, AvatarSDKLoader as st, CC3Loader as nt, Character as ue } from "@davi-ai/bodyengine-three";
6
+ import { CharacterState as es, CreationTool as ts, bmlTags as rs, emotionList as ss } from "@davi-ai/bodyengine-three";
7
+ import { useDetectGPU as at, PerformanceMonitor as ot, PerspectiveCamera as it, CameraControls as ct, Environment as lt } from "@react-three/drei";
8
+ import { convertToTexture as ht, uniform as Q, passTexture as dt, texture as ke, velocity as Ee, struct as ut, Fn as ee, float as Z, vec2 as me, If as Me, vec4 as oe, max as ae, ivec2 as mt, luminance as Ae, add as Ue, uv as pt, mix as gt, logarithmicDepthToViewZ as ft, viewZToPerspectiveDepth as Ce, getViewPosition as yt, viewZToOrthographicDepth as St, pass as bt, mrt as wt, diffuseColor as vt, output as xt, packNormalToRGB as Tt, normalView as kt, sample as Mt, unpackRGBToNormal as At } from "three/tsl";
9
+ import { ssgi as Ct } from "three/addons/tsl/display/SSGINode.js";
10
+ import { Canvas as Pt, useThree as _t, useFrame as je } from "@react-three/fiber";
11
+ import { createSpeechSynthesisPonyfill as Nt, SpeechSynthesisUtterance as Vt } from "@davi-ai/web-speech-cognitive-services-davi";
12
+ const Pe = (e) => {
14
13
  let t;
15
- const r = /* @__PURE__ */ new Set(), s = (u, P) => {
14
+ const r = /* @__PURE__ */ new Set(), s = (u, C) => {
16
15
  const _ = typeof u == "function" ? u(t) : u;
17
16
  if (!Object.is(_, t)) {
18
17
  const N = t;
19
- t = P ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), r.forEach((l) => l(t, N));
18
+ t = C ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), r.forEach((l) => l(t, N));
20
19
  }
21
- }, o = () => t, v = { setState: s, getState: o, getInitialState: () => T, subscribe: (u) => (r.add(u), () => r.delete(u)) }, T = t = e(s, o, v);
22
- return v;
23
- }, Bt = (e) => e ? _e(e) : _e, zt = (e) => e;
24
- function Dt(e, t = zt) {
25
- const r = y.useSyncExternalStore(
20
+ }, o = () => t, x = { setState: s, getState: o, getInitialState: () => T, subscribe: (u) => (r.add(u), () => r.delete(u)) }, T = t = e(s, o, x);
21
+ return x;
22
+ }, It = (e) => e ? Pe(e) : Pe, Rt = (e) => e;
23
+ function Bt(e, t = Rt) {
24
+ const r = S.useSyncExternalStore(
26
25
  e.subscribe,
27
- y.useCallback(() => t(e.getState()), [e, t]),
28
- y.useCallback(() => t(e.getInitialState()), [e, t])
26
+ S.useCallback(() => t(e.getState()), [e, t]),
27
+ S.useCallback(() => t(e.getInitialState()), [e, t])
29
28
  );
30
- return y.useDebugValue(r), r;
29
+ return S.useDebugValue(r), r;
31
30
  }
32
- const Et = (e) => {
33
- const t = Bt(e), r = (s) => Dt(t, s);
31
+ const zt = (e) => {
32
+ const t = It(e), r = (s) => Bt(t, s);
34
33
  return Object.assign(r, t), r;
35
- }, se = (e) => Et, b = se()(() => ({
34
+ }, se = (e) => zt, v = se()(() => ({
36
35
  character: null,
37
36
  managers: [],
38
37
  globalManager: null,
@@ -49,40 +48,40 @@ const Et = (e) => {
49
48
  characterHeight: 0,
50
49
  characterDepth: 0,
51
50
  characterState: q.idle
52
- })), Ft = (e) => {
53
- b.setState({ character: e }), b.setState({ managers: {
51
+ })), Dt = (e) => {
52
+ v.setState({ character: e }), v.setState({ managers: {
54
53
  lipSyncManager: (e == null ? void 0 : e.lipSyncManager) || null,
55
54
  blendshapeManager: (e == null ? void 0 : e.blendshapeManager) || null,
56
55
  eyeBlinkManager: (e == null ? void 0 : e.eyeBlinkManager) || null,
57
56
  animationManager: (e == null ? void 0 : e.animationManager) || null
58
- } }), b.setState({ globalManager: (e == null ? void 0 : e.globalManager) || null }), b.setState({ lipSyncManager: (e == null ? void 0 : e.lipSyncManager) || null }), b.setState({ blendshapeManager: (e == null ? void 0 : e.blendshapeManager) || null }), b.setState({ eyeBlinkManager: (e == null ? void 0 : e.eyeBlinkManager) || null }), b.setState({ animationManager: (e == null ? void 0 : e.animationManager) || null }), b.setState({ FACSManager: (e == null ? void 0 : e.FACSManager) || null }), b.setState({ headPoseManager: (e == null ? void 0 : e.headPoseManager) || null }), b.setState({ gazeManager: (e == null ? void 0 : e.gazeManager) || null }), b.setState({ bmlManager: (e == null ? void 0 : e.bmlManager) || null });
59
- }, Ne = (e) => {
60
- b.setState({ animationsLoaded: e });
61
- }, Ut = (e) => {
62
- b.setState({ characterWidth: e.x }), b.setState({ characterHeight: e.y }), b.setState({ characterDepth: e.z });
63
- }, Nr = () => b.getState().characterHeight, Re = (e) => {
64
- b.setState({ characterState: e });
57
+ } }), v.setState({ globalManager: (e == null ? void 0 : e.globalManager) || null }), v.setState({ lipSyncManager: (e == null ? void 0 : e.lipSyncManager) || null }), v.setState({ blendshapeManager: (e == null ? void 0 : e.blendshapeManager) || null }), v.setState({ eyeBlinkManager: (e == null ? void 0 : e.eyeBlinkManager) || null }), v.setState({ animationManager: (e == null ? void 0 : e.animationManager) || null }), v.setState({ FACSManager: (e == null ? void 0 : e.FACSManager) || null }), v.setState({ headPoseManager: (e == null ? void 0 : e.headPoseManager) || null }), v.setState({ gazeManager: (e == null ? void 0 : e.gazeManager) || null }), v.setState({ bmlManager: (e == null ? void 0 : e.bmlManager) || null });
58
+ }, _e = (e) => {
59
+ v.setState({ animationsLoaded: e });
60
+ }, Ft = (e) => {
61
+ v.setState({ characterWidth: e.x }), v.setState({ characterHeight: e.y }), v.setState({ characterDepth: e.z });
62
+ }, Cr = () => v.getState().characterHeight, Ne = (e) => {
63
+ v.setState({ characterState: e });
65
64
  }, D = se()(() => ({
66
65
  cameraRef: null,
67
- cameraPosition: new Ye(0, 0, 5),
66
+ cameraPosition: new Qe(0, 0, 5),
68
67
  bodyCenter: null,
69
68
  defaultPositions: null,
70
69
  defaultDistances: null,
71
70
  lookAt: null,
72
71
  movable: !0
73
- })), jt = (e) => {
72
+ })), Et = (e) => {
74
73
  D.setState({ cameraRef: e });
75
74
  }, Ve = (e) => {
76
75
  D.setState({ cameraPosition: e });
77
- }, Rr = () => D.getState().cameraPosition, Lt = (e) => {
76
+ }, Pr = () => D.getState().cameraPosition, Ut = (e) => {
78
77
  D.setState({ bodyCenter: e });
79
- }, Ot = (e) => {
78
+ }, jt = (e) => {
80
79
  D.setState({ defaultPositions: e });
81
- }, Ht = (e) => {
80
+ }, Lt = (e) => {
82
81
  D.setState({ defaultDistances: e });
83
82
  }, Ie = (e) => {
84
83
  D.setState({ lookAt: e });
85
- }, Vr = () => D.getState().lookAt, Gt = (e) => {
84
+ }, _r = () => D.getState().lookAt, Ot = (e) => {
86
85
  D.setState({ movable: e });
87
86
  }, U = se()(() => ({
88
87
  currentAUs: null,
@@ -91,48 +90,48 @@ const Et = (e) => {
91
90
  lookAtCamera: !1,
92
91
  targets: [],
93
92
  showFirstTarget: !1
94
- })), Wt = (e) => {
93
+ })), Ht = (e) => {
95
94
  U.setState({ targets: e });
96
- }, Ir = (e) => {
95
+ }, Nr = (e) => {
97
96
  U.setState({ currentAUs: e });
98
- }, Br = (e) => {
97
+ }, Vr = (e) => {
99
98
  U.setState({ currentGaze: e });
100
- }, zr = (e) => {
99
+ }, Ir = (e) => {
101
100
  U.setState({ currentHeadPose: e });
102
101
  }, pe = (e) => {
103
- U.setState({ lookAtCamera: e }), e ? qt() : Kt();
104
- }, qt = (e) => {
105
- const t = b.getState().globalManager;
102
+ U.setState({ lookAtCamera: e }), e ? Gt() : Wt();
103
+ }, Gt = (e) => {
104
+ const t = v.getState().globalManager;
106
105
  if (e)
107
106
  t == null || t.lookAtAndKeep(e);
108
107
  else {
109
108
  const r = D.getState().cameraRef;
110
109
  t == null || t.lookAtAndKeep(r);
111
110
  }
112
- }, Kt = () => {
111
+ }, Wt = () => {
113
112
  var e;
114
- (e = b.getState().globalManager) == null || e.releaseLookAt();
115
- }, Dr = (e) => {
113
+ (e = v.getState().globalManager) == null || e.releaseLookAt();
114
+ }, Rr = (e) => {
116
115
  U.setState({ showFirstTarget: e });
117
116
  }, re = se()(() => ({
118
117
  animationsNames: [],
119
118
  animations: /* @__PURE__ */ new Map(),
120
119
  currentAnimation: null,
121
120
  autoPlay: !0
122
- })), Zt = (e) => {
121
+ })), qt = (e) => {
123
122
  re.setState({ animationsNames: e });
124
- }, Qt = (e) => {
123
+ }, Kt = (e) => {
125
124
  re.setState({ animations: e });
126
- }, Er = () => re.getState().animations, Fr = (e) => {
125
+ }, Br = () => re.getState().animations, zr = (e) => {
127
126
  re.setState({ autoPlay: e });
128
- }, Ur = (e) => {
127
+ }, Dr = (e) => {
129
128
  if (re.setState({ autoPlay: !1 }), re.getState().animationsNames.includes(e)) {
130
- const r = b.getState().animationManager;
129
+ const r = v.getState().animationManager;
131
130
  r == null || r.playAnimation(e);
132
131
  }
133
132
  };
134
- var R = /* @__PURE__ */ ((e) => (e.eye = "eye", e.mouth = "mouth", e.neck = "neck", e.clavicle = "clavicle", e.torso = "torso", e.belly = "belly", e.lowerbelly = "lowerbelly", e.hips = "hips", e.higherthigh = "higherthigh", e.thigh = "thigh", e.knee = "knee", e.leg = "leg", e.feet = "feet", e))(R || {}), W = /* @__PURE__ */ ((e) => (e[e.face = 1] = "face", e[e.eighthleft = 2] = "eighthleft", e[e.thirdleft = 3] = "thirdleft", e[e.quarterleft = 4] = "quarterleft", e[e.halfleft = 5] = "halfleft", e[e.eighthright = 6] = "eighthright", e[e.thirdright = 7] = "thirdright", e[e.quarterright = 8] = "quarterright", e[e.halfright = 9] = "halfright", e))(W || {}), V = /* @__PURE__ */ ((e) => (e[e.veryclose = 1] = "veryclose", e[e.closer = 2] = "closer", e[e.close = 3] = "close", e[e.midclose = 4] = "midclose", e[e.medium = 5] = "medium", e[e.midfar = 6] = "midfar", e[e.far = 7] = "far", e[e.farther = 8] = "farther", e[e.veryfar = 9] = "veryfar", e))(V || {}), le = /* @__PURE__ */ ((e) => (e.cc3 = "CC_Base_Body", e.avatarsdk = "AvatarBody", e.avaturn = "Body_Mesh", e))(le || {}), we = /* @__PURE__ */ ((e) => (e.Jay = "joy", e.Anger = "anger", e.Contempt = "contempt", e.Disgust = "disgust", e.Dislike = "dislike", e.Distress = "distress", e.Fear = "fear", e.Frustration = "frustration", e.Guilt = "guilt", e.Hope = "hope", e.Love = "love", e.Pride = "pride", e.Regret = "regret", e.Relief = "relief", e.Sadness = "sadness", e.Shame = "shame", e.Smile = "smile", e.Surprise = "surprise", e.Neutral = "neutral", e))(we || {});
135
- const Be = /* @__PURE__ */ new Map([
133
+ var V = /* @__PURE__ */ ((e) => (e.eye = "eye", e.mouth = "mouth", e.neck = "neck", e.clavicle = "clavicle", e.torso = "torso", e.belly = "belly", e.lowerbelly = "lowerbelly", e.hips = "hips", e.higherthigh = "higherthigh", e.thigh = "thigh", e.knee = "knee", e.leg = "leg", e.feet = "feet", e))(V || {}), W = /* @__PURE__ */ ((e) => (e[e.face = 1] = "face", e[e.eighthleft = 2] = "eighthleft", e[e.thirdleft = 3] = "thirdleft", e[e.quarterleft = 4] = "quarterleft", e[e.halfleft = 5] = "halfleft", e[e.eighthright = 6] = "eighthright", e[e.thirdright = 7] = "thirdright", e[e.quarterright = 8] = "quarterright", e[e.halfright = 9] = "halfright", e))(W || {}), I = /* @__PURE__ */ ((e) => (e[e.veryclose = 1] = "veryclose", e[e.closer = 2] = "closer", e[e.close = 3] = "close", e[e.midclose = 4] = "midclose", e[e.medium = 5] = "medium", e[e.midfar = 6] = "midfar", e[e.far = 7] = "far", e[e.farther = 8] = "farther", e[e.veryfar = 9] = "veryfar", e))(I || {}), le = /* @__PURE__ */ ((e) => (e.cc3 = "CC_Base_Body", e.avatarsdk = "AvatarBody", e.avaturn = "Body_Mesh", e))(le || {}), be = /* @__PURE__ */ ((e) => (e.Jay = "joy", e.Anger = "anger", e.Contempt = "contempt", e.Disgust = "disgust", e.Dislike = "dislike", e.Distress = "distress", e.Fear = "fear", e.Frustration = "frustration", e.Guilt = "guilt", e.Hope = "hope", e.Love = "love", e.Pride = "pride", e.Regret = "regret", e.Relief = "relief", e.Sadness = "sadness", e.Shame = "shame", e.Smile = "smile", e.Surprise = "surprise", e.Neutral = "neutral", e))(be || {});
134
+ const Re = /* @__PURE__ */ new Map([
136
135
  [0, "sil"],
137
136
  [1, "aa"],
138
137
  [2, "aa"],
@@ -155,7 +154,7 @@ const Be = /* @__PURE__ */ new Map([
155
154
  [19, "DD"],
156
155
  [20, "kk"],
157
156
  [21, "PP"]
158
- ]), $t = /* @__PURE__ */ new Map([
157
+ ]), Zt = /* @__PURE__ */ new Map([
159
158
  ["#", "#"],
160
159
  ["p", "p"],
161
160
  ["b", "b"],
@@ -204,7 +203,7 @@ const Be = /* @__PURE__ */ new Map([
204
203
  ["9~", "oẽ"],
205
204
  ["N", "ŋ"],
206
205
  ["J", "ɲ"]
207
- ]), Yt = /* @__PURE__ */ new Map([
206
+ ]), Qt = /* @__PURE__ */ new Map([
208
207
  ["#", 0],
209
208
  ["æ", 1],
210
209
  ["ə", 1],
@@ -245,48 +244,48 @@ const Be = /* @__PURE__ */ new Map([
245
244
  ["p", 21],
246
245
  ["b", 21],
247
246
  ["m", 21]
248
- ]), Jt = {
249
- position: R.mouth,
250
- distance: V.farther,
251
- lookAt: R.lowerbelly
247
+ ]), $t = {
248
+ position: V.mouth,
249
+ distance: I.farther,
250
+ lookAt: V.lowerbelly
251
+ }, Yt = {
252
+ position: V.mouth,
253
+ distance: I.close,
254
+ lookAt: V.mouth
255
+ }, Jt = {
256
+ position: V.mouth,
257
+ distance: I.midclose,
258
+ lookAt: V.mouth
252
259
  }, Xt = {
253
- position: R.mouth,
254
- distance: V.close,
255
- lookAt: R.mouth
260
+ position: V.neck,
261
+ distance: I.close,
262
+ lookAt: V.neck
256
263
  }, er = {
257
- position: R.mouth,
258
- distance: V.midclose,
259
- lookAt: R.mouth
264
+ position: V.eye,
265
+ distance: I.medium,
266
+ lookAt: V.neck
260
267
  }, tr = {
261
- position: R.neck,
262
- distance: V.close,
263
- lookAt: R.neck
268
+ position: V.eye,
269
+ distance: I.medium,
270
+ lookAt: V.clavicle
264
271
  }, rr = {
265
- position: R.eye,
266
- distance: V.medium,
267
- lookAt: R.neck
272
+ position: V.eye,
273
+ distance: I.midfar,
274
+ lookAt: V.belly
268
275
  }, sr = {
269
- position: R.eye,
270
- distance: V.medium,
271
- lookAt: R.clavicle
272
- }, nr = {
273
- position: R.eye,
274
- distance: V.midfar,
275
- lookAt: R.belly
276
- }, ar = {
277
- position: R.eye,
278
- distance: V.far,
279
- lookAt: R.lowerbelly
280
- }, jr = {
281
- default: Jt,
282
- head: Xt,
283
- neck: er,
284
- shoulders: tr,
285
- chest: rr,
286
- belly: sr,
287
- knees: nr,
288
- feet: ar
289
- }, x = se()(() => ({
276
+ position: V.eye,
277
+ distance: I.far,
278
+ lookAt: V.lowerbelly
279
+ }, Fr = {
280
+ default: $t,
281
+ head: Yt,
282
+ neck: Jt,
283
+ shoulders: Xt,
284
+ chest: er,
285
+ belly: tr,
286
+ knees: rr,
287
+ feet: sr
288
+ }, w = se()(() => ({
290
289
  credentials: void 0,
291
290
  currentUtterance: null,
292
291
  boundaries: [],
@@ -299,92 +298,92 @@ const Be = /* @__PURE__ */ new Map([
299
298
  textToSpeak: null,
300
299
  visemeIntensity: 1,
301
300
  useBlendshapeManager: !1
302
- })), or = (e) => {
303
- x.setState({ credentials: e });
304
- }, ir = (e) => {
301
+ })), nr = (e) => {
302
+ w.setState({ credentials: e });
303
+ }, ar = (e) => {
305
304
  if (e) {
306
- const t = x.getState().voice;
305
+ const t = w.getState().voice;
307
306
  t && (e.voice = t);
308
307
  }
309
- x.setState({ currentUtterance: e }), x.setState({ textToSpeak: null });
310
- }, Lr = (e) => {
311
- x.setState({ visemes: e });
312
- }, Or = (e) => {
313
- x.setState({ blendshapes: e });
314
- }, He = (e) => {
315
- x.setState({ visemes: [...x.getState().visemes, e] });
316
- }, Hr = (e) => {
317
- x.setState({ blendshapes: [...x.getState().blendshapes, e] });
318
- }, Gr = (e, t) => {
319
- const r = $t.get(e.name);
308
+ w.setState({ currentUtterance: e }), w.setState({ textToSpeak: null });
309
+ }, Er = (e) => {
310
+ w.setState({ visemes: e });
311
+ }, Ur = (e) => {
312
+ w.setState({ blendshapes: e });
313
+ }, Le = (e) => {
314
+ w.setState({ visemes: [...w.getState().visemes, e] });
315
+ }, jr = (e) => {
316
+ w.setState({ blendshapes: [...w.getState().blendshapes, e] });
317
+ }, Lr = (e, t) => {
318
+ const r = Zt.get(e.name);
320
319
  if (r) {
321
- const s = Yt.get(r);
322
- s !== void 0 && He({ ...e, name: `${s}`, elapsedTime: e.elapsedTime * (t || 1e7) });
320
+ const s = Qt.get(r);
321
+ s !== void 0 && Le({ ...e, name: `${s}`, elapsedTime: e.elapsedTime * (t || 1e7) });
323
322
  }
324
- }, cr = (e) => {
325
- x.setState({ currentVisemeIndex: e });
326
- }, lr = (e) => {
327
- x.setState({ currentBlendshapeIndex: e });
328
- }, Ge = () => {
323
+ }, or = (e) => {
324
+ w.setState({ currentVisemeIndex: e });
325
+ }, ir = (e) => {
326
+ w.setState({ currentBlendshapeIndex: e });
327
+ }, Oe = () => {
329
328
  var e;
330
- x.setState({
329
+ w.setState({
331
330
  visemes: [],
332
331
  currentVisemeIndex: 0
333
- }), (e = b.getState().lipSyncManager) == null || e.stop();
334
- }, We = () => {
332
+ }), (e = v.getState().lipSyncManager) == null || e.stop();
333
+ }, He = () => {
335
334
  var e;
336
- x.setState({
335
+ w.setState({
337
336
  blendshapes: [],
338
337
  currentBlendshapeIndex: 0
339
- }), (e = b.getState().blendshapeManager) == null || e.stop();
340
- }, hr = (e) => {
341
- x.setState({ voice: e });
342
- }, ze = (e) => {
343
- x.setState({ voices: e });
344
- }, Wr = (e) => {
345
- x.setState({ textToSpeak: e });
346
- }, qr = () => x.getState().voices, Kr = (e) => {
347
- x.setState({ visemeIntensity: e });
348
- }, dr = (e) => {
349
- e !== x.getState().useBlendshapeManager && (Ge(), We(), x.setState({ useBlendshapeManager: e }));
350
- }, ur = (e, t, r) => {
351
- let s = r[e.position || R.eye].getComponent(0);
352
- const o = r[e.position || R.mouth].getComponent(1);
338
+ }), (e = v.getState().blendshapeManager) == null || e.stop();
339
+ }, cr = (e) => {
340
+ w.setState({ voice: e });
341
+ }, Be = (e) => {
342
+ w.setState({ voices: e });
343
+ }, Or = (e) => {
344
+ w.setState({ textToSpeak: e });
345
+ }, Hr = () => w.getState().voices, Gr = (e) => {
346
+ w.setState({ visemeIntensity: e });
347
+ }, lr = (e) => {
348
+ e !== w.getState().useBlendshapeManager && (Oe(), He(), w.setState({ useBlendshapeManager: e }));
349
+ }, hr = (e, t, r) => {
350
+ let s = r[e.position || V.eye].getComponent(0);
351
+ const o = r[e.position || V.mouth].getComponent(1);
353
352
  let a = 0;
354
- const k = typeof e.distance == "string" ? parseInt(e.distance) : e.distance, v = typeof e.rotation == "string" ? parseInt(e.rotation) : e.rotation;
355
- switch (k) {
356
- case V.veryclose:
353
+ const M = typeof e.distance == "string" ? parseInt(e.distance) : e.distance, x = typeof e.rotation == "string" ? parseInt(e.rotation) : e.rotation;
354
+ switch (M) {
355
+ case I.veryclose:
357
356
  a = t.veryclose;
358
357
  break;
359
- case V.closer:
358
+ case I.closer:
360
359
  a = t.closer;
361
360
  break;
362
- case V.close:
361
+ case I.close:
363
362
  a = t.close;
364
363
  break;
365
- case V.midclose:
364
+ case I.midclose:
366
365
  a = t.midclose;
367
366
  break;
368
- case V.medium:
367
+ case I.medium:
369
368
  a = t.medium;
370
369
  break;
371
- case V.midfar:
370
+ case I.midfar:
372
371
  a = t.midfar;
373
372
  break;
374
- case V.far:
373
+ case I.far:
375
374
  a = t.far;
376
375
  break;
377
- case V.farther:
376
+ case I.farther:
378
377
  case void 0:
379
378
  default:
380
379
  a = t.farther;
381
380
  break;
382
- case V.veryfar:
381
+ case I.veryfar:
383
382
  a = t.veryfar;
384
383
  break;
385
384
  }
386
- if (v && v !== W.face)
387
- switch (v) {
385
+ if (x && x !== W.face)
386
+ switch (x) {
388
387
  case W.eighthleft: {
389
388
  const T = 0.2588190451;
390
389
  s = s - a * T, a = a * Math.sqrt(1 - Math.pow(T, 2));
@@ -414,10 +413,10 @@ const Be = /* @__PURE__ */ new Map([
414
413
  s = s + a, a = r.eye.getComponent(2);
415
414
  break;
416
415
  }
417
- return new w.Vector3(s, o, a);
418
- }, ge = /* @__PURE__ */ new rt(), De = /* @__PURE__ */ new ye();
416
+ return new b.Vector3(s, o, a);
417
+ }, ge = /* @__PURE__ */ new et(), ze = /* @__PURE__ */ new ye();
419
418
  let fe;
420
- class mr extends Je {
419
+ class dr extends $e {
421
420
  static get type() {
422
421
  return "TRAANode";
423
422
  }
@@ -430,7 +429,7 @@ class mr extends Je {
430
429
  * @param {Camera} camera - The camera the scene is rendered with.
431
430
  */
432
431
  constructor(t, r, s, o) {
433
- super("vec4"), this.isTRAANode = !0, this.updateBeforeType = Xe.FRAME, this.beautyNode = t, this.depthNode = r, this.velocityNode = s, this.camera = o, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = Q(new ye()), this._historyRenderTarget = new be(1, 1, { depthBuffer: !1, type: Te, depthTexture: new ve() }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new be(1, 1, { depthBuffer: !1, type: Te }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new et(), this._resolveMaterial.name = "TRAA.resolve", this._resolveMaterial.blending = tt, this._textureNode = pt(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new J(), this._cameraNearFar = Q(new ye()), this._cameraWorldMatrix = Q(new J()), this._cameraWorldMatrixInverse = Q(new J()), this._cameraProjectionMatrixInverse = Q(new J()), this._previousCameraWorldMatrix = Q(new J()), this._previousCameraProjectionMatrixInverse = Q(new J()), this._previousDepthNode = ke(new ve(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
432
+ super("vec4"), this.isTRAANode = !0, this.updateBeforeType = Ye.FRAME, this.beautyNode = t, this.depthNode = r, this.velocityNode = s, this.camera = o, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = Q(new ye()), this._historyRenderTarget = new we(1, 1, { depthBuffer: !1, type: xe, depthTexture: new ve() }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new we(1, 1, { depthBuffer: !1, type: xe }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new Je(), this._resolveMaterial.name = "TRAA.resolve", this._resolveMaterial.blending = Xe, this._textureNode = dt(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new J(), this._cameraNearFar = Q(new ye()), this._cameraWorldMatrix = Q(new J()), this._cameraWorldMatrixInverse = Q(new J()), this._cameraProjectionMatrixInverse = Q(new J()), this._previousCameraWorldMatrix = Q(new J()), this._previousCameraProjectionMatrixInverse = Q(new J()), this._previousDepthNode = ke(new ve(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
434
433
  }
435
434
  /**
436
435
  * Returns the result of the effect as a texture node.
@@ -490,15 +489,15 @@ class mr extends Je {
490
489
  const { renderer: r } = t;
491
490
  this._previousCameraWorldMatrix.value.copy(this._cameraWorldMatrix.value), this._previousCameraProjectionMatrixInverse.value.copy(this._cameraProjectionMatrixInverse.value), this._cameraNearFar.value.set(this.camera.near, this.camera.far), this._cameraWorldMatrix.value.copy(this.camera.matrixWorld), this._cameraWorldMatrixInverse.value.copy(this.camera.matrixWorldInverse), this._cameraProjectionMatrixInverse.value.copy(this.camera.projectionMatrixInverse);
492
491
  const s = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, o = s.texture.width, a = s.texture.height;
493
- this._needsPostProcessingSync === !0 && (this.setViewOffset(o, a), this._needsPostProcessingSync = !1), fe = Me.resetRendererState(r, fe);
494
- const k = this._historyRenderTarget.width !== o || this._historyRenderTarget.height !== a;
495
- this.setSize(o, a), k === !0 && (r.initRenderTarget(this._historyRenderTarget), r.initRenderTarget(this._resolveRenderTarget), r.copyTextureToTexture(s.texture, this._historyRenderTarget.texture)), r.setClearColor(16777215, 0), r.setRenderTarget(this._resolveRenderTarget), ge.material = this._resolveMaterial, ge.name = "TRAA", ge.render(r), r.setRenderTarget(null), r.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
496
- const v = r.getDrawingBufferSize(De);
497
- if (this._historyRenderTarget.height === v.height && this._historyRenderTarget.width === v.width) {
492
+ this._needsPostProcessingSync === !0 && (this.setViewOffset(o, a), this._needsPostProcessingSync = !1), fe = Te.resetRendererState(r, fe);
493
+ const M = this._historyRenderTarget.width !== o || this._historyRenderTarget.height !== a;
494
+ this.setSize(o, a), M === !0 && (r.initRenderTarget(this._historyRenderTarget), r.initRenderTarget(this._resolveRenderTarget), r.copyTextureToTexture(s.texture, this._historyRenderTarget.texture)), r.setClearColor(16777215, 0), r.setRenderTarget(this._resolveRenderTarget), ge.material = this._resolveMaterial, ge.name = "TRAA", ge.render(r), r.setRenderTarget(null), r.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
495
+ const x = r.getDrawingBufferSize(ze);
496
+ if (this._historyRenderTarget.height === x.height && this._historyRenderTarget.width === x.width) {
498
497
  const T = this.depthNode.value;
499
498
  r.copyTextureToTexture(T, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
500
499
  }
501
- Me.restoreRendererState(r, fe);
500
+ Te.restoreRendererState(r, fe);
502
501
  }
503
502
  /**
504
503
  * This method is used to setup the effect's render targets and TSL code.
@@ -509,15 +508,15 @@ class mr extends Je {
509
508
  setup(t) {
510
509
  const r = t.context.renderPipeline;
511
510
  r && (this._needsPostProcessingSync = !0, r.context.onBeforeRenderPipeline = () => {
512
- const l = t.renderer.getDrawingBufferSize(De);
511
+ const l = t.renderer.getDrawingBufferSize(ze);
513
512
  this.setViewOffset(l.width, l.height);
514
513
  }, r.context.onAfterRenderPipeline = () => {
515
514
  this.clearViewOffset();
516
- }), t.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = st), t.context.velocity !== void 0 ? this._velocityNode = t.context.velocity : this._velocityNode = Ue;
515
+ }), t.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = tt), t.context.velocity !== void 0 ? this._velocityNode = t.context.velocity : this._velocityNode = Ee;
517
516
  const s = (l) => {
518
- const { x: i, y: f } = this._cameraNearFar, d = wt(l, i, f);
517
+ const { x: i, y: f } = this._cameraNearFar, d = ft(l, i, f);
519
518
  return Ce(d, i, f);
520
- }, o = gt({
519
+ }, o = ut({
521
520
  closestDepth: "float",
522
521
  closestPositionTexel: "vec2",
523
522
  farthestDepth: "float"
@@ -527,22 +526,22 @@ class mr extends Je {
527
526
  for (let n = -1; n <= 1; ++n) {
528
527
  const g = l.add(me(c, n)).toVar();
529
528
  let h = this.depthNode.load(g).r;
530
- t.renderer.reversedDepthBuffer && (h = h.oneMinus()), t.renderer.logarithmicDepthBuffer && (h = s(h)), h = h.toVar(), Ae(h.lessThan(i), () => {
529
+ t.renderer.reversedDepthBuffer && (h = h.oneMinus()), t.renderer.logarithmicDepthBuffer && (h = s(h)), h = h.toVar(), Me(h.lessThan(i), () => {
531
530
  i.assign(h), f.assign(g);
532
- }), Ae(h.greaterThan(d), () => {
531
+ }), Me(h.greaterThan(d), () => {
533
532
  d.assign(h);
534
533
  });
535
534
  }
536
535
  return o(i, f, d);
537
- }), k = (l) => {
536
+ }), M = (l) => {
538
537
  let i = this._previousDepthNode.sample(l).r;
539
538
  t.renderer.logarithmicDepthBuffer && (i = s(i));
540
- const f = xt(l, i, this._previousCameraProjectionMatrixInverse), d = this._previousCameraWorldMatrix.mul(oe(f, 1)).xyz, c = this._cameraWorldMatrixInverse.mul(oe(d, 1)).z;
541
- return this.camera.isOrthographicCamera ? bt(c, this._cameraNearFar.x, this._cameraNearFar.y) : Ce(c, this._cameraNearFar.x, this._cameraNearFar.y);
542
- }, v = ee(([l, i, f, d]) => {
543
- const c = d.rgb.add(f.rgb).mul(0.5), n = d.rgb.sub(f.rgb).mul(0.5).add(1e-7), g = i.sub(oe(c, l.a)), p = g.xyz.div(n).abs(), I = ae(p.x, p.y, p.z);
544
- return I.greaterThan(1).select(
545
- oe(c, l.a).add(g.div(I)),
539
+ const f = yt(l, i, this._previousCameraProjectionMatrixInverse), d = this._previousCameraWorldMatrix.mul(oe(f, 1)).xyz, c = this._cameraWorldMatrixInverse.mul(oe(d, 1)).z;
540
+ return this.camera.isOrthographicCamera ? St(c, this._cameraNearFar.x, this._cameraNearFar.y) : Ce(c, this._cameraNearFar.x, this._cameraNearFar.y);
541
+ }, x = ee(([l, i, f, d]) => {
542
+ const c = d.rgb.add(f.rgb).mul(0.5), n = d.rgb.sub(f.rgb).mul(0.5).add(1e-7), g = i.sub(oe(c, l.a)), p = g.xyz.div(n).abs(), R = ae(p.x, p.y, p.z);
543
+ return R.greaterThan(1).select(
544
+ oe(c, l.a).add(g.div(R)),
546
545
  i
547
546
  );
548
547
  }).setLayout({
@@ -566,11 +565,11 @@ class mr extends Je {
566
565
  [-1, 0]
567
566
  ], n = i.toVar(), g = i.pow2().toVar();
568
567
  for (const [H, j] of c) {
569
- const B = this.beautyNode.offset(ft(H, j)).load(l).max(0);
568
+ const B = this.beautyNode.offset(mt(H, j)).load(l).max(0);
570
569
  n.addAssign(B), g.addAssign(B.pow2());
571
570
  }
572
- const h = Z(c.length + 1), p = n.div(h), I = g.div(h).sub(p.pow2()).max(0).sqrt().mul(d), m = p.sub(I), S = p.add(I);
573
- return v(p.clamp(m, S), f, m, S);
571
+ const h = Z(c.length + 1), p = n.div(h), R = g.div(h).sub(p.pow2()).max(0).sqrt().mul(d), m = p.sub(R), y = p.add(R);
572
+ return x(p.clamp(m, y), f, m, y);
574
573
  }), u = ee(([l, i]) => {
575
574
  const d = l.mul(i).fract().abs(), c = ae(d, d.oneMinus());
576
575
  return c.x.mul(c.y).oneMinus().div(0.75);
@@ -581,14 +580,14 @@ class mr extends Je {
581
580
  { name: "velocityUV", type: "vec2" },
582
581
  { name: "textureSize", type: "ivec2" }
583
582
  ]
584
- }), P = ee(([l, i, f]) => {
585
- const d = f.oneMinus(), c = l.mul(Z(1).div(ae(l.r, l.g, l.b).add(1))), n = i.mul(Z(1).div(ae(i.r, i.g, i.b).add(1))), g = Pe(c.rgb), h = Pe(n.rgb);
586
- return f.mulAssign(Z(1).div(g.add(1))), d.mulAssign(Z(1).div(h.add(1))), je(l.mul(f), i.mul(d)).div(ae(f.add(d), 1e-5)).toVar();
583
+ }), C = ee(([l, i, f]) => {
584
+ const d = f.oneMinus(), c = l.mul(Z(1).div(ae(l.r, l.g, l.b).add(1))), n = i.mul(Z(1).div(ae(i.r, i.g, i.b).add(1))), g = Ae(c.rgb), h = Ae(n.rgb);
585
+ return f.mulAssign(Z(1).div(g.add(1))), d.mulAssign(Z(1).div(h.add(1))), Ue(l.mul(f), i.mul(d)).div(ae(f.add(d), 1e-5)).toVar();
587
586
  }), _ = ke(this._historyRenderTarget.texture), N = ee(() => {
588
- const l = yt(), i = this.beautyNode.size(), f = l.mul(i), d = a(f), c = d.get("closestDepth"), n = d.get("closestPositionTexel"), g = d.get("farthestDepth"), h = this.velocityNode.load(n).xy.mul(me(0.5, -0.5)), p = l.sub(h), I = k(p), m = p.greaterThanEqual(0).all().and(p.lessThanEqual(1).all()), S = g.sub(c).greaterThan(this.edgeDepthDiff), H = c.sub(I).greaterThan(this.depthThreshold), j = m.and(S.or(H.not())), B = this.beautyNode.sample(l), $ = _.sample(l.sub(h)), ce = l.sub(p).mul(i).length().div(this.maxVelocityLength).saturate(), Y = Z(0.035).toVar();
587
+ const l = pt(), i = this.beautyNode.size(), f = l.mul(i), d = a(f), c = d.get("closestDepth"), n = d.get("closestPositionTexel"), g = d.get("farthestDepth"), h = this.velocityNode.load(n).xy.mul(me(0.5, -0.5)), p = l.sub(h), R = M(p), m = p.greaterThanEqual(0).all().and(p.lessThanEqual(1).all()), y = g.sub(c).greaterThan(this.edgeDepthDiff), H = c.sub(R).greaterThan(this.depthThreshold), j = m.and(y.or(H.not())), B = this.beautyNode.sample(l), $ = _.sample(l.sub(h)), ce = l.sub(p).mul(i).length().div(this.maxVelocityLength).saturate(), Y = Z(0.035).toVar();
589
588
  this.useSubpixelCorrection && Y.addAssign(u(h, i).mul(0.35)), Y.assign(j.select(Y.add(ce).saturate(), 1));
590
- const he = St(0.5, 1, ce.oneMinus().pow2()), de = T(f, B, $, he);
591
- return P(B, de, Y);
589
+ const he = gt(0.5, 1, ce.oneMinus().pow2()), de = T(f, B, $, he);
590
+ return C(B, de, Y);
592
591
  });
593
592
  return this._resolveMaterial.colorNode = N(), this._textureNode;
594
593
  }
@@ -600,7 +599,7 @@ class mr extends Je {
600
599
  this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
601
600
  }
602
601
  }
603
- function Ee(e, t) {
602
+ function De(e, t) {
604
603
  let r = 1, s = 0;
605
604
  for (; e > 0; )
606
605
  r /= t, s += r * (e % t), e = Math.floor(e / t);
@@ -608,79 +607,62 @@ function Ee(e, t) {
608
607
  }
609
608
  const Fe = /* @__PURE__ */ Array.from(
610
609
  { length: 32 },
611
- (e, t) => [Ee(t + 1, 2), Ee(t + 1, 3)]
612
- ), pr = (e, t, r, s) => new mr(mt(e), t, r, s);
613
- function gr({ pixelated: e }) {
614
- const t = Le((s) => s.gl), r = xe.useRef(1);
615
- return xe.useEffect(() => {
616
- const s = t.domElement;
617
- return () => {
618
- t.setPixelRatio(window.devicePixelRatio), e && s && (s.style.imageRendering = "auto");
619
- };
620
- }, []), it({
621
- onDecline: (s) => {
622
- r.current = Math.max(0.33, r.current * 0.66), t.setPixelRatio(r.current * window.devicePixelRatio), e && t.domElement && (t.domElement.style.imageRendering = "pixelated");
623
- },
624
- onIncline: (s) => {
625
- r.current = Math.min(1, r.current * 1.25), t.setPixelRatio(r.current * window.devicePixelRatio), e && t.domElement && (t.domElement.style.imageRendering = r.current === 1 ? "auto" : "pixelated");
626
- }
627
- }), null;
628
- }
629
- const fr = () => {
630
- const e = b((n) => n.animationsLoaded), t = b((n) => n.characterState), r = b((n) => n.lipSyncManager), s = b((n) => n.blendshapeManager), o = x((n) => n.credentials), a = x((n) => n.currentUtterance), k = x((n) => n.textToSpeak), v = x((n) => n.visemes), T = x((n) => n.blendshapes), u = x((n) => n.visemeIntensity), P = x((n) => n.currentVisemeIndex), _ = x((n) => n.currentBlendshapeIndex), N = x((n) => n.useBlendshapeManager), [l, i] = E(!1), [f, d] = E(!1), c = Se(() => o != null && o.region && (o.subscriptionKey || o.token) ? Vt({
610
+ (e, t) => [De(t + 1, 2), De(t + 1, 3)]
611
+ ), ur = (e, t, r, s) => new dr(ht(e), t, r, s), mr = () => {
612
+ const e = v((n) => n.animationsLoaded), t = v((n) => n.characterState), r = v((n) => n.lipSyncManager), s = v((n) => n.blendshapeManager), o = w((n) => n.credentials), a = w((n) => n.currentUtterance), M = w((n) => n.textToSpeak), x = w((n) => n.visemes), T = w((n) => n.blendshapes), u = w((n) => n.visemeIntensity), C = w((n) => n.currentVisemeIndex), _ = w((n) => n.currentBlendshapeIndex), N = w((n) => n.useBlendshapeManager), [l, i] = F(!1), [f, d] = F(!1), c = Se(() => o != null && o.region && (o.subscriptionKey || o.token) ? Nt({
631
613
  credentials: {
632
614
  region: o.region,
633
615
  authorizationToken: o.token,
634
616
  subscriptionKey: o.subscriptionKey
635
617
  }
636
618
  }) : null, [o]);
637
- return M(() => {
619
+ return k(() => {
638
620
  if (c) {
639
621
  const n = c.speechSynthesis.getVoices();
640
- n && Array.isArray(n) && n.length ? (ze(n), i(!0)) : c.speechSynthesis.onvoiceschanged = () => {
641
- ze(c.speechSynthesis.getVoices()), i(!0);
622
+ n && Array.isArray(n) && n.length ? (Be(n), i(!0)) : c.speechSynthesis.onvoiceschanged = () => {
623
+ Be(c.speechSynthesis.getVoices()), i(!0);
642
624
  };
643
625
  }
644
- }, [c]), M(() => {
626
+ }, [c]), k(() => {
645
627
  l && (N ? !!s : !!r) && e && d(!0);
646
- }, [l, r, s, e, N]), M(() => {
647
- if (k) {
648
- const n = new It(k);
649
- ir(n);
628
+ }, [l, r, s, e, N]), k(() => {
629
+ if (M) {
630
+ const n = new Vt(M);
631
+ ar(n);
650
632
  }
651
- }, [k]), M(() => {
633
+ }, [M]), k(() => {
652
634
  var n, g;
653
635
  a && f ? (a.onstart = () => {
654
- console.log("Start"), Re(q.speaking);
636
+ console.log("Start"), Ne(q.speaking);
655
637
  }, a.onend = () => {
656
- console.log("End"), Re(q.idle);
638
+ console.log("End"), Ne(q.idle);
657
639
  }, a.onboundary = () => {
658
640
  }, a.onviseme = (h) => {
659
- He(h);
641
+ Le(h);
660
642
  }, (n = c == null ? void 0 : c.speechSynthesis) == null || n.speak(a, null)) : (g = c == null ? void 0 : c.speechSynthesis) == null || g.cancel();
661
- }, [a]), M(() => {
643
+ }, [a]), k(() => {
662
644
  r && (r.visemeIntensity = u);
663
- }, [u]), M(() => {
645
+ }, [u]), k(() => {
664
646
  if (!N && r && t === q.speaking) {
665
- if (!r.isStarted && r.start(), v.length > 1 && P === 0)
666
- v.forEach((n) => {
647
+ if (!r.isStarted && r.start(), x.length > 1 && C === 0)
648
+ x.forEach((n) => {
667
649
  const g = parseInt(n.name);
668
650
  if (!isNaN(g)) {
669
- const h = Be.get(g);
651
+ const h = Re.get(g);
670
652
  h && r.PlayVisemeAsync(h, n.elapsedTime / 1e4);
671
653
  }
672
654
  });
673
655
  else
674
- for (let n = P + 1; n < v.length; n++) {
675
- const g = v[n], h = parseInt(g.name);
656
+ for (let n = C + 1; n < x.length; n++) {
657
+ const g = x[n], h = parseInt(g.name);
676
658
  if (!isNaN(h)) {
677
- const p = Be.get(h);
659
+ const p = Re.get(h);
678
660
  p && r.PlayVisemeAsync(p, g.elapsedTime / 1e4);
679
661
  }
680
662
  }
681
- cr(v.length - 1);
663
+ or(x.length - 1);
682
664
  }
683
- }, [t, v, r, N]), M(() => {
665
+ }, [t, x, r, N]), k(() => {
684
666
  if (N && s && t === q.speaking) {
685
667
  if (!s.isStarted && s.start(), T.length > 1 && _ === 0)
686
668
  T.forEach((n) => {
@@ -691,37 +673,37 @@ const fr = () => {
691
673
  const g = T[n];
692
674
  s.PlayBlendShapeAsync(g);
693
675
  }
694
- lr(T.length - 1);
676
+ ir(T.length - 1);
695
677
  }
696
- }, [t, T, s, N]), M(() => {
697
- t !== q.speaking && (Ge(), We());
678
+ }, [t, T, s, N]), k(() => {
679
+ t !== q.speaking && (Oe(), He());
698
680
  }, [t]), null;
699
- }, yr = ({ points: e, color: t = "red" }) => {
681
+ }, pr = ({ points: e, color: t = "red" }) => {
700
682
  const r = Se(() => {
701
- const s = new w.BufferGeometry().setFromPoints(e), o = new w.LineBasicMaterial({ color: t, toneMapped: !1 });
702
- return new w.Line(s, o);
683
+ const s = new b.BufferGeometry().setFromPoints(e), o = new b.LineBasicMaterial({ color: t, toneMapped: !1 });
684
+ return new b.Line(s, o);
703
685
  }, [e, t]);
704
- return /* @__PURE__ */ y.createElement("primitive", { object: r });
705
- }, Sr = ({ parentGpuTier: e, setIsGpuAvailable: t, children: r, tonemapping: s }) => {
706
- const o = D((m) => m.cameraPosition), a = D((m) => m.lookAt), k = D((m) => m.movable), v = U((m) => m.targets), T = U((m) => m.showFirstTarget), [u] = E(e || ct()), [P, _] = E(
686
+ return /* @__PURE__ */ S.createElement("primitive", { object: r });
687
+ }, gr = ({ parentGpuTier: e, setIsGpuAvailable: t, children: r, tonemapping: s }) => {
688
+ const o = D((m) => m.cameraPosition), a = D((m) => m.lookAt), M = D((m) => m.movable), x = U((m) => m.targets), T = U((m) => m.showFirstTarget), [u] = F(e || at()), [C, _] = F(
707
689
  "low"
708
690
  /* low */
709
- ), [N, l] = E(null), [i, f] = E(void 0), d = te(null), c = te(null), n = te(null), g = (m) => {
691
+ ), [N, l] = F(null), [i, f] = F(void 0), d = te(null), c = te(null), n = te(null), g = (m) => {
710
692
  m.preventDefault(), m.stopPropagation();
711
693
  };
712
- M(() => {
713
- jt(c.current);
714
- }, [c.current]), M(() => {
715
- var m, S, H, j;
716
- if (k)
694
+ k(() => {
695
+ Et(c.current);
696
+ }, [c.current]), k(() => {
697
+ var m, y, H, j;
698
+ if (M)
717
699
  N == null || N.abort(), l(null);
718
700
  else {
719
701
  const B = new AbortController();
720
- l(B), (m = d.current) == null || m.addEventListener("wheel", g, { passive: !1, signal: B.signal }), (S = d.current) == null || S.addEventListener("pointerdown", g, { passive: !1, signal: B.signal }), (H = d.current) == null || H.addEventListener("pointermove", g, { passive: !1, signal: B.signal }), (j = d.current) == null || j.addEventListener("click", g, { passive: !1, signal: B.signal });
702
+ l(B), (m = d.current) == null || m.addEventListener("wheel", g, { passive: !1, signal: B.signal }), (y = d.current) == null || y.addEventListener("pointerdown", g, { passive: !1, signal: B.signal }), (H = d.current) == null || H.addEventListener("pointermove", g, { passive: !1, signal: B.signal }), (j = d.current) == null || j.addEventListener("click", g, { passive: !1, signal: B.signal });
721
703
  }
722
- }, [k]), M(() => {
704
+ }, [M]), k(() => {
723
705
  n != null && n.current && a && o && n.current.setLookAt(o.x, o.y, o.z, a.x, a.y, a.z, !0);
724
- }, [o, a]), M(() => {
706
+ }, [o, a]), k(() => {
725
707
  if (u)
726
708
  if (u.type === "FALLBACK")
727
709
  _(
@@ -756,85 +738,85 @@ const fr = () => {
756
738
  );
757
739
  break;
758
740
  }
759
- }, [u]), M(() => {
760
- switch (P && (h.current = P), P) {
741
+ }, [u]), k(() => {
742
+ switch (C && (h.current = C), C) {
761
743
  case "low":
762
744
  console.warn("Retorik React-Bodyengine-Three > GPU tier too low, no rendering available"), t(!1);
763
745
  break;
764
746
  case "medium":
765
- f([0.8, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${P}`), t(!0);
747
+ f([0.8, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${C}`), t(!0);
766
748
  break;
767
749
  case "high":
768
- f([1, 2]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${P}`), t(!0);
750
+ f([1, 2]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${C}`), t(!0);
769
751
  break;
770
752
  }
771
- }, [P]);
772
- const h = te(void 0), p = Qe(async (m) => {
773
- const S = new w.WebGPURenderer({
753
+ }, [C]);
754
+ const h = te(void 0), p = Ke(async (m) => {
755
+ const y = new b.WebGPURenderer({
774
756
  canvas: m.canvas,
775
757
  antialias: !1,
776
758
  alpha: !0,
777
759
  powerPreference: "high-performance"
778
760
  });
779
- return S.setClearColor(new w.Color("#000000"), 0), S.setPixelRatio(devicePixelRatio), S.shadowMap.type = w.PCFSoftShadowMap, await S.init(), S;
780
- }, []), I = Se(() => {
781
- if (v.length) {
782
- const m = v[0], S = new w.Vector3(m.position.x - 0.5, m.position.y, m.position.z - 0.1), H = new w.Vector3(m.position.x + 0.5, m.position.y, m.position.z - 0.1);
783
- return [S, H];
761
+ return y.setClearColor(new b.Color("#000000"), 0), y.setPixelRatio(devicePixelRatio), y.shadowMap.type = b.PCFSoftShadowMap, await y.init(), y;
762
+ }, []), R = Se(() => {
763
+ if (x.length) {
764
+ const m = x[0], y = new b.Vector3(m.position.x - 0.5, m.position.y, m.position.z - 0.1), H = new b.Vector3(m.position.x + 0.5, m.position.y, m.position.z - 0.1);
765
+ return [y, H];
784
766
  } else if (o) {
785
- const m = new w.Vector3(o.x - 0.5, o.y, o.z - 0.1), S = new w.Vector3(o.x + 0.5, o.y, o.z - 0.1);
786
- return [m, S];
767
+ const m = new b.Vector3(o.x - 0.5, o.y, o.z - 0.1), y = new b.Vector3(o.x + 0.5, o.y, o.z - 0.1);
768
+ return [m, y];
787
769
  }
788
770
  return [];
789
- }, [v, o]);
790
- return i ? /* @__PURE__ */ y.createElement(Rt, { gl: p, dpr: i, ref: d, shadows: !0 }, /* @__PURE__ */ y.createElement(lt, { iterations: 5, ms: 100, threshold: 0.75 }, /* @__PURE__ */ y.createElement(wr, { tonemapping: s, processedTier: P }), /* @__PURE__ */ y.createElement(fr, null), /* @__PURE__ */ y.createElement(ht, { ref: c, makeDefault: !0, fov: 28 }), /* @__PURE__ */ y.createElement(dt, { ref: n }), T && I.length && /* @__PURE__ */ y.createElement(yr, { points: I, color: "red" }), /* @__PURE__ */ y.createElement($e, { fallback: null }, r, /* @__PURE__ */ y.createElement(gr, { pixelated: !0 })))) : /* @__PURE__ */ y.createElement(y.Fragment, null);
791
- }, wr = ({ tonemapping: e, processedTier: t }) => {
792
- const { gl: r, scene: s, camera: o, size: a } = Le(), [k] = E(new w.Vector3(-3, 2, 2)), [v] = E(new w.Vector3(0, 1, 0)), [T] = E(2), [u] = E(-3e-3), [P] = E(0.6), _ = te(null), N = te(null);
793
- return M(() => {
794
- r && (r.shadowMap.type = w.PCFSoftShadowMap, r.toneMapping = e, t !== "low" ? s.environmentIntensity = P : s.environmentIntensity = 1);
795
- }, [r, e]), M(() => {
796
- s.environmentIntensity = P;
797
- }, [P]), M(() => {
771
+ }, [x, o]);
772
+ return i ? /* @__PURE__ */ S.createElement(Pt, { gl: p, dpr: i, ref: d, shadows: !0 }, /* @__PURE__ */ S.createElement(ot, { iterations: 5, ms: 100, threshold: 0.75 }, /* @__PURE__ */ S.createElement(fr, { tonemapping: s, processedTier: C }), /* @__PURE__ */ S.createElement(mr, null), /* @__PURE__ */ S.createElement(it, { ref: c, makeDefault: !0, fov: 28 }), /* @__PURE__ */ S.createElement(ct, { ref: n }), T && R.length && /* @__PURE__ */ S.createElement(pr, { points: R, color: "red" }), /* @__PURE__ */ S.createElement(Ze, { fallback: null }, r))) : /* @__PURE__ */ S.createElement(S.Fragment, null);
773
+ }, fr = ({ tonemapping: e, processedTier: t }) => {
774
+ const { gl: r, scene: s, camera: o, size: a } = _t(), [M] = F(new b.Vector3(-3, 2, 2)), [x] = F(new b.Vector3(0, 1, 0)), [T] = F(2), [u] = F(-3e-3), [C] = F(0.6), _ = te(null), N = te(null);
775
+ return k(() => {
776
+ r && (r.shadowMap.type = b.PCFSoftShadowMap, r.toneMapping = e, t !== "low" ? s.environmentIntensity = C : s.environmentIntensity = 1);
777
+ }, [r, e]), k(() => {
778
+ s.environmentIntensity = C;
779
+ }, [C]), k(() => {
798
780
  if (!r || !s || !o || !t) return;
799
781
  s.background = null;
800
- const l = t === "high", i = vt(s, o);
782
+ const l = t === "high", i = bt(s, o);
801
783
  i.setMRT(
802
784
  /*isHigh
803
785
  ?*/
804
- Tt({ output: kt, diffuseColor: Mt, normal: At(Pt), velocity: Ue })
786
+ wt({ output: xt, diffuseColor: vt, normal: Tt(kt), velocity: Ee })
805
787
  //: mrt({ output, velocity })
806
788
  );
807
789
  let f;
808
790
  const d = i.getTextureNode("output");
809
791
  i.getTextureNode("diffuseColor");
810
- const c = i.getTextureNode("depth"), n = i.getTextureNode("velocity"), g = i.getTextureNode("normal"), h = Ct((B) => _t(g.sample(B))), p = Nt(d, c, h, o);
792
+ const c = i.getTextureNode("depth"), n = i.getTextureNode("velocity"), g = i.getTextureNode("normal"), h = Mt((B) => At(g.sample(B))), p = Ct(d, c, h, o);
811
793
  p.aoIntensity.value = 1, p.giIntensity.value = 10, p.sliceCount.value = l ? 2 : 1, p.stepCount.value = 8, p.thickness.value = 0.03, p.radius.value = 0.5, p.expFactor.value = 1, p.backfaceLighting.value = 0.1;
812
- const I = p.getAONode().toInspector("SSGI.AO"), m = p.getGINode().toInspector("SSGI.GI"), S = oe(je(d.rgb.mul(I.r), d.rgb.mul(m.rgb)), d.a);
813
- f = pr(S, c, n, o);
814
- const j = new w.RenderPipeline(r);
794
+ const R = p.getAONode().toInspector("SSGI.AO"), m = p.getGINode().toInspector("SSGI.GI"), y = oe(Ue(d.rgb.mul(R.r), d.rgb.mul(m.rgb)), d.a);
795
+ f = ur(y, c, n, o);
796
+ const j = new b.RenderPipeline(r);
815
797
  return j.outputNode = f, N.current = j, () => {
816
798
  j.dispose(), N.current = null;
817
799
  };
818
- }, [r, s, o, t]), M(() => {
800
+ }, [r, s, o, t]), k(() => {
819
801
  !r || !a || r.setSize(a.width, a.height);
820
- }, [a]), Oe(({ gl: l, scene: i, camera: f }) => {
802
+ }, [a]), je(({ gl: l, scene: i, camera: f }) => {
821
803
  N.current && N.current.render();
822
- }, 1), /* @__PURE__ */ y.createElement(y.Fragment, null, t !== "low" && r && /* @__PURE__ */ y.createElement(y.Fragment, null, /* @__PURE__ */ y.createElement("directionalLight", { ref: _, color: "white", position: k.toArray(), "target-position": v.toArray(), intensity: T, castShadow: !0, "shadow-mapSize-width": 512, "shadow-mapSize-height": 512, "shadow-bias": u, "shadow-intensity": 0.7, "shadow-radius": 1.5 }, /* @__PURE__ */ y.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 8] }))));
823
- }, xr = ({ character: e, autoLookAt: t }) => {
824
- const r = b((u) => u.characterState), s = U((u) => u.currentAUs), o = U((u) => u.currentGaze), a = U((u) => u.currentHeadPose), k = U((u) => u.lookAtCamera), v = D((u) => u.cameraPosition), T = U((u) => u.targets);
825
- return Oe((u, P) => {
804
+ }, 1), /* @__PURE__ */ S.createElement(S.Fragment, null, t !== "low" && r && /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement("directionalLight", { ref: _, color: "white", position: M.toArray(), "target-position": x.toArray(), intensity: T, castShadow: !0, "shadow-mapSize-width": 512, "shadow-mapSize-height": 512, "shadow-bias": u, "shadow-intensity": 0.7, "shadow-radius": 1.5 }, /* @__PURE__ */ S.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 8] }))));
805
+ }, yr = ({ character: e, autoLookAt: t }) => {
806
+ const r = v((u) => u.characterState), s = U((u) => u.currentAUs), o = U((u) => u.currentGaze), a = U((u) => u.currentHeadPose), M = U((u) => u.lookAtCamera), x = D((u) => u.cameraPosition), T = U((u) => u.targets);
807
+ return je((u, C) => {
826
808
  const _ = {
827
- deltaTime: P,
809
+ deltaTime: C,
828
810
  timestamp: u.clock.oldTime,
829
811
  AU: s,
830
812
  gaze: o,
831
813
  headPose: a,
832
814
  characterState: r,
833
- lookAt: k ? v : void 0,
815
+ lookAt: M ? x : void 0,
834
816
  targets: T
835
817
  };
836
818
  e.update(_);
837
- }), M(() => {
819
+ }), k(() => {
838
820
  if (t)
839
821
  switch (r) {
840
822
  case q.idle:
@@ -848,24 +830,24 @@ const fr = () => {
848
830
  }
849
831
  else
850
832
  pe(!1);
851
- }, [r, t]), M(() => {
852
- Ft(e);
833
+ }, [r, t]), k(() => {
834
+ Dt(e);
853
835
  }, [e]), null;
854
- }, Zr = ({ url: e, type: t, animationsUrl: r, gender: s, speechSynthesis: o, camera: a, onLoadingCompleted: k, autoLookAt: v, breathing: T, disableAnimations: u, debug: P, enableBml: _, animationWeights: N, license: l, detectGpuData: i, environmentPreset: f = "apartment", tonemapping: d = w.NeutralToneMapping, targets: c, useBlendshapeManager: n = !1 }) => {
855
- const g = b((C) => C.animationsLoaded), h = D((C) => C.defaultPositions), p = D((C) => C.defaultDistances), [I, m] = E(), [S, H] = E(null), [j, B] = E(), [$, ce] = E(!1), Y = async (C) => {
836
+ }, Wr = ({ url: e, type: t, animationsUrl: r, gender: s, speechSynthesis: o, camera: a, onLoadingCompleted: M, autoLookAt: x, breathing: T, disableAnimations: u, debug: C, enableBml: _, animationWeights: N, license: l, detectGpuData: i, environmentPreset: f = "apartment", tonemapping: d = b.NeutralToneMapping, targets: c, useBlendshapeManager: n = !1 }) => {
837
+ const g = v((P) => P.animationsLoaded), h = D((P) => P.defaultPositions), p = D((P) => P.defaultDistances), [R, m] = F(), [y, H] = F(null), [j, B] = F(), [$, ce] = F(!1), Y = async (P) => {
856
838
  let A = null;
857
839
  switch (t) {
858
840
  case X.cc3:
859
- A = new ot(), B(le.cc3);
841
+ A = new nt(), B(le.cc3);
860
842
  break;
861
843
  case X.avatarsdk:
862
- A = new at(), B(le.avatarsdk);
844
+ A = new st(), B(le.avatarsdk);
863
845
  break;
864
846
  case X.avaturn:
865
- A = new nt(), B(le.avaturn);
847
+ A = new rt(), B(le.avaturn);
866
848
  break;
867
849
  }
868
- const z = await A.loadAsync(C).catch((G) => console.warn("Error loading character : ", G));
850
+ const z = await A.loadAsync(P).catch((G) => console.warn("Error loading character : ", G));
869
851
  if (z) {
870
852
  let G = null;
871
853
  const ne = {
@@ -874,7 +856,7 @@ const fr = () => {
874
856
  animationsUrl: r,
875
857
  gender: s || "male",
876
858
  type: t,
877
- debug: P,
859
+ debug: C,
878
860
  enableBmlManager: !!_,
879
861
  animationWeights: N,
880
862
  useBlendshapeManager: n,
@@ -894,57 +876,57 @@ const fr = () => {
894
876
  G && H(G);
895
877
  }
896
878
  }, he = () => {
897
- Ne(!0);
879
+ _e(!0);
898
880
  };
899
- M(() => {
900
- var C, A;
901
- S && g && (T === !1 && ((A = (C = S.animationManager) == null ? void 0 : C.disableBreathing) == null || A.call(C)), $ ? (Zt(S.getAllAnimationNames()), Qt(S.getAllAnimations()), setTimeout(() => {
902
- k == null || k();
881
+ k(() => {
882
+ var P, A;
883
+ y && g && (T === !1 && ((A = (P = y.animationManager) == null ? void 0 : P.disableBreathing) == null || A.call(P)), $ ? (qt(y.getAllAnimationNames()), Kt(y.getAllAnimations()), setTimeout(() => {
884
+ M == null || M();
903
885
  }, 1e3)) : de());
904
- }, [S, g, $]), M(() => {
905
- Wt(c || []);
906
- }, [c]), M(() => {
907
- Ne(!1), I !== void 0 && (I ? Y(e) : k == null || k());
908
- }, [e, I]), M(() => {
886
+ }, [y, g, $]), k(() => {
887
+ Ht(c || []);
888
+ }, [c]), k(() => {
889
+ _e(!1), R !== void 0 && (R ? Y(e) : M == null || M());
890
+ }, [e, R]), k(() => {
909
891
  if ($ && p && h)
910
892
  if (a) {
911
- const C = ur(a, p, h);
912
- Ve(C), Ie(a.lookAt ? h[a.lookAt] : h.lowerbelly), Gt(!!a.movable);
893
+ const P = hr(a, p, h);
894
+ Ve(P), Ie(a.lookAt ? h[a.lookAt] : h.lowerbelly), Ot(!!a.movable);
913
895
  } else {
914
- const C = h.mouth.clone();
915
- C.setComponent(2, p.farther), Ve(C), Ie(h.lowerbelly);
896
+ const P = h.mouth.clone();
897
+ P.setComponent(2, p.farther), Ve(P), Ie(h.lowerbelly);
916
898
  }
917
- }, [$, a, p, h]), M(() => {
918
- o && (o.credentials && or(o.credentials), o.voice && hr(o.voice));
919
- }, [o]), M(() => {
920
- dr(n);
899
+ }, [$, a, p, h]), k(() => {
900
+ o && (o.credentials && nr(o.credentials), o.voice && cr(o.voice));
901
+ }, [o]), k(() => {
902
+ lr(n);
921
903
  }, [n]);
922
904
  const de = () => {
923
- if (S && j) {
905
+ if (y && j) {
924
906
  try {
925
- const C = new w.Box3().setFromObject(S), A = C.max, z = C.min, G = new w.Vector3((A.x + z.x) / 2, (A.y + z.y) / 2, (A.z + z.z) / 2);
926
- Lt(G);
927
- const ne = Math.abs(A.x - z.x), F = Math.abs(A.y - z.y), qe = Math.abs(A.z - z.z);
928
- Ut({
907
+ const P = new b.Box3().setFromObject(y), A = P.max, z = P.min, G = new b.Vector3((A.x + z.x) / 2, (A.y + z.y) / 2, (A.z + z.z) / 2);
908
+ Ut(G);
909
+ const ne = Math.abs(A.x - z.x), E = Math.abs(A.y - z.y), Ge = Math.abs(A.z - z.z);
910
+ Ft({
929
911
  x: ne,
930
- y: F,
931
- z: qe
912
+ y: E,
913
+ z: Ge
932
914
  });
933
- const L = (A.x + z.x) / 2, O = (A.z + z.z) / 2, Ke = {
934
- eye: new w.Vector3(L, A.y - F / 16, O),
935
- mouth: new w.Vector3(L, A.y - F / 12, O),
936
- neck: new w.Vector3(L, A.y - F / 8, O),
937
- clavicle: new w.Vector3(L, A.y - F / 6, O),
938
- torso: new w.Vector3(L, A.y - F / 4, O),
939
- belly: new w.Vector3(L, A.y - F / 8 * 3, O),
940
- lowerbelly: new w.Vector3(L, A.y - F / 32 * 15, O),
915
+ const L = (A.x + z.x) / 2, O = (A.z + z.z) / 2, We = {
916
+ eye: new b.Vector3(L, A.y - E / 16, O),
917
+ mouth: new b.Vector3(L, A.y - E / 12, O),
918
+ neck: new b.Vector3(L, A.y - E / 8, O),
919
+ clavicle: new b.Vector3(L, A.y - E / 6, O),
920
+ torso: new b.Vector3(L, A.y - E / 4, O),
921
+ belly: new b.Vector3(L, A.y - E / 8 * 3, O),
922
+ lowerbelly: new b.Vector3(L, A.y - E / 32 * 15, O),
941
923
  hips: G,
942
- higherthigh: new w.Vector3(L, z.y + F / 32 * 15, O),
943
- thigh: new w.Vector3(L, z.y + F / 8 * 3, O),
944
- knee: new w.Vector3(L, z.y + F / 4, O),
945
- leg: new w.Vector3(L, z.y + F / 8, O),
946
- feet: new w.Vector3(L, z.y, O)
947
- }, K = (A.y - (z.y + F / 7 * 2)) / 2 / Math.tan(25 * (Math.PI / 180)), Ze = {
924
+ higherthigh: new b.Vector3(L, z.y + E / 32 * 15, O),
925
+ thigh: new b.Vector3(L, z.y + E / 8 * 3, O),
926
+ knee: new b.Vector3(L, z.y + E / 4, O),
927
+ leg: new b.Vector3(L, z.y + E / 8, O),
928
+ feet: new b.Vector3(L, z.y, O)
929
+ }, K = (A.y - (z.y + E / 7 * 2)) / 2 / Math.tan(25 * (Math.PI / 180)), qe = {
948
930
  veryclose: K / 4,
949
931
  closer: K / 3,
950
932
  close: K / 2.5,
@@ -955,75 +937,75 @@ const fr = () => {
955
937
  farther: K * 3,
956
938
  veryfar: K * 4
957
939
  };
958
- Ot(Ke), Ht(Ze);
959
- } catch (C) {
960
- console.warn(C);
940
+ jt(We), Lt(qe);
941
+ } catch (P) {
942
+ console.warn(P);
961
943
  }
962
944
  ce(!0);
963
945
  }
964
946
  };
965
- return /* @__PURE__ */ y.createElement(Sr, { parentGpuTier: i, setIsGpuAvailable: m, tonemapping: d }, I ? /* @__PURE__ */ y.createElement(y.Fragment, null, S && /* @__PURE__ */ y.createElement(xr, { character: S, autoLookAt: !!v }), S && /* @__PURE__ */ y.createElement(y.Fragment, null, /* @__PURE__ */ y.createElement(ut, { preset: f }), /* @__PURE__ */ y.createElement("primitive", { object: S, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ y.createElement(y.Fragment, null));
966
- }, br = {
947
+ return /* @__PURE__ */ S.createElement(gr, { parentGpuTier: i, setIsGpuAvailable: m, tonemapping: d }, R ? /* @__PURE__ */ S.createElement(S.Fragment, null, y && /* @__PURE__ */ S.createElement(yr, { character: y, autoLookAt: !!x }), y && /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(lt, { preset: f }), /* @__PURE__ */ S.createElement("primitive", { object: y, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ S.createElement(S.Fragment, null));
948
+ }, Sr = {
967
949
  emotions: [],
968
- currentTopEmotion: we.Neutral,
950
+ currentTopEmotion: be.Neutral,
969
951
  useTopEmotionOnly: !0,
970
952
  autoDecay: !1
971
- }, ie = se()(() => br), Qr = (e) => {
953
+ }, ie = se()(() => Sr), qr = (e) => {
972
954
  if (ie.setState({ emotions: e || [] }), e != null && e.length) {
973
955
  const t = e.reduce((r, s) => r.value > s.value ? r : s);
974
956
  ie.setState({ currentTopEmotion: t.emotion });
975
957
  } else
976
- ie.setState({ currentTopEmotion: we.Neutral });
977
- }, $r = (e) => {
958
+ ie.setState({ currentTopEmotion: be.Neutral });
959
+ }, Kr = (e) => {
978
960
  ie.setState({ useTopEmotionOnly: e });
979
- }, Yr = (e) => {
961
+ }, Zr = (e) => {
980
962
  ie.setState({ autoDecay: e });
981
- }, Jr = (e) => {
982
- const t = b.getState().FACSManager;
963
+ }, Qr = (e) => {
964
+ const t = v.getState().FACSManager;
983
965
  t == null || t.playFacialAnimation({ ...e });
984
966
  };
985
967
  export {
986
- Zr as Character,
987
- ss as CharacterState,
988
- ns as CreationTool,
989
- V as Distances,
990
- ts as Object3D,
991
- R as Positions,
968
+ Wr as Character,
969
+ es as CharacterState,
970
+ ts as CreationTool,
971
+ I as Distances,
972
+ Jr as Object3D,
973
+ V as Positions,
992
974
  W as Rotations,
993
- Hr as addBlendshape,
994
- Gr as addSPPASViseme,
995
- He as addViseme,
996
- as as bmlTags,
997
- os as emotionList,
998
- We as flushBlendshapeData,
999
- Ge as flushLipSyncData,
1000
- Er as getAnimationsMap,
1001
- Rr as getCameraPosition,
1002
- Nr as getCharacterHeight,
1003
- Vr as getLookAt,
1004
- qr as getVoices,
1005
- qt as lookAtAndKeep,
1006
- Ur as playAnimationByName,
1007
- Jr as playFacialAnimation,
1008
- jr as presets,
1009
- Kt as releaseLookAt,
1010
- Yr as setAutoDecay,
1011
- Fr as setAutoPlay,
1012
- Or as setBlendshapes,
975
+ jr as addBlendshape,
976
+ Lr as addSPPASViseme,
977
+ Le as addViseme,
978
+ rs as bmlTags,
979
+ ss as emotionList,
980
+ He as flushBlendshapeData,
981
+ Oe as flushLipSyncData,
982
+ Br as getAnimationsMap,
983
+ Pr as getCameraPosition,
984
+ Cr as getCharacterHeight,
985
+ _r as getLookAt,
986
+ Hr as getVoices,
987
+ Gt as lookAtAndKeep,
988
+ Dr as playAnimationByName,
989
+ Qr as playFacialAnimation,
990
+ Fr as presets,
991
+ Wt as releaseLookAt,
992
+ Zr as setAutoDecay,
993
+ zr as setAutoPlay,
994
+ Ur as setBlendshapes,
1013
995
  Ve as setCameraPosition,
1014
- Re as setCharacterState,
1015
- Ir as setCurrentAUs,
1016
- Br as setCurrentGaze,
1017
- zr as setCurrentHeadPose,
1018
- ir as setCurrentUtterance,
1019
- Qr as setEmotions,
996
+ Ne as setCharacterState,
997
+ Nr as setCurrentAUs,
998
+ Vr as setCurrentGaze,
999
+ Ir as setCurrentHeadPose,
1000
+ ar as setCurrentUtterance,
1001
+ qr as setEmotions,
1020
1002
  pe as setLookAtCamera,
1021
- Gt as setMovable,
1022
- Dr as setShowFirstTarget,
1023
- Wr as setTextToSpeak,
1024
- $r as setUseTopEmotionOnly,
1025
- Kr as setVisemeIntensity,
1026
- Lr as setVisemes,
1027
- hr as setVoice,
1028
- b as useCharacterStore
1003
+ Ot as setMovable,
1004
+ Rr as setShowFirstTarget,
1005
+ Or as setTextToSpeak,
1006
+ Kr as setUseTopEmotionOnly,
1007
+ Gr as setVisemeIntensity,
1008
+ Er as setVisemes,
1009
+ cr as setVoice,
1010
+ v as useCharacterStore
1029
1011
  };
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":"1dfc31de-1","name":"vanilla.mjs"},{"uid":"1dfc31de-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"1dfc31de-5","name":"characterStore.ts"},{"uid":"1dfc31de-7","name":"cameraStore.ts"},{"uid":"1dfc31de-9","name":"headStore.ts"},{"uid":"1dfc31de-11","name":"animationStore.ts"},{"uid":"1dfc31de-17","name":"speechStore.ts"},{"uid":"1dfc31de-35","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"1dfc31de-13","name":"enums.ts"},{"uid":"1dfc31de-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"1dfc31de-19"},{"name":"components","children":[{"name":"PostProcessing/TRAANode.js","uid":"1dfc31de-21"},{"uid":"1dfc31de-23","name":"AdaptiveDpr.tsx"},{"uid":"1dfc31de-25","name":"SpeechManager.tsx"},{"uid":"1dfc31de-27","name":"HorizontalLine.tsx"},{"uid":"1dfc31de-29","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"1dfc31de-31"},{"uid":"1dfc31de-33","name":"Character.tsx"}]},{"uid":"1dfc31de-37","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"1dfc31de-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"1dfc31de-0"},"1dfc31de-3":{"renderedLength":629,"gzipLength":293,"brotliLength":235,"metaUid":"1dfc31de-2"},"1dfc31de-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"1dfc31de-4"},"1dfc31de-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"1dfc31de-6"},"1dfc31de-9":{"renderedLength":1154,"gzipLength":359,"brotliLength":315,"metaUid":"1dfc31de-8"},"1dfc31de-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"1dfc31de-10"},"1dfc31de-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"1dfc31de-12"},"1dfc31de-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"1dfc31de-14"},"1dfc31de-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"1dfc31de-16"},"1dfc31de-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"1dfc31de-18"},"1dfc31de-21":{"renderedLength":23874,"gzipLength":6091,"brotliLength":5308,"metaUid":"1dfc31de-20"},"1dfc31de-23":{"renderedLength":948,"gzipLength":364,"brotliLength":326,"metaUid":"1dfc31de-22"},"1dfc31de-25":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"1dfc31de-24"},"1dfc31de-27":{"renderedLength":392,"gzipLength":257,"brotliLength":210,"metaUid":"1dfc31de-26"},"1dfc31de-29":{"renderedLength":8726,"gzipLength":2413,"brotliLength":2149,"metaUid":"1dfc31de-28"},"1dfc31de-31":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"1dfc31de-30"},"1dfc31de-33":{"renderedLength":7138,"gzipLength":1847,"brotliLength":1644,"metaUid":"1dfc31de-32"},"1dfc31de-35":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"1dfc31de-34"},"1dfc31de-37":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"1dfc31de-36"}},"nodeMetas":{"1dfc31de-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"1dfc31de-1"},"imported":[],"importedBy":[{"uid":"1dfc31de-42"},{"uid":"1dfc31de-2"}]},"1dfc31de-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"1dfc31de-3"},"imported":[{"uid":"1dfc31de-40"},{"uid":"1dfc31de-0"}],"importedBy":[{"uid":"1dfc31de-42"}]},"1dfc31de-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"1dfc31de-5"},"imported":[{"uid":"1dfc31de-42"},{"uid":"1dfc31de-38"}],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"},{"uid":"1dfc31de-16"},{"uid":"1dfc31de-8"},{"uid":"1dfc31de-34"},{"uid":"1dfc31de-10"},{"uid":"1dfc31de-30"},{"uid":"1dfc31de-24"}]},"1dfc31de-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"1dfc31de-7"},"imported":[{"uid":"1dfc31de-42"},{"uid":"1dfc31de-39"}],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"},{"uid":"1dfc31de-8"},{"uid":"1dfc31de-28"},{"uid":"1dfc31de-30"}]},"1dfc31de-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"1dfc31de-9"},"imported":[{"uid":"1dfc31de-42"},{"uid":"1dfc31de-4"},{"uid":"1dfc31de-6"}],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"},{"uid":"1dfc31de-28"},{"uid":"1dfc31de-30"}]},"1dfc31de-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"1dfc31de-11"},"imported":[{"uid":"1dfc31de-42"},{"uid":"1dfc31de-4"}],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"}]},"1dfc31de-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"1dfc31de-13"},"imported":[],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"},{"uid":"1dfc31de-34"},{"uid":"1dfc31de-14"},{"uid":"1dfc31de-18"}]},"1dfc31de-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"1dfc31de-15"},"imported":[{"uid":"1dfc31de-12"}],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-16"},{"uid":"1dfc31de-24"}]},"1dfc31de-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"1dfc31de-17"},"imported":[{"uid":"1dfc31de-42"},{"uid":"1dfc31de-4"},{"uid":"1dfc31de-14"}],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"},{"uid":"1dfc31de-24"}]},"1dfc31de-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"1dfc31de-19"},"imported":[{"uid":"1dfc31de-39"},{"uid":"1dfc31de-12"}],"importedBy":[{"uid":"1dfc31de-32"}]},"1dfc31de-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/TRAANode.js","moduleParts":{"index.js":"1dfc31de-21"},"imported":[{"uid":"1dfc31de-39"},{"uid":"1dfc31de-43"}],"importedBy":[{"uid":"1dfc31de-28"}]},"1dfc31de-22":{"id":"D:/a/1/s/packages/reactjs/src/components/AdaptiveDpr.tsx","moduleParts":{"index.js":"1dfc31de-23"},"imported":[{"uid":"1dfc31de-40"},{"uid":"1dfc31de-41"},{"uid":"1dfc31de-45"}],"importedBy":[{"uid":"1dfc31de-28"}]},"1dfc31de-24":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"1dfc31de-25"},"imported":[{"uid":"1dfc31de-40"},{"uid":"1dfc31de-16"},{"uid":"1dfc31de-4"},{"uid":"1dfc31de-46"},{"uid":"1dfc31de-14"},{"uid":"1dfc31de-38"}],"importedBy":[{"uid":"1dfc31de-28"}]},"1dfc31de-26":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"1dfc31de-27"},"imported":[{"uid":"1dfc31de-40"},{"uid":"1dfc31de-39"}],"importedBy":[{"uid":"1dfc31de-28"}]},"1dfc31de-28":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"1dfc31de-29"},"imported":[{"uid":"1dfc31de-40"},{"uid":"1dfc31de-39"},{"uid":"1dfc31de-43"},{"uid":"1dfc31de-20"},{"uid":"1dfc31de-44"},{"uid":"1dfc31de-41"},{"uid":"1dfc31de-22"},{"uid":"1dfc31de-45"},{"uid":"1dfc31de-6"},{"uid":"1dfc31de-8"},{"uid":"1dfc31de-24"},{"uid":"1dfc31de-26"}],"importedBy":[{"uid":"1dfc31de-32"}]},"1dfc31de-30":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"1dfc31de-31"},"imported":[{"uid":"1dfc31de-40"},{"uid":"1dfc31de-4"},{"uid":"1dfc31de-38"},{"uid":"1dfc31de-45"},{"uid":"1dfc31de-8"},{"uid":"1dfc31de-6"}],"importedBy":[{"uid":"1dfc31de-32"}]},"1dfc31de-32":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"1dfc31de-33"},"imported":[{"uid":"1dfc31de-40"},{"uid":"1dfc31de-39"},{"uid":"1dfc31de-38"},{"uid":"1dfc31de-41"},{"uid":"1dfc31de-8"},{"uid":"1dfc31de-4"},{"uid":"1dfc31de-10"},{"uid":"1dfc31de-6"},{"uid":"1dfc31de-16"},{"uid":"1dfc31de-12"},{"uid":"1dfc31de-18"},{"uid":"1dfc31de-28"},{"uid":"1dfc31de-30"}],"importedBy":[{"uid":"1dfc31de-36"}]},"1dfc31de-34":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"1dfc31de-35"},"imported":[{"uid":"1dfc31de-42"},{"uid":"1dfc31de-12"},{"uid":"1dfc31de-4"}],"importedBy":[{"uid":"1dfc31de-36"}]},"1dfc31de-36":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"1dfc31de-37"},"imported":[{"uid":"1dfc31de-32"},{"uid":"1dfc31de-4"},{"uid":"1dfc31de-16"},{"uid":"1dfc31de-6"},{"uid":"1dfc31de-8"},{"uid":"1dfc31de-34"},{"uid":"1dfc31de-10"},{"uid":"1dfc31de-38"},{"uid":"1dfc31de-12"},{"uid":"1dfc31de-14"},{"uid":"1dfc31de-39"}],"importedBy":[],"isEntry":true},"1dfc31de-38":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"},{"uid":"1dfc31de-4"},{"uid":"1dfc31de-30"},{"uid":"1dfc31de-24"}],"isExternal":true},"1dfc31de-39":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-36"},{"uid":"1dfc31de-32"},{"uid":"1dfc31de-6"},{"uid":"1dfc31de-18"},{"uid":"1dfc31de-28"},{"uid":"1dfc31de-20"},{"uid":"1dfc31de-26"}],"isExternal":true},"1dfc31de-40":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-32"},{"uid":"1dfc31de-28"},{"uid":"1dfc31de-30"},{"uid":"1dfc31de-22"},{"uid":"1dfc31de-24"},{"uid":"1dfc31de-26"},{"uid":"1dfc31de-2"}],"isExternal":true},"1dfc31de-41":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-32"},{"uid":"1dfc31de-28"},{"uid":"1dfc31de-22"}],"isExternal":true},"1dfc31de-42":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"1dfc31de-0"},{"uid":"1dfc31de-2"}],"importedBy":[{"uid":"1dfc31de-4"},{"uid":"1dfc31de-16"},{"uid":"1dfc31de-6"},{"uid":"1dfc31de-8"},{"uid":"1dfc31de-34"},{"uid":"1dfc31de-10"}]},"1dfc31de-43":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-28"},{"uid":"1dfc31de-20"}],"isExternal":true},"1dfc31de-44":{"id":"three/addons/tsl/display/SSGINode.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-28"}],"isExternal":true},"1dfc31de-45":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-28"},{"uid":"1dfc31de-30"},{"uid":"1dfc31de-22"}],"isExternal":true},"1dfc31de-46":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"1dfc31de-24"}],"isExternal":true}},"env":{"rollup":"4.62.2"},"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":"a704e0ac-1","name":"vanilla.mjs"},{"uid":"a704e0ac-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"a704e0ac-5","name":"characterStore.ts"},{"uid":"a704e0ac-7","name":"cameraStore.ts"},{"uid":"a704e0ac-9","name":"headStore.ts"},{"uid":"a704e0ac-11","name":"animationStore.ts"},{"uid":"a704e0ac-17","name":"speechStore.ts"},{"uid":"a704e0ac-33","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"a704e0ac-13","name":"enums.ts"},{"uid":"a704e0ac-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"a704e0ac-19"},{"name":"components","children":[{"name":"PostProcessing/TRAANode.js","uid":"a704e0ac-21"},{"uid":"a704e0ac-23","name":"SpeechManager.tsx"},{"uid":"a704e0ac-25","name":"HorizontalLine.tsx"},{"uid":"a704e0ac-27","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"a704e0ac-29"},{"uid":"a704e0ac-31","name":"Character.tsx"}]},{"uid":"a704e0ac-35","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"a704e0ac-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"a704e0ac-0"},"a704e0ac-3":{"renderedLength":593,"gzipLength":285,"brotliLength":235,"metaUid":"a704e0ac-2"},"a704e0ac-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"a704e0ac-4"},"a704e0ac-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"a704e0ac-6"},"a704e0ac-9":{"renderedLength":1154,"gzipLength":359,"brotliLength":315,"metaUid":"a704e0ac-8"},"a704e0ac-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"a704e0ac-10"},"a704e0ac-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"a704e0ac-12"},"a704e0ac-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"a704e0ac-14"},"a704e0ac-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"a704e0ac-16"},"a704e0ac-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"a704e0ac-18"},"a704e0ac-21":{"renderedLength":23874,"gzipLength":6091,"brotliLength":5308,"metaUid":"a704e0ac-20"},"a704e0ac-23":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"a704e0ac-22"},"a704e0ac-25":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"a704e0ac-24"},"a704e0ac-27":{"renderedLength":8502,"gzipLength":2388,"brotliLength":2124,"metaUid":"a704e0ac-26"},"a704e0ac-29":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"a704e0ac-28"},"a704e0ac-31":{"renderedLength":7048,"gzipLength":1843,"brotliLength":1639,"metaUid":"a704e0ac-30"},"a704e0ac-33":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"a704e0ac-32"},"a704e0ac-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"a704e0ac-34"}},"nodeMetas":{"a704e0ac-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"a704e0ac-1"},"imported":[],"importedBy":[{"uid":"a704e0ac-40"},{"uid":"a704e0ac-2"}]},"a704e0ac-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"a704e0ac-3"},"imported":[{"uid":"a704e0ac-38"},{"uid":"a704e0ac-0"}],"importedBy":[{"uid":"a704e0ac-40"}]},"a704e0ac-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"a704e0ac-5"},"imported":[{"uid":"a704e0ac-40"},{"uid":"a704e0ac-36"}],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"},{"uid":"a704e0ac-16"},{"uid":"a704e0ac-8"},{"uid":"a704e0ac-32"},{"uid":"a704e0ac-10"},{"uid":"a704e0ac-28"},{"uid":"a704e0ac-22"}]},"a704e0ac-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"a704e0ac-7"},"imported":[{"uid":"a704e0ac-40"},{"uid":"a704e0ac-37"}],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"},{"uid":"a704e0ac-8"},{"uid":"a704e0ac-26"},{"uid":"a704e0ac-28"}]},"a704e0ac-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"a704e0ac-9"},"imported":[{"uid":"a704e0ac-40"},{"uid":"a704e0ac-4"},{"uid":"a704e0ac-6"}],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"},{"uid":"a704e0ac-26"},{"uid":"a704e0ac-28"}]},"a704e0ac-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"a704e0ac-11"},"imported":[{"uid":"a704e0ac-40"},{"uid":"a704e0ac-4"}],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"}]},"a704e0ac-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"a704e0ac-13"},"imported":[],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"},{"uid":"a704e0ac-32"},{"uid":"a704e0ac-14"},{"uid":"a704e0ac-18"}]},"a704e0ac-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"a704e0ac-15"},"imported":[{"uid":"a704e0ac-12"}],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-16"},{"uid":"a704e0ac-22"}]},"a704e0ac-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"a704e0ac-17"},"imported":[{"uid":"a704e0ac-40"},{"uid":"a704e0ac-4"},{"uid":"a704e0ac-14"}],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"},{"uid":"a704e0ac-22"}]},"a704e0ac-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"a704e0ac-19"},"imported":[{"uid":"a704e0ac-37"},{"uid":"a704e0ac-12"}],"importedBy":[{"uid":"a704e0ac-30"}]},"a704e0ac-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/TRAANode.js","moduleParts":{"index.js":"a704e0ac-21"},"imported":[{"uid":"a704e0ac-37"},{"uid":"a704e0ac-41"}],"importedBy":[{"uid":"a704e0ac-26"}]},"a704e0ac-22":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"a704e0ac-23"},"imported":[{"uid":"a704e0ac-38"},{"uid":"a704e0ac-16"},{"uid":"a704e0ac-4"},{"uid":"a704e0ac-44"},{"uid":"a704e0ac-14"},{"uid":"a704e0ac-36"}],"importedBy":[{"uid":"a704e0ac-26"}]},"a704e0ac-24":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"a704e0ac-25"},"imported":[{"uid":"a704e0ac-38"},{"uid":"a704e0ac-37"}],"importedBy":[{"uid":"a704e0ac-26"}]},"a704e0ac-26":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"a704e0ac-27"},"imported":[{"uid":"a704e0ac-38"},{"uid":"a704e0ac-37"},{"uid":"a704e0ac-41"},{"uid":"a704e0ac-20"},{"uid":"a704e0ac-42"},{"uid":"a704e0ac-39"},{"uid":"a704e0ac-43"},{"uid":"a704e0ac-6"},{"uid":"a704e0ac-8"},{"uid":"a704e0ac-22"},{"uid":"a704e0ac-24"}],"importedBy":[{"uid":"a704e0ac-30"}]},"a704e0ac-28":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"a704e0ac-29"},"imported":[{"uid":"a704e0ac-38"},{"uid":"a704e0ac-4"},{"uid":"a704e0ac-36"},{"uid":"a704e0ac-43"},{"uid":"a704e0ac-8"},{"uid":"a704e0ac-6"}],"importedBy":[{"uid":"a704e0ac-30"}]},"a704e0ac-30":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"a704e0ac-31"},"imported":[{"uid":"a704e0ac-38"},{"uid":"a704e0ac-37"},{"uid":"a704e0ac-36"},{"uid":"a704e0ac-39"},{"uid":"a704e0ac-8"},{"uid":"a704e0ac-4"},{"uid":"a704e0ac-10"},{"uid":"a704e0ac-6"},{"uid":"a704e0ac-16"},{"uid":"a704e0ac-12"},{"uid":"a704e0ac-18"},{"uid":"a704e0ac-26"},{"uid":"a704e0ac-28"}],"importedBy":[{"uid":"a704e0ac-34"}]},"a704e0ac-32":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"a704e0ac-33"},"imported":[{"uid":"a704e0ac-40"},{"uid":"a704e0ac-12"},{"uid":"a704e0ac-4"}],"importedBy":[{"uid":"a704e0ac-34"}]},"a704e0ac-34":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"a704e0ac-35"},"imported":[{"uid":"a704e0ac-30"},{"uid":"a704e0ac-4"},{"uid":"a704e0ac-16"},{"uid":"a704e0ac-6"},{"uid":"a704e0ac-8"},{"uid":"a704e0ac-32"},{"uid":"a704e0ac-10"},{"uid":"a704e0ac-36"},{"uid":"a704e0ac-12"},{"uid":"a704e0ac-14"},{"uid":"a704e0ac-37"}],"importedBy":[],"isEntry":true},"a704e0ac-36":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"},{"uid":"a704e0ac-4"},{"uid":"a704e0ac-28"},{"uid":"a704e0ac-22"}],"isExternal":true},"a704e0ac-37":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-34"},{"uid":"a704e0ac-30"},{"uid":"a704e0ac-6"},{"uid":"a704e0ac-18"},{"uid":"a704e0ac-26"},{"uid":"a704e0ac-20"},{"uid":"a704e0ac-24"}],"isExternal":true},"a704e0ac-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-30"},{"uid":"a704e0ac-26"},{"uid":"a704e0ac-28"},{"uid":"a704e0ac-22"},{"uid":"a704e0ac-24"},{"uid":"a704e0ac-2"}],"isExternal":true},"a704e0ac-39":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-30"},{"uid":"a704e0ac-26"}],"isExternal":true},"a704e0ac-40":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"a704e0ac-0"},{"uid":"a704e0ac-2"}],"importedBy":[{"uid":"a704e0ac-4"},{"uid":"a704e0ac-16"},{"uid":"a704e0ac-6"},{"uid":"a704e0ac-8"},{"uid":"a704e0ac-32"},{"uid":"a704e0ac-10"}]},"a704e0ac-41":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-26"},{"uid":"a704e0ac-20"}],"isExternal":true},"a704e0ac-42":{"id":"three/addons/tsl/display/SSGINode.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-26"}],"isExternal":true},"a704e0ac-43":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-26"},{"uid":"a704e0ac-28"}],"isExternal":true},"a704e0ac-44":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"a704e0ac-22"}],"isExternal":true}},"env":{"rollup":"4.62.2"},"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.29",
3
+ "version": "1.0.30",
4
4
  "description": "Reactjs layer to use animations in a threejs environment",
5
5
  "author": "DAVI",
6
6
  "licence": "MIT",
@@ -22,7 +22,7 @@
22
22
  "build": "vite build"
23
23
  },
24
24
  "dependencies": {
25
- "@davi-ai/bodyengine-three": "1.0.18",
25
+ "@davi-ai/bodyengine-three": "1.0.19",
26
26
  "@davi-ai/web-speech-cognitive-services-davi": "^3.0.0",
27
27
  "@react-three/drei": "^10.0.0",
28
28
  "@react-three/fiber": "^9.0.0",