@vincentt-xr/sdk 2.0.0-alpha.6 → 2.0.0-alpha.7

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.
Files changed (77) hide show
  1. package/GROUNDING.md +81 -3
  2. package/dist/{DebuggerUI-DYT_dk1E.cjs → DebuggerUI-B6bP6P9r.cjs} +1 -1
  3. package/dist/{DebuggerUI-C_rbLdkh.js → DebuggerUI-BjOMr8q_.js} +1 -1
  4. package/dist/{FaceMeshRenderer-D1WsrTLA.cjs → FaceMeshRenderer-C5l6VLdO.cjs} +6 -6
  5. package/dist/{FaceMeshRenderer-DSCd1H55.js → FaceMeshRenderer-wjAHrJzP.js} +102 -96
  6. package/dist/{FaceRetouch-DsE0Dbw-.cjs → FaceRetouch-BkJzoA79.cjs} +1 -1
  7. package/dist/{FaceRetouch-CMJbGThL.js → FaceRetouch-DwbKQJAN.js} +4 -4
  8. package/dist/components/FaceMesh/FaceMeshRenderer.d.ts +11 -3
  9. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +10 -4
  10. package/dist/components/FaceMesh/index.d.ts +2 -2
  11. package/dist/components/SceneObjectRenderer/index.d.ts +9 -2
  12. package/dist/components/XRMediaSurface/index.d.ts +2 -1
  13. package/dist/{contexts-DvQI4PqI.js → contexts-ByhzppYl.js} +3 -3
  14. package/dist/{contexts-h-9TRH0r.cjs → contexts-Dr62It_K.cjs} +1 -1
  15. package/dist/debug-ui/media-source.cjs +1 -1
  16. package/dist/debug-ui/media-source.js +1 -1
  17. package/dist/debug-ui.cjs +1 -1
  18. package/dist/debug-ui.js +10 -10
  19. package/dist/entries/core.d.ts +3 -2
  20. package/dist/entries/face-effects.d.ts +2 -2
  21. package/dist/entries/tracking.d.ts +2 -0
  22. package/dist/face-effects.cjs +1 -1
  23. package/dist/face-effects.js +25 -24
  24. package/dist/{getFaceInfo-B43Cwq4n.js → getFaceInfo-C4QpCQIY.js} +1 -1
  25. package/dist/{getFaceInfo-DEzcL_Ub.cjs → getFaceInfo-fA1bFBub.cjs} +1 -1
  26. package/dist/hooks/useXRSession/facade.d.ts +2 -0
  27. package/dist/{index-I4eF5TKT.js → index-9dlAQAhy.js} +405 -400
  28. package/dist/{index-CY7Z8cHV.cjs → index-BjmTe9eM.cjs} +1 -1
  29. package/dist/{index-D67hHm44.cjs → index-BpEf2BBb.cjs} +1 -1
  30. package/dist/{index-B-s4YbWu.js → index-ByoNj0QP.js} +1 -1
  31. package/dist/{index-CxMEeCRP.cjs → index-CyUUurQT.cjs} +1 -1
  32. package/dist/index-DCiMbxC3.cjs +1 -0
  33. package/dist/{index-G_5h_FJQ.js → index-DXT3WccE.js} +808 -787
  34. package/dist/index-DpI-qo5X.cjs +17 -0
  35. package/dist/{index-DYfY9ljy.js → index-DyVF4vEW.js} +1 -1
  36. package/dist/{index-uE3sKczj.js → index-VJ0SJwmG.js} +1 -1
  37. package/dist/{internal-MvKrz0Nt.cjs → internal-Cq-TEQ5Y.cjs} +1 -1
  38. package/dist/{internal-ldPYiUF0.js → internal-Dmk1cTXq.js} +3 -3
  39. package/dist/internal.cjs +1 -1
  40. package/dist/internal.js +1 -1
  41. package/dist/low-level.cjs +1 -1
  42. package/dist/low-level.js +344 -330
  43. package/dist/main.cjs +1 -1
  44. package/dist/main.js +94 -91
  45. package/dist/{renderGroups-BJsx32q5.cjs → renderGroups-80H3DpTl.cjs} +1 -1
  46. package/dist/{renderGroups-CFt1yYLB.js → renderGroups-KZk6eRiY.js} +1 -1
  47. package/dist/{renderPasses-D-Krl6D0.cjs → renderPasses-BOoBSr8z.cjs} +1 -1
  48. package/dist/{renderPasses-C72MbZ-a.js → renderPasses-BcquyVtu.js} +4 -4
  49. package/dist/scene-object.cjs +1 -1
  50. package/dist/scene-object.js +2 -2
  51. package/dist/screen2d/coordinates.d.ts +20 -0
  52. package/dist/{selectors-ByKNTXeA.js → selectors-B8H97CKA.js} +1 -1
  53. package/dist/{selectors-CAwmL9VW.cjs → selectors-CZLKT2Iv.cjs} +1 -1
  54. package/dist/{session-CANvoLD6.cjs → session-CpkiK5YA.cjs} +1 -1
  55. package/dist/{session-Dhi0OqZo.js → session-DLFN_VII.js} +1 -1
  56. package/dist/tracking/coordinates.d.ts +5 -0
  57. package/dist/tracking.cjs +1 -1
  58. package/dist/tracking.js +69 -66
  59. package/dist/types/common.d.ts +11 -1
  60. package/dist/types/gesture-tracking.d.ts +2 -2
  61. package/dist/types/hand-tracking.d.ts +3 -3
  62. package/dist/types/nodes.d.ts +2 -2
  63. package/dist/types/session.d.ts +7 -1
  64. package/dist/{useFaceInfo-BSZq7AO1.cjs → useFaceInfo-BJ8-_MOs.cjs} +1 -1
  65. package/dist/{useFaceInfo-FVQBBNdY.js → useFaceInfo-Dk426LTu.js} +3 -3
  66. package/dist/{useFaceResults-D62STzT1.js → useFaceResults-CtetsO9M.js} +1 -1
  67. package/dist/{useFaceResults-C3oZkn2Z.cjs → useFaceResults-wBJF3zyp.cjs} +1 -1
  68. package/docs/SDK_DOCUMENTATION.md +3 -0
  69. package/docs/api/capture-recording.mdx +9 -1
  70. package/docs/api/face-mesh.mdx +33 -0
  71. package/docs/api/runtime-3d.mdx +5 -0
  72. package/docs/api/screen-image.mdx +3 -1
  73. package/docs/api/screen-space-coordinates.mdx +31 -0
  74. package/docs/api/trackers.mdx +13 -0
  75. package/package.json +4 -1
  76. package/dist/index-C0-fg1Hk.cjs +0 -1
  77. package/dist/index-DPPpU5By.cjs +0 -17
@@ -1,11 +1,11 @@
1
- import { jsx as g, jsxs as we, Fragment as Ye } from "react/jsx-runtime";
1
+ import { jsx as g, jsxs as Fe, Fragment as Ye } from "react/jsx-runtime";
2
2
  import { useLoader as de, useThree as Bt, useFrame as Vt } from "@react-three/fiber";
3
3
  import { useMemo as Z, useRef as l, useState as $e, useCallback as He, useEffect as Ce } from "react";
4
4
  import * as m from "three";
5
5
  import { MathUtils as Ke, Color as Wt, Vector2 as Be } from "three";
6
- import { l as re, f as Xt, X as jt } from "./index-I4eF5TKT.js";
7
- import { c as Yt, u as $t } from "./selectors-ByKNTXeA.js";
8
- import { t as Kt, p as Qt, b as qt } from "./index-B-s4YbWu.js";
6
+ import { l as re, f as Xt, X as jt } from "./index-9dlAQAhy.js";
7
+ import { c as Yt, u as $t } from "./selectors-B8H97CKA.js";
8
+ import { t as Kt, p as Qt, b as qt } from "./index-ByoNj0QP.js";
9
9
  import { TransformControls as Zt } from "@react-three/drei";
10
10
  const _e = 8, K = {
11
11
  type: "linear",
@@ -98,7 +98,7 @@ const _e = 8, K = {
98
98
  toneMapped: !1
99
99
  }
100
100
  );
101
- }, on = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO2YpZcAAAAASUVORK5CYII=", jn = {
101
+ }, on = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO2YpZcAAAAASUVORK5CYII=", Yn = {
102
102
  source: "solid",
103
103
  color: "#ffffff",
104
104
  opacity: 1,
@@ -180,13 +180,13 @@ const _e = 8, K = {
180
180
  rotation: { x: 0, y: 0, z: 0 },
181
181
  scale: { x: 1, y: 1, z: 1 },
182
182
  visible: !0
183
- }, Yn = ({ children: e, objectRef: n, onChange: t, value: r }) => {
183
+ }, $n = ({ children: e, objectRef: n, onChange: t, value: r }) => {
184
184
  const a = l(null), o = l(n);
185
185
  o.current = n;
186
- const [i, s] = $e(null), u = He((c) => {
186
+ const [i, s] = $e(null), f = He((c) => {
187
187
  var v;
188
188
  a.current = c, s(c), (v = o.current) == null || v.call(o, c);
189
- }, []), f = He(() => {
189
+ }, []), u = He(() => {
190
190
  const c = a.current;
191
191
  !c || !t || t({
192
192
  ...r,
@@ -207,11 +207,11 @@ const _e = 8, K = {
207
207
  }
208
208
  });
209
209
  }, [t, r]);
210
- return r.enabled ? /* @__PURE__ */ we(Ye, { children: [
210
+ return r.enabled ? /* @__PURE__ */ Fe(Ye, { children: [
211
211
  /* @__PURE__ */ g(
212
212
  "group",
213
213
  {
214
- ref: u,
214
+ ref: f,
215
215
  position: [r.position.x, r.position.y, r.position.z],
216
216
  rotation: [
217
217
  r.rotation.x * Me,
@@ -230,8 +230,8 @@ const _e = 8, K = {
230
230
  mode: r.transformControlMode,
231
231
  space: r.transformControlSpace,
232
232
  size: 0.85,
233
- onMouseUp: f,
234
- onObjectChange: f
233
+ onMouseUp: u,
234
+ onObjectChange: u
235
235
  }
236
236
  )
237
237
  ] }) : null;
@@ -248,21 +248,21 @@ const _e = 8, K = {
248
248
  };
249
249
  }, dn = (e) => e != null && e.enabled ? (e.strength ?? 1) !== 0 && Object.entries(e).some(
250
250
  ([n, t]) => n !== "enabled" && n !== "strength" && typeof t == "number" && t !== 0
251
- ) : !1, un = (e, n, t, r) => {
251
+ ) : !1, fn = (e, n, t, r) => {
252
252
  const a = t.enabled ? t.strength ?? 1 : 0;
253
253
  if (a === 0)
254
254
  return r.x = e.x, r.y = e.y, r.z = e.z, r;
255
- const o = (e.x - n.centerX) / n.width, i = (e.y - n.centerY) / n.height, s = Math.abs(o), u = te((-i + 0.42) / 0.55), f = L(i, -0.02, 0.34), c = L(i, -0.24, 0.16) * te((s - 0.05) / 0.28), v = L(i, 0.02, 0.26) * L(s, 0, 0.18), R = L(i, 0.29, 0.18) * L(s, 0, 0.36), D = te((i - 0.16) / 0.36), _ = f * L(s, 0.34, 0.22), w = u * L(s, 0, 0.48), S = L(i, -0.19, 0.1) * te((s - 0.05) / 0.3), Y = L(i, 0.48, 0.2) * L(s, 0, 0.26);
255
+ const o = (e.x - n.centerX) / n.width, i = (e.y - n.centerY) / n.height, s = Math.abs(o), f = te((-i + 0.42) / 0.55), u = L(i, -0.02, 0.34), c = L(i, -0.24, 0.16) * te((s - 0.05) / 0.28), v = L(i, 0.02, 0.26) * L(s, 0, 0.18), R = L(i, 0.29, 0.18) * L(s, 0, 0.36), D = te((i - 0.16) / 0.36), _ = u * L(s, 0.34, 0.22), F = f * L(s, 0, 0.48), S = L(i, -0.19, 0.1) * te((s - 0.05) / 0.3), Y = L(i, 0.48, 0.2) * L(s, 0, 0.26);
256
256
  let M = e.x, p = e.y, U = e.z;
257
257
  const y = (T, h = 1) => {
258
258
  M += o * n.width * T * a * h;
259
259
  }, d = (T, h = 1) => {
260
260
  p += i * n.height * T * a * h;
261
261
  };
262
- y(t.faceWidth ?? 0), d(t.faceHeight ?? 0), y(t.faceRoundness ?? 0, f * (1 - s)), p -= n.height * (t.midfaceHeight ?? 0) * a * f * 0.25, d(-(t.foreheadHeight ?? 0), w), y(t.foreheadWidth ?? 0, w), y(
262
+ y(t.faceWidth ?? 0), d(t.faceHeight ?? 0), y(t.faceRoundness ?? 0, u * (1 - s)), p -= n.height * (t.midfaceHeight ?? 0) * a * u * 0.25, d(-(t.foreheadHeight ?? 0), F), y(t.foreheadWidth ?? 0, F), y(
263
263
  t.cheekboneWidth ?? 0,
264
264
  L(i, -0.06, 0.16) * L(s, 0.34, 0.2)
265
- ), y(t.cheekWidth ?? 0, _), y(t.jawWidth ?? 0, D), d(t.chinHeight ?? 0, Y), p -= n.height * (t.scalpHeight ?? 0) * a * u * 0.3, U -= (t.midfaceDepth ?? 0) * a * f * 0.08, U += (t.cheekHollowness ?? 0) * a * _ * 0.06, U -= (t.browDepth ?? 0) * a * S * 0.05, p -= n.height * (t.browHeight ?? 0) * a * S * 0.2, M += Math.sign(o || 1) * n.width * (t.browDistance ?? 0) * a * S * 0.16;
265
+ ), y(t.cheekWidth ?? 0, _), y(t.jawWidth ?? 0, D), d(t.chinHeight ?? 0, Y), p -= n.height * (t.scalpHeight ?? 0) * a * f * 0.3, U -= (t.midfaceDepth ?? 0) * a * u * 0.08, U += (t.cheekHollowness ?? 0) * a * _ * 0.06, U -= (t.browDepth ?? 0) * a * S * 0.05, p -= n.height * (t.browHeight ?? 0) * a * S * 0.2, M += Math.sign(o || 1) * n.width * (t.browDistance ?? 0) * a * S * 0.16;
266
266
  const k = (t.headCurve ?? 0) * a * (i + 0.1);
267
267
  U -= k * k * 0.04 * Math.sign(t.headCurve ?? 0), M += n.width * (t.faceTwist ?? 0) * a * i * 0.18;
268
268
  const N = (t.faceSwirl ?? 0) * a * 0.22;
@@ -358,42 +358,42 @@ const _e = 8, K = {
358
358
  385,
359
359
  384,
360
360
  398
361
- ]), fn = /* @__PURE__ */ new Set([814, 815, 816, 817, 818, 819, 830, 831, 832, 833]), hn = (e, n, t) => {
361
+ ]), un = /* @__PURE__ */ new Set([814, 815, 816, 817, 818, 819, 830, 831, 832, 833]), hn = (e, n, t) => {
362
362
  const r = Ae.has(e) && Ae.has(n) && Ae.has(t), a = ve.has(e) && ve.has(n) && ve.has(t), o = Ee.has(e) && Ee.has(n) && Ee.has(t);
363
363
  return r ? "mouth" : a ? "leftEye" : o ? "rightEye" : "base";
364
364
  }, mn = (e) => {
365
365
  const n = /* @__PURE__ */ new Map();
366
366
  for (let s = 0; s < e.length; s += 3) {
367
- const u = [e[s], e[s + 1], e[s + 2]];
368
- for (let f = 0; f < 3; f += 1) {
369
- const c = u[f], v = u[(f + 1) % 3], R = c < v ? `${c}:${v}` : `${v}:${c}`, D = n.get(R);
367
+ const f = [e[s], e[s + 1], e[s + 2]];
368
+ for (let u = 0; u < 3; u += 1) {
369
+ const c = f[u], v = f[(u + 1) % 3], R = c < v ? `${c}:${v}` : `${v}:${c}`, D = n.get(R);
370
370
  D ? D.count += 1 : n.set(R, { a: c, b: v, count: 1 });
371
371
  }
372
372
  }
373
373
  const t = /* @__PURE__ */ new Map();
374
- n.forEach(({ a: s, b: u, count: f }) => {
375
- f === 1 && (t.set(s, [...t.get(s) ?? [], u]), t.set(u, [...t.get(u) ?? [], s]));
374
+ n.forEach(({ a: s, b: f, count: u }) => {
375
+ u === 1 && (t.set(s, [...t.get(s) ?? [], f]), t.set(f, [...t.get(f) ?? [], s]));
376
376
  });
377
- const r = [...t.keys()].sort((s, u) => s - u)[0];
377
+ const r = [...t.keys()].sort((s, f) => s - f)[0];
378
378
  if (r === void 0) return [];
379
379
  const a = [r];
380
380
  let o = -1, i = r;
381
381
  for (; a.length <= t.size + 1; ) {
382
- const s = (t.get(i) ?? []).find((u) => u !== o);
382
+ const s = (t.get(i) ?? []).find((f) => f !== o);
383
383
  if (s === void 0 || s === r) break;
384
384
  a.push(s), o = i, i = s;
385
385
  }
386
386
  return a;
387
387
  }, pn = (e) => {
388
- const n = [], t = [], r = [], a = [], o = [], i = [], s = [], u = [];
389
- let f = 0, c = 0;
388
+ const n = [], t = [], r = [], a = [], o = [], i = [], s = [], f = [];
389
+ let u = 0, c = 0;
390
390
  e.split(`
391
391
  `).forEach((y) => {
392
392
  const d = y.trim();
393
393
  if (!d) return;
394
394
  if (d.startsWith("v ")) {
395
395
  const [, x, E, T] = d.split(/\s+/);
396
- s.push([Number(x), Number(E), Number(T)]), f += 1;
396
+ s.push([Number(x), Number(E), Number(T)]), u += 1;
397
397
  return;
398
398
  }
399
399
  if (d.startsWith("vt ")) {
@@ -406,28 +406,28 @@ const _e = 8, K = {
406
406
  c += 1;
407
407
  const [, ...N] = d.split(/\s+/), I = N.map((x) => {
408
408
  const [E, T] = x.split("/"), h = Number(E) - 1, z = Number(T) - 1;
409
- return z >= 0 && i[z] && !u[h] && (u[h] = i[z]), h;
409
+ return z >= 0 && i[z] && !f[h] && (f[h] = i[z]), h;
410
410
  });
411
411
  if (!(I.length < 3))
412
412
  for (let x = 1; x < I.length - 1; x += 1) {
413
413
  const E = I[0], T = I[x], h = I[x + 1], z = hn(E, T, h);
414
- fn.has(k) ? o.push(E, T, h) : z === "mouth" ? t.push(E, T, h) : z === "leftEye" ? r.push(E, T, h) : z === "rightEye" ? a.push(E, T, h) : n.push(E, T, h);
414
+ un.has(k) ? o.push(E, T, h) : z === "mouth" ? t.push(E, T, h) : z === "leftEye" ? r.push(E, T, h) : z === "rightEye" ? a.push(E, T, h) : n.push(E, T, h);
415
415
  }
416
416
  });
417
417
  const v = [];
418
- for (let y = 0; y < f; y += 1) {
419
- const [d, k] = u[y] ?? [0, 0];
418
+ for (let y = 0; y < u; y += 1) {
419
+ const [d, k] = f[y] ?? [0, 0];
420
420
  v.push(d, k);
421
421
  }
422
422
  const R = new Uint16Array(r), D = new Uint16Array(a), _ = new Uint16Array(r.length + a.length);
423
423
  _.set(R), _.set(D, R.length);
424
- const w = We.map((y) => {
424
+ const F = We.map((y) => {
425
425
  const [d, k] = s[y] ?? [0, 0];
426
426
  return new m.Vector2(d, k);
427
427
  }), S = mn(t), Y = S.map((y) => {
428
428
  const [d, k] = s[y] ?? [0, 0];
429
429
  return new m.Vector2(d, k);
430
- }), M = m.ShapeUtils.triangulateShape(w, [Y]), p = [...We, ...S], U = new Uint16Array(
430
+ }), M = m.ShapeUtils.triangulateShape(F, [Y]), p = [...We, ...S], U = new Uint16Array(
431
431
  S.length > 2 ? M.flatMap((y) => y.map((d) => p[d])) : []
432
432
  );
433
433
  return {
@@ -439,7 +439,7 @@ const _e = 8, K = {
439
439
  eyeIndices: _,
440
440
  noseIndices: new Uint16Array(o),
441
441
  uvs: new Float32Array(v),
442
- vertexCount: f
442
+ vertexCount: u
443
443
  };
444
444
  }, yn = "canonical_face_model.obj", bn = new TextDecoder("utf-8"), Se = /* @__PURE__ */ new Map(), gn = (e) => {
445
445
  const n = Se.get(e);
@@ -538,7 +538,7 @@ const Te = {
538
538
  textureSource: ae.solid,
539
539
  color: "#111111",
540
540
  opacity: 0.5
541
- }, An = 24, Ze = 10, Fe = (e, n, t) => e !== C.shader ? "none" : n === X.originalFace ? "originalFace" : n === X.composite ? t === j.none ? "originalFace" : "composite" : "none", $n = (e, n) => e === C.basic || e === C.standard || e === C.physical || e === C.toon || e === C.shader && n === X.composite, Kn = (e, n, t = j.canonical) => Fe(e, n, t) === "composite", vn = (e, n, t) => Fe(e, n, t) === "originalFace", ke = (e) => e === ae.imageUrl || e === ae.mediaUrl, En = (e) => e === ae.solid || e === ae.gradient, je = {
541
+ }, An = 24, Ze = 10, we = (e, n, t) => e !== C.shader ? "none" : n === X.originalFace ? "originalFace" : n === X.composite ? t === j.none ? "originalFace" : "composite" : "none", Kn = (e, n) => e === C.basic || e === C.standard || e === C.physical || e === C.toon || e === C.shader && n === X.composite, Qn = (e, n, t = j.canonical) => we(e, n, t) === "composite", vn = (e, n, t) => we(e, n, t) === "originalFace", ke = (e) => e === ae.imageUrl || e === ae.mediaUrl, En = (e) => e === ae.solid || e === ae.gradient, je = {
542
542
  normal: 0,
543
543
  add: 1,
544
544
  subtract: 2,
@@ -699,14 +699,14 @@ const Te = {
699
699
  color: o,
700
700
  compositeShading: i,
701
701
  faceAlphaMaskUrl: s,
702
- faceTextureStyle2Url: u,
703
- faceTextureUrl: f,
702
+ faceTextureStyle2Url: f,
703
+ faceTextureUrl: u,
704
704
  masked: c = !1,
705
705
  maskColor: v,
706
706
  maskOpacity: R,
707
707
  maskSourceUrl: D,
708
708
  maskTextureSource: _,
709
- materialType: w,
709
+ materialType: F,
710
710
  opacity: S,
711
711
  shaderPreset: Y,
712
712
  side: M,
@@ -714,10 +714,10 @@ const Te = {
714
714
  }) => {
715
715
  const U = de(
716
716
  m.TextureLoader,
717
- f || Re
717
+ u || Re
718
718
  ), y = de(
719
719
  m.TextureLoader,
720
- u || f || Re
720
+ f || u || Re
721
721
  ), d = de(
722
722
  m.TextureLoader,
723
723
  s || Re
@@ -728,7 +728,7 @@ const Te = {
728
728
  },
729
729
  [N, k]
730
730
  );
731
- const I = p === j.style2 ? y : U, x = p !== j.none, E = Fe(w, Y, p), T = [
731
+ const I = p === j.style2 ? y : U, x = p !== j.none, E = we(F, Y, p), T = [
732
732
  "composite-material",
733
733
  p,
734
734
  e,
@@ -738,8 +738,8 @@ const Te = {
738
738
  i ? "lit" : "flat",
739
739
  o,
740
740
  S,
741
- f,
742
741
  u,
742
+ f,
743
743
  s
744
744
  ].join("|"), h = {
745
745
  side: M,
@@ -755,7 +755,7 @@ const Te = {
755
755
  gradient: Qe(v)
756
756
  }),
757
757
  [v, R, D, _]
758
- ), F = Z(
758
+ ), w = Z(
759
759
  () => ({
760
760
  cameraTexture: { value: null },
761
761
  canonicalTexture: { value: null },
@@ -784,7 +784,7 @@ const Te = {
784
784
  ]
785
785
  );
786
786
  if (Ce(() => {
787
- F.cameraTexture.value = a ?? U, F.canonicalTexture.value = I, F.alphaMask.value = d, F.textureTint.value.set(o), F.opacity.value = S, F.blendMode.value = je[t], F.blendOpacity.value = r, F.useCanonicalTexture.value = x ? 1 : 0, F.useAlphaMask.value = e === J.canonical ? 1 : 0, F.alphaOpacity.value = n, F.compositeShading.value = i ? 1 : 0;
787
+ w.cameraTexture.value = a ?? U, w.canonicalTexture.value = I, w.alphaMask.value = d, w.textureTint.value.set(o), w.opacity.value = S, w.blendMode.value = je[t], w.blendOpacity.value = r, w.useCanonicalTexture.value = x ? 1 : 0, w.useAlphaMask.value = e === J.canonical ? 1 : 0, w.alphaOpacity.value = n, w.compositeShading.value = i ? 1 : 0;
788
788
  }, [
789
789
  e,
790
790
  d,
@@ -794,7 +794,7 @@ const Te = {
794
794
  a,
795
795
  o,
796
796
  i,
797
- F,
797
+ w,
798
798
  U,
799
799
  x,
800
800
  S,
@@ -808,7 +808,7 @@ const Te = {
808
808
  },
809
809
  `masked-${_}-material`
810
810
  );
811
- if (w === C.wireframe)
811
+ if (F === C.wireframe)
812
812
  return /* @__PURE__ */ g(
813
813
  "meshBasicMaterial",
814
814
  {
@@ -842,7 +842,7 @@ const Te = {
842
842
  return /* @__PURE__ */ g(
843
843
  "shaderMaterial",
844
844
  {
845
- uniforms: F,
845
+ uniforms: w,
846
846
  vertexShader: Rn,
847
847
  fragmentShader: Cn,
848
848
  transparent: !0,
@@ -853,8 +853,8 @@ const Te = {
853
853
  },
854
854
  T
855
855
  );
856
- const Q = x ? I : null, $ = e === J.canonical && n > 0 ? d : null, W = `${w}-${p}-${e}-${n > 0 ? "alpha-on" : "alpha-off"}`;
857
- return w === C.standard ? /* @__PURE__ */ g(
856
+ const Q = x ? I : null, $ = e === J.canonical && n > 0 ? d : null, W = `${F}-${p}-${e}-${n > 0 ? "alpha-on" : "alpha-off"}`;
857
+ return F === C.standard ? /* @__PURE__ */ g(
858
858
  "meshStandardMaterial",
859
859
  {
860
860
  ...h,
@@ -867,7 +867,7 @@ const Te = {
867
867
  roughness: 0.72
868
868
  },
869
869
  W
870
- ) : w === C.physical ? /* @__PURE__ */ g(
870
+ ) : F === C.physical ? /* @__PURE__ */ g(
871
871
  "meshPhysicalMaterial",
872
872
  {
873
873
  ...h,
@@ -882,7 +882,7 @@ const Te = {
882
882
  clearcoatRoughness: 0.4
883
883
  },
884
884
  W
885
- ) : w === C.toon ? /* @__PURE__ */ g(
885
+ ) : F === C.toon ? /* @__PURE__ */ g(
886
886
  "meshToonMaterial",
887
887
  {
888
888
  ...h,
@@ -894,7 +894,7 @@ const Te = {
894
894
  depthTest: !0
895
895
  },
896
896
  W
897
- ) : w === C.normal ? /* @__PURE__ */ g(
897
+ ) : F === C.normal ? /* @__PURE__ */ g(
898
898
  "meshNormalMaterial",
899
899
  {
900
900
  ...h,
@@ -903,7 +903,7 @@ const Te = {
903
903
  flatShading: !1
904
904
  },
905
905
  "normal-material"
906
- ) : w === C.matcap ? /* @__PURE__ */ g(
906
+ ) : F === C.matcap ? /* @__PURE__ */ g(
907
907
  "meshMatcapMaterial",
908
908
  {
909
909
  ...h,
@@ -987,11 +987,11 @@ const Te = {
987
987
  masked: !0,
988
988
  renderOrderOffset: 3
989
989
  }
990
- ], wn = {
990
+ ], Fn = {
991
991
  [ne.front]: m.FrontSide,
992
992
  [ne.back]: m.BackSide,
993
993
  [ne.double]: m.DoubleSide
994
- }, Fn = (e, n, t) => {
994
+ }, wn = (e, n, t) => {
995
995
  e.setAttribute("position", n.position), e.setAttribute("uv", n.uv), e.setAttribute("faceUv", n.faceUv), e.setIndex(new m.BufferAttribute(t, 1));
996
996
  }, Un = ({
997
997
  faceIndex: e = 0,
@@ -1002,21 +1002,23 @@ const Te = {
1002
1002
  shaderPreset: o = G.shaderPreset,
1003
1003
  textureMap: i = G.textureMap,
1004
1004
  alphaMap: s = G.alphaMap,
1005
- alphaOpacity: u = G.alphaOpacity,
1006
- side: f = G.side,
1005
+ alphaOpacity: f = G.alphaOpacity,
1006
+ side: u = G.side,
1007
1007
  blendMode: c = G.blendMode,
1008
1008
  blendOpacity: v = G.blendOpacity,
1009
1009
  showOverlayMask: R = !1,
1010
1010
  showMouthMask: D = Te.mouth,
1011
1011
  showEyeMask: _ = Te.eyes,
1012
- showLeftEyeMask: w,
1012
+ showLeftEyeMask: F,
1013
1013
  showRightEyeMask: S,
1014
1014
  showNoseMask: Y = Te.nose,
1015
1015
  showEyeGeometry: M = !0,
1016
1016
  showLeftEyeGeometry: p,
1017
1017
  showRightEyeGeometry: U,
1018
1018
  showMouthGeometry: y = !0,
1019
- showLipsGeometry: d = !0,
1019
+ // The lips mesh is an effect-only overlay. Rendering it with the base face
1020
+ // mesh duplicates an incomplete triangulation over the mouth.
1021
+ showLipsGeometry: d = !1,
1020
1022
  showBaseGeometry: k = !0,
1021
1023
  showNoseGeometry: N = !0,
1022
1024
  maskTextureSource: I = ee.textureSource,
@@ -1025,17 +1027,17 @@ const Te = {
1025
1027
  maskOpacity: T = ee.opacity,
1026
1028
  faceTextureUrl: h = "",
1027
1029
  faceTextureStyle2Url: z = "",
1028
- faceAlphaMaskUrl: F = "",
1030
+ faceAlphaMaskUrl: w = "",
1029
1031
  compositeShading: Q = !1,
1030
1032
  faceWarp3D: $,
1031
1033
  transform: W,
1032
1034
  renderOrder: Je = Ze,
1033
- externalScale: ue = 1,
1035
+ externalScale: fe = 1,
1034
1036
  mesh: et,
1035
1037
  meshUrl: tt,
1036
1038
  materialOverride: oe
1037
1039
  }) => {
1038
- const fe = Yt(jt.FACE_TRACKER), Ue = $t(), { camera: nt } = Bt(), H = Mn({ mesh: et, url: tt }), Ie = l(null), rt = l(null), at = l(null), ot = l(null), st = l(null), it = l(null), ct = l(null), lt = l(null), dt = l(null), ut = l(null), ft = l(null), ht = l(null), mt = l(null), pt = l(null), yt = l(null), bt = l(null), gt = l(null), Mt = l(null), xt = l(null), At = l(null), he = l(null), me = l(null), pe = l(null), Oe = l(null), vt = l(new m.Vector3()), Et = l({ x: 0, y: 0, z: 0 }), St = l({ x: 0, y: 0, z: 0 }), Tt = l({ x: 0, y: 0, z: 0 }), se = l(!1), Rt = wn[f], Ct = n ?? t, _t = p ?? M, kt = U ?? M, wt = R || (w ?? _), Ft = R || (S ?? _), Ut = R || D, It = R || Y, Ot = {
1040
+ const ue = Yt(jt.FACE_TRACKER), Ue = $t(), { camera: nt } = Bt(), H = Mn({ mesh: et, url: tt }), Ie = l(null), rt = l(null), at = l(null), ot = l(null), st = l(null), it = l(null), ct = l(null), lt = l(null), dt = l(null), ft = l(null), ut = l(null), ht = l(null), mt = l(null), pt = l(null), yt = l(null), bt = l(null), gt = l(null), Mt = l(null), xt = l(null), At = l(null), he = l(null), me = l(null), pe = l(null), Oe = l(null), vt = l(new m.Vector3()), Et = l({ x: 0, y: 0, z: 0 }), St = l({ x: 0, y: 0, z: 0 }), Tt = l({ x: 0, y: 0, z: 0 }), se = l(!1), Rt = Fn[u], Ct = n ?? t, _t = p ?? M, kt = U ?? M, Ft = R || (F ?? _), wt = R || (S ?? _), Ut = R || D, It = R || Y, Ot = {
1039
1041
  base: Ie,
1040
1042
  mouth: rt,
1041
1043
  lips: at,
@@ -1045,9 +1047,9 @@ const Te = {
1045
1047
  "mouth-mask": ct,
1046
1048
  "left-eye-mask": lt,
1047
1049
  "right-eye-mask": dt,
1048
- "nose-mask": ut
1050
+ "nose-mask": ft
1049
1051
  }, Lt = {
1050
- base: ft,
1052
+ base: ut,
1051
1053
  mouth: ht,
1052
1054
  lips: mt,
1053
1055
  "left-eye": pt,
@@ -1065,20 +1067,20 @@ const Te = {
1065
1067
  "right-eye": kt,
1066
1068
  nose: N,
1067
1069
  "mouth-mask": Ut,
1068
- "left-eye-mask": wt,
1069
- "right-eye-mask": Ft,
1070
+ "left-eye-mask": Ft,
1071
+ "right-eye-mask": wt,
1070
1072
  "nose-mask": It
1071
1073
  }, Pt = (A) => /* @__PURE__ */ g(
1072
1074
  _n,
1073
1075
  {
1074
1076
  alphaMap: s,
1075
- alphaOpacity: u,
1077
+ alphaOpacity: f,
1076
1078
  blendMode: c,
1077
1079
  blendOpacity: v,
1078
1080
  cameraTexture: Ue,
1079
1081
  color: Ct,
1080
1082
  compositeShading: Q,
1081
- faceAlphaMaskUrl: F,
1083
+ faceAlphaMaskUrl: w,
1082
1084
  faceTextureStyle2Url: z,
1083
1085
  faceTextureUrl: h,
1084
1086
  masked: A,
@@ -1102,7 +1104,7 @@ const Te = {
1102
1104
  ), zt = (A) => Qt(A, nt, vt.current);
1103
1105
  return Vt(() => {
1104
1106
  var ze, Ge;
1105
- const A = Ie.current, B = (Ge = (ze = fe == null ? void 0 : fe.detectionResults) == null ? void 0 : ze.faceLandmarks) == null ? void 0 : Ge[e], Gt = q.every(
1107
+ const A = Ie.current, B = (Ge = (ze = ue == null ? void 0 : ue.detectionResults) == null ? void 0 : ze.faceLandmarks) == null ? void 0 : Ge[e], Gt = q.every(
1106
1108
  (b) => b.geometryRef.current && b.meshRef.current
1107
1109
  );
1108
1110
  if (!H || !A || !Gt) return;
@@ -1120,7 +1122,7 @@ const Te = {
1120
1122
  faceUv: new m.BufferAttribute(pe.current, 2)
1121
1123
  };
1122
1124
  q.forEach((O) => {
1123
- Fn(O.geometryRef.current, b, O.getIndices(H));
1125
+ wn(O.geometryRef.current, b, O.getIndices(H));
1124
1126
  }), b.uv.needsUpdate = !0, Oe.current = H, se.current = !1;
1125
1127
  }
1126
1128
  const ie = he.current, ye = pe.current, ce = me.current;
@@ -1136,7 +1138,7 @@ const Te = {
1136
1138
  }
1137
1139
  const Nt = Math.min(B.length, H.vertexCount);
1138
1140
  for (let b = 0; b < Nt; b++) {
1139
- const O = B[b], Ne = De && Pe ? un(O, Pe, $, Et.current) : O, Ht = W && P ? Kt(
1141
+ const O = B[b], Ne = De && Pe ? fn(O, Pe, $, Et.current) : O, Ht = W && P ? Kt(
1140
1142
  Ne,
1141
1143
  P,
1142
1144
  W,
@@ -1149,7 +1151,7 @@ const Te = {
1149
1151
  }), A.attributes.position.needsUpdate = !0, A.attributes.faceUv.needsUpdate = !0, q.forEach((b) => {
1150
1152
  b.geometryRef.current.computeVertexNormals();
1151
1153
  });
1152
- }), /* @__PURE__ */ g("group", { scale: [ue, ue, ue], children: q.map((A) => /* @__PURE__ */ we(
1154
+ }), /* @__PURE__ */ g("group", { scale: [fe, fe, fe], children: q.map((A) => /* @__PURE__ */ Fe(
1153
1155
  "mesh",
1154
1156
  {
1155
1157
  ref: A.meshRef,
@@ -1165,7 +1167,7 @@ const Te = {
1165
1167
  }, In = `${re.sdkAssetsBaseUrl}/Canonical_Face_Color.png`, On = `${re.sdkAssetsBaseUrl}/Canonical_Face_Color_style_2.png`, Ln = `${re.sdkAssetsBaseUrl}/Canonical_Face_Color_Mask.png`, Dn = {
1166
1168
  ...Ve,
1167
1169
  position: { ...Ve.position, y: 1e-3 }
1168
- }, Qn = {
1170
+ }, qn = {
1169
1171
  enabled: !0,
1170
1172
  faceIndex: 0,
1171
1173
  targetFps: An,
@@ -1191,7 +1193,13 @@ const Te = {
1191
1193
  }, Pn = (e) => {
1192
1194
  const { externalMeshUrl: n, ...t } = e;
1193
1195
  return { ...t, color: t.baseColor, meshUrl: n };
1194
- }, qn = (e, n) => {
1196
+ }, zn = ({
1197
+ materialOverride: e,
1198
+ value: n
1199
+ }) => ({
1200
+ ...Pn(n),
1201
+ materialOverride: e
1202
+ }), Zn = (e, n) => {
1195
1203
  const t = { ...e, ...n };
1196
1204
  return n.maskTextureSource && !ke(n.maskTextureSource) && (t.maskSourceUrl = ""), t.materialType === C.shader && n.shaderPreset === X.composite ? {
1197
1205
  ...t,
@@ -1202,10 +1210,7 @@ const Te = {
1202
1210
  ...t,
1203
1211
  textureMap: Xe.textureMap
1204
1212
  } : t;
1205
- }, Zn = ({
1206
- transform: e,
1207
- value: n
1208
- }) => n.enabled ? /* @__PURE__ */ we(Ye, { children: [
1213
+ }, Jn = ({ transform: e, value: n, materialOverride: t }) => n.enabled ? /* @__PURE__ */ Fe(Ye, { children: [
1209
1214
  /* @__PURE__ */ g(
1210
1215
  qt,
1211
1216
  {
@@ -1218,20 +1223,21 @@ const Te = {
1218
1223
  /* @__PURE__ */ g(
1219
1224
  Un,
1220
1225
  {
1221
- ...Pn(n),
1226
+ ...zn({ value: n, materialOverride: t }),
1222
1227
  transform: e ?? Dn
1223
1228
  }
1224
1229
  )
1225
1230
  ] }) : null;
1226
1231
  export {
1227
- Qe as A,
1228
- Ve as B,
1232
+ Yn as A,
1233
+ Qe as B,
1229
1234
  Un as C,
1230
1235
  G as D,
1231
- _e as E,
1236
+ Ve as E,
1232
1237
  C as F,
1233
- En as G,
1234
- ke as H,
1238
+ _e as G,
1239
+ En as H,
1240
+ ke as I,
1235
1241
  cn as M,
1236
1242
  an as S,
1237
1243
  Re as T,
@@ -1242,23 +1248,23 @@ export {
1242
1248
  qe as e,
1243
1249
  ae as f,
1244
1250
  je as g,
1245
- Qn as h,
1251
+ qn as h,
1246
1252
  Dn as i,
1247
1253
  Te as j,
1248
- Kn as k,
1254
+ Qn as k,
1249
1255
  _n as l,
1250
- Zn as m,
1256
+ Jn as m,
1251
1257
  Ln as n,
1252
1258
  On as o,
1253
1259
  In as p,
1254
1260
  kn as q,
1255
- Pn as r,
1256
- $n as s,
1257
- qn as t,
1258
- Mn as u,
1259
- pn as v,
1260
- K as w,
1261
- en as x,
1262
- Yn as y,
1263
- jn as z
1261
+ zn as r,
1262
+ Kn as s,
1263
+ Pn as t,
1264
+ Zn as u,
1265
+ Mn as v,
1266
+ pn as w,
1267
+ K as x,
1268
+ en as y,
1269
+ $n as z
1264
1270
  };
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./FaceMeshRenderer-D1WsrTLA.cjs"),M=require("react/jsx-runtime"),S=require("react"),D=require("./index-C0-fg1Hk.cjs"),y=require("./index-CxMEeCRP.cjs"),T=require("@react-three/fiber"),U=require("three"),B=require("./selectors-CAwmL9VW.cjs");function N(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const p=N(U),w={enabled:!1,strength:1,faceWidth:0,faceHeight:0,faceRoundness:0,midfaceHeight:0,foreheadHeight:0,foreheadWidth:0,cheekboneWidth:0,cheekWidth:0,cheekHollowness:0,midfaceDepth:0,scalpHeight:0,headCurve:0,faceTwist:0,faceSwirl:0,browDistance:0,browHeight:0,browDepth:0,eyeSize:0,leftEyeSize:0,rightEyeSize:0,eyeDistance:0,leftEyeX:0,rightEyeX:0,leftEyeY:0,rightEyeY:0,noseSize:0,noseLength:0,mouthWidth:0,mouthHeight:0,jawWidth:0,chinHeight:0},I={...w,enabled:!0,strength:1,faceWidth:-.08,faceHeight:.04,foreheadHeight:.04,cheekWidth:-.04,eyeSize:.08,eyeDistance:.03,noseSize:-.05,noseLength:.03,mouthWidth:.06,mouthHeight:.02,jawWidth:-.05,chinHeight:.03},X=[{label:"Wireframe",value:o.FACE_MESH_MATERIAL_TYPES.wireframe},{label:"Basic",value:o.FACE_MESH_MATERIAL_TYPES.basic},{label:"Standard",value:o.FACE_MESH_MATERIAL_TYPES.standard},{label:"Physical",value:o.FACE_MESH_MATERIAL_TYPES.physical},{label:"Toon",value:o.FACE_MESH_MATERIAL_TYPES.toon},{label:"Normal",value:o.FACE_MESH_MATERIAL_TYPES.normal},{label:"Matcap",value:o.FACE_MESH_MATERIAL_TYPES.matcap},{label:"Shader",value:o.FACE_MESH_MATERIAL_TYPES.shader}],W=[{label:"Original Face",value:o.FACE_MESH_SHADER_PRESETS.originalFace},{label:"Composite",value:o.FACE_MESH_SHADER_PRESETS.composite}],Y=[{label:"Front",value:o.FACE_MESH_SIDES.front},{label:"Back",value:o.FACE_MESH_SIDES.back},{label:"Double",value:o.FACE_MESH_SIDES.double}],j=[{label:"None",value:o.FACE_MESH_TEXTURE_MAPS.none},{label:"UV Map 1",value:o.FACE_MESH_TEXTURE_MAPS.canonical},{label:"UV Map 2",value:o.FACE_MESH_TEXTURE_MAPS.style2}],q=[{label:"None",value:o.FACE_MESH_ALPHA_MAPS.none},{label:"Default Mask",value:o.FACE_MESH_ALPHA_MAPS.canonical}],G=[{label:"Solid",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.solid},{label:"Gradient",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.gradient},{label:"Image URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.imageUrl},{label:"Media URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.mediaUrl}],V=[{label:"Normal",value:o.FACE_MESH_BLEND_MODES.normal},{label:"Add",value:o.FACE_MESH_BLEND_MODES.add},{label:"Subtract",value:o.FACE_MESH_BLEND_MODES.subtract},{label:"Multiply",value:o.FACE_MESH_BLEND_MODES.multiply},{label:"Screen",value:o.FACE_MESH_BLEND_MODES.screen},{label:"Overlay",value:o.FACE_MESH_BLEND_MODES.overlay},{label:"Soft Light",value:o.FACE_MESH_BLEND_MODES.softLight},{label:"Hard Light",value:o.FACE_MESH_BLEND_MODES.hardLight},{label:"Lighten",value:o.FACE_MESH_BLEND_MODES.lighten},{label:"Darken",value:o.FACE_MESH_BLEND_MODES.darken},{label:"Difference",value:o.FACE_MESH_BLEND_MODES.difference},{label:"Exclusion",value:o.FACE_MESH_BLEND_MODES.exclusion}],K=`
1
+ "use strict";const o=require("./FaceMeshRenderer-C5l6VLdO.cjs"),M=require("react/jsx-runtime"),S=require("react"),D=require("./index-DCiMbxC3.cjs"),y=require("./index-CyUUurQT.cjs"),T=require("@react-three/fiber"),U=require("three"),B=require("./selectors-CZLKT2Iv.cjs");function N(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const p=N(U),w={enabled:!1,strength:1,faceWidth:0,faceHeight:0,faceRoundness:0,midfaceHeight:0,foreheadHeight:0,foreheadWidth:0,cheekboneWidth:0,cheekWidth:0,cheekHollowness:0,midfaceDepth:0,scalpHeight:0,headCurve:0,faceTwist:0,faceSwirl:0,browDistance:0,browHeight:0,browDepth:0,eyeSize:0,leftEyeSize:0,rightEyeSize:0,eyeDistance:0,leftEyeX:0,rightEyeX:0,leftEyeY:0,rightEyeY:0,noseSize:0,noseLength:0,mouthWidth:0,mouthHeight:0,jawWidth:0,chinHeight:0},I={...w,enabled:!0,strength:1,faceWidth:-.08,faceHeight:.04,foreheadHeight:.04,cheekWidth:-.04,eyeSize:.08,eyeDistance:.03,noseSize:-.05,noseLength:.03,mouthWidth:.06,mouthHeight:.02,jawWidth:-.05,chinHeight:.03},X=[{label:"Wireframe",value:o.FACE_MESH_MATERIAL_TYPES.wireframe},{label:"Basic",value:o.FACE_MESH_MATERIAL_TYPES.basic},{label:"Standard",value:o.FACE_MESH_MATERIAL_TYPES.standard},{label:"Physical",value:o.FACE_MESH_MATERIAL_TYPES.physical},{label:"Toon",value:o.FACE_MESH_MATERIAL_TYPES.toon},{label:"Normal",value:o.FACE_MESH_MATERIAL_TYPES.normal},{label:"Matcap",value:o.FACE_MESH_MATERIAL_TYPES.matcap},{label:"Shader",value:o.FACE_MESH_MATERIAL_TYPES.shader}],W=[{label:"Original Face",value:o.FACE_MESH_SHADER_PRESETS.originalFace},{label:"Composite",value:o.FACE_MESH_SHADER_PRESETS.composite}],Y=[{label:"Front",value:o.FACE_MESH_SIDES.front},{label:"Back",value:o.FACE_MESH_SIDES.back},{label:"Double",value:o.FACE_MESH_SIDES.double}],j=[{label:"None",value:o.FACE_MESH_TEXTURE_MAPS.none},{label:"UV Map 1",value:o.FACE_MESH_TEXTURE_MAPS.canonical},{label:"UV Map 2",value:o.FACE_MESH_TEXTURE_MAPS.style2}],q=[{label:"None",value:o.FACE_MESH_ALPHA_MAPS.none},{label:"Default Mask",value:o.FACE_MESH_ALPHA_MAPS.canonical}],G=[{label:"Solid",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.solid},{label:"Gradient",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.gradient},{label:"Image URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.imageUrl},{label:"Media URL",value:o.FACE_MESH_MASK_TEXTURE_SOURCES.mediaUrl}],V=[{label:"Normal",value:o.FACE_MESH_BLEND_MODES.normal},{label:"Add",value:o.FACE_MESH_BLEND_MODES.add},{label:"Subtract",value:o.FACE_MESH_BLEND_MODES.subtract},{label:"Multiply",value:o.FACE_MESH_BLEND_MODES.multiply},{label:"Screen",value:o.FACE_MESH_BLEND_MODES.screen},{label:"Overlay",value:o.FACE_MESH_BLEND_MODES.overlay},{label:"Soft Light",value:o.FACE_MESH_BLEND_MODES.softLight},{label:"Hard Light",value:o.FACE_MESH_BLEND_MODES.hardLight},{label:"Lighten",value:o.FACE_MESH_BLEND_MODES.lighten},{label:"Darken",value:o.FACE_MESH_BLEND_MODES.darken},{label:"Difference",value:o.FACE_MESH_BLEND_MODES.difference},{label:"Exclusion",value:o.FACE_MESH_BLEND_MODES.exclusion}],K=`
2
2
  varying vec2 vUv;
3
3
 
4
4
  void main() {
@@ -1,11 +1,11 @@
1
- import { F as p, a as _, b as w, c as A, d as y, e as u, f as k } from "./FaceMeshRenderer-DSCd1H55.js";
1
+ import { F as p, a as _, b as w, c as A, d as y, e as u, f as k } from "./FaceMeshRenderer-wjAHrJzP.js";
2
2
  import { jsx as x, jsxs as W } from "react/jsx-runtime";
3
3
  import { useMemo as b, useEffect as P } from "react";
4
- import { X } from "./index-I4eF5TKT.js";
5
- import { u as I } from "./index-B-s4YbWu.js";
4
+ import { X } from "./index-9dlAQAhy.js";
5
+ import { u as I } from "./index-ByoNj0QP.js";
6
6
  import { useThree as Y, useFrame as V } from "@react-three/fiber";
7
7
  import * as g from "three";
8
- import { u as G } from "./selectors-ByKNTXeA.js";
8
+ import { u as G } from "./selectors-B8H97CKA.js";
9
9
  const j = {
10
10
  enabled: !1,
11
11
  strength: 1,
@@ -1,4 +1,4 @@
1
- import { CanonicalFaceMeshRendererProps } from './canonical/CanonicalFaceMeshRenderer';
1
+ import { CanonicalFaceMeshRendererProps, FaceMeshMaterialOverride } from './canonical/CanonicalFaceMeshRenderer';
2
2
  import { Transform3DSettings } from '../Transform3D';
3
3
  type SerializedFaceMeshRendererProps = Required<Pick<CanonicalFaceMeshRendererProps, "faceIndex" | "baseColor" | "opacity" | "materialType" | "shaderPreset" | "textureMap" | "alphaMap" | "alphaOpacity" | "side" | "blendMode" | "blendOpacity" | "showOverlayMask" | "showMouthMask" | "showLeftEyeMask" | "showRightEyeMask" | "showNoseMask" | "showLeftEyeGeometry" | "showRightEyeGeometry" | "showMouthGeometry" | "showNoseGeometry" | "maskTextureSource" | "maskSourceUrl" | "maskColor" | "maskOpacity" | "faceTextureUrl" | "faceTextureStyle2Url" | "faceAlphaMaskUrl" | "compositeShading" | "renderOrder" | "externalScale">>;
4
4
  export type FaceMeshRendererSettings = SerializedFaceMeshRendererProps & {
@@ -9,9 +9,17 @@ export type FaceMeshRendererSettings = SerializedFaceMeshRendererProps & {
9
9
  export declare const DEFAULT_FACE_MESH_TRANSFORM: Transform3DSettings;
10
10
  export declare const DEFAULT_FACE_MESH_RENDERER: FaceMeshRendererSettings;
11
11
  export declare const mapFaceMeshRendererSettingsToProps: (settings: FaceMeshRendererSettings) => CanonicalFaceMeshRendererProps;
12
+ /** Combine serializable preset settings with an optional runtime-only override. */
13
+ export declare const mapFaceMeshRendererProps: ({ materialOverride, value, }: Pick<FaceMeshRendererProps, "materialOverride" | "value">) => CanonicalFaceMeshRendererProps;
12
14
  export declare const resolveFaceMeshRendererSettings: (current: FaceMeshRendererSettings, patch: Partial<FaceMeshRendererSettings>) => FaceMeshRendererSettings;
13
- export declare const FaceMeshRenderer: ({ transform, value, }: {
15
+ export type FaceMeshRendererProps = {
14
16
  transform?: Transform3DSettings;
15
17
  value: FaceMeshRendererSettings;
16
- }) => import("react/jsx-runtime").JSX.Element | null;
18
+ /**
19
+ * Runtime-only material node or factory. It takes precedence over serialized
20
+ * SDK presets and is intentionally excluded from FaceMeshRendererSettings.
21
+ */
22
+ materialOverride?: FaceMeshMaterialOverride;
23
+ };
24
+ export declare const FaceMeshRenderer: ({ transform, value, materialOverride }: FaceMeshRendererProps) => import("react/jsx-runtime").JSX.Element | null;
17
25
  export {};
@@ -53,11 +53,17 @@ export type CanonicalFaceMeshRendererProps = {
53
53
  */
54
54
  meshUrl?: string;
55
55
  /** Optional material override, rendered for every visible geometry group. */
56
- materialOverride?: ReactNode | ((context: {
57
- cameraTexture: THREE.Texture | null;
58
- geometryKey: CanonicalFaceMeshGeometryKey;
59
- }) => ReactNode);
56
+ materialOverride?: FaceMeshMaterialOverride;
60
57
  };
58
+ export type FaceMeshMaterialOverrideContext = {
59
+ cameraTexture: THREE.Texture | null;
60
+ geometryKey: CanonicalFaceMeshGeometryKey;
61
+ };
62
+ /**
63
+ * Runtime-only material escape hatch. Preset settings remain serializable;
64
+ * pass a material node or factory here from JSX or a scene host instead.
65
+ */
66
+ export type FaceMeshMaterialOverride = ReactNode | ((context: FaceMeshMaterialOverrideContext) => ReactNode);
61
67
  /**
62
68
  * @deprecated Use `FaceMeshRenderer` for scene-object/editor integrations.
63
69
  * This remains as the low-level canonical mesh renderer for existing imports.