mesh-avatar 0.6.0 → 0.6.1
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.
|
@@ -7,6 +7,7 @@ export function overlayTarget(name: any): {
|
|
|
7
7
|
browY: any;
|
|
8
8
|
browAngle: any;
|
|
9
9
|
mouthOpen: any;
|
|
10
|
+
mouthForm: any;
|
|
10
11
|
gx: any;
|
|
11
12
|
gy: any;
|
|
12
13
|
pitch: any;
|
|
@@ -36,6 +37,7 @@ export class ExpressionOverlay {
|
|
|
36
37
|
browY: 0;
|
|
37
38
|
browAngle: 0;
|
|
38
39
|
mouthOpen: 0;
|
|
40
|
+
mouthForm: 0;
|
|
39
41
|
gx: 0;
|
|
40
42
|
gy: 0;
|
|
41
43
|
pitch: 0;
|
package/dist/index.js
CHANGED
|
@@ -2493,7 +2493,7 @@ const rn = {
|
|
|
2493
2493
|
angry: "angryTalk",
|
|
2494
2494
|
sad: "sadTalk",
|
|
2495
2495
|
wink: "wink"
|
|
2496
|
-
}, Xr = { sad: { pitch: -6, gy: -0.45 } }, lt = (t, e, n) => Math.max(e, Math.min(n, t)), ct = Object.freeze({ eyeOpen: 1, eyeOpenL: 1, eyeSmile: 0, eyeSmileL: 0, blush: 0, browY: 0, browAngle: 0, mouthOpen: 0, gx: 0, gy: 0, pitch: 0 });
|
|
2496
|
+
}, Xr = { sad: { pitch: -6, gy: -0.45 } }, lt = (t, e, n) => Math.max(e, Math.min(n, t)), ct = Object.freeze({ eyeOpen: 1, eyeOpenL: 1, eyeSmile: 0, eyeSmileL: 0, blush: 0, browY: 0, browAngle: 0, mouthOpen: 0, mouthForm: 0, gx: 0, gy: 0, pitch: 0 });
|
|
2497
2497
|
function zr(t) {
|
|
2498
2498
|
const e = jn[rn[t]]?.p ?? {}, n = Xr[t] ?? {};
|
|
2499
2499
|
return {
|
|
@@ -2505,6 +2505,7 @@ function zr(t) {
|
|
|
2505
2505
|
browY: e.browY ?? 0,
|
|
2506
2506
|
browAngle: e.browAngle ?? 0,
|
|
2507
2507
|
mouthOpen: e.mouthOpen ?? 0,
|
|
2508
|
+
mouthForm: e.mouthForm ?? 0,
|
|
2508
2509
|
gx: e.glance?.[0] ?? 0,
|
|
2509
2510
|
gy: n.gy ?? e.glance?.[1] ?? 0,
|
|
2510
2511
|
pitch: n.pitch ?? 0
|
|
@@ -2512,7 +2513,7 @@ function zr(t) {
|
|
|
2512
2513
|
}
|
|
2513
2514
|
function Cr(t, e) {
|
|
2514
2515
|
const n = { ...t };
|
|
2515
|
-
return n.eyeROpen = (t.eyeROpen ?? 1) * e.eyeOpen, n.eyeLOpen = (t.eyeLOpen ?? 1) * e.eyeOpenL, n.eyeSmile = Math.max(t.eyeSmile ?? 0, e.eyeSmile), n.eyeSmileL = Math.max(t.eyeSmileL ?? t.eyeSmile ?? 0, e.eyeSmileL), n.blush = Math.max(t.blush ?? 0, e.blush), n.browY = lt((t.browY ?? 0) + e.browY, -1, 1), n.browAngle = lt((t.browAngle ?? 0) + e.browAngle, -1, 1), n.mouthOpen = Math.max(t.mouthOpen ?? 0, e.mouthOpen), n.gazeX = lt((t.gazeX ?? 0) + e.gx, -1, 1), n.gazeY = lt((t.gazeY ?? 0) + e.gy, -1, 1), n.angleY = lt((t.angleY ?? 0) + e.pitch, -30, 30), n;
|
|
2516
|
+
return n.eyeROpen = (t.eyeROpen ?? 1) * e.eyeOpen, n.eyeLOpen = (t.eyeLOpen ?? 1) * e.eyeOpenL, n.eyeSmile = Math.max(t.eyeSmile ?? 0, e.eyeSmile), n.eyeSmileL = Math.max(t.eyeSmileL ?? t.eyeSmile ?? 0, e.eyeSmileL), n.blush = Math.max(t.blush ?? 0, e.blush), n.browY = lt((t.browY ?? 0) + e.browY, -1, 1), n.browAngle = lt((t.browAngle ?? 0) + e.browAngle, -1, 1), n.mouthOpen = Math.max(t.mouthOpen ?? 0, e.mouthOpen), e.mouthOpen > (t.mouthOpen ?? 0) && (n.mouthForm = e.mouthForm), n.gazeX = lt((t.gazeX ?? 0) + e.gx, -1, 1), n.gazeY = lt((t.gazeY ?? 0) + e.gy, -1, 1), n.angleY = lt((t.angleY ?? 0) + e.pitch, -30, 30), n;
|
|
2516
2517
|
}
|
|
2517
2518
|
class Dr {
|
|
2518
2519
|
/** @type {keyof typeof OVERLAY_EXPRESSIONS} */
|