@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
package/dist/tracking.js CHANGED
@@ -1,19 +1,40 @@
1
- import { u as N, T as O } from "./index-BgQAX8rs.js";
2
- import { d as Ve, c as We, b as qe } from "./index-BgQAX8rs.js";
3
- import { jsx as A, Fragment as J } from "react/jsx-runtime";
4
- import { useThree as C, useFrame as b } from "@react-three/fiber";
5
- import { useRef as R, useMemo as _, useCallback as I, useEffect as L, useState as P } from "react";
6
- import * as U from "three";
7
- import { X as F, u as Q, f as ee } from "./index-JygePOwo.js";
8
- import { R as z } from "./renderLayers-zrK2pv5O.js";
9
- import { B as $e, D as Ze, F as Je, H as Qe, T as et, g as tt } from "./index-UC0Ux38E.js";
10
- import { u as rt } from "./useFaceResults-CkFc1egZ.js";
11
- import { u as te } from "./useFaceInfo-CwsHZedC.js";
12
- import { a as st } from "./useFaceInfo-CwsHZedC.js";
13
- import { a as S } from "./getFaceInfo-hUKMLFcr.js";
14
- import { D as it, b as ct, h as at } from "./getFaceInfo-hUKMLFcr.js";
15
- import { d as ne } from "./drawNormalizedCrop-CRdIDyl1.js";
16
- const re = {
1
+ import { T as me } from "./index-CbBCl2ZU.js";
2
+ import { a as ts, F as rs } from "./index-CbBCl2ZU.js";
3
+ import { jsx as N, jsxs as _t, Fragment as St } from "react/jsx-runtime";
4
+ import { useThree as q, useFrame as U, createPortal as Rt } from "@react-three/fiber";
5
+ import { useRef as _, useMemo as v, useCallback as Y, useContext as Se, useEffect as b, useState as W, createContext as At, useId as yt, useSyncExternalStore as Ot } from "react";
6
+ import { j as J, t as $, J as Re, Q as Dt, n as Ke, f as bt, i as It, u as at, q as Nt } from "./index-BDxJWWyy.js";
7
+ import { B as ss, T as os, Y as as, V as is, U as cs, W as us, Z as ls, e as ds, H as fs, R as hs, X as ms, _ as ps, h as gs, D as Ts, G as Es, $ as _s, a0 as Ss, C as Rs, g as As, a1 as ys } from "./index-BDxJWWyy.js";
8
+ import { R as pe } from "./uv-DJU_XfmN.js";
9
+ import { u as fe, r as vt } from "./landmarks-C3LvDhMt.js";
10
+ import { a as Ds } from "./landmarks-C3LvDhMt.js";
11
+ import { r as xt, M as Ye, B as Ct, g as Ee, c as We, s as Mt, a as Ht } from "./useIrisTracking-B0uLWgNE.js";
12
+ import { b as Is, j as Ns, C as vs, k as xs, l as Cs, m as Ms, e as Hs, D as Ls, p as ws, F as Fs, S as ks, f as Bs, h as Ps, d as Us, q as Gs, t as js, i as Ks, n as Ys, u as Ws, o as Vs } from "./useIrisTracking-B0uLWgNE.js";
13
+ import { S as Lt, u as wt, B as Ft, a as it, b as kt, c as Bt, d as Pt, r as Ut, H as Gt, e as jt, O as Kt, m as Yt, f as ce, g as Ve, h as ue, i as Wt, j as Vt, k as zt, l as Xt, n as qt, o as Jt, s as be, p as $t, q as Qt, t as Zt, v as ze } from "./trigger-CQviD4xp.js";
14
+ import { E as Xs, ab as qs, ac as Js, ad as $s, ae as Qs, a8 as Zs, x as eo, y as to, z as ro, A as no, C as so, a9 as oo, aa as ao, D as io, I as co, J as uo, K as lo, F as fo, Y as ho, Z as mo, _ as po, $ as go, a0 as To, P as Eo, T as _o, U as So, a5 as Ro, a1 as Ao, a2 as yo, a6 as Oo, V as Do, Q as bo, w as Io, X as No, R as vo, a3 as xo, a7 as Co, L as Mo, M as Ho, W as Lo, G as wo, af as Fo, ag as ko, a4 as Bo, N as Po } from "./trigger-CQviD4xp.js";
15
+ import { d as er, S as Xe } from "./segmentation-DccvYBBO.js";
16
+ import { a as Go } from "./segmentation-DccvYBBO.js";
17
+ import * as H from "three";
18
+ import { l as tr, B as rr, g as nr } from "./index-B0EYdofX.js";
19
+ import { n as Ko, o as Yo } from "./index-B0EYdofX.js";
20
+ import { H as ct } from "./settings-BJ7FMBsO.js";
21
+ import { c as Vo, D as zo, G as Xo, a as qo, b as Jo, d as $o, p as Qo, e as Zo, r as ea, t as ta } from "./settings-BJ7FMBsO.js";
22
+ import { b as sr, f as Le, g as or } from "./selectors-J06V0eDb.js";
23
+ import { b as ar, r as ir, u as cr } from "./useBodies-DOuwRuew.js";
24
+ import { a as na } from "./useBodies-DOuwRuew.js";
25
+ import { d as ur } from "./drawNormalizedCrop-D606u5-F.js";
26
+ import { u as oa } from "./drawNormalizedCrop-D606u5-F.js";
27
+ import { B as ia, D as ca, F as ua, H as la, T as da, g as fa } from "./index-CicO_Tnw.js";
28
+ import { r as qe, c as He, s as ut, a as lr, g as dr } from "./detector-K8aej4MB.js";
29
+ import { D as ma } from "./detector-K8aej4MB.js";
30
+ import { d as Je, a as fr, b as hr } from "./getFaceInfo-Mt44zlej.js";
31
+ import { D as ga, e as Ta, h as Ea } from "./getFaceInfo-Mt44zlej.js";
32
+ import { s as mr } from "./useInstructionHold-DOu-RpCM.js";
33
+ import { u as pr } from "./useFaceInfo-XUGYTdfN.js";
34
+ import { D as Sa, a as Ra } from "./useFaceInfo-XUGYTdfN.js";
35
+ import { a as ya, b as Oa, P as Da, S as ba, d as Ia, e as Na, f as va } from "./providers-Bxt_MfPK.js";
36
+ import { D as Ca, e as Ma, r as Ha } from "./landmarkMask-DHivVjJm.js";
37
+ const lt = {
17
38
  "hand.wrist": 0,
18
39
  "hand.thumbTip": 4,
19
40
  "hand.indexTip": 8,
@@ -25,7 +46,7 @@ const re = {
25
46
  "hand.ringBase": 13,
26
47
  "hand.pinkyBase": 17
27
48
  };
28
- function oe(e, t, r = 0) {
49
+ function dt(e, r, t = 0) {
29
50
  var o;
30
51
  const n = (o = e == null ? void 0 : e.hands) != null && o.length ? e.hands : e != null && e.coordinates ? [
31
52
  {
@@ -35,60 +56,55 @@ function oe(e, t, r = 0) {
35
56
  }
36
57
  ] : [];
37
58
  if (n.length) {
38
- if (t) {
39
- const u = n.find((i) => i.handedness === t);
59
+ if (r) {
60
+ const u = n.find((c) => c.handedness === r);
40
61
  if (u) return u;
41
62
  }
42
- return n[r] ?? n[0];
63
+ return n[t] ?? n[0];
43
64
  }
44
65
  }
45
- const Ne = ({
66
+ const Cn = ({
46
67
  children: e,
47
- hand: t,
48
- handIndex: r = 0,
68
+ hand: r,
69
+ handIndex: t = 0,
49
70
  targetFps: n,
50
71
  active: o = !0
51
72
  }) => {
52
- const u = R(null), i = _(
73
+ const u = _(null), c = v(
53
74
  () => n === void 0 ? void 0 : { targetFps: n },
54
75
  [n]
55
- ), { ready: a, node: y } = N(
56
- F.HAND_TRACKER,
57
- i,
76
+ ), { ready: s, node: a } = fe(
77
+ J.HAND_TRACKER,
78
+ c,
58
79
  o
59
- ), { camera: s } = C(), c = R(s);
60
- c.current !== s && (c.current = s);
61
- const l = R(null);
62
- b(() => {
63
- var m;
64
- if (!a || !y || !u.current) return;
65
- const g = oe(y, t, r);
66
- l.current = g ?? null;
67
- const d = (m = g == null ? void 0 : g.coordinates) == null ? void 0 : m[0];
68
- if (!d) {
80
+ ), { camera: i } = q(), d = _(i);
81
+ d.current !== i && (d.current = i);
82
+ const f = _(null);
83
+ U(() => {
84
+ var l;
85
+ if (!s || !a || !u.current) return;
86
+ const S = dt(a, r, t);
87
+ f.current = S ?? null;
88
+ const T = (l = S == null ? void 0 : S.coordinates) == null ? void 0 : l[0];
89
+ if (!T) {
69
90
  u.current.visible = !1;
70
91
  return;
71
92
  }
72
- const p = K(d, c.current);
93
+ const p = $(T, d.current);
73
94
  u.current.visible = !0, u.current.position.copy(p);
74
95
  });
75
- const f = I((g) => {
76
- var m, E;
77
- const d = re[g];
78
- if (d === void 0) return null;
79
- const p = (E = (m = l.current) == null ? void 0 : m.coordinates) == null ? void 0 : E[d];
80
- return p ? { position: K(p, c.current) } : null;
81
- }, []), h = _(
82
- () => ({ type: "hand", resolveLandmark: f }),
83
- [f]
96
+ const h = Y((S) => {
97
+ var l, m;
98
+ const T = lt[S];
99
+ if (T === void 0) return null;
100
+ const p = (m = (l = f.current) == null ? void 0 : l.coordinates) == null ? void 0 : m[T];
101
+ return p ? { position: $(p, d.current) } : null;
102
+ }, []), g = v(
103
+ () => ({ type: "hand", resolveLandmark: h }),
104
+ [h]
84
105
  );
85
- return /* @__PURE__ */ A(O.Provider, { value: h, children: /* @__PURE__ */ A("group", { ref: u, renderOrder: z.TRACKED, children: e }) });
86
- }, K = (e, t) => {
87
- const r = new U.Vector3(e.x, e.y, e.z);
88
- r.unproject(t);
89
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
90
- return t.position.clone().add(n.multiplyScalar(o));
91
- }, se = {
106
+ return /* @__PURE__ */ N(me.Provider, { value: g, children: /* @__PURE__ */ N("group", { ref: u, renderOrder: pe.TRACKED, children: e }) });
107
+ }, gr = {
92
108
  "hand.wrist": 0,
93
109
  "hand.thumbTip": 4,
94
110
  "hand.indexTip": 8,
@@ -99,170 +115,1121 @@ const Ne = ({
99
115
  "hand.middleBase": 9,
100
116
  "hand.ringBase": 13,
101
117
  "hand.pinkyBase": 17
102
- }, Fe = ({ children: e, targetFps: t, active: r = !0 }) => {
103
- const n = R(null), o = _(
104
- () => t === void 0 ? void 0 : { targetFps: t },
105
- [t]
106
- ), { ready: u, node: i } = N(
107
- F.GESTURE_TRACKER,
118
+ }, Mn = ({ children: e, targetFps: r, active: t = !0 }) => {
119
+ const n = _(null), o = v(
120
+ () => r === void 0 ? void 0 : { targetFps: r },
121
+ [r]
122
+ ), { ready: u, node: c } = fe(
123
+ J.GESTURE_TRACKER,
108
124
  o,
109
- r
110
- ), { camera: a } = C(), y = R(a);
111
- y.current !== a && (y.current = a);
112
- const s = R(null);
113
- b(() => {
114
- var g;
115
- if (!u || !i || !n.current) return;
116
- s.current = i;
117
- const f = (g = i == null ? void 0 : i.coordinates) == null ? void 0 : g[0];
118
- if (!f) {
125
+ t
126
+ ), { camera: s } = q(), a = _(s);
127
+ a.current !== s && (a.current = s);
128
+ const i = _(null);
129
+ U(() => {
130
+ var S;
131
+ if (!u || !c || !n.current) return;
132
+ i.current = c;
133
+ const h = (S = c == null ? void 0 : c.coordinates) == null ? void 0 : S[0];
134
+ if (!h) {
119
135
  n.current.visible = !1;
120
136
  return;
121
137
  }
122
- const h = G(f, y.current);
123
- n.current.visible = !0, n.current.position.copy(h);
138
+ const g = $(h, a.current);
139
+ n.current.visible = !0, n.current.position.copy(g);
124
140
  });
125
- const c = I((f) => {
126
- var d, p;
127
- const h = se[f];
128
- if (h === void 0) return null;
129
- const g = (p = (d = s.current) == null ? void 0 : d.coordinates) == null ? void 0 : p[h];
130
- return g ? { position: G(g, y.current) } : null;
131
- }, []), l = _(
132
- () => ({ type: "hand", resolveLandmark: c }),
133
- [c]
141
+ const d = Y((h) => {
142
+ var T, p;
143
+ const g = gr[h];
144
+ if (g === void 0) return null;
145
+ const S = (p = (T = i.current) == null ? void 0 : T.coordinates) == null ? void 0 : p[g];
146
+ return S ? { position: $(S, a.current) } : null;
147
+ }, []), f = v(
148
+ () => ({ type: "hand", resolveLandmark: d }),
149
+ [d]
134
150
  );
135
- return /* @__PURE__ */ A(O.Provider, { value: l, children: /* @__PURE__ */ A("group", { ref: n, renderOrder: z.TRACKED, children: e }) });
136
- }, G = (e, t) => {
137
- const r = new U.Vector3(e.x, e.y, e.z);
138
- r.unproject(t);
139
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
140
- return t.position.clone().add(n.multiplyScalar(o));
141
- }, ue = {
142
- "body.head": 0,
143
- "body.leftShoulder": 11,
144
- "body.rightShoulder": 12,
145
- "body.leftElbow": 13,
146
- "body.rightElbow": 14,
147
- "body.leftWrist": 15,
148
- "body.rightWrist": 16,
149
- "body.leftHip": 23,
150
- "body.rightHip": 24,
151
- "body.leftKnee": 25,
152
- "body.rightKnee": 26,
153
- "body.leftAnkle": 27,
154
- "body.rightAnkle": 28
155
- }, Me = ({ bodyIndex: e = 0, active: t = !0, children: r }) => {
156
- const n = R(null), { ready: o, node: u } = N(
157
- F.BODY_TRACKER,
158
- void 0,
159
- t
160
- ), { camera: i } = C(), a = R(i);
161
- a.current !== i && (a.current = i);
162
- const y = R(null);
151
+ return /* @__PURE__ */ N(me.Provider, { value: f, children: /* @__PURE__ */ N("group", { ref: n, renderOrder: pe.TRACKED, children: e }) });
152
+ }, Tr = {
153
+ hand: "/assets/xr/3d-models/hand-v1.glb",
154
+ glove: "/assets/xr/3d-models/glove-v1.glb",
155
+ body: "/assets/xr/3d-models/ybot-v1.glb"
156
+ }, Er = (e) => new URL(Tr[e], Re.assetStorageEndpoint).toString(), Hn = (e) => er(Er(e)), Ln = Lt, wn = ({
157
+ inflate: e = 0,
158
+ showDebugMaterial: r = !1,
159
+ opacity: t = 0.5,
160
+ onModel: n,
161
+ children: o,
162
+ ...u
163
+ }) => {
164
+ const c = wt(
165
+ { inflate: e, showDebugMaterial: r, opacity: t },
166
+ it,
167
+ n
168
+ );
169
+ return /* @__PURE__ */ N(Ft, { ...u, material: c.material, onModel: c.onModel, children: o });
170
+ };
171
+ let $e = !1;
172
+ const Fn = ({
173
+ resolution: e = 0.5,
174
+ inflate: r = 0,
175
+ active: t = !0
176
+ } = {}) => {
177
+ const n = Se(kt), o = q((a) => a.gl), u = q((a) => a.scene), c = q((a) => a.camera), s = v(() => {
178
+ const a = new H.WebGLRenderTarget(1, 1, {
179
+ type: H.HalfFloatType,
180
+ minFilter: H.NearestFilter,
181
+ magFilter: H.NearestFilter
182
+ }), i = {
183
+ bodyDepthMap: { value: a.texture },
184
+ bodyDepthNear: { value: 0 },
185
+ bodyDepthFar: { value: 1 }
186
+ };
187
+ return {
188
+ target: a,
189
+ material: Bt(),
190
+ size: new H.Vector2(),
191
+ range: { near: 0, far: 1 },
192
+ shown: !0,
193
+ result: { texture: a.texture, uniforms: i }
194
+ };
195
+ }, []);
196
+ return b(
197
+ () => () => {
198
+ s.target.dispose(), s.material.dispose();
199
+ },
200
+ [s]
201
+ ), b(() => {
202
+ s.material.userData.inflate.value = r;
203
+ }, [s, r]), b(() => {
204
+ n || $e || ($e = !0, console.warn(
205
+ `${Re.loggerPrefix} useBodyDepthTexture must be inside a BodyRig or BodyOccluder`
206
+ ));
207
+ }, [n]), U(() => {
208
+ if (!n || !t) return;
209
+ o.getDrawingBufferSize(s.size).multiplyScalar(e).round();
210
+ const a = Math.max(1, s.size.x), i = Math.max(1, s.size.y);
211
+ (s.target.width !== a || s.target.height !== i) && s.target.setSize(a, i);
212
+ const d = n.root.parent, f = !!(d != null && d.visible);
213
+ !f && !s.shown || (s.shown = f, (d ?? n.root).updateWorldMatrix(!0, !0), c.updateMatrixWorld(), Pt(n, c, s.range), s.result.uniforms.bodyDepthNear.value = s.range.near, s.result.uniforms.bodyDepthFar.value = s.range.far, Ut(
214
+ o,
215
+ u,
216
+ c,
217
+ n.root,
218
+ it,
219
+ s.target,
220
+ s.material
221
+ ));
222
+ }), n ? s.result : null;
223
+ }, kn = ({ joint: e, along: r = 0.5, offset: t, children: n }) => {
224
+ const o = Se(Gt), u = _(null), c = v(
225
+ () => ({
226
+ transform: {
227
+ position: new H.Vector3(),
228
+ quaternion: new H.Quaternion()
229
+ },
230
+ offsetE: new H.Euler(),
231
+ offsetQ: new H.Quaternion(),
232
+ offsetP: new H.Vector3()
233
+ }),
234
+ []
235
+ );
236
+ U(() => {
237
+ var h, g, S, T, p, l;
238
+ const i = u.current;
239
+ if (!i || !o) return;
240
+ const { position: d, quaternion: f } = tr(o, e, r, c.transform);
241
+ c.offsetQ.setFromEuler(
242
+ c.offsetE.set(
243
+ ((h = t == null ? void 0 : t.rotation) == null ? void 0 : h[0]) ?? 0,
244
+ ((g = t == null ? void 0 : t.rotation) == null ? void 0 : g[1]) ?? 0,
245
+ ((S = t == null ? void 0 : t.rotation) == null ? void 0 : S[2]) ?? 0
246
+ )
247
+ ), c.offsetP.set(
248
+ ((T = t == null ? void 0 : t.position) == null ? void 0 : T[0]) ?? 0,
249
+ ((p = t == null ? void 0 : t.position) == null ? void 0 : p[1]) ?? 0,
250
+ ((l = t == null ? void 0 : t.position) == null ? void 0 : l[2]) ?? 0
251
+ ), i.position.copy(d).add(c.offsetP.applyQuaternion(f)), i.quaternion.copy(f).multiply(c.offsetQ), i.scale.setScalar((t == null ? void 0 : t.scale) ?? 1);
252
+ });
253
+ const s = !o;
254
+ if (b(() => {
255
+ s && console.warn(
256
+ `${Re.loggerPrefix} HandAttachment must be inside a HandRig or HandOccluder`
257
+ );
258
+ }, [s]), !o) return null;
259
+ const a = o.bones[e];
260
+ return a ? Rt(/* @__PURE__ */ N("group", { ref: u, children: n }), a) : null;
261
+ }, de = 10, ee = [0, 1, 5, 9, 13, 17], _r = -0.5, Qe = ee.length + ct.length * 2 + 21 * de + 2 + de, Sr = (e, r, { inflate: t = 1, forearm: n = 1.4 }, o, u = 0) => {
262
+ let c = u;
263
+ const s = (E, A) => {
264
+ o[c * 2] = E, o[c * 2 + 1] = A, c += 1;
265
+ }, a = (E) => e[E].x * r, i = (E) => e[E].y, d = Math.hypot(a(0) - a(9), i(0) - i(9)), f = 0.12 * d * t;
266
+ let h = 0, g = 0;
267
+ for (const E of ee)
268
+ h += a(E), g += i(E);
269
+ h /= ee.length, g /= ee.length;
270
+ for (let E = 0; E < ee.length; E += 1) {
271
+ const A = ee[E], D = ee[(E + 1) % ee.length];
272
+ s(h / r, g), s(a(A) / r, i(A)), s(a(D) / r, i(D));
273
+ }
274
+ const S = (E, A, D, O, L) => {
275
+ const G = D - E, I = O - A, y = Math.hypot(G, I) || 1, M = -I / y * L, w = G / y * L;
276
+ s((E + M) / r, A + w), s((D + M) / r, O + w), s((D - M) / r, O - w), s((E + M) / r, A + w), s((D - M) / r, O - w), s((E - M) / r, A - w);
277
+ }, T = (E, A, D) => {
278
+ for (let O = 0; O < de; O += 1) {
279
+ const L = O / de * Math.PI * 2, G = (O + 1) / de * Math.PI * 2;
280
+ s(E / r, A), s((E + Math.cos(L) * D) / r, A + Math.sin(L) * D), s((E + Math.cos(G) * D) / r, A + Math.sin(G) * D);
281
+ }
282
+ };
283
+ for (const [E, A] of ct) {
284
+ const D = E === 0 ? f * 1.4 : f;
285
+ S(a(E), i(E), a(A), i(A), D);
286
+ }
287
+ for (let E = 0; E < 21; E += 1) T(a(E), i(E), E === 0 ? f * 1.6 : f);
288
+ const p = a(0) - a(9), l = i(0) - i(9), m = Math.hypot(p, l) || 1, x = n * d, R = a(0) + p / m * x, C = i(0) + l / m * x;
289
+ if (n > 0) {
290
+ const E = f * 2, A = -l / m * E, D = p / m * E;
291
+ s((a(0) + A) / r, i(0) + D), s((R + A) / r, C + D), s((R - A) / r, C - D), s((a(0) + A) / r, i(0) + D), s((R - A) / r, C - D), s((a(0) - A) / r, i(0) - D), T(R, C, E);
292
+ } else
293
+ for (let E = 0; E < (2 + de) * 3; E += 1) s(a(0) / r, i(0));
294
+ return c - u;
295
+ }, Ie = 2, Rr = (
296
+ /* glsl */
297
+ `
298
+ void main() {
299
+ // On the near plane: in front of everything drawn after it.
300
+ gl_Position = vec4(position.xy, -1.0, 1.0);
301
+ }
302
+ `
303
+ ), Ar = (
304
+ /* glsl */
305
+ `
306
+ void main() {
307
+ gl_FragColor = vec4(1.0, 0.2, 0.8, 0.35);
308
+ }
309
+ `
310
+ ), yr = () => new H.ShaderMaterial({
311
+ name: "HandCutout",
312
+ vertexShader: Rr,
313
+ fragmentShader: Ar,
314
+ depthTest: !0,
315
+ depthFunc: H.AlwaysDepth,
316
+ depthWrite: !0,
317
+ colorWrite: !1,
318
+ side: H.DoubleSide
319
+ }), Bn = ({
320
+ inflate: e = 1,
321
+ forearm: r = 1.4,
322
+ debug: t = !1,
323
+ renderOrder: n = -900
324
+ }) => {
325
+ const o = sr(J.HAND_TRACKER), u = q((h) => h.size), c = q((h) => h.scene), s = v(() => {
326
+ const h = new H.BufferGeometry(), g = new H.BufferAttribute(
327
+ new Float32Array(Ie * Qe * 3 * 3),
328
+ 3
329
+ );
330
+ return g.setUsage(H.DynamicDrawUsage), h.setAttribute("position", g), h.setDrawRange(0, 0), h;
331
+ }, []);
332
+ b(() => () => s.dispose(), [s]), b(() => xt(c, s), [c, s]);
333
+ const a = v(yr, []);
334
+ b(() => () => a.dispose(), [a]), b(() => {
335
+ a.colorWrite = t, a.transparent = t, a.needsUpdate = !0;
336
+ }, [a, t]);
337
+ const i = v(() => new Float32Array(Ie * Qe * 3 * 2), []), d = _(null);
163
338
  b(() => {
164
- if (!o || !u || !n.current) return;
165
- const l = u;
166
- y.current = l;
167
- const f = l.getLandmarks2D(e), h = f == null ? void 0 : f[0];
168
- if (!h) {
169
- n.current.visible = !1;
170
- return;
339
+ const h = d.current;
340
+ if (!(!h || t))
341
+ return h.layers.enable(Ye), () => h.layers.disable(Ye);
342
+ }, [t]);
343
+ const f = _({ inflate: e, forearm: r });
344
+ return f.current = { inflate: e, forearm: r }, U(() => {
345
+ const h = (o == null ? void 0 : o.hands) ?? [], g = u.width / Math.max(1, u.height);
346
+ let S = 0;
347
+ for (const l of h.slice(0, Ie)) {
348
+ const m = l.coordinates;
349
+ !m || m.length < 21 || (S += Sr(m, g, f.current, i, S));
171
350
  }
172
- const g = B(h, a.current);
173
- n.current.visible = !0, n.current.position.copy(g);
351
+ const T = s.getAttribute("position"), p = T.array;
352
+ for (let l = 0; l < S; l += 1)
353
+ p[l * 3] = i[l * 2], p[l * 3 + 1] = i[l * 2 + 1], p[l * 3 + 2] = 0;
354
+ T.needsUpdate = !0, s.setDrawRange(0, S);
355
+ }, _r), /* @__PURE__ */ N("group", { children: /* @__PURE__ */ N(
356
+ "mesh",
357
+ {
358
+ ref: d,
359
+ geometry: s,
360
+ material: a,
361
+ renderOrder: n,
362
+ frustumCulled: !1
363
+ }
364
+ ) });
365
+ }, Ne = { hovered: !1, grabbed: !1, hand: null }, Or = 1.08, Pn = ({
366
+ shape: e = "sphere",
367
+ size: r = 0.4,
368
+ position: t,
369
+ velocity: n,
370
+ mass: o,
371
+ bounce: u,
372
+ grabbable: c = !0,
373
+ pushable: s = !0,
374
+ gravity: a = !0,
375
+ color: i = "#f97316",
376
+ onGrab: d,
377
+ onRelease: f,
378
+ onTap: h,
379
+ onTouch: g,
380
+ onHoverChange: S,
381
+ children: T
382
+ }) => {
383
+ const p = Se(jt), l = _(null), [m, x] = W(Ne), [R, C] = W(null), E = { onGrab: d, onRelease: f, onTap: h, onTouch: g, onHoverChange: S }, A = _(E);
384
+ A.current = E;
385
+ const D = _((I) => {
386
+ var M, w, V, z, Q, X;
387
+ const y = A.current;
388
+ switch (I.type) {
389
+ case "grab":
390
+ x({ hovered: !1, grabbed: !0, hand: I.hand }), (M = y.onGrab) == null || M.call(y, I);
391
+ break;
392
+ case "release":
393
+ x(Ne), (w = y.onRelease) == null || w.call(y, I);
394
+ break;
395
+ case "hoverstart":
396
+ x((B) => B.grabbed ? B : { hovered: !0, grabbed: !1, hand: I.hand }), (V = y.onHoverChange) == null || V.call(y, !0, I.hand);
397
+ break;
398
+ case "hoverend":
399
+ x((B) => B.grabbed ? B : Ne), (z = y.onHoverChange) == null || z.call(y, !1, I.hand);
400
+ break;
401
+ case "tap":
402
+ (Q = y.onTap) == null || Q.call(y, I);
403
+ break;
404
+ case "touch":
405
+ (X = y.onTouch) == null || X.call(y, I);
406
+ break;
407
+ }
408
+ }), O = _({
409
+ shape: e,
410
+ size: r,
411
+ position: t,
412
+ velocity: n,
413
+ mass: o,
414
+ bounce: u,
415
+ grabbable: c,
416
+ pushable: s,
417
+ gravity: a
174
418
  });
175
- const s = I(
176
- (l) => {
177
- const f = y.current;
178
- if (!f) return null;
179
- const h = f.getLandmarks2D(e);
180
- if (!h) return null;
181
- if (l === "body.neck") {
182
- const p = h[11], m = h[12];
183
- if (!p || !m) return null;
184
- const E = {
185
- x: (p.x + m.x) / 2,
186
- y: (p.y + m.y) / 2,
187
- z: (p.z + m.z) / 2
188
- };
189
- return { position: B(E, a.current) };
190
- }
191
- const g = ue[l];
192
- if (g === void 0) return null;
193
- const d = h[g];
194
- return d ? { position: B(d, a.current) } : null;
419
+ b(() => {
420
+ const I = l.current;
421
+ if (!p || !I) return;
422
+ const y = p.world.add(O.current);
423
+ I.position.copy(y.position);
424
+ const M = p.register(y, { object: I, onEvent: D });
425
+ return C(y), () => {
426
+ M(), p.world.remove(y), C(null);
427
+ };
428
+ }, [p]), b(() => {
429
+ R && (R.shape = e, R.size = Math.max(1e-4, r), R.radius = R.size / 2, R.mass = Math.max(1e-6, o ?? R.size ** 3), R.bounce = u, R.grabbable = c, R.pushable = s, R.gravity = a);
430
+ }, [R, e, r, o, u, c, s, a]);
431
+ const L = !p;
432
+ b(() => {
433
+ L && console.warn(`${Re.loggerPrefix} Touchable must be inside a HandTouch`);
434
+ }, [L]);
435
+ const G = T === void 0 ? /* @__PURE__ */ N(Dr, { shape: e, size: r, color: i, state: m }) : typeof T == "function" ? T(m) : T;
436
+ return /* @__PURE__ */ N("group", { ref: l, children: /* @__PURE__ */ N("group", { scale: m.grabbed ? Or : 1, children: G }) });
437
+ }, Dr = ({
438
+ shape: e,
439
+ size: r,
440
+ color: t,
441
+ state: n
442
+ }) => /* @__PURE__ */ _t("mesh", { children: [
443
+ e === "box" ? /* @__PURE__ */ N("boxGeometry", { args: [r, r, r] }) : /* @__PURE__ */ N("sphereGeometry", { args: [r / 2, 32, 20] }),
444
+ /* @__PURE__ */ N(
445
+ "meshStandardMaterial",
446
+ {
447
+ color: t,
448
+ emissive: t,
449
+ emissiveIntensity: n.grabbed ? 0.45 : n.hovered ? 0.25 : 0,
450
+ roughness: 0.45,
451
+ metalness: 0.05
452
+ }
453
+ )
454
+ ] }), ge = { leftShoulder: 11, rightShoulder: 12, leftWrist: 15, rightWrist: 16 }, br = 0, Ir = [
455
+ [5, 8],
456
+ [9, 12],
457
+ [13, 16],
458
+ [17, 20]
459
+ ], we = {
460
+ smile: 0.3,
461
+ mouthOpen: 0.25,
462
+ minVisibility: 0.5,
463
+ fingerExtension: 1.25
464
+ }, Nr = () => ({
465
+ facePresent: !1,
466
+ leftHandPresent: !1,
467
+ rightHandPresent: !1,
468
+ posePresent: !1,
469
+ smile: 0,
470
+ mouthOpen: 0,
471
+ smiling: !1,
472
+ mouthIsOpen: !1,
473
+ leftHandRaised: !1,
474
+ rightHandRaised: !1,
475
+ leftPalmOpen: !1,
476
+ rightPalmOpen: !1,
477
+ greeting: null
478
+ }), Ze = (e, r) => Math.hypot(e.x - r.x, e.y - r.y), et = (e, r = we.fingerExtension) => {
479
+ if (!e || e.landmarks.length < 21) return !1;
480
+ const t = e.landmarks[br];
481
+ let n = 0;
482
+ for (const [o, u] of Ir) {
483
+ const c = Ze(e.landmarks[o], t), s = Ze(e.landmarks[u], t);
484
+ c > 0 && s >= c * r && (n += 1);
485
+ }
486
+ return n >= 3;
487
+ }, tt = (e, r, t = we.minVisibility) => {
488
+ const { pose: n } = e;
489
+ if (!n || n.landmarks.length < 33) return !1;
490
+ const o = r === "left" ? ge.leftWrist : ge.rightWrist, u = r === "left" ? ge.leftShoulder : ge.rightShoulder;
491
+ return n.visibility[o] < t || n.visibility[u] < t ? !1 : n.landmarks[o].y > n.landmarks[u].y;
492
+ }, Un = (e, r = {}, t = Nr()) => {
493
+ const n = { ...we, ...r }, { face: o, leftHand: u, rightHand: c, pose: s } = e;
494
+ t.facePresent = o !== null, t.leftHandPresent = u !== null, t.rightHandPresent = c !== null, t.posePresent = s !== null;
495
+ const a = o == null ? void 0 : o.blendshapes;
496
+ return t.smile = a ? ((a.mouthSmileLeft ?? 0) + (a.mouthSmileRight ?? 0)) / 2 : 0, t.mouthOpen = (a == null ? void 0 : a.jawOpen) ?? 0, t.smiling = o !== null && t.smile >= n.smile, t.mouthIsOpen = o !== null && t.mouthOpen >= n.mouthOpen, t.leftHandRaised = tt(e, "left", n.minVisibility), t.rightHandRaised = tt(e, "right", n.minVisibility), t.leftPalmOpen = et(u, n.fingerExtension), t.rightPalmOpen = et(c, n.fingerExtension), t.smiling && t.rightHandRaised && t.rightPalmOpen ? t.greeting = "right" : t.smiling && t.leftHandRaised && t.leftPalmOpen ? t.greeting = "left" : t.greeting = null, t;
497
+ }, vr = {
498
+ node: null,
499
+ ready: !1,
500
+ status: "loading",
501
+ error: null
502
+ }, ft = At(null), xr = () => Se(ft) ?? vr, rt = (e, r) => r ? "error" : e ? e.getStatus() : "loading", Cr = ({
503
+ children: e,
504
+ active: r = !0,
505
+ onStatusChange: t,
506
+ modelUrl: n,
507
+ delegate: o,
508
+ minFaceDetectionConfidence: u,
509
+ minFacePresenceConfidence: c,
510
+ minPoseDetectionConfidence: s,
511
+ minPosePresenceConfidence: a,
512
+ minHandLandmarksConfidence: i,
513
+ outputFaceBlendshapes: d,
514
+ targetFps: f,
515
+ hands: h,
516
+ analysisMaxDimension: g,
517
+ holdMs: S,
518
+ predictMs: T
519
+ }) => {
520
+ const p = v(() => {
521
+ const O = {};
522
+ return n !== void 0 && (O.modelUrl = n), o !== void 0 && (O.delegate = o), u !== void 0 && (O.minFaceDetectionConfidence = u), c !== void 0 && (O.minFacePresenceConfidence = c), s !== void 0 && (O.minPoseDetectionConfidence = s), a !== void 0 && (O.minPosePresenceConfidence = a), i !== void 0 && (O.minHandLandmarksConfidence = i), d !== void 0 && (O.outputFaceBlendshapes = d), f !== void 0 && (O.targetFps = f), Object.keys(O).length > 0 ? O : void 0;
523
+ }, [
524
+ o,
525
+ u,
526
+ c,
527
+ i,
528
+ s,
529
+ a,
530
+ n,
531
+ d,
532
+ f
533
+ ]), { ready: l, node: m, error: x } = fe(
534
+ J.HOLISTIC_TRACKER,
535
+ p,
536
+ r
537
+ );
538
+ b(() => {
539
+ m && m.setOptions(
540
+ Dt({ hands: h, analysisMaxDimension: g, holdMs: S, predictMs: T })
541
+ );
542
+ }, [m, h, g, S, T]);
543
+ const [R, C] = W(() => rt(m, x)), E = _(R), A = _(t);
544
+ A.current = t, U(() => {
545
+ var L;
546
+ const O = rt(m, x);
547
+ O !== E.current && (E.current = O, C(O), (L = A.current) == null || L.call(A, O, x ?? (m == null ? void 0 : m.getError()) ?? null));
548
+ });
549
+ const D = v(
550
+ () => ({
551
+ node: m,
552
+ ready: l && R === "ready",
553
+ status: R,
554
+ error: x ?? (m == null ? void 0 : m.getError()) ?? null
555
+ }),
556
+ [m, l, R, x]
557
+ );
558
+ return /* @__PURE__ */ N(ft.Provider, { value: D, children: e });
559
+ }, Mr = () => {
560
+ const { camera: e } = q(), r = _(e);
561
+ return r.current !== e && (r.current = e), r;
562
+ }, Fe = (e, r) => {
563
+ const t = _(null), { node: n, ready: o } = xr(), u = Mr();
564
+ return U(() => {
565
+ const c = t.current;
566
+ if (!c) return;
567
+ const s = o && n ? e(n.getResult()) : null;
568
+ if (!s) {
569
+ c.visible = !1;
570
+ return;
571
+ }
572
+ c.visible = !0, c.position.copy(r(s, u.current));
573
+ }), { groupRef: t, cameraRef: u, node: n };
574
+ }, ht = ({ children: e }) => {
575
+ const r = _({ x: 0, y: 0, z: 0, visibility: 0 }), t = Le(), { groupRef: n, cameraRef: o, node: u } = Fe(
576
+ (a) => {
577
+ var i;
578
+ return ((i = a.face) == null ? void 0 : i.landmarks[4]) ?? null;
195
579
  },
580
+ (a, i) => Ke(a, i)
581
+ ), c = Y(
582
+ (a, i) => {
583
+ var h;
584
+ const d = (h = u == null ? void 0 : u.getResult().face) == null ? void 0 : h.landmarks;
585
+ if (!d || d.length === 0) return null;
586
+ const f = vt(
587
+ a,
588
+ d,
589
+ i,
590
+ r.current,
591
+ t
592
+ );
593
+ return f ? { position: Ke(f, o.current) } : null;
594
+ },
595
+ [o, u, t]
596
+ ), s = v(
597
+ () => ({ type: "face", resolveLandmark: c }),
598
+ [c]
599
+ );
600
+ return /* @__PURE__ */ N(me.Provider, { value: s, children: /* @__PURE__ */ N("group", { ref: n, renderOrder: pe.TRACKED, visible: !1, children: e }) });
601
+ };
602
+ ht.displayName = "HolisticTracker.Face";
603
+ const mt = ({ hand: e, children: r }) => {
604
+ const t = Y(
605
+ (a) => e === "left" ? a.leftHand : a.rightHand,
196
606
  [e]
197
- ), c = _(
198
- () => ({ type: "body", resolveLandmark: s }),
199
- [s]
607
+ ), { groupRef: n, cameraRef: o, node: u } = Fe(
608
+ (a) => {
609
+ var i;
610
+ return ((i = t(a)) == null ? void 0 : i.landmarks[0]) ?? null;
611
+ },
612
+ $
613
+ ), c = Y(
614
+ (a) => {
615
+ var f;
616
+ const i = lt[a];
617
+ if (i === void 0 || !u) return null;
618
+ const d = (f = t(u.getResult())) == null ? void 0 : f.landmarks[i];
619
+ return d ? { position: $(d, o.current) } : null;
620
+ },
621
+ [o, u, t]
622
+ ), s = v(
623
+ () => ({ type: "hand", resolveLandmark: c }),
624
+ [c]
625
+ );
626
+ return /* @__PURE__ */ N(me.Provider, { value: s, children: /* @__PURE__ */ N("group", { ref: n, renderOrder: pe.TRACKED, visible: !1, children: r }) });
627
+ };
628
+ mt.displayName = "HolisticTracker.Hand";
629
+ const pt = ({ children: e }) => {
630
+ const { groupRef: r, cameraRef: t, node: n } = Fe(
631
+ (c) => {
632
+ var s;
633
+ return ((s = c.pose) == null ? void 0 : s.landmarks[0]) ?? null;
634
+ },
635
+ $
636
+ ), o = Y(
637
+ (c) => {
638
+ var d;
639
+ const s = (d = n == null ? void 0 : n.getResult().pose) == null ? void 0 : d.landmarks;
640
+ if (!s) return null;
641
+ if (c === "body.neck") {
642
+ const f = s[11], h = s[12];
643
+ if (!f || !h) return null;
644
+ const g = { x: (f.x + h.x) / 2, y: (f.y + h.y) / 2, z: (f.z + h.z) / 2 };
645
+ return { position: $(g, t.current) };
646
+ }
647
+ const a = Ct[c];
648
+ if (a === void 0) return null;
649
+ const i = s[a];
650
+ return i ? { position: $(i, t.current) } : null;
651
+ },
652
+ [t, n]
653
+ ), u = v(
654
+ () => ({ type: "body", resolveLandmark: o }),
655
+ [o]
200
656
  );
201
- return /* @__PURE__ */ A(O.Provider, { value: c, children: /* @__PURE__ */ A("group", { ref: n, renderOrder: z.TRACKED, children: r }) });
202
- }, B = (e, t) => {
203
- const r = new U.Vector3(e.x, e.y, e.z);
204
- r.unproject(t);
205
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
206
- return t.position.clone().add(n.multiplyScalar(o));
207
- }, X = ["portrait"], Be = ({ type: e, active: t = !0, children: r }) => (N(F.BACKGROUND_SEGMENTATION, { type: e }, t), L(() => {
208
- X.includes(e) || console.warn(
209
- `[Segmentation] unsupported type "${e}"; valid values: ${X.join(", ")}`
657
+ return /* @__PURE__ */ N(me.Provider, { value: u, children: /* @__PURE__ */ N("group", { ref: r, renderOrder: pe.TRACKED, visible: !1, children: e }) });
658
+ };
659
+ pt.displayName = "HolisticTracker.Body";
660
+ const ke = Cr;
661
+ ke.Face = ht;
662
+ ke.Hand = mt;
663
+ ke.Body = pt;
664
+ const Gn = ({ type: e, active: r = !0, children: t }) => (fe(J.BACKGROUND_SEGMENTATION, { type: e }, r), b(() => {
665
+ Xe.includes(e) || console.warn(
666
+ `[Segmentation] unsupported type "${e}"; valid values: ${Xe.join(", ")}`
210
667
  );
211
- }, [e]), /* @__PURE__ */ A(J, { children: r })), ie = 800, ce = 200, ae = () => ({
668
+ }, [e]), /* @__PURE__ */ N(St, { children: t })), Hr = 800, Lr = 200, wr = () => ({
212
669
  armed: !1,
213
670
  armStart: null,
214
671
  holdStart: null,
215
672
  fired: !1
216
- }), le = (e, {
217
- isTrigger: t,
218
- gesture: r,
673
+ }), Fr = (e, {
674
+ isTrigger: r,
675
+ gesture: t,
219
676
  now: n,
220
677
  mode: o,
221
678
  debounceMs: u,
222
- holdMs: i
679
+ holdMs: c
223
680
  }) => {
224
681
  if (e.fired) return null;
225
682
  if (o === "hold") {
226
- if (t && r) {
227
- if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >= i)
228
- return e.fired = !0, r;
683
+ if (r && t) {
684
+ if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >= c)
685
+ return e.fired = !0, t;
229
686
  } else
230
687
  e.holdStart = null;
231
688
  return null;
232
689
  }
233
- return e.armed ? t && r ? (e.fired = !0, r) : null : (t ? e.armStart = null : (e.armStart === null && (e.armStart = n), n - e.armStart >= u && (e.armed = !0)), null);
690
+ return e.armed ? r && t ? (e.fired = !0, t) : null : (r ? e.armStart = null : (e.armStart === null && (e.armStart = n), n - e.armStart >= u && (e.armed = !0)), null);
234
691
  };
235
- function de({
692
+ function kr({
236
693
  gestures: e,
237
- mode: t = "arm",
238
- debounceMs: r = ie,
239
- holdMs: n = ce,
694
+ mode: r = "arm",
695
+ debounceMs: t = Hr,
696
+ holdMs: n = Lr,
240
697
  onTrigger: o,
241
698
  enabled: u = !0
242
699
  }) {
243
- const { ready: i, node: a } = N(F.GESTURE_TRACKER), y = R(o);
244
- L(() => {
245
- y.current = o;
700
+ const { ready: c, node: s } = fe(J.GESTURE_TRACKER), a = _(o);
701
+ b(() => {
702
+ a.current = o;
246
703
  }, [o]);
247
- const s = R(/* @__PURE__ */ new Set());
248
- L(() => {
249
- s.current = new Set(Array.isArray(e) ? e : [e]);
250
- }, [e]);
251
- const c = R(ae());
704
+ const i = _(/* @__PURE__ */ new Set());
252
705
  b(() => {
253
- if (!u || !i || !a) return;
254
- const l = a.gesture, f = !!(l && s.current.has(l)), h = le(c.current, {
255
- isTrigger: f,
256
- gesture: l,
706
+ i.current = new Set(Array.isArray(e) ? e : [e]);
707
+ }, [e]);
708
+ const d = _(wr());
709
+ U(() => {
710
+ if (!u || !c || !s) return;
711
+ const f = s.gesture, h = !!(f && i.current.has(f)), g = Fr(d.current, {
712
+ isTrigger: h,
713
+ gesture: f,
257
714
  now: performance.now(),
258
- mode: t,
259
- debounceMs: r,
715
+ mode: r,
716
+ debounceMs: t,
260
717
  holdMs: n
261
718
  });
262
- h && y.current(h);
719
+ g && a.current(g);
263
720
  });
264
721
  }
265
- const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "end" : t ? "stay" : "none", fe = {
722
+ const jn = (e) => (kr(e), null), Br = ({
723
+ source: e,
724
+ face: r,
725
+ canvas: t,
726
+ outputSize: n,
727
+ padding: o = 0.2
728
+ }) => ur({ source: e, bounds: r.bounds, canvas: t, outputSize: n, padding: o }), Ae = (e) => ({ value: e, confidence: 1 }), Te = (e, r, t, n) => ({
729
+ name: e,
730
+ kind: "face",
731
+ description: r,
732
+ defaults: n,
733
+ measure: (o) => o ? Ae(t(o)) : null
734
+ }), j = (e, r, t, n) => ({
735
+ name: e,
736
+ kind: "hand",
737
+ description: r,
738
+ defaults: n,
739
+ measure: (o) => o && o.length >= 21 ? Ae(t(o)) : null
740
+ }), he = (e, r, t, n) => ({
741
+ name: e,
742
+ kind: "body",
743
+ description: r,
744
+ defaults: n,
745
+ measure: (o, u, c, s) => o && o.length >= 33 ? Ae(t(o, (s == null ? void 0 : s.mirrored) ?? !1)) : null
746
+ }), ve = (e) => () => ({
747
+ tracker: new Kt(e),
748
+ wasPresent: !1
749
+ }), xe = (e, r, t) => r === null ? (e.wasPresent = !1, null) : (e.wasPresent || e.tracker.reset(), e.wasPresent = !0, Ae(e.tracker.push(r, t))), Ce = {
750
+ enterThreshold: 0.99,
751
+ exitThreshold: 0.3,
752
+ cooldownMs: 600
753
+ }, gt = {
754
+ // ── Face ───────────────────────────────────────────────────────────────
755
+ mouthOpen: Te(
756
+ "mouthOpen",
757
+ "Jaw open (blendshape jawOpen).",
758
+ (e) => Ee(e, "mouthOpen")
759
+ ),
760
+ smile: Te(
761
+ "smile",
762
+ "Mean of the two mouthSmile blendshapes.",
763
+ (e) => (Je(e, "mouthSmileLeft") + Je(e, "mouthSmileRight")) / 2,
764
+ { enterThreshold: 0.4 }
765
+ ),
766
+ blink: Te(
767
+ "blink",
768
+ "Both eyes closed (min of the eyeBlink blendshapes).",
769
+ (e) => Ee(e, "eyeBlink"),
770
+ { enterThreshold: 0.55, holdMs: 50 }
771
+ ),
772
+ browRaise: Te(
773
+ "browRaise",
774
+ "Eyebrows raised (max of the brow-up blendshapes).",
775
+ (e) => Ee(e, "browRaise"),
776
+ { enterThreshold: 0.45 }
777
+ ),
778
+ headNod: {
779
+ name: "headNod",
780
+ kind: "face",
781
+ description: "Pitch oscillation: three turning points of at least 0.12 rad within 1.5 s.",
782
+ defaults: Ce,
783
+ createMemory: ve({ minAmplitude: 0.12, requiredReversals: 3, windowMs: 1500 }),
784
+ measure: (e, r, t) => xe(r, e ? e.pose.rotation.x : null, t)
785
+ },
786
+ headShake: {
787
+ name: "headShake",
788
+ kind: "face",
789
+ description: "Yaw oscillation: three turning points of at least 0.15 rad within 1.5 s.",
790
+ defaults: Ce,
791
+ createMemory: ve({ minAmplitude: 0.15, requiredReversals: 3, windowMs: 1500 }),
792
+ measure: (e, r, t) => xe(r, e ? e.pose.rotation.y : null, t)
793
+ },
794
+ // ── Hand ───────────────────────────────────────────────────────────────
795
+ pinch: j(
796
+ "pinch",
797
+ "Thumb and index tips touching, relative to palm size.",
798
+ Xt,
799
+ {
800
+ enterThreshold: 0.75,
801
+ exitThreshold: 0.5
802
+ }
803
+ ),
804
+ grab: j("grab", "Fist: index to pinky curled toward the wrist.", zt, {
805
+ enterThreshold: 0.7,
806
+ exitThreshold: 0.45
807
+ }),
808
+ openPalm: j("openPalm", "Index to pinky extended.", Vt, {
809
+ enterThreshold: 0.7,
810
+ exitThreshold: 0.45
811
+ }),
812
+ handRaised: j(
813
+ "handRaised",
814
+ "Wrist in the upper part of the frame (0 bottom edge, 1 top edge).",
815
+ Wt,
816
+ { enterThreshold: 0.7, exitThreshold: 0.6 }
817
+ ),
818
+ // Finger-count signs: each required finger must agree; 1 only when all do.
819
+ oneFinger: j(
820
+ "oneFinger",
821
+ "Index extended, other fingers curled (pointing).",
822
+ (e) => ue(e, { fingers: [!0, !1, !1, !1] }),
823
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
824
+ ),
825
+ peaceSign: j(
826
+ "peaceSign",
827
+ "Index and middle extended, ring and pinky curled.",
828
+ (e) => ue(e, { fingers: [!0, !0, !1, !1] }),
829
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
830
+ ),
831
+ threeFingers: j(
832
+ "threeFingers",
833
+ "Index, middle and ring extended, pinky curled.",
834
+ (e) => ue(e, { fingers: [!0, !0, !0, !1] }),
835
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
836
+ ),
837
+ fourFingers: j(
838
+ "fourFingers",
839
+ "Index to pinky extended, thumb tucked.",
840
+ (e) => ue(e, { fingers: [!0, !0, !0, !0], thumb: !1 }),
841
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
842
+ ),
843
+ fist: j(
844
+ "fist",
845
+ "All four fingers curled and the thumb tucked.",
846
+ (e) => ue(e, { fingers: [!1, !1, !1, !1], thumb: !1 }),
847
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
848
+ ),
849
+ palm: j(
850
+ "palm",
851
+ "All four fingers extended and the thumb out.",
852
+ (e) => ue(e, { fingers: [!0, !0, !0, !0], thumb: !0 }),
853
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
854
+ ),
855
+ thumbUp: j(
856
+ "thumbUp",
857
+ "Thumb out and pointing up, fingers curled.",
858
+ (e) => Ve(e, "up"),
859
+ { enterThreshold: 0.6, exitThreshold: 0.4 }
860
+ ),
861
+ thumbDown: j(
862
+ "thumbDown",
863
+ "Thumb out and pointing down, fingers curled.",
864
+ (e) => Ve(e, "down"),
865
+ { enterThreshold: 0.6, exitThreshold: 0.4 }
866
+ ),
867
+ wave: {
868
+ name: "wave",
869
+ kind: "hand",
870
+ description: "Wrist swinging side to side: three turning points of at least 0.08 within 1.2 s.",
871
+ defaults: Ce,
872
+ createMemory: ve({ minAmplitude: 0.08, requiredReversals: 3, windowMs: 1200 }),
873
+ measure: (e, r, t) => xe(r, e && e.length >= 21 ? e[0].x : null, t)
874
+ },
875
+ // ── Body ───────────────────────────────────────────────────────────────
876
+ armRaisedLeft: he(
877
+ "armRaisedLeft",
878
+ "Person's own left wrist above their left shoulder, in shoulder widths, on every feed.",
879
+ (e, r) => ce(e, "left", r),
880
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
881
+ ),
882
+ armRaisedRight: he(
883
+ "armRaisedRight",
884
+ "Person's own right wrist above their right shoulder, in shoulder widths, on every feed.",
885
+ (e, r) => ce(e, "right", r),
886
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
887
+ ),
888
+ armRaised: he(
889
+ "armRaised",
890
+ "Either wrist above its shoulder.",
891
+ (e) => Math.max(ce(e, "left"), ce(e, "right")),
892
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
893
+ ),
894
+ bothArmsRaised: he(
895
+ "bothArmsRaised",
896
+ "Both wrists above their shoulders.",
897
+ (e) => Math.min(ce(e, "left"), ce(e, "right")),
898
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
899
+ ),
900
+ tPose: he("tPose", "Both arms level and outstretched.", Yt, {
901
+ enterThreshold: 0.6,
902
+ exitThreshold: 0.4,
903
+ holdMs: 150
904
+ })
905
+ }, Kn = Object.keys(gt), Pr = (e) => typeof e == "string" ? gt[e] : e, Yn = (e) => e, Ur = {
906
+ face: J.FACE_TRACKER,
907
+ hand: J.HAND_TRACKER,
908
+ body: J.BODY_TRACKER
909
+ }, nt = (e) => ut(He(e)), Gr = (e, r = {}) => {
910
+ var Z;
911
+ const t = v(() => Pr(e), [e]), {
912
+ active: n = !0,
913
+ faceIndex: o = 0,
914
+ numFaces: u,
915
+ hand: c,
916
+ handIndex: s = 0,
917
+ bodyIndex: a = 0,
918
+ bodyId: i,
919
+ subject: d,
920
+ numBodies: f,
921
+ targetFps: h,
922
+ onBegin: g,
923
+ onEnd: S,
924
+ onChange: T,
925
+ ...p
926
+ } = r, l = Ur[t.kind], m = Math.max(u ?? o + 1, o + 1), x = v(() => {
927
+ const F = {};
928
+ return t.kind === "face" && (F.numFaces = m), h !== void 0 && h > 0 && (F.targetFps = h), Object.keys(F).length > 0 ? F : void 0;
929
+ }, [t.kind, m, h]), { node: R, ready: C } = fe(l, x, n), E = yt(), A = t.kind === "body" ? ar({ bodyId: i, subject: d, numBodies: f }) : 0;
930
+ b(() => {
931
+ var F;
932
+ if (!(!R || A === 0))
933
+ return (F = R.requestBodies) == null ? void 0 : F.call(R, E, A);
934
+ }, [R, E, A]);
935
+ const D = _(bt), { camera: O } = q();
936
+ b(() => {
937
+ !R || t.kind !== "face" || R.setCamera(O, o);
938
+ }, [O, t.kind, o, R]);
939
+ const L = v(
940
+ () => qe(
941
+ p,
942
+ qe(t.defaults)
943
+ ),
944
+ // eslint-disable-next-line react-hooks/exhaustive-deps
945
+ [
946
+ t,
947
+ p.enterThreshold,
948
+ p.exitThreshold,
949
+ p.holdMs,
950
+ p.cooldownMs,
951
+ p.minConfidence,
952
+ p.lostGraceMs
953
+ ]
954
+ ), G = _(He(t.name)), I = _((Z = t.createMemory) == null ? void 0 : Z.call(t)), y = _(fr()), [M, w] = W(() => nt(t.name)), V = _(M);
955
+ b(() => {
956
+ var k;
957
+ G.current = He(t.name), I.current = (k = t.createMemory) == null ? void 0 : k.call(t);
958
+ const F = nt(t.name);
959
+ V.current = F, w(F);
960
+ }, [t]);
961
+ const z = _({ onBegin: g, onEnd: S, onChange: T });
962
+ z.current = { onBegin: g, onEnd: S, onChange: T };
963
+ const Q = Le(), X = _({ mirrored: Q });
964
+ X.current.mirrored = Q;
965
+ const B = _({ faceIndex: o, hand: c, handIndex: s, bodyIndex: a, bodyId: i, subject: d, active: n });
966
+ return B.current = { faceIndex: o, hand: c, handIndex: s, bodyIndex: a, bodyId: i, subject: d, active: n }, U(() => {
967
+ var ae, ie;
968
+ const F = performance.now(), k = B.current;
969
+ let ne = null;
970
+ if (k.active && C && R) {
971
+ let re;
972
+ if (t.kind === "face")
973
+ re = hr(R, k.faceIndex, y.current);
974
+ else if (t.kind === "hand")
975
+ re = (ae = dt(
976
+ R,
977
+ k.hand,
978
+ k.handIndex
979
+ )) == null ? void 0 : ae.coordinates;
980
+ else {
981
+ const Ge = R;
982
+ let De = k.bodyIndex;
983
+ if (k.bodyId !== void 0 || k.subject) {
984
+ const je = ir(Ge, k, D.current);
985
+ D.current = je.memory, De = ((ie = je.body) == null ? void 0 : ie.index) ?? null;
986
+ }
987
+ re = De === null ? void 0 : Ge.getLandmarks2D(De);
988
+ }
989
+ ne = t.measure(re, I.current, F, X.current);
990
+ }
991
+ const se = lr(G.current, ne, F, L);
992
+ if (dr(V.current, se)) return;
993
+ const P = ut(se);
994
+ V.current = P, w(P);
995
+ const { onBegin: oe, onEnd: K, onChange: te } = z.current;
996
+ P.justBegan && (oe == null || oe(P)), P.justEnded && (K == null || K(P)), te == null || te(P);
997
+ }), M;
998
+ }, Wn = ({ gesture: e, ...r }) => (Gr(e, r), null), st = /* @__PURE__ */ new WeakMap(), jr = (e, r) => {
999
+ const { visibility: t, mirrored: n, aspect: o, shapeLimits: u, view: c } = r;
1000
+ if (u || c)
1001
+ return ze(e, {
1002
+ mirrored: n,
1003
+ visibility: t,
1004
+ aspect: o,
1005
+ limits: u,
1006
+ view: c
1007
+ });
1008
+ const s = st.get(e);
1009
+ if (s && s.mirrored === n && s.aspect === o) return s;
1010
+ const a = ze(e, { mirrored: n, visibility: t, aspect: o });
1011
+ return st.set(e, a), a;
1012
+ }, Kr = (e) => {
1013
+ if (!e) return;
1014
+ const r = {};
1015
+ let t = !1;
1016
+ for (const n of Object.keys(e))
1017
+ n in nr && e[n] !== void 0 && (r[n] = e[n], t = !0);
1018
+ return t ? r : void 0;
1019
+ }, Yr = (e) => {
1020
+ const {
1021
+ pose: r,
1022
+ move: t,
1023
+ bodyIndex: n = 0,
1024
+ bodyId: o,
1025
+ subject: u,
1026
+ numBodies: c,
1027
+ active: s = !0,
1028
+ targetFps: a,
1029
+ limits: i,
1030
+ view: d,
1031
+ onBegin: f,
1032
+ onEnd: h,
1033
+ onChange: g,
1034
+ ...S
1035
+ } = e, T = t !== void 0 ? { move: t } : { pose: r }, p = t !== void 0 ? `move:${typeof t == "string" ? t : t.name}` : `pose:${mr(r)}`, l = v(
1036
+ () => a !== void 0 && a > 0 ? { targetFps: a } : void 0,
1037
+ [a]
1038
+ ), {
1039
+ node: m,
1040
+ ready: x,
1041
+ index: R
1042
+ } = cr({ bodyIndex: n, bodyId: o, subject: u, numBodies: c, active: s, acquireOptions: l }), C = Le(), E = or(), A = JSON.stringify(i ?? null), D = v(() => Kr(i), [A]), O = JSON.stringify(d ?? null), L = v(() => d, [O]), G = JSON.stringify(S) + A, I = { ...S, limits: i }, y = _(null), M = _("");
1043
+ (y.current === null || M.current !== p) && (y.current = qt(T, I), M.current = p), t !== void 0 ? y.current.move = Jt(t) : y.current.pose = r;
1044
+ const [w, V] = W(
1045
+ () => be(y.current)
1046
+ ), z = _(w);
1047
+ b(() => {
1048
+ const Z = be(y.current);
1049
+ z.current = Z, V(Z);
1050
+ }, [p]), b(() => {
1051
+ y.current && $t(y.current, T, I);
1052
+ }, [G]);
1053
+ const Q = _({ onBegin: f, onEnd: h, onChange: g });
1054
+ Q.current = { onBegin: f, onEnd: h, onChange: g };
1055
+ const X = _(null), B = _(null);
1056
+ return U(() => {
1057
+ var re;
1058
+ const Z = y.current;
1059
+ if (!Z) return;
1060
+ const F = performance.now();
1061
+ let k = null, ne = !0;
1062
+ const se = (s && x && m ? R() : null) ?? -1, P = se < 0 || m == null ? void 0 : m.getLandmarks2D(se);
1063
+ P && P.length >= rr ? (ne = P !== X.current || !B.current, k = ne ? jr(P, {
1064
+ visibility: (re = m == null ? void 0 : m.getVisibility) == null ? void 0 : re.call(m, se),
1065
+ mirrored: C,
1066
+ aspect: E,
1067
+ shapeLimits: D,
1068
+ view: L
1069
+ }) : B.current, X.current = P, B.current = k) : (X.current = null, B.current = null);
1070
+ const oe = Qt(Z, k, F, ne);
1071
+ if (Zt(z.current, oe)) return;
1072
+ const K = be(oe);
1073
+ z.current = K, V(K);
1074
+ const { onBegin: te, onEnd: ae, onChange: ie } = Q.current;
1075
+ K.justBegan && (te == null || te(K)), K.justEnded && (ae == null || ae(K)), ie == null || ie(K);
1076
+ }), w;
1077
+ }, Vn = (e) => (Yr(e), null), Be = 1, Pe = Object.freeze({
1078
+ version: Be,
1079
+ orientation: 0,
1080
+ mirrored: "auto",
1081
+ scale: 1,
1082
+ offset: Object.freeze({ x: 0, y: 0 }),
1083
+ face: null,
1084
+ body: null,
1085
+ updatedAt: 0
1086
+ }), Wr = (e = {}) => ye(Pe, e, 0), Vr = [0, 90, 180, 270], zr = (e) => Math.min(4, Math.max(0.25, e)), ye = (e, r, t = Date.now()) => ({
1087
+ version: Be,
1088
+ orientation: r.orientation !== void 0 && Vr.includes(r.orientation) ? r.orientation : e.orientation,
1089
+ mirrored: r.mirrored === !0 || r.mirrored === !1 || r.mirrored === "auto" ? r.mirrored : e.mirrored,
1090
+ scale: r.scale !== void 0 && Number.isFinite(r.scale) && r.scale > 0 ? zr(r.scale) : e.scale,
1091
+ offset: r.offset && Number.isFinite(r.offset.x) && Number.isFinite(r.offset.y) ? { x: r.offset.x, y: r.offset.y } : { ...e.offset },
1092
+ face: r.face !== void 0 ? r.face : e.face,
1093
+ body: r.body !== void 0 ? r.body : e.body,
1094
+ updatedAt: t
1095
+ }), Xr = (e = Date.now()) => ye(Pe, {}, e), zn = (e) => e.orientation === 0 && e.mirrored === "auto" && e.scale === 1 && e.offset.x === 0 && e.offset.y === 0, qr = (e, r) => e.mirrored === "auto" ? !1 : e.mirrored !== It(r), Jr = (e, r, t, n = { x: 0, y: 0 }) => {
1096
+ let { x: o, y: u } = e;
1097
+ switch (r.orientation) {
1098
+ case 90:
1099
+ [o, u] = [1 - u, o];
1100
+ break;
1101
+ case 180:
1102
+ [o, u] = [1 - o, 1 - u];
1103
+ break;
1104
+ case 270:
1105
+ [o, u] = [u, 1 - o];
1106
+ break;
1107
+ }
1108
+ return qr(r, t) && (o = 1 - o), o = 0.5 + (o - 0.5) * r.scale + r.offset.x, u = 0.5 + (u - 0.5) * r.scale + r.offset.y, n.x = o, n.y = u, e.z !== void 0 && (n.z = e.z), n;
1109
+ }, _e = (e, r) => e && r ? Math.hypot(e.x - r.x, e.y - r.y) : null, $r = Object.freeze({
1110
+ leftTemple: 454,
1111
+ rightTemple: 234,
1112
+ leftEyeOuter: 263,
1113
+ rightEyeOuter: 33
1114
+ }), Tt = (e, r = Date.now()) => {
1115
+ if (!e || e.length < 468) return null;
1116
+ const { leftTemple: t, rightTemple: n, leftEyeOuter: o, rightEyeOuter: u } = $r, c = _e(e[t], e[n]), s = _e(e[o], e[u]);
1117
+ return !c || !s ? null : { faceWidth: c, eyeDistance: s, capturedAt: r };
1118
+ }, Qr = Object.freeze({
1119
+ leftShoulder: 11,
1120
+ rightShoulder: 12,
1121
+ leftHip: 23,
1122
+ rightHip: 24
1123
+ }), Et = (e, r = Date.now()) => {
1124
+ if (!e || e.length < 33) return null;
1125
+ const { leftShoulder: t, rightShoulder: n, leftHip: o, rightHip: u } = Qr, c = _e(e[t], e[n]), s = _e(e[o], e[u]), a = e[t], i = e[n], d = e[o], f = e[u];
1126
+ if (!c || !s || !a || !i || !d || !f) return null;
1127
+ const h = Math.hypot(
1128
+ (a.x + i.x) / 2 - (d.x + f.x) / 2,
1129
+ (a.y + i.y) / 2 - (d.y + f.y) / 2
1130
+ );
1131
+ return { shoulderWidth: c, hipWidth: s, torsoLength: h, capturedAt: r };
1132
+ }, Zr = (e, r) => {
1133
+ const t = r.face, n = Tt(e, 0);
1134
+ return !t || !n ? null : t.faceWidth > 0 && n.faceWidth > 0 ? n.faceWidth / t.faceWidth : t.eyeDistance > 0 && n.eyeDistance > 0 ? n.eyeDistance / t.eyeDistance : null;
1135
+ }, en = (e, r) => {
1136
+ const t = r.body, n = Et(e, 0);
1137
+ return !t || !n || t.shoulderWidth <= 0 ? null : n.shoulderWidth / t.shoulderWidth;
1138
+ }, Oe = "vincentt.xr.calibration", Ue = () => {
1139
+ try {
1140
+ return typeof localStorage < "u" ? localStorage : null;
1141
+ } catch {
1142
+ return null;
1143
+ }
1144
+ }, tn = (e = Oe, r = Ue()) => {
1145
+ if (!r) return null;
1146
+ try {
1147
+ const t = r.getItem(e);
1148
+ if (!t) return null;
1149
+ const n = JSON.parse(t);
1150
+ return !n || typeof n != "object" || n.version !== Be ? null : ye(
1151
+ Pe,
1152
+ {
1153
+ orientation: n.orientation,
1154
+ mirrored: n.mirrored,
1155
+ scale: n.scale,
1156
+ offset: n.offset,
1157
+ face: n.face ?? null,
1158
+ body: n.body ?? null
1159
+ },
1160
+ typeof n.updatedAt == "number" ? n.updatedAt : 0
1161
+ );
1162
+ } catch {
1163
+ return null;
1164
+ }
1165
+ }, rn = (e, r = Oe, t = Ue()) => {
1166
+ if (!t) return !1;
1167
+ try {
1168
+ return t.setItem(r, JSON.stringify(e)), !0;
1169
+ } catch {
1170
+ return !1;
1171
+ }
1172
+ }, nn = (e = Oe, r = Ue()) => {
1173
+ if (r)
1174
+ try {
1175
+ r.removeItem(e);
1176
+ } catch {
1177
+ }
1178
+ }, Xn = (e = {}) => {
1179
+ const { storageKey: r = Oe, persist: t = !0 } = e, n = e.storage === void 0 ? void 0 : e.storage, o = _(e.initial), { session: u } = at(), c = Ot(
1180
+ (l) => u.store.subscribe(l),
1181
+ () => u.store.getSnapshot().sourceKind,
1182
+ () => {
1183
+ }
1184
+ ), [s, a] = W(
1185
+ () => Wr(o.current)
1186
+ ), [i, d] = W(!t), f = _(s);
1187
+ f.current = s, b(() => {
1188
+ if (!t) {
1189
+ d(!0);
1190
+ return;
1191
+ }
1192
+ const l = tn(r, n);
1193
+ l && (f.current = l, a(l)), d(!0);
1194
+ }, [t, r, n]);
1195
+ const h = Y(
1196
+ (l) => (f.current = l, a(l), t && rn(l, r, n), l),
1197
+ [t, r, n]
1198
+ ), g = Y(
1199
+ (l) => h(ye(f.current, l)),
1200
+ [h]
1201
+ ), S = Y(() => {
1202
+ const l = Xr();
1203
+ return f.current = l, a(l), t && nn(r, n), l;
1204
+ }, [t, r, n]), T = Y(
1205
+ (l) => {
1206
+ const m = Tt(l);
1207
+ return m ? (g({ face: m }), !0) : !1;
1208
+ },
1209
+ [g]
1210
+ ), p = Y(
1211
+ (l) => {
1212
+ const m = Et(l);
1213
+ return m ? (g({ body: m }), !0) : !1;
1214
+ },
1215
+ [g]
1216
+ );
1217
+ return v(
1218
+ () => ({
1219
+ calibration: s,
1220
+ hydrated: i,
1221
+ update: g,
1222
+ reset: S,
1223
+ calibrateFace: T,
1224
+ calibrateBody: p,
1225
+ applyToFeedPoint: (l, m) => Jr(l, s, c, m),
1226
+ faceDistance: (l) => Zr(l, s),
1227
+ bodyScale: (l) => en(l, s),
1228
+ sourceKind: c
1229
+ }),
1230
+ [s, i, g, S, T, p, c]
1231
+ );
1232
+ }, sn = (e, r) => r && !e ? "begin" : !r && e ? "end" : r ? "stay" : "none", on = {
266
1233
  face: null,
267
1234
  faces: [],
268
1235
  faceCount: 0,
@@ -270,239 +1237,67 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
270
1237
  justDetected: !1,
271
1238
  justLost: !1,
272
1239
  phase: "none"
273
- }, Oe = ({
1240
+ }, qn = ({
274
1241
  faceIndex: e = 0,
275
- numFaces: t,
276
- ...r
1242
+ numFaces: r,
1243
+ ...t
277
1244
  } = {}) => {
278
- const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0, o = te({
279
- ...r,
280
- numFaces: Math.max(t ?? n + 1, n + 1)
281
- }), u = R([]), i = R(n), a = R({ detected: !1, faceIndex: n }), [y, s] = P(fe), c = R(y);
282
- return L(() => {
283
- u.current = o, i.current = n;
284
- }, [o, n]), b(() => {
285
- const l = u.current, f = i.current, h = l[f] ?? null, g = !!h, d = a.current.faceIndex === f && a.current.detected, p = he(d, g);
286
- a.current = { detected: g, faceIndex: f };
287
- const m = {
288
- face: h,
289
- faces: l,
290
- faceCount: l.length,
291
- detected: g,
1245
+ const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0, o = pr({
1246
+ ...t,
1247
+ numFaces: Math.max(r ?? n + 1, n + 1)
1248
+ }), u = _([]), c = _(n), s = _({ detected: !1, faceIndex: n }), [a, i] = W(on), d = _(a);
1249
+ return b(() => {
1250
+ u.current = o, c.current = n;
1251
+ }, [o, n]), U(() => {
1252
+ const f = u.current, h = c.current, g = f[h] ?? null, S = !!g, T = s.current.faceIndex === h && s.current.detected, p = sn(T, S);
1253
+ s.current = { detected: S, faceIndex: h };
1254
+ const l = {
1255
+ face: g,
1256
+ faces: f,
1257
+ faceCount: f.length,
1258
+ detected: S,
292
1259
  justDetected: p === "begin",
293
1260
  justLost: p === "end",
294
1261
  phase: p
295
- }, E = c.current;
296
- E.face === m.face && E.faces === m.faces && E.faceCount === m.faceCount && E.detected === m.detected && E.justDetected === m.justDetected && E.justLost === m.justLost && E.phase === m.phase || (c.current = m, s(m));
297
- }), y;
298
- }, Ce = [
299
- "_neutral",
300
- "browDownLeft",
301
- "browDownRight",
302
- "browInnerUp",
303
- "browOuterUpLeft",
304
- "browOuterUpRight",
305
- "cheekPuff",
306
- "cheekSquintLeft",
307
- "cheekSquintRight",
308
- "eyeBlinkLeft",
309
- "eyeBlinkRight",
310
- "eyeLookDownLeft",
311
- "eyeLookDownRight",
312
- "eyeLookInLeft",
313
- "eyeLookInRight",
314
- "eyeLookOutLeft",
315
- "eyeLookOutRight",
316
- "eyeLookUpLeft",
317
- "eyeLookUpRight",
318
- "eyeSquintLeft",
319
- "eyeSquintRight",
320
- "eyeWideLeft",
321
- "eyeWideRight",
322
- "jawForward",
323
- "jawLeft",
324
- "jawOpen",
325
- "jawRight",
326
- "mouthClose",
327
- "mouthDimpleLeft",
328
- "mouthDimpleRight",
329
- "mouthFrownLeft",
330
- "mouthFrownRight",
331
- "mouthFunnel",
332
- "mouthLeft",
333
- "mouthLowerDownLeft",
334
- "mouthLowerDownRight",
335
- "mouthPressLeft",
336
- "mouthPressRight",
337
- "mouthPucker",
338
- "mouthRight",
339
- "mouthRollLower",
340
- "mouthRollUpper",
341
- "mouthShrugLower",
342
- "mouthShrugUpper",
343
- "mouthSmileLeft",
344
- "mouthSmileRight",
345
- "mouthStretchLeft",
346
- "mouthStretchRight",
347
- "mouthUpperUpLeft",
348
- "mouthUpperUpRight",
349
- "noseSneerLeft",
350
- "noseSneerRight"
351
- ], pe = ({
352
- source: e,
353
- face: t,
354
- canvas: r,
355
- outputSize: n,
356
- padding: o = 0.2
357
- }) => ne({ source: e, bounds: t.bounds, canvas: r, outputSize: n, padding: o }), Ie = [
358
- "browRaise",
359
- "eyeBlink",
360
- "eyeBlinkLeft",
361
- "eyeBlinkRight",
362
- "eyeBlinkEither",
363
- "headUp",
364
- "headDown",
365
- "headTurnLeft",
366
- "headTurnRight",
367
- "mouthOpen",
368
- "mouthPout",
369
- "headTiltLeft",
370
- "headTiltRight"
371
- ], T = (e = 0.5) => ({
372
- threshold: e,
373
- releaseThreshold: Math.max(0, e - 0.15),
374
- holdMs: 50
375
- }), w = {
376
- threshold: Math.PI / 18,
377
- releaseThreshold: Math.PI / 30,
378
- holdMs: 80
379
- }, me = {
380
- browRaise: T(0.45),
381
- eyeBlink: T(0.55),
382
- eyeBlinkLeft: T(0.55),
383
- eyeBlinkRight: T(0.55),
384
- eyeBlinkEither: T(0.55),
385
- headUp: w,
386
- headDown: w,
387
- headTurnLeft: w,
388
- headTurnRight: w,
389
- mouthOpen: T(0.45),
390
- mouthPout: T(0.5),
391
- headTiltLeft: w,
392
- headTiltRight: w
393
- }, x = (e) => Math.max(0, e), k = (e, t) => e !== void 0 && Number.isFinite(e) ? e : t, q = (e, t = {}) => {
394
- const r = me[e], n = Math.max(0, k(t.threshold, r.threshold));
395
- return {
396
- threshold: n,
397
- releaseThreshold: Math.min(
398
- n,
399
- Math.max(0, k(t.releaseThreshold, r.releaseThreshold))
400
- ),
401
- holdMs: Math.max(0, k(t.holdMs, r.holdMs))
402
- };
403
- }, H = (e, t, { neutralRotation: r = { x: 0, y: 0, z: 0 } } = {}) => {
404
- const n = k(r.x, 0), o = k(r.y, 0), u = k(r.z, 0);
405
- switch (t) {
406
- case "browRaise":
407
- return Math.max(
408
- S(e, "browInnerUp"),
409
- S(e, "browOuterUpLeft"),
410
- S(e, "browOuterUpRight")
411
- );
412
- case "eyeBlink":
413
- return Math.min(
414
- S(e, "eyeBlinkLeft"),
415
- S(e, "eyeBlinkRight")
416
- );
417
- case "eyeBlinkLeft":
418
- return S(e, "eyeBlinkRight");
419
- case "eyeBlinkRight":
420
- return S(e, "eyeBlinkLeft");
421
- case "eyeBlinkEither":
422
- return Math.max(
423
- S(e, "eyeBlinkLeft"),
424
- S(e, "eyeBlinkRight")
425
- );
426
- case "mouthOpen":
427
- return S(e, "jawOpen");
428
- case "mouthPout":
429
- return S(e, "mouthPucker");
430
- case "headUp":
431
- return x(e.pose.rotation.x - n);
432
- case "headDown":
433
- return x(n - e.pose.rotation.x);
434
- case "headTurnLeft":
435
- return x(e.pose.rotation.y - o);
436
- case "headTurnRight":
437
- return x(o - e.pose.rotation.y);
438
- case "headTiltLeft":
439
- return x(e.pose.rotation.z - u);
440
- case "headTiltRight":
441
- return x(u - e.pose.rotation.z);
442
- }
443
- }, Pe = (e, t, r = {}) => H(e, t, r) >= q(t, r).threshold, Ue = (e, t, r = {}) => {
444
- let n = null, o = 0;
445
- for (const u of e) {
446
- const i = H(u, t, r);
447
- (!n || i > o) && (n = u, o = i);
448
- }
449
- return { face: n, value: o };
450
- }, V = (e) => ({
451
- action: e,
452
- active: !1,
453
- value: 0,
454
- justStarted: !1,
455
- justEnded: !1,
456
- phase: "none",
457
- holdStartedAt: null
458
- }), Re = (e, t, r, n, o) => {
459
- const u = e.phase === "begin";
460
- if (e.value = t, e.justStarted = !1, e.justEnded = !1, e.phase = e.active ? "stay" : "none", !n)
461
- return e.holdStartedAt = null, e.active && (e.active = !1, e.justEnded = !0, e.phase = "end"), e;
462
- if (e.active) {
463
- if (t <= o.releaseThreshold) {
464
- if (u) return e;
465
- e.active = !1, e.justEnded = !0, e.phase = "end";
466
- }
467
- return e;
468
- }
469
- return t < o.threshold ? (e.holdStartedAt = null, e) : (e.holdStartedAt === null && (e.holdStartedAt = r), r - e.holdStartedAt >= o.holdMs && (e.active = !0, e.justStarted = !0, e.phase = "begin", e.holdStartedAt = null), e);
470
- }, W = (e) => ({
1262
+ }, m = d.current;
1263
+ m.face === l.face && m.faces === l.faces && m.faceCount === l.faceCount && m.detected === l.detected && m.justDetected === l.justDetected && m.justLost === l.justLost && m.phase === l.phase || (d.current = l, i(l));
1264
+ }), a;
1265
+ }, ot = (e) => ({
471
1266
  action: e,
472
1267
  active: !1,
473
1268
  value: 0,
474
1269
  justStarted: !1,
475
1270
  justEnded: !1,
476
1271
  phase: "none"
477
- }), ze = (e, t, r = {}) => {
478
- const n = R(V(t)), o = R(null), u = R(t), i = R({}), [a, y] = P(() => W(t)), s = R(a);
479
- return L(() => {
480
- o.current = e, i.current = r;
481
- }, [e, r]), L(() => {
482
- u.current = t, n.current = V(t);
483
- const c = W(t);
484
- s.current = c, y(c);
485
- }, [t]), b(({ clock: c }) => {
486
- const l = o.current, f = u.current, h = i.current, g = l ? H(l, f, h) : 0, d = Re(
1272
+ }), Jn = (e, r, t = {}) => {
1273
+ const n = _(We(r)), o = _(null), u = _(r), c = _({}), [s, a] = W(() => ot(r)), i = _(s);
1274
+ return b(() => {
1275
+ o.current = e, c.current = t;
1276
+ }, [e, t]), b(() => {
1277
+ u.current = r, n.current = We(r);
1278
+ const d = ot(r);
1279
+ i.current = d, a(d);
1280
+ }, [r]), U(({ clock: d }) => {
1281
+ const f = o.current, h = u.current, g = c.current, S = f ? Ee(f, h, g) : 0, T = Mt(
487
1282
  n.current,
488
- g,
489
- c.elapsedTime * 1e3,
490
- !!l,
491
- q(f, h)
492
- ), p = s.current;
493
- if (p.action === d.action && p.active === d.active && p.value === d.value && p.justStarted === d.justStarted && p.justEnded === d.justEnded && p.phase === d.phase)
1283
+ S,
1284
+ d.elapsedTime * 1e3,
1285
+ !!f,
1286
+ Ht(h, g)
1287
+ ), p = i.current;
1288
+ if (p.action === T.action && p.active === T.active && p.value === T.value && p.justStarted === T.justStarted && p.justEnded === T.justEnded && p.phase === T.phase)
494
1289
  return;
495
- const m = {
496
- action: d.action,
497
- active: d.active,
498
- value: d.value,
499
- justStarted: d.justStarted,
500
- justEnded: d.justEnded,
501
- phase: d.phase
1290
+ const l = {
1291
+ action: T.action,
1292
+ active: T.active,
1293
+ value: T.value,
1294
+ justStarted: T.justStarted,
1295
+ justEnded: T.justEnded,
1296
+ phase: T.phase
502
1297
  };
503
- s.current = m, y(m);
504
- }), a;
505
- }, He = [
1298
+ i.current = l, a(l);
1299
+ }), s;
1300
+ }, $n = [
506
1301
  "angry",
507
1302
  "disgust",
508
1303
  "fear",
@@ -511,7 +1306,7 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
511
1306
  "sad",
512
1307
  "surprise",
513
1308
  "unknown"
514
- ], v = [
1309
+ ], le = [
515
1310
  "angry",
516
1311
  "disgust",
517
1312
  "fear",
@@ -519,110 +1314,268 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
519
1314
  "neutral",
520
1315
  "sad",
521
1316
  "surprise"
522
- ], ye = (e, t = 0.55) => {
523
- let r = -1 / 0;
524
- for (let s = 0; s < v.length; s += 1)
525
- r = Math.max(r, Number(e[s]) || 0);
526
- const n = new Array(v.length);
1317
+ ], an = (e, r = 0.55) => {
1318
+ let t = -1 / 0;
1319
+ for (let i = 0; i < le.length; i += 1)
1320
+ t = Math.max(t, Number(e[i]) || 0);
1321
+ const n = new Array(le.length);
527
1322
  let o = 0;
528
- for (let s = 0; s < v.length; s += 1) {
529
- const c = Math.exp((Number(e[s]) || 0) - r);
530
- n[s] = c, o += c;
1323
+ for (let i = 0; i < le.length; i += 1) {
1324
+ const d = Math.exp((Number(e[i]) || 0) - t);
1325
+ n[i] = d, o += d;
531
1326
  }
532
- const u = Object.fromEntries(v.map((s) => [s, 0]));
533
- let i = "unknown", a = 0;
534
- for (let s = 0; s < v.length; s += 1) {
535
- const c = o ? n[s] / o : 0, l = v[s];
536
- u[l] = c, c > a && (i = l, a = c);
1327
+ const u = Object.fromEntries(le.map((i) => [i, 0]));
1328
+ let c = "unknown", s = 0;
1329
+ for (let i = 0; i < le.length; i += 1) {
1330
+ const d = o ? n[i] / o : 0, f = le[i];
1331
+ u[f] = d, d > s && (c = f, s = d);
537
1332
  }
538
- const y = Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0.55;
539
- return { expression: a >= y ? i : "unknown", confidence: a, scores: u };
540
- }, ge = (e) => {
541
- const t = e.width * e.height, r = new Float32Array(t * 3);
542
- for (let n = 0, o = 0; n < t; n += 1, o += 4)
543
- r[n] = e.data[o] / 127.5 - 1, r[t + n] = e.data[o + 1] / 127.5 - 1, r[t * 2 + n] = e.data[o + 2] / 127.5 - 1;
544
- return r;
545
- }, Ee = "https://huggingface.co/opencv/facial_expression_recognition/resolve/main/facial_expression_recognition_mobilefacenet_2022july_int8.onnx", Se = (e) => `https://cdn.jsdelivr.net/npm/onnxruntime-web@${e.env.versions.web}/dist/`, j = /* @__PURE__ */ new Map(), Te = (e) => {
546
- let t = j.get(e);
547
- return t || (t = Promise.all([import("onnxruntime-web/wasm"), ee(e)]).then(([r, n]) => (r.env.wasm.wasmPaths = Se(r), r.InferenceSession.create(n, { executionProviders: ["wasm"] }))).catch((r) => {
548
- throw j.delete(e), r;
549
- }), j.set(e, t)), t;
550
- }, Ke = (e, {
551
- active: t = !0,
552
- targetFps: r = 5,
1333
+ const a = Number.isFinite(r) ? Math.min(1, Math.max(0, r)) : 0.55;
1334
+ return { expression: s >= a ? c : "unknown", confidence: s, scores: u };
1335
+ }, cn = (e) => {
1336
+ const r = e.width * e.height, t = new Float32Array(r * 3);
1337
+ for (let n = 0, o = 0; n < r; n += 1, o += 4)
1338
+ t[n] = e.data[o] / 127.5 - 1, t[r + n] = e.data[o + 1] / 127.5 - 1, t[r * 2 + n] = e.data[o + 2] / 127.5 - 1;
1339
+ return t;
1340
+ }, un = "https://huggingface.co/opencv/facial_expression_recognition/resolve/main/facial_expression_recognition_mobilefacenet_2022july_int8.onnx", ln = (e) => `https://cdn.jsdelivr.net/npm/onnxruntime-web@${e.env.versions.web}/dist/`, Me = /* @__PURE__ */ new Map(), dn = (e) => {
1341
+ let r = Me.get(e);
1342
+ return r || (r = Promise.all([import("onnxruntime-web/wasm"), Nt(e)]).then(([t, n]) => (t.env.wasm.wasmPaths = ln(t), t.InferenceSession.create(n, { executionProviders: ["wasm"] }))).catch((t) => {
1343
+ throw Me.delete(e), t;
1344
+ }), Me.set(e, r)), r;
1345
+ }, Qn = (e, {
1346
+ active: r = !0,
1347
+ targetFps: t = 5,
553
1348
  minConfidence: n = 0.55,
554
- modelUrl: o = Ee
1349
+ modelUrl: o = un
555
1350
  } = {}) => {
556
- const { session: u } = Q(), i = R(null), a = R(null), y = R(!1), s = R(-1 / 0), c = R(!0), [l, f] = P({
1351
+ const { session: u } = at(), c = _(null), s = _(null), a = _(!1), i = _(-1 / 0), d = _(!0), [f, h] = W({
557
1352
  status: "idle",
558
1353
  result: null,
559
1354
  error: null
560
1355
  });
561
- return L(() => {
562
- const h = document.createElement("canvas");
563
- return i.current = h, a.current = h.getContext("2d", { willReadFrequently: !0 }), c.current = !0, () => {
564
- c.current = !1, i.current = null, a.current = null;
1356
+ return b(() => {
1357
+ const g = document.createElement("canvas");
1358
+ return c.current = g, s.current = g.getContext("2d", { willReadFrequently: !0 }), d.current = !0, () => {
1359
+ d.current = !1, c.current = null, s.current = null;
565
1360
  };
566
- }, []), b(({ clock: h }) => {
567
- if (!t || !e || y.current || l.status === "error") return;
568
- const g = Number.isFinite(r) && r > 0 ? r : 5, d = h.elapsedTime * 1e3;
569
- if (d - s.current < 1e3 / g) return;
570
- const p = u.getInputFrame(), m = i.current, E = a.current;
571
- if (!p || !m || !E || !pe({ source: p, face: e, canvas: m, outputSize: { width: 112, height: 112 } })) return;
572
- s.current = d, y.current = !0, l.status === "idle" && f({ status: "loading", result: null, error: null });
573
- const Y = ge(E.getImageData(0, 0, 112, 112));
574
- Promise.all([import("onnxruntime-web/wasm"), Te(o)]).then(async ([D, M]) => {
575
- const $ = await M.run({
576
- [M.inputNames[0]]: new D.Tensor("float32", Y, [1, 3, 112, 112])
577
- }), Z = ye(
578
- $[M.outputNames[0]].data,
1361
+ }, []), U(({ clock: g }) => {
1362
+ if (!r || !e || a.current || f.status === "error") return;
1363
+ const S = Number.isFinite(t) && t > 0 ? t : 5, T = g.elapsedTime * 1e3;
1364
+ if (T - i.current < 1e3 / S) return;
1365
+ const p = u.getInputFrame(), l = c.current, m = s.current;
1366
+ if (!p || !l || !m || !Br({ source: p, face: e, canvas: l, outputSize: { width: 112, height: 112 } })) return;
1367
+ i.current = T, a.current = !0, f.status === "idle" && h({ status: "loading", result: null, error: null });
1368
+ const x = cn(m.getImageData(0, 0, 112, 112));
1369
+ Promise.all([import("onnxruntime-web/wasm"), dn(o)]).then(async ([R, C]) => {
1370
+ const E = await C.run({
1371
+ [C.inputNames[0]]: new R.Tensor("float32", x, [1, 3, 112, 112])
1372
+ }), A = an(
1373
+ E[C.outputNames[0]].data,
579
1374
  n
580
1375
  );
581
- c.current && f({ status: "ready", result: Z, error: null });
582
- }).catch((D) => {
583
- c.current && f({
1376
+ d.current && h({ status: "ready", result: A, error: null });
1377
+ }).catch((R) => {
1378
+ d.current && h({
584
1379
  status: "error",
585
1380
  result: null,
586
- error: D instanceof Error ? D : new Error(String(D))
1381
+ error: R instanceof Error ? R : new Error(String(R))
587
1382
  });
588
1383
  }).finally(() => {
589
- y.current = !1;
1384
+ a.current = !1;
590
1385
  });
591
- }), l;
1386
+ }), f;
592
1387
  };
593
1388
  export {
594
- $e as BODY_TARGETS,
595
- Me as BodyTracker,
596
- me as DEFAULT_FACE_ACTION_OPTIONS,
597
- Ee as DEFAULT_FACE_ATTRIBUTE_EXPRESSION_MODEL_URL,
598
- it as DEFAULT_FACE_EXPRESSION_THRESHOLD,
599
- Ze as DEFAULT_TRACKING_ANCHOR,
600
- Ie as FACE_ACTION_NAMES,
601
- He as FACE_ATTRIBUTE_EXPRESSION_NAMES,
602
- Ce as FACE_BLENDSHAPE_NAMES,
603
- Ve as FACE_LANDMARK_INDICES,
604
- Je as FACE_TARGETS,
605
- We as FaceMesh,
606
- qe as FaceTracker,
607
- Fe as GestureTracker,
608
- je as GestureTrigger,
609
- Qe as HAND_TARGETS,
610
- Ne as HandTracker,
611
- X as SEGMENTATION_TYPES,
612
- Be as Segmentation,
613
- et as TrackingAnchor,
614
- pe as drawFaceCrop,
615
- H as getFaceActionValue,
616
- S as getFaceBlendshape,
617
- ct as getFaceEyeDistance,
618
- Ue as getStrongestFaceAction,
619
- tt as getTargetNamespace,
620
- Pe as hasFaceAction,
621
- at as hasFaceExpression,
622
- ze as useFaceAction,
623
- Ke as useFaceAttributeExpression,
624
- Oe as useFaceDetection,
625
- st as useFaceInfo,
626
- te as useFaceInfos,
627
- rt as useFaceResults
1389
+ Qr as BODY_CALIBRATION_LANDMARKS,
1390
+ Xs as BODY_DEPTH_GLSL,
1391
+ ss as BODY_JOINT_INDEX,
1392
+ os as BODY_JOINT_NAMES,
1393
+ Ct as BODY_LANDMARK_INDEX,
1394
+ qs as BODY_MOVES,
1395
+ Js as BODY_MOVE_LIMITS,
1396
+ $s as BODY_MOVE_NAMES,
1397
+ Qs as BODY_MOVE_VIEW_LIMITS,
1398
+ Ln as BODY_OCCLUDER_RENDER_ORDER,
1399
+ Zs as BODY_RIG_BONES,
1400
+ eo as BODY_RIG_DEFAULT_SMOOTHING,
1401
+ to as BODY_RIG_END_MARGIN,
1402
+ ro as BODY_RIG_FRAME_PRIORITY,
1403
+ no as BODY_RIG_HIP_MARGIN,
1404
+ so as BODY_RIG_HOLD_MS,
1405
+ oo as BODY_RIG_MIXAMO_NAMES,
1406
+ it as BODY_RIG_MODEL_MESH,
1407
+ ao as BODY_RIG_REQUIRED_BONES,
1408
+ ia as BODY_TARGETS,
1409
+ io as BodyAttachment,
1410
+ wn as BodyOccluder,
1411
+ Ft as BodyRig,
1412
+ kt as BodyRigContext,
1413
+ Is as BodyTracker,
1414
+ Vn as BodyTrigger,
1415
+ Oe as CALIBRATION_STORAGE_KEY,
1416
+ Be as CALIBRATION_VERSION,
1417
+ Ns as CANONICAL_SHOULDER_DISTANCE,
1418
+ vs as CANONICAL_TORSO_FIT_DEFAULT_SMOOTHING,
1419
+ xs as CANONICAL_TORSO_INDICES,
1420
+ Cs as CANONICAL_TORSO_LANDMARKS,
1421
+ Ms as CANONICAL_TORSO_POINTS,
1422
+ Hs as CanonicalTorsoFrame,
1423
+ Pe as DEFAULT_CALIBRATION,
1424
+ Ls as DEFAULT_FACE_ACTION_OPTIONS,
1425
+ un as DEFAULT_FACE_ATTRIBUTE_EXPRESSION_MODEL_URL,
1426
+ ga as DEFAULT_FACE_EXPRESSION_THRESHOLD,
1427
+ ma as DEFAULT_GESTURE_DETECTOR_OPTIONS,
1428
+ Vo as DEFAULT_GESTURE_SETTINGS,
1429
+ as as DEFAULT_HOLISTIC_ANALYSIS_MAX_DIMENSION,
1430
+ is as DEFAULT_HOLISTIC_HOLD_MS,
1431
+ cs as DEFAULT_HOLISTIC_MODEL_URL,
1432
+ us as DEFAULT_HOLISTIC_PREDICT_MS,
1433
+ we as DEFAULT_HOLISTIC_SIGNAL_THRESHOLDS,
1434
+ zo as DEFAULT_HOLISTIC_TRACKER_SETTINGS,
1435
+ Sa as DEFAULT_POLICY_NUM_FACES,
1436
+ Ca as DEFAULT_SEGMENTATION_OVERLAY_SETTINGS,
1437
+ ls as DEFAULT_SUBJECT_POLICY,
1438
+ ca as DEFAULT_TRACKING_ANCHOR,
1439
+ bt as EMPTY_SUBJECT_MEMORY,
1440
+ ws as FACE_ACTION_NAMES,
1441
+ $n as FACE_ATTRIBUTE_EXPRESSION_NAMES,
1442
+ Fs as FACE_BLENDSHAPE_NAMES,
1443
+ $r as FACE_CALIBRATION_LANDMARKS,
1444
+ Ds as FACE_LANDMARK_INDICES,
1445
+ ua as FACE_TARGETS,
1446
+ co as FOREARM_OCCLUDER_FLARE,
1447
+ uo as FOREARM_OCCLUDER_LENGTH,
1448
+ lo as FOREARM_OCCLUDER_OVERLAP,
1449
+ ts as FaceMesh,
1450
+ rs as FaceTracker,
1451
+ fo as ForearmOccluder,
1452
+ gt as GESTURES,
1453
+ Kn as GESTURE_NAMES,
1454
+ Xo as GESTURE_SETTINGS_FIELDS,
1455
+ Wn as GestureListener,
1456
+ Mn as GestureTracker,
1457
+ jn as GestureTrigger,
1458
+ Qe as HAND_CUTOUT_TRIANGLES,
1459
+ ds as HAND_JOINT_INDEX,
1460
+ fs as HAND_JOINT_NAMES,
1461
+ ho as HAND_NAIL_FINGERS,
1462
+ mo as HAND_NAIL_FINISHES,
1463
+ po as HAND_NAIL_RENDER_ORDER,
1464
+ go as HAND_NAIL_SHADES,
1465
+ To as HAND_NAIL_SHAPES,
1466
+ Eo as HAND_OCCLUDER_RENDER_ORDER,
1467
+ hs as HAND_POSE_DEFAULT_HOLD_MS,
1468
+ Ko as HAND_RIG_REQUIRED_JOINTS,
1469
+ la as HAND_TARGETS,
1470
+ _o as HAND_TATTOO_DEFAULT_SIZE,
1471
+ So as HAND_TATTOO_RENDER_ORDER,
1472
+ Ro as HAND_TOUCH_DEFAULTS,
1473
+ Ao as HAND_TOUCH_DEPTH,
1474
+ yo as HAND_TOUCH_POINTER_RADIUS,
1475
+ Oo as HAND_TOUCH_TIPS,
1476
+ qo as HOLISTIC_HANDS_OPTIONS,
1477
+ Jo as HOLISTIC_TRACKER_SETTINGS_FIELDS,
1478
+ kn as HandAttachment,
1479
+ Bn as HandCutout,
1480
+ Do as HandNails,
1481
+ bo as HandOccluder,
1482
+ Io as HandRig,
1483
+ No as HandRigHandContext,
1484
+ vo as HandTattoo,
1485
+ xo as HandTouch,
1486
+ Cn as HandTracker,
1487
+ ke as HolisticTracker,
1488
+ ya as IRIS_LANDMARKS,
1489
+ Oa as IRIS_LANDMARK_COUNT,
1490
+ Da as PERSON_MASK_LABELS,
1491
+ Tr as SDK_MODEL_PATHS,
1492
+ Xe as SEGMENTATION_TYPES,
1493
+ Go as SEMANTIC_SEGMENTATION_PRESETS,
1494
+ ks as SHOULDER_OCCLUDER_DEFAULT_OPACITY,
1495
+ Bs as SHOULDER_OCCLUDER_V1_PATH,
1496
+ Gn as Segmentation,
1497
+ ba as SegmentationOverlay,
1498
+ Ps as ShoulderOccluder,
1499
+ Co as TOUCH_WORLD_DEFAULTS,
1500
+ Pn as Touchable,
1501
+ da as TrackingAnchor,
1502
+ Mo as WRIST_DEPTH_OF_WIDTH,
1503
+ Ho as WRIST_WIDTH_OF_PALM,
1504
+ Lo as WristAttachment,
1505
+ ms as XR_MAX_SUBJECTS,
1506
+ Jr as applyCalibrationToFeedPoint,
1507
+ ps as associateSubjects,
1508
+ gs as bodyCandidates,
1509
+ Us as bodyLandmarkIndex,
1510
+ nn as clearCalibration,
1511
+ Ts as clearSemanticMask,
1512
+ Wr as createCalibration,
1513
+ wo as createForearmGeometry,
1514
+ Nr as createHolisticSignals,
1515
+ Es as createSemanticMask,
1516
+ Fo as defineBodyMove,
1517
+ Yn as defineGesture,
1518
+ Br as drawFaceCrop,
1519
+ en as estimateBodyScale,
1520
+ Zr as estimateFaceDistance,
1521
+ _s as faceCandidates,
1522
+ Ee as getFaceActionValue,
1523
+ Je as getFaceBlendshape,
1524
+ Ta as getFaceEyeDistance,
1525
+ Un as getHolisticSignals,
1526
+ Gs as getStrongestFaceAction,
1527
+ fa as getTargetNamespace,
1528
+ Yo as handPoseToScene,
1529
+ js as hasFaceAction,
1530
+ Ea as hasFaceExpression,
1531
+ tt as isHandRaised,
1532
+ zn as isIdentityCalibration,
1533
+ et as isPalmOpen,
1534
+ Ss as jointCandidates,
1535
+ tn as loadCalibration,
1536
+ Et as measureBodyCalibration,
1537
+ Tt as measureFaceCalibration,
1538
+ Rs as normalizedTrackerPointToTrackerPoint,
1539
+ $o as patchGestureSettings,
1540
+ Qo as patchHolisticTrackerSettings,
1541
+ Ma as patchSegmentationOverlaySettings,
1542
+ Xr as resetCalibration,
1543
+ Jt as resolveBodyMove,
1544
+ qr as resolveCalibrationMirror,
1545
+ Pr as resolveGestureDefinition,
1546
+ qe as resolveGestureDetectorOptions,
1547
+ Zo as resolveGestureSettings,
1548
+ ea as resolveHolisticTrackerSettings,
1549
+ Ha as resolveSegmentationOverlaySettings,
1550
+ rn as saveCalibration,
1551
+ Hn as sdkModelAsset,
1552
+ Er as sdkModelUrl,
1553
+ As as selectSubject,
1554
+ Ks as shoulderOccluderUrl,
1555
+ Ys as solveShoulderPose,
1556
+ ta as toHolisticTrackerProps,
1557
+ ys as trackerPointToNormalizedTrackerPoint,
1558
+ ye as updateCalibration,
1559
+ Fn as useBodyDepthTexture,
1560
+ na as useBodyIds,
1561
+ oa as useBodyMaskTexture,
1562
+ cr as useBodySubject,
1563
+ Yr as useBodyTrigger,
1564
+ Ws as useCanonicalTorsoFit,
1565
+ Jn as useFaceAction,
1566
+ Qn as useFaceAttributeExpression,
1567
+ qn as useFaceDetection,
1568
+ Ra as useFaceInfo,
1569
+ pr as useFaceInfos,
1570
+ ko as useFaceResults,
1571
+ Gr as useGesture,
1572
+ Ia as useHairMask,
1573
+ Bo as useHandTouch,
1574
+ xr as useHolisticTracking,
1575
+ Vs as useIrisTracking,
1576
+ Na as usePersonMask,
1577
+ va as useSemanticSegmentationMask,
1578
+ Xn as useXRCalibration,
1579
+ Po as wristSizeOf,
1580
+ Sr as writeHandCutout
628
1581
  };