@vincentt-xr/sdk 2.0.0-alpha.2 → 2.0.0-alpha.21

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 (730) hide show
  1. package/GROUNDING.md +6798 -84
  2. package/README.md +86 -52
  3. package/components.json +223 -0
  4. package/dist/CanonicalHeadFrame-CQe2YX9a.js +1506 -0
  5. package/dist/CanonicalHeadFrame-CZFvPzN_.cjs +1 -0
  6. package/dist/DebuggerUI-CKYrYmod.js +275 -0
  7. package/dist/DebuggerUI-Db-1VtQJ.cjs +1 -0
  8. package/dist/FaceRetouch-DHhn1nSV.cjs +134 -0
  9. package/dist/FaceRetouch-l7y4oZBu.js +1071 -0
  10. package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
  11. package/dist/FaceSurface-DmP9AEeC.js +27 -0
  12. package/dist/Scenes--qAbN6iP.cjs +1 -0
  13. package/dist/Scenes-icIQpHtV.js +58 -0
  14. package/dist/SkeletonUtils-C2r90MtN.js +21 -0
  15. package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
  16. package/dist/TextLabel-C-AibH5A.cjs +2 -0
  17. package/dist/TextLabel-fEF1o3wE.js +963 -0
  18. package/dist/assets/cache.d.ts +99 -0
  19. package/dist/assets/estimate.d.ts +11 -0
  20. package/dist/assets/gltfLoader.d.ts +16 -0
  21. package/dist/assets/index.d.ts +7 -0
  22. package/dist/assets/loaders.d.ts +43 -0
  23. package/dist/assets/react.d.ts +33 -0
  24. package/dist/assets/sdkModels.d.ts +22 -0
  25. package/dist/audio/AudioPlayer.d.ts +4 -1
  26. package/dist/body/__fixtures__/syntheticRig.d.ts +21 -0
  27. package/dist/body/bodyFlipGuard.d.ts +39 -0
  28. package/dist/body/bodyIdentity.d.ts +72 -0
  29. package/dist/body/bodyMask.d.ts +79 -0
  30. package/dist/body/bodyMaskMaterial.d.ts +15 -0
  31. package/dist/body/bodyPose.d.ts +58 -0
  32. package/dist/body/bodyRigFit.d.ts +148 -0
  33. package/dist/body/bodyRigSolver.d.ts +114 -0
  34. package/dist/body/bodySubject.d.ts +46 -0
  35. package/dist/body-pose/index.d.ts +521 -0
  36. package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
  37. package/dist/body-trigger/frame.d.ts +88 -0
  38. package/dist/body-trigger/index.d.ts +6 -0
  39. package/dist/body-trigger/moves.d.ts +235 -0
  40. package/dist/body-trigger/trigger.d.ts +75 -0
  41. package/dist/bodyMaskMaterial-BOdSJUEM.js +207 -0
  42. package/dist/bodyMaskMaterial-Q6rYywwW.cjs +68 -0
  43. package/dist/cache-DFqZYsHC.cjs +1 -0
  44. package/dist/cache-Mu-VO_6E.js +212 -0
  45. package/dist/calibration/calibration.d.ts +75 -0
  46. package/dist/calibration/index.d.ts +6 -0
  47. package/dist/calibration/storage.d.ts +13 -0
  48. package/dist/calibration/types.d.ts +53 -0
  49. package/dist/calibration/useXRCalibration.d.ts +46 -0
  50. package/dist/camera/CameraPermissionGate.d.ts +26 -0
  51. package/dist/camera/devices.d.ts +26 -0
  52. package/dist/camera/index.d.ts +8 -0
  53. package/dist/camera/permission.d.ts +86 -0
  54. package/dist/camera/useCameraPermission.d.ts +35 -0
  55. package/dist/canonicalFace-BHwyCx1c.js +9 -0
  56. package/dist/canonicalFace-C83I225R.cjs +1 -0
  57. package/dist/capabilities/detect.d.ts +45 -0
  58. package/dist/capabilities/index.d.ts +5 -0
  59. package/dist/capabilities/types.d.ts +120 -0
  60. package/dist/capabilities/useXRCapabilities.d.ts +18 -0
  61. package/dist/compat/environment.d.ts +5 -0
  62. package/dist/compat/index.d.ts +4 -0
  63. package/dist/compat/run.d.ts +18 -0
  64. package/dist/compat/scenarios.d.ts +10 -0
  65. package/dist/compat/types.d.ts +101 -0
  66. package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
  67. package/dist/components/BodyInstruction/index.d.ts +76 -0
  68. package/dist/components/BodyInstruction/useBodyPose.d.ts +30 -0
  69. package/dist/components/BodyRig/BodyAttachment.d.ts +28 -0
  70. package/dist/components/BodyRig/BodyOccluder.d.ts +27 -0
  71. package/dist/components/BodyRig/bodyDepth.d.ts +57 -0
  72. package/dist/components/BodyRig/index.d.ts +129 -0
  73. package/dist/components/BodyRig/useBodyDepthTexture.d.ts +40 -0
  74. package/dist/components/BodyTracker/index.d.ts +26 -1
  75. package/dist/components/BodyTrigger/index.d.ts +56 -0
  76. package/dist/components/Button/index.d.ts +27 -0
  77. package/dist/components/Button/safeLink.d.ts +6 -0
  78. package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
  79. package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
  80. package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
  81. package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
  82. package/dist/components/FaceAtlas/constants.d.ts +8 -0
  83. package/dist/components/FaceAtlas/index.d.ts +7 -0
  84. package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
  85. package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
  86. package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
  87. package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
  88. package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
  89. package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
  90. package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
  91. package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
  92. package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
  93. package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
  94. package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
  95. package/dist/components/FaceCharacter/index.d.ts +18 -0
  96. package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
  97. package/dist/components/FaceInset/FaceInset.d.ts +68 -0
  98. package/dist/components/FaceInset/frame.d.ts +94 -0
  99. package/dist/components/FaceInset/index.d.ts +6 -0
  100. package/dist/components/FaceInset/material.d.ts +40 -0
  101. package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
  102. package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
  103. package/dist/components/FaceInstruction/index.d.ts +56 -0
  104. package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
  105. package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
  106. package/dist/components/FaceLiquify/debug.d.ts +37 -0
  107. package/dist/components/FaceLiquify/frame.d.ts +55 -0
  108. package/dist/components/FaceLiquify/index.d.ts +10 -0
  109. package/dist/components/FaceLiquify/material.d.ts +39 -0
  110. package/dist/components/FaceLiquify/pass.d.ts +49 -0
  111. package/dist/components/FaceLiquify/presence.d.ts +25 -0
  112. package/dist/components/FaceLiquify/presets.d.ts +82 -0
  113. package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
  114. package/dist/components/FaceLiquify/target.d.ts +85 -0
  115. package/dist/components/FaceLiquify/warp.d.ts +72 -0
  116. package/dist/components/FaceMesh/FaceMeshRenderer.d.ts +11 -3
  117. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +51 -3
  118. package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +22 -1
  119. package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +22 -0
  120. package/dist/components/FaceMesh/canonical/shaders.d.ts +1 -1
  121. package/dist/components/FaceMesh/index.d.ts +3 -3
  122. package/dist/components/FaceRetouch/Background.d.ts +3 -1
  123. package/dist/components/FaceRetouch/FaceRetouch.d.ts +5 -0
  124. package/dist/components/FaceRetouch/renderState.d.ts +19 -0
  125. package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
  126. package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
  127. package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
  128. package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
  129. package/dist/components/FaceSwap/index.d.ts +13 -0
  130. package/dist/components/FaceSwap/settings.d.ts +300 -0
  131. package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
  132. package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
  133. package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
  134. package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
  135. package/dist/components/FaceWarp3D/index.d.ts +2 -3
  136. package/dist/components/Faceless/Faceless.d.ts +51 -0
  137. package/dist/components/Faceless/index.d.ts +2 -0
  138. package/dist/components/GestureListener/index.d.ts +11 -0
  139. package/dist/components/HairLock/HairLock.d.ts +39 -0
  140. package/dist/components/HairLock/index.d.ts +2 -0
  141. package/dist/components/HairLock/lockGeometry.d.ts +15 -0
  142. package/dist/components/HandCutout/index.d.ts +35 -0
  143. package/dist/components/HandEffect/index.d.ts +36 -0
  144. package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
  145. package/dist/components/HandInstruction/index.d.ts +74 -0
  146. package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
  147. package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
  148. package/dist/components/HandRig/HandAttachment.d.ts +34 -0
  149. package/dist/components/HandRig/HandNails.d.ts +61 -0
  150. package/dist/components/HandRig/HandOccluder.d.ts +45 -0
  151. package/dist/components/HandRig/HandTattoo.d.ts +61 -0
  152. package/dist/components/HandRig/WristAttachment.d.ts +34 -0
  153. package/dist/components/HandRig/index.d.ts +127 -0
  154. package/dist/components/HandRig/useArmMask.d.ts +29 -0
  155. package/dist/components/HandRig/wristSolve.d.ts +96 -0
  156. package/dist/components/HandTouch/HandTouch.d.ts +62 -0
  157. package/dist/components/HandTouch/Touchable.d.ts +36 -0
  158. package/dist/components/HandTouch/index.d.ts +2 -0
  159. package/dist/components/HandTracker/index.d.ts +10 -0
  160. package/dist/components/HeadBinding/index.d.ts +14 -0
  161. package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
  162. package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
  163. package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
  164. package/dist/components/HeadOccluder/NeckOccluder.d.ts +67 -0
  165. package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
  166. package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
  167. package/dist/components/HeadOccluder/index.d.ts +57 -3
  168. package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
  169. package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
  170. package/dist/components/HolisticTracker/index.d.ts +69 -0
  171. package/dist/components/HolisticTracker/settings.d.ts +58 -0
  172. package/dist/components/HolisticTracker/signals.d.ts +49 -0
  173. package/dist/components/HtmlRegion/index.d.ts +8 -0
  174. package/dist/components/Instruction/HintStage.d.ts +29 -0
  175. package/dist/components/Instruction/InstructionCue.d.ts +126 -0
  176. package/dist/components/Instruction/gestureHold.d.ts +20 -0
  177. package/dist/components/Instruction/ghost.d.ts +129 -0
  178. package/dist/components/Instruction/hintBlend.d.ts +19 -0
  179. package/dist/components/Instruction/hintLook.d.ts +81 -0
  180. package/dist/components/Instruction/hintLoop.d.ts +36 -0
  181. package/dist/components/Instruction/index.d.ts +41 -0
  182. package/dist/components/Instruction/useGhostModel.d.ts +33 -0
  183. package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
  184. package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
  185. package/dist/components/IrisEffect/index.d.ts +51 -0
  186. package/dist/components/IrisEffect/settings.d.ts +117 -0
  187. package/dist/components/Light/index.d.ts +26 -0
  188. package/dist/components/LipEffect/LipEffect.d.ts +28 -0
  189. package/dist/components/LipEffect/LipEffectMaterial.d.ts +98 -0
  190. package/dist/components/LipEffect/LipEffects.d.ts +12 -0
  191. package/dist/components/LipEffect/defaults.d.ts +51 -0
  192. package/dist/components/LipEffect/index.d.ts +12 -0
  193. package/dist/components/LipEffect/lipShading.d.ts +73 -0
  194. package/dist/components/LipEffect/settings.d.ts +375 -0
  195. package/dist/components/LipEffect/shader.d.ts +39 -0
  196. package/dist/components/LipEffect/types.d.ts +141 -0
  197. package/dist/components/LipEffect/useLipDesignTextures.d.ts +17 -0
  198. package/dist/components/LipEffect/uvGuide.d.ts +74 -0
  199. package/dist/components/Makeup/Blush.d.ts +18 -0
  200. package/dist/components/Makeup/Brows.d.ts +20 -0
  201. package/dist/components/Makeup/Contour.d.ts +17 -0
  202. package/dist/components/Makeup/Eyeliner.d.ts +20 -0
  203. package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
  204. package/dist/components/Makeup/Highlighter.d.ts +18 -0
  205. package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
  206. package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
  207. package/dist/components/Makeup/constants.d.ts +44 -0
  208. package/dist/components/Makeup/design.d.ts +106 -0
  209. package/dist/components/Makeup/designSamples.d.ts +42 -0
  210. package/dist/components/Makeup/eyes.d.ts +114 -0
  211. package/dist/components/Makeup/fields.d.ts +10 -0
  212. package/dist/components/Makeup/geometry.d.ts +106 -0
  213. package/dist/components/Makeup/index.d.ts +26 -0
  214. package/dist/components/Makeup/looks.d.ts +28 -0
  215. package/dist/components/Makeup/material.d.ts +239 -0
  216. package/dist/components/Makeup/settings.d.ts +54 -0
  217. package/dist/components/Makeup/shades.d.ts +143 -0
  218. package/dist/components/Makeup/shapes.d.ts +27 -0
  219. package/dist/components/Makeup/skinTone.d.ts +135 -0
  220. package/dist/components/Makeup/types.d.ts +110 -0
  221. package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
  222. package/dist/components/MeshRenderer/index.d.ts +8 -1
  223. package/dist/components/Model/index.d.ts +16 -0
  224. package/dist/components/Necklace/Necklace.d.ts +44 -0
  225. package/dist/components/Necklace/index.d.ts +1 -0
  226. package/dist/components/Object3D/index.d.ts +13 -0
  227. package/dist/components/PaintedFace/index.d.ts +24 -0
  228. package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
  229. package/dist/components/ParticleEmitter/index.d.ts +1 -0
  230. package/dist/components/PersonCutout/index.d.ts +46 -0
  231. package/dist/components/PersonCutout/personCutout.d.ts +16 -0
  232. package/dist/components/PersonCutout/personMask.d.ts +19 -0
  233. package/dist/components/PersonCutout/useBodyMaskTexture.d.ts +35 -0
  234. package/dist/components/SceneObjectRenderer/index.d.ts +9 -2
  235. package/dist/components/ScreenImage/ScreenImage.d.ts +4 -1
  236. package/dist/components/ScreenImage/components/ImageLoadFallback.d.ts +24 -0
  237. package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +2 -1
  238. package/dist/components/ScreenImage/index.d.ts +3 -1
  239. package/dist/components/ScreenImage/liveEditable.d.ts +12 -0
  240. package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +1 -1
  241. package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
  242. package/dist/components/ScreenImage/source.d.ts +9 -0
  243. package/dist/components/ScreenImage/types.d.ts +48 -3
  244. package/dist/components/ScreenShape/index.d.ts +4 -1
  245. package/dist/components/ScreenShape/types.d.ts +13 -0
  246. package/dist/components/ScreenSpaceUI/index.d.ts +1 -0
  247. package/dist/components/ScreenText/index.d.ts +4 -1
  248. package/dist/components/ScreenText/liveEditable.d.ts +6 -0
  249. package/dist/components/ScreenText/types.d.ts +2 -1
  250. package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
  251. package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
  252. package/dist/components/SegmentationOverlay/index.d.ts +9 -0
  253. package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
  254. package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
  255. package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
  256. package/dist/components/ShoulderOccluder/index.d.ts +46 -0
  257. package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +27 -0
  258. package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
  259. package/dist/components/SpringSwing/index.d.ts +1 -0
  260. package/dist/components/TextLabel/TextLabel.d.ts +1 -1
  261. package/dist/components/TextLabel/types.d.ts +150 -37
  262. package/dist/components/ThemeProvider/index.d.ts +24 -0
  263. package/dist/components/XRMediaSurface/index.d.ts +2 -1
  264. package/dist/components/XRProvider/index.d.ts +16 -2
  265. package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
  266. package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +1 -1
  267. package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +1 -1
  268. package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +1 -1
  269. package/dist/components/index.d.ts +18 -0
  270. package/dist/components/occluder/skinnedOccluder.d.ts +39 -0
  271. package/dist/config/index.d.ts +1 -1
  272. package/dist/constants/index.d.ts +4 -1
  273. package/dist/context-DTxSQvp4.js +13 -0
  274. package/dist/context-hA0Rb2Xa.cjs +1 -0
  275. package/dist/contexts-CSz9stBV.cjs +1 -0
  276. package/dist/contexts-Cl-4dUOI.js +667 -0
  277. package/dist/coordinates/feed.d.ts +52 -0
  278. package/dist/coordinates/index.d.ts +7 -0
  279. package/dist/coordinates/side.d.ts +40 -0
  280. package/dist/coordinates/spaces.d.ts +49 -0
  281. package/dist/coordinates/viewport.d.ts +32 -0
  282. package/dist/coordinates/world.d.ts +15 -0
  283. package/dist/debug-ui/default-setting.cjs +2 -2
  284. package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
  285. package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
  286. package/dist/debug-ui/hierarchy-panel/index.d.ts +3 -2
  287. package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
  288. package/dist/debug-ui/index.d.ts +19 -4
  289. package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
  290. package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
  291. package/dist/debug-ui/media-source/index.d.ts +3 -3
  292. package/dist/debug-ui/media-source/media-preset.d.ts +12 -0
  293. package/dist/debug-ui/media-source/session.d.ts +30 -2
  294. package/dist/debug-ui/media-source.cjs +1 -1
  295. package/dist/debug-ui/media-source.js +7 -5
  296. package/dist/debug-ui/object-inspector-panel/index.d.ts +3 -2
  297. package/dist/debug-ui/product-hotspots/index.d.ts +25 -0
  298. package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +3 -1
  299. package/dist/debug-ui/scene-editor/inspector-panel.d.ts +3 -1
  300. package/dist/debug-ui/screen-image-settings/index.d.ts +3 -1
  301. package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +1 -1
  302. package/dist/debug-ui/screen-text-settings/types.d.ts +2 -0
  303. package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
  304. package/dist/debug-ui/settings-panel/index.d.ts +6 -1
  305. package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
  306. package/dist/debug-ui/xr-diagnostics/index.d.ts +26 -0
  307. package/dist/debug-ui.cjs +3 -3
  308. package/dist/debug-ui.js +2721 -2531
  309. package/dist/detector-K8aej4MB.js +59 -0
  310. package/dist/detector-ijypGtse.cjs +1 -0
  311. package/dist/drawNormalizedCrop-D606u5-F.js +135 -0
  312. package/dist/drawNormalizedCrop-DaGT5mZ5.cjs +1 -0
  313. package/dist/editor-defs/definitions.d.ts +2 -0
  314. package/dist/editor-defs/index.d.ts +3 -0
  315. package/dist/editor-defs/types.d.ts +57 -0
  316. package/dist/editor-sample/sample.d.ts +15 -0
  317. package/dist/editor-scenes.cjs +1 -0
  318. package/dist/editor-scenes.js +59 -0
  319. package/dist/entries/all.d.ts +3 -1
  320. package/dist/entries/core.d.ts +38 -4
  321. package/dist/entries/editor-scenes.d.ts +8 -0
  322. package/dist/entries/face-effects.d.ts +125 -7
  323. package/dist/entries/instructions.d.ts +48 -0
  324. package/dist/entries/internal.d.ts +4 -1
  325. package/dist/entries/low-level.d.ts +83 -2
  326. package/dist/entries/particles.d.ts +15 -0
  327. package/dist/entries/product.d.ts +11 -0
  328. package/dist/entries/tracking.d.ts +87 -2
  329. package/dist/face-atlas/attributes.d.ts +30 -0
  330. package/dist/face-atlas/eyes.d.ts +272 -0
  331. package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
  332. package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
  333. package/dist/face-atlas/glsl/common.d.ts +55 -0
  334. package/dist/face-atlas/glsl/design.d.ts +49 -0
  335. package/dist/face-atlas/glsl/eyes.d.ts +73 -0
  336. package/dist/face-atlas/glsl/finish.d.ts +24 -0
  337. package/dist/face-atlas/glsl/format.d.ts +4 -0
  338. package/dist/face-atlas/glsl/index.d.ts +59 -0
  339. package/dist/face-atlas/glsl/shading.d.ts +15 -0
  340. package/dist/face-atlas/glsl/shapes.d.ts +66 -0
  341. package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
  342. package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
  343. package/dist/face-atlas/guide.d.ts +51 -0
  344. package/dist/face-atlas/index.d.ts +25 -0
  345. package/dist/face-atlas/lead.d.ts +117 -0
  346. package/dist/face-atlas/madeUpCamera.d.ts +125 -0
  347. package/dist/face-atlas/masks.d.ts +53 -0
  348. package/dist/face-atlas/obj.d.ts +69 -0
  349. package/dist/face-atlas/polylines.d.ts +63 -0
  350. package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
  351. package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
  352. package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
  353. package/dist/face-atlas/probe/constants.d.ts +137 -0
  354. package/dist/face-atlas/probe/glsl.d.ts +43 -0
  355. package/dist/face-atlas/probe/lightFit.d.ts +108 -0
  356. package/dist/face-atlas/probe/schedule.d.ts +44 -0
  357. package/dist/face-atlas/probe/selfTest.d.ts +87 -0
  358. package/dist/face-atlas/probe/stats.d.ts +143 -0
  359. package/dist/face-atlas/probe/targets.d.ts +70 -0
  360. package/dist/face-atlas/probe/unwrap.d.ts +76 -0
  361. package/dist/face-atlas/quality.d.ts +28 -0
  362. package/dist/face-atlas/regions.d.ts +31 -0
  363. package/dist/face-atlas/registry.d.ts +252 -0
  364. package/dist/face-atlas/renderState.d.ts +86 -0
  365. package/dist/face-atlas/selfOcclusion.d.ts +62 -0
  366. package/dist/face-atlas/shading.d.ts +406 -0
  367. package/dist/face-atlas/shapes.d.ts +86 -0
  368. package/dist/face-atlas/sides.d.ts +41 -0
  369. package/dist/face-atlas/skinMask.d.ts +35 -0
  370. package/dist/face-atlas/surface.d.ts +155 -0
  371. package/dist/face-atlas/topology.d.ts +44 -0
  372. package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
  373. package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
  374. package/dist/face-character/bindFaceModel.d.ts +106 -0
  375. package/dist/face-character/canonicalFace.d.ts +17 -0
  376. package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
  377. package/dist/face-character/canonicalFacePositions.d.ts +7 -0
  378. package/dist/face-character/driveFaceModel.d.ts +57 -0
  379. package/dist/face-character/expressionOutputs.d.ts +45 -0
  380. package/dist/face-character/faceExpressions.d.ts +104 -0
  381. package/dist/face-character/faceImageLandmarker.d.ts +93 -0
  382. package/dist/face-character/faceMeshBinding.d.ts +62 -0
  383. package/dist/face-character/faceMorph.d.ts +77 -0
  384. package/dist/face-character/faceMorphs.d.ts +46 -0
  385. package/dist/face-character/facePhoto.d.ts +138 -0
  386. package/dist/face-character/facePiercings.d.ts +116 -0
  387. package/dist/face-character/facePin.d.ts +131 -0
  388. package/dist/face-character/faceReprojection.d.ts +273 -0
  389. package/dist/face-character/faceReprojector.d.ts +171 -0
  390. package/dist/face-character/faceRig.d.ts +176 -0
  391. package/dist/face-character/faceSwapPresence.d.ts +85 -0
  392. package/dist/face-character/faceTexture.d.ts +169 -0
  393. package/dist/face-character/faceTextureBaker.d.ts +86 -0
  394. package/dist/face-character/faceTextureGuide.d.ts +106 -0
  395. package/dist/face-character/faceTextureStats.d.ts +298 -0
  396. package/dist/face-character/faceTransfer.d.ts +396 -0
  397. package/dist/face-character/faceTransferGeometry.d.ts +109 -0
  398. package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
  399. package/dist/face-character/faceWarp3D.d.ts +101 -0
  400. package/dist/face-character/faceless.d.ts +79 -0
  401. package/dist/face-character/featureWarp.d.ts +28 -0
  402. package/dist/face-character/liveFaceRegistry.d.ts +370 -0
  403. package/dist/face-character/liveValue.d.ts +12 -0
  404. package/dist/face-character/memo.d.ts +15 -0
  405. package/dist/face-effects.cjs +2324 -1
  406. package/dist/face-effects.js +14244 -2170
  407. package/dist/face-expression/index.d.ts +182 -0
  408. package/dist/face-info/landmarks.d.ts +17 -3
  409. package/dist/face-info/types.d.ts +20 -3
  410. package/dist/footage-input/index.d.ts +46 -0
  411. package/dist/gestures/definitions.d.ts +98 -0
  412. package/dist/gestures/detector.d.ts +87 -0
  413. package/dist/gestures/index.d.ts +8 -0
  414. package/dist/gestures/measures.d.ts +114 -0
  415. package/dist/gestures/settings.d.ts +49 -0
  416. package/dist/getFaceInfo-BbcKq8PJ.cjs +1 -0
  417. package/dist/getFaceInfo-Mt44zlej.js +62 -0
  418. package/dist/hand/armFit.d.ts +46 -0
  419. package/dist/hand/armMask.d.ts +190 -0
  420. package/dist/hand/forearm.d.ts +114 -0
  421. package/dist/hand/handCutout.d.ts +23 -0
  422. package/dist/hand/handCutoutRegistry.d.ts +7 -0
  423. package/dist/hand/handEffect.d.ts +38 -0
  424. package/dist/hand/handGestures.d.ts +524 -0
  425. package/dist/hand/handNail.d.ts +73 -0
  426. package/dist/hand/handPose.d.ts +98 -0
  427. package/dist/hand/handRigSolver.d.ts +159 -0
  428. package/dist/hand/handTattoo.d.ts +81 -0
  429. package/dist/hand/handTouch.d.ts +240 -0
  430. package/dist/hand/nailImageMask.d.ts +40 -0
  431. package/dist/hand/nailMaskFingers.d.ts +23 -0
  432. package/dist/hand/nailTipRefine.d.ts +37 -0
  433. package/dist/hand/wrist.d.ts +44 -0
  434. package/dist/hand/wristFilter.d.ts +44 -0
  435. package/dist/hooks/selectors.d.ts +77 -4
  436. package/dist/hooks/useBodies.d.ts +39 -0
  437. package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
  438. package/dist/hooks/useFaceInfo.d.ts +13 -1
  439. package/dist/hooks/useFaceInfos.d.ts +1 -1
  440. package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
  441. package/dist/hooks/useGesture.d.ts +39 -0
  442. package/dist/hooks/useIrisTracking.d.ts +45 -0
  443. package/dist/hooks/useTrackerContext.d.ts +12 -0
  444. package/dist/hooks/useXRDiagnostics.d.ts +81 -0
  445. package/dist/hooks/useXRModel.d.ts +12 -0
  446. package/dist/hooks/useXRSession/facade.d.ts +44 -2
  447. package/dist/hooks/useXRSession/index.d.ts +2 -2
  448. package/dist/hooks/useXRSession/reason.d.ts +21 -0
  449. package/dist/hooks/useXRSession/registry.d.ts +14 -0
  450. package/dist/hooks/useXRSession/store.d.ts +64 -7
  451. package/dist/index-B0EYdofX.js +442 -0
  452. package/dist/index-BDxJWWyy.js +3814 -0
  453. package/dist/index-BkjRuUdW.cjs +21 -0
  454. package/dist/index-Bn72laBn.js +188 -0
  455. package/dist/index-CM3jkleV.js +1204 -0
  456. package/dist/index-CbBCl2ZU.js +190 -0
  457. package/dist/index-CelqbDSR.cjs +1 -0
  458. package/dist/index-CicO_Tnw.js +240 -0
  459. package/dist/index-D5NbXaCn.js +1438 -0
  460. package/dist/index-DIYaENN3.cjs +1 -0
  461. package/dist/index-DzdKBXGE.cjs +1 -0
  462. package/dist/index-J3Qy6hi3.cjs +1 -0
  463. package/dist/index-LC2Xs08E.cjs +1 -0
  464. package/dist/index-fDwL47CM.cjs +46 -0
  465. package/dist/instructions.cjs +30 -0
  466. package/dist/instructions.js +1528 -0
  467. package/dist/{internal-DuMPpcbp.js → internal-BoFDq5hC.js} +138 -119
  468. package/dist/internal-DS8Pdlsm.cjs +1 -0
  469. package/dist/internal.cjs +1 -1
  470. package/dist/internal.js +16 -9
  471. package/dist/iris/compute.d.ts +27 -0
  472. package/dist/iris/index.d.ts +4 -0
  473. package/dist/iris/lead.d.ts +19 -0
  474. package/dist/iris/types.d.ts +89 -0
  475. package/dist/landmarkMask-CvN-L5NT.cjs +1 -0
  476. package/dist/landmarkMask-DHivVjJm.js +225 -0
  477. package/dist/landmarks-BP6RbRHN.cjs +1 -0
  478. package/dist/landmarks-C3LvDhMt.js +76 -0
  479. package/dist/low-level.cjs +1 -1
  480. package/dist/low-level.js +1295 -757
  481. package/dist/main.cjs +1 -1
  482. package/dist/main.js +1479 -499
  483. package/dist/models/Base/index.d.ts +49 -0
  484. package/dist/models/Body/index.d.ts +30 -1
  485. package/dist/models/Face/constants.d.ts +8 -0
  486. package/dist/models/Face/index.d.ts +4 -12
  487. package/dist/models/Face/rotation.d.ts +18 -3
  488. package/dist/models/Hand/GestureTracking.d.ts +1 -1
  489. package/dist/models/Hand/HandTracking.d.ts +17 -1
  490. package/dist/models/Holistic/index.d.ts +49 -0
  491. package/dist/models/Holistic/result.d.ts +68 -0
  492. package/dist/models/Segmentation/index.d.ts +6 -3
  493. package/dist/models/SemanticSegmentation/index.d.ts +31 -0
  494. package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
  495. package/dist/models/index.d.ts +2 -0
  496. package/dist/models/nodeSource.d.ts +9 -0
  497. package/dist/particles/emission.d.ts +24 -0
  498. package/dist/particles/eyes.d.ts +24 -0
  499. package/dist/particles/glsl.d.ts +14 -0
  500. package/dist/particles/index.d.ts +10 -0
  501. package/dist/particles/motion.d.ts +42 -0
  502. package/dist/particles/presets.d.ts +12 -0
  503. package/dist/particles/ring.d.ts +58 -0
  504. package/dist/particles/selfTest.d.ts +53 -0
  505. package/dist/particles/settings.d.ts +127 -0
  506. package/dist/particles/shapes.d.ts +29 -0
  507. package/dist/particles/spawner.d.ts +71 -0
  508. package/dist/particles/system.d.ts +66 -0
  509. package/dist/particles.cjs +122 -0
  510. package/dist/particles.js +999 -0
  511. package/dist/product/ProductDimensions.d.ts +16 -0
  512. package/dist/product/ProductHotspot.d.ts +16 -0
  513. package/dist/product/ProductViewer.d.ts +9 -0
  514. package/dist/product/details.d.ts +53 -0
  515. package/dist/product/index.d.ts +14 -0
  516. package/dist/product/loadModelViewer.d.ts +4 -0
  517. package/dist/product/types.d.ts +71 -0
  518. package/dist/product/useProductAr.d.ts +37 -0
  519. package/dist/product/useProductDetails.d.ts +60 -0
  520. package/dist/product.cjs +1 -0
  521. package/dist/product.js +414 -0
  522. package/dist/providers-BRSbw214.cjs +62 -0
  523. package/dist/providers-Bxt_MfPK.js +424 -0
  524. package/dist/quality/XRQualityController.d.ts +25 -0
  525. package/dist/quality/controller.d.ts +33 -0
  526. package/dist/quality/index.d.ts +6 -0
  527. package/dist/quality/types.d.ts +100 -0
  528. package/dist/quality/useXRQuality.d.ts +28 -0
  529. package/dist/render/renderPasses.d.ts +8 -0
  530. package/dist/render/sceneBeforeRender.d.ts +12 -0
  531. package/dist/{renderGroups-Dvm1J4lW.cjs → renderGroups-B0N58SIA.cjs} +1 -1
  532. package/dist/{renderGroups-C9QJrAXu.js → renderGroups-uYPzUa66.js} +1 -1
  533. package/dist/renderPasses-Bt8k0dkm.cjs +158 -0
  534. package/dist/renderPasses-C0wu5Cwg.js +1290 -0
  535. package/dist/renderState-CJNmj5jz.js +39 -0
  536. package/dist/renderState-apSfg4eR.cjs +1 -0
  537. package/dist/scene-object.cjs +1 -1
  538. package/dist/scene-object.js +2 -2
  539. package/dist/scenes/Scenes.d.ts +47 -0
  540. package/dist/scenes/edit.d.ts +37 -0
  541. package/dist/scenes/navigate.d.ts +5 -0
  542. package/dist/screen2d/coordinates.d.ts +57 -0
  543. package/dist/screen2d/screenTransform.d.ts +13 -0
  544. package/dist/segmentation-Cz7oeNcS.cjs +1 -0
  545. package/dist/segmentation-DccvYBBO.js +1911 -0
  546. package/dist/segmentation2d/faceMemory.d.ts +28 -0
  547. package/dist/segmentation2d/faceRegions.d.ts +24 -0
  548. package/dist/segmentation2d/index.d.ts +9 -0
  549. package/dist/segmentation2d/maskUv.d.ts +23 -0
  550. package/dist/segmentation2d/rasterize.d.ts +14 -0
  551. package/dist/segmentation2d/types.d.ts +52 -0
  552. package/dist/selectors-Bq6tSgOY.cjs +1 -0
  553. package/dist/selectors-J06V0eDb.js +196 -0
  554. package/dist/session-3aCMNb8W.cjs +31 -0
  555. package/dist/session-CYiWfcvz.js +493 -0
  556. package/dist/settings-BJ7FMBsO.js +111 -0
  557. package/dist/settings-C63FMBlF.cjs +1 -0
  558. package/dist/similarityFit-BFqHND2e.cjs +1 -0
  559. package/dist/similarityFit-Bbz-R8AY.js +91 -0
  560. package/dist/spring/index.d.ts +2 -0
  561. package/dist/spring/spring.d.ts +69 -0
  562. package/dist/spring/swing.d.ts +54 -0
  563. package/dist/subjects/index.d.ts +2 -0
  564. package/dist/subjects/select.d.ts +70 -0
  565. package/dist/subjects/types.d.ts +59 -0
  566. package/dist/texture/animatedTexture.d.ts +2 -0
  567. package/dist/texture/gifReader.d.ts +17 -0
  568. package/dist/texture/gifTextureSource.d.ts +16 -0
  569. package/dist/textures-BVwo9Z7z.js +38 -0
  570. package/dist/textures-DAfc61zz.cjs +1 -0
  571. package/dist/tracking/coordinates.d.ts +5 -0
  572. package/dist/tracking-config/apply.d.ts +57 -0
  573. package/dist/tracking-config/index.d.ts +7 -0
  574. package/dist/tracking-config/resolve.d.ts +25 -0
  575. package/dist/tracking-config/storage.d.ts +8 -0
  576. package/dist/tracking-config/types.d.ts +106 -0
  577. package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
  578. package/dist/tracking.cjs +10 -1
  579. package/dist/tracking.js +1439 -486
  580. package/dist/trigger-CQviD4xp.js +3726 -0
  581. package/dist/trigger-UjeJY5uh.cjs +147 -0
  582. package/dist/types/common.d.ts +11 -1
  583. package/dist/types/compositor.d.ts +21 -0
  584. package/dist/types/face.d.ts +20 -1
  585. package/dist/types/gesture-tracking.d.ts +2 -2
  586. package/dist/types/hand-tracking.d.ts +12 -3
  587. package/dist/types/holistic.d.ts +121 -0
  588. package/dist/types/index.d.ts +1 -0
  589. package/dist/types/model.d.ts +22 -2
  590. package/dist/types/nodes.d.ts +79 -5
  591. package/dist/types/segmentation.d.ts +26 -0
  592. package/dist/types/session.d.ts +48 -4
  593. package/dist/useBodies-CXomEo0i.cjs +1 -0
  594. package/dist/useBodies-DOuwRuew.js +75 -0
  595. package/dist/useEditOverrides-BBkK8cN2.js +41 -0
  596. package/dist/useEditOverrides-CgapHJzA.cjs +1 -0
  597. package/dist/useFaceInfo-BEMMiZxw.cjs +1 -0
  598. package/dist/useFaceInfo-XUGYTdfN.js +75 -0
  599. package/dist/useFaceResultReader-D8wXbF1L.js +61 -0
  600. package/dist/useFaceResultReader-D9qibKmm.cjs +1 -0
  601. package/dist/useInstructionHold-DOu-RpCM.js +53 -0
  602. package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
  603. package/dist/useIrisTracking-B0uLWgNE.js +6190 -0
  604. package/dist/useIrisTracking-DExhnhlt.cjs +35 -0
  605. package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
  606. package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
  607. package/dist/useXRCapabilities-D-EhcDzM.cjs +1 -0
  608. package/dist/useXRCapabilities-DPUOvpdf.js +30 -0
  609. package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
  610. package/dist/utils/fns.d.ts +6 -3
  611. package/dist/utils/headOccluderFit.d.ts +42 -0
  612. package/dist/utils/integrity.d.ts +21 -1
  613. package/dist/utils/resolveNumFaces.d.ts +13 -0
  614. package/dist/utils/shoulderOccluderFit.d.ts +38 -0
  615. package/dist/utils/similarityFit.d.ts +23 -0
  616. package/dist/utils/updateThrottle.d.ts +2 -0
  617. package/dist/utils/useEditOverrides.d.ts +34 -0
  618. package/dist/utils/useStableUniforms.d.ts +18 -0
  619. package/dist/utils/visionWasm.d.ts +18 -0
  620. package/dist/uv-BMFt19bg.cjs +1 -0
  621. package/dist/{index-BgQAX8rs.js → uv-DJU_XfmN.js} +15 -244
  622. package/docs/SDK_DOCUMENTATION.md +4 -2
  623. package/docs/api/adaptive-quality.mdx +104 -0
  624. package/docs/api/asset-lifecycle.mdx +78 -0
  625. package/docs/api/body-instructions.mdx +287 -0
  626. package/docs/api/body-rig.mdx +384 -0
  627. package/docs/api/body-triggers.mdx +235 -0
  628. package/docs/api/camera-permission.mdx +142 -0
  629. package/docs/api/capture-recording.mdx +9 -1
  630. package/docs/api/coordinate-spaces.mdx +168 -0
  631. package/docs/api/cross-camera.mdx +89 -0
  632. package/docs/api/debug-ui-scene-editor.mdx +23 -2
  633. package/docs/api/diagnostics-calibration.mdx +97 -0
  634. package/docs/api/external-face-mesh.mdx +231 -0
  635. package/docs/api/face-actions.mdx +20 -16
  636. package/docs/api/face-attribute-expression.mdx +1 -1
  637. package/docs/api/face-binding-anchors.mdx +4 -2
  638. package/docs/api/face-character.mdx +157 -0
  639. package/docs/api/face-effects.mdx +9 -0
  640. package/docs/api/face-expression-controller.mdx +153 -0
  641. package/docs/api/face-info.mdx +18 -12
  642. package/docs/api/face-inset.mdx +204 -0
  643. package/docs/api/face-instructions.mdx +183 -0
  644. package/docs/api/face-liquify.mdx +196 -0
  645. package/docs/api/face-mesh.mdx +39 -7
  646. package/docs/api/face-morph.mdx +117 -0
  647. package/docs/api/face-painting.mdx +7 -0
  648. package/docs/api/face-reprojection.mdx +154 -0
  649. package/docs/api/face-retouching.mdx +18 -10
  650. package/docs/api/face-swap.mdx +350 -0
  651. package/docs/api/face-warp-3d.mdx +166 -0
  652. package/docs/api/faceless.mdx +143 -0
  653. package/docs/api/gestures.mdx +210 -0
  654. package/docs/api/hair.mdx +97 -0
  655. package/docs/api/hand-instructions.mdx +222 -0
  656. package/docs/api/hand-rig.mdx +661 -0
  657. package/docs/api/hand-touch.mdx +162 -0
  658. package/docs/api/head-occluder.mdx +563 -0
  659. package/docs/api/holistic-tracker.mdx +164 -0
  660. package/docs/api/instructions.mdx +323 -0
  661. package/docs/api/iris-tracking.mdx +247 -0
  662. package/docs/api/made-up-camera.mdx +131 -0
  663. package/docs/api/makeup-skin-tone.mdx +135 -0
  664. package/docs/api/makeup.mdx +353 -0
  665. package/docs/api/multi-subject.mdx +185 -0
  666. package/docs/api/particles.mdx +183 -0
  667. package/docs/api/person-cutout.mdx +171 -0
  668. package/docs/api/pin-to-face-mesh.mdx +274 -0
  669. package/docs/api/product-ar.mdx +114 -0
  670. package/docs/api/product-details.mdx +78 -0
  671. package/docs/api/runtime-3d.mdx +5 -0
  672. package/docs/api/screen-image.mdx +29 -3
  673. package/docs/api/screen-space-coordinates.mdx +43 -1
  674. package/docs/api/segmentation-overlay.mdx +301 -0
  675. package/docs/api/session-lifecycle.mdx +165 -0
  676. package/docs/api/texture-sources.mdx +25 -6
  677. package/docs/api/trackers.mdx +20 -1
  678. package/docs/api/tracking-config.mdx +108 -0
  679. package/docs/docs.json +52 -1
  680. package/docs/examples/lip-shaders.mdx +273 -0
  681. package/docs/guides/face-atlas-template.svg +1 -0
  682. package/docs/guides/face-atlas-textures.mdx +186 -0
  683. package/docs/guides/face-texture-template.svg +1 -0
  684. package/docs/guides/harness-debug-ui.mdx +4 -4
  685. package/docs/guides/lip-effect-textures.mdx +368 -0
  686. package/docs/guides/lip-uv-template.png +0 -0
  687. package/docs/guides/lip-uv-template.svg +1 -0
  688. package/docs/guides/makeup-design-textures.mdx +109 -0
  689. package/docs/introduction.mdx +1 -2
  690. package/docs/texture-api-consumer.md +26 -0
  691. package/package.json +44 -5
  692. package/settings.json +2152 -0
  693. package/dist/DebuggerUI-B45_Gb9d.cjs +0 -1
  694. package/dist/DebuggerUI-Cq28c18s.js +0 -269
  695. package/dist/FaceMeshRenderer-6t8OsQhK.js +0 -1195
  696. package/dist/FaceMeshRenderer-lQLhYIW-.cjs +0 -155
  697. package/dist/FaceRetouch-CDrL0pXg.js +0 -551
  698. package/dist/FaceRetouch-DtNl8-4e.cjs +0 -134
  699. package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +0 -15
  700. package/dist/components/FaceWarp3D/defaults.d.ts +0 -37
  701. package/dist/components/FaceWarp3D/warp.d.ts +0 -13
  702. package/dist/contexts-BKvTIayr.cjs +0 -1
  703. package/dist/contexts-Bk5zz_VR.js +0 -214
  704. package/dist/debug-ui/face-warp-3d/index.d.ts +0 -6
  705. package/dist/drawNormalizedCrop-B-7zU-Xw.cjs +0 -1
  706. package/dist/drawNormalizedCrop-CRdIDyl1.js +0 -44
  707. package/dist/getFaceInfo-CyPAKh3h.cjs +0 -1
  708. package/dist/getFaceInfo-hUKMLFcr.js +0 -118
  709. package/dist/index-82aENaRq.cjs +0 -1
  710. package/dist/index-CEc1CAmB.cjs +0 -1
  711. package/dist/index-CTHeBQOs.js +0 -178
  712. package/dist/index-D4bLzBr6.cjs +0 -1
  713. package/dist/index-DSpzjuqd.cjs +0 -1
  714. package/dist/index-Di70KWuY.js +0 -2049
  715. package/dist/index-DzEzkBIH.cjs +0 -17
  716. package/dist/index-JygePOwo.js +0 -1398
  717. package/dist/index-UC0Ux38E.js +0 -111
  718. package/dist/internal-i2JkM85N.cjs +0 -1
  719. package/dist/renderLayers-lDtL0_43.cjs +0 -1
  720. package/dist/renderLayers-zrK2pv5O.js +0 -13
  721. package/dist/renderPasses-CT5iBwtg.cjs +0 -21
  722. package/dist/renderPasses-CjgG_6kQ.js +0 -1500
  723. package/dist/selectors-2QvO5RYY.cjs +0 -1
  724. package/dist/selectors-Dw3C-gSk.js +0 -59
  725. package/dist/session-BChR4TgK.cjs +0 -31
  726. package/dist/session-C1StwN0f.js +0 -363
  727. package/dist/useFaceInfo-C-WfMlYp.cjs +0 -1
  728. package/dist/useFaceInfo-CwsHZedC.js +0 -62
  729. package/dist/useFaceResults-CkFc1egZ.js +0 -19
  730. package/dist/useFaceResults-VcFdOUFV.cjs +0 -1
@@ -1,15 +0,0 @@
1
- import { FaceWarp3DSettings } from './defaults';
2
- export type FaceWarp3DHeadProps = {
3
- /** Topology-compatible head mesh. */
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;
@@ -1,37 +0,0 @@
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;
@@ -1,13 +0,0 @@
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 {};
@@ -1 +0,0 @@
1
- "use strict";const p=require("react/jsx-runtime"),y=require("@react-three/fiber"),l=require("react"),N=require("three"),M=require("./renderLayers-lDtL0_43.cjs"),X=require("./selectors-2QvO5RYY.cjs"),j=require("./index-D4bLzBr6.cjs"),D=require("./index-CEc1CAmB.cjs");function U(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const c=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,c.get?c:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const S=U(N),A={display:"flex",alignItems:"center",justifyContent:"center",height:"100%",background:"#363636",color:"white",fontFamily:"monospace"},$=()=>p.jsx("div",{style:A,children:"Loading..."}),H=t=>p.jsx("div",{style:A,children:t.error}),_={position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:10},F={sceneColorTexture:null,sceneDepthTexture:null},G=({onRenderOutputs:t,renderOutputs:n,size:o})=>{const{gl:c,scene:a,size:x}=y.useThree(),{session:s}=j.useXRContext(),r=Math.max(1,Math.round((o==null?void 0:o.width)??x.width)),h=Math.max(1,Math.round((o==null?void 0:o.height)??x.height)),u=!!(n.sceneColor||n.sceneDepth),i=l.useMemo(()=>{if(!u)return null;const e=new S.WebGLRenderTarget(r,h,{colorSpace:S.SRGBColorSpace,depthBuffer:!0,stencilBuffer:!1});return n.sceneDepth&&(e.depthTexture=new S.DepthTexture(r,h),e.depthTexture.format=S.DepthFormat,e.depthTexture.type=S.UnsignedShortType),e},[u,h,n.sceneDepth,r]);return l.useEffect(()=>{if(!i){t==null||t(F);return}return t==null||t({sceneColorTexture:n.sceneColor?i.texture:null,sceneDepthTexture:n.sceneDepth&&i.depthTexture?i.depthTexture:null}),()=>{var e;i.dispose(),(e=i.depthTexture)==null||e.dispose(),t==null||t(F)}},[t,n.sceneColor,n.sceneDepth,i]),y.useFrame(()=>{if(!i)return;const e=[];n.excludeScreenUI!==!1&&a.traverse(d=>{d.visible&&d.renderOrder>=M.RENDER_LAYERS.SCREEN_UI&&(e.push(d),d.visible=!1)});const g=c.getRenderTarget(),f=c.xr.enabled;c.xr.enabled=!1,c.setRenderTarget(i),c.clear(),s._renderFrame(),c.setRenderTarget(g),c.xr.enabled=f,e.forEach(d=>{d.visible=!0})},-100),null},W=({style:t,canvasProps:n,children:o,loadingComponent:c,loadingTransitionDuration:a,errorComponent:x,renderTargetSize:s,renderOutputs:r={},onRenderOutputs:h})=>{const u=l.useRef(null),i=l.useRef(null),e=l.useRef(null),g=l.useRef(!1),{session:f}=j.useXRContext(),d=X.useXRReady(),T=X.useXRError(),[C,v]=l.useState(!0);return l.useEffect(()=>{if(s){f._setRenderSize(Math.round(s.width),Math.round(s.height));return}const m=(w,R)=>{w<=0||R<=0||f._setRenderSize(Math.round(w),Math.round(R))},b=()=>{!i.current||g.current||(g.current=!0,f._setRenderTarget(i.current))},B=(w,R)=>{e.current!==null&&cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{e.current=null,m(w,R)})},E=new ResizeObserver(w=>{const R=w[0];if(!R)return;const{width:Y,height:I}=R.contentRect;b(),B(Y,I)});return u.current&&E.observe(u.current),b(),()=>{E.disconnect(),e.current!==null&&(cancelAnimationFrame(e.current),e.current=null),g.current=!1}},[s,f]),l.useEffect(()=>{d&&(a?setTimeout(()=>{v(!1)},a):v(!1))},[d,a]),p.jsxs("div",{id:"vincentt-xr-container",ref:u,style:{width:"100%",height:"100%",...t,position:"relative"},children:[C&&p.jsx("div",{style:_,children:c||p.jsx($,{})}),T&&p.jsx("div",{style:_,children:x||p.jsx(H,{error:T.message})}),p.jsxs(y.Canvas,{id:"vincentt-xr-canvas",ref:i,dpr:[1,3],gl:{alpha:!0,preserveDrawingBuffer:!1,antialias:!0,premultipliedAlpha:!1,toneMapping:S.NoToneMapping},...n,onCreated:m=>{s?f._setRenderSize(Math.round(s.width),Math.round(s.height)):f._setRenderTarget(i.current),f._setR3FState({renderer:m.gl,scene:m.scene,camera:m.camera}),m.gl.outputColorSpace=S.SRGBColorSpace,n!=null&&n.onCreated&&n.onCreated(m)},children:[p.jsx(G,{onRenderOutputs:h,renderOutputs:r,size:s}),o]})]})},L=(t,n,o,c,a)=>{const x=t/2,s=n/2,r=o.left*x+c.left,h=o.right*x-c.right,u=o.bottom*s+c.bottom,i=o.top*s-c.top,e=h-r,g=i-u,f=(r+h)/2,d=(u+i)/2,T=a[0]*e/2,C=a[1]*g/2;return{centerX:f,centerY:d,width:e,height:g,pivotX:T,pivotY:C}},k={left:0,right:0,top:0,bottom:0},J={left:0,right:0,top:0,bottom:0},K=[0,0],Q=({anchors:t,offsets:n,pivot:o=K,children:c})=>{const{width:a,height:x}=D.useScreenSpace(),s=l.useMemo(()=>({anchors:{...k,...t??{}},offsets:{...J,...n??{}}}),[t,n]),r=l.useMemo(()=>L(a,x,s.anchors,s.offsets,o),[a,x,s,o]);l.useEffect(()=>{const e=s.anchors;e.left>e.right&&console.warn(`[ScreenTransform] inverted X axis: anchors.left (${e.left}) > anchors.right (${e.right})`),e.bottom>e.top&&console.warn(`[ScreenTransform] inverted Y axis: anchors.bottom (${e.bottom}) > anchors.top (${e.top})`),r.width<=0&&console.warn(`[ScreenTransform] zero or negative width (${r.width.toFixed(3)}) — anchors + offsets collapse the X extent`),r.height<=0&&console.warn(`[ScreenTransform] zero or negative height (${r.height.toFixed(3)}) — anchors + offsets collapse the Y extent`)},[s,r.width,r.height]);const h=o[0]!==0||o[1]!==0,u=h?[1,1,1]:[r.width,r.height,1],i=!h&&r.width>0&&r.height>0?r.width/r.height:null;return p.jsx("group",{position:[r.centerX-r.pivotX,r.centerY-r.pivotY,0],scale:u,renderOrder:M.RENDER_LAYERS.SCREEN_UI,children:p.jsx(D.ScreenRectAspectContext.Provider,{value:i,children:c})})},q=l.createContext(null),V=l.createContext(null),Z=()=>l.useContext(q),P=()=>l.useContext(V);exports.ScreenTransform=Q;exports.XRScene=W;exports.XRViewportRenderOutputsContext=V;exports.XRViewportStateContext=q;exports.computeScreenTransform=L;exports.useXRViewportRenderOutputs=P;exports.useXRViewportState=Z;
@@ -1,214 +0,0 @@
1
- import { jsx as p, jsxs as F } from "react/jsx-runtime";
2
- import { Canvas as N, useThree as V, useFrame as H } from "@react-three/fiber";
3
- import { useRef as T, useState as G, useEffect as v, useMemo as y, useContext as _, createContext as A } from "react";
4
- import * as S from "three";
5
- import { R as L } from "./renderLayers-zrK2pv5O.js";
6
- import { u as W, a as j } from "./selectors-Dw3C-gSk.js";
7
- import { u as B } from "./index-JygePOwo.js";
8
- import { u as k, S as q } from "./index-CTHeBQOs.js";
9
- const I = {
10
- display: "flex",
11
- alignItems: "center",
12
- justifyContent: "center",
13
- height: "100%",
14
- background: "#363636",
15
- color: "white",
16
- fontFamily: "monospace"
17
- }, J = () => /* @__PURE__ */ p("div", { style: I, children: "Loading..." }), K = (n) => /* @__PURE__ */ p("div", { style: I, children: n.error }), D = {
18
- position: "absolute",
19
- top: 0,
20
- left: 0,
21
- width: "100%",
22
- height: "100%",
23
- zIndex: 10
24
- }, M = {
25
- sceneColorTexture: null,
26
- sceneDepthTexture: null
27
- }, Q = ({
28
- onRenderOutputs: n,
29
- renderOutputs: r,
30
- size: s
31
- }) => {
32
- const { gl: i, scene: a, size: u } = V(), { session: o } = B(), t = Math.max(1, Math.round((s == null ? void 0 : s.width) ?? u.width)), l = Math.max(1, Math.round((s == null ? void 0 : s.height) ?? u.height)), h = !!(r.sceneColor || r.sceneDepth), c = y(() => {
33
- if (!h) return null;
34
- const e = new S.WebGLRenderTarget(t, l, {
35
- colorSpace: S.SRGBColorSpace,
36
- depthBuffer: !0,
37
- stencilBuffer: !1
38
- });
39
- return r.sceneDepth && (e.depthTexture = new S.DepthTexture(t, l), e.depthTexture.format = S.DepthFormat, e.depthTexture.type = S.UnsignedShortType), e;
40
- }, [h, l, r.sceneDepth, t]);
41
- return v(() => {
42
- if (!c) {
43
- n == null || n(M);
44
- return;
45
- }
46
- return n == null || n({
47
- sceneColorTexture: r.sceneColor ? c.texture : null,
48
- sceneDepthTexture: r.sceneDepth && c.depthTexture ? c.depthTexture : null
49
- }), () => {
50
- var e;
51
- c.dispose(), (e = c.depthTexture) == null || e.dispose(), n == null || n(M);
52
- };
53
- }, [n, r.sceneColor, r.sceneDepth, c]), H(() => {
54
- if (!c) return;
55
- const e = [];
56
- r.excludeScreenUI !== !1 && a.traverse((f) => {
57
- f.visible && f.renderOrder >= L.SCREEN_UI && (e.push(f), f.visible = !1);
58
- });
59
- const m = i.getRenderTarget(), d = i.xr.enabled;
60
- i.xr.enabled = !1, i.setRenderTarget(c), i.clear(), o._renderFrame(), i.setRenderTarget(m), i.xr.enabled = d, e.forEach((f) => {
61
- f.visible = !0;
62
- });
63
- }, -100), null;
64
- }, le = ({
65
- style: n,
66
- canvasProps: r,
67
- children: s,
68
- loadingComponent: i,
69
- loadingTransitionDuration: a,
70
- errorComponent: u,
71
- renderTargetSize: o,
72
- renderOutputs: t = {},
73
- onRenderOutputs: l
74
- }) => {
75
- const h = T(null), c = T(null), e = T(null), m = T(!1), { session: d } = B(), f = W(), w = j(), [C, b] = G(!0);
76
- return v(() => {
77
- if (o) {
78
- d._setRenderSize(
79
- Math.round(o.width),
80
- Math.round(o.height)
81
- );
82
- return;
83
- }
84
- const g = (R, x) => {
85
- R <= 0 || x <= 0 || d._setRenderSize(Math.round(R), Math.round(x));
86
- }, E = () => {
87
- !c.current || m.current || (m.current = !0, d._setRenderTarget(c.current));
88
- }, U = (R, x) => {
89
- e.current !== null && cancelAnimationFrame(e.current), e.current = requestAnimationFrame(() => {
90
- e.current = null, g(R, x);
91
- });
92
- }, X = new ResizeObserver((R) => {
93
- const x = R[0];
94
- if (!x) return;
95
- const { width: Y, height: $ } = x.contentRect;
96
- E(), U(Y, $);
97
- });
98
- return h.current && X.observe(h.current), E(), () => {
99
- X.disconnect(), e.current !== null && (cancelAnimationFrame(e.current), e.current = null), m.current = !1;
100
- };
101
- }, [o, d]), v(() => {
102
- f && (a ? setTimeout(() => {
103
- b(!1);
104
- }, a) : b(!1));
105
- }, [f, a]), /* @__PURE__ */ F(
106
- "div",
107
- {
108
- id: "vincentt-xr-container",
109
- ref: h,
110
- style: {
111
- width: "100%",
112
- height: "100%",
113
- ...n,
114
- position: "relative"
115
- },
116
- children: [
117
- C && /* @__PURE__ */ p("div", { style: D, children: i || /* @__PURE__ */ p(J, {}) }),
118
- w && /* @__PURE__ */ p("div", { style: D, children: u || /* @__PURE__ */ p(K, { error: w.message }) }),
119
- /* @__PURE__ */ F(
120
- N,
121
- {
122
- id: "vincentt-xr-canvas",
123
- ref: c,
124
- dpr: [1, 3],
125
- gl: {
126
- alpha: !0,
127
- // Keep the framebuffer transient by default so resize/layout changes
128
- // do not leave an old frame hanging around. Apps that need capture
129
- // can opt back in via `canvasProps.gl`.
130
- preserveDrawingBuffer: !1,
131
- antialias: !0,
132
- premultipliedAlpha: !1,
133
- // Disable alpha premultiplication
134
- toneMapping: S.NoToneMapping
135
- // Disable tone mapping for accurate video colors
136
- },
137
- ...r,
138
- onCreated: (g) => {
139
- o ? d._setRenderSize(
140
- Math.round(o.width),
141
- Math.round(o.height)
142
- ) : d._setRenderTarget(c.current), d._setR3FState({
143
- renderer: g.gl,
144
- scene: g.scene,
145
- camera: g.camera
146
- }), g.gl.outputColorSpace = S.SRGBColorSpace, r != null && r.onCreated && r.onCreated(g);
147
- },
148
- children: [
149
- /* @__PURE__ */ p(
150
- Q,
151
- {
152
- onRenderOutputs: l,
153
- renderOutputs: t,
154
- size: o
155
- }
156
- ),
157
- s
158
- ]
159
- }
160
- )
161
- ]
162
- }
163
- );
164
- }, Z = (n, r, s, i, a) => {
165
- const u = n / 2, o = r / 2, t = s.left * u + i.left, l = s.right * u - i.right, h = s.bottom * o + i.bottom, c = s.top * o - i.top, e = l - t, m = c - h, d = (t + l) / 2, f = (h + c) / 2, w = a[0] * e / 2, C = a[1] * m / 2;
166
- return { centerX: d, centerY: f, width: e, height: m, pivotX: w, pivotY: C };
167
- }, z = { left: 0, right: 0, top: 0, bottom: 0 }, P = { left: 0, right: 0, top: 0, bottom: 0 }, O = [0, 0], he = ({
168
- anchors: n,
169
- offsets: r,
170
- pivot: s = O,
171
- children: i
172
- }) => {
173
- const { width: a, height: u } = k(), o = y(
174
- () => ({
175
- anchors: { ...z, ...n ?? {} },
176
- offsets: { ...P, ...r ?? {} }
177
- }),
178
- [n, r]
179
- ), t = y(
180
- () => Z(a, u, o.anchors, o.offsets, s),
181
- [a, u, o, s]
182
- );
183
- v(() => {
184
- const e = o.anchors;
185
- e.left > e.right && console.warn(
186
- `[ScreenTransform] inverted X axis: anchors.left (${e.left}) > anchors.right (${e.right})`
187
- ), e.bottom > e.top && console.warn(
188
- `[ScreenTransform] inverted Y axis: anchors.bottom (${e.bottom}) > anchors.top (${e.top})`
189
- ), t.width <= 0 && console.warn(
190
- `[ScreenTransform] zero or negative width (${t.width.toFixed(3)}) — anchors + offsets collapse the X extent`
191
- ), t.height <= 0 && console.warn(
192
- `[ScreenTransform] zero or negative height (${t.height.toFixed(3)}) — anchors + offsets collapse the Y extent`
193
- );
194
- }, [o, t.width, t.height]);
195
- const l = s[0] !== 0 || s[1] !== 0, h = l ? [1, 1, 1] : [t.width, t.height, 1], c = !l && t.width > 0 && t.height > 0 ? t.width / t.height : null;
196
- return /* @__PURE__ */ p(
197
- "group",
198
- {
199
- position: [t.centerX - t.pivotX, t.centerY - t.pivotY, 0],
200
- scale: h,
201
- renderOrder: L.SCREEN_UI,
202
- children: /* @__PURE__ */ p(q.Provider, { value: c, children: i })
203
- }
204
- );
205
- }, ee = A(null), te = A(null), de = () => _(ee), fe = () => _(te);
206
- export {
207
- he as S,
208
- le as X,
209
- ee as a,
210
- te as b,
211
- Z as c,
212
- fe as d,
213
- de as u
214
- };
@@ -1,6 +0,0 @@
1
- import { FaceWarp3DSettings } from '../../components/FaceWarp3D';
2
- export type FaceWarp3DSettingsPanelProps = {
3
- value: FaceWarp3DSettings;
4
- onChange: (next: FaceWarp3DSettings) => void;
5
- };
6
- export declare const FaceWarp3DSettingsPanel: ({ value, onChange }: FaceWarp3DSettingsPanelProps) => null;
@@ -1 +0,0 @@
1
- "use strict";const a=t=>typeof t=="number"&&Number.isFinite(t)&&t>0?t:0,X=t=>{const i=t;return{width:a(i.videoWidth)||a(i.naturalWidth)||a(i.width),height:a(i.videoHeight)||a(i.naturalHeight)||a(i.height)}},f=(t,i)=>Math.min(1-i,Math.max(0,t)),x=(t,i,h,d=0)=>{if(!Number.isFinite(t.minX)||!Number.isFinite(t.minY)||!Number.isFinite(t.maxX)||!Number.isFinite(t.maxY)||!a(i.width)||!a(i.height)||!a(h.width)||!a(h.height))return null;const g=t.maxX-t.minX,n=t.maxY-t.minY;if(g<=0||n<=0)return null;const r=Number.isFinite(d)?Math.max(0,d):0,c=(t.minX+t.maxX)/2,o=(t.minY+t.maxY)/2;let e=Math.min(1,g*(1+r*2)),m=Math.min(1,n*(1+r*2));const s=h.width/h.height/(i.width/i.height);e/m<s?e=Math.min(1,m*s):m=Math.min(1,e/s),e/m<s?m=e/s:e/m>s&&(e=m*s);const w=f(c-e/2,e),l=f(o-m/2,m);return{minX:w,minY:l,maxX:w+e,maxY:l+m}},Y=({source:t,bounds:i,canvas:h,outputSize:d,padding:g})=>{const n=X(t),r=x(i,n,d,g),c=Math.round(d.width),o=Math.round(d.height);if(!r||!n.width||!n.height||c<=0||o<=0)return!1;h.width!==c&&(h.width=c),h.height!==o&&(h.height=o);const e=h.getContext("2d");return e?(e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,c,o),e.drawImage(t,r.minX*n.width,r.minY*n.height,(r.maxX-r.minX)*n.width,(r.maxY-r.minY)*n.height,0,0,c,o),!0):!1};exports.drawNormalizedCrop=Y;exports.resolveNormalizedCrop=x;
@@ -1,44 +0,0 @@
1
- const a = (t) => typeof t == "number" && Number.isFinite(t) && t > 0 ? t : 0, x = (t) => {
2
- const i = t;
3
- return {
4
- width: a(i.videoWidth) || a(i.naturalWidth) || a(i.width),
5
- height: a(i.videoHeight) || a(i.naturalHeight) || a(i.height)
6
- };
7
- }, l = (t, i) => Math.min(1 - i, Math.max(0, t)), X = (t, i, h, d = 0) => {
8
- if (!Number.isFinite(t.minX) || !Number.isFinite(t.minY) || !Number.isFinite(t.maxX) || !Number.isFinite(t.maxY) || !a(i.width) || !a(i.height) || !a(h.width) || !a(h.height))
9
- return null;
10
- const o = t.maxX - t.minX, n = t.maxY - t.minY;
11
- if (o <= 0 || n <= 0) return null;
12
- const r = Number.isFinite(d) ? Math.max(0, d) : 0, c = (t.minX + t.maxX) / 2, g = (t.minY + t.maxY) / 2;
13
- let e = Math.min(1, o * (1 + r * 2)), m = Math.min(1, n * (1 + r * 2));
14
- const s = h.width / h.height / (i.width / i.height);
15
- e / m < s ? e = Math.min(1, m * s) : m = Math.min(1, e / s), e / m < s ? m = e / s : e / m > s && (e = m * s);
16
- const w = l(c - e / 2, e), f = l(g - m / 2, m);
17
- return { minX: w, minY: f, maxX: w + e, maxY: f + m };
18
- }, Y = ({
19
- source: t,
20
- bounds: i,
21
- canvas: h,
22
- outputSize: d,
23
- padding: o
24
- }) => {
25
- const n = x(t), r = X(i, n, d, o), c = Math.round(d.width), g = Math.round(d.height);
26
- if (!r || !n.width || !n.height || c <= 0 || g <= 0) return !1;
27
- h.width !== c && (h.width = c), h.height !== g && (h.height = g);
28
- const e = h.getContext("2d");
29
- return e ? (e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, c, g), e.drawImage(
30
- t,
31
- r.minX * n.width,
32
- r.minY * n.height,
33
- (r.maxX - r.minX) * n.width,
34
- (r.maxY - r.minY) * n.height,
35
- 0,
36
- 0,
37
- c,
38
- g
39
- ), !0) : !1;
40
- };
41
- export {
42
- Y as d,
43
- X as r
44
- };
@@ -1 +0,0 @@
1
- "use strict";const x=require("react"),b=require("./index-82aENaRq.cjs"),E=(e,t={minX:0,minY:0,maxX:0,maxY:0,width:0,height:0,centerX:0,centerY:0})=>{if(e.length===0)return t.minX=0,t.minY=0,t.maxX=0,t.maxY=0,t.width=0,t.height=0,t.centerX=0,t.centerY=0,t;let n=1,s=1,i=0,o=0;for(let l=0;l<e.length;l++){const{x:a,y:r}=e[l];a<n&&(n=a),r<s&&(s=r),a>i&&(i=a),r>o&&(o=r)}const c=Math.max(0,i-n),u=Math.max(0,o-s);return t.minX=n,t.minY=s,t.maxX=i,t.maxY=o,t.width=c,t.height=u,t.centerX=n+c*.5,t.centerY=s+u*.5,t},_=(e,t)=>e.map(n=>({landmarks:n,bounds:E(n)})),C={publishedCount:0,lastPublishAt:-1/0,lastNonEmptyAt:-1},I=(e,t,n,s,i)=>{if(t>0){const o={...e,lastNonEmptyAt:n};return n-e.lastPublishAt>=s?{action:"publish",state:{publishedCount:t,lastPublishAt:n,lastNonEmptyAt:n}}:{action:"none",state:o}}return e.publishedCount===0?{action:"none",state:e}:e.lastNonEmptyAt>=0&&n-e.lastNonEmptyAt<i?{action:"none",state:e}:{action:"clear",state:{publishedCount:0,lastPublishAt:-1/0,lastNonEmptyAt:e.lastNonEmptyAt}}},L=({enabled:e,holdMs:t,node:n,onFrame:s,prepare:i,throttleMs:o})=>{const[c,u]=x.useState([]);return x.useEffect(()=>{if(!e||!n){u(h=>h.length===0?h:[]);return}let l=0,a,r=C;const d=(h,m,f)=>{const{action:A,state:S}=I(r,h,m,o,t);r=S,A==="publish"?u(f):A==="clear"&&u(y=>y.length===0?y:[])},F=()=>{l=requestAnimationFrame(F),s==null||s();const h=performance.now(),m=n.getDetectionResults();if(!m){d(0,h,[]),a=m;return}if(m===a)return;a=m;const f=i(m);d(f.length,h,f)};return l=requestAnimationFrame(F),()=>cancelAnimationFrame(l)},[e,t,n,s,i,o]),c},R=.5,P=(e,t)=>{for(const n in t)delete t[n];if(e)for(const n of e)t[n.categoryName]=n.score;return t},X=(e,t)=>e.blendshapes[t]??0,T=(e,t,n=R)=>X(e,t)>=n,Y=e=>{const t=e[b.FACE_EYE_DISTANCE_LANDMARKS.left],n=e[b.FACE_EYE_DISTANCE_LANDMARKS.right];return!t||!n?0:Math.hypot(t.x-n.x,t.y-n.y)},D=()=>({index:0,landmarks:[],bounds:{minX:0,minY:0,maxX:0,maxY:0,width:0,height:0,centerX:0,centerY:0},pose:{position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:0,y:0,z:0}},eyeDistance:0,blendshapes:{}}),p=(e,t)=>{t.x=e.x,t.y=e.y,t.z=e.z},N=(e,t,n=0,s)=>{var u,l,a;const i=(u=t.faceLandmarks)==null?void 0:u[n],o=e.getFace(n);if(!i||!o)return null;const c=s??D();return c.index=n,c.landmarks=i,E(i,c.bounds),p(o.transform.position,c.pose.position),p(o.transform.rotation,c.pose.rotation),p(o.transform.scale,c.pose.scale),c.eyeDistance=Y(i),P((a=(l=t.faceBlendshapes)==null?void 0:l[n])==null?void 0:a.categories,c.blendshapes),c},B=(e,t=0,n)=>{const s=e.getDetectionResults();return s?N(e,s,t,n):null};exports.DEFAULT_FACE_EXPRESSION_THRESHOLD=R;exports.computeLandmarkBounds=E;exports.createFaceInfoTarget=D;exports.getFaceBlendshape=X;exports.getFaceEyeDistance=Y;exports.getFaceInfo=B;exports.getFaceInfoFromResults=N;exports.hasFaceExpression=T;exports.prepareCalibrationFaceResults=_;exports.useFaceResultReader=L;
@@ -1,118 +0,0 @@
1
- import { useState as X, useEffect as Y } from "react";
2
- import { F as A } from "./index-BgQAX8rs.js";
3
- const E = (e, t = {
4
- minX: 0,
5
- minY: 0,
6
- maxX: 0,
7
- maxY: 0,
8
- width: 0,
9
- height: 0,
10
- centerX: 0,
11
- centerY: 0
12
- }) => {
13
- if (e.length === 0)
14
- return t.minX = 0, t.minY = 0, t.maxX = 0, t.maxY = 0, t.width = 0, t.height = 0, t.centerX = 0, t.centerY = 0, t;
15
- let n = 1, s = 1, i = 0, o = 0;
16
- for (let l = 0; l < e.length; l++) {
17
- const { x: c, y: r } = e[l];
18
- c < n && (n = c), r < s && (s = r), c > i && (i = c), r > o && (o = r);
19
- }
20
- const a = Math.max(0, i - n), u = Math.max(0, o - s);
21
- return t.minX = n, t.minY = s, t.maxX = i, t.maxY = o, t.width = a, t.height = u, t.centerX = n + a * 0.5, t.centerY = s + u * 0.5, t;
22
- }, L = (e, t) => e.map((n) => ({
23
- landmarks: n,
24
- bounds: E(n)
25
- })), D = {
26
- publishedCount: 0,
27
- // -Infinity, not 0: the first non-empty frame must publish regardless of its
28
- // timestamp (a frame at now=0 would otherwise be throttled against 0).
29
- lastPublishAt: -1 / 0,
30
- lastNonEmptyAt: -1
31
- }, N = (e, t, n, s, i) => {
32
- if (t > 0) {
33
- const o = { ...e, lastNonEmptyAt: n };
34
- return n - e.lastPublishAt >= s ? {
35
- action: "publish",
36
- state: { publishedCount: t, lastPublishAt: n, lastNonEmptyAt: n }
37
- } : { action: "none", state: o };
38
- }
39
- return e.publishedCount === 0 ? { action: "none", state: e } : e.lastNonEmptyAt >= 0 && n - e.lastNonEmptyAt < i ? { action: "none", state: e } : {
40
- action: "clear",
41
- // Reset the throttle anchor so the next reacquired face publishes at once.
42
- state: { publishedCount: 0, lastPublishAt: -1 / 0, lastNonEmptyAt: e.lastNonEmptyAt }
43
- };
44
- }, B = ({
45
- enabled: e,
46
- holdMs: t,
47
- node: n,
48
- onFrame: s,
49
- prepare: i,
50
- throttleMs: o
51
- }) => {
52
- const [a, u] = X([]);
53
- return Y(() => {
54
- if (!e || !n) {
55
- u((h) => h.length === 0 ? h : []);
56
- return;
57
- }
58
- let l = 0, c, r = D;
59
- const d = (h, m, f) => {
60
- const { action: x, state: F } = N(r, h, m, o, t);
61
- r = F, x === "publish" ? u(f) : x === "clear" && u((b) => b.length === 0 ? b : []);
62
- }, y = () => {
63
- l = requestAnimationFrame(y), s == null || s();
64
- const h = performance.now(), m = n.getDetectionResults();
65
- if (!m) {
66
- d(0, h, []), c = m;
67
- return;
68
- }
69
- if (m === c) return;
70
- c = m;
71
- const f = i(m);
72
- d(f.length, h, f);
73
- };
74
- return l = requestAnimationFrame(y), () => cancelAnimationFrame(l);
75
- }, [e, t, n, s, i, o]), a;
76
- }, R = 0.5, S = (e, t) => {
77
- for (const n in t) delete t[n];
78
- if (e)
79
- for (const n of e) t[n.categoryName] = n.score;
80
- return t;
81
- }, C = (e, t) => e.blendshapes[t] ?? 0, T = (e, t, n = R) => C(e, t) >= n, P = (e) => {
82
- const t = e[A.left], n = e[A.right];
83
- return !t || !n ? 0 : Math.hypot(t.x - n.x, t.y - n.y);
84
- }, _ = () => ({
85
- index: 0,
86
- landmarks: [],
87
- bounds: { minX: 0, minY: 0, maxX: 0, maxY: 0, width: 0, height: 0, centerX: 0, centerY: 0 },
88
- pose: {
89
- position: { x: 0, y: 0, z: 0 },
90
- rotation: { x: 0, y: 0, z: 0 },
91
- scale: { x: 0, y: 0, z: 0 }
92
- },
93
- eyeDistance: 0,
94
- blendshapes: {}
95
- }), p = (e, t) => {
96
- t.x = e.x, t.y = e.y, t.z = e.z;
97
- }, w = (e, t, n = 0, s) => {
98
- var u, l, c;
99
- const i = (u = t.faceLandmarks) == null ? void 0 : u[n], o = e.getFace(n);
100
- if (!i || !o) return null;
101
- const a = s ?? _();
102
- return a.index = n, a.landmarks = i, E(i, a.bounds), p(o.transform.position, a.pose.position), p(o.transform.rotation, a.pose.rotation), p(o.transform.scale, a.pose.scale), a.eyeDistance = P(i), S((c = (l = t.faceBlendshapes) == null ? void 0 : l[n]) == null ? void 0 : c.categories, a.blendshapes), a;
103
- }, q = (e, t = 0, n) => {
104
- const s = e.getDetectionResults();
105
- return s ? w(e, s, t, n) : null;
106
- };
107
- export {
108
- R as D,
109
- C as a,
110
- P as b,
111
- E as c,
112
- _ as d,
113
- q as e,
114
- w as g,
115
- T as h,
116
- L as p,
117
- B as u
118
- };
@@ -1 +0,0 @@
1
- "use strict";const _=require("react/jsx-runtime"),v=require("@react-three/fiber"),s=require("react"),S=require("./index-D4bLzBr6.cjs"),X=require("./renderLayers-lDtL0_43.cjs"),V=require("three");function Y(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const b=Y(V);function N(e,t,n=!0){const{session:r}=S.useXRContext(),o=s.useId(),[u,d]=s.useState(null),l=s.useMemo(()=>JSON.stringify(t??{}),[t]);s.useEffect(()=>{let f=!1;return d(null),r.registry.acquire(e,o,t).catch(i=>{f||d(i instanceof Error?i:new Error(String(i)))}),()=>{f=!0,r.registry.release(e,o)}},[r,e,o,t,l]),s.useEffect(()=>{r.registry.setActive(e,o,n)},[r,e,o,n]);const c=r.store,h=s.useSyncExternalStore(f=>c.subscribe(f),()=>c.getSnapshot().pipeline.get(e)??null,()=>null),p=s.useMemo(()=>h?h.getModelNode():null,[h]);return{ready:h!==null&&u===null,node:p,error:u}}const U=({materialProps:e,settings:t})=>t.type==="basic"?_.jsx("meshBasicMaterial",{...e}):_.jsx("meshStandardMaterial",{...e,roughness:t.roughness,metalness:t.metalness}),j=1e-6,Z=e=>{const{x:t,y:n,z:r}=e.scale;return Math.abs(t-n)<=j&&Math.abs(t-r)<=j?t:1},B=(e,t,n,r)=>{if(!n.enabled)return e;const o=Z(n);return r.x=t.x+(e.x-t.x)*o+n.position.x,r.y=t.y+(e.y-t.y)*o-n.position.y,r.z=t.z+(e.z-t.z)*o+n.position.z,r},W=(e,t,n)=>S.unprojectToZZeroInto(e,t,n),G=(e,t,n)=>{const r=(e.x-.5)*2,o=(.5-e.y)*2,u=b.MathUtils.clamp(e.z*2,-1,1);return n.set(r,o,u).unproject(t)},J=(e,t,n,r,o,u)=>{const d=Math.min(t,e.length);for(let l=0;l<d;l++){o(e[l],r,u);const c=l*3;n[c]=u.x,n[c+1]=u.y,n[c+2]=u.z}return d},Q=[[127,34,139],[11,0,37],[232,231,120],[72,37,39],[128,121,47],[232,121,128],[104,69,67],[175,171,148],[118,50,101],[73,39,40],[9,151,108],[48,115,131],[194,204,211],[74,40,185],[80,42,183],[40,92,186],[230,229,118],[202,212,214],[83,18,17],[76,61,146],[160,29,30],[56,157,173],[106,204,194],[135,214,192],[203,165,98],[21,71,68],[51,45,4],[144,24,23],[77,146,91],[205,50,187],[201,200,18],[91,106,182],[90,91,181],[85,84,17],[206,203,36],[148,171,140],[92,40,39],[193,189,244],[159,158,28],[247,246,161],[236,3,196],[54,68,104],[193,168,8],[117,228,31],[189,193,55],[98,97,99],[126,47,100],[166,79,218],[155,154,26],[209,49,131],[135,136,150],[47,126,217],[223,52,53],[45,51,134],[211,170,140],[67,69,108],[43,106,91],[230,119,120],[226,130,247],[63,53,52],[238,20,242],[46,70,156],[78,62,96],[46,53,63],[143,34,227],[123,117,111],[44,125,19],[236,134,51],[216,206,205],[154,153,22],[39,37,167],[200,201,208],[36,142,100],[57,212,202],[20,60,99],[28,158,157],[35,226,113],[160,159,27],[204,202,210],[113,225,46],[43,202,204],[62,76,77],[137,123,116],[41,38,72],[203,129,142],[64,98,240],[49,102,64],[41,73,74],[212,216,207],[42,74,184],[169,170,211],[170,149,176],[105,66,69],[122,6,168],[123,147,187],[96,77,90],[65,55,107],[89,90,180],[101,100,120],[63,105,104],[93,137,227],[15,86,85],[129,102,49],[14,87,86],[55,8,9],[100,47,121],[145,23,22],[88,89,179],[6,122,196],[88,95,96],[138,172,136],[215,58,172],[115,48,219],[42,80,81],[195,3,51],[43,146,61],[171,175,199],[81,82,38],[53,46,225],[144,163,110],[52,65,66],[229,228,117],[34,127,234],[107,108,69],[109,108,151],[48,64,235],[62,78,191],[129,209,126],[111,35,143],[117,123,50],[222,65,52],[19,125,141],[221,55,65],[3,195,197],[25,7,33],[220,237,44],[70,71,139],[122,193,245],[247,130,33],[71,21,162],[170,169,150],[188,174,196],[216,186,92],[2,97,167],[141,125,241],[164,167,37],[72,38,12],[38,82,13],[63,68,71],[226,35,111],[101,50,205],[206,92,165],[209,198,217],[165,167,97],[220,115,218],[133,112,243],[239,238,241],[214,135,169],[190,173,133],[171,208,32],[125,44,237],[86,87,178],[85,86,179],[84,85,180],[83,84,181],[201,83,182],[137,93,132],[76,62,183],[61,76,184],[57,61,185],[212,57,186],[214,207,187],[34,143,156],[79,239,237],[123,137,177],[44,1,4],[201,194,32],[64,102,129],[213,215,138],[59,166,219],[242,99,97],[2,94,141],[75,59,235],[24,110,228],[25,130,226],[23,24,229],[22,23,230],[26,22,231],[112,26,232],[189,190,243],[221,56,190],[28,56,221],[27,28,222],[29,27,223],[30,29,224],[247,30,225],[238,79,20],[166,59,75],[60,75,240],[147,177,215],[20,79,166],[187,147,213],[112,233,244],[233,128,245],[128,114,188],[114,217,174],[131,115,220],[217,198,236],[198,131,134],[177,132,58],[143,35,124],[110,163,7],[228,110,25],[356,389,368],[11,302,267],[452,350,349],[302,303,269],[357,343,277],[452,453,357],[333,332,297],[175,152,377],[347,348,330],[303,304,270],[9,336,337],[278,279,360],[418,262,431],[304,408,409],[310,415,407],[270,409,410],[450,348,347],[422,430,434],[313,314,17],[306,307,375],[387,388,260],[286,414,398],[335,406,418],[364,367,416],[423,358,327],[251,284,298],[281,5,4],[373,374,253],[307,320,321],[425,427,411],[421,313,18],[321,405,406],[320,404,405],[315,16,17],[426,425,266],[377,400,369],[322,391,269],[417,465,464],[386,257,258],[466,260,388],[456,399,419],[284,332,333],[417,285,8],[346,340,261],[413,441,285],[327,460,328],[355,371,329],[392,439,438],[382,341,256],[429,420,360],[364,394,379],[277,343,437],[443,444,283],[275,440,363],[431,262,369],[297,338,337],[273,375,321],[450,451,349],[446,342,467],[293,334,282],[458,461,462],[276,353,383],[308,324,325],[276,300,293],[372,345,447],[352,345,340],[274,1,19],[456,248,281],[436,427,425],[381,256,252],[269,391,393],[200,199,428],[266,330,329],[287,273,422],[250,462,328],[258,286,384],[265,353,342],[387,259,257],[424,431,430],[342,353,276],[273,335,424],[292,325,307],[366,447,345],[271,303,302],[423,266,371],[294,455,460],[279,278,294],[271,272,304],[432,434,427],[272,407,408],[394,430,431],[395,369,400],[334,333,299],[351,417,168],[352,280,411],[325,319,320],[295,296,336],[319,403,404],[330,348,349],[293,298,333],[323,454,447],[15,16,315],[358,429,279],[14,15,316],[285,336,9],[329,349,350],[374,380,252],[318,402,403],[6,197,419],[318,319,325],[367,364,365],[435,367,397],[344,438,439],[272,271,311],[195,5,281],[273,287,291],[396,428,199],[311,271,268],[283,444,445],[373,254,339],[282,334,296],[449,347,346],[264,447,454],[336,296,299],[338,10,151],[278,439,455],[292,407,415],[358,371,355],[340,345,372],[346,347,280],[442,443,282],[19,94,370],[441,442,295],[248,419,197],[263,255,359],[440,275,274],[300,383,368],[351,412,465],[263,467,466],[301,368,389],[395,378,379],[412,351,419],[436,426,322],[2,164,393],[370,462,461],[164,0,267],[302,11,12],[268,12,13],[293,300,301],[446,261,340],[330,266,425],[426,423,391],[429,355,437],[391,327,326],[440,457,438],[341,382,362],[459,457,461],[434,430,394],[414,463,362],[396,369,262],[354,461,457],[316,403,402],[315,404,403],[314,405,404],[313,406,405],[421,418,406],[366,401,361],[306,408,407],[291,409,408],[287,410,409],[432,436,410],[434,416,411],[264,368,383],[309,438,457],[352,376,401],[274,275,4],[421,428,262],[294,327,358],[433,416,367],[289,455,439],[462,370,326],[2,326,370],[305,460,455],[254,449,448],[255,261,446],[253,450,449],[252,451,450],[256,452,451],[341,453,452],[413,464,463],[441,413,414],[258,442,441],[257,443,442],[259,444,443],[260,445,444],[467,342,445],[459,458,250],[289,392,290],[290,328,460],[376,433,435],[250,290,392],[411,416,433],[341,463,464],[453,464,465],[357,465,412],[343,412,399],[360,363,440],[437,399,456],[420,456,363],[401,435,288],[372,383,353],[339,255,249],[448,261,255],[133,243,190],[133,155,112],[33,246,247],[33,130,25],[398,384,286],[362,398,414],[362,463,341],[263,359,467],[263,249,255],[466,467,260],[75,60,166],[238,239,79],[162,127,139],[72,11,37],[121,232,120],[73,72,39],[114,128,47],[233,232,128],[103,104,67],[152,175,148],[119,118,101],[74,73,40],[107,9,108],[49,48,131],[32,194,211],[184,74,185],[191,80,183],[185,40,186],[119,230,118],[210,202,214],[84,83,17],[77,76,146],[161,160,30],[190,56,173],[182,106,194],[138,135,192],[129,203,98],[54,21,68],[5,51,4],[145,144,23],[90,77,91],[207,205,187],[83,201,18],[181,91,182],[180,90,181],[16,85,17],[205,206,36],[176,148,140],[165,92,39],[245,193,244],[27,159,28],[30,247,161],[174,236,196],[103,54,104],[55,193,8],[111,117,31],[221,189,55],[240,98,99],[142,126,100],[219,166,218],[112,155,26],[198,209,131],[169,135,150],[114,47,217],[224,223,53],[220,45,134],[32,211,140],[109,67,108],[146,43,91],[231,230,120],[113,226,247],[105,63,52],[241,238,242],[124,46,156],[95,78,96],[70,46,63],[116,143,227],[116,123,111],[1,44,19],[3,236,51],[207,216,205],[26,154,22],[165,39,167],[199,200,208],[101,36,100],[43,57,202],[242,20,99],[56,28,157],[124,35,113],[29,160,27],[211,204,210],[124,113,46],[106,43,204],[96,62,77],[227,137,116],[73,41,72],[36,203,142],[235,64,240],[48,49,64],[42,41,74],[214,212,207],[183,42,184],[210,169,211],[140,170,176],[104,105,69],[193,122,168],[50,123,187],[89,96,90],[66,65,107],[179,89,180],[119,101,120],[68,63,104],[234,93,227],[16,15,85],[209,129,49],[15,14,86],[107,55,9],[120,100,121],[153,145,22],[178,88,179],[197,6,196],[89,88,96],[135,138,136],[138,215,172],[218,115,219],[41,42,81],[5,195,51],[57,43,61],[208,171,199],[41,81,38],[224,53,225],[24,144,110],[105,52,66],[118,229,117],[227,34,234],[66,107,69],[10,109,151],[219,48,235],[183,62,191],[142,129,126],[116,111,143],[118,117,50],[223,222,52],[94,19,141],[222,221,65],[196,3,197],[45,220,44],[156,70,139],[188,122,245],[139,71,162],[149,170,150],[122,188,196],[206,216,92],[164,2,167],[242,141,241],[0,164,37],[11,72,12],[12,38,13],[70,63,71],[31,226,111],[36,101,205],[203,206,165],[126,209,217],[98,165,97],[237,220,218],[237,239,241],[210,214,169],[140,171,32],[241,125,237],[179,86,178],[180,85,179],[181,84,180],[182,83,181],[194,201,182],[177,137,132],[184,76,183],[185,61,184],[186,57,185],[216,212,186],[192,214,187],[139,34,156],[218,79,237],[147,123,177],[45,44,4],[208,201,32],[98,64,129],[192,213,138],[235,59,219],[141,242,97],[97,2,141],[240,75,235],[229,24,228],[31,25,226],[230,23,229],[231,22,230],[232,26,231],[233,112,232],[244,189,243],[189,221,190],[222,28,221],[223,27,222],[224,29,223],[225,30,224],[113,247,225],[99,60,240],[213,147,215],[60,20,166],[192,187,213],[243,112,244],[244,233,245],[245,128,188],[188,114,174],[134,131,220],[174,217,236],[236,198,134],[215,177,58],[156,143,124],[25,110,7],[31,228,25],[264,356,368],[0,11,267],[451,452,349],[267,302,269],[350,357,277],[350,452,357],[299,333,297],[396,175,377],[280,347,330],[269,303,270],[151,9,337],[344,278,360],[424,418,431],[270,304,409],[272,310,407],[322,270,410],[449,450,347],[432,422,434],[18,313,17],[291,306,375],[259,387,260],[424,335,418],[434,364,416],[391,423,327],[301,251,298],[275,281,4],[254,373,253],[375,307,321],[280,425,411],[200,421,18],[335,321,406],[321,320,405],[314,315,17],[423,426,266],[396,377,369],[270,322,269],[413,417,464],[385,386,258],[248,456,419],[298,284,333],[168,417,8],[448,346,261],[417,413,285],[326,327,328],[277,355,329],[309,392,438],[381,382,256],[279,429,360],[365,364,379],[355,277,437],[282,443,283],[281,275,363],[395,431,369],[299,297,337],[335,273,321],[348,450,349],[359,446,467],[283,293,282],[250,458,462],[300,276,383],[292,308,325],[283,276,293],[264,372,447],[346,352,340],[354,274,19],[363,456,281],[426,436,425],[380,381,252],[267,269,393],[421,200,428],[371,266,329],[432,287,422],[290,250,328],[385,258,384],[446,265,342],[386,387,257],[422,424,430],[445,342,276],[422,273,424],[306,292,307],[352,366,345],[268,271,302],[358,423,371],[327,294,460],[331,279,294],[303,271,304],[436,432,427],[304,272,408],[395,394,431],[378,395,400],[296,334,299],[6,351,168],[376,352,411],[307,325,320],[285,295,336],[320,319,404],[329,330,349],[334,293,333],[366,323,447],[316,15,315],[331,358,279],[317,14,316],[8,285,9],[277,329,350],[253,374,252],[319,318,403],[351,6,419],[324,318,325],[397,367,365],[288,435,397],[278,344,439],[310,272,311],[248,195,281],[375,273,291],[175,396,199],[312,311,268],[276,283,445],[390,373,339],[295,282,296],[448,449,346],[356,264,454],[337,336,299],[337,338,151],[294,278,455],[308,292,415],[429,358,355],[265,340,372],[352,346,280],[295,442,282],[354,19,370],[285,441,295],[195,248,197],[457,440,274],[301,300,368],[417,351,465],[251,301,389],[394,395,379],[399,412,419],[410,436,322],[326,2,393],[354,370,461],[393,164,267],[268,302,12],[312,268,13],[298,293,301],[265,446,340],[280,330,425],[322,426,391],[420,429,437],[393,391,326],[344,440,438],[458,459,461],[364,434,394],[428,396,262],[274,354,457],[317,316,402],[316,315,403],[315,314,404],[314,313,405],[313,421,406],[323,366,361],[292,306,407],[306,291,408],[291,287,409],[287,432,410],[427,434,411],[372,264,383],[459,309,457],[366,352,401],[1,274,4],[418,421,262],[331,294,358],[435,433,367],[392,289,439],[328,462,326],[94,2,370],[289,305,455],[339,254,448],[359,255,446],[254,253,449],[253,252,450],[252,256,451],[256,341,452],[414,413,463],[286,441,414],[286,258,441],[258,257,442],[257,259,443],[259,260,444],[260,467,445],[309,459,250],[305,289,290],[305,290,460],[401,376,435],[309,250,392],[376,411,433],[453,341,464],[357,453,465],[343,357,412],[437,343,399],[344,360,440],[420,437,456],[360,420,363],[361,401,288],[265,372,353],[390,339,249],[339,448,255],[255,339,448]].flat(),$=[.5104879319667817,.33515610277652746,.5174233198165894,.43859300494194037,.5123749554157258,.406469448208809,.5423470318317414,.5244461464881898,.5190713584423066,.46557595014572145,.5194876372814179,.5006013351678849,.5178673148155213,.5855525898933411,.7009655416011811,.5918984371423721,.5193980515003205,.6528422343730926,.520683366060257,.689273599088192,.5248700261116028,.8232529717683792,.5099657952785492,.32301718473434454,.5088536620140076,.31080526888370513,.5081197202205658,.3013389307260514,.5072353065013886,.29900476515293123,.5073091566562653,.28442813932895666,.5065075337886811,.26649361431598667,.5061309516429902,.24778731942176818,.5031875848770142,.22179436564445493,.515326726436615,.4231037962436676,.5375777959823609,.4205444622039795,.8049442350864411,.6867966356873512,.6222659975290299,.570705144405365,.6496635556221009,.567776631116867,.6773027807474137,.5670208501815797,.7126377105712891,.5800703662633897,.5999099642038346,.5764724123477936,.674340370297432,.6495546865463258,.639536875486374,.6477413746714593,.703840109705925,.642201315164566,.7209078550338746,.6294069054722786,.7342745542526246,.5601695317029953,.6015644401311875,.18118685364723203,.7114282578229905,.598883952498436,.809715884923935,.5682615923881531,.7667155593633652,.5767241555452347,.6445030301809311,.45154162526130676,.541424173116684,.34213731765747074,.5359058856964112,.3113374251127243,.5710002213716507,.33134433805942537,.5891562283039093,.31890978991985325,.5585465461015702,.3096196609735489,.5759132236242295,.30601608335971836,.6229794204235077,.2713706839084626,.5398103773593903,.43802148282527925,.545369166135788,.46441581428051,.7616913348436356,.6473416510224344,.5914883643388749,.5243312466144563,.5945767045021058,.44076132655143746,.5964909076690674,.4544808346033096,.7225886166095734,.4498931097984314,.5443432211875916,.49703910827636727,.7029067009687424,.6777765545248986,.7391736537218094,.6677046212553979,.7836920201778412,.7359224516153335,.577455359697342,.6573990839719772,.6085408657789231,.6353888112306596,.6427326381206513,.298196165561676,.7550604224205018,.30743678390979773,.5732827365398407,.4262381809949875,.5523188143968583,.417594336271286,.6096987754106522,.29745593249797825,.6036115020513535,.2985246556997299,.7549919366836548,.6845966669917107,.592850747704506,.4273046988248826,.6501948565244675,.6762702855467797,.6582381755113602,.699515787065029,.682483646273613,.802994977235794,.768890205025673,.710366437137127,.6672395795583725,.752104974091053,.7775519520044327,.6584857258200645,.7920276552438736,.6709628927707671,.5397542297840119,.3256357330083847,.5643998861312867,.3199443298578262,.5826229482889176,.313130943775177,.5657853364944458,.42035281538963326,.606510478258133,.2980171996355057,.5952901721000672,.2918463486433029,.5999826073646546,.29865378022193906,.565356719493866,.4374908703565598,.570739108324051,.30172707617282873,.5532697021961213,.303354971408844,.532040822505951,.3026815611124039,.5385064661502839,.22311560392379765,.5377482950687409,.25083183526992797,.5373399734497071,.26933391273021695,.5351483404636384,.28629542768001554,.5317461371421814,.3004490631818772,.5704152762889863,.30009212374687194,.5761924862861634,.2931597578525544,.5817892730236054,.28451425909996036,.5862761169672013,.27445026516914367,.6169582635164261,.3500816184282303,.7930811375379563,.4456584650278092,.5136566936969758,.41420710563659674,.5836256474256516,.29897587478160864,.5893380820751191,.29504160165786747,.5458188831806183,.4063113230466843,.581692311167717,.41034119904041294,.5490593492984772,.4114610868692398,.6189475685358048,.5063568043708802,.6631498366594315,.48547921061515814,.5990702986717225,.44076220870018007,.7452016949653626,.7754116746783257,.729542288184166,.7380649703741073,.7152380675077439,.6996659177541733,.6012845069169999,.2532631474733353,.5908916622400284,.6924743655323982,.6002487272024155,.7558749470114707,.611236396431923,.817432113289833,.6991332352161408,.5705236423015594,.7608276635408402,.5389788854122162,.5859951555728913,.5837152945995332,.7452233761548996,.6138822454214097,.5740126550197602,.542653586268425,.5829357832670212,.45267452478408815,.7883433729410172,.5171645599603654,.7431249052286149,.5203535276651383,.7091684520244599,.5116798001527787,.6566549122333527,.5192352938652038,.6176983743906022,.532645167708397,.590181502699852,.5458893078565599,.5431278228759766,.5780327129364013,.7785866141319275,.4588600414991379,.7662802815437317,.614813904762268,.528258103132248,.42353384375572206,.5884005159139634,.49679056286811835,.8132390558719635,.5690749335289003,.5698921114206315,.5609081107378007,.5997681200504303,.4383326607942582,.7258545190095902,.5959577548503876,.5829301953315735,.4692867088317872,.7767194837331772,.37870833754539496,.5859857678413392,.5927838939428329,.5655010223388672,.4863545227050781,.7103684276342392,.24216726005077366,.7039464592933655,.21081999421119696,.7955554753541947,.45157338261604313,.7394011497497559,.27975760281085965,.8023439675569535,.6235768947005271,.6065513819456101,.1520459520816803,.5237656712532044,.4144193726778031,.6113508373498917,.4744607317447663,.7872020035982132,.5706054615974427,.6744208365678788,.5840893256664277,.6509357273578644,.5835042405128479,.599469143152237,.28584001839160916,.76683469414711,.4027401643991471,.5548133134841919,.11242247700691227,.6348527550697327,.15134210765361789,.6676738739013672,.17523885548114776,.5231557369232178,.758142014145851,.49590798020362853,.10746171355247497,.6282390981912613,.5856175380945206,.6072420954704285,.5888098138570785,.592762503027916,.5906054276227952,.7843813925981522,.61877524882555,.610203567147255,.6159668180346489,.6345708996057511,.625477318763733,.6599059730768204,.6266139122843744,.6838259130716324,.6209151762723923,.6978932946920395,.6127474161982536,.8138886868953705,.6332776087522507,.690067994594574,.587394626736641,.5115295231342316,.3814830261468887,.593753132224083,.3682318288087845,.5745513767004014,.43174642801284796,.5468618154525757,.38006519258022314,.5175330221652985,.6183956491947173,.6776301890611649,.20638245522975923,.6439310491085053,.1795444029569626,.5587406486272812,.13319884419441225,.7303948730230332,.25156523168087,.5936179041862488,.6020026791095734,.5595558166503907,.5354639637470247,.49903409481048583,.12705478847026824,.5986292988061905,.12926876127719883,.7810411036014557,.3901792484521866,.5526776045560837,.3004089254140854,.5582781463861466,.2904709684848786,.5625745087862015,.2769930589199066,.5656344175338746,.26021293580532073,.5736826092004776,.23544175803661344,.5897697389125824,.3026730704307556,.5960018962621689,.3050022739171982,.6013990819454194,.30801084220409397,.6334722220897675,.32613734483718876,.7345953911542893,.3890004771947861,.5586504369974137,.5622388321161271,.5686756849288941,.6147718372941018,.5835970371961594,.6114995065331459,.58382708132267,.30018893957138065,.7323651343584061,.3204736191034317,.5478970587253571,.6144195291399956,.5885591685771943,.20925473153591162,.5188342511653901,.5294416445493699,.5430448532104493,.5502454686164857,.5189176678657532,.5563708889484407,.5749752998352051,.4918947476148606,.5015926539897919,.1563655036687851,.5023517191410065,.19124654710292815,.5467969954013825,.1949619370698929,.6493796885013581,.2596786844730377,.6223085105419159,.4147812741994858,.6219283074140549,.2305004018545151,.6836527764797211,.41583852946758276,.6457133769989014,.38482945740222935,.7015091359615326,.3687519657611847,.5560723870992661,.1615346747636795,.5877480685710907,.4753766226768494,.672212439775467,.23758670270442966,.6372418433427811,.20715841531753537,.6714329898357392,.2934120523929596,.7559577107429505,.3546825754642487,.7028004407882691,.28965476036071774,.7641248583793641,.3323610144853592,.6633666038513184,.34586538851261145,.5732450067996979,.5168171036243439,.5740206122398377,.4420601803064346,.5862565368413926,.4328912365436554,.5658091634511948,.46056721985340127,.5935333251953125,.6414948242902756,.643502163887024,.6581727835536004,.6862205892801285,.6599488797783852,.71900634765625,.6517863023281099,.7387710094451905,.6366994085907935,.7436862468719483,.5870225805044174,.8067718029022217,.5102852332592012,.719052392244339,.549573050737381,.6912373930215836,.5426725524663925,.6540380597114563,.5452089506387712,.6191460520029068,.5529706466197968,.5933077514171601,.5624450343847276,.5760908752679825,.5711276936531067,.8037864595651627,.5079354095458986,.5832139283418656,.42433229863643646,.5602819353342057,.5111040878295898,.5571386992931366,.44193623840808877,.5406022548675538,.42711933732032775,.5550468444824219,.43675835609436037,.5743813246488572,.4152073520421982,.5367868125438691,.42474128484725954,.5321040332317353,.41727378547191624,.5769275009632111,.5919214832782747,.5631695121526719,.5864408034086228,.555830317735672,.5819090950489045,.7057080000638962,.6055842030048371,.7297580271959305,.614007951617241,.49450652599334716,.5258826154470444,.30584611296653746,.6040364730358123,.4885244846343994,.4224347966909409,.188004332780838,.7111089858412742,.3873521864414215,.5786778944730759,.3588928759098053,.5761974024772645,.32972376346588134,.5772378969192504,.29263614416122435,.5937507289648056,.4124107241630554,.5837435233592987,.3437161326408386,.6627882960438729,.3795058310031891,.6574259343743325,.3114838480949402,.657741964161396,.2904722273349762,.6461278694868089,.2668101370334625,.5759735572338105,.3916287899017334,.18396661460399627,.2956514835357666,.6133467811346054,.17441000342369078,.5913206297159195,.23045413494110106,.5952582108974458,.3695909559726715,.4586390632390976,.4777859032154083,.34189285218715665,.4799880862236023,.31095413148403167,.4436598002910614,.32987600147724155,.42009713053703307,.3173161882162094,.4536511182785034,.3079365211725235,.431768137216568,.30468503117561346,.37606616616249083,.27423435926437384,.49449856877326964,.4396295297145844,.4917183697223663,.4654612708091736,.2524005055427551,.6652582022547722,.4289156973361969,.5291139262914657,.4268526315689087,.44427823305130004,.42474048137664794,.45817836105823523,.2809027314186096,.46354105353355407,.49383275508880614,.49885324716567997,.3271153151988983,.6924127805233002,.28349151015281676,.6843035730719567,.22369228601455687,.7584647151827812,.4591939032077789,.6617383736371993,.40913431644439696,.6426751393079757,.35715471506118773,.30240225076675414,.1987894058227539,.3237072455883026,.4482724845409393,.42876928627491,.4697932779788971,.4196605491638184,.39104996919631957,.2959751355648041,.3971476137638092,.29665681600570676,.26748310327529906,.7016683402657509,.4251814365386963,.4304117369651795,.3845069885253906,.6860294970870018,.3804918110370636,.7099798905849457,.35481985211372374,.8164000543951988,.2475942552089691,.730037857890129,.37163846492767333,.7639490339159964,.23443256616592406,.677293357551098,.2116762578487396,.6924480664730073,.4783883273601532,.32515374898910526,.44883744716644286,.3184075164794922,.42566208839416503,.31092865943908693,.45405327081680297,.4228447753190994,.3932682454586029,.2964416819810867,.4071350872516632,.290535255074501,.40034677386283873,.29673135757446295,.4610676050186157,.44076672971248626,.4361940503120422,.3005809444189072,.45694692730903624,.30211268544197084,.4812539994716644,.30183855772018436,.46574126482009887,.22492808878421783,.47153966426849364,.25130698263645174,.4740802526473999,.2694691020250321,.4768980026245117,.28705804526805884,.48090897798538207,.2996276724338532,.43501039147377013,.2992805469036102,.4293511092662811,.2932880002260208,.4233271360397339,.28415390133857726,.41761367321014403,.27479386210441586,.39445154666900634,.3538810330629349,.16652100086212157,.4672100204229355,.4183532476425171,.29779809594154355,.41378535628318786,.29400077641010286,.47695048451423644,.40816306352615356,.43489335775375365,.41207451105117804,.473628032207489,.41300628066062933,.3975309908390045,.5133917200565339,.34924407601356505,.4949547010660172,.4189921498298645,.44448454558849343,.27738903760910033,.7946441161632538,.29866914749145507,.7549788492918015,.3170970857143402,.7143296006321906,.39919986128807067,.2556870716810226,.4517517566680908,.6986333075165749,.44375439286231994,.7623249980807305,.4346091330051422,.8250303360819817,.3058603286743164,.5830274391174317,.235262531042099,.5560186910629272,.4279192566871643,.5892863947153091,.2622906148433685,.6309370476007461,.45053591132164,.5464099961519242,.44443781971931456,.45605955004692084,.20207332372665404,.5370177584886551,.25663607120513915,.5358516681194305,.29581143260002135,.5243526387214661,.3525206625461578,.5284005987644196,.39442025423049926,.5392975616455078,.42579718232154845,.5511161494255066,.49076547026634215,.5801296907663345,.20957841277122496,.47626241028308874,.23929433822631835,.6331100556254388,.5024659812450409,.4247821944952011,.432133811712265,.5009672063589097,.15906893014907836,.5940177994966507,.4492078602313995,.5648097443580629,.41579030752182006,.4419312763214112,.2798506796360016,.6113770532608032,.44294874668121337,.47275686144828805,.1783646523952484,.3979667472839356,.42730753421783446,.5981915760040284,.46777849197387694,.4889896112680436,.26486464142799376,.2499848622083664,.26026474237442015,.21801546096801755,.17761032581329345,.47220298230648045,.23215438723564147,.29172880232334136,.1906857371330261,.6463678139448166,.3811529755592346,.1541750180721283,.5033367156982422,.41569132089614874,.40528597235679625,.4797393995523453,.2049500823020935,.59123428940773,.3344294309616089,.5942869651317597,.35825960636138915,.5929379391670226,.4015964150428772,.28595646202564245,.21618961095809935,.4194869863986969,.43316020369529723,.11274379968643189,.34098224639892577,.1526068884134293,.3026312172412872,.17882644414901733,.3831480026245117,.5945327538251877,.40483357310295104,.5966399866342544,.419615763425827,.5973996269702913,.2160478115081787,.6388220790028571,.40051244497299193,.6220169800519944,.37555851340293883,.6336345481872558,.3499592423439026,.6373451414704323,.32648445963859557,.6342222797870636,.3108482539653778,.6266552078723908,.16784127354621886,.6591027337312698,.3177972316741943,.5982361245155334,.4220952868461609,.3706905978918075,.4483287215232849,.43451813936233524,.4753179132938385,.38104525983333587,.30160035490989684,.21209139108657843,.33879016637802123,.18215490162372588,.4353105306625366,.1335425513982773,.22725783586502074,.2627154815196991,.4187734603881836,.6076370733976364,.471796441078186,.5377814787626267,.3835057199001312,.13003402531147007,.18837626576423644,.4081169712543488,.4558822691440582,.3006539422273636,.45070006251335143,.29020555198192594,.44506027102470397,.276558490395546,.441160249710083,.26132532536983494,.42807196378707885,.237567846775055,.413764613866806,.300301303267479,.40849854350090026,.3033808845281601,.40325652360916137,.3060078132152558,.3719393193721771,.3296157675981522,.2585947096347809,.4027331072092057,.4712364852428436,.5652889716625213,.4525624096393585,.6187475714087487,.43274884223937987,.6166740807890891,.4197424530982971,.2985221195220948,.25107048749923705,.3324888157844544,.48253663182258605,.6165598976612092,.40862621665000914,.21186126053333282,.4922338902950287,.5517929780483246,.4509614884853363,.49562425196170806,.45456190705299376,.19553345918655402,.3438455045223236,.2646773803234101,.39053775668144225,.41997271955013277,.3724295377731323,.2345973211526871,.32362549304962157,.42551548063755035,.3627460479736328,.39166522800922393,.2982912242412567,.37974442124366764,.44216259121894835,.16258520364761353,.4327280104160309,.47912641644477844,.31535937190055846,.24389803588390352,.35182328820228576,.2114975947141648,.3249718725681305,.3009969878196716,.22358919978141784,.36996547162532806,.2854694604873657,.29810287833213805,.2033691883087158,.34796677708625795,.3403308272361755,.35305335700511936,.4522935628890991,.520306442975998,.45397244691848754,.4453733104467393,.4360526978969574,.4358169931173325,.4670851409435272,.463337938785553,.430365788936615,.6462299782037735,.3818374752998352,.6678127396106721,.3376319885253906,.6731280717253685,.3007634162902832,.6677066612243652,.2756028652191162,.6542664083838463,.25909878611564635,.6035455572605133,.17238967418670653,.5322284626960754,.28373541235923766,.5632325726747514,.3148886442184448,.5544471430778504,.35481600761413573,.554238184094429,.39195387363433837,.5604119020700455,.4199950277805328,.5684955823421478,.4408359706401825,.5755523312091828,.1607656955718994,.5315613377094268,.43638269901275634,.4271241891384125,.4722903251647949,.513996543288231,.4744726598262787,.4443250972032547,.48785080313682555,.4292660462856293,.4740713119506836,.43900651216506964,.443528014421463,.4168834346532822,.49345849752426146,.4267724323272705,.49457465410232543,.4177086848020554,.438745903968811,.5969951617717744,.4560649275779724,.5900395292043685,.4670982837677002,.5844003933668136,.3021982192993164,.6197374525666237,.27794389724731444,.6304952013492584,.6290517628192902,.6082503873109817,.601810845732689,.608769752383232,.6309714198112488,.6319623801112175,.657788547873497,.6077486652135848,.6277183473110199,.5834045577049256,.333698707818985,.6181534442305565,.3082489252090454,.6187389704585076,.3358501076698303,.6419334176182747,.3613401234149933,.618020570576191,.33353258967399596,.5936576622724534],P=468,e0=P*3,t0={type:"standard",color:"#ffffff",opacity:1,wireframe:!1,roughness:1,metalness:0},D=({material:e,faceIndex:t=0,numFaces:n,visible:r=!0,children:o})=>{const{ready:u,node:d}=N(S.XRModel.FACE_TRACKER,n===void 0?void 0:{numFaces:n}),{camera:l}=v.useThree(),c=s.useRef(null),h=s.useRef(null),p=s.useRef(null),f=s.useRef(null),i=s.useRef(null),A=s.useRef(new b.Vector3),E=s.useMemo(()=>{const M=new Uint16Array(Q),R=new b.BufferAttribute(M,1),y=new b.Float32BufferAttribute($,2),C=new Float32Array(e0),a=new b.Float32BufferAttribute(C,3);return a.setUsage(b.DynamicDrawUsage),{indexAttr:R,uvAttr:y,positionAttr:a,positions:C}},[]);s.useEffect(()=>{f.current=E.indexAttr,i.current=E.uvAttr,p.current=E.positionAttr,h.current=E.positions;const M=c.current;if(M){const R=M.geometry;R.setAttribute("position",E.positionAttr),R.setAttribute("uv",E.uvAttr),R.setIndex(E.indexAttr)}return()=>{f.current=null,i.current=null,p.current=null,h.current=null}},[E]),v.useFrame(()=>{var m;if(!u||!d||!c.current)return;const{detectionResults:M}=d,R=(m=M==null?void 0:M.faceLandmarks)==null?void 0:m[t],y=c.current.geometry,C=h.current,a=p.current;if(!R||R.length===0||!C||!a){y.drawRange.count!==0&&y.setDrawRange(0,0);return}y.getAttribute("position")!==a&&(y.setAttribute("position",a),y.setAttribute("uv",i.current),y.setIndex(f.current)),y.drawRange.count===0&&y.setDrawRange(0,1/0),J(R,P,C,l,W,A.current),a.needsUpdate=!0,y.computeVertexNormals()});const F=o!=null&&o!==!1;return _.jsxs("mesh",{material:e,ref:c,visible:r,children:[_.jsx("bufferGeometry",{}),!e&&!F&&_.jsx(U,{settings:t0,materialProps:{attach:"material",transparent:!0,depthWrite:!1,side:b.DoubleSide,needsUpdate:!0}}),!e&&F?o:null]})};D.displayName="FaceMesh";const L={"face.forehead":10,"face.noseTip":1,"face.chin":152,"face.leftEyeOuter":263,"face.rightEyeOuter":33,"face.leftCheek":425,"face.rightCheek":205,"face.mouthCenter":13,"face.leftEarlobe":454,"face.rightEarlobe":234},r0={"face.center":[10,152,234,454],"face.leftEye":[263,362,387,373],"face.rightEye":[33,133,158,145]},K=(e,t=0)=>Number.isFinite(e)?e:t,w=e=>Math.max(-1,Math.min(1,K(e))),n0={x:0,y:0,z:0},H=(e,t,n=n0,r={x:0,y:0,z:0,visibility:0})=>{const o=L[e];if(o!==void 0){const i=t[o];return i?Object.assign(r,i):null}const u=r0[e];if(u){r.x=0,r.y=0,r.z=0;for(const i of u){const A=t[i];if(!A)return null;r.x+=A.x,r.y+=A.y,r.z+=A.z}return r.x/=u.length,r.y/=u.length,r.z/=u.length,r.visibility=1,r}if(e!=="face.custom"||t.length===0)return null;let d=1/0,l=1/0,c=-1/0,h=-1/0,p=0;for(const i of t)d=Math.min(d,i.x),l=Math.min(l,i.y),c=Math.max(c,i.x),h=Math.max(h,i.y),p+=i.z;const f=c-d;return r.x=(d+c)*.5-w(n.x)*f*.5,r.y=(l+h)*.5-w(n.y)*(h-l)*.5,r.z=p/t.length-K(n.z)*f,r.visibility=1,r},s0={left:L["face.leftEyeOuter"],right:L["face.rightEyeOuter"]},O=s.createContext(null),o0=()=>s.useContext(O),c0=({faceIndex:e=0,numFaces:t,scaleWithFace:n=!1,followFaceRoll:r=!0,targetFps:o,active:u=!0,children:d})=>{const l=s.useRef(!1),c=s.useRef(null),h=s.useMemo(()=>{if(!(t===void 0&&o===void 0))return{...t===void 0?{}:{numFaces:t},...o===void 0?{}:{targetFps:o}}},[t,o]),{ready:p,node:f}=N(S.XRModel.FACE_TRACKER,h,u),{camera:i}=v.useThree(),A=s.useRef(i);A.current!==i&&(A.current=i,l.current=!1);const E=s.useRef(null),F=s.useRef({x:0,y:0,z:0,visibility:0});v.useFrame(()=>{if(!p||!f||!c.current)return;E.current=f,!l.current&&A.current&&(f.setCamera(A.current,e),l.current=!0);const a=f.getFace(e);if(!a){c.current.visible=!1;return}c.current.visible=!0;const{position:m,rotation:x,scale:T}=a.transform;c.current.position.set(m.x,m.y,m.z),c.current.rotation.set(x.x,x.y,r?x.z:0),n?c.current.scale.set(T.x,T.y,T.z):c.current.scale.set(1,1,1)});const M=s.useCallback((a,m)=>{var I,k;const x=E.current,T=(k=(I=x==null?void 0:x.detectionResults)==null?void 0:I.faceLandmarks)==null?void 0:k[e];if(!T||T.length===0)return null;const g=H(a,T,m,F.current);return g?{position:S.unprojectToZZero(g,A.current)}:null},[e]),R=s.useMemo(()=>({type:"face",resolveLandmark:M}),[M]);let y;const C=[];return s.Children.forEach(d,a=>{var m,x;s.isValidElement(a)&&(((m=a.type)==null?void 0:m.displayName)==="FaceTracker.Mesh"||((x=a.type)==null?void 0:x.displayName)==="FaceMesh")?y=s.cloneElement(a,{faceIndex:e,numFaces:t}):C.push(a)}),_.jsxs(O.Provider,{value:R,children:[_.jsx("group",{ref:c,renderOrder:X.RENDER_LAYERS.TRACKED,children:C}),y]})},q=e=>_.jsx(D,{...e});q.displayName="FaceTracker.Mesh";const z=c0;z.Mesh=q;const i0=z;exports.FACE_EYE_DISTANCE_LANDMARKS=s0;exports.FACE_LANDMARK_INDICES=L;exports.FaceMesh=D;exports.FaceTracker=z;exports.HeadTracker=i0;exports.MeshMaterial=U;exports.TrackerContext=O;exports.projectLandmarkWithDepth=G;exports.resolveFaceAnchorPoint=H;exports.transformFaceMeshLandmark=B;exports.useTrackerContext=o0;exports.useXRModel=N;
@@ -1 +0,0 @@
1
- "use strict";const h=require("react"),i=require("react/jsx-runtime"),B=require("@react-three/drei"),o=require("three"),q=require("./index-82aENaRq.cjs"),S=h.createContext(null),N=()=>{const e=h.useContext(S);if(!e)throw new Error("useScreenSpace must be used within ScreenSpaceUI");return e},k=h.createContext(null),U=()=>h.useContext(k)??1,L={enabled:!0,mesh:"cube",material:{type:"standard",color:"#ffffff",opacity:1,wireframe:!1,roughness:.42,metalness:.08},shadowMode:"off",visible:!0},g={depthTest:!0,depthWrite:!0,depthFunc:"lessEqual",colorWrite:!0,colorMask:{r:!0,g:!0,b:!0,a:!0},cullMode:"back",blendMode:"normal",polygonOffset:{enabled:!1,factor:0,units:0}},R=e=>({...g,...e,colorMask:{...g.colorMask,...e==null?void 0:e.colorMask},polygonOffset:{...g.polygonOffset,...e==null?void 0:e.polygonOffset}}),x=e=>e==="never"?o.NeverDepth:e==="less"?o.LessDepth:e==="equal"?o.EqualDepth:e==="greater"?o.GreaterDepth:e==="notEqual"?o.NotEqualDepth:e==="greaterEqual"?o.GreaterEqualDepth:e==="always"?o.AlwaysDepth:o.LessEqualDepth,D=e=>e==="front"?o.BackSide:e==="off"?o.DoubleSide:o.FrontSide,A=e=>e==="additive"?o.AdditiveBlending:e==="subtractive"?o.SubtractiveBlending:e==="multiply"?o.MultiplyBlending:e==="none"?o.NoBlending:o.NormalBlending,_=e=>{const r=R(e),t=r.colorWrite&&(r.colorMask.r||r.colorMask.g||r.colorMask.b||r.colorMask.a);return{depthTest:r.depthTest,depthWrite:r.depthWrite,depthFunc:x(r.depthFunc),colorWrite:t,side:D(r.cullMode),blending:A(r.blendMode),polygonOffset:r.polygonOffset.enabled,polygonOffsetFactor:r.polygonOffset.factor,polygonOffsetUnits:r.polygonOffset.units}},C=(e,r)=>{const t=R(r);return e<1||t.blendMode!=="normal"&&t.blendMode!=="none"},T=e=>e.colorWrite&&(!e.colorMask.r||!e.colorMask.g||!e.colorMask.b||!e.colorMask.a),M="__vincenttPreviousColorMask",P=(e,r)=>{const t=e.onBeforeRender.bind(e),d=e.onAfterRender.bind(e);if(!T(r)){e.onBeforeRender=t,e.onAfterRender=d;return}e.onBeforeRender=(a,u,m,f,l,n)=>{t(a,u,m,f,l,n);const s=a.getContext();e.userData[M]=s.getParameter(s.COLOR_WRITEMASK),s.colorMask(r.colorMask.r,r.colorMask.g,r.colorMask.b,r.colorMask.a)},e.onAfterRender=(a,u,m,f,l,n)=>{const s=e.userData[M];s&&(a.getContext().colorMask(...s),delete e.userData[M]),d(a,u,m,f,l,n)}},w=e=>({castShadow:e==="cast"||e==="castReceive",receiveShadow:e==="receive"||e==="castReceive"}),W=({mesh:e})=>e==="sphere"?i.jsx("sphereGeometry",{args:[.85,48,32]}):e==="plane"?i.jsx("planeGeometry",{args:[1.6,1.6]}):i.jsx("boxGeometry",{args:[1.4,1.4,1.4]}),v=({url:e,nodeName:r,settings:t,renderOrder:d})=>{const{scene:a}=B.useGLTF(e),u=h.useMemo(()=>{const f=a.clone(!0),l=w(t.shadowMode),n=Math.min(1,Math.max(0,t.material.opacity)),s=_(t.material.renderState),O=C(n,t.material.renderState);return f.traverse(b=>{const c=b;if(!c.isMesh||!c.material)return;c.material=Array.isArray(c.material)?c.material.map(p=>p.clone()):c.material.clone(),c.castShadow=l.castShadow,c.receiveShadow=l.receiveShadow,(Array.isArray(c.material)?c.material:[c.material]).forEach(p=>{var y;if(!p)return;const E=p;E.wireframe=t.material.wireframe,p.opacity=n,p.transparent=O,Object.assign(p,s),(y=E.color)==null||y.set(t.material.color),p.needsUpdate=!0}),P(c,R(t.material.renderState))}),f},[a,t.material.color,t.material.opacity,t.material.renderState,t.material.wireframe,t.shadowMode]),m=r?u.getObjectByName(r):u;return i.jsx("group",{renderOrder:d,children:i.jsx("primitive",{object:m??u})})},G=({renderOrder:e,value:r})=>{if(!r.enabled||!r.visible)return null;if(r.assetUrl)return i.jsx(h.Suspense,{fallback:null,children:i.jsx(v,{url:r.assetUrl,nodeName:r.assetNodeName,settings:r,renderOrder:e})});const t=Math.min(1,Math.max(0,r.material.opacity)),d={color:r.material.color,transparent:C(t,r.material.renderState),opacity:t,wireframe:r.material.wireframe,..._(r.material.renderState)};return i.jsxs("mesh",{...w(r.shadowMode),onBeforeRender:(a,u,m,f,l)=>{const n=R(r.material.renderState);if(!T(n))return;const s=a.getContext();l.userData[M]=s.getParameter(s.COLOR_WRITEMASK),s.colorMask(n.colorMask.r,n.colorMask.g,n.colorMask.b,n.colorMask.a)},onAfterRender:(a,u,m,f,l)=>{const n=l.userData[M];n&&(a.getContext().colorMask(...n),delete l.userData[M])},renderOrder:e,children:[i.jsx(W,{mesh:r.mesh}),i.jsx(q.MeshMaterial,{settings:r.material,materialProps:d})]})};exports.DEFAULT_MESH_RENDERER=L;exports.DEFAULT_MESH_RENDERER_RENDER_STATE=g;exports.MeshRenderer=G;exports.ScreenRectAspectContext=k;exports.ScreenSpaceContext=S;exports.getThreeBlending=A;exports.getThreeDepthFunction=x;exports.getThreeSide=D;exports.normalizeMeshRendererRenderState=R;exports.useScreenRectAspect=U;exports.useScreenSpace=N;