@davi-ai/react-bodyengine-three 1.0.32 → 1.0.34

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,21 +1,21 @@
1
- import D, { useState as te, useMemo as it, useEffect as j, useRef as Te, useCallback as $t, Suspense as Qt } from "react";
1
+ import D, { useState as ee, useMemo as it, useEffect as q, useRef as Pe, useCallback as $t, Suspense as Qt } from "react";
2
2
  import * as B from "three/webgpu";
3
- import { Vector3 as Bt, TempNode as He, NodeUpdateType as Xt, Vector2 as ve, RenderTarget as st, DepthTexture as pt, HalfFloatType as gt, NodeMaterial as Dt, NoBlending as Jt, Matrix4 as xe, RendererUtils as Ue, QuadMesh as zt, FloatType as es, UnsignedByteType as ft, RedFormat as ts, UnsignedInt101111Type as ss, RGBFormat as ns, MathUtils as os, DataTexture as as, RepeatWrapping as yt } from "three/webgpu";
3
+ import { Vector3 as Bt, TempNode as He, NodeUpdateType as Xt, Vector2 as Te, RenderTarget as st, DepthTexture as pt, HalfFloatType as gt, NodeMaterial as Dt, NoBlending as Jt, Matrix4 as xe, RendererUtils as Ue, QuadMesh as zt, FloatType as es, UnsignedByteType as ft, RedFormat as ts, UnsignedInt101111Type as ss, RGBFormat as ns, MathUtils as os, DataTexture as as, RepeatWrapping as yt } from "three/webgpu";
4
4
  import { Object3D as Co } from "three/webgpu";
5
5
  import { CharacterState as de, surfaceId as rs, surfaceMask as We, SURFACE as Ke, CreationTool as Se, AvaturnLoader as is, AvatarSDKLoader as cs, CC3Loader as ls, Character as Ye } from "@davi-ai/bodyengine-three";
6
- import { CharacterState as _o, CreationTool as Mo, bmlTags as ko, emotionList as Po } from "@davi-ai/bodyengine-three";
6
+ import { CharacterState as Mo, CreationTool as _o, bmlTags as ko, emotionList as Po } from "@davi-ai/bodyengine-three";
7
7
  import { useDetectGPU as ds, PerformanceMonitor as us, PerspectiveCamera as hs, CameraControls as ms, Environment as ps } from "@react-three/drei";
8
- import { convertToTexture as qe, uniform as I, passTexture as ze, texture as Fe, OnBeforeRenderPipeline as gs, OnAfterRenderPipeline as fs, velocity as ct, struct as ys, Fn as Q, float as C, vec2 as K, If as he, vec4 as J, max as q, vec3 as ae, ivec2 as ke, luminance as Ae, add as xs, uv as Re, mix as Pe, logarithmicDepthToViewZ as Ft, viewZToPerspectiveDepth as nt, getViewPosition as Ie, viewZToOrthographicDepth as Ss, NodeUpdateType as Ot, reference as je, uint as oe, sub as bs, abs as pe, HALF_PI as Ze, sqrt as Et, PI as fe, Loop as Oe, pow as Ge, mul as $e, Break as Ts, normalize as be, dot as ie, clamp as Me, div as vs, ceil as As, shiftRight as ws, countOneBits as xt, sign as St, property as Ee, outputStruct as Cs, screenCoordinate as bt, interleavedGradientNoise as Ns, fract as _s, rand as Ms, cos as ot, sin as at, cross as Tt, acos as ks, bool as vt, getNormalFromDepth as Lt, nodeObject as rt, uniformArray as Ps, textureSize as Vs, mat2 as Is, int as At, min as ce, pass as Ut, mrt as jt, diffuseColor as Rs, output as Gt, packNormalToRGB as Bs, normalView as Ds, sample as zs, unpackRGBToNormal as Fs, exp as Os, perspectiveDepthToViewZ as Es } from "three/tsl";
8
+ import { convertToTexture as qe, uniform as I, passTexture as ze, texture as Fe, OnBeforeRenderPipeline as gs, OnAfterRenderPipeline as fs, velocity as ct, struct as ys, Fn as Q, float as w, vec2 as Y, If as he, vec4 as J, max as W, vec3 as ae, ivec2 as _e, luminance as ve, add as xs, uv as Re, mix as ke, logarithmicDepthToViewZ as Ft, viewZToPerspectiveDepth as nt, getViewPosition as Ie, viewZToOrthographicDepth as Ss, NodeUpdateType as Ot, reference as je, uint as oe, sub as bs, abs as pe, HALF_PI as Ze, sqrt as Et, PI as fe, Loop as Oe, pow as Ge, mul as $e, Break as Ts, normalize as be, dot as ie, clamp as Me, div as vs, ceil as As, shiftRight as ws, countOneBits as xt, sign as St, property as Ee, outputStruct as Cs, screenCoordinate as bt, interleavedGradientNoise as Ns, fract as Ms, rand as _s, cos as ot, sin as at, cross as Tt, acos as ks, bool as vt, getNormalFromDepth as Lt, nodeObject as rt, uniformArray as Ps, textureSize as Vs, mat2 as Is, int as At, min as ce, pass as Ut, mrt as jt, diffuseColor as Rs, output as Gt, packNormalToRGB as Bs, normalView as Ds, sample as zs, unpackRGBToNormal as Fs, exp as Os, perspectiveDepthToViewZ as Es } from "three/tsl";
9
9
  import { SimplexNoise as Ls } from "three/examples/jsm/math/SimplexNoise.js";
10
10
  import { Canvas as Us, useThree as js, useFrame as Ht } from "@react-three/fiber";
11
11
  import { createSpeechSynthesisPonyfill as Gs, SpeechSynthesisUtterance as Hs } from "@davi-ai/web-speech-cognitive-services-davi";
12
12
  const wt = (e) => {
13
13
  let t;
14
- const s = /* @__PURE__ */ new Set(), a = (v, S) => {
14
+ const s = /* @__PURE__ */ new Set(), a = (v, x) => {
15
15
  const V = typeof v == "function" ? v(t) : v;
16
16
  if (!Object.is(V, t)) {
17
17
  const m = t;
18
- t = S ?? (typeof V != "object" || V === null) ? V : Object.assign({}, t, V), s.forEach((k) => k(t, m));
18
+ t = x ?? (typeof V != "object" || V === null) ? V : Object.assign({}, t, V), s.forEach((k) => k(t, m));
19
19
  }
20
20
  }, r = () => t, f = { setState: a, getState: r, getInitialState: () => T, subscribe: (v) => (s.add(v), () => s.delete(v)) }, T = t = e(a, r, f);
21
21
  return f;
@@ -31,7 +31,7 @@ function Ks(e, t = Ws) {
31
31
  const Ys = (e) => {
32
32
  const t = qs(e), s = (a) => Ks(t, a);
33
33
  return Object.assign(s, t), s;
34
- }, Ce = (e) => Ys, O = Ce()(() => ({
34
+ }, we = (e) => Ys, O = we()(() => ({
35
35
  character: null,
36
36
  managers: [],
37
37
  globalManager: null,
@@ -61,7 +61,7 @@ const Ys = (e) => {
61
61
  O.setState({ characterWidth: e.x }), O.setState({ characterHeight: e.y }), O.setState({ characterDepth: e.z });
62
62
  }, Jn = () => O.getState().characterHeight, Nt = (e) => {
63
63
  O.setState({ characterState: e });
64
- }, se = Ce()(() => ({
64
+ }, se = we()(() => ({
65
65
  cameraRef: null,
66
66
  cameraPosition: new Bt(0, 0, 5),
67
67
  bodyCenter: null,
@@ -71,7 +71,7 @@ const Ys = (e) => {
71
71
  movable: !0
72
72
  })), Qs = (e) => {
73
73
  se.setState({ cameraRef: e });
74
- }, _t = (e) => {
74
+ }, Mt = (e) => {
75
75
  se.setState({ cameraPosition: e });
76
76
  }, eo = () => se.getState().cameraPosition, Xs = (e) => {
77
77
  se.setState({ bodyCenter: e });
@@ -79,11 +79,11 @@ const Ys = (e) => {
79
79
  se.setState({ defaultPositions: e });
80
80
  }, en = (e) => {
81
81
  se.setState({ defaultDistances: e });
82
- }, Mt = (e) => {
82
+ }, _t = (e) => {
83
83
  se.setState({ lookAt: e });
84
84
  }, to = () => se.getState().lookAt, tn = (e) => {
85
85
  se.setState({ movable: e });
86
- }, re = Ce()(() => ({
86
+ }, re = we()(() => ({
87
87
  currentAUs: null,
88
88
  currentGaze: null,
89
89
  currentHeadPose: null,
@@ -113,19 +113,19 @@ const Ys = (e) => {
113
113
  (e = O.getState().globalManager) == null || e.releaseLookAt();
114
114
  }, ao = (e) => {
115
115
  re.setState({ showFirstTarget: e });
116
- }, we = Ce()(() => ({
116
+ }, Ae = we()(() => ({
117
117
  animationsNames: [],
118
118
  animations: /* @__PURE__ */ new Map(),
119
119
  currentAnimation: null,
120
120
  autoPlay: !0
121
121
  })), an = (e) => {
122
- we.setState({ animationsNames: e });
122
+ Ae.setState({ animationsNames: e });
123
123
  }, rn = (e) => {
124
- we.setState({ animations: e });
125
- }, ro = () => we.getState().animations, io = (e) => {
126
- we.setState({ autoPlay: e });
124
+ Ae.setState({ animations: e });
125
+ }, ro = () => Ae.getState().animations, io = (e) => {
126
+ Ae.setState({ autoPlay: e });
127
127
  }, co = (e) => {
128
- if (we.setState({ autoPlay: !1 }), we.getState().animationsNames.includes(e)) {
128
+ if (Ae.setState({ autoPlay: !1 }), Ae.getState().animationsNames.includes(e)) {
129
129
  const s = O.getState().animationManager;
130
130
  s == null || s.playAnimation(e);
131
131
  }
@@ -285,7 +285,7 @@ const kt = /* @__PURE__ */ new Map([
285
285
  belly: gn,
286
286
  knees: fn,
287
287
  feet: yn
288
- }, z = Ce()(() => ({
288
+ }, z = we()(() => ({
289
289
  credentials: void 0,
290
290
  currentUtterance: null,
291
291
  boundaries: [],
@@ -414,7 +414,7 @@ const kt = /* @__PURE__ */ new Map([
414
414
  break;
415
415
  }
416
416
  return new B.Vector3(a, r, o);
417
- }, Xe = /* @__PURE__ */ new zt(), Vt = /* @__PURE__ */ new ve();
417
+ }, Xe = /* @__PURE__ */ new zt(), Vt = /* @__PURE__ */ new Te();
418
418
  let Je;
419
419
  class Cn extends He {
420
420
  static get type() {
@@ -429,7 +429,7 @@ class Cn extends He {
429
429
  * @param {Camera} camera - The camera the scene is rendered with.
430
430
  */
431
431
  constructor(t, s, a, r) {
432
- super("vec4"), this.isTRAANode = !0, this.updateBeforeType = Xt.FRAME, this.beautyNode = t, this.depthNode = s, this.velocityNode = a, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 32, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = I(new ve()), this._historyRenderTarget = new st(1, 1, { depthBuffer: !1, type: gt, depthTexture: new pt() }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new st(1, 1, { depthBuffer: !1, type: gt }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new Dt(), this._resolveMaterial.name = "TRAA.resolve", this._resolveMaterial.blending = Jt, this._textureNode = ze(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new xe(), this._cameraNearFar = I(new ve()), this._cameraWorldMatrix = I(new xe()), this._cameraWorldMatrixInverse = I(new xe()), this._cameraProjectionMatrixInverse = I(new xe()), this._previousCameraWorldMatrix = I(new xe()), this._previousCameraProjectionMatrixInverse = I(new xe()), this._previousDepthNode = Fe(new pt(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
432
+ super("vec4"), this.isTRAANode = !0, this.updateBeforeType = Xt.FRAME, this.beautyNode = t, this.depthNode = s, this.velocityNode = a, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 32, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = I(new Te()), this._historyRenderTarget = new st(1, 1, { depthBuffer: !1, type: gt, depthTexture: new pt() }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new st(1, 1, { depthBuffer: !1, type: gt }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new Dt(), this._resolveMaterial.name = "TRAA.resolve", this._resolveMaterial.blending = Jt, this._textureNode = ze(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new xe(), this._cameraNearFar = I(new Te()), this._cameraWorldMatrix = I(new xe()), this._cameraWorldMatrixInverse = I(new xe()), this._cameraProjectionMatrixInverse = I(new xe()), this._previousCameraWorldMatrix = I(new xe()), this._previousCameraProjectionMatrixInverse = I(new xe()), this._previousDepthNode = Fe(new pt(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
433
433
  }
434
434
  /**
435
435
  * Returns the result of the effect as a texture node.
@@ -527,34 +527,34 @@ class Cn extends He {
527
527
  this.clearViewOffset();
528
528
  })), t.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = es), t.context.velocity !== void 0 ? this._velocityNode = t.context.velocity : this._velocityNode = ct;
529
529
  const s = (d) => {
530
- const { x: g, y: i } = this._cameraNearFar, n = Ft(d, g, i);
531
- return nt(n, g, i);
530
+ const { x: g, y: c } = this._cameraNearFar, n = Ft(d, g, c);
531
+ return nt(n, g, c);
532
532
  }, a = ys({
533
533
  closestDepth: "float",
534
534
  closestPositionTexel: "vec2",
535
535
  farthestDepth: "float"
536
536
  }), r = Q(([d]) => {
537
- const g = C(2).toVar(), i = K(0).toVar(), n = C(-1).toVar();
538
- for (let c = -1; c <= 1; ++c)
539
- for (let h = -1; h <= 1; ++h) {
540
- const y = d.add(K(c, h)).toVar();
541
- let p = this.depthNode.load(y).r;
542
- t.renderer.reversedDepthBuffer && (p = p.oneMinus()), t.renderer.logarithmicDepthBuffer && (p = s(p)), p = p.toVar(), he(p.lessThan(g), () => {
543
- g.assign(p), i.assign(y);
544
- }), he(p.greaterThan(n), () => {
545
- n.assign(p);
537
+ const g = w(2).toVar(), c = Y(0).toVar(), n = w(-1).toVar();
538
+ for (let i = -1; i <= 1; ++i)
539
+ for (let p = -1; p <= 1; ++p) {
540
+ const y = d.add(Y(i, p)).toVar();
541
+ let h = this.depthNode.load(y).r;
542
+ t.renderer.reversedDepthBuffer && (h = h.oneMinus()), t.renderer.logarithmicDepthBuffer && (h = s(h)), h = h.toVar(), he(h.lessThan(g), () => {
543
+ g.assign(h), c.assign(y);
544
+ }), he(h.greaterThan(n), () => {
545
+ n.assign(h);
546
546
  });
547
547
  }
548
- return a(g, i, n);
548
+ return a(g, c, n);
549
549
  }), o = (d) => {
550
550
  let g = this._previousDepthNode.sample(d).r;
551
551
  t.renderer.reversedDepthBuffer && (g = g.oneMinus()), t.renderer.logarithmicDepthBuffer && (g = s(g));
552
- const i = Ie(d, g, this._previousCameraProjectionMatrixInverse), n = this._previousCameraWorldMatrix.mul(J(i, 1)).xyz, c = this._cameraWorldMatrixInverse.mul(J(n, 1)).z;
553
- return this.camera.isOrthographicCamera ? Ss(c, this._cameraNearFar.x, this._cameraNearFar.y) : nt(c, this._cameraNearFar.x, this._cameraNearFar.y);
554
- }, l = Q(([d, g, i, n]) => {
555
- const c = n.rgb.add(i.rgb).mul(0.5), h = n.rgb.sub(i.rgb).mul(0.5).add(1e-7), y = g.sub(J(c, d.a)), A = y.xyz.div(h).abs(), w = q(A.x, A.y, A.z);
556
- return w.greaterThan(1).select(
557
- J(c, d.a).add(y.div(w)),
552
+ const c = Ie(d, g, this._previousCameraProjectionMatrixInverse), n = this._previousCameraWorldMatrix.mul(J(c, 1)).xyz, i = this._cameraWorldMatrixInverse.mul(J(n, 1)).z;
553
+ return this.camera.isOrthographicCamera ? Ss(i, this._cameraNearFar.x, this._cameraNearFar.y) : nt(i, this._cameraNearFar.x, this._cameraNearFar.y);
554
+ }, l = Q(([d, g, c, n]) => {
555
+ const i = n.rgb.add(c.rgb).mul(0.5), p = n.rgb.sub(c.rgb).mul(0.5).add(1e-7), y = g.sub(J(i, d.a)), A = y.xyz.div(p).abs(), C = W(A.x, A.y, A.z);
556
+ return C.greaterThan(1).select(
557
+ J(i, d.a).add(y.div(C)),
558
558
  g
559
559
  );
560
560
  }).setLayout({
@@ -582,8 +582,8 @@ class Cn extends He {
582
582
  name: "YCoCgToRGB",
583
583
  type: "vec3",
584
584
  inputs: [{ name: "c", type: "vec3" }]
585
- }), v = Q(([d, g, i, n]) => {
586
- const c = [
585
+ }), v = Q(([d, g, c, n]) => {
586
+ const i = [
587
587
  [-1, -1],
588
588
  [-1, 1],
589
589
  [1, -1],
@@ -592,16 +592,16 @@ class Cn extends He {
592
592
  [0, -1],
593
593
  [0, 1],
594
594
  [-1, 0]
595
- ], h = J(f(g.rgb), g.a).toVar(), y = J(f(i.rgb), i.a).toVar(), p = h.toVar(), A = h.pow2().toVar();
596
- for (const [Z, G] of c) {
597
- const E = this.beautyNode.offset(ke(Z, G)).load(d).max(0), U = J(f(E.rgb), E.a).toVar();
598
- p.addAssign(U), A.addAssign(U.pow2());
595
+ ], p = J(f(g.rgb), g.a).toVar(), y = J(f(c.rgb), c.a).toVar(), h = p.toVar(), A = p.pow2().toVar();
596
+ for (const [j, G] of i) {
597
+ const E = this.beautyNode.offset(_e(j, G)).load(d).max(0), U = J(f(E.rgb), E.a).toVar();
598
+ h.addAssign(U), A.addAssign(U.pow2());
599
599
  }
600
- const w = C(c.length + 1), u = p.div(w), b = A.div(w).sub(u.pow2()).max(0).sqrt().mul(n), _ = u.sub(b), M = u.add(b), x = l(u.clamp(_, M), y, _, M);
601
- return J(T(x.rgb), x.a);
602
- }), S = Q(([d, g]) => {
603
- const n = d.mul(g).fract().abs(), c = q(n, n.oneMinus());
604
- return c.x.mul(c.y).oneMinus().div(0.75);
600
+ const C = w(i.length + 1), N = h.div(C), u = A.div(C).sub(N.pow2()).max(0).sqrt().mul(n), S = N.sub(u), M = N.add(u), b = l(N.clamp(S, M), y, S, M);
601
+ return J(T(b.rgb), b.a);
602
+ }), x = Q(([d, g]) => {
603
+ const n = d.mul(g).fract().abs(), i = W(n, n.oneMinus());
604
+ return i.x.mul(i.y).oneMinus().div(0.75);
605
605
  }).setLayout({
606
606
  name: "subpixelCorrection",
607
607
  type: "float",
@@ -609,17 +609,17 @@ class Cn extends He {
609
609
  { name: "velocityUV", type: "vec2" },
610
610
  { name: "textureSize", type: "ivec2" }
611
611
  ]
612
- }), V = Q(([d, g, i]) => {
613
- const n = i.oneMinus(), c = d.mul(C(1).div(q(d.r, d.g, d.b).add(1))), h = g.mul(C(1).div(q(g.r, g.g, g.b).add(1))), y = Ae(c.rgb), p = Ae(h.rgb);
614
- return i.mulAssign(C(1).div(y.add(1))), n.mulAssign(C(1).div(p.add(1))), xs(d.mul(i), g.mul(n)).div(q(i.add(n), 1e-5)).toVar();
612
+ }), V = Q(([d, g, c]) => {
613
+ const n = c.oneMinus(), i = d.mul(w(1).div(W(d.r, d.g, d.b).add(1))), p = g.mul(w(1).div(W(g.r, g.g, g.b).add(1))), y = ve(i.rgb), h = ve(p.rgb);
614
+ return c.mulAssign(w(1).div(y.add(1))), n.mulAssign(w(1).div(h.add(1))), xs(d.mul(c), g.mul(n)).div(W(c.add(n), 1e-5)).toVar();
615
615
  }), m = Fe(this._historyRenderTarget.texture), k = Q(([d, g]) => {
616
- const i = d.mul(g), n = i.sub(0.5).floor().add(0.5).toVar(), c = i.sub(n).toVar(), h = c.mul(c.mul(c.mul(-0.5).add(1)).sub(0.5)).toVar(), y = c.pow2().mul(c.mul(1.5).sub(2.5)).add(1).toVar(), p = c.mul(c.mul(c.mul(-1.5).add(2)).add(0.5)).toVar(), A = c.pow2().mul(c.mul(0.5).sub(0.5)).toVar(), w = y.add(p).toVar(), u = p.div(w).toVar(), b = n.sub(1).mul(this._invSize).toVar(), _ = n.add(2).mul(this._invSize).toVar(), M = n.add(u).mul(this._invSize).toVar();
617
- return m.sample(K(b.x, b.y)).mul(h.x.mul(h.y)).add(m.sample(K(M.x, b.y)).mul(w.x.mul(h.y))).add(m.sample(K(_.x, b.y)).mul(A.x.mul(h.y))).add(m.sample(K(b.x, M.y)).mul(h.x.mul(w.y))).add(m.sample(K(M.x, M.y)).mul(w.x.mul(w.y))).add(m.sample(K(_.x, M.y)).mul(A.x.mul(w.y))).add(m.sample(K(b.x, _.y)).mul(h.x.mul(A.y))).add(m.sample(K(M.x, _.y)).mul(w.x.mul(A.y))).add(m.sample(K(_.x, _.y)).mul(A.x.mul(A.y))).max(0);
616
+ const c = d.mul(g), n = c.sub(0.5).floor().add(0.5).toVar(), i = c.sub(n).toVar(), p = i.mul(i.mul(i.mul(-0.5).add(1)).sub(0.5)).toVar(), y = i.pow2().mul(i.mul(1.5).sub(2.5)).add(1).toVar(), h = i.mul(i.mul(i.mul(-1.5).add(2)).add(0.5)).toVar(), A = i.pow2().mul(i.mul(0.5).sub(0.5)).toVar(), C = y.add(h).toVar(), N = h.div(C).toVar(), u = n.sub(1).mul(this._invSize).toVar(), S = n.add(2).mul(this._invSize).toVar(), M = n.add(N).mul(this._invSize).toVar();
617
+ return m.sample(Y(u.x, u.y)).mul(p.x.mul(p.y)).add(m.sample(Y(M.x, u.y)).mul(C.x.mul(p.y))).add(m.sample(Y(S.x, u.y)).mul(A.x.mul(p.y))).add(m.sample(Y(u.x, M.y)).mul(p.x.mul(C.y))).add(m.sample(Y(M.x, M.y)).mul(C.x.mul(C.y))).add(m.sample(Y(S.x, M.y)).mul(A.x.mul(C.y))).add(m.sample(Y(u.x, S.y)).mul(p.x.mul(A.y))).add(m.sample(Y(M.x, S.y)).mul(C.x.mul(A.y))).add(m.sample(Y(S.x, S.y)).mul(A.x.mul(A.y))).max(0);
618
618
  }), R = Q(() => {
619
- const d = Re(), g = this.beautyNode.size(), i = d.mul(g), n = r(i), c = n.get("closestDepth"), h = n.get("closestPositionTexel"), y = n.get("farthestDepth"), p = this.velocityNode.load(h).xy.mul(K(0.5, -0.5)), A = d.sub(p), w = o(A), u = A.greaterThanEqual(0).all().and(A.lessThanEqual(1).all()), b = y.sub(c).greaterThan(this.edgeDepthDiff), _ = c.sub(w).greaterThan(this.depthThreshold), M = u.and(b.or(_.not())), x = this.beautyNode.sample(d), Z = k(A, g), G = d.sub(A).mul(g).length().div(this.maxVelocityLength).saturate(), E = C(0.01).toVar();
620
- this.useSubpixelCorrection && E.addAssign(S(p, g).mul(0.2)), E.assign(M.select(E.add(G).saturate(), 1));
621
- const U = Pe(0.5, 1, G.oneMinus().pow2()), P = v(i, x, Z, U);
622
- return V(x, P, E);
619
+ const d = Re(), g = this.beautyNode.size(), c = d.mul(g), n = r(c), i = n.get("closestDepth"), p = n.get("closestPositionTexel"), y = n.get("farthestDepth"), h = this.velocityNode.load(p).xy.mul(Y(0.5, -0.5)), A = d.sub(h), C = o(A), N = A.greaterThanEqual(0).all().and(A.lessThanEqual(1).all()), u = y.sub(i).greaterThan(this.edgeDepthDiff), S = i.sub(C).greaterThan(this.depthThreshold), M = N.and(u.or(S.not())), b = this.beautyNode.sample(d), j = k(A, g), G = d.sub(A).mul(g).length().div(this.maxVelocityLength).saturate(), E = w(0.01).toVar();
620
+ this.useSubpixelCorrection && E.addAssign(x(h, g).mul(0.2)), E.assign(M.select(E.add(G).saturate(), 1));
621
+ const U = ke(0.5, 1, G.oneMinus().pow2()), P = v(c, b, j, U);
622
+ return V(b, P, E);
623
623
  });
624
624
  return this._resolveMaterial.colorNode = R(), this._textureNode;
625
625
  }
@@ -640,7 +640,7 @@ function It(e, t) {
640
640
  const Rt = /* @__PURE__ */ Array.from(
641
641
  { length: 16 },
642
642
  (e, t) => [It(t + 1, 2), It(t + 1, 3)]
643
- ), Yt = (e, t, s, a) => new Cn(qe(e), t, s, a), et = /* @__PURE__ */ new zt(), Nn = /* @__PURE__ */ new ve(), _n = [60, 300, 180, 240, 120, 0], Mn = [0, 0.5, 0.25, 0.75];
643
+ ), Yt = (e, t, s, a) => new Cn(qe(e), t, s, a), et = /* @__PURE__ */ new zt(), Nn = /* @__PURE__ */ new Te(), Mn = [60, 300, 180, 240, 120, 0], _n = [0, 0.5, 0.25, 0.75];
644
644
  let tt;
645
645
  class kn extends He {
646
646
  static get type() {
@@ -655,7 +655,7 @@ class kn extends He {
655
655
  * @param {PerspectiveCamera} camera - The camera the scene is rendered with.
656
656
  */
657
657
  constructor(t, s, a, r) {
658
- super("vec4"), this.beautyNode = t, this.depthNode = s, this.normalNode = a, this.updateBeforeType = Ot.FRAME, this.sliceCount = I(1, "uint"), this.stepCount = I(12, "uint"), this.aoIntensity = I(1, "float"), this.giIntensity = I(10, "float"), this.radius = I(12, "float"), this.useScreenSpaceSampling = I(!0, "bool"), this.expFactor = I(2, "float"), this.thickness = I(1, "float"), this.useLinearThickness = I(!1, "bool"), this.backfaceLighting = I(0, "float"), this.useTemporalFiltering = !0, this.resolutionScale = 1, this._resolution = I(new ve()), this._halfProjScale = I(1), this._temporalDirection = I(0), this._temporalOffset = I(0), this._cameraProjectionMatrix = I(r.projectionMatrix), this._cameraProjectionMatrixInverse = I(r.projectionMatrixInverse), this._cameraNear = je("near", "float", r), this._cameraFar = je("far", "float", r), this._camera = r, this._ssgiRenderTarget = new st(1, 1, { depthBuffer: !1, count: 3 });
658
+ super("vec4"), this.beautyNode = t, this.depthNode = s, this.normalNode = a, this.updateBeforeType = Ot.FRAME, this.sliceCount = I(1, "uint"), this.stepCount = I(12, "uint"), this.aoIntensity = I(1, "float"), this.giIntensity = I(10, "float"), this.radius = I(12, "float"), this.useScreenSpaceSampling = I(!0, "bool"), this.expFactor = I(2, "float"), this.thickness = I(1, "float"), this.useLinearThickness = I(!1, "bool"), this.backfaceLighting = I(0, "float"), this.useTemporalFiltering = !0, this.resolutionScale = 1, this._resolution = I(new Te()), this._halfProjScale = I(1), this._temporalDirection = I(0), this._temporalOffset = I(0), this._cameraProjectionMatrix = I(r.projectionMatrix), this._cameraProjectionMatrixInverse = I(r.projectionMatrixInverse), this._cameraNear = je("near", "float", r), this._cameraFar = je("far", "float", r), this._camera = r, this._ssgiRenderTarget = new st(1, 1, { depthBuffer: !1, count: 3 });
659
659
  const o = this._ssgiRenderTarget.textures[0];
660
660
  o.name = "SSGI.AO", o.type = ft, o.format = ts;
661
661
  const l = this._ssgiRenderTarget.textures[1];
@@ -710,7 +710,7 @@ class kn extends He {
710
710
  const a = s.getDrawingBufferSize(Nn);
711
711
  if (this.setSize(a.width, a.height), this.useTemporalFiltering === !0) {
712
712
  const r = t.frameId;
713
- this._temporalDirection.value = _n[r % 6] / 360, this._temporalOffset.value = Mn[r % 4];
713
+ this._temporalDirection.value = Mn[r % 6] / 360, this._temporalOffset.value = _n[r % 4];
714
714
  } else
715
715
  this._temporalDirection.value = 1, this._temporalOffset.value = 1;
716
716
  et.material = this._material, et.name = "SSGI", s.setClearColor(16777215, 1), s.setRenderTarget(this._ssgiRenderTarget), et.render(s), Ue.restoreRendererState(s, tt);
@@ -724,78 +724,78 @@ class kn extends He {
724
724
  setup(t) {
725
725
  const s = t.renderer;
726
726
  s.backend.isWebGPUBackend === !0 && s.hasFeature("rg11b10ufloat-renderable") === !1 && console.error('THREE.SSGINode: The device does not support the "rg11b10ufloat-renderable" feature which is required for SSGI.');
727
- const a = Re(), r = oe(32), o = oe(0), l = (i) => {
728
- const n = this.depthNode.sample(i).r;
727
+ const a = Re(), r = oe(32), o = oe(0), l = (c) => {
728
+ const n = this.depthNode.sample(c).r;
729
729
  if (t.renderer.logarithmicDepthBuffer === !0) {
730
- const c = Ft(n, this._cameraNear, this._cameraFar);
731
- return nt(c, this._cameraNear, this._cameraFar);
730
+ const i = Ft(n, this._cameraNear, this._cameraFar);
731
+ return nt(i, this._cameraNear, this._cameraFar);
732
732
  }
733
733
  return n;
734
- }, f = (i) => this.normalNode !== null ? this.normalNode.sample(i).rgb.normalize() : Lt(i, this.depthNode.value, this._cameraProjectionMatrixInverse), T = (i) => this.beautyNode.sample(i), v = Q(([i]) => C(0.25).mul(bs(i.y, i.x).bitAnd(3))).setLayout({
734
+ }, f = (c) => this.normalNode !== null ? this.normalNode.sample(c).rgb.normalize() : Lt(c, this.depthNode.value, this._cameraProjectionMatrixInverse), T = (c) => this.beautyNode.sample(c), v = Q(([c]) => w(0.25).mul(bs(c.y, c.x).bitAnd(3))).setLayout({
735
735
  name: "spatialOffsets",
736
736
  type: "float",
737
737
  inputs: [
738
738
  { name: "position", type: "vec2" }
739
739
  ]
740
- }), S = Q(([i]) => {
741
- const n = pe(i).mul(C(-0.156583)).add(Ze);
742
- n.mulAssign(Et(pe(i).oneMinus()));
743
- const c = i.x.greaterThanEqual(0).select(n.x, fe.sub(n.x)), h = i.y.greaterThanEqual(0).select(n.y, fe.sub(n.y));
744
- return K(c, h);
740
+ }), x = Q(([c]) => {
741
+ const n = pe(c).mul(w(-0.156583)).add(Ze);
742
+ n.mulAssign(Et(pe(c).oneMinus()));
743
+ const i = c.x.greaterThanEqual(0).select(n.x, fe.sub(n.x)), p = c.y.greaterThanEqual(0).select(n.y, fe.sub(n.y));
744
+ return Y(i, p);
745
745
  }).setLayout({
746
746
  name: "GTAOFastAcos",
747
747
  type: "vec2",
748
748
  inputs: [
749
749
  { name: "value", type: "vec2" }
750
750
  ]
751
- }), V = Q(([i, n, c, h, y, p, A, w, u, b]) => {
752
- const _ = this.stepCount.toConst(), M = this.expFactor.toConst(), x = this.thickness.toConst(), Z = this.backfaceLighting.toConst(), G = i.select(K(1, -1), K(-1, 1)), E = i.select(1, -1), U = ae(0);
753
- return Oe({ start: oe(0), end: _, type: "uint", condition: "<" }, ({ i: P }) => {
754
- const N = Ge(pe($e(n, C(P).add(p)).div(c)), M).mul(c).toConst(), L = y.mul(q(N, C(P).add(1))).toConst(), H = A.add(L.mul(G)).toConst();
751
+ }), V = Q(([c, n, i, p, y, h, A, C, N, u]) => {
752
+ const S = this.stepCount.toConst(), M = this.expFactor.toConst(), b = this.thickness.toConst(), j = this.backfaceLighting.toConst(), G = c.select(Y(1, -1), Y(-1, 1)), E = c.select(1, -1), U = ae(0);
753
+ return Oe({ start: oe(0), end: S, type: "uint", condition: "<" }, ({ i: P }) => {
754
+ const _ = Ge(pe($e(n, w(P).add(h)).div(i)), M).mul(i).toConst(), L = y.mul(W(_, w(P).add(1))).toConst(), H = A.add(L.mul(G)).toConst();
755
755
  he(H.x.lessThanEqual(0).or(H.y.lessThanEqual(0)).or(H.x.greaterThanEqual(1)).or(H.y.greaterThanEqual(1)), () => {
756
756
  Ts();
757
757
  });
758
- const ne = Ie(H, l(H), this._cameraProjectionMatrixInverse).toConst(), W = ne.sub(h).normalize().toConst(), ue = this.useLinearThickness.select(ne.z.negate().div(this._cameraFar).clamp().mul(100), C(1)), Y = be(ne.sub(ue.mul(w).mul(x)).sub(h));
759
- let F = K(ie(W, w), ie(Y, w));
760
- F = S(Me(F, -1, 1)), F = Me(vs($e(E, F.negate()).sub(b.sub(Ze)), fe)), F = i.select(F.yx, F.xy);
761
- const me = F.x.toConst(), ee = F.y.toConst(), Ne = oe(F.mul(C(r))).toConst(), Be = oe(As(ee.sub(me).mul(C(r)))).toConst();
762
- let ge = Be.greaterThan(oe(0)).select(oe(ws(oe(4294967295), oe(32).sub(r).add(r.sub(Be)))), oe(0)).toConst().shiftLeft(Ne);
758
+ const ne = Ie(H, l(H), this._cameraProjectionMatrixInverse).toConst(), K = ne.sub(p).normalize().toConst(), ue = this.useLinearThickness.select(ne.z.negate().div(this._cameraFar).clamp().mul(100), w(1)), Z = be(ne.sub(ue.mul(C).mul(b)).sub(p));
759
+ let F = Y(ie(K, C), ie(Z, C));
760
+ F = x(Me(F, -1, 1)), F = Me(vs($e(E, F.negate()).sub(u.sub(Ze)), fe)), F = c.select(F.yx, F.xy);
761
+ const me = F.x.toConst(), te = F.y.toConst(), Ce = oe(F.mul(w(r))).toConst(), Be = oe(As(te.sub(me).mul(w(r)))).toConst();
762
+ let ge = Be.greaterThan(oe(0)).select(oe(ws(oe(4294967295), oe(32).sub(r).add(r.sub(Be)))), oe(0)).toConst().shiftLeft(Ce);
763
763
  ge = ge.bitAnd(o.bitNot()), o.assign(o.bitOr(ge));
764
- const _e = xt(ge);
765
- he(_e.greaterThan(0), () => {
764
+ const Ne = xt(ge);
765
+ he(Ne.greaterThan(0), () => {
766
766
  const dt = T(H);
767
- he(Ae(dt).greaterThan(1e-3), () => {
768
- const ut = be(W), ht = Me(ie(u, ut));
767
+ he(ve(dt).greaterThan(1e-3), () => {
768
+ const ut = be(K), ht = Me(ie(N, ut));
769
769
  he(ht.greaterThan(1e-3), () => {
770
770
  const mt = f(H);
771
771
  let ye = ie(mt, ut.negate());
772
- const Zt = St(ye).lessThan(0).select(pe(ye).mul(Z), pe(ye));
773
- ye = Z.greaterThan(0).and(ie(mt, w).greaterThan(0)).select(Zt, Me(ye)), U.rgb.addAssign(C(_e).div(C(r)).mul(dt).mul(ht).mul(ye));
772
+ const Zt = St(ye).lessThan(0).select(pe(ye).mul(j), pe(ye));
773
+ ye = j.greaterThan(0).and(ie(mt, C).greaterThan(0)).select(Zt, Me(ye)), U.rgb.addAssign(w(Ne).div(w(r)).mul(dt).mul(ht).mul(ye));
774
774
  });
775
775
  });
776
776
  });
777
777
  }), U;
778
778
  }), m = Ee("float"), k = Ee("vec3"), R = Ee("vec4"), d = Cs(m, k, R), g = Q(() => {
779
- const i = l(a).toVar();
780
- i.greaterThanEqual(1).discard();
781
- const n = Ie(a, i, this._cameraProjectionMatrixInverse).toVar(), c = f(a).toVar(), h = be(n.xyz.negate()).toVar(), y = v(bt), p = Ns(bt), A = this._temporalDirection.mul(0.02), w = _s(y.add(this._temporalOffset)).add(Ms(a.add(A).mul(2).sub(1))), u = C(0), b = ae(0), _ = ae(0), M = this.sliceCount.toConst(), x = this.stepCount.toConst(), Z = this.aoIntensity.toConst(), G = this.giIntensity.toConst(), E = this.radius.toConst(), U = C(0).toVar();
779
+ const c = l(a).toVar();
780
+ c.greaterThanEqual(1).discard();
781
+ const n = Ie(a, c, this._cameraProjectionMatrixInverse).toVar(), i = f(a).toVar(), p = be(n.xyz.negate()).toVar(), y = v(bt), h = Ns(bt), A = this._temporalDirection.mul(0.02), C = Ms(y.add(this._temporalOffset)).add(_s(a.add(A).mul(2).sub(1))), N = w(0), u = ae(0), S = ae(0), M = this.sliceCount.toConst(), b = this.stepCount.toConst(), j = this.aoIntensity.toConst(), G = this.giIntensity.toConst(), E = this.radius.toConst(), U = w(0).toVar();
782
782
  he(this.useScreenSpaceSampling, () => {
783
- U.assign(E.mul(this._resolution.x.div(2)).div(C(16)));
783
+ U.assign(E.mul(this._resolution.x.div(2)).div(w(16)));
784
784
  }).Else(() => {
785
- U.assign(q(E.mul(this._halfProjScale).div(n.z.negate()), C(x)));
786
- }), U.divAssign(C(x).add(1));
787
- const P = q(1, C(x.sub(1))).mul(U).toConst();
785
+ U.assign(W(E.mul(this._halfProjScale).div(n.z.negate()), w(b)));
786
+ }), U.divAssign(w(b).add(1));
787
+ const P = W(1, w(b.sub(1))).mul(U).toConst();
788
788
  Oe({ start: oe(0), end: M, type: "uint", condition: "<" }, ({ i: ne }) => {
789
- const W = $e(C(ne).add(p).add(this._temporalDirection), fe.div(C(M))).toConst(), ue = ae(K(ot(W), at(W)), 0).toConst(), Y = ue.xy.mul(C(1).div(this._resolution)).toConst(), F = be(Tt(ue, h)).toConst(), me = Tt(h, F).toConst(), ee = c.sub(F.mul(ie(c, F))).toConst(), Ne = be(ee).toConst(), Be = Me(ie(Ne, h), -1, 1).toConst(), De = St(ie(ee, me)).negate().mul(ks(Be)).toConst();
790
- o.assign(0), b.addAssign(V(vt(!0), U, P, n, Y, w, a, h, c, De)), b.addAssign(V(vt(!1), U, P, n, Y, w, a, h, c, De)), u.addAssign(C(xt(o)).div(C(r))), Oe({ start: oe(0), end: r, type: "uint", condition: "<", name: "j" }, ({ j: ge }) => {
789
+ const K = $e(w(ne).add(h).add(this._temporalDirection), fe.div(w(M))).toConst(), ue = ae(Y(ot(K), at(K)), 0).toConst(), Z = ue.xy.mul(w(1).div(this._resolution)).toConst(), F = be(Tt(ue, p)).toConst(), me = Tt(p, F).toConst(), te = i.sub(F.mul(ie(i, F))).toConst(), Ce = be(te).toConst(), Be = Me(ie(Ce, p), -1, 1).toConst(), De = St(ie(te, me)).negate().mul(ks(Be)).toConst();
790
+ o.assign(0), u.addAssign(V(vt(!0), U, P, n, Z, C, a, p, i, De)), u.addAssign(V(vt(!1), U, P, n, Z, C, a, p, i, De)), N.addAssign(w(xt(o)).div(w(r))), Oe({ start: oe(0), end: r, type: "uint", condition: "<", name: "j" }, ({ j: ge }) => {
791
791
  he(o.shiftRight(ge).bitAnd(oe(1)).equal(oe(0)), () => {
792
- const _e = Ze.sub(De).sub(C(ge).add(0.5).div(C(r)).mul(fe));
793
- _.addAssign(h.mul(ot(_e)).add(me.mul(at(_e))));
792
+ const Ne = Ze.sub(De).sub(w(ge).add(0.5).div(w(r)).mul(fe));
793
+ S.addAssign(p.mul(ot(Ne)).add(me.mul(at(Ne))));
794
794
  });
795
795
  });
796
- }), u.divAssign(C(M)), u.assign(Ge(u.clamp().oneMinus(), Z).clamp()), b.divAssign(C(M)), b.mulAssign(G);
797
- const N = C(7).toConst(), L = Ae(b), H = L.greaterThan(N).select(N.div(L), C(1));
798
- return b.mulAssign(H), _.assign(be(_.add(c.mul(1e-4)))), m.assign(u), k.assign(b), R.assign(J(_.mul(0.5).add(0.5), 1)), J(0);
796
+ }), N.divAssign(w(M)), N.assign(Ge(N.clamp().oneMinus(), j).clamp()), u.divAssign(w(M)), u.mulAssign(G);
797
+ const _ = w(7).toConst(), L = ve(u), H = L.greaterThan(_).select(_.div(L), w(1));
798
+ return u.mulAssign(H), S.assign(be(S.add(i.mul(1e-4)))), m.assign(N), k.assign(u), R.assign(J(S.mul(0.5).add(0.5), 1)), J(0);
799
799
  });
800
800
  return this._material.colorNode = g().context(t.getSharedContext()), this._material.outputNode = d, this._material.needsUpdate = !0, this._aoNode;
801
801
  }
@@ -821,7 +821,7 @@ class Vn extends He {
821
821
  * @param {Camera} camera - The camera the scene is rendered with.
822
822
  */
823
823
  constructor(t, s, a, r) {
824
- super("vec4"), this.textureNode = t, this.depthNode = s, this.normalNode = a, this.noiseNode = Fe(Rn()), this.lumaPhi = I(5), this.depthPhi = I(5), this.normalPhi = I(5), this.radius = I(5), this.index = I(0), this.updateBeforeType = Ot.FRAME, this._resolution = I(new ve()), this._sampleVectors = Ps(In(16, 2, 1)), this._cameraProjectionMatrixInverse = I(r.projectionMatrixInverse);
824
+ super("vec4"), this.textureNode = t, this.depthNode = s, this.normalNode = a, this.noiseNode = Fe(Rn()), this.lumaPhi = I(5), this.depthPhi = I(5), this.normalPhi = I(5), this.radius = I(5), this.index = I(0), this.updateBeforeType = Ot.FRAME, this._resolution = I(new Te()), this._sampleVectors = Ps(In(16, 2, 1)), this._cameraProjectionMatrixInverse = I(r.projectionMatrixInverse);
825
825
  }
826
826
  /**
827
827
  * This method is used to update internal uniforms once per frame.
@@ -839,22 +839,22 @@ class Vn extends He {
839
839
  * @return {ShaderCallNodeInternal}
840
840
  */
841
841
  setup() {
842
- const t = Re(), s = (S) => this.textureNode.sample(S), a = (S) => this.depthNode.sample(S).x, r = (S) => this.normalNode !== null ? this.normalNode.sample(S).rgb.normalize() : Lt(S, this.depthNode.value, this._cameraProjectionMatrixInverse), o = (S) => this.noiseNode.sample(S), l = (S, V, m, k) => {
843
- const R = s(k).toVar(), d = a(k).toVar(), g = r(k).toVar(), i = Ie(k, d, this._cameraProjectionMatrixInverse).toVar(), n = ie(V, g), c = Ge(q(n, 0), this.normalPhi), h = pe(Ae(R.rgb).sub(Ae(S))), y = q(C(1).sub(h.div(this.lumaPhi)), 0), p = pe(ie(m.sub(i), V)), A = q(C(1).sub(p.div(this.depthPhi)), 0), w = y.mul(A).mul(c).toVar();
844
- return { color: R.mul(w), weight: w };
845
- }, f = Q(([S]) => {
846
- const V = a(S).toVar(), m = r(S).toVar(), k = s(S).toVar(), R = Ee("vec4");
842
+ const t = Re(), s = (x) => this.textureNode.sample(x), a = (x) => this.depthNode.sample(x).x, r = (x) => this.normalNode !== null ? this.normalNode.sample(x).rgb.normalize() : Lt(x, this.depthNode.value, this._cameraProjectionMatrixInverse), o = (x) => this.noiseNode.sample(x), l = (x, V, m, k) => {
843
+ const R = s(k).toVar(), d = a(k).toVar(), g = r(k).toVar(), c = Ie(k, d, this._cameraProjectionMatrixInverse).toVar(), n = ie(V, g), i = Ge(W(n, 0), this.normalPhi), p = pe(ve(R.rgb).sub(ve(x))), y = W(w(1).sub(p.div(this.lumaPhi)), 0), h = pe(ie(m.sub(c), V)), A = W(w(1).sub(h.div(this.depthPhi)), 0), C = y.mul(A).mul(i).toVar();
844
+ return { color: R.mul(C), weight: C };
845
+ }, f = Q(([x]) => {
846
+ const V = a(x).toVar(), m = r(x).toVar(), k = s(x).toVar(), R = Ee("vec4");
847
847
  return he(V.greaterThanEqual(1).or(ie(m, m).equal(0)), () => {
848
848
  R.assign(k);
849
849
  }).Else(() => {
850
- const d = ae(k.rgb), g = Ie(S, V, this._cameraProjectionMatrixInverse).toConst(), i = Vs(this.noiseNode, 0);
851
- let n = K(S.x, S.y.oneMinus());
852
- n = n.mul(this._resolution.div(i));
853
- const c = o(n).toVar(), h = at(c.element(this.index.mod(4).mul(2).mul(fe))), y = ot(c.element(this.index.mod(4).mul(2).mul(fe))), p = K(h, y), A = Is(p.x, p.y.negate(), p.x, p.y), w = C(1).toVar(), u = J(k).toVar();
854
- Oe({ start: At(0), end: At(16), type: "int", condition: "<" }, ({ i: b }) => {
855
- const _ = this._sampleVectors.element(b), M = A.mul(_.xy.mul(C(1).add(_.z.mul(this.radius.sub(1))))).div(this._resolution), x = S.add(M), Z = l(d, m, g, x);
856
- u.addAssign(Z.color), w.addAssign(Z.weight);
857
- }), R.assign(u.div(w));
850
+ const d = ae(k.rgb), g = Ie(x, V, this._cameraProjectionMatrixInverse).toConst(), c = Vs(this.noiseNode, 0);
851
+ let n = Y(x.x, x.y.oneMinus());
852
+ n = n.mul(this._resolution.div(c));
853
+ const i = o(n).toVar(), p = at(i.element(this.index.mod(4).mul(2).mul(fe))), y = ot(i.element(this.index.mod(4).mul(2).mul(fe))), h = Y(p, y), A = Is(h.x, h.y.negate(), h.x, h.y), C = w(1).toVar(), N = J(k).toVar();
854
+ Oe({ start: At(0), end: At(16), type: "int", condition: "<" }, ({ i: u }) => {
855
+ const S = this._sampleVectors.element(u), M = A.mul(S.xy.mul(w(1).add(S.z.mul(this.radius.sub(1))))).div(this._resolution), b = x.add(M), j = l(d, m, g, b);
856
+ N.addAssign(j.color), C.addAssign(j.weight);
857
+ }), R.assign(N.div(C));
858
858
  }), R;
859
859
  });
860
860
  return Q(() => f(t))();
@@ -905,12 +905,12 @@ class Dn extends He {
905
905
  return f.div(f.oneMinus());
906
906
  }, r = (l) => l.g.add(l.r.add(l.b).mul(0.5));
907
907
  return Q(() => {
908
- const l = ke(t.size()).toConst(), f = l.sub(1).toConst(), T = ke(Re().mul(K(l))).toConst(), v = (U, P) => {
909
- const N = t.load(q(ce(T.add(ke(U, P)), f), ke(0))), L = N.a.saturate().toConst(), H = L.greaterThan(1 / 255).select(N.rgb.max(0).div(L), ae(0));
908
+ const l = _e(t.size()).toConst(), f = l.sub(1).toConst(), T = _e(Re().mul(Y(l))).toConst(), v = (U, P) => {
909
+ const _ = t.load(W(ce(T.add(_e(U, P)), f), _e(0))), L = _.a.saturate().toConst(), H = L.greaterThan(1 / 255).select(_.rgb.max(0).div(L), ae(0));
910
910
  return { p: s(H).toConst(), a: L };
911
- }, S = v(0, 0), V = v(0, -1), m = v(-1, 0), k = v(1, 0), R = v(0, 1), d = ce(ce(V.p, m.p), ce(k.p, R.p)).toConst(), g = q(q(V.p, m.p), q(k.p, R.p)).toConst(), i = C(0.25 - 1 / 16), n = ce(d, S.p).div(g.mul(4).max(1e-5)), c = ae(1).sub(q(g, S.p)).div(d.mul(4).sub(4)), h = q(n.negate(), c).toConst(), y = q(i.negate(), ce(q(h.r, q(h.g, h.b)), 0)).mul(this.amount).toVar(), p = r(V.p), A = r(m.p), w = r(S.p), u = r(k.p), b = r(R.p), _ = p.add(A).add(u).add(b).mul(0.25).sub(w), M = q(q(p, A), q(w, q(u, b))).sub(ce(ce(p, A), ce(w, ce(u, b)))), x = C(1).sub(pe(_).div(M.max(1 / 65536)).saturate().mul(0.5));
912
- y.mulAssign(this.denoise.greaterThan(0.5).select(x, 1));
913
- const Z = y.mul(4).add(1).reciprocal().toConst(), G = a(V.p.add(m.p).add(k.p).add(R.p).mul(y).add(S.p).mul(Z).max(0)), E = V.a.add(m.a).add(k.a).add(R.a).mul(y).add(S.a).mul(Z).saturate().toConst();
911
+ }, x = v(0, 0), V = v(0, -1), m = v(-1, 0), k = v(1, 0), R = v(0, 1), d = ce(ce(V.p, m.p), ce(k.p, R.p)).toConst(), g = W(W(V.p, m.p), W(k.p, R.p)).toConst(), c = w(0.25 - 1 / 16), n = ce(d, x.p).div(g.mul(4).max(1e-5)), i = ae(1).sub(W(g, x.p)).div(d.mul(4).sub(4)), p = W(n.negate(), i).toConst(), y = W(c.negate(), ce(W(p.r, W(p.g, p.b)), 0)).mul(this.amount).toVar(), h = r(V.p), A = r(m.p), C = r(x.p), N = r(k.p), u = r(R.p), S = h.add(A).add(N).add(u).mul(0.25).sub(C), M = W(W(h, A), W(C, W(N, u))).sub(ce(ce(h, A), ce(C, ce(N, u)))), b = w(1).sub(pe(S).div(M.max(1 / 65536)).saturate().mul(0.5));
912
+ y.mulAssign(this.denoise.greaterThan(0.5).select(b, 1));
913
+ const j = y.mul(4).add(1).reciprocal().toConst(), G = a(V.p.add(m.p).add(k.p).add(R.p).mul(y).add(x.p).mul(j).max(0)), E = V.a.add(m.a).add(k.a).add(R.a).mul(y).add(x.a).mul(j).saturate().toConst();
914
914
  return J(G.mul(E), E);
915
915
  })();
916
916
  }
@@ -928,26 +928,26 @@ function Fn(e, t) {
928
928
  }));
929
929
  const a = s.getTextureNode("output"), r = s.getTextureNode("depth"), o = s.getTextureNode("normal"), l = s.getTextureNode("velocity"), f = s.getTextureNode("diffuseColor");
930
930
  s.getTexture("diffuseColor").type = B.UnsignedByteType, s.getTexture("normal").type = B.UnsignedByteType;
931
- const T = We(o.a, Ke.skin), v = We(o.a, Ke.eye), S = We(o.a, Ke.hair), V = zs((G) => Fs(o.sample(G))), m = Pn(a, r, V, t);
931
+ const T = We(o.a, Ke.skin), v = We(o.a, Ke.eye), x = We(o.a, Ke.hair), V = zs((G) => Fs(o.sample(G))), m = Pn(a, r, V, t);
932
932
  m.resolutionScale = 0.5, m.aoIntensity.value = 1, m.giIntensity.value = 5, m.sliceCount.value = 2, m.stepCount.value = 8, m.thickness.value = 0.03, m.radius.value = 1, m.expFactor.value = 1, m.backfaceLighting.value = 0.1;
933
- const k = m.getAONode(), R = m.getGINode(), d = je("near", "float", t), g = je("far", "float", t), i = (G) => Es(r.sample(G).r, d, g), n = Q(() => {
934
- const G = Re(), E = K(m.getAONode().size()), U = G.mul(E).sub(0.5), P = U.floor(), N = U.sub(P), L = i(G), H = J(0).toVar(), ne = C(0).toVar();
935
- for (const [W, ue] of [[0, 0], [1, 0], [0, 1], [1, 1]]) {
936
- const Y = P.add(K(W + 0.5, ue + 0.5)).div(E), F = (W === 1 ? N.x : N.x.oneMinus()).mul(ue === 1 ? N.y : N.y.oneMinus()), me = Os(L.sub(i(Y)).abs().mul(-32)).add(1e-3), ee = F.mul(me);
937
- H.addAssign(J(R.sample(Y).rgb, k.sample(Y).r).mul(ee)), ne.addAssign(ee);
933
+ const k = m.getAONode(), R = m.getGINode(), d = je("near", "float", t), g = je("far", "float", t), c = (G) => Es(r.sample(G).r, d, g), n = Q(() => {
934
+ const G = Re(), E = Y(m.getAONode().size()), U = G.mul(E).sub(0.5), P = U.floor(), _ = U.sub(P), L = c(G), H = J(0).toVar(), ne = w(0).toVar();
935
+ for (const [K, ue] of [[0, 0], [1, 0], [0, 1], [1, 1]]) {
936
+ const Z = P.add(Y(K + 0.5, ue + 0.5)).div(E), F = (K === 1 ? _.x : _.x.oneMinus()).mul(ue === 1 ? _.y : _.y.oneMinus()), me = Os(L.sub(c(Z)).abs().mul(-32)).add(1e-3), te = F.mul(me);
937
+ H.addAssign(J(R.sample(Z).rgb, k.sample(Z).r).mul(te)), ne.addAssign(te);
938
938
  }
939
939
  return H.div(ne);
940
- }), c = Bn(n(), r, V, t);
941
- c.radius.value = 8, c.depthPhi.value = 0.1, c.lumaPhi.value = 5;
942
- const h = rt(c), y = I(0.5), p = I(0.5), A = h.a.oneMinus().mul(Pe(C(1), y, S)).mul(Pe(C(1), p, v)).oneMinus(), w = Pe(a.rgb, f.rgb, f.a), u = Q(([G, E]) => {
943
- const U = E.mul(2.0404).sub(0.3324), P = E.mul(-4.7951).add(0.6417), N = E.mul(2.7552).add(0.6903);
944
- return ae(G).max(U.mul(G).add(P).mul(G).add(N).mul(G));
945
- }), b = I(new B.Vector3(0.45, 0.15, 0.05)), _ = Pe(ae(A), Ge(ae(A), ae(1).sub(b)), T), M = J(
946
- a.rgb.mul(u(_, w)).add(w.mul(h.rgb)),
940
+ }), i = Bn(n(), r, V, t);
941
+ i.radius.value = 8, i.depthPhi.value = 0.1, i.lumaPhi.value = 5;
942
+ const p = rt(i), y = I(0.5), h = I(0.5), A = p.a.oneMinus().mul(ke(w(1), y, x)).mul(ke(w(1), h, v)).oneMinus(), C = ke(a.rgb, f.rgb, f.a), N = Q(([G, E]) => {
943
+ const U = E.mul(2.0404).sub(0.3324), P = E.mul(-4.7951).add(0.6417), _ = E.mul(2.7552).add(0.6903);
944
+ return ae(G).max(U.mul(G).add(P).mul(G).add(_).mul(G));
945
+ }), u = I(new B.Vector3(0.45, 0.15, 0.05)), S = ke(ae(A), Ge(ae(A), ae(1).sub(u)), T), M = J(
946
+ a.rgb.mul(N(S, C)).add(C.mul(p.rgb)),
947
947
  // indirect diffuse modulated by albedo
948
948
  a.a
949
- ), x = Yt(M, r, l, t);
950
- return x._resolveMaterial.needsUpdate = !0, { outputNode: zn(x, 0.5), scenePassColor: a, traaPass: x, giPass: m, denoisePass: c, ao: k, gi: R, hairAO: y, eyeAO: p };
949
+ ), b = Yt(M, r, l, t);
950
+ return b._resolveMaterial.needsUpdate = !0, { outputNode: zn(b, 0.5), scenePassColor: a, traaPass: b, giPass: m, denoisePass: i, ao: k, gi: R, hairAO: y, eyeAO: h };
951
951
  }
952
952
  function On(e, t) {
953
953
  const s = Ut(e, t);
@@ -956,60 +956,60 @@ function On(e, t) {
956
956
  return r._resolveMaterial.needsUpdate = !0, { outputNode: r, scenePassColor: a, traaPass: r };
957
957
  }
958
958
  const En = () => {
959
- const e = O((n) => n.animationsLoaded), t = O((n) => n.characterState), s = O((n) => n.lipSyncManager), a = O((n) => n.blendshapeManager), r = z((n) => n.credentials), o = z((n) => n.currentUtterance), l = z((n) => n.textToSpeak), f = z((n) => n.visemes), T = z((n) => n.blendshapes), v = z((n) => n.visemeIntensity), S = z((n) => n.currentVisemeIndex), V = z((n) => n.currentBlendshapeIndex), m = z((n) => n.useBlendshapeManager), [k, R] = te(!1), [d, g] = te(!1), i = it(() => r != null && r.region && (r.subscriptionKey || r.token) ? Gs({
959
+ const e = O((n) => n.animationsLoaded), t = O((n) => n.characterState), s = O((n) => n.lipSyncManager), a = O((n) => n.blendshapeManager), r = z((n) => n.credentials), o = z((n) => n.currentUtterance), l = z((n) => n.textToSpeak), f = z((n) => n.visemes), T = z((n) => n.blendshapes), v = z((n) => n.visemeIntensity), x = z((n) => n.currentVisemeIndex), V = z((n) => n.currentBlendshapeIndex), m = z((n) => n.useBlendshapeManager), [k, R] = ee(!1), [d, g] = ee(!1), c = it(() => r != null && r.region && (r.subscriptionKey || r.token) ? Gs({
960
960
  credentials: {
961
961
  region: r.region,
962
962
  authorizationToken: r.token,
963
963
  subscriptionKey: r.subscriptionKey
964
964
  }
965
965
  }) : null, [r]);
966
- return j(() => {
967
- if (i) {
968
- const n = i.speechSynthesis.getVoices();
969
- n && Array.isArray(n) && n.length ? (Pt(n), R(!0)) : i.speechSynthesis.onvoiceschanged = () => {
970
- Pt(i.speechSynthesis.getVoices()), R(!0);
966
+ return q(() => {
967
+ if (c) {
968
+ const n = c.speechSynthesis.getVoices();
969
+ n && Array.isArray(n) && n.length ? (Pt(n), R(!0)) : c.speechSynthesis.onvoiceschanged = () => {
970
+ Pt(c.speechSynthesis.getVoices()), R(!0);
971
971
  };
972
972
  }
973
- }, [i]), j(() => {
973
+ }, [c]), q(() => {
974
974
  k && (m ? !!a : !!s) && e && g(!0);
975
- }, [k, s, a, e, m]), j(() => {
975
+ }, [k, s, a, e, m]), q(() => {
976
976
  if (l) {
977
977
  const n = new Hs(l);
978
978
  Sn(n);
979
979
  }
980
- }, [l]), j(() => {
981
- var n, c;
980
+ }, [l]), q(() => {
981
+ var n, i;
982
982
  o && d ? (o.onstart = () => {
983
983
  console.log("Start"), Nt(de.speaking);
984
984
  }, o.onend = () => {
985
985
  console.log("End"), Nt(de.idle);
986
986
  }, o.onboundary = () => {
987
- }, o.onviseme = (h) => {
988
- qt(h);
989
- }, (n = i == null ? void 0 : i.speechSynthesis) == null || n.speak(o, null)) : (c = i == null ? void 0 : i.speechSynthesis) == null || c.cancel();
990
- }, [o]), j(() => {
987
+ }, o.onviseme = (p) => {
988
+ qt(p);
989
+ }, (n = c == null ? void 0 : c.speechSynthesis) == null || n.speak(o, null)) : (i = c == null ? void 0 : c.speechSynthesis) == null || i.cancel();
990
+ }, [o]), q(() => {
991
991
  s && (s.visemeIntensity = v);
992
- }, [v]), j(() => {
992
+ }, [v]), q(() => {
993
993
  if (!m && s && t === de.speaking) {
994
- if (!s.isStarted && s.start(), f.length > 1 && S === 0)
994
+ if (!s.isStarted && s.start(), f.length > 1 && x === 0)
995
995
  f.forEach((n) => {
996
- const c = parseInt(n.name);
997
- if (!isNaN(c)) {
998
- const h = kt.get(c);
999
- h && s.PlayVisemeAsync(h, n.elapsedTime / 1e4);
996
+ const i = parseInt(n.name);
997
+ if (!isNaN(i)) {
998
+ const p = kt.get(i);
999
+ p && s.PlayVisemeAsync(p, n.elapsedTime / 1e4);
1000
1000
  }
1001
1001
  });
1002
1002
  else
1003
- for (let n = S + 1; n < f.length; n++) {
1004
- const c = f[n], h = parseInt(c.name);
1005
- if (!isNaN(h)) {
1006
- const y = kt.get(h);
1007
- y && s.PlayVisemeAsync(y, c.elapsedTime / 1e4);
1003
+ for (let n = x + 1; n < f.length; n++) {
1004
+ const i = f[n], p = parseInt(i.name);
1005
+ if (!isNaN(p)) {
1006
+ const y = kt.get(p);
1007
+ y && s.PlayVisemeAsync(y, i.elapsedTime / 1e4);
1008
1008
  }
1009
1009
  }
1010
1010
  bn(f.length - 1);
1011
1011
  }
1012
- }, [t, f, s, m]), j(() => {
1012
+ }, [t, f, s, m]), q(() => {
1013
1013
  if (m && a && t === de.speaking) {
1014
1014
  if (!a.isStarted && a.start(), T.length > 1 && V === 0)
1015
1015
  T.forEach((n) => {
@@ -1017,12 +1017,12 @@ const En = () => {
1017
1017
  });
1018
1018
  else
1019
1019
  for (let n = V + 1; n < T.length; n++) {
1020
- const c = T[n];
1021
- a.PlayBlendShapeAsync(c);
1020
+ const i = T[n];
1021
+ a.PlayBlendShapeAsync(i);
1022
1022
  }
1023
1023
  Tn(T.length - 1);
1024
1024
  }
1025
- }, [t, T, a, m]), j(() => {
1025
+ }, [t, T, a, m]), q(() => {
1026
1026
  t !== de.speaking && (Wt(), Kt());
1027
1027
  }, [t]), null;
1028
1028
  }, Ln = ({ points: e, color: t = "red" }) => {
@@ -1032,35 +1032,37 @@ const En = () => {
1032
1032
  }, [e, t]);
1033
1033
  return /* @__PURE__ */ D.createElement("primitive", { object: s });
1034
1034
  }, Un = ({ parentGpuTier: e, setIsGpuAvailable: t, children: s, tonemapping: a, inspector: r = !1 }) => {
1035
- const o = se((u) => u.cameraPosition), l = se((u) => u.lookAt), f = se((u) => u.movable), T = re((u) => u.targets), v = re((u) => u.showFirstTarget), [S, V] = te(e || ds()), [m, k] = te(
1035
+ const o = se((u) => u.cameraPosition), l = se((u) => u.lookAt), f = se((u) => u.movable), T = re((u) => u.targets), v = re((u) => u.showFirstTarget), [x, V] = ee(e || ds()), [m, k] = ee(
1036
1036
  "low"
1037
1037
  /* low */
1038
- ), [R, d] = te(null), [g, i] = te(void 0), n = Te(null), c = Te(null), h = Te(null), y = (u) => {
1038
+ ), [R, d] = ee(null), [g, c] = ee(void 0), n = Pe(null), [i, p] = ee(null), y = Pe(null), h = (u) => {
1039
1039
  u.preventDefault(), u.stopPropagation();
1040
1040
  };
1041
- j(() => {
1042
- Qs(c.current);
1043
- }, [c.current]), j(() => {
1044
- var u, b, _, M;
1041
+ q(() => {
1042
+ var u, S, M, b;
1045
1043
  if (f)
1046
1044
  R == null || R.abort(), d(null);
1047
1045
  else {
1048
- const x = new AbortController();
1049
- d(x), (u = n.current) == null || u.addEventListener("wheel", y, { passive: !1, signal: x.signal }), (b = n.current) == null || b.addEventListener("pointerdown", y, { passive: !1, signal: x.signal }), (_ = n.current) == null || _.addEventListener("pointermove", y, { passive: !1, signal: x.signal }), (M = n.current) == null || M.addEventListener("click", y, { passive: !1, signal: x.signal });
1046
+ const j = new AbortController();
1047
+ d(j), (u = n.current) == null || u.addEventListener("wheel", h, { passive: !1, signal: j.signal }), (S = n.current) == null || S.addEventListener("pointerdown", h, { passive: !1, signal: j.signal }), (M = n.current) == null || M.addEventListener("pointermove", h, { passive: !1, signal: j.signal }), (b = n.current) == null || b.addEventListener("click", h, { passive: !1, signal: j.signal });
1048
+ }
1049
+ }, [f]), q(() => {
1050
+ if (i && l && o) {
1051
+ const u = y.current === i;
1052
+ i.setLookAt(o.x, o.y, o.z, l.x, l.y, l.z, u), y.current = i;
1050
1053
  }
1051
- }, [f]), j(() => {
1052
- h != null && h.current && l && o && h.current.setLookAt(o.x, o.y, o.z, l.x, l.y, l.z, !0);
1053
- }, [o, l]), j(() => {
1054
+ }, [i, o, l]), q(() => {
1054
1055
  e && V(e);
1055
- }, [e]), j(() => {
1056
- if (S)
1057
- if (S.type === "FALLBACK")
1056
+ }, [e]), q(() => {
1057
+ if (x)
1058
+ if (x.type === "FALLBACK") {
1059
+ const u = typeof navigator < "u" && /Macintosh|Mac OS X/.test(navigator.userAgent);
1058
1060
  k(
1059
- "medium"
1060
- /* medium */
1061
+ u ? "medium" : "low"
1062
+ /* low */
1061
1063
  );
1062
- else
1063
- switch (S.tier) {
1064
+ } else
1065
+ switch (x.tier) {
1064
1066
  case 0:
1065
1067
  case 1:
1066
1068
  k(
@@ -1087,87 +1089,87 @@ const En = () => {
1087
1089
  );
1088
1090
  break;
1089
1091
  }
1090
- }, [S]), j(() => {
1091
- switch (m && (p.current = m), m) {
1092
+ }, [x]), q(() => {
1093
+ switch (m && (A.current = m), m) {
1092
1094
  case "low":
1093
1095
  console.warn("Retorik React-Bodyengine-Three > GPU tier too low, no rendering available"), t(!1);
1094
1096
  break;
1095
1097
  case "medium":
1096
- i([0.8, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${m}`), t(!0);
1098
+ c([0.8, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${m}`), t(!0);
1097
1099
  break;
1098
1100
  case "high":
1099
- i([1, 1.5]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${m}`), t(!0);
1101
+ c([1, 1.5]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${m}`), t(!0);
1100
1102
  break;
1101
1103
  }
1102
1104
  }, [m]);
1103
- const p = Te(void 0), A = $t(async (u) => {
1104
- const b = new B.WebGPURenderer({
1105
+ const A = Pe(void 0), C = $t(async (u) => {
1106
+ const S = new B.WebGPURenderer({
1105
1107
  canvas: u.canvas,
1106
1108
  antialias: !1,
1107
1109
  alpha: !0,
1108
1110
  powerPreference: "high-performance"
1109
1111
  });
1110
- return b.setClearColor(new B.Color("#000000"), 0), b.setPixelRatio(Math.min(devicePixelRatio, 1.5)), b.shadowMap.type = B.PCFShadowMap, await b.init(), b;
1111
- }, []), w = it(() => {
1112
+ return S.setClearColor(new B.Color("#000000"), 0), S.setPixelRatio(Math.min(devicePixelRatio, 1.5)), S.shadowMap.type = B.PCFShadowMap, await S.init(), S;
1113
+ }, []), N = it(() => {
1112
1114
  if (T.length) {
1113
- const u = T[0], b = new B.Vector3(u.position.x - 0.5, u.position.y, u.position.z - 0.1), _ = new B.Vector3(u.position.x + 0.5, u.position.y, u.position.z - 0.1);
1114
- return [b, _];
1115
+ const u = T[0], S = new B.Vector3(u.position.x - 0.5, u.position.y, u.position.z - 0.1), M = new B.Vector3(u.position.x + 0.5, u.position.y, u.position.z - 0.1);
1116
+ return [S, M];
1115
1117
  } else if (o) {
1116
- const u = new B.Vector3(o.x - 0.5, o.y, o.z - 0.1), b = new B.Vector3(o.x + 0.5, o.y, o.z - 0.1);
1117
- return [u, b];
1118
+ const u = new B.Vector3(o.x - 0.5, o.y, o.z - 0.1), S = new B.Vector3(o.x + 0.5, o.y, o.z - 0.1);
1119
+ return [u, S];
1118
1120
  }
1119
1121
  return [];
1120
1122
  }, [T, o]);
1121
1123
  return g ? (
1122
1124
  // "percentage" = PCFShadowMap; shadows={true} would make R3F set the removed PCFSoftShadowMap
1123
- /* @__PURE__ */ D.createElement(Us, { gl: A, dpr: g, ref: n, shadows: "percentage" }, /* @__PURE__ */ D.createElement(us, { iterations: 5, ms: 100, threshold: 0.75 }, /* @__PURE__ */ D.createElement(jn, { tonemapping: a, processedTier: m, inspector: r }), /* @__PURE__ */ D.createElement(En, null), /* @__PURE__ */ D.createElement(hs, { ref: c, makeDefault: !0, fov: 28 }), /* @__PURE__ */ D.createElement(ms, { ref: h }), v && w.length && /* @__PURE__ */ D.createElement(Ln, { points: w, color: "red" }), /* @__PURE__ */ D.createElement(Qt, { fallback: null }, s)))
1125
+ /* @__PURE__ */ D.createElement(Us, { gl: C, dpr: g, ref: n, shadows: "percentage" }, /* @__PURE__ */ D.createElement(us, { iterations: 5, ms: 100, threshold: 0.75 }, /* @__PURE__ */ D.createElement(jn, { tonemapping: a, processedTier: m, inspector: r }), /* @__PURE__ */ D.createElement(En, null), /* @__PURE__ */ D.createElement(hs, { ref: Qs, makeDefault: !0, fov: 28 }), /* @__PURE__ */ D.createElement(ms, { ref: p }), v && N.length && /* @__PURE__ */ D.createElement(Ln, { points: N, color: "red" }), /* @__PURE__ */ D.createElement(Qt, { fallback: null }, s)))
1124
1126
  ) : /* @__PURE__ */ D.createElement(D.Fragment, null);
1125
1127
  }, jn = ({ tonemapping: e, processedTier: t, inspector: s = !1 }) => {
1126
- const [a, r] = te(!1), { gl: o, scene: l, camera: f, size: T } = js(), [v] = te(new B.Vector3(-3, 2, 2)), [S] = te(new B.Vector3(0, 1, 0)), [V] = te(3.5), [m] = te(-2e-4), [k] = te(0.57), [R] = te(0.25), d = Te(null), g = Te(null);
1127
- return j(() => {
1128
+ const [a, r] = ee(!1), { gl: o, scene: l, camera: f, size: T } = js(), [v] = ee(new B.Vector3(-3, 2, 2)), [x] = ee(new B.Vector3(0, 1, 0)), [V] = ee(3.5), [m] = ee(-2e-4), [k] = ee(0.57), [R] = ee(0.25), d = Pe(null), g = Pe(null);
1129
+ return q(() => {
1128
1130
  o && (o.shadowMap.type = B.PCFShadowMap, o.toneMapping = e, t !== "low" ? l.environmentIntensity = R : l.environmentIntensity = 1);
1129
- }, [o, e]), j(() => {
1131
+ }, [o, e]), q(() => {
1130
1132
  l.environmentIntensity = R;
1131
- }, [R]), j(() => {
1133
+ }, [R]), q(() => {
1132
1134
  if (!s || !o || a) return;
1133
- let i = !1;
1135
+ let c = !1;
1134
1136
  return import("three/addons/inspector/Inspector.js").then(({ Inspector: n }) => {
1135
- i || (o.inspector = new n(), r(!0));
1137
+ c || (o.inspector = new n(), r(!0));
1136
1138
  }).catch((n) => console.warn("Scene: could not load three's Inspector", n)), () => {
1137
- i = !0;
1139
+ c = !0;
1138
1140
  };
1139
- }, [s, o, a]), j(() => {
1141
+ }, [s, o, a]), q(() => {
1140
1142
  if (!o || !l || !f || !t) return;
1141
1143
  l.background = null;
1142
- const i = t === "high", n = i ? Fn(l, f) : On(l, f), { outputNode: c, scenePassColor: h, traaPass: y, giPass: p, ao: A, gi: w, hairAO: u, eyeAO: b } = n, _ = new B.RenderPipeline(o);
1143
- if (_.outputNode = c, g.current = _, s && a && o.inspector) {
1144
+ const c = t === "high", n = c ? Fn(l, f) : On(l, f), { outputNode: i, scenePassColor: p, traaPass: y, giPass: h, ao: A, gi: C, hairAO: N, eyeAO: u } = n, S = new B.RenderPipeline(o);
1145
+ if (S.outputNode = i, g.current = S, s && a && o.inspector) {
1144
1146
  const M = () => {
1145
- _.needsUpdate = !0;
1146
- }, x = o.inspector.createParameters(i ? "SSGI + TRAA" : "TRAA");
1147
- if (i) {
1148
- const Z = { output: 0, feedback: !1 }, G = { Combined: 0, AO: 1, GI: 2, Direct: 3 };
1149
- x.add(Z, "output", G).name("output").onChange((E) => {
1147
+ S.needsUpdate = !0;
1148
+ }, b = o.inspector.createParameters(c ? "SSGI + TRAA" : "TRAA");
1149
+ if (c) {
1150
+ const j = { output: 0, feedback: !1 }, G = { Combined: 0, AO: 1, GI: 2, Direct: 3 };
1151
+ b.add(j, "output", G).name("output").onChange((E) => {
1150
1152
  const U = Number(E);
1151
- _.outputNode = U === 1 ? J(ae(A.r), 1) : U === 2 ? J(w.rgb, 1) : U === 3 ? h : c, M();
1152
- }), x.add(p.sliceCount, "value", 1, 4, 1).name("slice count"), x.add(p.stepCount, "value", 1, 32, 1).name("step count"), x.add(p.radius, "value", 0.1, 2).name("radius"), x.add(p.expFactor, "value", 1e-3, 10).name("exp factor"), x.add(p.thickness, "value", 1e-3, 0.1).name("thickness"), x.add(p.backfaceLighting, "value", 0, 1).name("backface lighting"), x.add(p.aoIntensity, "value", 0, 4).name("AO intensity"), x.add(p.giIntensity, "value", 0, 20).name("GI intensity"), x.add(p, "resolutionScale", 0.25, 1).name("SSGI resolution scale"), x.add(u, "value", 0, 1).name("SSGI AO on hair"), x.add(b, "value", 0, 1).name("SSGI AO on eyes"), x.add(Z, "feedback").name("SSGI 2nd bounce (TRAA history)").onChange((E) => {
1153
- p.beautyNode = E ? y.getHistoryTextureNode() : h, M();
1153
+ S.outputNode = U === 1 ? J(ae(A.r), 1) : U === 2 ? J(C.rgb, 1) : U === 3 ? p : i, M();
1154
+ }), b.add(h.sliceCount, "value", 1, 4, 1).name("slice count"), b.add(h.stepCount, "value", 1, 32, 1).name("step count"), b.add(h.radius, "value", 0.1, 2).name("radius"), b.add(h.expFactor, "value", 1e-3, 10).name("exp factor"), b.add(h.thickness, "value", 1e-3, 0.1).name("thickness"), b.add(h.backfaceLighting, "value", 0, 1).name("backface lighting"), b.add(h.aoIntensity, "value", 0, 4).name("AO intensity"), b.add(h.giIntensity, "value", 0, 20).name("GI intensity"), b.add(h, "resolutionScale", 0.25, 1).name("SSGI resolution scale"), b.add(N, "value", 0, 1).name("SSGI AO on hair"), b.add(u, "value", 0, 1).name("SSGI AO on eyes"), b.add(j, "feedback").name("SSGI 2nd bounce (TRAA history)").onChange((E) => {
1155
+ h.beautyNode = E ? y.getHistoryTextureNode() : p, M();
1154
1156
  });
1155
1157
  }
1156
- x.add(y, "maxVelocityLength", 4, 128, 1).name("TRAA max velocity").onChange(M), x.add(y, "depthThreshold", 1e-4, 0.01).name("TRAA depth threshold").onChange(M), x.add(y, "edgeDepthDiff", 1e-4, 0.01).name("TRAA edge depth diff").onChange(M), x.add(y, "useSubpixelCorrection").name("TRAA subpixel correction").onChange(M);
1158
+ b.add(y, "maxVelocityLength", 4, 128, 1).name("TRAA max velocity").onChange(M), b.add(y, "depthThreshold", 1e-4, 0.01).name("TRAA depth threshold").onChange(M), b.add(y, "edgeDepthDiff", 1e-4, 0.01).name("TRAA edge depth diff").onChange(M), b.add(y, "useSubpixelCorrection").name("TRAA subpixel correction").onChange(M);
1157
1159
  }
1158
1160
  return () => {
1159
- _.dispose(), g.current = null;
1161
+ S.dispose(), g.current = null;
1160
1162
  };
1161
- }, [o, l, f, t, s, a]), j(() => {
1163
+ }, [o, l, f, t, s, a]), q(() => {
1162
1164
  !o || !T || o.setSize(T.width, T.height);
1163
- }, [T]), Ht(({ gl: i, scene: n, camera: c }) => {
1165
+ }, [T]), Ht(({ gl: c, scene: n, camera: i }) => {
1164
1166
  g.current && g.current.render();
1165
- }, 1), /* @__PURE__ */ D.createElement(D.Fragment, null, t !== "low" && o && /* @__PURE__ */ D.createElement(D.Fragment, null, /* @__PURE__ */ D.createElement("directionalLight", { ref: d, color: "white", position: v.toArray(), "target-position": S.toArray(), intensity: V, castShadow: !0, "shadow-mapSize-width": 1024, "shadow-mapSize-height": 1024, "shadow-bias": m, "shadow-normalBias": 3e-3, "shadow-intensity": 0.6, "shadow-radius": 2.5 }, /* @__PURE__ */ D.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 5] })), /* @__PURE__ */ D.createElement("directionalLight", { name: "RimLight", color: "#fff4e8", position: [0.9, 2.3, -3.2], "target-position": [0, 1.6, 0], intensity: k })));
1167
+ }, 1), /* @__PURE__ */ D.createElement(D.Fragment, null, t !== "low" && o && /* @__PURE__ */ D.createElement(D.Fragment, null, /* @__PURE__ */ D.createElement("directionalLight", { ref: d, color: "white", position: v.toArray(), "target-position": x.toArray(), intensity: V, castShadow: !0, "shadow-mapSize-width": 1024, "shadow-mapSize-height": 1024, "shadow-bias": m, "shadow-normalBias": 3e-3, "shadow-intensity": 0.6, "shadow-radius": 2.5 }, /* @__PURE__ */ D.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 5] })), t === "high" && /* @__PURE__ */ D.createElement("directionalLight", { name: "RimLight", color: "#fff4e8", position: [0.9, 2.3, -3.2], "target-position": [0, 1.6, 0], intensity: k })));
1166
1168
  }, Gn = ({ character: e, autoLookAt: t }) => {
1167
1169
  const s = O((v) => v.characterState), a = re((v) => v.currentAUs), r = re((v) => v.currentGaze), o = re((v) => v.currentHeadPose), l = re((v) => v.lookAtCamera), f = se((v) => v.cameraPosition), T = re((v) => v.targets);
1168
- return Ht((v, S) => {
1170
+ return Ht((v, x) => {
1169
1171
  const V = {
1170
- deltaTime: S,
1172
+ deltaTime: x,
1171
1173
  timestamp: v.clock.oldTime,
1172
1174
  AU: a,
1173
1175
  gaze: r,
@@ -1177,7 +1179,7 @@ const En = () => {
1177
1179
  targets: T
1178
1180
  };
1179
1181
  e.update(V);
1180
- }), j(() => {
1182
+ }), q(() => {
1181
1183
  if (t)
1182
1184
  switch (s) {
1183
1185
  case de.idle:
@@ -1191,24 +1193,24 @@ const En = () => {
1191
1193
  }
1192
1194
  else
1193
1195
  Qe(!1);
1194
- }, [s, t]), j(() => {
1196
+ }, [s, t]), q(() => {
1195
1197
  Zs(e);
1196
1198
  }, [e]), null;
1197
- }, xo = ({ url: e, type: t, animationsUrl: s, gender: a, speechSynthesis: r, camera: o, onLoadingCompleted: l, autoLookAt: f, breathing: T, disableAnimations: v, debug: S, inspector: V, enableBml: m, animationWeights: k, license: R, detectGpuData: d, environmentPreset: g = "apartment", tonemapping: i = B.NeutralToneMapping, targets: n, useBlendshapeManager: c = !1 }) => {
1198
- const h = O((P) => P.animationsLoaded), y = se((P) => P.defaultPositions), p = se((P) => P.defaultDistances), [A, w] = te(), [u, b] = te(null), [_, M] = te(), [x, Z] = te(!1), G = async (P) => {
1199
- let N = null;
1199
+ }, xo = ({ url: e, type: t, animationsUrl: s, gender: a, speechSynthesis: r, camera: o, onLoadingCompleted: l, autoLookAt: f, breathing: T, disableAnimations: v, debug: x, inspector: V, enableBml: m, animationWeights: k, license: R, detectGpuData: d, environmentPreset: g = "apartment", tonemapping: c = B.NeutralToneMapping, targets: n, useBlendshapeManager: i = !1 }) => {
1200
+ const p = O((P) => P.animationsLoaded), y = se((P) => P.defaultPositions), h = se((P) => P.defaultDistances), [A, C] = ee(), [N, u] = ee(null), [S, M] = ee(), [b, j] = ee(!1), G = async (P) => {
1201
+ let _ = null;
1200
1202
  switch (t) {
1201
1203
  case Se.cc3:
1202
- N = new ls(), M(Le.cc3);
1204
+ _ = new ls(), M(Le.cc3);
1203
1205
  break;
1204
1206
  case Se.avatarsdk:
1205
- N = new cs(), M(Le.avatarsdk);
1207
+ _ = new cs(), M(Le.avatarsdk);
1206
1208
  break;
1207
1209
  case Se.avaturn:
1208
- N = new is(), M(Le.avaturn);
1210
+ _ = new is(), M(Le.avaturn);
1209
1211
  break;
1210
1212
  }
1211
- const L = await N.loadAsync(P).catch((H) => console.warn("Error loading character : ", H));
1213
+ const L = await _.loadAsync(P).catch((H) => console.warn("Error loading character : ", H));
1212
1214
  if (L) {
1213
1215
  let H = null;
1214
1216
  const ne = {
@@ -1217,10 +1219,10 @@ const En = () => {
1217
1219
  animationsUrl: s,
1218
1220
  gender: a || "male",
1219
1221
  type: t,
1220
- debug: S,
1222
+ debug: x,
1221
1223
  enableBmlManager: !!m,
1222
1224
  animationWeights: k,
1223
- useBlendshapeManager: c,
1225
+ useBlendshapeManager: i,
1224
1226
  license: R
1225
1227
  };
1226
1228
  switch (t) {
@@ -1234,84 +1236,84 @@ const En = () => {
1234
1236
  H = await Ye.fromAvaturn(ne);
1235
1237
  break;
1236
1238
  }
1237
- H && b(H);
1239
+ H && u(H);
1238
1240
  }
1239
1241
  }, E = () => {
1240
1242
  Ct(!0);
1241
1243
  };
1242
- j(() => {
1243
- var P, N;
1244
- u && h && (T === !1 && ((N = (P = u.animationManager) == null ? void 0 : P.disableBreathing) == null || N.call(P)), x ? (an(u.getAllAnimationNames()), rn(u.getAllAnimations()), setTimeout(() => {
1244
+ q(() => {
1245
+ var P, _;
1246
+ N && p && (T === !1 && ((_ = (P = N.animationManager) == null ? void 0 : P.disableBreathing) == null || _.call(P)), b ? (an(N.getAllAnimationNames()), rn(N.getAllAnimations()), setTimeout(() => {
1245
1247
  l == null || l();
1246
1248
  }, 1e3)) : U());
1247
- }, [u, h, x]), j(() => {
1249
+ }, [N, p, b]), q(() => {
1248
1250
  sn(n || []);
1249
- }, [n]), j(() => {
1251
+ }, [n]), q(() => {
1250
1252
  Ct(!1), A !== void 0 && (A ? G(e) : l == null || l());
1251
- }, [e, A]), j(() => {
1252
- if (x && p && y)
1253
+ }, [e, A]), q(() => {
1254
+ if (b && h && y)
1253
1255
  if (o) {
1254
- const P = wn(o, p, y);
1255
- _t(P), Mt(o.lookAt ? y[o.lookAt] : y.lowerbelly), tn(!!o.movable);
1256
+ const P = wn(o, h, y);
1257
+ Mt(P), _t(o.lookAt ? y[o.lookAt] : y.lowerbelly), tn(!!o.movable);
1256
1258
  } else {
1257
1259
  const P = y.mouth.clone();
1258
- P.setComponent(2, p.farther), _t(P), Mt(y.lowerbelly);
1260
+ P.setComponent(2, h.farther), Mt(P), _t(y.lowerbelly);
1259
1261
  }
1260
- }, [x, o, p, y]), j(() => {
1262
+ }, [b, o, h, y]), q(() => {
1261
1263
  r && (r.credentials && xn(r.credentials), r.voice && vn(r.voice));
1262
- }, [r]), j(() => {
1263
- An(c);
1264
- }, [c]);
1264
+ }, [r]), q(() => {
1265
+ An(i);
1266
+ }, [i]);
1265
1267
  const U = () => {
1266
- if (u && _) {
1268
+ if (N && S) {
1267
1269
  try {
1268
- const P = new B.Box3().setFromObject(u), N = P.max, L = P.min, H = new B.Vector3((N.x + L.x) / 2, (N.y + L.y) / 2, (N.z + L.z) / 2);
1270
+ const P = new B.Box3().setFromObject(N), _ = P.max, L = P.min, H = new B.Vector3((_.x + L.x) / 2, (_.y + L.y) / 2, (_.z + L.z) / 2);
1269
1271
  Xs(H);
1270
- const ne = Math.abs(N.x - L.x), W = Math.abs(N.y - L.y), ue = Math.abs(N.z - L.z);
1272
+ const ne = Math.abs(_.x - L.x), K = Math.abs(_.y - L.y), ue = Math.abs(_.z - L.z);
1271
1273
  $s({
1272
1274
  x: ne,
1273
- y: W,
1275
+ y: K,
1274
1276
  z: ue
1275
1277
  });
1276
- const Y = (N.x + L.x) / 2, F = (N.z + L.z) / 2, me = {
1277
- eye: new B.Vector3(Y, N.y - W / 16, F),
1278
- mouth: new B.Vector3(Y, N.y - W / 12, F),
1279
- neck: new B.Vector3(Y, N.y - W / 8, F),
1280
- clavicle: new B.Vector3(Y, N.y - W / 6, F),
1281
- torso: new B.Vector3(Y, N.y - W / 4, F),
1282
- belly: new B.Vector3(Y, N.y - W / 8 * 3, F),
1283
- lowerbelly: new B.Vector3(Y, N.y - W / 32 * 15, F),
1278
+ const Z = (_.x + L.x) / 2, F = (_.z + L.z) / 2, me = {
1279
+ eye: new B.Vector3(Z, _.y - K / 16, F),
1280
+ mouth: new B.Vector3(Z, _.y - K / 12, F),
1281
+ neck: new B.Vector3(Z, _.y - K / 8, F),
1282
+ clavicle: new B.Vector3(Z, _.y - K / 6, F),
1283
+ torso: new B.Vector3(Z, _.y - K / 4, F),
1284
+ belly: new B.Vector3(Z, _.y - K / 8 * 3, F),
1285
+ lowerbelly: new B.Vector3(Z, _.y - K / 32 * 15, F),
1284
1286
  hips: H,
1285
- higherthigh: new B.Vector3(Y, L.y + W / 32 * 15, F),
1286
- thigh: new B.Vector3(Y, L.y + W / 8 * 3, F),
1287
- knee: new B.Vector3(Y, L.y + W / 4, F),
1288
- leg: new B.Vector3(Y, L.y + W / 8, F),
1289
- feet: new B.Vector3(Y, L.y, F)
1290
- }, ee = (N.y - (L.y + W / 7 * 2)) / 2 / Math.tan(25 * (Math.PI / 180)), Ne = {
1291
- veryclose: ee / 4,
1292
- closer: ee / 3,
1293
- close: ee / 2.5,
1294
- midclose: ee / 2,
1295
- medium: ee,
1296
- midfar: ee * 2,
1297
- far: ee * 2.5,
1298
- farther: ee * 3,
1299
- veryfar: ee * 4
1287
+ higherthigh: new B.Vector3(Z, L.y + K / 32 * 15, F),
1288
+ thigh: new B.Vector3(Z, L.y + K / 8 * 3, F),
1289
+ knee: new B.Vector3(Z, L.y + K / 4, F),
1290
+ leg: new B.Vector3(Z, L.y + K / 8, F),
1291
+ feet: new B.Vector3(Z, L.y, F)
1292
+ }, te = (_.y - (L.y + K / 7 * 2)) / 2 / Math.tan(25 * (Math.PI / 180)), Ce = {
1293
+ veryclose: te / 4,
1294
+ closer: te / 3,
1295
+ close: te / 2.5,
1296
+ midclose: te / 2,
1297
+ medium: te,
1298
+ midfar: te * 2,
1299
+ far: te * 2.5,
1300
+ farther: te * 3,
1301
+ veryfar: te * 4
1300
1302
  };
1301
- Js(me), en(Ne);
1303
+ Js(me), en(Ce);
1302
1304
  } catch (P) {
1303
1305
  console.warn(P);
1304
1306
  }
1305
- Z(!0);
1307
+ j(!0);
1306
1308
  }
1307
1309
  };
1308
- return /* @__PURE__ */ D.createElement(Un, { parentGpuTier: d, setIsGpuAvailable: w, tonemapping: i, inspector: V }, A ? /* @__PURE__ */ D.createElement(D.Fragment, null, u && /* @__PURE__ */ D.createElement(Gn, { character: u, autoLookAt: !!f }), u && /* @__PURE__ */ D.createElement(D.Fragment, null, /* @__PURE__ */ D.createElement(ps, { preset: g }), /* @__PURE__ */ D.createElement("primitive", { object: u, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ D.createElement(D.Fragment, null));
1310
+ return /* @__PURE__ */ D.createElement(Un, { parentGpuTier: d, setIsGpuAvailable: C, tonemapping: c, inspector: V }, A ? /* @__PURE__ */ D.createElement(D.Fragment, null, N && /* @__PURE__ */ D.createElement(Gn, { character: N, autoLookAt: !!f }), N && /* @__PURE__ */ D.createElement(D.Fragment, null, /* @__PURE__ */ D.createElement(ps, { preset: g }), /* @__PURE__ */ D.createElement("primitive", { object: N, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ D.createElement(D.Fragment, null));
1309
1311
  }, Hn = {
1310
1312
  emotions: [],
1311
1313
  currentTopEmotion: lt.Neutral,
1312
1314
  useTopEmotionOnly: !0,
1313
1315
  autoDecay: !1
1314
- }, Ve = Ce()(() => Hn), So = (e) => {
1316
+ }, Ve = we()(() => Hn), So = (e) => {
1315
1317
  if (Ve.setState({ emotions: e || [] }), e != null && e.length) {
1316
1318
  const t = e.reduce((s, a) => s.value > a.value ? s : a);
1317
1319
  Ve.setState({ currentTopEmotion: t.emotion });
@@ -1327,8 +1329,8 @@ const En = () => {
1327
1329
  };
1328
1330
  export {
1329
1331
  xo as Character,
1330
- _o as CharacterState,
1331
- Mo as CreationTool,
1332
+ Mo as CharacterState,
1333
+ _o as CreationTool,
1332
1334
  X as Distances,
1333
1335
  Co as Object3D,
1334
1336
  $ as Positions,
@@ -1353,7 +1355,7 @@ export {
1353
1355
  To as setAutoDecay,
1354
1356
  io as setAutoPlay,
1355
1357
  ho as setBlendshapes,
1356
- _t as setCameraPosition,
1358
+ Mt as setCameraPosition,
1357
1359
  Nt as setCharacterState,
1358
1360
  so as setCurrentAUs,
1359
1361
  no as setCurrentGaze,
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":"0f41cae3-1","name":"vanilla.mjs"},{"uid":"0f41cae3-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"0f41cae3-5","name":"characterStore.ts"},{"uid":"0f41cae3-7","name":"cameraStore.ts"},{"uid":"0f41cae3-9","name":"headStore.ts"},{"uid":"0f41cae3-11","name":"animationStore.ts"},{"uid":"0f41cae3-17","name":"speechStore.ts"},{"uid":"0f41cae3-41","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"0f41cae3-13","name":"enums.ts"},{"uid":"0f41cae3-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"0f41cae3-19"},{"name":"components","children":[{"name":"PostProcessing","children":[{"uid":"0f41cae3-21","name":"TRAANode.js"},{"uid":"0f41cae3-23","name":"SSGINode.js"},{"uid":"0f41cae3-25","name":"DenoiseNode.js"},{"uid":"0f41cae3-27","name":"CASNode.js"},{"uid":"0f41cae3-29","name":"pipelines.ts"}]},{"uid":"0f41cae3-31","name":"SpeechManager.tsx"},{"uid":"0f41cae3-33","name":"HorizontalLine.tsx"},{"uid":"0f41cae3-35","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"0f41cae3-37"},{"uid":"0f41cae3-39","name":"Character.tsx"}]},{"uid":"0f41cae3-43","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"0f41cae3-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"0f41cae3-0"},"0f41cae3-3":{"renderedLength":593,"gzipLength":285,"brotliLength":235,"metaUid":"0f41cae3-2"},"0f41cae3-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"0f41cae3-4"},"0f41cae3-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"0f41cae3-6"},"0f41cae3-9":{"renderedLength":1154,"gzipLength":359,"brotliLength":315,"metaUid":"0f41cae3-8"},"0f41cae3-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"0f41cae3-10"},"0f41cae3-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"0f41cae3-12"},"0f41cae3-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"0f41cae3-14"},"0f41cae3-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"0f41cae3-16"},"0f41cae3-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"0f41cae3-18"},"0f41cae3-21":{"renderedLength":28077,"gzipLength":7145,"brotliLength":6234,"metaUid":"0f41cae3-20"},"0f41cae3-23":{"renderedLength":25103,"gzipLength":6860,"brotliLength":5937,"metaUid":"0f41cae3-22"},"0f41cae3-25":{"renderedLength":9917,"gzipLength":3018,"brotliLength":2626,"metaUid":"0f41cae3-24"},"0f41cae3-27":{"renderedLength":5776,"gzipLength":2316,"brotliLength":2006,"metaUid":"0f41cae3-26"},"0f41cae3-29":{"renderedLength":4516,"gzipLength":1512,"brotliLength":1368,"metaUid":"0f41cae3-28"},"0f41cae3-31":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"0f41cae3-30"},"0f41cae3-33":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"0f41cae3-32"},"0f41cae3-35":{"renderedLength":10478,"gzipLength":3001,"brotliLength":2664,"metaUid":"0f41cae3-34"},"0f41cae3-37":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"0f41cae3-36"},"0f41cae3-39":{"renderedLength":7070,"gzipLength":1850,"brotliLength":1651,"metaUid":"0f41cae3-38"},"0f41cae3-41":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"0f41cae3-40"},"0f41cae3-43":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"0f41cae3-42"}},"nodeMetas":{"0f41cae3-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"0f41cae3-1"},"imported":[],"importedBy":[{"uid":"0f41cae3-48"},{"uid":"0f41cae3-2"}]},"0f41cae3-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"0f41cae3-3"},"imported":[{"uid":"0f41cae3-46"},{"uid":"0f41cae3-0"}],"importedBy":[{"uid":"0f41cae3-48"}]},"0f41cae3-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"0f41cae3-5"},"imported":[{"uid":"0f41cae3-48"},{"uid":"0f41cae3-44"}],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"},{"uid":"0f41cae3-16"},{"uid":"0f41cae3-8"},{"uid":"0f41cae3-40"},{"uid":"0f41cae3-10"},{"uid":"0f41cae3-36"},{"uid":"0f41cae3-30"}]},"0f41cae3-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"0f41cae3-7"},"imported":[{"uid":"0f41cae3-48"},{"uid":"0f41cae3-45"}],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"},{"uid":"0f41cae3-8"},{"uid":"0f41cae3-34"},{"uid":"0f41cae3-36"}]},"0f41cae3-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"0f41cae3-9"},"imported":[{"uid":"0f41cae3-48"},{"uid":"0f41cae3-4"},{"uid":"0f41cae3-6"}],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"},{"uid":"0f41cae3-34"},{"uid":"0f41cae3-36"}]},"0f41cae3-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"0f41cae3-11"},"imported":[{"uid":"0f41cae3-48"},{"uid":"0f41cae3-4"}],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"}]},"0f41cae3-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"0f41cae3-13"},"imported":[],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"},{"uid":"0f41cae3-40"},{"uid":"0f41cae3-14"},{"uid":"0f41cae3-18"}]},"0f41cae3-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"0f41cae3-15"},"imported":[{"uid":"0f41cae3-12"}],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-16"},{"uid":"0f41cae3-30"}]},"0f41cae3-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"0f41cae3-17"},"imported":[{"uid":"0f41cae3-48"},{"uid":"0f41cae3-4"},{"uid":"0f41cae3-14"}],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"},{"uid":"0f41cae3-30"}]},"0f41cae3-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"0f41cae3-19"},"imported":[{"uid":"0f41cae3-45"},{"uid":"0f41cae3-12"}],"importedBy":[{"uid":"0f41cae3-38"}]},"0f41cae3-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/TRAANode.js","moduleParts":{"index.js":"0f41cae3-21"},"imported":[{"uid":"0f41cae3-45"},{"uid":"0f41cae3-49"}],"importedBy":[{"uid":"0f41cae3-28"}]},"0f41cae3-22":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/SSGINode.js","moduleParts":{"index.js":"0f41cae3-23"},"imported":[{"uid":"0f41cae3-45"},{"uid":"0f41cae3-49"}],"importedBy":[{"uid":"0f41cae3-28"}]},"0f41cae3-24":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/DenoiseNode.js","moduleParts":{"index.js":"0f41cae3-25"},"imported":[{"uid":"0f41cae3-45"},{"uid":"0f41cae3-49"},{"uid":"0f41cae3-53"}],"importedBy":[{"uid":"0f41cae3-28"}]},"0f41cae3-26":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/CASNode.js","moduleParts":{"index.js":"0f41cae3-27"},"imported":[{"uid":"0f41cae3-45"},{"uid":"0f41cae3-49"}],"importedBy":[{"uid":"0f41cae3-28"}]},"0f41cae3-28":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/pipelines.ts","moduleParts":{"index.js":"0f41cae3-29"},"imported":[{"uid":"0f41cae3-45"},{"uid":"0f41cae3-49"},{"uid":"0f41cae3-44"},{"uid":"0f41cae3-20"},{"uid":"0f41cae3-22"},{"uid":"0f41cae3-24"},{"uid":"0f41cae3-26"}],"importedBy":[{"uid":"0f41cae3-34"}]},"0f41cae3-30":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"0f41cae3-31"},"imported":[{"uid":"0f41cae3-46"},{"uid":"0f41cae3-16"},{"uid":"0f41cae3-4"},{"uid":"0f41cae3-52"},{"uid":"0f41cae3-14"},{"uid":"0f41cae3-44"}],"importedBy":[{"uid":"0f41cae3-34"}]},"0f41cae3-32":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"0f41cae3-33"},"imported":[{"uid":"0f41cae3-46"},{"uid":"0f41cae3-45"}],"importedBy":[{"uid":"0f41cae3-34"}]},"0f41cae3-34":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"0f41cae3-35"},"imported":[{"uid":"0f41cae3-46"},{"uid":"0f41cae3-45"},{"uid":"0f41cae3-49"},{"uid":"0f41cae3-28"},{"uid":"0f41cae3-47"},{"uid":"0f41cae3-50"},{"uid":"0f41cae3-6"},{"uid":"0f41cae3-8"},{"uid":"0f41cae3-30"},{"uid":"0f41cae3-32"},{"uid":"0f41cae3-51","dynamic":true}],"importedBy":[{"uid":"0f41cae3-38"}]},"0f41cae3-36":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"0f41cae3-37"},"imported":[{"uid":"0f41cae3-46"},{"uid":"0f41cae3-4"},{"uid":"0f41cae3-44"},{"uid":"0f41cae3-50"},{"uid":"0f41cae3-8"},{"uid":"0f41cae3-6"}],"importedBy":[{"uid":"0f41cae3-38"}]},"0f41cae3-38":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"0f41cae3-39"},"imported":[{"uid":"0f41cae3-46"},{"uid":"0f41cae3-45"},{"uid":"0f41cae3-44"},{"uid":"0f41cae3-47"},{"uid":"0f41cae3-8"},{"uid":"0f41cae3-4"},{"uid":"0f41cae3-10"},{"uid":"0f41cae3-6"},{"uid":"0f41cae3-16"},{"uid":"0f41cae3-12"},{"uid":"0f41cae3-18"},{"uid":"0f41cae3-34"},{"uid":"0f41cae3-36"}],"importedBy":[{"uid":"0f41cae3-42"}]},"0f41cae3-40":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"0f41cae3-41"},"imported":[{"uid":"0f41cae3-48"},{"uid":"0f41cae3-12"},{"uid":"0f41cae3-4"}],"importedBy":[{"uid":"0f41cae3-42"}]},"0f41cae3-42":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"0f41cae3-43"},"imported":[{"uid":"0f41cae3-38"},{"uid":"0f41cae3-4"},{"uid":"0f41cae3-16"},{"uid":"0f41cae3-6"},{"uid":"0f41cae3-8"},{"uid":"0f41cae3-40"},{"uid":"0f41cae3-10"},{"uid":"0f41cae3-44"},{"uid":"0f41cae3-12"},{"uid":"0f41cae3-14"},{"uid":"0f41cae3-45"}],"importedBy":[],"isEntry":true},"0f41cae3-44":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"},{"uid":"0f41cae3-4"},{"uid":"0f41cae3-36"},{"uid":"0f41cae3-28"},{"uid":"0f41cae3-30"}],"isExternal":true},"0f41cae3-45":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-42"},{"uid":"0f41cae3-38"},{"uid":"0f41cae3-6"},{"uid":"0f41cae3-18"},{"uid":"0f41cae3-34"},{"uid":"0f41cae3-28"},{"uid":"0f41cae3-32"},{"uid":"0f41cae3-20"},{"uid":"0f41cae3-22"},{"uid":"0f41cae3-24"},{"uid":"0f41cae3-26"}],"isExternal":true},"0f41cae3-46":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-38"},{"uid":"0f41cae3-34"},{"uid":"0f41cae3-36"},{"uid":"0f41cae3-30"},{"uid":"0f41cae3-32"},{"uid":"0f41cae3-2"}],"isExternal":true},"0f41cae3-47":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-38"},{"uid":"0f41cae3-34"}],"isExternal":true},"0f41cae3-48":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"0f41cae3-0"},{"uid":"0f41cae3-2"}],"importedBy":[{"uid":"0f41cae3-4"},{"uid":"0f41cae3-16"},{"uid":"0f41cae3-6"},{"uid":"0f41cae3-8"},{"uid":"0f41cae3-40"},{"uid":"0f41cae3-10"}]},"0f41cae3-49":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-34"},{"uid":"0f41cae3-28"},{"uid":"0f41cae3-20"},{"uid":"0f41cae3-22"},{"uid":"0f41cae3-24"},{"uid":"0f41cae3-26"}],"isExternal":true},"0f41cae3-50":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-34"},{"uid":"0f41cae3-36"}],"isExternal":true},"0f41cae3-51":{"id":"three/addons/inspector/Inspector.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-34"}],"isExternal":true},"0f41cae3-52":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-30"}],"isExternal":true},"0f41cae3-53":{"id":"three/examples/jsm/math/SimplexNoise.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"0f41cae3-24"}],"isExternal":true}},"env":{"rollup":"4.63.5"},"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":"13322081-1","name":"vanilla.mjs"},{"uid":"13322081-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"13322081-5","name":"characterStore.ts"},{"uid":"13322081-7","name":"cameraStore.ts"},{"uid":"13322081-9","name":"headStore.ts"},{"uid":"13322081-11","name":"animationStore.ts"},{"uid":"13322081-17","name":"speechStore.ts"},{"uid":"13322081-41","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"13322081-13","name":"enums.ts"},{"uid":"13322081-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"13322081-19"},{"name":"components","children":[{"name":"PostProcessing","children":[{"uid":"13322081-21","name":"TRAANode.js"},{"uid":"13322081-23","name":"SSGINode.js"},{"uid":"13322081-25","name":"DenoiseNode.js"},{"uid":"13322081-27","name":"CASNode.js"},{"uid":"13322081-29","name":"pipelines.ts"}]},{"uid":"13322081-31","name":"SpeechManager.tsx"},{"uid":"13322081-33","name":"HorizontalLine.tsx"},{"uid":"13322081-35","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"13322081-37"},{"uid":"13322081-39","name":"Character.tsx"}]},{"uid":"13322081-43","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"13322081-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"13322081-0"},"13322081-3":{"renderedLength":593,"gzipLength":285,"brotliLength":235,"metaUid":"13322081-2"},"13322081-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"13322081-4"},"13322081-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"13322081-6"},"13322081-9":{"renderedLength":1154,"gzipLength":359,"brotliLength":315,"metaUid":"13322081-8"},"13322081-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"13322081-10"},"13322081-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"13322081-12"},"13322081-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"13322081-14"},"13322081-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"13322081-16"},"13322081-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"13322081-18"},"13322081-21":{"renderedLength":28077,"gzipLength":7145,"brotliLength":6234,"metaUid":"13322081-20"},"13322081-23":{"renderedLength":25103,"gzipLength":6860,"brotliLength":5937,"metaUid":"13322081-22"},"13322081-25":{"renderedLength":9917,"gzipLength":3018,"brotliLength":2626,"metaUid":"13322081-24"},"13322081-27":{"renderedLength":5776,"gzipLength":2316,"brotliLength":2006,"metaUid":"13322081-26"},"13322081-29":{"renderedLength":4516,"gzipLength":1512,"brotliLength":1368,"metaUid":"13322081-28"},"13322081-31":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"13322081-30"},"13322081-33":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"13322081-32"},"13322081-35":{"renderedLength":10770,"gzipLength":3098,"brotliLength":2740,"metaUid":"13322081-34"},"13322081-37":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"13322081-36"},"13322081-39":{"renderedLength":7070,"gzipLength":1850,"brotliLength":1651,"metaUid":"13322081-38"},"13322081-41":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"13322081-40"},"13322081-43":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"13322081-42"}},"nodeMetas":{"13322081-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"13322081-1"},"imported":[],"importedBy":[{"uid":"13322081-48"},{"uid":"13322081-2"}]},"13322081-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"13322081-3"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-0"}],"importedBy":[{"uid":"13322081-48"}]},"13322081-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"13322081-5"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-44"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-16"},{"uid":"13322081-8"},{"uid":"13322081-40"},{"uid":"13322081-10"},{"uid":"13322081-36"},{"uid":"13322081-30"}]},"13322081-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"13322081-7"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-45"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-8"},{"uid":"13322081-34"},{"uid":"13322081-36"}]},"13322081-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"13322081-9"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-4"},{"uid":"13322081-6"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-34"},{"uid":"13322081-36"}]},"13322081-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"13322081-11"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-4"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"}]},"13322081-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"13322081-13"},"imported":[],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-40"},{"uid":"13322081-14"},{"uid":"13322081-18"}]},"13322081-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"13322081-15"},"imported":[{"uid":"13322081-12"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-16"},{"uid":"13322081-30"}]},"13322081-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"13322081-17"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-4"},{"uid":"13322081-14"}],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-30"}]},"13322081-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"13322081-19"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-12"}],"importedBy":[{"uid":"13322081-38"}]},"13322081-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/TRAANode.js","moduleParts":{"index.js":"13322081-21"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-22":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/SSGINode.js","moduleParts":{"index.js":"13322081-23"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-24":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/DenoiseNode.js","moduleParts":{"index.js":"13322081-25"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"},{"uid":"13322081-53"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-26":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/CASNode.js","moduleParts":{"index.js":"13322081-27"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"}],"importedBy":[{"uid":"13322081-28"}]},"13322081-28":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/pipelines.ts","moduleParts":{"index.js":"13322081-29"},"imported":[{"uid":"13322081-45"},{"uid":"13322081-49"},{"uid":"13322081-44"},{"uid":"13322081-20"},{"uid":"13322081-22"},{"uid":"13322081-24"},{"uid":"13322081-26"}],"importedBy":[{"uid":"13322081-34"}]},"13322081-30":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"13322081-31"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-16"},{"uid":"13322081-4"},{"uid":"13322081-52"},{"uid":"13322081-14"},{"uid":"13322081-44"}],"importedBy":[{"uid":"13322081-34"}]},"13322081-32":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"13322081-33"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-45"}],"importedBy":[{"uid":"13322081-34"}]},"13322081-34":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"13322081-35"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-45"},{"uid":"13322081-49"},{"uid":"13322081-28"},{"uid":"13322081-47"},{"uid":"13322081-50"},{"uid":"13322081-6"},{"uid":"13322081-8"},{"uid":"13322081-30"},{"uid":"13322081-32"},{"uid":"13322081-51","dynamic":true}],"importedBy":[{"uid":"13322081-38"}]},"13322081-36":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"13322081-37"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-4"},{"uid":"13322081-44"},{"uid":"13322081-50"},{"uid":"13322081-8"},{"uid":"13322081-6"}],"importedBy":[{"uid":"13322081-38"}]},"13322081-38":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"13322081-39"},"imported":[{"uid":"13322081-46"},{"uid":"13322081-45"},{"uid":"13322081-44"},{"uid":"13322081-47"},{"uid":"13322081-8"},{"uid":"13322081-4"},{"uid":"13322081-10"},{"uid":"13322081-6"},{"uid":"13322081-16"},{"uid":"13322081-12"},{"uid":"13322081-18"},{"uid":"13322081-34"},{"uid":"13322081-36"}],"importedBy":[{"uid":"13322081-42"}]},"13322081-40":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"13322081-41"},"imported":[{"uid":"13322081-48"},{"uid":"13322081-12"},{"uid":"13322081-4"}],"importedBy":[{"uid":"13322081-42"}]},"13322081-42":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"13322081-43"},"imported":[{"uid":"13322081-38"},{"uid":"13322081-4"},{"uid":"13322081-16"},{"uid":"13322081-6"},{"uid":"13322081-8"},{"uid":"13322081-40"},{"uid":"13322081-10"},{"uid":"13322081-44"},{"uid":"13322081-12"},{"uid":"13322081-14"},{"uid":"13322081-45"}],"importedBy":[],"isEntry":true},"13322081-44":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-4"},{"uid":"13322081-36"},{"uid":"13322081-28"},{"uid":"13322081-30"}],"isExternal":true},"13322081-45":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-42"},{"uid":"13322081-38"},{"uid":"13322081-6"},{"uid":"13322081-18"},{"uid":"13322081-34"},{"uid":"13322081-28"},{"uid":"13322081-32"},{"uid":"13322081-20"},{"uid":"13322081-22"},{"uid":"13322081-24"},{"uid":"13322081-26"}],"isExternal":true},"13322081-46":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-38"},{"uid":"13322081-34"},{"uid":"13322081-36"},{"uid":"13322081-30"},{"uid":"13322081-32"},{"uid":"13322081-2"}],"isExternal":true},"13322081-47":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-38"},{"uid":"13322081-34"}],"isExternal":true},"13322081-48":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"13322081-0"},{"uid":"13322081-2"}],"importedBy":[{"uid":"13322081-4"},{"uid":"13322081-16"},{"uid":"13322081-6"},{"uid":"13322081-8"},{"uid":"13322081-40"},{"uid":"13322081-10"}]},"13322081-49":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-34"},{"uid":"13322081-28"},{"uid":"13322081-20"},{"uid":"13322081-22"},{"uid":"13322081-24"},{"uid":"13322081-26"}],"isExternal":true},"13322081-50":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-34"},{"uid":"13322081-36"}],"isExternal":true},"13322081-51":{"id":"three/addons/inspector/Inspector.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-34"}],"isExternal":true},"13322081-52":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-30"}],"isExternal":true},"13322081-53":{"id":"three/examples/jsm/math/SimplexNoise.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"13322081-24"}],"isExternal":true}},"env":{"rollup":"4.63.6"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
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.32",
3
+ "version": "1.0.34",
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.21",
25
+ "@davi-ai/bodyengine-three": "^1.0.23",
26
26
  "@davi-ai/web-speech-cognitive-services-davi": "^3.0.1",
27
27
  "@react-three/drei": "^10.0.0",
28
28
  "@react-three/fiber": "^9.0.0",