@davi-ai/react-bodyengine-three 1.0.17 → 1.0.20

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,23 +1,23 @@
1
- import v, { useState as D, useMemo as ye, useEffect as V, useRef as re, useCallback as Ye, Suspense as Xe } from "react";
1
+ import v, { useState as D, useMemo as ye, useEffect as N, useRef as re, useCallback as Ye, Suspense as Xe } from "react";
2
2
  import * as T from "three/webgpu";
3
3
  import { Vector3 as $e, TempNode as et, NodeUpdateType as tt, Matrix4 as $, Vector2 as ge, RenderTarget as be, DepthTexture as we, HalfFloatType as Me, NodeMaterial as st, RendererUtils as Te, Color as rt, QuadMesh as at, FloatType as nt } from "three/webgpu";
4
4
  import { Object3D as $s } from "three/webgpu";
5
5
  import { CharacterState as G, CreationTool as ee, AvaturnLoader as ot, AvatarSDKLoader as it, CC3Loader as ct, Character as he } from "@davi-ai/bodyengine-three";
6
6
  import { CharacterState as tr, CreationTool as sr, bmlTags as rr, emotionList as ar } from "@davi-ai/bodyengine-three";
7
7
  import { useDetectGPU as lt, AdaptiveDpr as ht, PerspectiveCamera as dt, CameraControls as ut, Environment as mt } from "@react-three/drei";
8
- import { convertToTexture as pt, uniform as Q, passTexture as gt, texture as Ae, velocity as fe, struct as ft, Fn as te, float as Y, vec2 as de, If as ke, vec4 as se, max as oe, ivec2 as yt, luminance as Ce, add as Oe, uv as St, mix as _e, logarithmicDepthToViewZ as xt, viewZToPerspectiveDepth as Pe, getViewPosition as vt, viewZToOrthographicDepth as bt, pass as wt, mrt as Ne, diffuseColor as Mt, output as Ve, directionToColor as Tt, normalView as At, sample as kt, colorToDirection as Ct } from "three/tsl";
8
+ import { convertToTexture as pt, uniform as Y, passTexture as gt, texture as Ae, velocity as fe, struct as ft, Fn as te, float as X, vec2 as de, If as ke, vec4 as se, max as oe, ivec2 as yt, luminance as Ce, add as Oe, uv as St, mix as _e, logarithmicDepthToViewZ as xt, viewZToPerspectiveDepth as Pe, getViewPosition as vt, viewZToOrthographicDepth as bt, pass as wt, mrt as Ne, diffuseColor as Mt, output as Ve, directionToColor as Tt, normalView as At, sample as kt, colorToDirection as Ct } from "three/tsl";
9
9
  import { ssgi as _t } from "three/addons/tsl/display/SSGINode.js";
10
10
  import { Canvas as Pt, useThree as Nt, useFrame as He } from "@react-three/fiber";
11
11
  import { createSpeechSynthesisPonyfill as Vt, SpeechSynthesisUtterance as It } from "@davi-ai/web-speech-cognitive-services-davi";
12
12
  const Ie = (e) => {
13
13
  let t;
14
- const s = /* @__PURE__ */ new Set(), r = (c, g) => {
15
- const u = typeof c == "function" ? c(t) : c;
16
- if (!Object.is(u, t)) {
17
- const M = t;
18
- t = g ?? (typeof u != "object" || u === null) ? u : Object.assign({}, t, u), s.forEach((o) => o(t, M));
14
+ const s = /* @__PURE__ */ new Set(), r = (h, p) => {
15
+ const g = typeof h == "function" ? h(t) : h;
16
+ if (!Object.is(g, t)) {
17
+ const w = t;
18
+ t = p ?? (typeof g != "object" || g === null) ? g : Object.assign({}, t, g), s.forEach((i) => i(t, w));
19
19
  }
20
- }, i = () => t, b = { setState: r, getState: i, getInitialState: () => x, subscribe: (c) => (s.add(c), () => s.delete(c)) }, x = t = e(r, i, b);
20
+ }, o = () => t, b = { setState: r, getState: o, getInitialState: () => x, subscribe: (h) => (s.add(h), () => s.delete(h)) }, x = t = e(r, o, b);
21
21
  return b;
22
22
  }, Ft = (e) => e ? Ie(e) : Ie, Rt = (e) => e;
23
23
  function Bt(e, t = Rt) {
@@ -138,7 +138,7 @@ const zt = (e) => {
138
138
  s == null || s.playAnimation(e);
139
139
  }
140
140
  };
141
- var F = /* @__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))(F || {}), q = /* @__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))(q || {}), B = /* @__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))(B || {}), le = /* @__PURE__ */ ((e) => (e.cc3 = "CC_Base_Body", e.avatarsdk = "AvatarBody", e.avaturn = "Body_Mesh", e))(le || {}), Se = /* @__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))(Se || {});
141
+ var F = /* @__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))(F || {}), q = /* @__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))(q || {}), R = /* @__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))(R || {}), le = /* @__PURE__ */ ((e) => (e.cc3 = "CC_Base_Body", e.avatarsdk = "AvatarBody", e.avaturn = "Body_Mesh", e))(le || {}), Se = /* @__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))(Se || {});
142
142
  const De = /* @__PURE__ */ new Map([
143
143
  [0, "sil"],
144
144
  [1, "aa"],
@@ -254,35 +254,35 @@ const De = /* @__PURE__ */ new Map([
254
254
  ["m", 21]
255
255
  ]), Yt = {
256
256
  position: F.mouth,
257
- distance: B.farther,
257
+ distance: R.farther,
258
258
  lookAt: F.lowerbelly
259
259
  }, Xt = {
260
260
  position: F.mouth,
261
- distance: B.close,
261
+ distance: R.close,
262
262
  lookAt: F.mouth
263
263
  }, $t = {
264
264
  position: F.mouth,
265
- distance: B.midclose,
265
+ distance: R.midclose,
266
266
  lookAt: F.mouth
267
267
  }, es = {
268
268
  position: F.neck,
269
- distance: B.close,
269
+ distance: R.close,
270
270
  lookAt: F.neck
271
271
  }, ts = {
272
272
  position: F.eye,
273
- distance: B.medium,
273
+ distance: R.medium,
274
274
  lookAt: F.neck
275
275
  }, ss = {
276
276
  position: F.eye,
277
- distance: B.medium,
277
+ distance: R.medium,
278
278
  lookAt: F.clavicle
279
279
  }, rs = {
280
280
  position: F.eye,
281
- distance: B.midfar,
281
+ distance: R.midfar,
282
282
  lookAt: F.belly
283
283
  }, as = {
284
284
  position: F.eye,
285
- distance: B.far,
285
+ distance: R.far,
286
286
  lookAt: F.lowerbelly
287
287
  }, js = {
288
288
  default: Yt,
@@ -356,37 +356,37 @@ const De = /* @__PURE__ */ new Map([
356
356
  e !== k.getState().useBlendshapeManager && (qe(), Ge(), k.setState({ useBlendshapeManager: e }));
357
357
  }, ds = (e, t, s) => {
358
358
  let r = s[e.position || F.eye].getComponent(0);
359
- const i = s[e.position || F.mouth].getComponent(1);
359
+ const o = s[e.position || F.mouth].getComponent(1);
360
360
  let n = 0;
361
- const p = typeof e.distance == "string" ? parseInt(e.distance) : e.distance, b = typeof e.rotation == "string" ? parseInt(e.rotation) : e.rotation;
362
- switch (p) {
363
- case B.veryclose:
361
+ const f = typeof e.distance == "string" ? parseInt(e.distance) : e.distance, b = typeof e.rotation == "string" ? parseInt(e.rotation) : e.rotation;
362
+ switch (f) {
363
+ case R.veryclose:
364
364
  n = t.veryclose;
365
365
  break;
366
- case B.closer:
366
+ case R.closer:
367
367
  n = t.closer;
368
368
  break;
369
- case B.close:
369
+ case R.close:
370
370
  n = t.close;
371
371
  break;
372
- case B.midclose:
372
+ case R.midclose:
373
373
  n = t.midclose;
374
374
  break;
375
- case B.medium:
375
+ case R.medium:
376
376
  n = t.medium;
377
377
  break;
378
- case B.midfar:
378
+ case R.midfar:
379
379
  n = t.midfar;
380
380
  break;
381
- case B.far:
381
+ case R.far:
382
382
  n = t.far;
383
383
  break;
384
- case B.farther:
384
+ case R.farther:
385
385
  case void 0:
386
386
  default:
387
387
  n = t.farther;
388
388
  break;
389
- case B.veryfar:
389
+ case R.veryfar:
390
390
  n = t.veryfar;
391
391
  break;
392
392
  }
@@ -421,54 +421,54 @@ const De = /* @__PURE__ */ new Map([
421
421
  r = r + n, n = s.eye.getComponent(2);
422
422
  break;
423
423
  }
424
- return new T.Vector3(r, i, n);
424
+ return new T.Vector3(r, o, n);
425
425
  }, me = /* @__PURE__ */ new at(), Ee = /* @__PURE__ */ new ge();
426
426
  let pe;
427
427
  function Je(e) {
428
428
  const t = [];
429
429
  let s, r;
430
- function i(c) {
431
- s = new Array(c).fill(!1), r = new Array(c).fill(!1);
430
+ function o(h) {
431
+ s = new Array(h).fill(!1), r = new Array(h).fill(!1);
432
432
  }
433
433
  let n = 12345;
434
- function p() {
434
+ function f() {
435
435
  return n = n * 1664525 + 1013904223 & 4294967295, (n >>> 0) / 4294967296;
436
436
  }
437
- function b(c, g) {
438
- const u = g;
439
- let M;
440
- if (u <= s.length) {
441
- const h = [];
442
- for (let l = 0; l < u; l++)
443
- s[l] || h.push(l);
444
- M = h[Math.floor(p() * h.length)];
437
+ function b(h, p) {
438
+ const g = p;
439
+ let w;
440
+ if (g <= s.length) {
441
+ const d = [];
442
+ for (let c = 0; c < g; c++)
443
+ s[c] || d.push(c);
444
+ w = d[Math.floor(f() * d.length)];
445
445
  } else
446
- M = Math.floor(p() * u);
447
- let o;
448
- if (u <= r.length) {
449
- const h = [];
450
- for (let l = 0; l < u; l++)
451
- r[l] || h.push(l);
452
- o = h[Math.floor(p() * h.length)];
446
+ w = Math.floor(f() * g);
447
+ let i;
448
+ if (g <= r.length) {
449
+ const d = [];
450
+ for (let c = 0; c < g; c++)
451
+ r[c] || d.push(c);
452
+ i = d[Math.floor(f() * d.length)];
453
453
  } else
454
- o = Math.floor(p() * u);
455
- const d = (M + p()) / u, y = (o + p()) / u;
456
- return M < s.length && (s[M] = !0), o < r.length && (r[o] = !0), [d, y];
454
+ i = Math.floor(f() * g);
455
+ const l = (w + f()) / g, y = (i + f()) / g;
456
+ return w < s.length && (s[w] = !0), i < r.length && (r[i] = !0), [l, y];
457
457
  }
458
- i(1), t.push([p(), p()]), s[0] = !0, r[0] = !0;
458
+ o(1), t.push([f(), f()]), s[0] = !0, r[0] = !0;
459
459
  let x = 1;
460
460
  for (; x < e; ) {
461
- const c = x * 2;
462
- i(c);
463
- for (let g = 0; g < x; g++) {
464
- const [u, M] = t[g], o = Math.min(Math.floor(u * c), c - 1), d = Math.min(Math.floor(M * c), c - 1);
465
- o < s.length && (s[o] = !0), d < r.length && (r[d] = !0);
461
+ const h = x * 2;
462
+ o(h);
463
+ for (let p = 0; p < x; p++) {
464
+ const [g, w] = t[p], i = Math.min(Math.floor(g * h), h - 1), l = Math.min(Math.floor(w * h), h - 1);
465
+ i < s.length && (s[i] = !0), l < r.length && (r[l] = !0);
466
466
  }
467
- for (let g = 0; g < x; g++) {
468
- const u = b(g, c);
469
- t.push(u);
467
+ for (let p = 0; p < x; p++) {
468
+ const g = b(p, h);
469
+ t.push(g);
470
470
  }
471
- x = c;
471
+ x = h;
472
472
  }
473
473
  return t.slice(0, e);
474
474
  }
@@ -477,8 +477,8 @@ class us extends et {
477
477
  static get type() {
478
478
  return "PMJTAANode";
479
479
  }
480
- constructor(t, s, r, i) {
481
- super("vec4"), this.isPMJTAANode = !0, this.updateBeforeType = tt.FRAME, this.beautyNode = t, this.depthNode = s, this.velocityNode = r, this.camera = i, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this.jitterIntensity = 0.25, this.useProgressiveAccumulation = !1, this._accumulatedFrames = 0, this.maxAccumulationFrames = 256, this._prevCameraMatrix = new $(), this._progressiveWeight = Q(0), this._jitterIndex = 0, this._sampleCount = 64, this._sequenceLength = Ue.length, this._sequence = Ue, this._invSize = Q(new ge()), this._historyRenderTarget = new be(1, 1, { depthBuffer: !1, type: Me, depthTexture: new we() }), this._historyRenderTarget.texture.name = "PMJTAANode.history", this._resolveRenderTarget = new be(1, 1, { depthBuffer: !1, type: Me }), this._resolveRenderTarget.texture.name = "PMJTAANode.resolve", this._resolveMaterial = new st(), this._resolveMaterial.name = "PMJTAA.resolve", this._textureNode = gt(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new $(), this._cameraNearFar = Q(new ge()), this._cameraWorldMatrix = Q(new $()), this._cameraWorldMatrixInverse = Q(new $()), this._cameraProjectionMatrixInverse = Q(new $()), this._previousCameraWorldMatrix = Q(new $()), this._previousCameraProjectionMatrixInverse = Q(new $()), this._previousDepthNode = Ae(new we(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
480
+ constructor(t, s, r, o) {
481
+ super("vec4"), this.isPMJTAANode = !0, this.updateBeforeType = tt.FRAME, this.beautyNode = t, this.depthNode = s, this.velocityNode = r, this.camera = o, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this.jitterIntensity = 1, this.useProgressiveAccumulation = !1, this._accumulatedFrames = 0, this.maxAccumulationFrames = 256, this._prevCameraMatrix = new $(), this._progressiveWeight = Y(0), this._jitterIndex = 0, this._sampleCount = 64, this._sequenceLength = Ue.length, this._sequence = Ue, this._invSize = Y(new ge()), this._historyRenderTarget = new be(1, 1, { depthBuffer: !1, type: Me, depthTexture: new we() }), this._historyRenderTarget.texture.name = "PMJTAANode.history", this._resolveRenderTarget = new be(1, 1, { depthBuffer: !1, type: Me }), this._resolveRenderTarget.texture.name = "PMJTAANode.resolve", this._resolveMaterial = new st(), this._resolveMaterial.name = "PMJTAA.resolve", this._textureNode = gt(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new $(), this._cameraNearFar = Y(new ge()), this._cameraWorldMatrix = Y(new $()), this._cameraWorldMatrixInverse = Y(new $()), this._cameraProjectionMatrixInverse = Y(new $()), this._previousCameraWorldMatrix = Y(new $()), this._previousCameraProjectionMatrixInverse = Y(new $()), this._previousDepthNode = Ae(new we(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
482
482
  }
483
483
  getTextureNode() {
484
484
  return this._textureNode;
@@ -498,12 +498,12 @@ class us extends et {
498
498
  offsetY: 0,
499
499
  width: t,
500
500
  height: s
501
- }, i = this._sequence[this._jitterIndex];
501
+ }, o = this._sequence[this._jitterIndex];
502
502
  this.camera.setViewOffset(
503
503
  r.fullWidth,
504
504
  r.fullHeight,
505
- r.offsetX + (i[0] - 0.5) * this.jitterIntensity,
506
- r.offsetY + (i[1] - 0.5) * this.jitterIntensity,
505
+ r.offsetX + (o[0] - 0.5) * this.jitterIntensity,
506
+ r.offsetY + (o[1] - 0.5) * this.jitterIntensity,
507
507
  r.width,
508
508
  r.height
509
509
  );
@@ -532,69 +532,69 @@ class us extends et {
532
532
  }
533
533
  updateBefore(t) {
534
534
  const { renderer: s } = t, r = this.camera.matrixWorld;
535
- let i = !1;
535
+ let o = !1;
536
536
  if (this.useProgressiveAccumulation) {
537
- const g = r.elements, u = this._prevCameraMatrix.elements;
538
- for (let o = 0; o < 16; o++)
539
- if (Math.abs(g[o] - u[o]) > 1e-6) {
540
- i = !0;
537
+ const p = r.elements, g = this._prevCameraMatrix.elements;
538
+ for (let i = 0; i < 16; i++)
539
+ if (Math.abs(p[i] - g[i]) > 1e-6) {
540
+ o = !0;
541
541
  break;
542
542
  }
543
- i && (this._accumulatedFrames = 0), this._accumulatedFrames++;
544
- const M = Math.min(this._accumulatedFrames, this.maxAccumulationFrames);
545
- this._progressiveWeight.value = i ? 0 : 1 / M, this._prevCameraMatrix.copy(r);
543
+ o && (this._accumulatedFrames = 0), this._accumulatedFrames++;
544
+ const w = Math.min(this._accumulatedFrames, this.maxAccumulationFrames);
545
+ this._progressiveWeight.value = o ? 0 : 1 / w, this._prevCameraMatrix.copy(r);
546
546
  } else
547
547
  this._progressiveWeight.value = 0, this._accumulatedFrames = 0;
548
548
  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);
549
- const n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, p = n.texture.width, b = n.texture.height;
550
- this._needsPostProcessingSync === !0 && (this.setViewOffset(p, b), this._needsPostProcessingSync = !1), pe = Te.resetRendererState(s, pe), s.setClearColor(new rt(0), 0);
551
- const x = this._historyRenderTarget.width !== p || this._historyRenderTarget.height !== b;
552
- this.setSize(p, b), x === !0 && (s.initRenderTarget(this._historyRenderTarget), s.initRenderTarget(this._resolveRenderTarget), s.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), s.setRenderTarget(this._resolveRenderTarget), me.material = this._resolveMaterial, me.name = "PMJTAA", me.render(s), s.setRenderTarget(null), s.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
553
- const c = s.getDrawingBufferSize(Ee);
554
- if (this._historyRenderTarget.height === c.height && this._historyRenderTarget.width === c.width) {
555
- const g = this.depthNode.value;
556
- s.copyTextureToTexture(g, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
549
+ const n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, f = n.texture.width, b = n.texture.height;
550
+ this._needsPostProcessingSync === !0 && (this.setViewOffset(f, b), this._needsPostProcessingSync = !1), pe = Te.resetRendererState(s, pe), s.setClearColor(new rt(0), 0);
551
+ const x = this._historyRenderTarget.width !== f || this._historyRenderTarget.height !== b;
552
+ this.setSize(f, b), x === !0 && (s.initRenderTarget(this._historyRenderTarget), s.initRenderTarget(this._resolveRenderTarget), s.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), s.setRenderTarget(this._resolveRenderTarget), me.material = this._resolveMaterial, me.name = "PMJTAA", me.render(s), s.setRenderTarget(null), s.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
553
+ const h = s.getDrawingBufferSize(Ee);
554
+ if (this._historyRenderTarget.height === h.height && this._historyRenderTarget.width === h.width) {
555
+ const p = this.depthNode.value;
556
+ s.copyTextureToTexture(p, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
557
557
  }
558
558
  Te.restoreRendererState(s, pe);
559
559
  }
560
560
  setup(t) {
561
561
  const s = t.context.renderPipeline;
562
562
  s && (this._needsPostProcessingSync = !0, s.context.onBeforeRenderPipeline = () => {
563
- const o = t.renderer.getDrawingBufferSize(Ee);
564
- this.setViewOffset(o.width, o.height);
563
+ const i = t.renderer.getDrawingBufferSize(Ee);
564
+ this.setViewOffset(i.width, i.height);
565
565
  }, s.context.onAfterRenderPipeline = () => {
566
566
  this.clearViewOffset();
567
567
  }), t.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = nt), t.context.velocity !== void 0 ? this._velocityNode = t.context.velocity : this._velocityNode = fe;
568
- const r = (o) => {
569
- const { x: d, y } = this._cameraNearFar, h = xt(o, d, y);
570
- return Pe(h, d, y);
571
- }, i = ft({
568
+ const r = (i) => {
569
+ const { x: l, y } = this._cameraNearFar, d = xt(i, l, y);
570
+ return Pe(d, l, y);
571
+ }, o = ft({
572
572
  closestDepth: "float",
573
573
  closestPositionTexel: "vec2",
574
574
  farthestDepth: "float"
575
- }), n = te(([o]) => {
576
- const d = Y(2).toVar(), y = de(0).toVar(), h = Y(-1).toVar();
577
- for (let l = -1; l <= 1; ++l)
575
+ }), n = te(([i]) => {
576
+ const l = X(2).toVar(), y = de(0).toVar(), d = X(-1).toVar();
577
+ for (let c = -1; c <= 1; ++c)
578
578
  for (let a = -1; a <= 1; ++a) {
579
- const S = o.add(de(l, a)).toVar();
579
+ const S = i.add(de(c, a)).toVar();
580
580
  let m = this.depthNode.load(S).r;
581
- t.renderer.reversedDepthBuffer && (m = m.oneMinus()), t.renderer.logarithmicDepthBuffer && (m = r(m)), m = m.toVar(), ke(m.lessThan(d), () => {
582
- d.assign(m), y.assign(S);
583
- }), ke(m.greaterThan(h), () => {
584
- h.assign(m);
581
+ t.renderer.reversedDepthBuffer && (m = m.oneMinus()), t.renderer.logarithmicDepthBuffer && (m = r(m)), m = m.toVar(), ke(m.lessThan(l), () => {
582
+ l.assign(m), y.assign(S);
583
+ }), ke(m.greaterThan(d), () => {
584
+ d.assign(m);
585
585
  });
586
586
  }
587
- return i(d, y, h);
588
- }), p = (o) => {
589
- let d = this._previousDepthNode.sample(o).r;
590
- t.renderer.logarithmicDepthBuffer && (d = r(d));
591
- const y = vt(o, d, this._previousCameraProjectionMatrixInverse), h = this._previousCameraWorldMatrix.mul(se(y, 1)).xyz, l = this._cameraWorldMatrixInverse.mul(se(h, 1)).z;
592
- return this.camera.isOrthographicCamera ? bt(l, this._cameraNearFar.x, this._cameraNearFar.y) : Pe(l, this._cameraNearFar.x, this._cameraNearFar.y);
593
- }, b = te(([o, d, y, h]) => {
594
- const l = h.rgb.add(y.rgb).mul(0.5), a = h.rgb.sub(y.rgb).mul(0.5).add(1e-7), S = d.sub(se(l, o.a)), P = S.xyz.div(a).abs(), _ = oe(P.x, P.y, P.z);
595
- return _.greaterThan(1).select(
596
- se(l, o.a).add(S.div(_)),
597
- d
587
+ return o(l, y, d);
588
+ }), f = (i) => {
589
+ let l = this._previousDepthNode.sample(i).r;
590
+ t.renderer.logarithmicDepthBuffer && (l = r(l));
591
+ const y = vt(i, l, this._previousCameraProjectionMatrixInverse), d = this._previousCameraWorldMatrix.mul(se(y, 1)).xyz, c = this._cameraWorldMatrixInverse.mul(se(d, 1)).z;
592
+ return this.camera.isOrthographicCamera ? bt(c, this._cameraNearFar.x, this._cameraNearFar.y) : Pe(c, this._cameraNearFar.x, this._cameraNearFar.y);
593
+ }, b = te(([i, l, y, d]) => {
594
+ const c = d.rgb.add(y.rgb).mul(0.5), a = d.rgb.sub(y.rgb).mul(0.5).add(1e-7), S = l.sub(se(c, i.a)), _ = S.xyz.div(a).abs(), B = oe(_.x, _.y, _.z);
595
+ return B.greaterThan(1).select(
596
+ se(c, i.a).add(S.div(B)),
597
+ l
598
598
  );
599
599
  }).setLayout({
600
600
  name: "clipAABB",
@@ -605,8 +605,8 @@ class us extends et {
605
605
  { name: "minColor", type: "vec4" },
606
606
  { name: "maxColor", type: "vec4" }
607
607
  ]
608
- }), x = te(([o, d, y, h]) => {
609
- const l = [
608
+ }), x = te(([i, l, y, d]) => {
609
+ const c = [
610
610
  [-1, -1],
611
611
  [-1, 1],
612
612
  [1, -1],
@@ -615,16 +615,16 @@ class us extends et {
615
615
  [0, -1],
616
616
  [0, 1],
617
617
  [-1, 0]
618
- ], a = d.toVar(), S = d.pow2().toVar();
619
- for (const [L, O] of l) {
620
- const R = this.beautyNode.offset(yt(L, O)).load(o).max(0);
621
- a.addAssign(R), S.addAssign(R.pow2());
618
+ ], a = l.toVar(), S = l.pow2().toVar();
619
+ for (const [L, W] of c) {
620
+ const V = this.beautyNode.offset(yt(L, W)).load(i).max(0);
621
+ a.addAssign(V), S.addAssign(V.pow2());
622
622
  }
623
- const m = Y(l.length + 1), P = a.div(m), _ = S.div(m).sub(P.pow2()).max(0).sqrt().mul(h), f = P.sub(_), w = P.add(_);
624
- return b(P.clamp(f, w), y, f, w);
625
- }), c = te(([o, d]) => {
626
- const h = o.mul(d).fract().abs(), l = oe(h, h.oneMinus());
627
- return l.x.mul(l.y).oneMinus().div(0.75);
623
+ const m = X(c.length + 1), _ = a.div(m), B = S.div(m).sub(_.pow2()).max(0).sqrt().mul(d), u = _.sub(B), M = _.add(B);
624
+ return b(_.clamp(u, M), y, u, M);
625
+ }), h = te(([i, l]) => {
626
+ const d = i.mul(l).fract().abs(), c = oe(d, d.oneMinus());
627
+ return c.x.mul(c.y).oneMinus().div(0.75);
628
628
  }).setLayout({
629
629
  name: "subpixelCorrection",
630
630
  type: "float",
@@ -632,52 +632,52 @@ class us extends et {
632
632
  { name: "velocityUV", type: "vec2" },
633
633
  { name: "textureSize", type: "ivec2" }
634
634
  ]
635
- }), g = te(([o, d, y]) => {
636
- const h = y.oneMinus(), l = o.mul(Y(1).div(oe(o.r, o.g, o.b).add(1))), a = d.mul(Y(1).div(oe(d.r, d.g, d.b).add(1))), S = Ce(l.rgb), m = Ce(a.rgb);
637
- return y.mulAssign(Y(1).div(S.add(1))), h.mulAssign(Y(1).div(m.add(1))), Oe(o.mul(y), d.mul(h)).div(oe(y.add(h), 1e-5)).toVar();
638
- }), u = Ae(this._historyRenderTarget.texture), M = te(() => {
639
- const o = St(), d = this.beautyNode.size(), y = o.mul(d), h = n(y), l = h.get("closestDepth"), a = h.get("closestPositionTexel"), S = h.get("farthestDepth"), m = this.velocityNode.load(a).xy.mul(de(0.5, -0.5)), P = o.sub(m), _ = p(P), f = P.greaterThanEqual(0).all().and(P.lessThanEqual(1).all()), w = S.sub(l).greaterThan(this.edgeDepthDiff), L = l.sub(_).greaterThan(this.depthThreshold), O = f.and(w.or(L.not())), R = this.beautyNode.sample(o), X = u.sample(o.sub(m)), ce = o.sub(P).mul(d).length().div(this.maxVelocityLength).saturate().sqrt(), J = Y(0.05).toVar();
640
- this.useSubpixelCorrection && J.addAssign(c(m, d).mul(0.25)), J.assign(O.select(J.add(ce.mul(0.6)).saturate(), 1));
641
- const N = this._progressiveWeight, C = N.greaterThan(0).and(O);
642
- J.assign(C.select(N, J));
635
+ }), p = te(([i, l, y]) => {
636
+ const d = y.oneMinus(), c = i.mul(X(1).div(oe(i.r, i.g, i.b).add(1))), a = l.mul(X(1).div(oe(l.r, l.g, l.b).add(1))), S = Ce(c.rgb), m = Ce(a.rgb);
637
+ return y.mulAssign(X(1).div(S.add(1))), d.mulAssign(X(1).div(m.add(1))), Oe(i.mul(y), l.mul(d)).div(oe(y.add(d), 1e-5)).toVar();
638
+ }), g = Ae(this._historyRenderTarget.texture), w = te(() => {
639
+ const i = St(), l = this.beautyNode.size(), y = i.mul(l), d = n(y), c = d.get("closestDepth"), a = d.get("closestPositionTexel"), S = d.get("farthestDepth"), m = this.velocityNode.load(a).xy.mul(de(0.5, -0.5)), _ = i.sub(m), B = f(_), u = _.greaterThanEqual(0).all().and(_.lessThanEqual(1).all()), M = S.sub(c).greaterThan(this.edgeDepthDiff), L = c.sub(B).greaterThan(this.depthThreshold), W = u.and(M.or(L.not())), V = this.beautyNode.sample(i), J = g.sample(i.sub(m)), ce = i.sub(_).mul(l).length().div(this.maxVelocityLength).saturate().sqrt(), K = X(0.05).toVar();
640
+ this.useSubpixelCorrection && K.addAssign(h(m, l).mul(0.5)), K.assign(W.select(K.add(ce.mul(0.6)).saturate(), 1));
641
+ const P = this._progressiveWeight, C = P.greaterThan(0).and(W);
642
+ K.assign(C.select(P, K));
643
643
  const I = _e(0.25, 1.25, ce.oneMinus().pow2()), U = C.select(
644
- X,
645
- x(y, R, X, I)
646
- ), K = C.select(
647
- _e(U, R, J),
648
- g(R, U, J)
644
+ J,
645
+ x(y, V, J, I)
646
+ ), Z = C.select(
647
+ _e(U, V, K),
648
+ p(V, U, K)
649
649
  );
650
- return se(K.rgb.mul(K.a), K.a);
650
+ return se(Z.rgb.mul(Z.a), Z.a);
651
651
  });
652
- return this._resolveMaterial.fragmentNode = M(), this._textureNode;
652
+ return this._resolveMaterial.fragmentNode = w(), this._textureNode;
653
653
  }
654
654
  dispose() {
655
655
  this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
656
656
  }
657
657
  }
658
658
  const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
659
- const e = A((a) => a.animationsLoaded), t = A((a) => a.characterState), s = A((a) => a.lipSyncManager), r = A((a) => a.blendshapeManager), i = k((a) => a.credentials), n = k((a) => a.currentUtterance), p = k((a) => a.textToSpeak), b = k((a) => a.visemes), x = k((a) => a.blendshapes), c = k((a) => a.visemeIntensity), g = k((a) => a.currentVisemeIndex), u = k((a) => a.currentBlendshapeIndex), M = k((a) => a.useBlendshapeManager), [o, d] = D(!1), [y, h] = D(!1), l = ye(() => i != null && i.region && (i.subscriptionKey || i.token) ? Vt({
659
+ const e = A((a) => a.animationsLoaded), t = A((a) => a.characterState), s = A((a) => a.lipSyncManager), r = A((a) => a.blendshapeManager), o = k((a) => a.credentials), n = k((a) => a.currentUtterance), f = k((a) => a.textToSpeak), b = k((a) => a.visemes), x = k((a) => a.blendshapes), h = k((a) => a.visemeIntensity), p = k((a) => a.currentVisemeIndex), g = k((a) => a.currentBlendshapeIndex), w = k((a) => a.useBlendshapeManager), [i, l] = D(!1), [y, d] = D(!1), c = ye(() => o != null && o.region && (o.subscriptionKey || o.token) ? Vt({
660
660
  credentials: {
661
- region: i.region,
662
- authorizationToken: i.token,
663
- subscriptionKey: i.subscriptionKey
661
+ region: o.region,
662
+ authorizationToken: o.token,
663
+ subscriptionKey: o.subscriptionKey
664
664
  }
665
- }) : null, [i]);
666
- return V(() => {
667
- if (l) {
668
- const a = l.speechSynthesis.getVoices();
669
- a && Array.isArray(a) && a.length ? (je(a), d(!0)) : l.speechSynthesis.onvoiceschanged = () => {
670
- je(l.speechSynthesis.getVoices()), d(!0);
665
+ }) : null, [o]);
666
+ return N(() => {
667
+ if (c) {
668
+ const a = c.speechSynthesis.getVoices();
669
+ a && Array.isArray(a) && a.length ? (je(a), l(!0)) : c.speechSynthesis.onvoiceschanged = () => {
670
+ je(c.speechSynthesis.getVoices()), l(!0);
671
671
  };
672
672
  }
673
- }, [l]), V(() => {
674
- o && (M ? !!r : !!s) && e && h(!0);
675
- }, [o, s, r, e, M]), V(() => {
676
- if (p) {
677
- const a = new It(p);
673
+ }, [c]), N(() => {
674
+ i && (w ? !!r : !!s) && e && d(!0);
675
+ }, [i, s, r, e, w]), N(() => {
676
+ if (f) {
677
+ const a = new It(f);
678
678
  os(a);
679
679
  }
680
- }, [p]), V(() => {
680
+ }, [f]), N(() => {
681
681
  var a, S;
682
682
  n && y ? (n.onstart = () => {
683
683
  console.log("Start"), Re(G.speaking);
@@ -686,12 +686,12 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
686
686
  }, n.onboundary = () => {
687
687
  }, n.onviseme = (m) => {
688
688
  We(m);
689
- }, (a = l == null ? void 0 : l.speechSynthesis) == null || a.speak(n, null)) : (S = l == null ? void 0 : l.speechSynthesis) == null || S.cancel();
690
- }, [n]), V(() => {
691
- s && (s.visemeIntensity = c);
692
- }, [c]), V(() => {
693
- if (!M && s && t === G.speaking) {
694
- if (!s.isStarted && s.start(), b.length > 1 && g === 0)
689
+ }, (a = c == null ? void 0 : c.speechSynthesis) == null || a.speak(n, null)) : (S = c == null ? void 0 : c.speechSynthesis) == null || S.cancel();
690
+ }, [n]), N(() => {
691
+ s && (s.visemeIntensity = h);
692
+ }, [h]), N(() => {
693
+ if (!w && s && t === G.speaking) {
694
+ if (!s.isStarted && s.start(), b.length > 1 && p === 0)
695
695
  b.forEach((a) => {
696
696
  const S = parseInt(a.name);
697
697
  if (!isNaN(S)) {
@@ -700,170 +700,172 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
700
700
  }
701
701
  });
702
702
  else
703
- for (let a = g + 1; a < b.length; a++) {
703
+ for (let a = p + 1; a < b.length; a++) {
704
704
  const S = b[a], m = parseInt(S.name);
705
705
  if (!isNaN(m)) {
706
- const P = De.get(m);
707
- P && s.PlayVisemeAsync(P, S.elapsedTime / 1e4);
706
+ const _ = De.get(m);
707
+ _ && s.PlayVisemeAsync(_, S.elapsedTime / 1e4);
708
708
  }
709
709
  }
710
710
  is(b.length - 1);
711
711
  }
712
- }, [t, b, s, M]), V(() => {
713
- if (M && r && t === G.speaking) {
714
- if (!r.isStarted && r.start(), x.length > 1 && u === 0)
712
+ }, [t, b, s, w]), N(() => {
713
+ if (w && r && t === G.speaking) {
714
+ if (!r.isStarted && r.start(), x.length > 1 && g === 0)
715
715
  x.forEach((a) => {
716
716
  r.PlayBlendShapeAsync(a);
717
717
  });
718
718
  else
719
- for (let a = u + 1; a < x.length; a++) {
719
+ for (let a = g + 1; a < x.length; a++) {
720
720
  const S = x[a];
721
721
  r.PlayBlendShapeAsync(S);
722
722
  }
723
723
  cs(x.length - 1);
724
724
  }
725
- }, [t, x, r, M]), V(() => {
725
+ }, [t, x, r, w]), N(() => {
726
726
  t !== G.speaking && (qe(), Ge());
727
727
  }, [t]), null;
728
728
  }, ps = ({ points: e, color: t = "red" }) => {
729
729
  const s = ye(() => {
730
- const r = new T.BufferGeometry().setFromPoints(e), i = new T.LineBasicMaterial({ color: t, toneMapped: !1 });
731
- return new T.Line(r, i);
730
+ const r = new T.BufferGeometry().setFromPoints(e), o = new T.LineBasicMaterial({ color: t, toneMapped: !1 });
731
+ return new T.Line(r, o);
732
732
  }, [e, t]);
733
733
  return /* @__PURE__ */ v.createElement("primitive", { object: s });
734
734
  }, gs = ({ parentGpuTier: e, setIsGpuAvailable: t, children: s, tonemapping: r }) => {
735
- const i = z((f) => f.cameraPosition), n = z((f) => f.lookAt), p = z((f) => f.movable), b = E((f) => f.targets), x = E((f) => f.showFirstTarget), [c] = D(e || lt()), [g, u] = D(), [M, o] = D(null), [d, y] = D(void 0), h = re(null), l = re(null), a = re(null), S = (f) => {
736
- f.preventDefault(), f.stopPropagation();
735
+ const o = z((u) => u.cameraPosition), n = z((u) => u.lookAt), f = z((u) => u.movable), b = E((u) => u.targets), x = E((u) => u.showFirstTarget), [h] = D(e || lt()), [p, g] = D(), [w, i] = D(null), [l, y] = D(void 0), d = re(null), c = re(null), a = re(null), S = (u) => {
736
+ u.preventDefault(), u.stopPropagation();
737
737
  };
738
- V(() => {
739
- Et(l.current);
740
- }, [l.current]), V(() => {
741
- var f, w, L, O;
742
- if (p)
743
- M == null || M.abort(), o(null);
738
+ N(() => {
739
+ Et(c.current);
740
+ }, [c.current]), N(() => {
741
+ var u, M, L, W;
742
+ if (f)
743
+ w == null || w.abort(), i(null);
744
744
  else {
745
- const R = new AbortController();
746
- o(R), (f = h.current) == null || f.addEventListener("wheel", S, { passive: !1, signal: R.signal }), (w = h.current) == null || w.addEventListener("pointerdown", S, { passive: !1, signal: R.signal }), (L = h.current) == null || L.addEventListener("pointermove", S, { passive: !1, signal: R.signal }), (O = h.current) == null || O.addEventListener("click", S, { passive: !1, signal: R.signal });
745
+ const V = new AbortController();
746
+ i(V), (u = d.current) == null || u.addEventListener("wheel", S, { passive: !1, signal: V.signal }), (M = d.current) == null || M.addEventListener("pointerdown", S, { passive: !1, signal: V.signal }), (L = d.current) == null || L.addEventListener("pointermove", S, { passive: !1, signal: V.signal }), (W = d.current) == null || W.addEventListener("click", S, { passive: !1, signal: V.signal });
747
747
  }
748
- }, [p]), V(() => {
749
- a != null && a.current && n && i && a.current.setLookAt(i.x, i.y, i.z, n.x, n.y, n.z, !0);
750
- }, [i, n]), V(() => {
751
- if (c)
752
- if (c.type === "FALLBACK")
753
- u(
748
+ }, [f]), N(() => {
749
+ a != null && a.current && n && o && a.current.setLookAt(o.x, o.y, o.z, n.x, n.y, n.z, !0);
750
+ }, [o, n]), N(() => {
751
+ if (h)
752
+ if (h.type === "FALLBACK")
753
+ g(
754
754
  "medium"
755
755
  /* medium */
756
756
  );
757
757
  else
758
- switch (c.tier) {
758
+ switch (h.tier) {
759
759
  case 0:
760
760
  case 1:
761
- u(
761
+ g(
762
762
  "low"
763
763
  /* low */
764
764
  );
765
765
  break;
766
766
  case 2:
767
- u(
767
+ g(
768
768
  "medium"
769
769
  /* medium */
770
770
  );
771
771
  break;
772
772
  case 3:
773
- u(
773
+ g(
774
774
  "high"
775
775
  /* high */
776
776
  );
777
777
  break;
778
778
  default:
779
- u(
779
+ g(
780
780
  "low"
781
781
  /* low */
782
782
  );
783
783
  break;
784
784
  }
785
- }, [c]), V(() => {
786
- switch (g && (m.current = g), g) {
785
+ }, [h]), N(() => {
786
+ switch (p && (m.current = p), p) {
787
787
  case "low":
788
788
  console.warn("Retorik React-Bodyengine-Three > GPU tier too low, no rendering available"), t(!1);
789
789
  break;
790
790
  case "medium":
791
- y([0.8, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${g}`), t(!0);
791
+ y([1, 1.5]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${p}`), t(!0);
792
792
  break;
793
793
  case "high":
794
- y([1, 2]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${g}`), t(!0);
794
+ y([1, 2]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${p}`), t(!0);
795
795
  break;
796
796
  }
797
- }, [g]);
798
- const m = re(void 0), P = Ye(async (f) => {
799
- const w = new T.WebGPURenderer({
800
- canvas: f.canvas,
797
+ }, [p]);
798
+ const m = re(void 0), _ = Ye(async (u) => {
799
+ const M = new T.WebGPURenderer({
800
+ canvas: u.canvas,
801
801
  antialias: !1,
802
802
  alpha: !0,
803
803
  powerPreference: "high-performance"
804
804
  });
805
- return w.setClearColor(new T.Color("#000000"), 0), w.setPixelRatio(devicePixelRatio), w.shadowMap.type = T.PCFSoftShadowMap, await w.init(), w;
806
- }, []), _ = ye(() => {
805
+ return M.setClearColor(new T.Color("#000000"), 0), M.setPixelRatio(devicePixelRatio), M.shadowMap.type = T.PCFSoftShadowMap, await M.init(), M;
806
+ }, []), B = ye(() => {
807
807
  if (b.length) {
808
- const f = b[0], w = new T.Vector3(f.position.x - 0.5, f.position.y, f.position.z - 0.1), L = new T.Vector3(f.position.x + 0.5, f.position.y, f.position.z - 0.1);
809
- return [w, L];
810
- } else if (i) {
811
- const f = new T.Vector3(i.x - 0.5, i.y, i.z - 0.1), w = new T.Vector3(i.x + 0.5, i.y, i.z - 0.1);
812
- return [f, w];
808
+ const u = b[0], M = new T.Vector3(u.position.x - 0.5, u.position.y, u.position.z - 0.1), L = new T.Vector3(u.position.x + 0.5, u.position.y, u.position.z - 0.1);
809
+ return [M, L];
810
+ } else if (o) {
811
+ const u = new T.Vector3(o.x - 0.5, o.y, o.z - 0.1), M = new T.Vector3(o.x + 0.5, o.y, o.z - 0.1);
812
+ return [u, M];
813
813
  }
814
814
  return [];
815
- }, [b, i]);
816
- return d ? /* @__PURE__ */ v.createElement(Pt, { gl: P, dpr: d, ref: h, shadows: !0 }, /* @__PURE__ */ v.createElement(fs, { tonemapping: r, processedTier: g }), /* @__PURE__ */ v.createElement(ht, null), /* @__PURE__ */ v.createElement(ms, null), /* @__PURE__ */ v.createElement(dt, { ref: l, makeDefault: !0, fov: 28 }), /* @__PURE__ */ v.createElement(ut, { ref: a }), x && _.length && /* @__PURE__ */ v.createElement(ps, { points: _, color: "red" }), /* @__PURE__ */ v.createElement(Xe, { fallback: null }, s)) : /* @__PURE__ */ v.createElement(v.Fragment, null);
815
+ }, [b, o]);
816
+ return l ? /* @__PURE__ */ v.createElement(Pt, { gl: _, dpr: l, ref: d, shadows: !0 }, /* @__PURE__ */ v.createElement(fs, { tonemapping: r, processedTier: p }), /* @__PURE__ */ v.createElement(ht, null), /* @__PURE__ */ v.createElement(ms, null), /* @__PURE__ */ v.createElement(dt, { ref: c, makeDefault: !0, fov: 28 }), /* @__PURE__ */ v.createElement(ut, { ref: a }), x && B.length && /* @__PURE__ */ v.createElement(ps, { points: B, color: "red" }), /* @__PURE__ */ v.createElement(Xe, { fallback: null }, s)) : /* @__PURE__ */ v.createElement(v.Fragment, null);
817
817
  }, fs = ({ tonemapping: e, processedTier: t }) => {
818
- const { gl: s, scene: r, camera: i } = Nt(), [n] = D(new T.Vector3(-3, 2, 2)), [p] = D(new T.Vector3(0, 1, 0)), [b] = D(2), [x] = D(-1e-3), [c] = D(0.6), g = re(null), u = re(null);
819
- return V(() => {
820
- s && (s.shadowMap.type = T.PCFSoftShadowMap, s.toneMapping = e, t !== "low" ? r.environmentIntensity = c : r.environmentIntensity = 1);
821
- }, [s, e]), V(() => {
822
- r.environmentIntensity = c;
823
- }, [c]), V(() => {
824
- if (!s || !r || !i || !t) return;
818
+ const { gl: s, scene: r, camera: o, size: n } = Nt(), [f] = D(new T.Vector3(-3, 2, 2)), [b] = D(new T.Vector3(0, 1, 0)), [x] = D(2), [h] = D(-1e-3), [p] = D(0.6), g = re(null), w = re(null);
819
+ return N(() => {
820
+ s && (s.shadowMap.type = T.PCFSoftShadowMap, s.toneMapping = e, t !== "low" ? r.environmentIntensity = p : r.environmentIntensity = 1);
821
+ }, [s, e]), N(() => {
822
+ r.environmentIntensity = p;
823
+ }, [p]), N(() => {
824
+ if (!s || !r || !o || !t) return;
825
825
  r.background = null;
826
- const M = t === "high", o = wt(r, i);
827
- o.setMRT(
828
- M ? Ne({ output: Ve, diffuseColor: Mt, normal: Tt(At), velocity: fe }) : Ne({ output: Ve, velocity: fe })
826
+ const i = t === "high" || t === "medium", l = wt(r, o);
827
+ l.setMRT(
828
+ i ? Ne({ output: Ve, diffuseColor: Mt, normal: Tt(At), velocity: fe }) : Ne({ output: Ve, velocity: fe })
829
829
  );
830
- let d;
831
- if (M) {
832
- const h = o.getTextureNode("output"), l = o.getTextureNode("diffuseColor"), a = o.getTextureNode("depth"), S = o.getTextureNode("velocity"), m = o.getTextureNode("normal"), P = kt((R) => Ct(m.sample(R))), _ = _t(h, a, P, i);
833
- _.aoIntensity.value = 1, _.giIntensity.value = 5, _.sliceCount.value = 2, _.stepCount.value = 8, _.thickness.value = 0.03, _.radius.value = 0.5, _.expFactor.value = 0.1, _.backfaceLighting.value = 0.1;
834
- const f = _.rgb, w = _.a, L = se(Oe(h.rgb.mul(w), l.rgb.mul(f)), h.a), O = Le(L, a, S, i);
835
- O.jitterIntensity = 0.25, d = O;
830
+ let y;
831
+ if (i) {
832
+ const c = l.getTextureNode("output"), a = l.getTextureNode("diffuseColor"), S = l.getTextureNode("depth"), m = l.getTextureNode("velocity"), _ = l.getTextureNode("normal"), B = kt((J) => Ct(_.sample(J))), u = _t(c, S, B, o);
833
+ u.aoIntensity.value = 1, u.giIntensity.value = 5, u.sliceCount.value = 2, u.stepCount.value = 8, u.thickness.value = 0.03, u.radius.value = 0.5, u.expFactor.value = 0.1, u.backfaceLighting.value = 0.1;
834
+ const M = u.rgb, L = u.a, W = se(Oe(c.rgb.mul(L), a.rgb.mul(M)), c.a), V = Le(W, S, m, o);
835
+ V.jitterIntensity = 0.25, y = V;
836
836
  } else {
837
- const h = Le(
838
- o,
839
- o.getTextureNode("depth"),
840
- o.getTextureNode("velocity"),
841
- i
837
+ const c = Le(
838
+ l,
839
+ l.getTextureNode("depth"),
840
+ l.getTextureNode("velocity"),
841
+ o
842
842
  );
843
- h.jitterIntensity = 0.25, d = h;
843
+ c.jitterIntensity = 0.25, y = c;
844
844
  }
845
- const y = new T.RenderPipeline(s);
846
- return y.outputNode = d, u.current = y, () => {
847
- y.dispose(), u.current = null;
845
+ const d = new T.RenderPipeline(s);
846
+ return d.outputNode = y, w.current = d, () => {
847
+ d.dispose(), w.current = null;
848
848
  };
849
- }, [s, r, i, t]), He(({ gl: M, scene: o, camera: d }) => {
850
- u.current && u.current.render();
851
- }, 1), /* @__PURE__ */ v.createElement(v.Fragment, null, t !== "low" && s && /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement("directionalLight", { ref: g, color: "white", position: n.toArray(), "target-position": p.toArray(), intensity: b, castShadow: !0, "shadow-mapSize-width": 1024, "shadow-mapSize-height": 1024, "shadow-bias": x, "shadow-intensity": 0.7, "shadow-radius": 2 }, /* @__PURE__ */ v.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 8] })), /* @__PURE__ */ v.createElement("directionalLight", { name: "DirectionalLight2", color: "white", position: [0, 1, -1], intensity: 0.5 })));
849
+ }, [s, r, o, t]), N(() => {
850
+ !s || !n || s.setSize(n.width, n.height);
851
+ }, [n]), He(({ gl: i, scene: l, camera: y }) => {
852
+ w.current && w.current.render();
853
+ }, 1), /* @__PURE__ */ v.createElement(v.Fragment, null, t !== "low" && s && /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement("directionalLight", { ref: g, color: "white", position: f.toArray(), "target-position": b.toArray(), intensity: x, castShadow: !0, "shadow-mapSize-width": 1024, "shadow-mapSize-height": 1024, "shadow-bias": h, "shadow-intensity": 0.7, "shadow-radius": 1.5 }, /* @__PURE__ */ v.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 8] })), /* @__PURE__ */ v.createElement("directionalLight", { name: "DirectionalLight2", color: "white", position: [0, 1, -1], intensity: 0.5 })));
852
854
  }, ys = ({ character: e, autoLookAt: t }) => {
853
- const s = A((c) => c.characterState), r = E((c) => c.currentAUs), i = E((c) => c.currentGaze), n = E((c) => c.currentHeadPose), p = E((c) => c.lookAtCamera), b = z((c) => c.cameraPosition), x = E((c) => c.targets);
854
- return He((c, g) => {
855
- const u = {
856
- deltaTime: g,
857
- timestamp: c.clock.oldTime,
855
+ const s = A((h) => h.characterState), r = E((h) => h.currentAUs), o = E((h) => h.currentGaze), n = E((h) => h.currentHeadPose), f = E((h) => h.lookAtCamera), b = z((h) => h.cameraPosition), x = E((h) => h.targets);
856
+ return He((h, p) => {
857
+ const g = {
858
+ deltaTime: p,
859
+ timestamp: h.clock.oldTime,
858
860
  AU: r,
859
- gaze: i,
861
+ gaze: o,
860
862
  headPose: n,
861
863
  characterState: s,
862
- lookAt: p ? b : void 0,
864
+ lookAt: f ? b : void 0,
863
865
  targets: x
864
866
  };
865
- e.update(u);
866
- }), V(() => {
867
+ e.update(g);
868
+ }), N(() => {
867
869
  if (t)
868
870
  switch (s) {
869
871
  case G.idle:
@@ -877,47 +879,47 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
877
879
  }
878
880
  else
879
881
  ue(!1);
880
- }, [s, t]), V(() => {
882
+ }, [s, t]), N(() => {
881
883
  Dt(e);
882
884
  }, [e]), null;
883
- }, Gs = ({ url: e, type: t, animationsUrl: s, gender: r, speechSynthesis: i, camera: n, onLoadingCompleted: p, autoLookAt: b, breathing: x, disableAnimations: c, debug: g, enableBml: u, animationWeights: M, license: o, detectGpuData: d, environmentPreset: y = "apartment", tonemapping: h = T.NeutralToneMapping, targets: l, useBlendshapeManager: a = !1 }) => {
884
- const S = A((N) => N.animationsLoaded), m = z((N) => N.defaultPositions), P = z((N) => N.defaultDistances), [_, f] = D(), [w, L] = D(null), [O, R] = D(), [X, xe] = D(!1), ve = async (N) => {
885
+ }, Gs = ({ url: e, type: t, animationsUrl: s, gender: r, speechSynthesis: o, camera: n, onLoadingCompleted: f, autoLookAt: b, breathing: x, disableAnimations: h, debug: p, enableBml: g, animationWeights: w, license: i, detectGpuData: l, environmentPreset: y = "apartment", tonemapping: d = T.NeutralToneMapping, targets: c, useBlendshapeManager: a = !1 }) => {
886
+ const S = A((P) => P.animationsLoaded), m = z((P) => P.defaultPositions), _ = z((P) => P.defaultDistances), [B, u] = D(), [M, L] = D(null), [W, V] = D(), [J, xe] = D(!1), ve = async (P) => {
885
887
  let C = null;
886
888
  switch (t) {
887
889
  case ee.cc3:
888
- C = new ct(), R(le.cc3);
890
+ C = new ct(), V(le.cc3);
889
891
  break;
890
892
  case ee.avatarsdk:
891
- C = new it(), R(le.avatarsdk);
893
+ C = new it(), V(le.avatarsdk);
892
894
  break;
893
895
  case ee.avaturn:
894
- C = new ot(), R(le.avaturn);
896
+ C = new ot(), V(le.avaturn);
895
897
  break;
896
898
  }
897
- const I = await C.loadAsync(N).catch((U) => console.warn("Error loading character : ", U));
899
+ const I = await C.loadAsync(P).catch((U) => console.warn("Error loading character : ", U));
898
900
  if (I) {
899
901
  let U = null;
900
- const K = {
902
+ const Z = {
901
903
  mesh: I,
902
904
  onAnimationsLoaded: ce,
903
905
  animationsUrl: s,
904
906
  gender: r || "male",
905
907
  type: t,
906
- debug: g,
907
- enableBmlManager: !!u,
908
- animationWeights: M,
908
+ debug: p,
909
+ enableBmlManager: !!g,
910
+ animationWeights: w,
909
911
  useBlendshapeManager: a,
910
- license: o
912
+ license: i
911
913
  };
912
914
  switch (t) {
913
915
  case ee.cc3:
914
- U = await he.fromCharacterCreator(K);
916
+ U = await he.fromCharacterCreator(Z);
915
917
  break;
916
918
  case ee.avatarsdk:
917
- U = await he.fromAvatarSDK(K);
919
+ U = await he.fromAvatarSDK(Z);
918
920
  break;
919
921
  case ee.avaturn:
920
- U = await he.fromAvaturn(K);
922
+ U = await he.fromAvaturn(Z);
921
923
  break;
922
924
  }
923
925
  U && L(U);
@@ -925,73 +927,73 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
925
927
  }, ce = () => {
926
928
  Fe(!0);
927
929
  };
928
- V(() => {
929
- var N, C;
930
- w && S && (x === !1 && ((C = (N = w.animationManager) == null ? void 0 : N.disableBreathing) == null || C.call(N)), X ? (Jt(w.getAllAnimationNames()), Kt(w.getAllAnimations()), setTimeout(() => {
931
- p == null || p();
932
- }, 1e3)) : J());
933
- }, [w, S, X]), V(() => {
934
- Wt(l || []);
935
- }, [l]), V(() => {
936
- Fe(!1), _ !== void 0 && (_ ? ve(e) : p == null || p());
937
- }, [e, _]), V(() => {
938
- if (X && P && m)
930
+ N(() => {
931
+ var P, C;
932
+ M && S && (x === !1 && ((C = (P = M.animationManager) == null ? void 0 : P.disableBreathing) == null || C.call(P)), J ? (Jt(M.getAllAnimationNames()), Kt(M.getAllAnimations()), setTimeout(() => {
933
+ f == null || f();
934
+ }, 1e3)) : K());
935
+ }, [M, S, J]), N(() => {
936
+ Wt(c || []);
937
+ }, [c]), N(() => {
938
+ Fe(!1), B !== void 0 && (B ? ve(e) : f == null || f());
939
+ }, [e, B]), N(() => {
940
+ if (J && _ && m)
939
941
  if (n) {
940
- const N = ds(n, P, m);
941
- Be(N), ze(n.lookAt ? m[n.lookAt] : m.lowerbelly), Ht(!!n.movable);
942
+ const P = ds(n, _, m);
943
+ Be(P), ze(n.lookAt ? m[n.lookAt] : m.lowerbelly), Ht(!!n.movable);
942
944
  } else {
943
- const N = m.mouth.clone();
944
- N.setComponent(2, P.farther), Be(N), ze(m.lowerbelly);
945
+ const P = m.mouth.clone();
946
+ P.setComponent(2, _.farther), Be(P), ze(m.lowerbelly);
945
947
  }
946
- }, [X, n, P, m]), V(() => {
947
- i && (i.credentials && ns(i.credentials), i.voice && ls(i.voice));
948
- }, [i]), V(() => {
948
+ }, [J, n, _, m]), N(() => {
949
+ o && (o.credentials && ns(o.credentials), o.voice && ls(o.voice));
950
+ }, [o]), N(() => {
949
951
  hs(a);
950
952
  }, [a]);
951
- const J = () => {
952
- if (w && O) {
953
+ const K = () => {
954
+ if (M && W) {
953
955
  try {
954
- const N = new T.Box3().setFromObject(w), C = N.max, I = N.min, U = new T.Vector3((C.x + I.x) / 2, (C.y + I.y) / 2, (C.z + I.z) / 2);
956
+ const P = new T.Box3().setFromObject(M), C = P.max, I = P.min, U = new T.Vector3((C.x + I.x) / 2, (C.y + I.y) / 2, (C.z + I.z) / 2);
955
957
  Ut(U);
956
- const K = Math.abs(C.x - I.x), j = Math.abs(C.y - I.y), Ke = Math.abs(C.z - I.z);
958
+ const Z = Math.abs(C.x - I.x), j = Math.abs(C.y - I.y), Ke = Math.abs(C.z - I.z);
957
959
  jt({
958
- x: K,
960
+ x: Z,
959
961
  y: j,
960
962
  z: Ke
961
963
  });
962
- const H = (C.x + I.x) / 2, W = (C.z + I.z) / 2, Ze = {
963
- eye: new T.Vector3(H, C.y - j / 16, W),
964
- mouth: new T.Vector3(H, C.y - j / 12, W),
965
- neck: new T.Vector3(H, C.y - j / 8, W),
966
- clavicle: new T.Vector3(H, C.y - j / 6, W),
967
- torso: new T.Vector3(H, C.y - j / 4, W),
968
- belly: new T.Vector3(H, C.y - j / 8 * 3, W),
969
- lowerbelly: new T.Vector3(H, C.y - j / 32 * 15, W),
964
+ const O = (C.x + I.x) / 2, H = (C.z + I.z) / 2, Ze = {
965
+ eye: new T.Vector3(O, C.y - j / 16, H),
966
+ mouth: new T.Vector3(O, C.y - j / 12, H),
967
+ neck: new T.Vector3(O, C.y - j / 8, H),
968
+ clavicle: new T.Vector3(O, C.y - j / 6, H),
969
+ torso: new T.Vector3(O, C.y - j / 4, H),
970
+ belly: new T.Vector3(O, C.y - j / 8 * 3, H),
971
+ lowerbelly: new T.Vector3(O, C.y - j / 32 * 15, H),
970
972
  hips: U,
971
- higherthigh: new T.Vector3(H, I.y + j / 32 * 15, W),
972
- thigh: new T.Vector3(H, I.y + j / 8 * 3, W),
973
- knee: new T.Vector3(H, I.y + j / 4, W),
974
- leg: new T.Vector3(H, I.y + j / 8, W),
975
- feet: new T.Vector3(H, I.y, W)
976
- }, Z = (C.y - (I.y + j / 7 * 2)) / 2 / Math.tan(25 * (Math.PI / 180)), Qe = {
977
- veryclose: Z / 4,
978
- closer: Z / 3,
979
- close: Z / 2.5,
980
- midclose: Z / 2,
981
- medium: Z,
982
- midfar: Z * 2,
983
- far: Z * 2.5,
984
- farther: Z * 3,
985
- veryfar: Z * 4
973
+ higherthigh: new T.Vector3(O, I.y + j / 32 * 15, H),
974
+ thigh: new T.Vector3(O, I.y + j / 8 * 3, H),
975
+ knee: new T.Vector3(O, I.y + j / 4, H),
976
+ leg: new T.Vector3(O, I.y + j / 8, H),
977
+ feet: new T.Vector3(O, I.y, H)
978
+ }, Q = (C.y - (I.y + j / 7 * 2)) / 2 / Math.tan(25 * (Math.PI / 180)), Qe = {
979
+ veryclose: Q / 4,
980
+ closer: Q / 3,
981
+ close: Q / 2.5,
982
+ midclose: Q / 2,
983
+ medium: Q,
984
+ midfar: Q * 2,
985
+ far: Q * 2.5,
986
+ farther: Q * 3,
987
+ veryfar: Q * 4
986
988
  };
987
989
  Lt(Ze), Ot(Qe);
988
- } catch (N) {
989
- console.warn(N);
990
+ } catch (P) {
991
+ console.warn(P);
990
992
  }
991
993
  xe(!0);
992
994
  }
993
995
  };
994
- return /* @__PURE__ */ v.createElement(gs, { parentGpuTier: d, setIsGpuAvailable: f, tonemapping: h }, _ ? /* @__PURE__ */ v.createElement(v.Fragment, null, w && /* @__PURE__ */ v.createElement(ys, { character: w, autoLookAt: !!b }), w && /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement(mt, { preset: y }), /* @__PURE__ */ v.createElement("primitive", { object: w, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ v.createElement(v.Fragment, null));
996
+ return /* @__PURE__ */ v.createElement(gs, { parentGpuTier: l, setIsGpuAvailable: u, tonemapping: d }, B ? /* @__PURE__ */ v.createElement(v.Fragment, null, M && /* @__PURE__ */ v.createElement(ys, { character: M, autoLookAt: !!b }), M && /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement(mt, { preset: y }), /* @__PURE__ */ v.createElement("primitive", { object: M, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ v.createElement(v.Fragment, null));
995
997
  }, Ss = {
996
998
  emotions: [],
997
999
  currentTopEmotion: Se.Neutral,
@@ -1015,7 +1017,7 @@ export {
1015
1017
  Gs as Character,
1016
1018
  tr as CharacterState,
1017
1019
  sr as CreationTool,
1018
- B as Distances,
1020
+ R as Distances,
1019
1021
  $s as Object3D,
1020
1022
  F as Positions,
1021
1023
  q as Rotations,
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":"36cf29d2-1","name":"vanilla.mjs"},{"uid":"36cf29d2-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"36cf29d2-5","name":"characterStore.ts"},{"uid":"36cf29d2-7","name":"cameraStore.ts"},{"uid":"36cf29d2-9","name":"headStore.ts"},{"uid":"36cf29d2-11","name":"animationStore.ts"},{"uid":"36cf29d2-17","name":"speechStore.ts"},{"uid":"36cf29d2-33","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"36cf29d2-13","name":"enums.ts"},{"uid":"36cf29d2-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"36cf29d2-19"},{"name":"components","children":[{"name":"PostProcessing/PMJTAANode.js","uid":"36cf29d2-21"},{"uid":"36cf29d2-23","name":"SpeechManager.tsx"},{"uid":"36cf29d2-25","name":"HorizontalLine.tsx"},{"uid":"36cf29d2-27","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"36cf29d2-29"},{"uid":"36cf29d2-31","name":"Character.tsx"}]},{"uid":"36cf29d2-35","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"36cf29d2-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"36cf29d2-0"},"36cf29d2-3":{"renderedLength":593,"gzipLength":285,"brotliLength":235,"metaUid":"36cf29d2-2"},"36cf29d2-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"36cf29d2-4"},"36cf29d2-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"36cf29d2-6"},"36cf29d2-9":{"renderedLength":1484,"gzipLength":395,"brotliLength":345,"metaUid":"36cf29d2-8"},"36cf29d2-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"36cf29d2-10"},"36cf29d2-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"36cf29d2-12"},"36cf29d2-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"36cf29d2-14"},"36cf29d2-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"36cf29d2-16"},"36cf29d2-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"36cf29d2-18"},"36cf29d2-21":{"renderedLength":25599,"gzipLength":6558,"brotliLength":5787,"metaUid":"36cf29d2-20"},"36cf29d2-23":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"36cf29d2-22"},"36cf29d2-25":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"36cf29d2-24"},"36cf29d2-27":{"renderedLength":8744,"gzipLength":2365,"brotliLength":2096,"metaUid":"36cf29d2-26"},"36cf29d2-29":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"36cf29d2-28"},"36cf29d2-31":{"renderedLength":7048,"gzipLength":1843,"brotliLength":1639,"metaUid":"36cf29d2-30"},"36cf29d2-33":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"36cf29d2-32"},"36cf29d2-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"36cf29d2-34"}},"nodeMetas":{"36cf29d2-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"36cf29d2-1"},"imported":[],"importedBy":[{"uid":"36cf29d2-40"},{"uid":"36cf29d2-2"}]},"36cf29d2-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"36cf29d2-3"},"imported":[{"uid":"36cf29d2-38"},{"uid":"36cf29d2-0"}],"importedBy":[{"uid":"36cf29d2-40"}]},"36cf29d2-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"36cf29d2-5"},"imported":[{"uid":"36cf29d2-40"},{"uid":"36cf29d2-36"}],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"},{"uid":"36cf29d2-16"},{"uid":"36cf29d2-8"},{"uid":"36cf29d2-32"},{"uid":"36cf29d2-10"},{"uid":"36cf29d2-28"},{"uid":"36cf29d2-22"}]},"36cf29d2-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"36cf29d2-7"},"imported":[{"uid":"36cf29d2-40"},{"uid":"36cf29d2-37"}],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"},{"uid":"36cf29d2-8"},{"uid":"36cf29d2-26"},{"uid":"36cf29d2-28"}]},"36cf29d2-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"36cf29d2-9"},"imported":[{"uid":"36cf29d2-40"},{"uid":"36cf29d2-4"},{"uid":"36cf29d2-6"}],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"},{"uid":"36cf29d2-26"},{"uid":"36cf29d2-28"}]},"36cf29d2-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"36cf29d2-11"},"imported":[{"uid":"36cf29d2-40"},{"uid":"36cf29d2-4"}],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"}]},"36cf29d2-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"36cf29d2-13"},"imported":[],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"},{"uid":"36cf29d2-32"},{"uid":"36cf29d2-14"},{"uid":"36cf29d2-18"}]},"36cf29d2-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"36cf29d2-15"},"imported":[{"uid":"36cf29d2-12"}],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-16"},{"uid":"36cf29d2-22"}]},"36cf29d2-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"36cf29d2-17"},"imported":[{"uid":"36cf29d2-40"},{"uid":"36cf29d2-4"},{"uid":"36cf29d2-14"}],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"},{"uid":"36cf29d2-22"}]},"36cf29d2-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"36cf29d2-19"},"imported":[{"uid":"36cf29d2-37"},{"uid":"36cf29d2-12"}],"importedBy":[{"uid":"36cf29d2-30"}]},"36cf29d2-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/PMJTAANode.js","moduleParts":{"index.js":"36cf29d2-21"},"imported":[{"uid":"36cf29d2-37"},{"uid":"36cf29d2-41"}],"importedBy":[{"uid":"36cf29d2-26"}]},"36cf29d2-22":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"36cf29d2-23"},"imported":[{"uid":"36cf29d2-38"},{"uid":"36cf29d2-16"},{"uid":"36cf29d2-4"},{"uid":"36cf29d2-44"},{"uid":"36cf29d2-14"},{"uid":"36cf29d2-36"}],"importedBy":[{"uid":"36cf29d2-26"}]},"36cf29d2-24":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"36cf29d2-25"},"imported":[{"uid":"36cf29d2-38"},{"uid":"36cf29d2-37"}],"importedBy":[{"uid":"36cf29d2-26"}]},"36cf29d2-26":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"36cf29d2-27"},"imported":[{"uid":"36cf29d2-38"},{"uid":"36cf29d2-37"},{"uid":"36cf29d2-41"},{"uid":"36cf29d2-20"},{"uid":"36cf29d2-42"},{"uid":"36cf29d2-39"},{"uid":"36cf29d2-43"},{"uid":"36cf29d2-6"},{"uid":"36cf29d2-8"},{"uid":"36cf29d2-22"},{"uid":"36cf29d2-24"}],"importedBy":[{"uid":"36cf29d2-30"}]},"36cf29d2-28":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"36cf29d2-29"},"imported":[{"uid":"36cf29d2-38"},{"uid":"36cf29d2-4"},{"uid":"36cf29d2-36"},{"uid":"36cf29d2-43"},{"uid":"36cf29d2-8"},{"uid":"36cf29d2-6"}],"importedBy":[{"uid":"36cf29d2-30"}]},"36cf29d2-30":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"36cf29d2-31"},"imported":[{"uid":"36cf29d2-38"},{"uid":"36cf29d2-37"},{"uid":"36cf29d2-36"},{"uid":"36cf29d2-39"},{"uid":"36cf29d2-8"},{"uid":"36cf29d2-4"},{"uid":"36cf29d2-10"},{"uid":"36cf29d2-6"},{"uid":"36cf29d2-16"},{"uid":"36cf29d2-12"},{"uid":"36cf29d2-18"},{"uid":"36cf29d2-26"},{"uid":"36cf29d2-28"}],"importedBy":[{"uid":"36cf29d2-34"}]},"36cf29d2-32":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"36cf29d2-33"},"imported":[{"uid":"36cf29d2-40"},{"uid":"36cf29d2-12"},{"uid":"36cf29d2-4"}],"importedBy":[{"uid":"36cf29d2-34"}]},"36cf29d2-34":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"36cf29d2-35"},"imported":[{"uid":"36cf29d2-30"},{"uid":"36cf29d2-4"},{"uid":"36cf29d2-16"},{"uid":"36cf29d2-6"},{"uid":"36cf29d2-8"},{"uid":"36cf29d2-32"},{"uid":"36cf29d2-10"},{"uid":"36cf29d2-36"},{"uid":"36cf29d2-12"},{"uid":"36cf29d2-14"},{"uid":"36cf29d2-37"}],"importedBy":[],"isEntry":true},"36cf29d2-36":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"},{"uid":"36cf29d2-4"},{"uid":"36cf29d2-28"},{"uid":"36cf29d2-22"}],"isExternal":true},"36cf29d2-37":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-34"},{"uid":"36cf29d2-30"},{"uid":"36cf29d2-6"},{"uid":"36cf29d2-18"},{"uid":"36cf29d2-26"},{"uid":"36cf29d2-20"},{"uid":"36cf29d2-24"}],"isExternal":true},"36cf29d2-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-30"},{"uid":"36cf29d2-26"},{"uid":"36cf29d2-28"},{"uid":"36cf29d2-22"},{"uid":"36cf29d2-24"},{"uid":"36cf29d2-2"}],"isExternal":true},"36cf29d2-39":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-30"},{"uid":"36cf29d2-26"}],"isExternal":true},"36cf29d2-40":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"36cf29d2-0"},{"uid":"36cf29d2-2"}],"importedBy":[{"uid":"36cf29d2-4"},{"uid":"36cf29d2-16"},{"uid":"36cf29d2-6"},{"uid":"36cf29d2-8"},{"uid":"36cf29d2-32"},{"uid":"36cf29d2-10"}]},"36cf29d2-41":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-26"},{"uid":"36cf29d2-20"}],"isExternal":true},"36cf29d2-42":{"id":"three/addons/tsl/display/SSGINode.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-26"}],"isExternal":true},"36cf29d2-43":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-26"},{"uid":"36cf29d2-28"}],"isExternal":true},"36cf29d2-44":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"36cf29d2-22"}],"isExternal":true}},"env":{"rollup":"4.61.0"},"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":"08137501-1","name":"vanilla.mjs"},{"uid":"08137501-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"08137501-5","name":"characterStore.ts"},{"uid":"08137501-7","name":"cameraStore.ts"},{"uid":"08137501-9","name":"headStore.ts"},{"uid":"08137501-11","name":"animationStore.ts"},{"uid":"08137501-17","name":"speechStore.ts"},{"uid":"08137501-33","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"08137501-13","name":"enums.ts"},{"uid":"08137501-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"08137501-19"},{"name":"components","children":[{"name":"PostProcessing/PMJTAANode.js","uid":"08137501-21"},{"uid":"08137501-23","name":"SpeechManager.tsx"},{"uid":"08137501-25","name":"HorizontalLine.tsx"},{"uid":"08137501-27","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"08137501-29"},{"uid":"08137501-31","name":"Character.tsx"}]},{"uid":"08137501-35","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"08137501-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"08137501-0"},"08137501-3":{"renderedLength":593,"gzipLength":285,"brotliLength":235,"metaUid":"08137501-2"},"08137501-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"08137501-4"},"08137501-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"08137501-6"},"08137501-9":{"renderedLength":1484,"gzipLength":395,"brotliLength":345,"metaUid":"08137501-8"},"08137501-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"08137501-10"},"08137501-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"08137501-12"},"08137501-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"08137501-14"},"08137501-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"08137501-16"},"08137501-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"08137501-18"},"08137501-21":{"renderedLength":25597,"gzipLength":6558,"brotliLength":5784,"metaUid":"08137501-20"},"08137501-23":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"08137501-22"},"08137501-25":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"08137501-24"},"08137501-27":{"renderedLength":8924,"gzipLength":2407,"brotliLength":2138,"metaUid":"08137501-26"},"08137501-29":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"08137501-28"},"08137501-31":{"renderedLength":7048,"gzipLength":1843,"brotliLength":1639,"metaUid":"08137501-30"},"08137501-33":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"08137501-32"},"08137501-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"08137501-34"}},"nodeMetas":{"08137501-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"08137501-1"},"imported":[],"importedBy":[{"uid":"08137501-40"},{"uid":"08137501-2"}]},"08137501-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"08137501-3"},"imported":[{"uid":"08137501-38"},{"uid":"08137501-0"}],"importedBy":[{"uid":"08137501-40"}]},"08137501-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"08137501-5"},"imported":[{"uid":"08137501-40"},{"uid":"08137501-36"}],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"},{"uid":"08137501-16"},{"uid":"08137501-8"},{"uid":"08137501-32"},{"uid":"08137501-10"},{"uid":"08137501-28"},{"uid":"08137501-22"}]},"08137501-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"08137501-7"},"imported":[{"uid":"08137501-40"},{"uid":"08137501-37"}],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"},{"uid":"08137501-8"},{"uid":"08137501-26"},{"uid":"08137501-28"}]},"08137501-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"08137501-9"},"imported":[{"uid":"08137501-40"},{"uid":"08137501-4"},{"uid":"08137501-6"}],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"},{"uid":"08137501-26"},{"uid":"08137501-28"}]},"08137501-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"08137501-11"},"imported":[{"uid":"08137501-40"},{"uid":"08137501-4"}],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"}]},"08137501-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"08137501-13"},"imported":[],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"},{"uid":"08137501-32"},{"uid":"08137501-14"},{"uid":"08137501-18"}]},"08137501-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"08137501-15"},"imported":[{"uid":"08137501-12"}],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-16"},{"uid":"08137501-22"}]},"08137501-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"08137501-17"},"imported":[{"uid":"08137501-40"},{"uid":"08137501-4"},{"uid":"08137501-14"}],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"},{"uid":"08137501-22"}]},"08137501-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"08137501-19"},"imported":[{"uid":"08137501-37"},{"uid":"08137501-12"}],"importedBy":[{"uid":"08137501-30"}]},"08137501-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/PMJTAANode.js","moduleParts":{"index.js":"08137501-21"},"imported":[{"uid":"08137501-37"},{"uid":"08137501-41"}],"importedBy":[{"uid":"08137501-26"}]},"08137501-22":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"08137501-23"},"imported":[{"uid":"08137501-38"},{"uid":"08137501-16"},{"uid":"08137501-4"},{"uid":"08137501-44"},{"uid":"08137501-14"},{"uid":"08137501-36"}],"importedBy":[{"uid":"08137501-26"}]},"08137501-24":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"08137501-25"},"imported":[{"uid":"08137501-38"},{"uid":"08137501-37"}],"importedBy":[{"uid":"08137501-26"}]},"08137501-26":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"08137501-27"},"imported":[{"uid":"08137501-38"},{"uid":"08137501-37"},{"uid":"08137501-41"},{"uid":"08137501-20"},{"uid":"08137501-42"},{"uid":"08137501-39"},{"uid":"08137501-43"},{"uid":"08137501-6"},{"uid":"08137501-8"},{"uid":"08137501-22"},{"uid":"08137501-24"}],"importedBy":[{"uid":"08137501-30"}]},"08137501-28":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"08137501-29"},"imported":[{"uid":"08137501-38"},{"uid":"08137501-4"},{"uid":"08137501-36"},{"uid":"08137501-43"},{"uid":"08137501-8"},{"uid":"08137501-6"}],"importedBy":[{"uid":"08137501-30"}]},"08137501-30":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"08137501-31"},"imported":[{"uid":"08137501-38"},{"uid":"08137501-37"},{"uid":"08137501-36"},{"uid":"08137501-39"},{"uid":"08137501-8"},{"uid":"08137501-4"},{"uid":"08137501-10"},{"uid":"08137501-6"},{"uid":"08137501-16"},{"uid":"08137501-12"},{"uid":"08137501-18"},{"uid":"08137501-26"},{"uid":"08137501-28"}],"importedBy":[{"uid":"08137501-34"}]},"08137501-32":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"08137501-33"},"imported":[{"uid":"08137501-40"},{"uid":"08137501-12"},{"uid":"08137501-4"}],"importedBy":[{"uid":"08137501-34"}]},"08137501-34":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"08137501-35"},"imported":[{"uid":"08137501-30"},{"uid":"08137501-4"},{"uid":"08137501-16"},{"uid":"08137501-6"},{"uid":"08137501-8"},{"uid":"08137501-32"},{"uid":"08137501-10"},{"uid":"08137501-36"},{"uid":"08137501-12"},{"uid":"08137501-14"},{"uid":"08137501-37"}],"importedBy":[],"isEntry":true},"08137501-36":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"},{"uid":"08137501-4"},{"uid":"08137501-28"},{"uid":"08137501-22"}],"isExternal":true},"08137501-37":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-34"},{"uid":"08137501-30"},{"uid":"08137501-6"},{"uid":"08137501-18"},{"uid":"08137501-26"},{"uid":"08137501-20"},{"uid":"08137501-24"}],"isExternal":true},"08137501-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-30"},{"uid":"08137501-26"},{"uid":"08137501-28"},{"uid":"08137501-22"},{"uid":"08137501-24"},{"uid":"08137501-2"}],"isExternal":true},"08137501-39":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-30"},{"uid":"08137501-26"}],"isExternal":true},"08137501-40":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"08137501-0"},{"uid":"08137501-2"}],"importedBy":[{"uid":"08137501-4"},{"uid":"08137501-16"},{"uid":"08137501-6"},{"uid":"08137501-8"},{"uid":"08137501-32"},{"uid":"08137501-10"}]},"08137501-41":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-26"},{"uid":"08137501-20"}],"isExternal":true},"08137501-42":{"id":"three/addons/tsl/display/SSGINode.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-26"}],"isExternal":true},"08137501-43":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-26"},{"uid":"08137501-28"}],"isExternal":true},"08137501-44":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"08137501-22"}],"isExternal":true}},"env":{"rollup":"4.61.0"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
4933
 
4934
4934
  const run = () => {
4935
4935
  const width = window.innerWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davi-ai/react-bodyengine-three",
3
- "version": "1.0.17",
3
+ "version": "1.0.20",
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.13",
25
+ "@davi-ai/bodyengine-three": "1.0.15",
26
26
  "@react-three/drei": "^10.0.0",
27
27
  "@react-three/fiber": "^9.0.0",
28
28
  "@types/three": "^0.184.0",