@vincentt-xr/sdk 2.0.0-alpha.0 → 2.0.0-alpha.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.
Files changed (106) hide show
  1. package/GROUNDING.md +232 -14
  2. package/dist/{DebuggerUI-CEfdddkZ.cjs → DebuggerUI-CatYc-RG.cjs} +1 -1
  3. package/dist/{DebuggerUI-Dgop6Q6o.js → DebuggerUI-gLMKiVwJ.js} +1 -1
  4. package/dist/MediaSourceSwitcher-C-xYg0nQ.js +317 -0
  5. package/dist/MediaSourceSwitcher-Cq3g4IKw.cjs +31 -0
  6. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +6 -1
  7. package/dist/components/FaceMesh/material/defaults.d.ts +4 -0
  8. package/dist/components/FaceMesh/material/types.d.ts +2 -0
  9. package/dist/components/FaceRetouch/Background.d.ts +6 -1
  10. package/dist/components/FaceRetouch/defaults.d.ts +13 -0
  11. package/dist/components/FaceRetouch/index.d.ts +3 -1
  12. package/dist/components/FaceRetouch/landmarkMask.d.ts +4 -1
  13. package/dist/components/FaceRetouch/useFaceRetouchMask.d.ts +2 -1
  14. package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +15 -0
  15. package/dist/components/FaceWarp3D/defaults.d.ts +37 -0
  16. package/dist/components/FaceWarp3D/index.d.ts +3 -0
  17. package/dist/components/FaceWarp3D/warp.d.ts +13 -0
  18. package/dist/components/HandJoints2D/index.d.ts +6 -0
  19. package/dist/components/HandTracker/index.d.ts +2 -2
  20. package/dist/components/HandTracking2D/HandVisual.d.ts +12 -0
  21. package/dist/components/HandTracking2D/index.d.ts +5 -0
  22. package/dist/components/HandTracking2DController/index.d.ts +5 -0
  23. package/dist/components/HandTracking3D/index.d.ts +6 -0
  24. package/dist/components/ScreenImage/index.d.ts +87 -0
  25. package/dist/components/ScreenText/index.d.ts +20 -0
  26. package/dist/components/TextLabel/index.d.ts +99 -0
  27. package/dist/components/XRScene/index.d.ts +14 -3
  28. package/dist/components/XRViewport/index.d.ts +17 -0
  29. package/dist/components/index.d.ts +7 -0
  30. package/dist/debug-ui/default-setting/index.d.ts +37 -0
  31. package/dist/debug-ui/default-setting.cjs +21 -0
  32. package/dist/debug-ui/default-setting.js +777 -0
  33. package/dist/debug-ui/face-warp-3d/index.d.ts +6 -0
  34. package/dist/debug-ui/hand-joints-2d/index.d.ts +6 -0
  35. package/dist/debug-ui/hand-tracking-2d/index.d.ts +6 -0
  36. package/dist/debug-ui/hand-tracking-2d-controller/index.d.ts +6 -0
  37. package/dist/debug-ui/hand-tracking-3d/index.d.ts +6 -0
  38. package/dist/debug-ui/index.d.ts +23 -0
  39. package/dist/debug-ui/layer-panel/index.d.ts +17 -0
  40. package/dist/debug-ui/media-source/MediaSourceSwitcher.d.ts +10 -0
  41. package/dist/debug-ui/media-source/index.d.ts +4 -0
  42. package/dist/debug-ui/media-source/media-preset.d.ts +9 -0
  43. package/dist/debug-ui/media-source.cjs +1 -0
  44. package/dist/debug-ui/media-source.js +7 -0
  45. package/dist/debug-ui/screen-image-settings/index.d.ts +7 -0
  46. package/dist/debug-ui/screen-text-settings/index.d.ts +122 -0
  47. package/dist/debug-ui/settings-panel/index.d.ts +38 -0
  48. package/dist/debug-ui/shared/MaterialSection.d.ts +13 -0
  49. package/dist/debug-ui/shared/ScreenTransformSection.d.ts +29 -0
  50. package/dist/debug-ui.cjs +20 -0
  51. package/dist/debug-ui.js +6063 -0
  52. package/dist/defaults-BLpcN3pG.cjs +1 -0
  53. package/dist/defaults-LtY4M7dg.js +55 -0
  54. package/dist/entries/core.d.ts +5 -1
  55. package/dist/entries/face-effects.d.ts +2 -0
  56. package/dist/entries/low-level.d.ts +3 -0
  57. package/dist/face-effects.cjs +113 -23
  58. package/dist/face-effects.js +1566 -1399
  59. package/dist/handJoints2d.d.ts +49 -0
  60. package/dist/handTracking2d.d.ts +33 -0
  61. package/dist/handTracking2dController.d.ts +65 -0
  62. package/dist/handTracking3d.d.ts +52 -0
  63. package/dist/{index-BD-JWMjE.js → index-BGNbrc4C.js} +113 -137
  64. package/dist/index-BXyObVHF.cjs +1 -0
  65. package/dist/index-CY3bUAcW.js +12 -0
  66. package/dist/index-C_Duh13c.cjs +1 -0
  67. package/dist/index-D8fpPQkC.cjs +1 -0
  68. package/dist/index-DxshgBu0.cjs +1 -0
  69. package/dist/index-O-2crZ3M.js +1102 -0
  70. package/dist/{index-CYMj26Ej.js → index-safCs_af.js} +426 -416
  71. package/dist/{internal-DH5d1Xnq.cjs → internal-BjyhBP8i.cjs} +1 -1
  72. package/dist/{internal-KOKJDxCG.js → internal-Cae1ps15.js} +3 -3
  73. package/dist/internal.cjs +1 -1
  74. package/dist/internal.js +2 -2
  75. package/dist/layerStack.d.ts +29 -0
  76. package/dist/low-level.cjs +1 -1
  77. package/dist/low-level.js +74 -890
  78. package/dist/main.cjs +73 -1
  79. package/dist/main.js +1656 -407
  80. package/dist/models/Hand/HandTracking.d.ts +2 -0
  81. package/dist/screen2d/index.d.ts +4 -0
  82. package/dist/screen2d/material-runtime.d.ts +32 -0
  83. package/dist/screen2d/texture.d.ts +10 -0
  84. package/dist/screen2d/transform.d.ts +25 -0
  85. package/dist/screen2d/types.d.ts +90 -0
  86. package/dist/screenImagePresets.d.ts +13 -0
  87. package/dist/screenImageSettings-6NRg4cx9.js +39 -0
  88. package/dist/screenImageSettings-y_B4_767.cjs +1 -0
  89. package/dist/screenImageSettings.d.ts +50 -0
  90. package/dist/screenTextPresets.d.ts +6 -0
  91. package/dist/screenTextSettings.d.ts +131 -0
  92. package/dist/{selectors-Bub0o3qy.cjs → selectors-BLl2JUWW.cjs} +1 -1
  93. package/dist/{selectors-BHO6TnoC.js → selectors-CXd_x-6t.js} +6 -6
  94. package/dist/tracking.cjs +1 -1
  95. package/dist/tracking.js +193 -168
  96. package/dist/types/hand-tracking.d.ts +8 -0
  97. package/dist/types/nodes.d.ts +2 -0
  98. package/dist/useXRModel-3DcUa28n.cjs +1 -0
  99. package/dist/useXRModel-BMJE1hrk.js +28 -0
  100. package/dist/x-Co8jPhP0.js +127 -0
  101. package/dist/x-KC8E4Gaj.cjs +41 -0
  102. package/package.json +19 -1
  103. package/dist/index-B5J4gzn2.cjs +0 -1
  104. package/dist/index-BVBVg96G.cjs +0 -1
  105. package/dist/index-DtwHElmG.js +0 -157
  106. package/dist/index-PtFmD6B8.cjs +0 -1
@@ -0,0 +1,31 @@
1
+ "use strict";const C=require("./index-D8fpPQkC.cjs"),t=require("react/jsx-runtime"),R=require("react-dom"),i=require("react"),s=require("./x-KC8E4Gaj.cjs"),b=(n,o)=>new URL(`/assets/sdk/debug-ui/v1/${n}/${o}`,C.libConfig.assetStorageEndpoint).href,k=n=>n.replace(/\.[^.]+$/,"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,o=>o.toUpperCase()),$=["person_fullbody.mp4","person_looking.mp4","person_shaking_head.mp4","person_thumbUp.mp4","two_people_smiling.mp4"],z=["person_fist_sign.jpg","person_fullbody.jpg","person_peace_sign.jpg","person_portrait.jpg","person_side_portrait.jpg","three_people_smiling.jpg","two_people_smiling.jpg"],W=(n,o)=>({id:`sdk-video-${o+1}`,kind:"video",label:k(n),url:b("videos",n)}),E=(n,o)=>({id:`sdk-image-${o+1}`,kind:"image",label:k(n),url:b("images",n)}),w=$.map(W),j=z.map(E),V=[{id:"webcam",kind:"webcam",label:"Webcam"},...w,...j];/**
2
+ * @license lucide-react v1.17.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const q=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],D=s.createLucideIcon("camera",q);/**
7
+ * @license lucide-react v1.17.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const N=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],P=s.createLucideIcon("chevron-down",N);/**
12
+ * @license lucide-react v1.17.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const U=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],F=s.createLucideIcon("grip-vertical",U);/**
17
+ * @license lucide-react v1.17.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const B=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],K=s.createLucideIcon("image",B);/**
22
+ * @license lucide-react v1.17.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const O=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],X=s.createLucideIcon("menu",O);/**
27
+ * @license lucide-react v1.17.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const A=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],G=s.createLucideIcon("video",A),H=n=>n==="webcam"?"📷 ":n==="image"?"🖼 ":"▶ ",T={position:"fixed",zIndex:2e4,pointerEvents:"none"},v={pointerEvents:"auto",border:"1px solid rgba(255, 255, 255, 0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 12px 32px rgba(0, 0, 0, 0.28)",backdropFilter:"blur(20px) saturate(1.15)",WebkitBackdropFilter:"blur(20px) saturate(1.15)",color:"#f8fafc",display:"flex"},Y={...v,width:34,height:34,borderRadius:17,alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"transform 150ms ease"},J={...v,flexDirection:"column",borderRadius:12,overflow:"hidden",padding:4,gap:4},Q={display:"flex",alignItems:"center",gap:3},Z={width:1,height:12,background:"rgba(255, 255, 255, 0.12)",margin:"0 3px"},ee={display:"flex",width:16,height:24,alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148, 163, 184, 0.8)",flex:"0 0 auto"},x=(n=!1)=>({display:"flex",width:24,height:24,alignItems:"center",justifyContent:"center",borderRadius:8,border:`1px solid ${n?"rgba(255, 255, 255, 0.12)":"transparent"}`,background:n?"rgba(255, 255, 255, 0.08)":"transparent",color:n?"#f8fafc":"rgba(226, 232, 240, 0.72)",cursor:"pointer",flex:"0 0 auto",transition:"background 120ms ease, color 120ms ease"}),te={position:"relative",display:"flex",alignItems:"center"},ne={width:"100%",minWidth:140,height:24,borderRadius:8,border:"1px solid rgba(255, 255, 255, 0.10)",background:"rgba(15, 23, 42, 0.65)",color:"#f8fafc",fontSize:11,outline:"none",paddingLeft:7,paddingRight:20,appearance:"none",cursor:"pointer"},re={pointerEvents:"none",position:"absolute",right:5,top:0,bottom:0,display:"flex",alignItems:"center",color:"rgba(148, 163, 184, 0.9)"},oe={height:24,display:"flex",alignItems:"center",padding:"0 8px",borderRadius:8,border:"1px solid rgba(255, 255, 255, 0.08)",background:"rgba(255, 255, 255, 0.04)",color:"rgba(226, 232, 240, 0.72)",fontSize:11},f={width:14,height:14},ie=({value:n,onChange:o,sources:c,style:S})=>{const[_,p]=i.useState(!1),[u,M]=i.useState({x:16,y:16}),[a,g]=i.useState(n.kind),d=i.useRef(null),h=i.useMemo(()=>({webcam:c.filter(e=>e.kind==="webcam"),image:c.filter(e=>e.kind==="image"),video:c.filter(e=>e.kind==="video")}),[c]),y=h[a];i.useEffect(()=>{g(n.kind)},[n.kind]);const I=e=>{g(e);const r=h[e][0];r&&o(r)};i.useEffect(()=>{const e=l=>{d.current&&M({x:Math.max(8,l.clientX-d.current.x),y:Math.max(8,l.clientY-d.current.y)})},r=()=>{d.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",r),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",r)}},[]);const m=e=>{const r=e.currentTarget.getBoundingClientRect();d.current={x:e.clientX-r.left,y:e.clientY-r.top},document.body.classList.add("select-none"),e.currentTarget.setPointerCapture(e.pointerId)},L=()=>{if(y.length===0){const e=a==="webcam"?"No camera source":a==="image"?"No image preview":"No video preview";return t.jsx("div",{style:oe,children:e})}return t.jsxs("div",{style:te,children:[t.jsx("select",{value:n.id,onChange:e=>{const r=c.find(l=>l.id===e.target.value);r&&o(r)},style:ne,children:y.map(e=>t.jsxs("option",{value:e.id,children:[H(a),e.label]},e.id))}),t.jsx("div",{style:re,children:t.jsx("span",{style:{width:10,height:10},children:t.jsx(P,{size:10,strokeWidth:1.8})})})]})};return typeof document>"u"?null:R.createPortal(t.jsx("div",{style:{...T,left:u.x,top:u.y,...S},children:_?t.jsxs("div",{style:J,children:[t.jsxs("div",{style:Q,children:[t.jsx("div",{onPointerDown:m,style:ee,title:"Drag to move",children:t.jsx(F,{size:11,strokeWidth:2})}),t.jsx("button",{type:"button",onClick:()=>p(!1),style:x(!1),title:"Close Menu",children:t.jsx("span",{style:f,children:t.jsx(s.X,{size:14,strokeWidth:1.8})})}),t.jsx("div",{style:Z}),["webcam","image","video"].map(e=>t.jsx("button",{type:"button",onClick:()=>I(e),style:x(a===e),title:e.charAt(0).toUpperCase()+e.slice(1),children:t.jsx("span",{style:f,children:e==="webcam"?t.jsx(D,{size:14,strokeWidth:1.8}):e==="image"?t.jsx(K,{size:14,strokeWidth:1.8}):t.jsx(G,{size:14,strokeWidth:1.8})})},e))]}),L()]}):t.jsx("div",{style:Y,onClick:()=>p(!0),onPointerDown:m,title:"Open Media Menu",children:t.jsx("span",{style:{width:16,height:16},children:t.jsx(X,{size:14,strokeWidth:1.8})})})}),document.body)};exports.MediaSourceSwitcher=ie;exports.defaultMediaSources=V;exports.sdkImageMediaSources=j;exports.sdkVideoMediaSources=w;
@@ -1,7 +1,9 @@
1
+ import { FaceWarp3DSettings } from '../../FaceWarp3D';
1
2
  import { FaceMeshAlphaMap, FaceMeshBlendMode, FaceMeshMaskTextureSource, FaceMeshMaterialType, FaceMeshShaderPreset, FaceMeshSide, FaceMeshTextureMap } from '../material/types';
2
3
  import { ParsedCanonicalMesh } from './parseCanonicalFaceModel';
3
4
  export type CanonicalFaceMeshRendererProps = {
4
5
  faceIndex?: number;
6
+ baseColor?: string;
5
7
  color?: string;
6
8
  opacity?: number;
7
9
  materialType?: FaceMeshMaterialType;
@@ -11,6 +13,7 @@ export type CanonicalFaceMeshRendererProps = {
11
13
  alphaOpacity?: number;
12
14
  side?: FaceMeshSide;
13
15
  blendMode?: FaceMeshBlendMode;
16
+ blendOpacity?: number;
14
17
  showMouthMask?: boolean;
15
18
  showEyeMask?: boolean;
16
19
  showNoseMask?: boolean;
@@ -21,6 +24,8 @@ export type CanonicalFaceMeshRendererProps = {
21
24
  faceTextureStyle2Url?: string;
22
25
  faceAlphaMaskUrl?: string;
23
26
  compositeShading?: boolean;
27
+ faceWarp3D?: Partial<FaceWarp3DSettings>;
28
+ renderOrder?: number;
24
29
  /**
25
30
  * Pre-parsed canonical mesh. If omitted, the renderer lazily fetches
26
31
  * the default OBJ from `libConfig.sdkAssetsBaseUrl` and parses it.
@@ -31,4 +36,4 @@ export type CanonicalFaceMeshRendererProps = {
31
36
  */
32
37
  meshUrl?: string;
33
38
  };
34
- export declare const CanonicalFaceMeshRenderer: ({ faceIndex, color, opacity, materialType, shaderPreset, textureMap, alphaMap, alphaOpacity, side, blendMode, showMouthMask, showEyeMask, showNoseMask, maskTextureSource, maskColor, maskOpacity, faceTextureUrl, faceTextureStyle2Url, faceAlphaMaskUrl, compositeShading, mesh, meshUrl, }: CanonicalFaceMeshRendererProps) => import("react/jsx-runtime").JSX.Element;
39
+ export declare const CanonicalFaceMeshRenderer: ({ faceIndex, baseColor, color, opacity, materialType, shaderPreset, textureMap, alphaMap, alphaOpacity, side, blendMode, blendOpacity, showMouthMask, showEyeMask, showNoseMask, maskTextureSource, maskColor, maskOpacity, faceTextureUrl, faceTextureStyle2Url, faceAlphaMaskUrl, compositeShading, faceWarp3D, renderOrder, mesh, meshUrl, }: CanonicalFaceMeshRendererProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,7 @@
1
1
  import { FaceMeshAppearance, FaceMeshMasking } from './types';
2
2
  export declare const DEFAULT_APPEARANCE: FaceMeshAppearance;
3
+ export declare const FACE_PAINTING_PRESET: FaceMeshAppearance;
4
+ export declare const FACE_MESH_PRESETS: {
5
+ readonly facePainting: FaceMeshAppearance;
6
+ };
3
7
  export declare const DEFAULT_MASKING: FaceMeshMasking;
@@ -13,8 +13,10 @@ export type FaceMeshAppearance = {
13
13
  alphaOpacity: number;
14
14
  side: FaceMeshSide;
15
15
  blendMode: FaceMeshBlendMode;
16
+ blendOpacity: number;
16
17
  baseColor: string;
17
18
  opacity: number;
19
+ compositeShading: boolean;
18
20
  };
19
21
  export type FaceMeshMasking = {
20
22
  mouth: boolean;
@@ -4,13 +4,18 @@ export type FaceRetouchBackgroundProps = {
4
4
  mouthMask: THREE.Texture;
5
5
  retouchAmount: number;
6
6
  blurRadius: number;
7
+ detailPreservation?: number;
8
+ blemishReduction?: number;
9
+ rednessReduction?: number;
10
+ blemishRadius?: number;
7
11
  teethWhitening: number;
8
12
  previewMask: boolean;
9
13
  protectLandmarks: boolean;
14
+ renderOrder?: number;
10
15
  };
11
16
  /**
12
17
  * Full-screen plane that composites the live camera texture with a
13
18
  * landmark-driven retouch (skin smoothing + teeth whitening). Pair with
14
19
  * `useFaceRetouchMask` to drive the masks.
15
20
  */
16
- export declare const FaceRetouchBackground: ({ retouchMask, mouthMask, retouchAmount, blurRadius, teethWhitening, previewMask, protectLandmarks, }: FaceRetouchBackgroundProps) => import("react/jsx-runtime").JSX.Element | null;
21
+ export declare const FaceRetouchBackground: ({ retouchMask, mouthMask, retouchAmount, blurRadius, detailPreservation, blemishReduction, rednessReduction, blemishRadius, teethWhitening, previewMask, protectLandmarks, renderOrder, }: FaceRetouchBackgroundProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ export type FaceRetouchSettings = {
2
+ retouchAmount: number;
3
+ blurRadius: number;
4
+ detailPreservation: number;
5
+ blemishReduction: number;
6
+ rednessReduction: number;
7
+ blemishRadius: number;
8
+ teethWhitening: number;
9
+ previewMask: boolean;
10
+ protectLandmarks: boolean;
11
+ foreheadCoverage: boolean;
12
+ };
13
+ export declare const FACE_RETOUCH_PRESET: FaceRetouchSettings;
@@ -1,6 +1,8 @@
1
1
  export { FaceRetouchBackground } from './Background';
2
2
  export type { FaceRetouchBackgroundProps } from './Background';
3
- export { drawFaceRetouchMask, drawMouthRetouchMask, FACE_MASK_SIZE, FACE_OVAL, LEFT_EYE, RIGHT_EYE, OUTER_LIPS, INNER_MOUTH, LEFT_EYEBROW, RIGHT_EYEBROW, } from './landmarkMask';
3
+ export { FACE_RETOUCH_PRESET } from './defaults';
4
+ export type { FaceRetouchSettings } from './defaults';
5
+ export { drawFaceRetouchMask, drawMouthRetouchMask, FACE_MASK_SIZE, FACE_OVAL, LEFT_EYE, RIGHT_EYE, OUTER_LIPS, INNER_MOUTH, LEFT_EYEBROW, RIGHT_EYEBROW, type FaceRetouchMaskOptions, } from './landmarkMask';
4
6
  export { createFaceRetouchRegions, DEFAULT_FEATURE_GROUPS, DEFAULT_FEATURE_POINT_INDICES, type CreateFaceRetouchRegionsOptions, } from './retouchRegions';
5
7
  export { useFaceRetouchMask } from './useFaceRetouchMask';
6
8
  export { useFaceRetouchRegions } from './useFaceRetouchRegions';
@@ -7,6 +7,9 @@ export declare const OUTER_LIPS: number[];
7
7
  export declare const INNER_MOUTH: number[];
8
8
  export declare const LEFT_EYEBROW: number[];
9
9
  export declare const RIGHT_EYEBROW: number[];
10
+ export type FaceRetouchMaskOptions = {
11
+ foreheadCoverage?: boolean;
12
+ };
10
13
  /**
11
14
  * Render the three-channel face retouch mask used by FaceRetouchBackground:
12
15
  * - R: blurred face oval (soft retouch region)
@@ -15,7 +18,7 @@ export declare const RIGHT_EYEBROW: number[];
15
18
  *
16
19
  * `size` defaults to FACE_MASK_SIZE (512). The context must be sized to match.
17
20
  */
18
- export declare const drawFaceRetouchMask: (context: CanvasRenderingContext2D, landmarks: FaceLandmark2D[] | undefined, size?: number) => void;
21
+ export declare const drawFaceRetouchMask: (context: CanvasRenderingContext2D, landmarks: FaceLandmark2D[] | undefined, size?: number, options?: FaceRetouchMaskOptions) => void;
19
22
  /**
20
23
  * Render a single-channel mouth mask (inner-lip polygon, lightly blurred).
21
24
  * Used for teeth-whitening regions.
@@ -1,4 +1,5 @@
1
1
  import { XRModelNodeFaceTracking } from '../../types/nodes';
2
+ import { FaceRetouchMaskOptions } from './landmarkMask';
2
3
  import * as THREE from "three";
3
4
  /**
4
5
  * Drive the two CanvasTexture masks consumed by `FaceRetouchBackground`
@@ -7,7 +8,7 @@ import * as THREE from "three";
7
8
  * `size` controls the mask resolution (default 512). Both masks share the
8
9
  * same size.
9
10
  */
10
- export declare const useFaceRetouchMask: (faceNode: XRModelNodeFaceTracking | null, size?: number) => {
11
+ export declare const useFaceRetouchMask: (faceNode: XRModelNodeFaceTracking | null, size?: number, options?: FaceRetouchMaskOptions) => {
11
12
  canvas: HTMLCanvasElement;
12
13
  texture: THREE.CanvasTexture;
13
14
  mouthTexture: THREE.CanvasTexture;
@@ -0,0 +1,15 @@
1
+ import { FaceWarp3DSettings } from './defaults';
2
+ export type FaceWarp3DHeadProps = {
3
+ /** Effect House 3DHeadBinding_Mesh.fbx or a topology-compatible head. */
4
+ headMeshUrl: string;
5
+ /** Optional UV reference/base texture sampled with the FBX's authored UVs. */
6
+ uvTextureUrl?: string;
7
+ settings: Partial<FaceWarp3DSettings>;
8
+ faceIndex?: number;
9
+ opacity?: number;
10
+ renderOrder?: number;
11
+ visible?: boolean;
12
+ mirrorTextureX?: boolean;
13
+ baseColor?: string;
14
+ };
15
+ export declare const FaceWarp3DHead: ({ headMeshUrl, uvTextureUrl, settings, faceIndex, opacity, renderOrder, visible, baseColor, }: FaceWarp3DHeadProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ export type FaceWarp3DSettings = {
2
+ enabled: boolean;
3
+ strength: number;
4
+ faceWidth: number;
5
+ faceHeight: number;
6
+ faceRoundness: number;
7
+ midfaceHeight: number;
8
+ foreheadHeight: number;
9
+ foreheadWidth: number;
10
+ cheekboneWidth: number;
11
+ cheekWidth: number;
12
+ cheekHollowness: number;
13
+ midfaceDepth: number;
14
+ scalpHeight: number;
15
+ headCurve: number;
16
+ faceTwist: number;
17
+ faceSwirl: number;
18
+ browDistance: number;
19
+ browHeight: number;
20
+ browDepth: number;
21
+ eyeSize: number;
22
+ leftEyeSize: number;
23
+ rightEyeSize: number;
24
+ eyeDistance: number;
25
+ leftEyeX: number;
26
+ rightEyeX: number;
27
+ leftEyeY: number;
28
+ rightEyeY: number;
29
+ noseSize: number;
30
+ noseLength: number;
31
+ mouthWidth: number;
32
+ mouthHeight: number;
33
+ jawWidth: number;
34
+ chinHeight: number;
35
+ };
36
+ export declare const DEFAULT_FACE_WARP_3D_SETTINGS: FaceWarp3DSettings;
37
+ export declare const FACE_WARP_3D_PRESET: FaceWarp3DSettings;
@@ -0,0 +1,3 @@
1
+ export { DEFAULT_FACE_WARP_3D_SETTINGS, FACE_WARP_3D_PRESET, type FaceWarp3DSettings, } from './defaults';
2
+ export { applyFaceWarp3D, computeFaceWarp3DMetrics, hasFaceWarp3D, type FaceWarp3DMetrics, } from './warp';
3
+ export { FaceWarp3DHead, type FaceWarp3DHeadProps } from './FaceWarp3DHead';
@@ -0,0 +1,13 @@
1
+ import { NormalizedLandmark } from '@mediapipe/tasks-vision';
2
+ import { FaceWarp3DSettings } from './defaults';
3
+ type LandmarkLike = Pick<NormalizedLandmark, "x" | "y" | "z">;
4
+ export type FaceWarp3DMetrics = {
5
+ centerX: number;
6
+ centerY: number;
7
+ width: number;
8
+ height: number;
9
+ };
10
+ export declare const computeFaceWarp3DMetrics: (landmarks: LandmarkLike[]) => FaceWarp3DMetrics;
11
+ export declare const hasFaceWarp3D: (settings?: Partial<FaceWarp3DSettings>) => boolean;
12
+ export declare const applyFaceWarp3D: (landmark: LandmarkLike, metrics: FaceWarp3DMetrics, settings: Partial<FaceWarp3DSettings>, out: LandmarkLike) => LandmarkLike;
13
+ export {};
@@ -0,0 +1,6 @@
1
+ import { HandJoints2DCountResult, HandJoints2DSettings } from '../../handJoints2d';
2
+ export type HandJoints2DProps = {
3
+ settings?: HandJoints2DSettings;
4
+ onCountChange?: (result: HandJoints2DCountResult | null) => void;
5
+ };
6
+ export declare const HandJoints2D: ({ settings, onCountChange, }: HandJoints2DProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  type HandTrackerProps = PropsWithChildren & {
3
- /** Which hand to bind to. Currently informational — the model tracks one hand. */
3
+ /** Which hand to bind to. Prefers the named hand when present. */
4
4
  hand?: "left" | "right";
5
5
  /** Hand index in detection results. Defaults to 0. */
6
6
  handIndex?: number;
@@ -20,5 +20,5 @@ type HandTrackerProps = PropsWithChildren & {
20
20
  */
21
21
  active?: boolean;
22
22
  };
23
- export declare const HandTracker: ({ children, targetFps, active }: HandTrackerProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const HandTracker: ({ children, hand, handIndex, targetFps, active, }: HandTrackerProps) => import("react/jsx-runtime").JSX.Element;
24
24
  export {};
@@ -0,0 +1,12 @@
1
+ import { HandTracking2DHandFrame, HandTracking2DPoint, HandTracking2DSettings } from '../../handTracking2d';
2
+ type RenderedHand = HandTracking2DHandFrame & {
3
+ key: string;
4
+ points: HandTracking2DPoint[];
5
+ };
6
+ export declare function HandVisual({ hand, index, settings, aspectScale, }: {
7
+ hand: RenderedHand;
8
+ index: number;
9
+ settings: HandTracking2DSettings;
10
+ aspectScale: number;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,5 @@
1
+ import { HandTracking2DSettings } from '../../handTracking2d';
2
+ export type HandTracking2DProps = {
3
+ settings?: HandTracking2DSettings;
4
+ };
5
+ export declare const HandTracking2D: ({ settings, }: HandTracking2DProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ import { HandTracking2DControllerSettings } from '../../handTracking2dController';
2
+ export type HandTracking2DControllerProps = {
3
+ settings?: HandTracking2DControllerSettings;
4
+ };
5
+ export declare const HandTracking2DController: ({ settings, }: HandTracking2DControllerProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import { HandTracking3DRenderedHandFrame, HandTracking3DSettings } from '../../handTracking3d';
2
+ export type HandTracking3DProps = {
3
+ settings?: HandTracking3DSettings;
4
+ onHandsChange?: (hands: HandTracking3DRenderedHandFrame[]) => void;
5
+ };
6
+ export declare const HandTracking3D: ({ settings, onHandsChange, }: HandTracking3DProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,87 @@
1
+ import { ScreenAnchorEdges, ScreenOffsetEdges } from '../ScreenSpaceUI';
2
+ import { ScreenCanvasSize, ScreenCoordinateSpace } from '../../screen2d';
3
+ import { default as defaultScreenImageUrl } from './assets/Default_square_image.png';
4
+ import * as THREE from "three";
5
+ export type ScreenImageFit = "stretch" | "contain" | "cover";
6
+ export type ScreenImageStretchMode = "fit" | "fitWidth" | "fitHeight" | "stretch" | "fill" | "fillAndCut";
7
+ export type ScreenImageMaterialType = "unlit" | "standardPBR" | "matcap";
8
+ export type ScreenImageBlendMode = "normal" | "add" | "subtract" | "multiply" | "screen" | "lighten" | "darken" | "overlay" | "softLight" | "hardLight" | "difference" | "exclusion";
9
+ export type ScreenImageSource = {
10
+ kind: "default";
11
+ } | {
12
+ kind: "image";
13
+ src: string;
14
+ } | {
15
+ kind: "texture";
16
+ texture: THREE.Texture;
17
+ };
18
+ export type ScreenImageProps = {
19
+ name?: string;
20
+ source?: ScreenImageSource;
21
+ src?: string;
22
+ anchors?: ScreenAnchorEdges;
23
+ coordinateSpace?: ScreenCoordinateSpace;
24
+ canvasSize?: ScreenCanvasSize;
25
+ position?: [number, number];
26
+ size?: [number, number];
27
+ rotation?: number;
28
+ offsets?: ScreenOffsetEdges;
29
+ pivot?: [number, number];
30
+ fit?: ScreenImageFit;
31
+ stretchMode?: ScreenImageStretchMode;
32
+ materialType?: ScreenImageMaterialType;
33
+ blendMode?: ScreenImageBlendMode;
34
+ backdropTexture?: THREE.Texture | null;
35
+ opacity?: number;
36
+ color?: THREE.ColorRepresentation;
37
+ flipX?: boolean;
38
+ flipY?: boolean;
39
+ renderOrder?: number;
40
+ transparent?: boolean;
41
+ alphaTest?: number;
42
+ overlay?: boolean;
43
+ visible?: boolean;
44
+ showFitGuides?: boolean;
45
+ };
46
+ export type ScreenImageFittedRectInput = {
47
+ rectSize: {
48
+ width: number;
49
+ height: number;
50
+ };
51
+ textureSize?: {
52
+ width: number;
53
+ height: number;
54
+ };
55
+ textureAspect?: number;
56
+ stretchMode?: ScreenImageStretchMode;
57
+ fit?: ScreenImageFit;
58
+ flipX?: boolean;
59
+ flipY?: boolean;
60
+ };
61
+ export type ScreenImageFittedRect = {
62
+ rectAspect: number;
63
+ textureAspect: number;
64
+ scale: {
65
+ x: number;
66
+ y: number;
67
+ };
68
+ size: {
69
+ width: number;
70
+ height: number;
71
+ };
72
+ uvRepeat: {
73
+ x: number;
74
+ y: number;
75
+ };
76
+ uvOffset: {
77
+ x: number;
78
+ y: number;
79
+ };
80
+ };
81
+ export declare const screenImageBlendModeOptions: Array<{
82
+ label: string;
83
+ value: ScreenImageBlendMode;
84
+ }>;
85
+ export declare const computeScreenImageFittedRect: ({ rectSize, textureSize, textureAspect: providedTextureAspect, stretchMode, fit, flipX, flipY, }: ScreenImageFittedRectInput) => ScreenImageFittedRect;
86
+ export declare function ScreenImage({ anchors, coordinateSpace, canvasSize, position, size, offsets, pivot, rotation, ...bodyProps }: ScreenImageProps): import("react/jsx-runtime").JSX.Element;
87
+ export { defaultScreenImageUrl };
@@ -0,0 +1,20 @@
1
+ import { ScreenAnchorEdges } from '../ScreenSpaceUI';
2
+ import { TextLabelProps } from '../TextLabel';
3
+ import { ScreenCanvasSize, ScreenCoordinateSpace, ScreenTransform2D } from '../../screen2d';
4
+ export type ScreenTextVerticalAlign = "top" | "center" | "bottom";
5
+ export type ScreenTextProps = Omit<TextLabelProps, "aspect" | "position" | "rotation" | "scale"> & {
6
+ anchors?: ScreenAnchorEdges;
7
+ coordinateSpace?: ScreenCoordinateSpace;
8
+ canvasSize?: ScreenCanvasSize;
9
+ offsets?: ScreenTransform2D["offsets"];
10
+ pivot?: [number, number];
11
+ position?: [number, number];
12
+ rotation?: number;
13
+ size?: [number, number];
14
+ transform?: ScreenTransform2D;
15
+ verticalAlign?: ScreenTextVerticalAlign;
16
+ showTransformGuides?: boolean;
17
+ };
18
+ export declare const SCREEN_TEXT_ANCHORS: Record<ScreenTextVerticalAlign, Required<ScreenAnchorEdges>>;
19
+ export declare function resolveScreenTextAnchors(verticalAlign?: ScreenTextVerticalAlign): Required<ScreenAnchorEdges>;
20
+ export declare function ScreenText({ anchors, coordinateSpace, canvasSize, offsets, pivot, position, rotation, size, transform, verticalAlign, ...textLabelProps }: ScreenTextProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,5 @@
1
+ export type TextAlign = "left" | "center" | "right";
2
+ export type TextBendPreset = "arc" | "arc-lower" | "arc-upper" | "arch" | "bulge" | "shell-lower" | "shell-upper" | "flag" | "wave" | "fish" | "rise" | "fisheye" | "inflate" | "squeeze" | "twist";
1
3
  /**
2
4
  * `<TextLabel>` — a text label drawn into a CanvasTexture and rendered as
3
5
  * a single mesh. First-class scene-tree primitive so lifecycle scripts
@@ -14,10 +16,61 @@
14
16
  export type TextLabelProps = {
15
17
  /** The text to render. Required. */
16
18
  text: string;
19
+ /** Optional precomputed lines. When provided, these are rendered directly without word wrapping. */
20
+ lines?: string[];
17
21
  /** Text color. Default `#ffffff`. */
18
22
  color?: string;
23
+ /** Multiple stroke layers, drawn outer-to-inner. */
24
+ strokeLayers?: Array<{
25
+ color: string;
26
+ width: number;
27
+ opacity?: number;
28
+ }>;
29
+ /** Optional text stroke color. Omit or pair with `strokeWidth={0}` for no stroke. */
30
+ strokeColor?: string;
31
+ /** Text stroke thickness in canvas px. Default 0. */
32
+ strokeWidth?: number;
33
+ /** Stroke opacity multiplier. Default 1. */
34
+ strokeOpacity?: number;
35
+ /** Multiple shadow / glow layers, drawn back-to-front. */
36
+ shadowLayers?: Array<{
37
+ color: string;
38
+ blur: number;
39
+ offsetX?: number;
40
+ offsetY?: number;
41
+ opacity?: number;
42
+ }>;
43
+ /** Optional inner shadow rendered inside the glyphs. */
44
+ innerShadow?: {
45
+ color: string;
46
+ blur: number;
47
+ offsetX?: number;
48
+ offsetY?: number;
49
+ opacity?: number;
50
+ };
51
+ /** Optional glow rendered behind the glyphs. */
52
+ glow?: {
53
+ color: string;
54
+ style: "outward" | "contoured";
55
+ intensity?: number;
56
+ range?: number;
57
+ horizontalAngle?: number;
58
+ verticalAngle?: number;
59
+ };
60
+ /** Optional text shadow/glow color. Omit for none. */
61
+ shadowColor?: string;
62
+ /** Shadow blur radius in canvas px. Default 0. */
63
+ shadowBlur?: number;
64
+ /** Shadow X offset in canvas px. Default 0. */
65
+ shadowOffsetX?: number;
66
+ /** Shadow Y offset in canvas px. Default 0. */
67
+ shadowOffsetY?: number;
68
+ /** Shadow opacity multiplier. Default 1. */
69
+ shadowOpacity?: number;
19
70
  /** Font weight. Default `bold`. */
20
71
  fontWeight?: "normal" | "bold" | number;
72
+ /** Font style. Default `normal`. */
73
+ fontStyle?: "normal" | "italic";
21
74
  /** Font family. Default `Arial, sans-serif`. */
22
75
  fontFamily?: string;
23
76
  /**
@@ -25,8 +78,45 @@ export type TextLabelProps = {
25
78
  * to "10pt" → 28, "12pt" → 36, "16pt" → 48, etc. Default 48.
26
79
  */
27
80
  fontSize?: number;
81
+ /** Horizontal text alignment inside the available lane. Default `center`. */
82
+ textAlign?: TextAlign;
83
+ /** Overflow behavior. `clamp` keeps only full visible lines, `clip` allows canvas-edge clipping. */
84
+ overflow?: "clip" | "clamp" | "ellipsis" | "shrink";
85
+ /** When true, keep shrinking until the text fits or `minFontSize` is hit. */
86
+ resizeToFit?: boolean;
87
+ /** Minimum shrink target in canvas px. Default 12. */
88
+ minFontSize?: number;
89
+ /** Character spacing as a normalized ratio from 0 to 1. Default 0. */
90
+ letterSpacing?: number;
91
+ /** Line spacing as a normalized ratio from 0 to 1. Default 0.3. */
92
+ lineSpacing?: number;
28
93
  /** Panel background color. Use `'transparent'` for text-only. Default `rgba(20,40,110,0.88)`. */
29
94
  bgColor?: string;
95
+ /** Background fill mode. Default `solid`. */
96
+ bgFillMode?: "solid" | "gradient";
97
+ /** Background opacity multiplier. Default 1. */
98
+ bgOpacity?: number;
99
+ /** Background fit mode. `full` fills the label rect, `text` hugs the measured text block. */
100
+ bgFit?: "full" | "text";
101
+ /** When true, ignore explicit background width/height and size from the text block. */
102
+ bgAutoSize?: boolean;
103
+ /** Optional explicit background width in canvas px. */
104
+ bgWidth?: number;
105
+ /** Optional explicit background height in canvas px. */
106
+ bgHeight?: number;
107
+ /** Optional gradient stops when `bgFillMode` is `gradient`. */
108
+ bgGradientStops?: Array<{
109
+ color: string;
110
+ position: number;
111
+ }>;
112
+ /** Optional static texture URL when `bgFillMode` is `texture`. */
113
+ bgTextureUrl?: string;
114
+ /** Texture fit behavior. Default `cover`. */
115
+ bgTextureFit?: "cover" | "contain" | "stretch";
116
+ /** Mirror the background texture horizontally. Default false. */
117
+ bgTextureFlipX?: boolean;
118
+ /** Mirror the background texture vertically. Default false. */
119
+ bgTextureFlipY?: boolean;
30
120
  /** Optional border color. Omit for no border. */
31
121
  borderColor?: string;
32
122
  /** Border thickness. Default 0. */
@@ -46,6 +136,11 @@ export type TextLabelProps = {
46
136
  resolution?: number;
47
137
  /** Material opacity multiplier. Default 1. */
48
138
  opacity?: number;
139
+ /** Draw an underline beneath each rendered line. Default false. */
140
+ underline?: boolean;
141
+ /** Bend text along a shallow vertical curve. Range -100..100. Default 0. */
142
+ bendPreset?: TextBendPreset;
143
+ bendStrength?: number;
49
144
  /** Optional `name` for runtime `getObjectByName` lookups. */
50
145
  name?: string;
51
146
  /** Ignore depth — appropriate for overlay UI. Default true. */
@@ -58,5 +153,9 @@ export type TextLabelProps = {
58
153
  scale?: [number, number, number] | number;
59
154
  /** Mesh visibility, forwarded so descendants inherit correctly. */
60
155
  visible?: boolean;
156
+ /** Render ordering for overlay composition. */
157
+ renderOrder?: number;
61
158
  };
62
159
  export declare function TextLabel(props: TextLabelProps): import("react/jsx-runtime").JSX.Element;
160
+ export declare function resolveTextLabelDrawX(width: number, padding: number, textAlign: TextAlign): number;
161
+ export declare function resolveTextLabelPanelX(width: number, panelWidth: number, textAlign: TextAlign, bgFit: "full" | "text"): number;
@@ -1,6 +1,16 @@
1
1
  import { CanvasProps } from '@react-three/fiber';
2
2
  import { default as React, PropsWithChildren } from 'react';
3
- type XRSceneProps = PropsWithChildren & {
3
+ import * as THREE from "three";
4
+ export type XRSceneRenderOutputRequest = {
5
+ sceneColor?: boolean;
6
+ sceneDepth?: boolean;
7
+ excludeScreenUI?: boolean;
8
+ };
9
+ export type XRSceneRenderOutputs = {
10
+ sceneColorTexture: THREE.Texture | null;
11
+ sceneDepthTexture: THREE.Texture | null;
12
+ };
13
+ export type XRSceneProps = PropsWithChildren & {
4
14
  style?: React.CSSProperties;
5
15
  canvasProps?: CanvasProps & React.RefAttributes<HTMLCanvasElement>;
6
16
  loadingComponent?: React.ReactNode;
@@ -10,6 +20,7 @@ type XRSceneProps = PropsWithChildren & {
10
20
  width: number;
11
21
  height: number;
12
22
  };
23
+ renderOutputs?: XRSceneRenderOutputRequest;
24
+ onRenderOutputs?: (outputs: XRSceneRenderOutputs) => void;
13
25
  };
14
- export declare const XRScene: ({ style, canvasProps, children, loadingComponent, loadingTransitionDuration, errorComponent, renderTargetSize, }: XRSceneProps) => import("react/jsx-runtime").JSX.Element;
15
- export {};
26
+ export declare const XRScene: ({ style, canvasProps, children, loadingComponent, loadingTransitionDuration, errorComponent, renderTargetSize, renderOutputs, onRenderOutputs, }: XRSceneProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,8 @@ import { CalibrationMediaSourceKind } from '../../hooks/useCalibrationFaceTracke
3
3
  import { XRMediaLayout } from '../../types/compositor';
4
4
  import { FaceTrackingResult } from '../../types/face';
5
5
  import { XRModelNodeFaceTracking } from '../../types/nodes';
6
+ import { RenderOutputKind } from '../../screen2d';
7
+ import * as THREE from "three";
6
8
  export type XRViewportMode = "dom" | "r3f" | "hybrid";
7
9
  export type XRViewportSourceKind = "webcam" | "image" | "video";
8
10
  export type XRViewportFitMode = "auto" | "cover" | "contain";
@@ -25,6 +27,18 @@ export type XRViewportSize = {
25
27
  width: number;
26
28
  height: number;
27
29
  };
30
+ export type XRViewportPreviewMode = "media" | "scene" | "finalColor" | "sceneDepth";
31
+ export type XRViewportRenderOutputRequest = Partial<Record<RenderOutputKind, boolean>>;
32
+ export type XRViewportRenderOutputs = {
33
+ requested: XRViewportRenderOutputRequest;
34
+ previewMode: XRViewportPreviewMode;
35
+ mediaColorTexture: THREE.Texture | null;
36
+ sceneColorTexture: THREE.Texture | null;
37
+ finalColorTexture: THREE.Texture | null;
38
+ sceneDepthTexture: THREE.Texture | null;
39
+ estimatedDepthTexture: THREE.Texture | null;
40
+ available: Record<RenderOutputKind, boolean>;
41
+ };
28
42
  export type XRViewportRenderState = {
29
43
  activeDelegate: "GPU" | "CPU" | null;
30
44
  faces: FaceTrackingResult[];
@@ -61,6 +75,8 @@ type XRViewportProps = {
61
75
  mediaStrategy?: XRViewportMediaStrategy;
62
76
  mediaDock?: "top-left" | "bottom-left";
63
77
  mode?: XRViewportMode;
78
+ previewMode?: XRViewportPreviewMode;
79
+ renderOutputs?: XRViewportRenderOutputRequest;
64
80
  showMediaControlsByDefault?: boolean;
65
81
  source?: XRViewportSourceConfig;
66
82
  style?: CSSProperties;
@@ -97,5 +113,6 @@ export declare const resolveViewportExternalFaces: ({ detectionResults, selected
97
113
  selectedSource: CalibrationMediaSourceKind;
98
114
  }) => FaceTrackingResult[];
99
115
  export declare const useXRViewportState: () => XRViewportRenderState | null;
116
+ export declare const useXRViewportRenderOutputs: () => XRViewportRenderOutputs | null;
100
117
  export declare const XRViewport: XRViewportComponent;
101
118
  export {};