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