@davi-ai/react-bodyengine-three 1.0.23 → 1.0.25
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 +206 -206
- package/dist/stats.html +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import v, { useState as D, useMemo as ye, useEffect as
|
|
2
|
-
import * as
|
|
3
|
-
import { Vector3 as $e, TempNode as et, NodeUpdateType as tt, Matrix4 as
|
|
1
|
+
import v, { useState as D, useMemo as ye, useEffect as V, useRef as se, useCallback as Ye, Suspense as Xe } from "react";
|
|
2
|
+
import * as A from "three/webgpu";
|
|
3
|
+
import { Vector3 as $e, TempNode as et, NodeUpdateType as tt, Matrix4 as X, Vector2 as ge, RenderTarget as be, DepthTexture as we, HalfFloatType as Me, NodeMaterial as st, RendererUtils as Te, Color as rt, QuadMesh as at, FloatType as nt } from "three/webgpu";
|
|
4
4
|
import { Object3D as $s } from "three/webgpu";
|
|
5
|
-
import { CharacterState as
|
|
5
|
+
import { CharacterState as J, CreationTool as ee, AvaturnLoader as ot, AvatarSDKLoader as it, CC3Loader as ct, Character as he } from "@davi-ai/bodyengine-three";
|
|
6
6
|
import { CharacterState as tr, CreationTool as sr, bmlTags as rr, emotionList as ar } from "@davi-ai/bodyengine-three";
|
|
7
7
|
import { useDetectGPU as lt, AdaptiveDpr as ht, PerspectiveCamera as dt, CameraControls as ut, Environment as mt } from "@react-three/drei";
|
|
8
|
-
import { convertToTexture as pt, uniform as
|
|
8
|
+
import { convertToTexture as pt, uniform as Q, passTexture as gt, texture as Ae, velocity as fe, struct as ft, Fn as te, float as Y, vec2 as de, If as ke, vec4 as $, max as oe, ivec2 as yt, luminance as Ce, add as Oe, uv as St, mix as _e, logarithmicDepthToViewZ as xt, viewZToPerspectiveDepth as Pe, getViewPosition as vt, viewZToOrthographicDepth as bt, pass as wt, mrt as Ve, diffuseColor as Mt, output as Ne, directionToColor as Tt, normalView as At, sample as kt, colorToDirection as Ct } from "three/tsl";
|
|
9
9
|
import { ssgi as _t } from "three/addons/tsl/display/SSGINode.js";
|
|
10
|
-
import { Canvas as Pt, useThree as
|
|
11
|
-
import { createSpeechSynthesisPonyfill as
|
|
10
|
+
import { Canvas as Pt, useThree as Vt, useFrame as He } from "@react-three/fiber";
|
|
11
|
+
import { createSpeechSynthesisPonyfill as Nt, SpeechSynthesisUtterance as It } from "@davi-ai/web-speech-cognitive-services-davi";
|
|
12
12
|
const Ie = (e) => {
|
|
13
13
|
let t;
|
|
14
14
|
const s = /* @__PURE__ */ new Set(), r = (h, p) => {
|
|
@@ -31,7 +31,7 @@ function Bt(e, t = Rt) {
|
|
|
31
31
|
const zt = (e) => {
|
|
32
32
|
const t = Ft(e), s = (r) => Bt(t, r);
|
|
33
33
|
return Object.assign(s, t), s;
|
|
34
|
-
},
|
|
34
|
+
}, ae = (e) => zt, k = ae()(() => ({
|
|
35
35
|
character: null,
|
|
36
36
|
managers: [],
|
|
37
37
|
globalManager: null,
|
|
@@ -47,21 +47,21 @@ const zt = (e) => {
|
|
|
47
47
|
characterWidth: 0,
|
|
48
48
|
characterHeight: 0,
|
|
49
49
|
characterDepth: 0,
|
|
50
|
-
characterState:
|
|
50
|
+
characterState: J.idle
|
|
51
51
|
})), Dt = (e) => {
|
|
52
|
-
|
|
52
|
+
k.setState({ character: e }), k.setState({ managers: {
|
|
53
53
|
lipSyncManager: (e == null ? void 0 : e.lipSyncManager) || null,
|
|
54
54
|
blendshapeManager: (e == null ? void 0 : e.blendshapeManager) || null,
|
|
55
55
|
eyeBlinkManager: (e == null ? void 0 : e.eyeBlinkManager) || null,
|
|
56
56
|
animationManager: (e == null ? void 0 : e.animationManager) || null
|
|
57
|
-
} }),
|
|
57
|
+
} }), k.setState({ globalManager: (e == null ? void 0 : e.globalManager) || null }), k.setState({ lipSyncManager: (e == null ? void 0 : e.lipSyncManager) || null }), k.setState({ blendshapeManager: (e == null ? void 0 : e.blendshapeManager) || null }), k.setState({ eyeBlinkManager: (e == null ? void 0 : e.eyeBlinkManager) || null }), k.setState({ animationManager: (e == null ? void 0 : e.animationManager) || null }), k.setState({ FACSManager: (e == null ? void 0 : e.FACSManager) || null }), k.setState({ headPoseManager: (e == null ? void 0 : e.headPoseManager) || null }), k.setState({ gazeManager: (e == null ? void 0 : e.gazeManager) || null }), k.setState({ bmlManager: (e == null ? void 0 : e.bmlManager) || null });
|
|
58
58
|
}, Fe = (e) => {
|
|
59
|
-
|
|
59
|
+
k.setState({ animationsLoaded: e });
|
|
60
60
|
}, jt = (e) => {
|
|
61
|
-
|
|
62
|
-
}, Cs = () =>
|
|
63
|
-
|
|
64
|
-
}, z =
|
|
61
|
+
k.setState({ characterWidth: e.x }), k.setState({ characterHeight: e.y }), k.setState({ characterDepth: e.z });
|
|
62
|
+
}, Cs = () => k.getState().characterHeight, Re = (e) => {
|
|
63
|
+
k.setState({ characterState: e });
|
|
64
|
+
}, z = ae()(() => ({
|
|
65
65
|
cameraRef: null,
|
|
66
66
|
cameraPosition: new $e(0, 0, 5),
|
|
67
67
|
bodyCenter: null,
|
|
@@ -83,7 +83,7 @@ const zt = (e) => {
|
|
|
83
83
|
z.setState({ lookAt: e });
|
|
84
84
|
}, Ps = () => z.getState().lookAt, Ht = (e) => {
|
|
85
85
|
z.setState({ movable: e });
|
|
86
|
-
}, E =
|
|
86
|
+
}, E = ae()(() => ({
|
|
87
87
|
currentAUs: null,
|
|
88
88
|
currentGaze: null,
|
|
89
89
|
currentHeadPose: null,
|
|
@@ -92,9 +92,9 @@ const zt = (e) => {
|
|
|
92
92
|
showFirstTarget: !1
|
|
93
93
|
})), Wt = (e) => {
|
|
94
94
|
E.setState({ targets: e });
|
|
95
|
-
}, Ns = (e) => {
|
|
96
|
-
E.setState({ currentAUs: e });
|
|
97
95
|
}, Vs = (e) => {
|
|
96
|
+
E.setState({ currentAUs: e });
|
|
97
|
+
}, Ns = (e) => {
|
|
98
98
|
E.setState({ currentGaze: e });
|
|
99
99
|
}, Is = (e) => {
|
|
100
100
|
E.setState({ currentHeadPose: e });
|
|
@@ -102,14 +102,14 @@ const zt = (e) => {
|
|
|
102
102
|
E.setState({ lookAtCamera: e }), e ? qt() : Gt();
|
|
103
103
|
}, Fs = (e) => {
|
|
104
104
|
E.setState({ lookAtCamera: e });
|
|
105
|
-
const t =
|
|
105
|
+
const t = k.getState().globalManager;
|
|
106
106
|
if (e) {
|
|
107
107
|
const s = z.getState().cameraRef;
|
|
108
108
|
t == null || t.lookAtAndSteady(s);
|
|
109
109
|
} else
|
|
110
110
|
t == null || t.releaseLookAt();
|
|
111
111
|
}, qt = (e) => {
|
|
112
|
-
const t =
|
|
112
|
+
const t = k.getState().globalManager;
|
|
113
113
|
if (e)
|
|
114
114
|
t == null || t.lookAtAndKeep(e);
|
|
115
115
|
else {
|
|
@@ -118,27 +118,27 @@ const zt = (e) => {
|
|
|
118
118
|
}
|
|
119
119
|
}, Gt = () => {
|
|
120
120
|
var e;
|
|
121
|
-
(e =
|
|
121
|
+
(e = k.getState().globalManager) == null || e.releaseLookAt();
|
|
122
122
|
}, Rs = (e) => {
|
|
123
123
|
E.setState({ showFirstTarget: e });
|
|
124
|
-
},
|
|
124
|
+
}, re = ae()(() => ({
|
|
125
125
|
animationsNames: [],
|
|
126
126
|
animations: /* @__PURE__ */ new Map(),
|
|
127
127
|
currentAnimation: null,
|
|
128
128
|
autoPlay: !0
|
|
129
129
|
})), Jt = (e) => {
|
|
130
|
-
|
|
130
|
+
re.setState({ animationsNames: e });
|
|
131
131
|
}, Kt = (e) => {
|
|
132
|
-
|
|
133
|
-
}, Bs = () =>
|
|
134
|
-
|
|
132
|
+
re.setState({ animations: e });
|
|
133
|
+
}, Bs = () => re.getState().animations, zs = (e) => {
|
|
134
|
+
re.setState({ autoPlay: e });
|
|
135
135
|
}, Ds = (e) => {
|
|
136
|
-
if (
|
|
137
|
-
const s =
|
|
136
|
+
if (re.setState({ autoPlay: !1 }), re.getState().animationsNames.includes(e)) {
|
|
137
|
+
const s = k.getState().animationManager;
|
|
138
138
|
s == null || s.playAnimation(e);
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
var F = /* @__PURE__ */ ((e) => (e.eye = "eye", e.mouth = "mouth", e.neck = "neck", e.clavicle = "clavicle", e.torso = "torso", e.belly = "belly", e.lowerbelly = "lowerbelly", e.hips = "hips", e.higherthigh = "higherthigh", e.thigh = "thigh", e.knee = "knee", e.leg = "leg", e.feet = "feet", e))(F || {}),
|
|
141
|
+
var F = /* @__PURE__ */ ((e) => (e.eye = "eye", e.mouth = "mouth", e.neck = "neck", e.clavicle = "clavicle", e.torso = "torso", e.belly = "belly", e.lowerbelly = "lowerbelly", e.hips = "hips", e.higherthigh = "higherthigh", e.thigh = "thigh", e.knee = "knee", e.leg = "leg", e.feet = "feet", e))(F || {}), G = /* @__PURE__ */ ((e) => (e[e.face = 1] = "face", e[e.eighthleft = 2] = "eighthleft", e[e.thirdleft = 3] = "thirdleft", e[e.quarterleft = 4] = "quarterleft", e[e.halfleft = 5] = "halfleft", e[e.eighthright = 6] = "eighthright", e[e.thirdright = 7] = "thirdright", e[e.quarterright = 8] = "quarterright", e[e.halfright = 9] = "halfright", e))(G || {}), R = /* @__PURE__ */ ((e) => (e[e.veryclose = 1] = "veryclose", e[e.closer = 2] = "closer", e[e.close = 3] = "close", e[e.midclose = 4] = "midclose", e[e.medium = 5] = "medium", e[e.midfar = 6] = "midfar", e[e.far = 7] = "far", e[e.farther = 8] = "farther", e[e.veryfar = 9] = "veryfar", e))(R || {}), le = /* @__PURE__ */ ((e) => (e.cc3 = "CC_Base_Body", e.avatarsdk = "AvatarBody", e.avaturn = "Body_Mesh", e))(le || {}), Se = /* @__PURE__ */ ((e) => (e.Jay = "joy", e.Anger = "anger", e.Contempt = "contempt", e.Disgust = "disgust", e.Dislike = "dislike", e.Distress = "distress", e.Fear = "fear", e.Frustration = "frustration", e.Guilt = "guilt", e.Hope = "hope", e.Love = "love", e.Pride = "pride", e.Regret = "regret", e.Relief = "relief", e.Sadness = "sadness", e.Shame = "shame", e.Smile = "smile", e.Surprise = "surprise", e.Neutral = "neutral", e))(Se || {});
|
|
142
142
|
const De = /* @__PURE__ */ new Map([
|
|
143
143
|
[0, "sil"],
|
|
144
144
|
[1, "aa"],
|
|
@@ -293,7 +293,7 @@ const De = /* @__PURE__ */ new Map([
|
|
|
293
293
|
belly: ss,
|
|
294
294
|
knees: rs,
|
|
295
295
|
feet: as
|
|
296
|
-
},
|
|
296
|
+
}, C = ae()(() => ({
|
|
297
297
|
credentials: void 0,
|
|
298
298
|
currentUtterance: null,
|
|
299
299
|
boundaries: [],
|
|
@@ -307,21 +307,21 @@ const De = /* @__PURE__ */ new Map([
|
|
|
307
307
|
visemeIntensity: 1,
|
|
308
308
|
useBlendshapeManager: !1
|
|
309
309
|
})), ns = (e) => {
|
|
310
|
-
|
|
310
|
+
C.setState({ credentials: e });
|
|
311
311
|
}, os = (e) => {
|
|
312
312
|
if (e) {
|
|
313
|
-
const t =
|
|
313
|
+
const t = C.getState().voice;
|
|
314
314
|
t && (e.voice = t);
|
|
315
315
|
}
|
|
316
|
-
|
|
316
|
+
C.setState({ currentUtterance: e }), C.setState({ textToSpeak: null });
|
|
317
317
|
}, Es = (e) => {
|
|
318
|
-
|
|
318
|
+
C.setState({ visemes: e });
|
|
319
319
|
}, Us = (e) => {
|
|
320
|
-
|
|
320
|
+
C.setState({ blendshapes: e });
|
|
321
321
|
}, We = (e) => {
|
|
322
|
-
|
|
322
|
+
C.setState({ visemes: [...C.getState().visemes, e] });
|
|
323
323
|
}, Ls = (e) => {
|
|
324
|
-
|
|
324
|
+
C.setState({ blendshapes: [...C.getState().blendshapes, e] });
|
|
325
325
|
}, Os = (e, t) => {
|
|
326
326
|
const s = Zt.get(e.name);
|
|
327
327
|
if (s) {
|
|
@@ -329,31 +329,31 @@ const De = /* @__PURE__ */ new Map([
|
|
|
329
329
|
r !== void 0 && We({ ...e, name: `${r}`, elapsedTime: e.elapsedTime * (t || 1e7) });
|
|
330
330
|
}
|
|
331
331
|
}, is = (e) => {
|
|
332
|
-
|
|
332
|
+
C.setState({ currentVisemeIndex: e });
|
|
333
333
|
}, cs = (e) => {
|
|
334
|
-
|
|
334
|
+
C.setState({ currentBlendshapeIndex: e });
|
|
335
335
|
}, qe = () => {
|
|
336
336
|
var e;
|
|
337
|
-
|
|
337
|
+
C.setState({
|
|
338
338
|
visemes: [],
|
|
339
339
|
currentVisemeIndex: 0
|
|
340
|
-
}), (e =
|
|
340
|
+
}), (e = k.getState().lipSyncManager) == null || e.stop();
|
|
341
341
|
}, Ge = () => {
|
|
342
342
|
var e;
|
|
343
|
-
|
|
343
|
+
C.setState({
|
|
344
344
|
blendshapes: [],
|
|
345
345
|
currentBlendshapeIndex: 0
|
|
346
|
-
}), (e =
|
|
346
|
+
}), (e = k.getState().blendshapeManager) == null || e.stop();
|
|
347
347
|
}, ls = (e) => {
|
|
348
|
-
|
|
348
|
+
C.setState({ voice: e });
|
|
349
349
|
}, je = (e) => {
|
|
350
|
-
|
|
350
|
+
C.setState({ voices: e });
|
|
351
351
|
}, Hs = (e) => {
|
|
352
|
-
|
|
353
|
-
}, Ws = () =>
|
|
354
|
-
|
|
352
|
+
C.setState({ textToSpeak: e });
|
|
353
|
+
}, Ws = () => C.getState().voices, qs = (e) => {
|
|
354
|
+
C.setState({ visemeIntensity: e });
|
|
355
355
|
}, hs = (e) => {
|
|
356
|
-
e !==
|
|
356
|
+
e !== C.getState().useBlendshapeManager && (qe(), Ge(), C.setState({ useBlendshapeManager: e }));
|
|
357
357
|
}, ds = (e, t, s) => {
|
|
358
358
|
let r = s[e.position || F.eye].getComponent(0);
|
|
359
359
|
const o = s[e.position || F.mouth].getComponent(1);
|
|
@@ -390,38 +390,38 @@ const De = /* @__PURE__ */ new Map([
|
|
|
390
390
|
n = t.veryfar;
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
393
|
-
if (b && b !==
|
|
393
|
+
if (b && b !== G.face)
|
|
394
394
|
switch (b) {
|
|
395
|
-
case
|
|
395
|
+
case G.eighthleft: {
|
|
396
396
|
const x = 0.2588190451;
|
|
397
397
|
r = r - n * x, n = n * Math.sqrt(1 - Math.pow(x, 2));
|
|
398
398
|
break;
|
|
399
399
|
}
|
|
400
|
-
case
|
|
400
|
+
case G.thirdleft:
|
|
401
401
|
r = r - n * (1 / 2), n = n * (Math.sqrt(3) / 2);
|
|
402
402
|
break;
|
|
403
|
-
case
|
|
403
|
+
case G.quarterleft:
|
|
404
404
|
r = r - n * (Math.SQRT2 / 2), n = n * (Math.SQRT2 / 2);
|
|
405
405
|
break;
|
|
406
|
-
case
|
|
406
|
+
case G.halfleft:
|
|
407
407
|
r = r - n, n = s.eye.getComponent(2);
|
|
408
408
|
break;
|
|
409
|
-
case
|
|
409
|
+
case G.eighthright: {
|
|
410
410
|
const x = 0.2588190451;
|
|
411
411
|
r = r + n * x, n = n * Math.sqrt(1 - Math.pow(x, 2));
|
|
412
412
|
break;
|
|
413
413
|
}
|
|
414
|
-
case
|
|
414
|
+
case G.thirdright:
|
|
415
415
|
r = r + n * (1 / 2), n = n * (Math.sqrt(3) / 2);
|
|
416
416
|
break;
|
|
417
|
-
case
|
|
417
|
+
case G.quarterright:
|
|
418
418
|
r = r + n * (Math.SQRT2 / 2), n = n * (Math.SQRT2 / 2);
|
|
419
419
|
break;
|
|
420
|
-
case
|
|
420
|
+
case G.halfright:
|
|
421
421
|
r = r + n, n = s.eye.getComponent(2);
|
|
422
422
|
break;
|
|
423
423
|
}
|
|
424
|
-
return new
|
|
424
|
+
return new A.Vector3(r, o, n);
|
|
425
425
|
}, me = /* @__PURE__ */ new at(), Ee = /* @__PURE__ */ new ge();
|
|
426
426
|
let pe;
|
|
427
427
|
function Je(e) {
|
|
@@ -478,7 +478,7 @@ class us extends et {
|
|
|
478
478
|
return "PMJTAANode";
|
|
479
479
|
}
|
|
480
480
|
constructor(t, s, r, o) {
|
|
481
|
-
super("vec4"), this.isPMJTAANode = !0, this.updateBeforeType = tt.FRAME, this.beautyNode = t, this.depthNode = s, this.velocityNode = r, this.camera = o, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this.jitterIntensity = 1, this.useProgressiveAccumulation = !1, this._accumulatedFrames = 0, this.maxAccumulationFrames = 256, this._prevCameraMatrix = new
|
|
481
|
+
super("vec4"), this.isPMJTAANode = !0, this.updateBeforeType = tt.FRAME, this.beautyNode = t, this.depthNode = s, this.velocityNode = r, this.camera = o, this.depthThreshold = 5e-4, this.edgeDepthDiff = 1e-3, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this.jitterIntensity = 1, this.useProgressiveAccumulation = !1, this._accumulatedFrames = 0, this.maxAccumulationFrames = 256, this._prevCameraMatrix = new X(), this._progressiveWeight = Q(0), this._jitterIndex = 0, this._sampleCount = 64, this._sequenceLength = Ue.length, this._sequence = Ue, this._invSize = Q(new ge()), this._historyRenderTarget = new be(1, 1, { depthBuffer: !1, type: Me, depthTexture: new we() }), this._historyRenderTarget.texture.name = "PMJTAANode.history", this._resolveRenderTarget = new be(1, 1, { depthBuffer: !1, type: Me }), this._resolveRenderTarget.texture.name = "PMJTAANode.resolve", this._resolveMaterial = new st(), this._resolveMaterial.name = "PMJTAA.resolve", this._textureNode = gt(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new X(), this._cameraNearFar = Q(new ge()), this._cameraWorldMatrix = Q(new X()), this._cameraWorldMatrixInverse = Q(new X()), this._cameraProjectionMatrixInverse = Q(new X()), this._previousCameraWorldMatrix = Q(new X()), this._previousCameraProjectionMatrixInverse = Q(new X()), this._previousDepthNode = Ae(new we(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
|
|
482
482
|
}
|
|
483
483
|
getTextureNode() {
|
|
484
484
|
return this._textureNode;
|
|
@@ -573,7 +573,7 @@ class us extends et {
|
|
|
573
573
|
closestPositionTexel: "vec2",
|
|
574
574
|
farthestDepth: "float"
|
|
575
575
|
}), n = te(([i]) => {
|
|
576
|
-
const l =
|
|
576
|
+
const l = Y(2).toVar(), y = de(0).toVar(), d = Y(-1).toVar();
|
|
577
577
|
for (let c = -1; c <= 1; ++c)
|
|
578
578
|
for (let a = -1; a <= 1; ++a) {
|
|
579
579
|
const S = i.add(de(c, a)).toVar();
|
|
@@ -588,12 +588,12 @@ class us extends et {
|
|
|
588
588
|
}), f = (i) => {
|
|
589
589
|
let l = this._previousDepthNode.sample(i).r;
|
|
590
590
|
t.renderer.logarithmicDepthBuffer && (l = r(l));
|
|
591
|
-
const y = vt(i, l, this._previousCameraProjectionMatrixInverse), d = this._previousCameraWorldMatrix.mul(
|
|
591
|
+
const y = vt(i, l, this._previousCameraProjectionMatrixInverse), d = this._previousCameraWorldMatrix.mul($(y, 1)).xyz, c = this._cameraWorldMatrixInverse.mul($(d, 1)).z;
|
|
592
592
|
return this.camera.isOrthographicCamera ? bt(c, this._cameraNearFar.x, this._cameraNearFar.y) : Pe(c, this._cameraNearFar.x, this._cameraNearFar.y);
|
|
593
593
|
}, b = te(([i, l, y, d]) => {
|
|
594
|
-
const c = d.rgb.add(y.rgb).mul(0.5), a = d.rgb.sub(y.rgb).mul(0.5).add(1e-7), S = l.sub(
|
|
594
|
+
const c = d.rgb.add(y.rgb).mul(0.5), a = d.rgb.sub(y.rgb).mul(0.5).add(1e-7), S = l.sub($(c, i.a)), P = S.xyz.div(a).abs(), B = oe(P.x, P.y, P.z);
|
|
595
595
|
return B.greaterThan(1).select(
|
|
596
|
-
|
|
596
|
+
$(c, i.a).add(S.div(B)),
|
|
597
597
|
l
|
|
598
598
|
);
|
|
599
599
|
}).setLayout({
|
|
@@ -616,12 +616,12 @@ class us extends et {
|
|
|
616
616
|
[0, 1],
|
|
617
617
|
[-1, 0]
|
|
618
618
|
], a = l.toVar(), S = l.pow2().toVar();
|
|
619
|
-
for (const [
|
|
620
|
-
const
|
|
621
|
-
a.addAssign(
|
|
619
|
+
for (const [U, q] of c) {
|
|
620
|
+
const I = this.beautyNode.offset(yt(U, q)).load(i).max(0), L = $(I.rgb.mul(I.a), I.a);
|
|
621
|
+
a.addAssign(L), S.addAssign(L.pow2());
|
|
622
622
|
}
|
|
623
|
-
const m =
|
|
624
|
-
return b(
|
|
623
|
+
const m = Y(c.length + 1), P = a.div(m), B = S.div(m).sub(P.pow2()).max(0).sqrt().mul(d), u = P.sub(B), M = P.add(B);
|
|
624
|
+
return b(P.clamp(u, M), y, u, M);
|
|
625
625
|
}), h = te(([i, l]) => {
|
|
626
626
|
const d = i.mul(l).fract().abs(), c = oe(d, d.oneMinus());
|
|
627
627
|
return c.x.mul(c.y).oneMinus().div(0.75);
|
|
@@ -633,21 +633,21 @@ class us extends et {
|
|
|
633
633
|
{ name: "textureSize", type: "ivec2" }
|
|
634
634
|
]
|
|
635
635
|
}), p = te(([i, l, y]) => {
|
|
636
|
-
const d = y.oneMinus(), c = i.mul(
|
|
637
|
-
return y.mulAssign(
|
|
636
|
+
const d = y.oneMinus(), c = i.mul(Y(1).div(oe(i.r, i.g, i.b).add(1))), a = l.mul(Y(1).div(oe(l.r, l.g, l.b).add(1))), S = Ce(c.rgb), m = Ce(a.rgb);
|
|
637
|
+
return y.mulAssign(Y(1).div(S.add(1))), d.mulAssign(Y(1).div(m.add(1))), Oe(i.mul(y), l.mul(d)).div(oe(y.add(d), 1e-5)).toVar();
|
|
638
638
|
}), g = Ae(this._historyRenderTarget.texture), w = te(() => {
|
|
639
|
-
const i = St(), l = this.beautyNode.size(), y = i.mul(l), d = n(y), c = d.get("closestDepth"), a = d.get("closestPositionTexel"), S = d.get("farthestDepth"), m = this.velocityNode.load(a).xy.mul(de(0.5, -0.5)),
|
|
640
|
-
this.useSubpixelCorrection &&
|
|
641
|
-
const
|
|
642
|
-
|
|
643
|
-
const
|
|
644
|
-
|
|
645
|
-
x(y,
|
|
646
|
-
)
|
|
647
|
-
|
|
648
|
-
|
|
639
|
+
const i = St(), l = this.beautyNode.size(), y = i.mul(l), d = n(y), c = d.get("closestDepth"), a = d.get("closestPositionTexel"), S = d.get("farthestDepth"), m = this.velocityNode.load(a).xy.mul(de(0.5, -0.5)), P = i.sub(m), B = f(P), u = P.greaterThanEqual(0).all().and(P.lessThanEqual(1).all()), M = S.sub(c).greaterThan(this.edgeDepthDiff), U = c.sub(B).greaterThan(this.depthThreshold), q = u.and(M.or(U.not())), I = this.beautyNode.sample(i), L = g.sample(i.sub(m)), ne = $(I.rgb.mul(I.a), I.a).toVar(), ce = i.sub(P).mul(l).length().div(this.maxVelocityLength).saturate().sqrt(), T = Y(0.05).toVar();
|
|
640
|
+
this.useSubpixelCorrection && T.addAssign(h(m, l).mul(0.5)), T.assign(q.select(T.add(ce.mul(0.6)).saturate(), 1));
|
|
641
|
+
const _ = this._progressiveWeight, N = _.greaterThan(0).and(q);
|
|
642
|
+
T.assign(N.select(_, T));
|
|
643
|
+
const O = _e(0.25, 1.25, ce.oneMinus().pow2()), Z = N.select(
|
|
644
|
+
L,
|
|
645
|
+
x(y, ne, L, O)
|
|
646
|
+
);
|
|
647
|
+
return N.select(
|
|
648
|
+
_e(Z, ne, T),
|
|
649
|
+
p(ne, Z, T)
|
|
649
650
|
);
|
|
650
|
-
return se(Z.rgb.mul(Z.a), Z.a);
|
|
651
651
|
});
|
|
652
652
|
return this._resolveMaterial.fragmentNode = w(), this._textureNode;
|
|
653
653
|
}
|
|
@@ -656,41 +656,41 @@ class us extends et {
|
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
659
|
-
const e =
|
|
659
|
+
const e = k((a) => a.animationsLoaded), t = k((a) => a.characterState), s = k((a) => a.lipSyncManager), r = k((a) => a.blendshapeManager), o = C((a) => a.credentials), n = C((a) => a.currentUtterance), f = C((a) => a.textToSpeak), b = C((a) => a.visemes), x = C((a) => a.blendshapes), h = C((a) => a.visemeIntensity), p = C((a) => a.currentVisemeIndex), g = C((a) => a.currentBlendshapeIndex), w = C((a) => a.useBlendshapeManager), [i, l] = D(!1), [y, d] = D(!1), c = ye(() => o != null && o.region && (o.subscriptionKey || o.token) ? Nt({
|
|
660
660
|
credentials: {
|
|
661
661
|
region: o.region,
|
|
662
662
|
authorizationToken: o.token,
|
|
663
663
|
subscriptionKey: o.subscriptionKey
|
|
664
664
|
}
|
|
665
665
|
}) : null, [o]);
|
|
666
|
-
return
|
|
666
|
+
return V(() => {
|
|
667
667
|
if (c) {
|
|
668
668
|
const a = c.speechSynthesis.getVoices();
|
|
669
669
|
a && Array.isArray(a) && a.length ? (je(a), l(!0)) : c.speechSynthesis.onvoiceschanged = () => {
|
|
670
670
|
je(c.speechSynthesis.getVoices()), l(!0);
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
|
-
}, [c]),
|
|
673
|
+
}, [c]), V(() => {
|
|
674
674
|
i && (w ? !!r : !!s) && e && d(!0);
|
|
675
|
-
}, [i, s, r, e, w]),
|
|
675
|
+
}, [i, s, r, e, w]), V(() => {
|
|
676
676
|
if (f) {
|
|
677
677
|
const a = new It(f);
|
|
678
678
|
os(a);
|
|
679
679
|
}
|
|
680
|
-
}, [f]),
|
|
680
|
+
}, [f]), V(() => {
|
|
681
681
|
var a, S;
|
|
682
682
|
n && y ? (n.onstart = () => {
|
|
683
|
-
console.log("Start"), Re(
|
|
683
|
+
console.log("Start"), Re(J.speaking);
|
|
684
684
|
}, n.onend = () => {
|
|
685
|
-
console.log("End"), Re(
|
|
685
|
+
console.log("End"), Re(J.idle);
|
|
686
686
|
}, n.onboundary = () => {
|
|
687
687
|
}, n.onviseme = (m) => {
|
|
688
688
|
We(m);
|
|
689
689
|
}, (a = c == null ? void 0 : c.speechSynthesis) == null || a.speak(n, null)) : (S = c == null ? void 0 : c.speechSynthesis) == null || S.cancel();
|
|
690
|
-
}, [n]),
|
|
690
|
+
}, [n]), V(() => {
|
|
691
691
|
s && (s.visemeIntensity = h);
|
|
692
|
-
}, [h]),
|
|
693
|
-
if (!w && s && t ===
|
|
692
|
+
}, [h]), V(() => {
|
|
693
|
+
if (!w && s && t === J.speaking) {
|
|
694
694
|
if (!s.isStarted && s.start(), b.length > 1 && p === 0)
|
|
695
695
|
b.forEach((a) => {
|
|
696
696
|
const S = parseInt(a.name);
|
|
@@ -703,14 +703,14 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
703
703
|
for (let a = p + 1; a < b.length; a++) {
|
|
704
704
|
const S = b[a], m = parseInt(S.name);
|
|
705
705
|
if (!isNaN(m)) {
|
|
706
|
-
const
|
|
707
|
-
|
|
706
|
+
const P = De.get(m);
|
|
707
|
+
P && s.PlayVisemeAsync(P, S.elapsedTime / 1e4);
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
is(b.length - 1);
|
|
711
711
|
}
|
|
712
|
-
}, [t, b, s, w]),
|
|
713
|
-
if (w && r && t ===
|
|
712
|
+
}, [t, b, s, w]), V(() => {
|
|
713
|
+
if (w && r && t === J.speaking) {
|
|
714
714
|
if (!r.isStarted && r.start(), x.length > 1 && g === 0)
|
|
715
715
|
x.forEach((a) => {
|
|
716
716
|
r.PlayBlendShapeAsync(a);
|
|
@@ -722,32 +722,32 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
722
722
|
}
|
|
723
723
|
cs(x.length - 1);
|
|
724
724
|
}
|
|
725
|
-
}, [t, x, r, w]),
|
|
726
|
-
t !==
|
|
725
|
+
}, [t, x, r, w]), V(() => {
|
|
726
|
+
t !== J.speaking && (qe(), Ge());
|
|
727
727
|
}, [t]), null;
|
|
728
728
|
}, ps = ({ points: e, color: t = "red" }) => {
|
|
729
729
|
const s = ye(() => {
|
|
730
|
-
const r = new
|
|
731
|
-
return new
|
|
730
|
+
const r = new A.BufferGeometry().setFromPoints(e), o = new A.LineBasicMaterial({ color: t, toneMapped: !1 });
|
|
731
|
+
return new A.Line(r, o);
|
|
732
732
|
}, [e, t]);
|
|
733
733
|
return /* @__PURE__ */ v.createElement("primitive", { object: s });
|
|
734
734
|
}, gs = ({ parentGpuTier: e, setIsGpuAvailable: t, children: s, tonemapping: r }) => {
|
|
735
|
-
const o = z((u) => u.cameraPosition), n = z((u) => u.lookAt), f = z((u) => u.movable), b = E((u) => u.targets), x = E((u) => u.showFirstTarget), [h] = D(e || lt()), [p, g] = D(), [w, i] = D(null), [l, y] = D(void 0), d =
|
|
735
|
+
const o = z((u) => u.cameraPosition), n = z((u) => u.lookAt), f = z((u) => u.movable), b = E((u) => u.targets), x = E((u) => u.showFirstTarget), [h] = D(e || lt()), [p, g] = D(), [w, i] = D(null), [l, y] = D(void 0), d = se(null), c = se(null), a = se(null), S = (u) => {
|
|
736
736
|
u.preventDefault(), u.stopPropagation();
|
|
737
737
|
};
|
|
738
|
-
|
|
738
|
+
V(() => {
|
|
739
739
|
Et(c.current);
|
|
740
|
-
}, [c.current]),
|
|
741
|
-
var u, M,
|
|
740
|
+
}, [c.current]), V(() => {
|
|
741
|
+
var u, M, U, q;
|
|
742
742
|
if (f)
|
|
743
743
|
w == null || w.abort(), i(null);
|
|
744
744
|
else {
|
|
745
|
-
const
|
|
746
|
-
i(
|
|
745
|
+
const I = new AbortController();
|
|
746
|
+
i(I), (u = d.current) == null || u.addEventListener("wheel", S, { passive: !1, signal: I.signal }), (M = d.current) == null || M.addEventListener("pointerdown", S, { passive: !1, signal: I.signal }), (U = d.current) == null || U.addEventListener("pointermove", S, { passive: !1, signal: I.signal }), (q = d.current) == null || q.addEventListener("click", S, { passive: !1, signal: I.signal });
|
|
747
747
|
}
|
|
748
|
-
}, [f]),
|
|
748
|
+
}, [f]), V(() => {
|
|
749
749
|
a != null && a.current && n && o && a.current.setLookAt(o.x, o.y, o.z, n.x, n.y, n.z, !0);
|
|
750
|
-
}, [o, n]),
|
|
750
|
+
}, [o, n]), V(() => {
|
|
751
751
|
if (h)
|
|
752
752
|
if (h.type === "FALLBACK")
|
|
753
753
|
g(
|
|
@@ -782,57 +782,57 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
782
782
|
);
|
|
783
783
|
break;
|
|
784
784
|
}
|
|
785
|
-
}, [h]),
|
|
785
|
+
}, [h]), V(() => {
|
|
786
786
|
switch (p && (m.current = p), p) {
|
|
787
787
|
case "low":
|
|
788
788
|
console.warn("Retorik React-Bodyengine-Three > GPU tier too low, no rendering available"), t(!1);
|
|
789
789
|
break;
|
|
790
790
|
case "medium":
|
|
791
|
-
y([0.
|
|
791
|
+
y([0.9, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${p}`), t(!0);
|
|
792
792
|
break;
|
|
793
793
|
case "high":
|
|
794
794
|
y([1, 2]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${p}`), t(!0);
|
|
795
795
|
break;
|
|
796
796
|
}
|
|
797
797
|
}, [p]);
|
|
798
|
-
const m =
|
|
799
|
-
const M = new
|
|
798
|
+
const m = se(void 0), P = Ye(async (u) => {
|
|
799
|
+
const M = new A.WebGPURenderer({
|
|
800
800
|
canvas: u.canvas,
|
|
801
801
|
antialias: !1,
|
|
802
802
|
alpha: !0,
|
|
803
803
|
powerPreference: "high-performance"
|
|
804
804
|
});
|
|
805
|
-
return M.setClearColor(new
|
|
805
|
+
return M.setClearColor(new A.Color("#000000"), 0), M.setPixelRatio(devicePixelRatio), M.shadowMap.type = A.PCFSoftShadowMap, await M.init(), M;
|
|
806
806
|
}, []), B = ye(() => {
|
|
807
807
|
if (b.length) {
|
|
808
|
-
const u = b[0], M = new
|
|
809
|
-
return [M,
|
|
808
|
+
const u = b[0], M = new A.Vector3(u.position.x - 0.5, u.position.y, u.position.z - 0.1), U = new A.Vector3(u.position.x + 0.5, u.position.y, u.position.z - 0.1);
|
|
809
|
+
return [M, U];
|
|
810
810
|
} else if (o) {
|
|
811
|
-
const u = new
|
|
811
|
+
const u = new A.Vector3(o.x - 0.5, o.y, o.z - 0.1), M = new A.Vector3(o.x + 0.5, o.y, o.z - 0.1);
|
|
812
812
|
return [u, M];
|
|
813
813
|
}
|
|
814
814
|
return [];
|
|
815
815
|
}, [b, o]);
|
|
816
|
-
return l ? /* @__PURE__ */ v.createElement(Pt, { gl:
|
|
816
|
+
return l ? /* @__PURE__ */ v.createElement(Pt, { gl: P, dpr: l, ref: d, shadows: !0 }, /* @__PURE__ */ v.createElement(fs, { tonemapping: r, processedTier: p }), /* @__PURE__ */ v.createElement(ht, null), /* @__PURE__ */ v.createElement(ms, null), /* @__PURE__ */ v.createElement(dt, { ref: c, makeDefault: !0, fov: 28 }), /* @__PURE__ */ v.createElement(ut, { ref: a }), x && B.length && /* @__PURE__ */ v.createElement(ps, { points: B, color: "red" }), /* @__PURE__ */ v.createElement(Xe, { fallback: null }, s)) : /* @__PURE__ */ v.createElement(v.Fragment, null);
|
|
817
817
|
}, fs = ({ tonemapping: e, processedTier: t }) => {
|
|
818
|
-
const { gl: s, scene: r, camera: o, size: n } =
|
|
819
|
-
return
|
|
820
|
-
s && (s.shadowMap.type =
|
|
821
|
-
}, [s, e]),
|
|
818
|
+
const { gl: s, scene: r, camera: o, size: n } = Vt(), [f] = D(new A.Vector3(-3, 2, 2)), [b] = D(new A.Vector3(0, 1, 0)), [x] = D(2), [h] = D(-3e-3), [p] = D(0.6), g = se(null), w = se(null);
|
|
819
|
+
return V(() => {
|
|
820
|
+
s && (s.shadowMap.type = A.PCFSoftShadowMap, s.toneMapping = e, t !== "low" ? r.environmentIntensity = p : r.environmentIntensity = 1);
|
|
821
|
+
}, [s, e]), V(() => {
|
|
822
822
|
r.environmentIntensity = p;
|
|
823
|
-
}, [p]),
|
|
823
|
+
}, [p]), V(() => {
|
|
824
824
|
if (!s || !r || !o || !t) return;
|
|
825
825
|
r.background = null;
|
|
826
826
|
const i = t === "high", l = wt(r, o);
|
|
827
827
|
l.setMRT(
|
|
828
|
-
i ?
|
|
828
|
+
i ? Ve({ output: Ne, diffuseColor: Mt, normal: Tt(At), velocity: fe }) : Ve({ output: Ne, velocity: fe })
|
|
829
829
|
);
|
|
830
830
|
let y;
|
|
831
831
|
if (i) {
|
|
832
|
-
const c = l.getTextureNode("output"), a = l.getTextureNode("diffuseColor"), S = l.getTextureNode("depth"), m = l.getTextureNode("velocity"),
|
|
832
|
+
const c = l.getTextureNode("output"), a = l.getTextureNode("diffuseColor"), S = l.getTextureNode("depth"), m = l.getTextureNode("velocity"), P = l.getTextureNode("normal"), B = kt((L) => Ct(P.sample(L))), u = _t(c, S, B, o);
|
|
833
833
|
u.aoIntensity.value = 1, u.giIntensity.value = 5, u.sliceCount.value = 2, u.stepCount.value = 8, u.thickness.value = 0.03, u.radius.value = 0.5, u.expFactor.value = 0.1, u.backfaceLighting.value = 0.1;
|
|
834
|
-
const M = u.rgb,
|
|
835
|
-
|
|
834
|
+
const M = u.rgb, U = u.a, q = $(Oe(c.rgb.mul(U), a.rgb.mul(M)), c.a), I = Le(q, S, m, o);
|
|
835
|
+
I.jitterIntensity = 0.25, y = I;
|
|
836
836
|
} else {
|
|
837
837
|
const c = Le(
|
|
838
838
|
l,
|
|
@@ -842,17 +842,17 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
842
842
|
);
|
|
843
843
|
c.jitterIntensity = 0.25, y = c;
|
|
844
844
|
}
|
|
845
|
-
const d = new
|
|
845
|
+
const d = new A.RenderPipeline(s);
|
|
846
846
|
return d.outputNode = y, w.current = d, () => {
|
|
847
847
|
d.dispose(), w.current = null;
|
|
848
848
|
};
|
|
849
|
-
}, [s, r, o, t]),
|
|
849
|
+
}, [s, r, o, t]), V(() => {
|
|
850
850
|
!s || !n || s.setSize(n.width, n.height);
|
|
851
851
|
}, [n]), He(({ gl: i, scene: l, camera: y }) => {
|
|
852
852
|
w.current && w.current.render();
|
|
853
|
-
}, 1), /* @__PURE__ */ v.createElement(v.Fragment, null, t !== "low" && s && /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement("directionalLight", { ref: g, color: "white", position: f.toArray(), "target-position": b.toArray(), intensity: x, castShadow: !0, "shadow-mapSize-width":
|
|
853
|
+
}, 1), /* @__PURE__ */ v.createElement(v.Fragment, null, t !== "low" && s && /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement("directionalLight", { ref: g, color: "white", position: f.toArray(), "target-position": b.toArray(), intensity: x, castShadow: !0, "shadow-mapSize-width": 512, "shadow-mapSize-height": 512, "shadow-bias": h, "shadow-intensity": 0.7, "shadow-radius": 1.5 }, /* @__PURE__ */ v.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 8] })), /* @__PURE__ */ v.createElement("directionalLight", { name: "DirectionalLight2", color: "white", position: [0, 1, -1], intensity: 0.5 })));
|
|
854
854
|
}, ys = ({ character: e, autoLookAt: t }) => {
|
|
855
|
-
const s =
|
|
855
|
+
const s = k((h) => h.characterState), r = E((h) => h.currentAUs), o = E((h) => h.currentGaze), n = E((h) => h.currentHeadPose), f = E((h) => h.lookAtCamera), b = z((h) => h.cameraPosition), x = E((h) => h.targets);
|
|
856
856
|
return He((h, p) => {
|
|
857
857
|
const g = {
|
|
858
858
|
deltaTime: p,
|
|
@@ -865,43 +865,43 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
865
865
|
targets: x
|
|
866
866
|
};
|
|
867
867
|
e.update(g);
|
|
868
|
-
}),
|
|
868
|
+
}), V(() => {
|
|
869
869
|
if (t)
|
|
870
870
|
switch (s) {
|
|
871
|
-
case
|
|
872
|
-
case
|
|
871
|
+
case J.idle:
|
|
872
|
+
case J.waiting:
|
|
873
873
|
ue(!1);
|
|
874
874
|
break;
|
|
875
|
-
case
|
|
876
|
-
case
|
|
875
|
+
case J.listening:
|
|
876
|
+
case J.speaking:
|
|
877
877
|
ue(!0);
|
|
878
878
|
break;
|
|
879
879
|
}
|
|
880
880
|
else
|
|
881
881
|
ue(!1);
|
|
882
|
-
}, [s, t]),
|
|
882
|
+
}, [s, t]), V(() => {
|
|
883
883
|
Dt(e);
|
|
884
884
|
}, [e]), null;
|
|
885
|
-
}, Gs = ({ url: e, type: t, animationsUrl: s, gender: r, speechSynthesis: o, camera: n, onLoadingCompleted: f, autoLookAt: b, breathing: x, disableAnimations: h, debug: p, enableBml: g, animationWeights: w, license: i, detectGpuData: l, environmentPreset: y = "apartment", tonemapping: d =
|
|
886
|
-
const S =
|
|
887
|
-
let
|
|
885
|
+
}, Gs = ({ url: e, type: t, animationsUrl: s, gender: r, speechSynthesis: o, camera: n, onLoadingCompleted: f, autoLookAt: b, breathing: x, disableAnimations: h, debug: p, enableBml: g, animationWeights: w, license: i, detectGpuData: l, environmentPreset: y = "apartment", tonemapping: d = A.NeutralToneMapping, targets: c, useBlendshapeManager: a = !1 }) => {
|
|
886
|
+
const S = k((T) => T.animationsLoaded), m = z((T) => T.defaultPositions), P = z((T) => T.defaultDistances), [B, u] = D(), [M, U] = D(null), [q, I] = D(), [L, ne] = D(!1), xe = async (T) => {
|
|
887
|
+
let _ = null;
|
|
888
888
|
switch (t) {
|
|
889
889
|
case ee.cc3:
|
|
890
|
-
|
|
890
|
+
_ = new ct(), I(le.cc3);
|
|
891
891
|
break;
|
|
892
892
|
case ee.avatarsdk:
|
|
893
|
-
|
|
893
|
+
_ = new it(), I(le.avatarsdk);
|
|
894
894
|
break;
|
|
895
895
|
case ee.avaturn:
|
|
896
|
-
|
|
896
|
+
_ = new ot(), I(le.avaturn);
|
|
897
897
|
break;
|
|
898
898
|
}
|
|
899
|
-
const
|
|
900
|
-
if (
|
|
901
|
-
let
|
|
899
|
+
const N = await _.loadAsync(T).catch((O) => console.warn("Error loading character : ", O));
|
|
900
|
+
if (N) {
|
|
901
|
+
let O = null;
|
|
902
902
|
const Z = {
|
|
903
|
-
mesh:
|
|
904
|
-
onAnimationsLoaded:
|
|
903
|
+
mesh: N,
|
|
904
|
+
onAnimationsLoaded: ve,
|
|
905
905
|
animationsUrl: s,
|
|
906
906
|
gender: r || "male",
|
|
907
907
|
type: t,
|
|
@@ -913,84 +913,84 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
913
913
|
};
|
|
914
914
|
switch (t) {
|
|
915
915
|
case ee.cc3:
|
|
916
|
-
|
|
916
|
+
O = await he.fromCharacterCreator(Z);
|
|
917
917
|
break;
|
|
918
918
|
case ee.avatarsdk:
|
|
919
|
-
|
|
919
|
+
O = await he.fromAvatarSDK(Z);
|
|
920
920
|
break;
|
|
921
921
|
case ee.avaturn:
|
|
922
|
-
|
|
922
|
+
O = await he.fromAvaturn(Z);
|
|
923
923
|
break;
|
|
924
924
|
}
|
|
925
|
-
|
|
925
|
+
O && U(O);
|
|
926
926
|
}
|
|
927
|
-
},
|
|
927
|
+
}, ve = () => {
|
|
928
928
|
Fe(!0);
|
|
929
929
|
};
|
|
930
|
-
|
|
931
|
-
var
|
|
932
|
-
M && S && (x === !1 && ((
|
|
930
|
+
V(() => {
|
|
931
|
+
var T, _;
|
|
932
|
+
M && S && (x === !1 && ((_ = (T = M.animationManager) == null ? void 0 : T.disableBreathing) == null || _.call(T)), L ? (Jt(M.getAllAnimationNames()), Kt(M.getAllAnimations()), setTimeout(() => {
|
|
933
933
|
f == null || f();
|
|
934
|
-
}, 1e3)) :
|
|
935
|
-
}, [M, S,
|
|
934
|
+
}, 1e3)) : ce());
|
|
935
|
+
}, [M, S, L]), V(() => {
|
|
936
936
|
Wt(c || []);
|
|
937
|
-
}, [c]),
|
|
938
|
-
Fe(!1), B !== void 0 && (B ?
|
|
939
|
-
}, [e, B]),
|
|
940
|
-
if (
|
|
937
|
+
}, [c]), V(() => {
|
|
938
|
+
Fe(!1), B !== void 0 && (B ? xe(e) : f == null || f());
|
|
939
|
+
}, [e, B]), V(() => {
|
|
940
|
+
if (L && P && m)
|
|
941
941
|
if (n) {
|
|
942
|
-
const
|
|
943
|
-
Be(
|
|
942
|
+
const T = ds(n, P, m);
|
|
943
|
+
Be(T), ze(n.lookAt ? m[n.lookAt] : m.lowerbelly), Ht(!!n.movable);
|
|
944
944
|
} else {
|
|
945
|
-
const
|
|
946
|
-
|
|
945
|
+
const T = m.mouth.clone();
|
|
946
|
+
T.setComponent(2, P.farther), Be(T), ze(m.lowerbelly);
|
|
947
947
|
}
|
|
948
|
-
}, [
|
|
948
|
+
}, [L, n, P, m]), V(() => {
|
|
949
949
|
o && (o.credentials && ns(o.credentials), o.voice && ls(o.voice));
|
|
950
|
-
}, [o]),
|
|
950
|
+
}, [o]), V(() => {
|
|
951
951
|
hs(a);
|
|
952
952
|
}, [a]);
|
|
953
|
-
const
|
|
954
|
-
if (M &&
|
|
953
|
+
const ce = () => {
|
|
954
|
+
if (M && q) {
|
|
955
955
|
try {
|
|
956
|
-
const
|
|
957
|
-
Ut(
|
|
958
|
-
const Z = Math.abs(
|
|
956
|
+
const T = new A.Box3().setFromObject(M), _ = T.max, N = T.min, O = new A.Vector3((_.x + N.x) / 2, (_.y + N.y) / 2, (_.z + N.z) / 2);
|
|
957
|
+
Ut(O);
|
|
958
|
+
const Z = Math.abs(_.x - N.x), j = Math.abs(_.y - N.y), Ke = Math.abs(_.z - N.z);
|
|
959
959
|
jt({
|
|
960
960
|
x: Z,
|
|
961
961
|
y: j,
|
|
962
962
|
z: Ke
|
|
963
963
|
});
|
|
964
|
-
const
|
|
965
|
-
eye: new
|
|
966
|
-
mouth: new
|
|
967
|
-
neck: new
|
|
968
|
-
clavicle: new
|
|
969
|
-
torso: new
|
|
970
|
-
belly: new
|
|
971
|
-
lowerbelly: new
|
|
972
|
-
hips:
|
|
973
|
-
higherthigh: new
|
|
974
|
-
thigh: new
|
|
975
|
-
knee: new
|
|
976
|
-
leg: new
|
|
977
|
-
feet: new
|
|
978
|
-
},
|
|
979
|
-
veryclose:
|
|
980
|
-
closer:
|
|
981
|
-
close:
|
|
982
|
-
midclose:
|
|
983
|
-
medium:
|
|
984
|
-
midfar:
|
|
985
|
-
far:
|
|
986
|
-
farther:
|
|
987
|
-
veryfar:
|
|
964
|
+
const H = (_.x + N.x) / 2, W = (_.z + N.z) / 2, Ze = {
|
|
965
|
+
eye: new A.Vector3(H, _.y - j / 16, W),
|
|
966
|
+
mouth: new A.Vector3(H, _.y - j / 12, W),
|
|
967
|
+
neck: new A.Vector3(H, _.y - j / 8, W),
|
|
968
|
+
clavicle: new A.Vector3(H, _.y - j / 6, W),
|
|
969
|
+
torso: new A.Vector3(H, _.y - j / 4, W),
|
|
970
|
+
belly: new A.Vector3(H, _.y - j / 8 * 3, W),
|
|
971
|
+
lowerbelly: new A.Vector3(H, _.y - j / 32 * 15, W),
|
|
972
|
+
hips: O,
|
|
973
|
+
higherthigh: new A.Vector3(H, N.y + j / 32 * 15, W),
|
|
974
|
+
thigh: new A.Vector3(H, N.y + j / 8 * 3, W),
|
|
975
|
+
knee: new A.Vector3(H, N.y + j / 4, W),
|
|
976
|
+
leg: new A.Vector3(H, N.y + j / 8, W),
|
|
977
|
+
feet: new A.Vector3(H, N.y, W)
|
|
978
|
+
}, K = (_.y - (N.y + j / 7 * 2)) / 2 / Math.tan(25 * (Math.PI / 180)), Qe = {
|
|
979
|
+
veryclose: K / 4,
|
|
980
|
+
closer: K / 3,
|
|
981
|
+
close: K / 2.5,
|
|
982
|
+
midclose: K / 2,
|
|
983
|
+
medium: K,
|
|
984
|
+
midfar: K * 2,
|
|
985
|
+
far: K * 2.5,
|
|
986
|
+
farther: K * 3,
|
|
987
|
+
veryfar: K * 4
|
|
988
988
|
};
|
|
989
989
|
Lt(Ze), Ot(Qe);
|
|
990
|
-
} catch (
|
|
991
|
-
console.warn(
|
|
990
|
+
} catch (T) {
|
|
991
|
+
console.warn(T);
|
|
992
992
|
}
|
|
993
|
-
|
|
993
|
+
ne(!0);
|
|
994
994
|
}
|
|
995
995
|
};
|
|
996
996
|
return /* @__PURE__ */ v.createElement(gs, { parentGpuTier: l, setIsGpuAvailable: u, tonemapping: d }, B ? /* @__PURE__ */ v.createElement(v.Fragment, null, M && /* @__PURE__ */ v.createElement(ys, { character: M, autoLookAt: !!b }), M && /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement(mt, { preset: y }), /* @__PURE__ */ v.createElement("primitive", { object: M, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ v.createElement(v.Fragment, null));
|
|
@@ -999,7 +999,7 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
999
999
|
currentTopEmotion: Se.Neutral,
|
|
1000
1000
|
useTopEmotionOnly: !0,
|
|
1001
1001
|
autoDecay: !1
|
|
1002
|
-
}, ie =
|
|
1002
|
+
}, ie = ae()(() => Ss), Js = (e) => {
|
|
1003
1003
|
if (ie.setState({ emotions: e || [] }), e != null && e.length) {
|
|
1004
1004
|
const t = e.reduce((s, r) => s.value > r.value ? s : r);
|
|
1005
1005
|
ie.setState({ currentTopEmotion: t.emotion });
|
|
@@ -1010,7 +1010,7 @@ const Le = (e, t, s, r) => new us(pt(e), t, s, r), ms = () => {
|
|
|
1010
1010
|
}, Zs = (e) => {
|
|
1011
1011
|
ie.setState({ autoDecay: e });
|
|
1012
1012
|
}, Qs = (e) => {
|
|
1013
|
-
const t =
|
|
1013
|
+
const t = k.getState().FACSManager;
|
|
1014
1014
|
t == null || t.playFacialAnimation({ ...e });
|
|
1015
1015
|
};
|
|
1016
1016
|
export {
|
|
@@ -1020,7 +1020,7 @@ export {
|
|
|
1020
1020
|
R as Distances,
|
|
1021
1021
|
$s as Object3D,
|
|
1022
1022
|
F as Positions,
|
|
1023
|
-
|
|
1023
|
+
G as Rotations,
|
|
1024
1024
|
Ls as addBlendshape,
|
|
1025
1025
|
Os as addSPPASViseme,
|
|
1026
1026
|
We as addViseme,
|
|
@@ -1044,8 +1044,8 @@ export {
|
|
|
1044
1044
|
Us as setBlendshapes,
|
|
1045
1045
|
Be as setCameraPosition,
|
|
1046
1046
|
Re as setCharacterState,
|
|
1047
|
-
|
|
1048
|
-
|
|
1047
|
+
Vs as setCurrentAUs,
|
|
1048
|
+
Ns as setCurrentGaze,
|
|
1049
1049
|
Is as setCurrentHeadPose,
|
|
1050
1050
|
os as setCurrentUtterance,
|
|
1051
1051
|
Js as setEmotions,
|
|
@@ -1057,5 +1057,5 @@ export {
|
|
|
1057
1057
|
qs as setVisemeIntensity,
|
|
1058
1058
|
Es as setVisemes,
|
|
1059
1059
|
ls as setVoice,
|
|
1060
|
-
|
|
1060
|
+
k as useCharacterStore
|
|
1061
1061
|
};
|
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":"
|
|
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":"248b407f-1","name":"vanilla.mjs"},{"uid":"248b407f-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"248b407f-5","name":"characterStore.ts"},{"uid":"248b407f-7","name":"cameraStore.ts"},{"uid":"248b407f-9","name":"headStore.ts"},{"uid":"248b407f-11","name":"animationStore.ts"},{"uid":"248b407f-17","name":"speechStore.ts"},{"uid":"248b407f-33","name":"emotionStore.ts"}]},{"name":"models","children":[{"uid":"248b407f-13","name":"enums.ts"},{"uid":"248b407f-15","name":"constants.ts"}]},{"name":"utils/getCameraPositionVector.ts","uid":"248b407f-19"},{"name":"components","children":[{"name":"PostProcessing/PMJTAANode.js","uid":"248b407f-21"},{"uid":"248b407f-23","name":"SpeechManager.tsx"},{"uid":"248b407f-25","name":"HorizontalLine.tsx"},{"uid":"248b407f-27","name":"Scene.tsx"},{"name":"Controllers/CharacterController.ts","uid":"248b407f-29"},{"uid":"248b407f-31","name":"Character.tsx"}]},{"uid":"248b407f-35","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"248b407f-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"248b407f-0"},"248b407f-3":{"renderedLength":593,"gzipLength":285,"brotliLength":235,"metaUid":"248b407f-2"},"248b407f-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"248b407f-4"},"248b407f-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"248b407f-6"},"248b407f-9":{"renderedLength":1484,"gzipLength":395,"brotliLength":345,"metaUid":"248b407f-8"},"248b407f-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"248b407f-10"},"248b407f-13":{"renderedLength":2645,"gzipLength":700,"brotliLength":620,"metaUid":"248b407f-12"},"248b407f-15":{"renderedLength":2774,"gzipLength":852,"brotliLength":740,"metaUid":"248b407f-14"},"248b407f-17":{"renderedLength":2675,"gzipLength":668,"brotliLength":633,"metaUid":"248b407f-16"},"248b407f-19":{"renderedLength":2356,"gzipLength":571,"brotliLength":491,"metaUid":"248b407f-18"},"248b407f-21":{"renderedLength":25773,"gzipLength":6596,"brotliLength":5811,"metaUid":"248b407f-20"},"248b407f-23":{"renderedLength":5139,"gzipLength":1153,"brotliLength":1063,"metaUid":"248b407f-22"},"248b407f-25":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"248b407f-24"},"248b407f-27":{"renderedLength":8855,"gzipLength":2395,"brotliLength":2130,"metaUid":"248b407f-26"},"248b407f-29":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"248b407f-28"},"248b407f-31":{"renderedLength":7048,"gzipLength":1843,"brotliLength":1639,"metaUid":"248b407f-30"},"248b407f-33":{"renderedLength":949,"gzipLength":361,"brotliLength":320,"metaUid":"248b407f-32"},"248b407f-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"248b407f-34"}},"nodeMetas":{"248b407f-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"248b407f-1"},"imported":[],"importedBy":[{"uid":"248b407f-40"},{"uid":"248b407f-2"}]},"248b407f-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"248b407f-3"},"imported":[{"uid":"248b407f-38"},{"uid":"248b407f-0"}],"importedBy":[{"uid":"248b407f-40"}]},"248b407f-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"248b407f-5"},"imported":[{"uid":"248b407f-40"},{"uid":"248b407f-36"}],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"},{"uid":"248b407f-16"},{"uid":"248b407f-8"},{"uid":"248b407f-32"},{"uid":"248b407f-10"},{"uid":"248b407f-28"},{"uid":"248b407f-22"}]},"248b407f-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"248b407f-7"},"imported":[{"uid":"248b407f-40"},{"uid":"248b407f-37"}],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"},{"uid":"248b407f-8"},{"uid":"248b407f-26"},{"uid":"248b407f-28"}]},"248b407f-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"248b407f-9"},"imported":[{"uid":"248b407f-40"},{"uid":"248b407f-4"},{"uid":"248b407f-6"}],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"},{"uid":"248b407f-26"},{"uid":"248b407f-28"}]},"248b407f-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"248b407f-11"},"imported":[{"uid":"248b407f-40"},{"uid":"248b407f-4"}],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"}]},"248b407f-12":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{"index.js":"248b407f-13"},"imported":[],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"},{"uid":"248b407f-32"},{"uid":"248b407f-14"},{"uid":"248b407f-18"}]},"248b407f-14":{"id":"D:/a/1/s/packages/reactjs/src/models/constants.ts","moduleParts":{"index.js":"248b407f-15"},"imported":[{"uid":"248b407f-12"}],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-16"},{"uid":"248b407f-22"}]},"248b407f-16":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"248b407f-17"},"imported":[{"uid":"248b407f-40"},{"uid":"248b407f-4"},{"uid":"248b407f-14"}],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"},{"uid":"248b407f-22"}]},"248b407f-18":{"id":"D:/a/1/s/packages/reactjs/src/utils/getCameraPositionVector.ts","moduleParts":{"index.js":"248b407f-19"},"imported":[{"uid":"248b407f-37"},{"uid":"248b407f-12"}],"importedBy":[{"uid":"248b407f-30"}]},"248b407f-20":{"id":"D:/a/1/s/packages/reactjs/src/components/PostProcessing/PMJTAANode.js","moduleParts":{"index.js":"248b407f-21"},"imported":[{"uid":"248b407f-37"},{"uid":"248b407f-41"}],"importedBy":[{"uid":"248b407f-26"}]},"248b407f-22":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"248b407f-23"},"imported":[{"uid":"248b407f-38"},{"uid":"248b407f-16"},{"uid":"248b407f-4"},{"uid":"248b407f-44"},{"uid":"248b407f-14"},{"uid":"248b407f-36"}],"importedBy":[{"uid":"248b407f-26"}]},"248b407f-24":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"248b407f-25"},"imported":[{"uid":"248b407f-38"},{"uid":"248b407f-37"}],"importedBy":[{"uid":"248b407f-26"}]},"248b407f-26":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"248b407f-27"},"imported":[{"uid":"248b407f-38"},{"uid":"248b407f-37"},{"uid":"248b407f-41"},{"uid":"248b407f-20"},{"uid":"248b407f-42"},{"uid":"248b407f-39"},{"uid":"248b407f-43"},{"uid":"248b407f-6"},{"uid":"248b407f-8"},{"uid":"248b407f-22"},{"uid":"248b407f-24"}],"importedBy":[{"uid":"248b407f-30"}]},"248b407f-28":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"248b407f-29"},"imported":[{"uid":"248b407f-38"},{"uid":"248b407f-4"},{"uid":"248b407f-36"},{"uid":"248b407f-43"},{"uid":"248b407f-8"},{"uid":"248b407f-6"}],"importedBy":[{"uid":"248b407f-30"}]},"248b407f-30":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"248b407f-31"},"imported":[{"uid":"248b407f-38"},{"uid":"248b407f-37"},{"uid":"248b407f-36"},{"uid":"248b407f-39"},{"uid":"248b407f-8"},{"uid":"248b407f-4"},{"uid":"248b407f-10"},{"uid":"248b407f-6"},{"uid":"248b407f-16"},{"uid":"248b407f-12"},{"uid":"248b407f-18"},{"uid":"248b407f-26"},{"uid":"248b407f-28"}],"importedBy":[{"uid":"248b407f-34"}]},"248b407f-32":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"248b407f-33"},"imported":[{"uid":"248b407f-40"},{"uid":"248b407f-12"},{"uid":"248b407f-4"}],"importedBy":[{"uid":"248b407f-34"}]},"248b407f-34":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"248b407f-35"},"imported":[{"uid":"248b407f-30"},{"uid":"248b407f-4"},{"uid":"248b407f-16"},{"uid":"248b407f-6"},{"uid":"248b407f-8"},{"uid":"248b407f-32"},{"uid":"248b407f-10"},{"uid":"248b407f-36"},{"uid":"248b407f-12"},{"uid":"248b407f-14"},{"uid":"248b407f-37"}],"importedBy":[],"isEntry":true},"248b407f-36":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"},{"uid":"248b407f-4"},{"uid":"248b407f-28"},{"uid":"248b407f-22"}],"isExternal":true},"248b407f-37":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-34"},{"uid":"248b407f-30"},{"uid":"248b407f-6"},{"uid":"248b407f-18"},{"uid":"248b407f-26"},{"uid":"248b407f-20"},{"uid":"248b407f-24"}],"isExternal":true},"248b407f-38":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-30"},{"uid":"248b407f-26"},{"uid":"248b407f-28"},{"uid":"248b407f-22"},{"uid":"248b407f-24"},{"uid":"248b407f-2"}],"isExternal":true},"248b407f-39":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-30"},{"uid":"248b407f-26"}],"isExternal":true},"248b407f-40":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"248b407f-0"},{"uid":"248b407f-2"}],"importedBy":[{"uid":"248b407f-4"},{"uid":"248b407f-16"},{"uid":"248b407f-6"},{"uid":"248b407f-8"},{"uid":"248b407f-32"},{"uid":"248b407f-10"}]},"248b407f-41":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-26"},{"uid":"248b407f-20"}],"isExternal":true},"248b407f-42":{"id":"three/addons/tsl/display/SSGINode.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-26"}],"isExternal":true},"248b407f-43":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-26"},{"uid":"248b407f-28"}],"isExternal":true},"248b407f-44":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"248b407f-22"}],"isExternal":true}},"env":{"rollup":"4.61.1"},"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.
|
|
3
|
+
"version": "1.0.25",
|
|
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.
|
|
25
|
+
"@davi-ai/bodyengine-three": "1.0.16",
|
|
26
26
|
"@react-three/drei": "^10.0.0",
|
|
27
27
|
"@react-three/fiber": "^9.0.0",
|
|
28
28
|
"@types/three": "^0.184.0",
|