@davi-ai/react-bodyengine-three 1.0.38 → 1.0.39
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 +43 -43
- package/dist/models/types.d.ts +2 -2
- package/dist/stats.html +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11,10 +11,10 @@ import { createSpeechSynthesisPonyfill as Oe, SpeechSynthesisUtterance as Ne } f
|
|
|
11
11
|
const re = (e) => {
|
|
12
12
|
let t;
|
|
13
13
|
const n = /* @__PURE__ */ new Set(), r = (d, k) => {
|
|
14
|
-
const
|
|
15
|
-
if (!Object.is(
|
|
16
|
-
const
|
|
17
|
-
t = k ?? (typeof
|
|
14
|
+
const P = typeof d == "function" ? d(t) : d;
|
|
15
|
+
if (!Object.is(P, t)) {
|
|
16
|
+
const E = t;
|
|
17
|
+
t = k ?? (typeof P != "object" || P === null) ? P : Object.assign({}, t, P), n.forEach((R) => R(t, E));
|
|
18
18
|
}
|
|
19
19
|
}, g = () => t, b = { setState: r, getState: g, getInitialState: () => C, subscribe: (d) => (n.add(d), () => n.delete(d)) }, C = t = e(r, g, b);
|
|
20
20
|
return b;
|
|
@@ -60,7 +60,7 @@ const We = (e) => {
|
|
|
60
60
|
c.setState({ characterWidth: e.x }), c.setState({ characterHeight: e.y }), c.setState({ characterDepth: e.z });
|
|
61
61
|
}, Rt = () => c.getState().characterHeight, ce = (e) => {
|
|
62
62
|
c.setState({ characterState: e });
|
|
63
|
-
},
|
|
63
|
+
}, M = J()(() => ({
|
|
64
64
|
cameraRef: null,
|
|
65
65
|
cameraPosition: new ye(0, 0, 5),
|
|
66
66
|
bodyCenter: null,
|
|
@@ -69,19 +69,19 @@ const We = (e) => {
|
|
|
69
69
|
lookAt: null,
|
|
70
70
|
movable: !0
|
|
71
71
|
})), qe = (e) => {
|
|
72
|
-
|
|
72
|
+
M.setState({ cameraRef: e });
|
|
73
73
|
}, le = (e) => {
|
|
74
|
-
|
|
75
|
-
}, Bt = () =>
|
|
76
|
-
|
|
74
|
+
M.setState({ cameraPosition: e });
|
|
75
|
+
}, Bt = () => M.getState().cameraPosition, Je = (e) => {
|
|
76
|
+
M.setState({ bodyCenter: e });
|
|
77
77
|
}, Qe = (e) => {
|
|
78
|
-
|
|
78
|
+
M.setState({ defaultPositions: e });
|
|
79
79
|
}, Ye = (e) => {
|
|
80
|
-
|
|
80
|
+
M.setState({ defaultDistances: e });
|
|
81
81
|
}, de = (e) => {
|
|
82
|
-
|
|
83
|
-
}, xt = () =>
|
|
84
|
-
|
|
82
|
+
M.setState({ lookAt: e });
|
|
83
|
+
}, xt = () => M.getState().lookAt, Ze = (e) => {
|
|
84
|
+
M.setState({ movable: e });
|
|
85
85
|
}, V = J()(() => ({
|
|
86
86
|
currentAUs: null,
|
|
87
87
|
currentGaze: null,
|
|
@@ -104,7 +104,7 @@ const We = (e) => {
|
|
|
104
104
|
if (e)
|
|
105
105
|
t == null || t.lookAtAndKeep(e);
|
|
106
106
|
else {
|
|
107
|
-
const n =
|
|
107
|
+
const n = M.getState().cameraRef;
|
|
108
108
|
t == null || t.lookAtAndKeep(n);
|
|
109
109
|
}
|
|
110
110
|
}, nt = () => {
|
|
@@ -187,7 +187,7 @@ const We = (e) => {
|
|
|
187
187
|
}, ut = (e) => {
|
|
188
188
|
m.setState({ lipSyncFromAudio: e });
|
|
189
189
|
}, gt = () => {
|
|
190
|
-
const e = c((o) => o.animationsLoaded), t = c((o) => o.characterState), n = c((o) => o.lipSyncManager), r = c((o) => o.blendshapeManager), g = m((o) => o.credentials), s = m((o) => o.currentUtterance), u = m((o) => o.textToSpeak), b = m((o) => o.visemes), C = m((o) => o.visemeIntensity), d = m((o) => o.playedVisemeCount), k = m((o) => o.blendshapes),
|
|
190
|
+
const e = c((o) => o.animationsLoaded), t = c((o) => o.characterState), n = c((o) => o.lipSyncManager), r = c((o) => o.blendshapeManager), g = m((o) => o.credentials), s = m((o) => o.currentUtterance), u = m((o) => o.textToSpeak), b = m((o) => o.visemes), C = m((o) => o.visemeIntensity), d = m((o) => o.playedVisemeCount), k = m((o) => o.blendshapes), P = m((o) => o.playedBlendshapeCount), E = m((o) => o.lipSyncFromAudio), [R, v] = A(!1), [O, F] = A(!1), h = _(() => g != null && g.region && (g.subscriptionKey || g.token) ? Oe({
|
|
191
191
|
credentials: {
|
|
192
192
|
region: g.region,
|
|
193
193
|
authorizationToken: g.token,
|
|
@@ -221,11 +221,11 @@ const We = (e) => {
|
|
|
221
221
|
}, [s]), l(() => {
|
|
222
222
|
n && (n.visemeIntensity = C);
|
|
223
223
|
}, [C]), l(() => {
|
|
224
|
-
|
|
225
|
-
}, [t, b, n
|
|
226
|
-
r && k.length && t === I.speaking && lt(ke(r, k,
|
|
224
|
+
n && t === I.speaking && it(Ce(n, b, d, y));
|
|
225
|
+
}, [t, b, n]), l(() => {
|
|
226
|
+
r && k.length && t === I.speaking && lt(ke(r, k, P, y));
|
|
227
227
|
}, [t, k, r]), l(() => {
|
|
228
|
-
n && (t === I.speaking ?
|
|
228
|
+
n && (t === I.speaking ? E && we(n, h) : n.disconnectAudio());
|
|
229
229
|
}, [t, n]), l(() => {
|
|
230
230
|
t !== I.speaking && (ct(), dt());
|
|
231
231
|
}, [t]), null;
|
|
@@ -246,10 +246,10 @@ const We = (e) => {
|
|
|
246
246
|
t.dispose();
|
|
247
247
|
}, await t.init(), t;
|
|
248
248
|
}, St = ({ parentGpuTier: e, setIsGpuAvailable: t, children: n, tonemapping: r, inspector: g = !1 }) => {
|
|
249
|
-
const s =
|
|
249
|
+
const s = M((a) => a.cameraPosition), u = M((a) => a.lookAt), b = M((a) => a.movable), C = V((a) => a.targets), d = V((a) => a.showFirstTarget), [k, P] = A(e || Ve()), [E, R] = A(
|
|
250
250
|
"low"
|
|
251
251
|
/* low */
|
|
252
|
-
), [v, O] = A(null), [F, h] = A(void 0), y = X(null), [o, z] = A(null), U = X(null),
|
|
252
|
+
), [v, O] = A(null), [F, h] = A(void 0), y = X(null), [o, z] = A(null), U = X(null), w = (a) => {
|
|
253
253
|
a.preventDefault(), a.stopPropagation();
|
|
254
254
|
};
|
|
255
255
|
l(() => {
|
|
@@ -258,7 +258,7 @@ const We = (e) => {
|
|
|
258
258
|
v == null || v.abort(), O(null);
|
|
259
259
|
else {
|
|
260
260
|
const D = new AbortController();
|
|
261
|
-
O(D), (a = y.current) == null || a.addEventListener("wheel",
|
|
261
|
+
O(D), (a = y.current) == null || a.addEventListener("wheel", w, { passive: !1, signal: D.signal }), (B = y.current) == null || B.addEventListener("pointerdown", w, { passive: !1, signal: D.signal }), (x = y.current) == null || x.addEventListener("pointermove", w, { passive: !1, signal: D.signal }), (p = y.current) == null || p.addEventListener("click", w, { passive: !1, signal: D.signal });
|
|
262
262
|
}
|
|
263
263
|
}, [b]), l(() => {
|
|
264
264
|
if (o && u && s) {
|
|
@@ -266,7 +266,7 @@ const We = (e) => {
|
|
|
266
266
|
o.setLookAt(s.x, s.y, s.z, u.x, u.y, u.z, a), U.current = o;
|
|
267
267
|
}
|
|
268
268
|
}, [o, s, u]), l(() => {
|
|
269
|
-
e &&
|
|
269
|
+
e && P(e);
|
|
270
270
|
}, [e]), l(() => {
|
|
271
271
|
if (k)
|
|
272
272
|
if (k.type === "FALLBACK") {
|
|
@@ -304,18 +304,18 @@ const We = (e) => {
|
|
|
304
304
|
break;
|
|
305
305
|
}
|
|
306
306
|
}, [k]), l(() => {
|
|
307
|
-
switch (
|
|
307
|
+
switch (E && (f.current = E), E) {
|
|
308
308
|
case "low":
|
|
309
309
|
console.warn("Retorik React-Bodyengine-Three > GPU tier too low, no rendering available"), t(!1);
|
|
310
310
|
break;
|
|
311
311
|
case "medium":
|
|
312
|
-
h([0.8, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${
|
|
312
|
+
h([0.8, 1]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${E}`), t(!0);
|
|
313
313
|
break;
|
|
314
314
|
case "high":
|
|
315
|
-
h([1, 1.5]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${
|
|
315
|
+
h([1, 1.5]), console.log(`Retorik React-Bodyengine-Three > GPU tier detected : ${E}`), t(!0);
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
|
-
}, [
|
|
318
|
+
}, [E]);
|
|
319
319
|
const f = X(void 0), L = X(null), N = Se((a) => ((!L.current || L.current.canvas !== a.canvas) && (L.current = { canvas: a.canvas, renderer: pt(a.canvas) }), L.current.renderer), []), W = _(() => {
|
|
320
320
|
if (C.length) {
|
|
321
321
|
const a = C[0], B = new T.Vector3(a.position.x - 0.5, a.position.y, a.position.z - 0.1), x = new T.Vector3(a.position.x + 0.5, a.position.y, a.position.z - 0.1);
|
|
@@ -328,10 +328,10 @@ const We = (e) => {
|
|
|
328
328
|
}, [C, s]);
|
|
329
329
|
return F ? (
|
|
330
330
|
// "percentage" = PCFShadowMap; shadows={true} would make R3F set the removed PCFSoftShadowMap
|
|
331
|
-
/* @__PURE__ */ i.createElement(Ue, { gl: N, dpr: F, ref: y, shadows: "percentage" }, /* @__PURE__ */ i.createElement(ve, { iterations: 5, ms: 100, threshold: 0.75 }, /* @__PURE__ */ i.createElement(ft, { tonemapping: r, processedTier:
|
|
331
|
+
/* @__PURE__ */ i.createElement(Ue, { gl: N, dpr: F, ref: y, shadows: "percentage" }, /* @__PURE__ */ i.createElement(ve, { iterations: 5, ms: 100, threshold: 0.75 }, /* @__PURE__ */ i.createElement(ft, { tonemapping: r, processedTier: E, inspector: g }), /* @__PURE__ */ i.createElement(gt, null), /* @__PURE__ */ i.createElement(Fe, { ref: qe, makeDefault: !0, fov: 28 }), /* @__PURE__ */ i.createElement(Le, { ref: z }), d && W.length && /* @__PURE__ */ i.createElement(ht, { points: W, color: "red" }), /* @__PURE__ */ i.createElement(fe, { fallback: null }, n)))
|
|
332
332
|
) : /* @__PURE__ */ i.createElement(i.Fragment, null);
|
|
333
333
|
}, ft = ({ tonemapping: e, processedTier: t, inspector: n = !1 }) => {
|
|
334
|
-
const [r, g] = A(!1), { gl: s, scene: u, camera: b, size: C } = Ge(), [d] = A(new T.Vector3(-3, 2, 2)), [k] = A(new T.Vector3(0, 1, 0)), [
|
|
334
|
+
const [r, g] = A(!1), { gl: s, scene: u, camera: b, size: C } = Ge(), [d] = A(new T.Vector3(-3, 2, 2)), [k] = A(new T.Vector3(0, 1, 0)), [P] = A(3.5), [E] = A(-2e-4), [R] = A(0.57), [v] = A(0.25), O = X(null), F = X(null);
|
|
335
335
|
return l(() => {
|
|
336
336
|
s && (s.shadowMap.type = T.PCFShadowMap, s.toneMapping = e, t !== "low" ? u.environmentIntensity = v : u.environmentIntensity = 1);
|
|
337
337
|
}, [s, e]), l(() => {
|
|
@@ -347,7 +347,7 @@ const We = (e) => {
|
|
|
347
347
|
}, [n, s, r]), l(() => {
|
|
348
348
|
if (!s || !u || !b || !t) return;
|
|
349
349
|
u.background = null;
|
|
350
|
-
const h = t === "high", y = { skinSSS: !1, inspector: n && r && !!s.inspector }, o = h ? Me(u, b, y) : Pe(u, b, y), { outputNode: z, scenePassColor: U, traaPass:
|
|
350
|
+
const h = t === "high", y = { skinSSS: !1, inspector: n && r && !!s.inspector }, o = h ? Me(u, b, y) : Pe(u, b, y), { outputNode: z, scenePassColor: U, traaPass: w, giPass: f, ao: L, gi: N, hairAO: W, eyeAO: a } = o, B = new T.RenderPipeline(s);
|
|
351
351
|
if (B.outputNode = z, F.current = B, n && r && s.inspector) {
|
|
352
352
|
const x = () => {
|
|
353
353
|
B.needsUpdate = !0;
|
|
@@ -358,10 +358,10 @@ const We = (e) => {
|
|
|
358
358
|
const Y = Number(Q);
|
|
359
359
|
B.outputNode = Y === 1 ? oe(ze(L.r), 1) : Y === 2 ? oe(N.rgb, 1) : Y === 3 ? U : z, x();
|
|
360
360
|
}), p.add(f.sliceCount, "value", 1, 4, 1).name("slice count"), p.add(f.stepCount, "value", 1, 32, 1).name("step count"), p.add(f.radius, "value", 0.1, 2).name("radius"), p.add(f.expFactor, "value", 1e-3, 10).name("exp factor"), p.add(f.thickness, "value", 1e-3, 0.1).name("thickness"), p.add(f.backfaceLighting, "value", 0, 1).name("backface lighting"), p.add(f.aoIntensity, "value", 0, 4).name("AO intensity"), p.add(f.giIntensity, "value", 0, 20).name("GI intensity"), p.add(f, "resolutionScale", 0.25, 1).name("SSGI resolution scale"), p.add(W, "value", 0, 1).name("SSGI AO on hair"), p.add(a, "value", 0, 1).name("SSGI AO on eyes"), p.add(D, "feedback").name("SSGI 2nd bounce (TRAA history)").onChange((Q) => {
|
|
361
|
-
f.beautyNode = Q ?
|
|
361
|
+
f.beautyNode = Q ? w.getHistoryTextureNode() : U, x();
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
|
-
p.add(
|
|
364
|
+
p.add(w, "maxVelocityLength", 4, 128, 1).name("TRAA max velocity").onChange(x), p.add(w, "depthThreshold", 1e-4, 0.01).name("TRAA depth threshold").onChange(x), p.add(w, "edgeDepthDiff", 1e-4, 0.01).name("TRAA edge depth diff").onChange(x), p.add(w, "useSubpixelCorrection").name("TRAA subpixel correction").onChange(x), p.add(w.maskedMotionWeight, "value", 0, 1, 0.01).name("TRAA hair motion weight"), p.add(w.maskedClipWidening, "value", 0, 2, 0.05).name("TRAA hair clip widening (still)"), p.add(w.maskedClipFadeVelocity, "value", 0.05, 4, 0.05).name("TRAA hair clip fade (px/frame)");
|
|
365
365
|
}
|
|
366
366
|
return () => {
|
|
367
367
|
B.dispose(), F.current = null;
|
|
@@ -370,11 +370,11 @@ const We = (e) => {
|
|
|
370
370
|
!s || !C || s.setSize(C.width, C.height);
|
|
371
371
|
}, [C]), ge(({ gl: h, scene: y, camera: o }) => {
|
|
372
372
|
F.current && F.current.render();
|
|
373
|
-
}, 1), /* @__PURE__ */ i.createElement(i.Fragment, null, t !== "low" && s && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("directionalLight", { ref: O, color: "white", position: d.toArray(), "target-position": k.toArray(), intensity:
|
|
373
|
+
}, 1), /* @__PURE__ */ i.createElement(i.Fragment, null, t !== "low" && s && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("directionalLight", { ref: O, color: "white", position: d.toArray(), "target-position": k.toArray(), intensity: P, castShadow: !0, "shadow-mapSize-width": 1024, "shadow-mapSize-height": 1024, "shadow-bias": E, "shadow-normalBias": 3e-3, "shadow-intensity": 0.6, "shadow-radius": 2.5 }, /* @__PURE__ */ i.createElement("orthographicCamera", { attach: "shadow-camera", args: [-1, 1, 2, -0.5, 2, 5] })), t === "high" && /* @__PURE__ */ i.createElement("directionalLight", { name: "RimLight", color: "#fff4e8", position: [0.9, 2.3, -3.2], "target-position": [0, 1.6, 0], intensity: R })));
|
|
374
374
|
}, yt = ({ character: e, autoLookAt: t }) => {
|
|
375
|
-
const n = c((d) => d.characterState), r = V((d) => d.currentAUs), g = V((d) => d.currentGaze), s = V((d) => d.currentHeadPose), u = V((d) => d.lookAtCamera), b =
|
|
375
|
+
const n = c((d) => d.characterState), r = V((d) => d.currentAUs), g = V((d) => d.currentGaze), s = V((d) => d.currentHeadPose), u = V((d) => d.lookAtCamera), b = M((d) => d.cameraPosition), C = V((d) => d.targets);
|
|
376
376
|
return ge((d, k) => {
|
|
377
|
-
const
|
|
377
|
+
const P = {
|
|
378
378
|
deltaTime: k,
|
|
379
379
|
timestamp: d.clock.oldTime,
|
|
380
380
|
AU: r,
|
|
@@ -384,7 +384,7 @@ const We = (e) => {
|
|
|
384
384
|
lookAt: u ? b : void 0,
|
|
385
385
|
targets: C
|
|
386
386
|
};
|
|
387
|
-
e.update(
|
|
387
|
+
e.update(P);
|
|
388
388
|
}), l(() => {
|
|
389
389
|
if (t)
|
|
390
390
|
switch (n) {
|
|
@@ -431,8 +431,8 @@ const We = (e) => {
|
|
|
431
431
|
return l(() => {
|
|
432
432
|
e && et(Ee(t, { topOnly: n }));
|
|
433
433
|
}, [t, n, e]), null;
|
|
434
|
-
}, Qt = ({ url: e, type: t, animationsUrl: n, gender: r, speechSynthesis: g, camera: s, onLoadingCompleted: u, autoLookAt: b, breathing: C, disableAnimations: d, debug: k, inspector:
|
|
435
|
-
const
|
|
434
|
+
}, Qt = ({ url: e, type: t, animationsUrl: n, gender: r, speechSynthesis: g, camera: s, onLoadingCompleted: u, autoLookAt: b, breathing: C, disableAnimations: d, debug: k, inspector: P, enableBml: E, animationWeights: R, license: v, detectGpuData: O, environmentPreset: F = "apartment", tonemapping: h = T.NeutralToneMapping, targets: y, lipSyncFromAudio: o = !1, lipSyncAudio: z, lipSyncAudioContext: U }) => {
|
|
435
|
+
const w = c((S) => S.animationsLoaded), f = M((S) => S.defaultPositions), L = M((S) => S.defaultDistances), [N, W] = A(), [a, B] = A(null), [x, p] = A(), [D, ee] = A(!1), Q = async (S, K) => {
|
|
436
436
|
let H = null;
|
|
437
437
|
switch (t) {
|
|
438
438
|
case $.cc3:
|
|
@@ -455,7 +455,7 @@ const We = (e) => {
|
|
|
455
455
|
gender: r || "male",
|
|
456
456
|
type: t,
|
|
457
457
|
debug: k,
|
|
458
|
-
enableBmlManager: !!
|
|
458
|
+
enableBmlManager: !!E,
|
|
459
459
|
animationWeights: R,
|
|
460
460
|
license: v
|
|
461
461
|
};
|
|
@@ -477,7 +477,7 @@ const We = (e) => {
|
|
|
477
477
|
};
|
|
478
478
|
l(() => {
|
|
479
479
|
var S, K;
|
|
480
|
-
if (a &&
|
|
480
|
+
if (a && w)
|
|
481
481
|
if (C === !1 && ((K = (S = a.animationManager) == null ? void 0 : S.disableBreathing) == null || K.call(S)), D) {
|
|
482
482
|
at(a.getAllAnimationNames()), st(a.getAllAnimations());
|
|
483
483
|
const H = setTimeout(() => {
|
|
@@ -486,7 +486,7 @@ const We = (e) => {
|
|
|
486
486
|
return () => clearTimeout(H);
|
|
487
487
|
} else
|
|
488
488
|
pe();
|
|
489
|
-
}, [a,
|
|
489
|
+
}, [a, w, D]), l(() => {
|
|
490
490
|
_e(y || []);
|
|
491
491
|
}, [y]), l(() => {
|
|
492
492
|
ie(!1);
|
|
@@ -523,7 +523,7 @@ const We = (e) => {
|
|
|
523
523
|
ee(!0);
|
|
524
524
|
}
|
|
525
525
|
};
|
|
526
|
-
return /* @__PURE__ */ i.createElement(St, { parentGpuTier: O, setIsGpuAvailable: W, tonemapping: h, inspector:
|
|
526
|
+
return /* @__PURE__ */ i.createElement(St, { parentGpuTier: O, setIsGpuAvailable: W, tonemapping: h, inspector: P }, N ? /* @__PURE__ */ i.createElement(i.Fragment, null, a && /* @__PURE__ */ i.createElement(yt, { character: a, autoLookAt: !!b }), a && /* @__PURE__ */ i.createElement(bt, { animationsLoaded: w }), a && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(Ie, { preset: F }), /* @__PURE__ */ i.createElement("primitive", { object: a, castShadow: !0, receiveShadow: !0 }))) : /* @__PURE__ */ i.createElement(i.Fragment, null));
|
|
527
527
|
};
|
|
528
528
|
export {
|
|
529
529
|
Qt as Character,
|
package/dist/models/types.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ interface CharacterProps extends SpeechSynthesisOptions {
|
|
|
32
32
|
tonemapping?: ToneMapping;
|
|
33
33
|
targets?: Object3D[];
|
|
34
34
|
/**
|
|
35
|
-
* When true, the lips follow the speech audio itself (level and spectrum)
|
|
36
|
-
*
|
|
35
|
+
* When true, the lips follow the speech audio itself (level and spectrum) whenever the speech synthesis
|
|
36
|
+
* gives no visemes: the fallback for voices without visemes. Visemes, when there are some, take precedence.
|
|
37
37
|
* Default: false.
|
|
38
38
|
*/
|
|
39
39
|
lipSyncFromAudio?: boolean;
|
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":"fd13be99-1","name":"vanilla.mjs"},{"uid":"fd13be99-3","name":"react.mjs"}]},{"name":"src","children":[{"name":"contexts","children":[{"uid":"fd13be99-5","name":"characterStore.ts"},{"uid":"fd13be99-7","name":"cameraStore.ts"},{"uid":"fd13be99-9","name":"headStore.ts"},{"uid":"fd13be99-11","name":"animationStore.ts"},{"uid":"fd13be99-13","name":"speechStore.ts"},{"uid":"fd13be99-23","name":"emotionStore.ts"}]},{"name":"components","children":[{"uid":"fd13be99-15","name":"SpeechManager.tsx"},{"uid":"fd13be99-17","name":"HorizontalLine.tsx"},{"uid":"fd13be99-19","name":"Scene.tsx"},{"name":"Controllers","children":[{"uid":"fd13be99-21","name":"CharacterController.ts"},{"uid":"fd13be99-25","name":"EmotionController.ts"}]},{"uid":"fd13be99-27","name":"Character.tsx"}]},{"uid":"fd13be99-29","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"fd13be99-1":{"renderedLength":975,"gzipLength":394,"brotliLength":353,"metaUid":"fd13be99-0"},"fd13be99-3":{"renderedLength":557,"gzipLength":282,"brotliLength":232,"metaUid":"fd13be99-2"},"fd13be99-5":{"renderedLength":2066,"gzipLength":439,"brotliLength":380,"metaUid":"fd13be99-4"},"fd13be99-7":{"renderedLength":1028,"gzipLength":293,"brotliLength":249,"metaUid":"fd13be99-6"},"fd13be99-9":{"renderedLength":1154,"gzipLength":359,"brotliLength":315,"metaUid":"fd13be99-8"},"fd13be99-11":{"renderedLength":854,"gzipLength":308,"brotliLength":274,"metaUid":"fd13be99-10"},"fd13be99-13":{"renderedLength":2354,"gzipLength":557,"brotliLength":499,"metaUid":"fd13be99-12"},"fd13be99-15":{"renderedLength":4144,"gzipLength":975,"brotliLength":888,"metaUid":"fd13be99-14"},"fd13be99-17":{"renderedLength":383,"gzipLength":251,"brotliLength":209,"metaUid":"fd13be99-16"},"fd13be99-19":{"renderedLength":11550,"gzipLength":3294,"brotliLength":2903,"metaUid":"fd13be99-18"},"fd13be99-21":{"renderedLength":1366,"gzipLength":442,"brotliLength":408,"metaUid":"fd13be99-20"},"fd13be99-23":{"renderedLength":1187,"gzipLength":412,"brotliLength":371,"metaUid":"fd13be99-22"},"fd13be99-25":{"renderedLength":398,"gzipLength":211,"brotliLength":184,"metaUid":"fd13be99-24"},"fd13be99-27":{"renderedLength":5785,"gzipLength":1605,"brotliLength":1419,"metaUid":"fd13be99-26"},"fd13be99-29":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"fd13be99-28"}},"nodeMetas":{"fd13be99-0":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/vanilla.mjs","moduleParts":{"index.js":"fd13be99-1"},"imported":[],"importedBy":[{"uid":"fd13be99-35"},{"uid":"fd13be99-2"}]},"fd13be99-2":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/react.mjs","moduleParts":{"index.js":"fd13be99-3"},"imported":[{"uid":"fd13be99-33"},{"uid":"fd13be99-0"}],"importedBy":[{"uid":"fd13be99-35"}]},"fd13be99-4":{"id":"D:/a/1/s/packages/reactjs/src/contexts/characterStore.ts","moduleParts":{"index.js":"fd13be99-5"},"imported":[{"uid":"fd13be99-35"},{"uid":"fd13be99-30"}],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-26"},{"uid":"fd13be99-12"},{"uid":"fd13be99-8"},{"uid":"fd13be99-22"},{"uid":"fd13be99-10"},{"uid":"fd13be99-20"},{"uid":"fd13be99-14"}]},"fd13be99-6":{"id":"D:/a/1/s/packages/reactjs/src/contexts/cameraStore.ts","moduleParts":{"index.js":"fd13be99-7"},"imported":[{"uid":"fd13be99-35"},{"uid":"fd13be99-32"}],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-26"},{"uid":"fd13be99-8"},{"uid":"fd13be99-18"},{"uid":"fd13be99-20"}]},"fd13be99-8":{"id":"D:/a/1/s/packages/reactjs/src/contexts/headStore.ts","moduleParts":{"index.js":"fd13be99-9"},"imported":[{"uid":"fd13be99-35"},{"uid":"fd13be99-4"},{"uid":"fd13be99-6"}],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-26"},{"uid":"fd13be99-18"},{"uid":"fd13be99-20"},{"uid":"fd13be99-24"}]},"fd13be99-10":{"id":"D:/a/1/s/packages/reactjs/src/contexts/animationStore.ts","moduleParts":{"index.js":"fd13be99-11"},"imported":[{"uid":"fd13be99-35"},{"uid":"fd13be99-4"}],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-26"}]},"fd13be99-12":{"id":"D:/a/1/s/packages/reactjs/src/contexts/speechStore.ts","moduleParts":{"index.js":"fd13be99-13"},"imported":[{"uid":"fd13be99-35"},{"uid":"fd13be99-4"},{"uid":"fd13be99-30"}],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-26"},{"uid":"fd13be99-14"}]},"fd13be99-14":{"id":"D:/a/1/s/packages/reactjs/src/components/SpeechManager.tsx","moduleParts":{"index.js":"fd13be99-15"},"imported":[{"uid":"fd13be99-33"},{"uid":"fd13be99-12"},{"uid":"fd13be99-4"},{"uid":"fd13be99-39"},{"uid":"fd13be99-30"}],"importedBy":[{"uid":"fd13be99-18"}]},"fd13be99-16":{"id":"D:/a/1/s/packages/reactjs/src/components/HorizontalLine.tsx","moduleParts":{"index.js":"fd13be99-17"},"imported":[{"uid":"fd13be99-33"},{"uid":"fd13be99-32"}],"importedBy":[{"uid":"fd13be99-18"}]},"fd13be99-18":{"id":"D:/a/1/s/packages/reactjs/src/components/Scene.tsx","moduleParts":{"index.js":"fd13be99-19"},"imported":[{"uid":"fd13be99-33"},{"uid":"fd13be99-32"},{"uid":"fd13be99-36"},{"uid":"fd13be99-30"},{"uid":"fd13be99-34"},{"uid":"fd13be99-37"},{"uid":"fd13be99-6"},{"uid":"fd13be99-8"},{"uid":"fd13be99-14"},{"uid":"fd13be99-16"},{"uid":"fd13be99-38","dynamic":true}],"importedBy":[{"uid":"fd13be99-26"}]},"fd13be99-20":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/CharacterController.ts","moduleParts":{"index.js":"fd13be99-21"},"imported":[{"uid":"fd13be99-33"},{"uid":"fd13be99-4"},{"uid":"fd13be99-30"},{"uid":"fd13be99-37"},{"uid":"fd13be99-8"},{"uid":"fd13be99-6"}],"importedBy":[{"uid":"fd13be99-26"}]},"fd13be99-22":{"id":"D:/a/1/s/packages/reactjs/src/contexts/emotionStore.ts","moduleParts":{"index.js":"fd13be99-23"},"imported":[{"uid":"fd13be99-35"},{"uid":"fd13be99-31"},{"uid":"fd13be99-4"}],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-24"}]},"fd13be99-24":{"id":"D:/a/1/s/packages/reactjs/src/components/Controllers/EmotionController.ts","moduleParts":{"index.js":"fd13be99-25"},"imported":[{"uid":"fd13be99-33"},{"uid":"fd13be99-22"},{"uid":"fd13be99-8"},{"uid":"fd13be99-30"}],"importedBy":[{"uid":"fd13be99-26"}]},"fd13be99-26":{"id":"D:/a/1/s/packages/reactjs/src/components/Character.tsx","moduleParts":{"index.js":"fd13be99-27"},"imported":[{"uid":"fd13be99-33"},{"uid":"fd13be99-32"},{"uid":"fd13be99-30"},{"uid":"fd13be99-34"},{"uid":"fd13be99-8"},{"uid":"fd13be99-4"},{"uid":"fd13be99-10"},{"uid":"fd13be99-6"},{"uid":"fd13be99-12"},{"uid":"fd13be99-18"},{"uid":"fd13be99-20"},{"uid":"fd13be99-24"}],"importedBy":[{"uid":"fd13be99-28"}]},"fd13be99-28":{"id":"D:/a/1/s/packages/reactjs/src/index.ts","moduleParts":{"index.js":"fd13be99-29"},"imported":[{"uid":"fd13be99-26"},{"uid":"fd13be99-4"},{"uid":"fd13be99-12"},{"uid":"fd13be99-6"},{"uid":"fd13be99-8"},{"uid":"fd13be99-22"},{"uid":"fd13be99-10"},{"uid":"fd13be99-30"},{"uid":"fd13be99-31"},{"uid":"fd13be99-32"}],"importedBy":[],"isEntry":true},"fd13be99-30":{"id":"@davi-ai/bodyengine-three","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-26"},{"uid":"fd13be99-4"},{"uid":"fd13be99-12"},{"uid":"fd13be99-31"},{"uid":"fd13be99-18"},{"uid":"fd13be99-20"},{"uid":"fd13be99-24"},{"uid":"fd13be99-14"}],"isExternal":true},"fd13be99-31":{"id":"D:/a/1/s/packages/reactjs/src/models/enums.ts","moduleParts":{},"imported":[{"uid":"fd13be99-30"}],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-22"}]},"fd13be99-32":{"id":"three/webgpu","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-28"},{"uid":"fd13be99-26"},{"uid":"fd13be99-6"},{"uid":"fd13be99-18"},{"uid":"fd13be99-16"}],"isExternal":true},"fd13be99-33":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-26"},{"uid":"fd13be99-18"},{"uid":"fd13be99-20"},{"uid":"fd13be99-24"},{"uid":"fd13be99-14"},{"uid":"fd13be99-16"},{"uid":"fd13be99-2"}],"isExternal":true},"fd13be99-34":{"id":"@react-three/drei","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-26"},{"uid":"fd13be99-18"}],"isExternal":true},"fd13be99-35":{"id":"D:/a/1/s/packages/reactjs/node_modules/zustand/esm/index.mjs","moduleParts":{},"imported":[{"uid":"fd13be99-0"},{"uid":"fd13be99-2"}],"importedBy":[{"uid":"fd13be99-4"},{"uid":"fd13be99-12"},{"uid":"fd13be99-6"},{"uid":"fd13be99-8"},{"uid":"fd13be99-22"},{"uid":"fd13be99-10"}]},"fd13be99-36":{"id":"three/tsl","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-18"}],"isExternal":true},"fd13be99-37":{"id":"@react-three/fiber","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-18"},{"uid":"fd13be99-20"}],"isExternal":true},"fd13be99-38":{"id":"three/addons/inspector/Inspector.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-18"}],"isExternal":true},"fd13be99-39":{"id":"@davi-ai/web-speech-cognitive-services-davi","moduleParts":{},"imported":[],"importedBy":[{"uid":"fd13be99-14"}],"isExternal":true}},"env":{"rollup":"4.65.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.39",
|
|
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.28",
|
|
26
26
|
"@davi-ai/web-speech-cognitive-services-davi": "^3.0.1",
|
|
27
27
|
"@react-three/drei": "^10.0.0",
|
|
28
28
|
"@react-three/fiber": "^9.0.0",
|