@vincentt-xr/sdk 2.0.0-alpha.8 → 2.0.0-alpha.9

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 (517) hide show
  1. package/GROUNDING.md +4643 -170
  2. package/README.md +1 -0
  3. package/dist/CanonicalHeadFrame-BHcWyaiK.js +1506 -0
  4. package/dist/CanonicalHeadFrame-D-_T1OMU.cjs +1 -0
  5. package/dist/DebuggerUI-7ngnJsBe.js +275 -0
  6. package/dist/DebuggerUI-CoglgKdO.cjs +1 -0
  7. package/dist/FaceRetouch-CLoTfrcs.js +1071 -0
  8. package/dist/FaceRetouch-J1lC1WbS.cjs +134 -0
  9. package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
  10. package/dist/FaceSurface-DmP9AEeC.js +27 -0
  11. package/dist/SegmentationOverlay-D_FWkcyP.cjs +35 -0
  12. package/dist/SegmentationOverlay-vn5x_knv.js +6237 -0
  13. package/dist/SkeletonUtils-C2r90MtN.js +21 -0
  14. package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
  15. package/dist/TextLabel-XE0rQSDn.cjs +2 -0
  16. package/dist/TextLabel-c9BCucOI.js +961 -0
  17. package/dist/assets/gltfLoader.d.ts +16 -0
  18. package/dist/assets/loaders.d.ts +16 -1
  19. package/dist/body-pose/index.d.ts +521 -0
  20. package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
  21. package/dist/body-trigger/frame.d.ts +88 -0
  22. package/dist/body-trigger/index.d.ts +6 -0
  23. package/dist/body-trigger/moves.d.ts +235 -0
  24. package/dist/body-trigger/trigger.d.ts +75 -0
  25. package/dist/calibration/calibration.d.ts +11 -6
  26. package/dist/canonicalFace-BHwyCx1c.js +9 -0
  27. package/dist/canonicalFace-C83I225R.cjs +1 -0
  28. package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
  29. package/dist/components/BodyInstruction/index.d.ts +69 -0
  30. package/dist/components/BodyInstruction/useBodyPose.d.ts +23 -0
  31. package/dist/components/BodyTracker/index.d.ts +10 -2
  32. package/dist/components/BodyTrigger/index.d.ts +49 -0
  33. package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
  34. package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
  35. package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
  36. package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
  37. package/dist/components/FaceAtlas/constants.d.ts +8 -0
  38. package/dist/components/FaceAtlas/index.d.ts +7 -0
  39. package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
  40. package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
  41. package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
  42. package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
  43. package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
  44. package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
  45. package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
  46. package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
  47. package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
  48. package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
  49. package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
  50. package/dist/components/FaceCharacter/index.d.ts +18 -0
  51. package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
  52. package/dist/components/FaceInset/FaceInset.d.ts +68 -0
  53. package/dist/components/FaceInset/frame.d.ts +94 -0
  54. package/dist/components/FaceInset/index.d.ts +6 -0
  55. package/dist/components/FaceInset/material.d.ts +40 -0
  56. package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
  57. package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
  58. package/dist/components/FaceInstruction/index.d.ts +56 -0
  59. package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
  60. package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
  61. package/dist/components/FaceLiquify/debug.d.ts +37 -0
  62. package/dist/components/FaceLiquify/frame.d.ts +55 -0
  63. package/dist/components/FaceLiquify/index.d.ts +10 -0
  64. package/dist/components/FaceLiquify/material.d.ts +39 -0
  65. package/dist/components/FaceLiquify/pass.d.ts +49 -0
  66. package/dist/components/FaceLiquify/presence.d.ts +25 -0
  67. package/dist/components/FaceLiquify/presets.d.ts +82 -0
  68. package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
  69. package/dist/components/FaceLiquify/target.d.ts +85 -0
  70. package/dist/components/FaceLiquify/warp.d.ts +72 -0
  71. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +5 -3
  72. package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +21 -0
  73. package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +9 -0
  74. package/dist/components/FaceMesh/index.d.ts +1 -1
  75. package/dist/components/FaceRetouch/Background.d.ts +3 -1
  76. package/dist/components/FaceRetouch/FaceRetouch.d.ts +5 -0
  77. package/dist/components/FaceRetouch/renderState.d.ts +19 -0
  78. package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
  79. package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
  80. package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
  81. package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
  82. package/dist/components/FaceSwap/index.d.ts +13 -0
  83. package/dist/components/FaceSwap/settings.d.ts +300 -0
  84. package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
  85. package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
  86. package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
  87. package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
  88. package/dist/components/FaceWarp3D/index.d.ts +2 -3
  89. package/dist/components/Faceless/Faceless.d.ts +51 -0
  90. package/dist/components/Faceless/index.d.ts +2 -0
  91. package/dist/components/HairLock/HairLock.d.ts +39 -0
  92. package/dist/components/HairLock/index.d.ts +2 -0
  93. package/dist/components/HairLock/lockGeometry.d.ts +15 -0
  94. package/dist/components/HandCutout/index.d.ts +35 -0
  95. package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
  96. package/dist/components/HandInstruction/index.d.ts +74 -0
  97. package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
  98. package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
  99. package/dist/components/HandRig/HandAttachment.d.ts +34 -0
  100. package/dist/components/HandRig/HandOccluder.d.ts +55 -0
  101. package/dist/components/HandRig/HandTattoo.d.ts +61 -0
  102. package/dist/components/HandRig/WristAttachment.d.ts +34 -0
  103. package/dist/components/HandRig/index.d.ts +101 -0
  104. package/dist/components/HandRig/useArmMask.d.ts +29 -0
  105. package/dist/components/HandRig/wristSolve.d.ts +69 -0
  106. package/dist/components/HandTouch/HandTouch.d.ts +62 -0
  107. package/dist/components/HandTouch/Touchable.d.ts +36 -0
  108. package/dist/components/HandTouch/index.d.ts +2 -0
  109. package/dist/components/HeadBinding/index.d.ts +14 -0
  110. package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
  111. package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
  112. package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
  113. package/dist/components/HeadOccluder/NeckOccluder.d.ts +64 -0
  114. package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
  115. package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
  116. package/dist/components/HeadOccluder/index.d.ts +57 -3
  117. package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
  118. package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
  119. package/dist/components/Instruction/HintStage.d.ts +29 -0
  120. package/dist/components/Instruction/InstructionCue.d.ts +126 -0
  121. package/dist/components/Instruction/gestureHold.d.ts +20 -0
  122. package/dist/components/Instruction/ghost.d.ts +129 -0
  123. package/dist/components/Instruction/hintBlend.d.ts +19 -0
  124. package/dist/components/Instruction/hintLook.d.ts +81 -0
  125. package/dist/components/Instruction/hintLoop.d.ts +36 -0
  126. package/dist/components/Instruction/index.d.ts +41 -0
  127. package/dist/components/Instruction/useGhostModel.d.ts +33 -0
  128. package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
  129. package/dist/components/LipEffect/LipEffect.d.ts +22 -2
  130. package/dist/components/LipEffect/LipEffectMaterial.d.ts +62 -10
  131. package/dist/components/LipEffect/LipEffects.d.ts +5 -2
  132. package/dist/components/LipEffect/defaults.d.ts +21 -2
  133. package/dist/components/LipEffect/index.d.ts +1 -1
  134. package/dist/components/LipEffect/lipShading.d.ts +73 -0
  135. package/dist/components/LipEffect/settings.d.ts +117 -13
  136. package/dist/components/LipEffect/shader.d.ts +39 -0
  137. package/dist/components/LipEffect/types.d.ts +82 -10
  138. package/dist/components/LipEffect/useLipDesignTextures.d.ts +6 -0
  139. package/dist/components/LipEffect/uvGuide.d.ts +31 -16
  140. package/dist/components/Makeup/Blush.d.ts +18 -0
  141. package/dist/components/Makeup/Brows.d.ts +20 -0
  142. package/dist/components/Makeup/Contour.d.ts +17 -0
  143. package/dist/components/Makeup/Eyeliner.d.ts +20 -0
  144. package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
  145. package/dist/components/Makeup/Highlighter.d.ts +18 -0
  146. package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
  147. package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
  148. package/dist/components/Makeup/constants.d.ts +44 -0
  149. package/dist/components/Makeup/design.d.ts +106 -0
  150. package/dist/components/Makeup/designSamples.d.ts +42 -0
  151. package/dist/components/Makeup/eyes.d.ts +114 -0
  152. package/dist/components/Makeup/fields.d.ts +10 -0
  153. package/dist/components/Makeup/geometry.d.ts +106 -0
  154. package/dist/components/Makeup/index.d.ts +26 -0
  155. package/dist/components/Makeup/looks.d.ts +28 -0
  156. package/dist/components/Makeup/material.d.ts +239 -0
  157. package/dist/components/Makeup/settings.d.ts +54 -0
  158. package/dist/components/Makeup/shades.d.ts +143 -0
  159. package/dist/components/Makeup/shapes.d.ts +27 -0
  160. package/dist/components/Makeup/skinTone.d.ts +135 -0
  161. package/dist/components/Makeup/types.d.ts +110 -0
  162. package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
  163. package/dist/components/Necklace/Necklace.d.ts +44 -0
  164. package/dist/components/Necklace/index.d.ts +1 -0
  165. package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
  166. package/dist/components/ParticleEmitter/index.d.ts +1 -0
  167. package/dist/components/ShoulderOccluder/index.d.ts +43 -0
  168. package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +24 -0
  169. package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
  170. package/dist/components/SpringSwing/index.d.ts +1 -0
  171. package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
  172. package/dist/components/index.d.ts +8 -0
  173. package/dist/config/index.d.ts +0 -1
  174. package/dist/context-DTxSQvp4.js +13 -0
  175. package/dist/context-hA0Rb2Xa.cjs +1 -0
  176. package/dist/contexts-BH7PdKFS.cjs +1 -0
  177. package/dist/contexts-jak8-tND.js +667 -0
  178. package/dist/coordinates/index.d.ts +2 -0
  179. package/dist/coordinates/side.d.ts +40 -0
  180. package/dist/debug-ui/default-setting.cjs +2 -2
  181. package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
  182. package/dist/debug-ui/hierarchy-panel/index.d.ts +3 -2
  183. package/dist/debug-ui/index.d.ts +4 -3
  184. package/dist/debug-ui/media-source/index.d.ts +1 -1
  185. package/dist/debug-ui/media-source/session.d.ts +30 -2
  186. package/dist/debug-ui/media-source.cjs +1 -1
  187. package/dist/debug-ui/media-source.js +1 -1
  188. package/dist/debug-ui/object-inspector-panel/index.d.ts +3 -2
  189. package/dist/debug-ui/product-hotspots/index.d.ts +3 -2
  190. package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +3 -1
  191. package/dist/debug-ui/scene-editor/inspector-panel.d.ts +3 -1
  192. package/dist/debug-ui/screen-image-settings/index.d.ts +3 -1
  193. package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +1 -1
  194. package/dist/debug-ui/screen-text-settings/types.d.ts +2 -0
  195. package/dist/debug-ui/settings-panel/index.d.ts +6 -1
  196. package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
  197. package/dist/debug-ui/xr-diagnostics/index.d.ts +3 -2
  198. package/dist/debug-ui.cjs +3 -3
  199. package/dist/debug-ui.js +2250 -2472
  200. package/dist/entries/all.d.ts +3 -1
  201. package/dist/entries/core.d.ts +3 -2
  202. package/dist/entries/face-effects.d.ts +114 -8
  203. package/dist/entries/instructions.d.ts +48 -0
  204. package/dist/entries/internal.d.ts +2 -1
  205. package/dist/entries/low-level.d.ts +28 -1
  206. package/dist/entries/particles.d.ts +11 -0
  207. package/dist/entries/tracking.d.ts +37 -2
  208. package/dist/face-atlas/attributes.d.ts +30 -0
  209. package/dist/face-atlas/eyes.d.ts +272 -0
  210. package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
  211. package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
  212. package/dist/face-atlas/glsl/common.d.ts +55 -0
  213. package/dist/face-atlas/glsl/design.d.ts +49 -0
  214. package/dist/face-atlas/glsl/eyes.d.ts +73 -0
  215. package/dist/face-atlas/glsl/finish.d.ts +24 -0
  216. package/dist/face-atlas/glsl/format.d.ts +4 -0
  217. package/dist/face-atlas/glsl/index.d.ts +59 -0
  218. package/dist/face-atlas/glsl/shading.d.ts +15 -0
  219. package/dist/face-atlas/glsl/shapes.d.ts +66 -0
  220. package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
  221. package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
  222. package/dist/face-atlas/guide.d.ts +51 -0
  223. package/dist/face-atlas/index.d.ts +25 -0
  224. package/dist/face-atlas/lead.d.ts +117 -0
  225. package/dist/face-atlas/madeUpCamera.d.ts +125 -0
  226. package/dist/face-atlas/masks.d.ts +53 -0
  227. package/dist/face-atlas/obj.d.ts +69 -0
  228. package/dist/face-atlas/polylines.d.ts +63 -0
  229. package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
  230. package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
  231. package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
  232. package/dist/face-atlas/probe/constants.d.ts +137 -0
  233. package/dist/face-atlas/probe/glsl.d.ts +43 -0
  234. package/dist/face-atlas/probe/lightFit.d.ts +108 -0
  235. package/dist/face-atlas/probe/schedule.d.ts +44 -0
  236. package/dist/face-atlas/probe/selfTest.d.ts +87 -0
  237. package/dist/face-atlas/probe/stats.d.ts +143 -0
  238. package/dist/face-atlas/probe/targets.d.ts +70 -0
  239. package/dist/face-atlas/probe/unwrap.d.ts +76 -0
  240. package/dist/face-atlas/quality.d.ts +28 -0
  241. package/dist/face-atlas/regions.d.ts +31 -0
  242. package/dist/face-atlas/registry.d.ts +252 -0
  243. package/dist/face-atlas/renderState.d.ts +86 -0
  244. package/dist/face-atlas/selfOcclusion.d.ts +62 -0
  245. package/dist/face-atlas/shading.d.ts +406 -0
  246. package/dist/face-atlas/shapes.d.ts +86 -0
  247. package/dist/face-atlas/sides.d.ts +41 -0
  248. package/dist/face-atlas/skinMask.d.ts +35 -0
  249. package/dist/face-atlas/surface.d.ts +155 -0
  250. package/dist/face-atlas/topology.d.ts +44 -0
  251. package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
  252. package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
  253. package/dist/face-character/bindFaceModel.d.ts +106 -0
  254. package/dist/face-character/canonicalFace.d.ts +17 -0
  255. package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
  256. package/dist/face-character/canonicalFacePositions.d.ts +7 -0
  257. package/dist/face-character/driveFaceModel.d.ts +57 -0
  258. package/dist/face-character/expressionOutputs.d.ts +45 -0
  259. package/dist/face-character/faceExpressions.d.ts +104 -0
  260. package/dist/face-character/faceImageLandmarker.d.ts +93 -0
  261. package/dist/face-character/faceMeshBinding.d.ts +62 -0
  262. package/dist/face-character/faceMorph.d.ts +77 -0
  263. package/dist/face-character/faceMorphs.d.ts +46 -0
  264. package/dist/face-character/facePhoto.d.ts +138 -0
  265. package/dist/face-character/facePiercings.d.ts +116 -0
  266. package/dist/face-character/facePin.d.ts +131 -0
  267. package/dist/face-character/faceReprojection.d.ts +273 -0
  268. package/dist/face-character/faceReprojector.d.ts +171 -0
  269. package/dist/face-character/faceRig.d.ts +176 -0
  270. package/dist/face-character/faceSwapPresence.d.ts +85 -0
  271. package/dist/face-character/faceTexture.d.ts +169 -0
  272. package/dist/face-character/faceTextureBaker.d.ts +86 -0
  273. package/dist/face-character/faceTextureGuide.d.ts +106 -0
  274. package/dist/face-character/faceTextureStats.d.ts +298 -0
  275. package/dist/face-character/faceTransfer.d.ts +396 -0
  276. package/dist/face-character/faceTransferGeometry.d.ts +109 -0
  277. package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
  278. package/dist/face-character/faceWarp3D.d.ts +101 -0
  279. package/dist/face-character/faceless.d.ts +79 -0
  280. package/dist/face-character/featureWarp.d.ts +28 -0
  281. package/dist/face-character/liveFaceRegistry.d.ts +370 -0
  282. package/dist/face-character/liveValue.d.ts +12 -0
  283. package/dist/face-character/memo.d.ts +15 -0
  284. package/dist/face-effects.cjs +2252 -83
  285. package/dist/face-effects.js +14234 -1231
  286. package/dist/face-expression/index.d.ts +182 -0
  287. package/dist/face-info/landmarks.d.ts +17 -3
  288. package/dist/face-info/types.d.ts +20 -3
  289. package/dist/gestures/definitions.d.ts +15 -2
  290. package/dist/gestures/index.d.ts +1 -1
  291. package/dist/gestures/measures.d.ts +21 -8
  292. package/dist/getFaceInfo-B1otSDMX.cjs +1 -0
  293. package/dist/getFaceInfo-Cu4xDWiL.js +62 -0
  294. package/dist/hand/armFit.d.ts +46 -0
  295. package/dist/hand/armMask.d.ts +178 -0
  296. package/dist/hand/handCutout.d.ts +23 -0
  297. package/dist/hand/handCutoutRegistry.d.ts +7 -0
  298. package/dist/hand/handGestures.d.ts +524 -0
  299. package/dist/hand/handPose.d.ts +98 -0
  300. package/dist/hand/handRigSolver.d.ts +159 -0
  301. package/dist/hand/handTattoo.d.ts +81 -0
  302. package/dist/hand/handTouch.d.ts +240 -0
  303. package/dist/hand/wrist.d.ts +44 -0
  304. package/dist/hand/wristFilter.d.ts +44 -0
  305. package/dist/hooks/selectors.d.ts +8 -0
  306. package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
  307. package/dist/hooks/useTrackerContext.d.ts +6 -0
  308. package/dist/index-B1_TzJaI.js +1104 -0
  309. package/dist/index-BavF06C6.js +190 -0
  310. package/dist/index-BfFmpddl.cjs +21 -0
  311. package/dist/index-BuBzneeW.cjs +46 -0
  312. package/dist/index-CGsQWodV.cjs +1 -0
  313. package/dist/index-CIe7eCMH.js +3200 -0
  314. package/dist/index-CfSF8LXa.cjs +1 -0
  315. package/dist/index-D5GTzOzD.cjs +1 -0
  316. package/dist/index-DBhQzvVa.js +314 -0
  317. package/dist/index-DE17y0ZI.cjs +1 -0
  318. package/dist/index-JII7huPk.js +442 -0
  319. package/dist/index-tpCr9CLj.cjs +1 -0
  320. package/dist/{renderPasses-NnKZVfBy.js → index-w1S7fI2B.js} +219 -247
  321. package/dist/index-zGaqrz_K.js +188 -0
  322. package/dist/instructions.cjs +30 -0
  323. package/dist/instructions.js +1507 -0
  324. package/dist/{internal-vsfNQycj.js → internal-B90P-clC.js} +138 -118
  325. package/dist/internal-Cjinca64.cjs +1 -0
  326. package/dist/internal.cjs +1 -1
  327. package/dist/internal.js +15 -10
  328. package/dist/iris/compute.d.ts +7 -5
  329. package/dist/iris/types.d.ts +6 -4
  330. package/dist/{landmarkMask-CbTFzBYG.js → landmarkMask-BFDyBnKM.js} +6 -6
  331. package/dist/landmarks-BlUqf5MZ.cjs +1 -0
  332. package/dist/landmarks-bftdwq6Z.js +76 -0
  333. package/dist/loaders-BGAUACsd.js +363 -0
  334. package/dist/loaders-BJ1_QCHt.cjs +1 -0
  335. package/dist/low-level.cjs +1 -1
  336. package/dist/low-level.js +666 -602
  337. package/dist/main.cjs +1 -1
  338. package/dist/main.js +866 -1182
  339. package/dist/models/Body/index.d.ts +2 -0
  340. package/dist/models/Face/constants.d.ts +8 -0
  341. package/dist/models/Face/index.d.ts +3 -11
  342. package/dist/models/Face/rotation.d.ts +18 -3
  343. package/dist/models/Hand/HandTracking.d.ts +17 -1
  344. package/dist/models/Segmentation/index.d.ts +2 -0
  345. package/dist/models/nodeSource.d.ts +9 -0
  346. package/dist/particles/emission.d.ts +24 -0
  347. package/dist/particles/eyes.d.ts +24 -0
  348. package/dist/particles/glsl.d.ts +14 -0
  349. package/dist/particles/index.d.ts +10 -0
  350. package/dist/particles/motion.d.ts +42 -0
  351. package/dist/particles/presets.d.ts +12 -0
  352. package/dist/particles/ring.d.ts +58 -0
  353. package/dist/particles/selfTest.d.ts +53 -0
  354. package/dist/particles/settings.d.ts +127 -0
  355. package/dist/particles/shapes.d.ts +29 -0
  356. package/dist/particles/spawner.d.ts +60 -0
  357. package/dist/particles/system.d.ts +64 -0
  358. package/dist/particles.cjs +122 -0
  359. package/dist/particles.js +774 -0
  360. package/dist/product.cjs +1 -1
  361. package/dist/product.js +29 -29
  362. package/dist/{providers-C0Dlhh9Z.js → providers-C8rE26Uf.js} +127 -126
  363. package/dist/providers-DHsrhDI2.cjs +62 -0
  364. package/dist/render/renderPasses.d.ts +8 -0
  365. package/dist/render/sceneBeforeRender.d.ts +12 -0
  366. package/dist/{renderGroups-CN1cGFUo.js → renderGroups-B38pUaX2.js} +1 -1
  367. package/dist/{renderGroups-O4KmaMl9.cjs → renderGroups-Cb_4Ar1Q.cjs} +1 -1
  368. package/dist/renderPasses-B6l8IpJv.js +1290 -0
  369. package/dist/renderPasses-dqmkft4P.cjs +158 -0
  370. package/dist/renderState-CJNmj5jz.js +39 -0
  371. package/dist/renderState-apSfg4eR.cjs +1 -0
  372. package/dist/scene-object.cjs +1 -1
  373. package/dist/scene-object.js +2 -2
  374. package/dist/segmentation-Cb3ouK6Z.js +1758 -0
  375. package/dist/segmentation-D9pYO6aR.cjs +1 -0
  376. package/dist/segmentation2d/types.d.ts +6 -0
  377. package/dist/select-Ck5LGz-J.cjs +1 -0
  378. package/dist/select-pYRo_win.js +233 -0
  379. package/dist/selectors-C4X71aoD.cjs +1 -0
  380. package/dist/selectors-DmNaKIwE.js +196 -0
  381. package/dist/session-BrH8G7iJ.cjs +31 -0
  382. package/dist/session-DgA_z6O1.js +418 -0
  383. package/dist/{settings-aQk845NJ.js → settings-BJ7FMBsO.js} +53 -15
  384. package/dist/settings-C63FMBlF.cjs +1 -0
  385. package/dist/similarityFit-BFqHND2e.cjs +1 -0
  386. package/dist/similarityFit-Bbz-R8AY.js +91 -0
  387. package/dist/spring/index.d.ts +2 -0
  388. package/dist/spring/spring.d.ts +69 -0
  389. package/dist/spring/swing.d.ts +54 -0
  390. package/dist/tracking.cjs +10 -1
  391. package/dist/tracking.js +1002 -855
  392. package/dist/trigger-D0Pm9noT.cjs +49 -0
  393. package/dist/trigger-IQeys0oS.js +2128 -0
  394. package/dist/types/face.d.ts +20 -1
  395. package/dist/types/hand-tracking.d.ts +9 -0
  396. package/dist/types/nodes.d.ts +20 -1
  397. package/dist/types/segmentation.d.ts +5 -0
  398. package/dist/updateThrottle-BseecYag.js +4 -0
  399. package/dist/updateThrottle-Of5Y4SVa.cjs +1 -0
  400. package/dist/useFaceInfo-BHDNCvsJ.cjs +1 -0
  401. package/dist/useFaceInfo-J4x7LsqL.js +76 -0
  402. package/dist/useFaceResultReader-BvEo5REG.js +61 -0
  403. package/dist/useFaceResultReader-DuaL1KJG.cjs +1 -0
  404. package/dist/useInstructionHold-DOu-RpCM.js +53 -0
  405. package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
  406. package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
  407. package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
  408. package/dist/{useXRCapabilities-B1R2ghy-.cjs → useXRCapabilities-Cr3RzuAW.cjs} +1 -1
  409. package/dist/{useXRCapabilities-C68v__wB.js → useXRCapabilities-Cxmlmpbd.js} +1 -1
  410. package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
  411. package/dist/utils/headOccluderFit.d.ts +42 -0
  412. package/dist/utils/integrity.d.ts +17 -0
  413. package/dist/utils/resolveNumFaces.d.ts +13 -0
  414. package/dist/utils/shoulderOccluderFit.d.ts +38 -0
  415. package/dist/utils/similarityFit.d.ts +23 -0
  416. package/dist/uv-BMFt19bg.cjs +1 -0
  417. package/dist/{index-CsUdQ-pn.js → uv-DJU_XfmN.js} +15 -249
  418. package/docs/SDK_DOCUMENTATION.md +1 -2
  419. package/docs/api/adaptive-quality.mdx +1 -1
  420. package/docs/api/body-instructions.mdx +285 -0
  421. package/docs/api/body-triggers.mdx +234 -0
  422. package/docs/api/camera-permission.mdx +1 -1
  423. package/docs/api/coordinate-spaces.mdx +7 -4
  424. package/docs/api/cross-camera.mdx +3 -2
  425. package/docs/api/debug-ui-scene-editor.mdx +23 -2
  426. package/docs/api/external-face-mesh.mdx +231 -0
  427. package/docs/api/face-actions.mdx +20 -16
  428. package/docs/api/face-attribute-expression.mdx +1 -1
  429. package/docs/api/face-binding-anchors.mdx +4 -2
  430. package/docs/api/face-character.mdx +157 -0
  431. package/docs/api/face-effects.mdx +3 -0
  432. package/docs/api/face-expression-controller.mdx +153 -0
  433. package/docs/api/face-info.mdx +17 -11
  434. package/docs/api/face-inset.mdx +204 -0
  435. package/docs/api/face-instructions.mdx +183 -0
  436. package/docs/api/face-liquify.mdx +196 -0
  437. package/docs/api/face-mesh.mdx +4 -7
  438. package/docs/api/face-morph.mdx +117 -0
  439. package/docs/api/face-painting.mdx +7 -0
  440. package/docs/api/face-reprojection.mdx +154 -0
  441. package/docs/api/face-retouching.mdx +18 -10
  442. package/docs/api/face-swap.mdx +350 -0
  443. package/docs/api/face-warp-3d.mdx +166 -0
  444. package/docs/api/faceless.mdx +143 -0
  445. package/docs/api/gestures.mdx +68 -32
  446. package/docs/api/hair.mdx +97 -0
  447. package/docs/api/hand-instructions.mdx +222 -0
  448. package/docs/api/hand-rig.mdx +535 -0
  449. package/docs/api/hand-touch.mdx +162 -0
  450. package/docs/api/head-occluder.mdx +563 -0
  451. package/docs/api/holistic-tracker.mdx +6 -1
  452. package/docs/api/instructions.mdx +323 -0
  453. package/docs/api/iris-tracking.mdx +24 -19
  454. package/docs/api/made-up-camera.mdx +131 -0
  455. package/docs/api/makeup-skin-tone.mdx +135 -0
  456. package/docs/api/makeup.mdx +353 -0
  457. package/docs/api/multi-subject.mdx +4 -1
  458. package/docs/api/particles.mdx +155 -0
  459. package/docs/api/person-cutout.mdx +1 -1
  460. package/docs/api/pin-to-face-mesh.mdx +274 -0
  461. package/docs/api/product-ar.mdx +5 -2
  462. package/docs/api/segmentation-overlay.mdx +1 -1
  463. package/docs/docs.json +29 -1
  464. package/docs/examples/lip-shaders.mdx +82 -33
  465. package/docs/guides/face-atlas-template.svg +1 -0
  466. package/docs/guides/face-atlas-textures.mdx +186 -0
  467. package/docs/guides/face-texture-template.svg +1 -0
  468. package/docs/guides/harness-debug-ui.mdx +4 -4
  469. package/docs/guides/lip-effect-textures.mdx +178 -102
  470. package/docs/guides/lip-uv-template.png +0 -0
  471. package/docs/guides/lip-uv-template.svg +1 -1
  472. package/docs/guides/makeup-design-textures.mdx +109 -0
  473. package/docs/introduction.mdx +1 -2
  474. package/package.json +11 -1
  475. package/dist/DebuggerUI-C-ldiozL.js +0 -269
  476. package/dist/DebuggerUI-CWX5EtQv.cjs +0 -1
  477. package/dist/FaceMeshRenderer-BEEXZwS6.cjs +0 -158
  478. package/dist/FaceMeshRenderer-UuH5sTXG.js +0 -1322
  479. package/dist/FaceRetouch-C7h7x9kd.js +0 -683
  480. package/dist/FaceRetouch-DqftT26Y.cjs +0 -134
  481. package/dist/GLTFLoader-C5q63sKO.js +0 -1633
  482. package/dist/GLTFLoader-Cb_CRwmG.cjs +0 -1
  483. package/dist/SegmentationOverlay-DQuW3dsc.js +0 -133
  484. package/dist/SegmentationOverlay-aWVod8Kl.cjs +0 -1
  485. package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +0 -15
  486. package/dist/components/FaceWarp3D/defaults.d.ts +0 -37
  487. package/dist/components/FaceWarp3D/warp.d.ts +0 -13
  488. package/dist/contexts-CO0sd4JQ.cjs +0 -1
  489. package/dist/contexts-FzlnnMYD.js +0 -669
  490. package/dist/debug-ui/face-warp-3d/index.d.ts +0 -6
  491. package/dist/getFaceInfo-BkZfaQs-.js +0 -118
  492. package/dist/getFaceInfo-ahPxQFGu.cjs +0 -1
  493. package/dist/index--RgGzZ6X.cjs +0 -47
  494. package/dist/index-CHVbH0hz.js +0 -214
  495. package/dist/index-CeVkgsag.cjs +0 -1
  496. package/dist/index-CnGox6Xr.js +0 -3054
  497. package/dist/index-DKBAh6hV.cjs +0 -1
  498. package/dist/index-DsZwTfG0.cjs +0 -1
  499. package/dist/index-Dw6tj2Mi.js +0 -144
  500. package/dist/index-OCPjOaeP.cjs +0 -1
  501. package/dist/index-s9pF4zkG.js +0 -2053
  502. package/dist/internal-BYza1h8_.cjs +0 -1
  503. package/dist/measures-9dQPdw96.js +0 -154
  504. package/dist/measures-KfJzpvod.cjs +0 -1
  505. package/dist/providers-YNwkmNeK.cjs +0 -62
  506. package/dist/renderPasses-Cg-zqmEz.cjs +0 -21
  507. package/dist/screenTransform-BenfCtZt.js +0 -44
  508. package/dist/screenTransform-BiXdpVf0.cjs +0 -1
  509. package/dist/segmentation-9PhSvc-R.cjs +0 -1
  510. package/dist/segmentation-CeOTKemr.js +0 -5
  511. package/dist/selectors-C5G1PMYL.js +0 -195
  512. package/dist/selectors-Du_PsVnW.cjs +0 -1
  513. package/dist/session-BBr0yN8h.cjs +0 -31
  514. package/dist/session-Cy0m7l7-.js +0 -363
  515. package/dist/settings-DRR7-snV.cjs +0 -1
  516. package/dist/useFaceInfo-Blf7FCu3.js +0 -303
  517. package/dist/useFaceInfo-C5mO8NQY.cjs +0 -1
@@ -0,0 +1,31 @@
1
+ "use strict";const m=require("./index-CfSF8LXa.cjs"),s=require("react/jsx-runtime"),L=require("react-dom"),a=require("react"),p=require("./x-KC8E4Gaj.cjs"),j=(e,t)=>new URL(`/assets/sdk/debug-ui/v1/${e}/${t}`,m.libConfig.assetStorageEndpoint).href,M=e=>e.replace(/\.[^.]+$/,"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),z=["person_fullbody.mp4","person_looking.mp4","person_shaking_head.mp4","person_thumbUp.mp4","two_people_smiling.mp4"],F=["person_fist_sign.jpg","person_fullbody.jpg","person_peace_sign.jpg","person_portrait.jpg","three_people_smiling.jpg","two_people_smiling.jpg"],T=(e,t)=>({id:`sdk-video-${t+1}`,kind:"video",label:M(e),url:j("videos",e)}),W=(e,t)=>({id:`sdk-image-${t+1}`,kind:"image",label:M(e),url:j("images",e)}),v=z.map(T),_=F.map(W),$=[...v,{id:"webcam",kind:"webcam",label:"Webcam"},..._];/**
2
+ * @license lucide-react v1.17.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const N=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],P=p.createLucideIcon("camera",N);/**
7
+ * @license lucide-react v1.17.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const V=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],D=p.createLucideIcon("chevron-down",V);/**
12
+ * @license lucide-react v1.17.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const X=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],U=p.createLucideIcon("grip-vertical",X);/**
17
+ * @license lucide-react v1.17.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const A=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],K=p.createLucideIcon("image",A);/**
22
+ * @license lucide-react v1.17.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const O=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],q=p.createLucideIcon("menu",O);/**
27
+ * @license lucide-react v1.17.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const B=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],H=p.createLucideIcon("video",B),G=e=>e==="webcam"?"📷 ":e==="image"?"🖼 ":"▶ ",Y={position:"fixed",zIndex:2e4,pointerEvents:"none"},R={pointerEvents:"auto",border:"1px solid rgba(255, 255, 255, 0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 12px 32px rgba(0, 0, 0, 0.28)",backdropFilter:"blur(20px) saturate(1.15)",WebkitBackdropFilter:"blur(20px) saturate(1.15)",color:"#f8fafc",display:"flex"},J={...R,width:34,height:34,borderRadius:17,alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"transform 150ms ease"},Q={...R,flexDirection:"column",borderRadius:12,overflow:"hidden",padding:4,gap:4},Z={display:"flex",alignItems:"center",gap:3},ee={width:1,height:12,background:"rgba(255, 255, 255, 0.12)",margin:"0 3px"},te={display:"flex",width:16,height:24,alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148, 163, 184, 0.8)",flex:"0 0 auto"},w=(e=!1)=>({display:"flex",width:24,height:24,alignItems:"center",justifyContent:"center",borderRadius:8,border:`1px solid ${e?"rgba(255, 255, 255, 0.12)":"transparent"}`,background:e?"rgba(255, 255, 255, 0.08)":"transparent",color:e?"#f8fafc":"rgba(226, 232, 240, 0.72)",cursor:"pointer",flex:"0 0 auto",transition:"background 120ms ease, color 120ms ease"}),re={position:"relative",display:"flex",alignItems:"center"},ne={width:"100%",minWidth:140,height:24,borderRadius:8,border:"1px solid rgba(255, 255, 255, 0.10)",background:"rgba(15, 23, 42, 0.65)",color:"#f8fafc",fontSize:11,outline:"none",paddingLeft:7,paddingRight:20,appearance:"none",cursor:"pointer"},se={pointerEvents:"none",position:"absolute",right:5,top:0,bottom:0,display:"flex",alignItems:"center",color:"rgba(148, 163, 184, 0.9)"},ie={height:24,display:"flex",alignItems:"center",padding:"0 8px",borderRadius:8,border:"1px solid rgba(255, 255, 255, 0.08)",background:"rgba(255, 255, 255, 0.04)",color:"rgba(226, 232, 240, 0.72)",fontSize:11},S={width:14,height:14},ae=({value:e,onChange:t,sources:n,style:i})=>{const[c,d]=a.useState(!1),[g,h]=a.useState({x:16,y:16}),[u,f]=a.useState(e.kind),o=a.useRef(null),x=a.useMemo(()=>({webcam:n.filter(r=>r.kind==="webcam"),image:n.filter(r=>r.kind==="image"),video:n.filter(r=>r.kind==="video")}),[n]),b=x[u];a.useEffect(()=>{f(e.kind)},[e.kind]);const I=r=>{f(r);const l=x[r][0];l&&t(l)};a.useEffect(()=>{const r=y=>{o.current&&h({x:Math.max(8,y.clientX-o.current.x),y:Math.max(8,y.clientY-o.current.y)})},l=()=>{o.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",r),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",l)}},[]);const k=r=>{const l=r.currentTarget.getBoundingClientRect();o.current={x:r.clientX-l.left,y:r.clientY-l.top},document.body.classList.add("select-none"),r.currentTarget.setPointerCapture(r.pointerId)},C=()=>{if(b.length===0){const r=u==="webcam"?"No camera source":u==="image"?"No image preview":"No video preview";return s.jsx("div",{style:ie,children:r})}return s.jsxs("div",{style:re,children:[s.jsx("select",{value:e.id,onChange:r=>{const l=n.find(y=>y.id===r.target.value);l&&t(l)},style:ne,children:b.map(r=>s.jsxs("option",{value:r.id,children:[G(u),r.label]},r.id))}),s.jsx("div",{style:se,children:s.jsx("span",{style:{width:10,height:10},children:s.jsx(D,{size:10,strokeWidth:1.8})})})]})};return typeof document>"u"?null:L.createPortal(s.jsx("div",{style:{...Y,left:g.x,top:g.y,...i},children:c?s.jsxs("div",{style:Q,children:[s.jsxs("div",{style:Z,children:[s.jsx("div",{onPointerDown:k,style:te,title:"Drag to move",children:s.jsx(U,{size:11,strokeWidth:2})}),s.jsx("button",{type:"button",onClick:()=>d(!1),style:w(!1),title:"Close Menu",children:s.jsx("span",{style:S,children:s.jsx(p.X,{size:14,strokeWidth:1.8})})}),s.jsx("div",{style:ee}),["webcam","image","video"].map(r=>s.jsx("button",{type:"button",onClick:()=>I(r),style:w(u===r),title:r.charAt(0).toUpperCase()+r.slice(1),children:s.jsx("span",{style:S,children:r==="webcam"?s.jsx(P,{size:14,strokeWidth:1.8}):r==="image"?s.jsx(K,{size:14,strokeWidth:1.8}):s.jsx(H,{size:14,strokeWidth:1.8})})},r))]}),C()]}):s.jsx("div",{style:J,onClick:()=>d(!0),onPointerDown:k,title:"Open Media Menu",children:s.jsx("span",{style:{width:16,height:16},children:s.jsx(q,{size:14,strokeWidth:1.8})})})}),document.body)},ce=async e=>{const t=new Image;t.crossOrigin="anonymous",t.src=e,await t.decode();const n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;const i=n.getContext("2d");if(!i)throw new Error("Unable to create image media canvas");i.drawImage(t,0,0,n.width,n.height);const c=n.captureStream(30);return{stream:c,release:()=>{c.getTracks().forEach(d=>d.stop()),n.width=0,n.height=0}}},oe=1/30,le=e=>{const[t,n]=a.useState(null);return a.useEffect(()=>{if(!e){n(null);return}const i=()=>n({paused:e.paused,time:e.currentTime,duration:Number.isFinite(e.duration)?e.duration:0,rate:e.playbackRate});i();const c=["play","pause","timeupdate","seeked","ratechange","durationchange"];for(const d of c)e.addEventListener(d,i);return()=>{for(const d of c)e.removeEventListener(d,i)}},[e]),a.useMemo(()=>!e||!t?null:{...t,pause:()=>e.pause(),play:()=>{e.play().catch(()=>{})},restart:()=>{e.currentTime=0},step:(i=1)=>{e.pause();const c=Number.isFinite(e.duration)?e.duration:1/0;e.currentTime=Math.min(c,Math.max(0,e.currentTime+i*oe))},setRate:i=>{e.playbackRate=i}},[e,t])},de=async e=>{const t=document.createElement("video");t.src=e,t.loop=!0,t.muted=!0,t.playsInline=!0,t.crossOrigin="anonymous",await t.play();const n=t.captureStream();return{stream:n,video:t,release:()=>{n.getTracks().forEach(i=>i.stop()),t.pause(),t.removeAttribute("src"),t.load()}}},E=(e,t)=>{const{session:n}=m.useXRContext(),[i,c]=a.useState(null),d=JSON.stringify((t==null?void 0:t.pipeline)??null),g=a.useRef(t==null?void 0:t.pipeline);return g.current=t==null?void 0:t.pipeline,a.useEffect(()=>{let h=!1,u=null;return(async()=>{try{if(e.kind==="webcam")await n.setMediaSource({source:m.XRMediaSource.WEBCAM});else{if(!e.url)throw new Error(`Missing media URL for ${e.id}`);const o=e.kind==="image"?await ce(e.url):await de(e.url);if(u=o,h){o.release();return}c(o.video??null),await n.setMediaSource({source:m.XRMediaSource.STREAM,stream:o.stream,sourceKind:e.kind})}await n.registerXRPipeline(g.current??[{model:m.XRModel.FACE_TRACKER,options:{numFaces:(t==null?void 0:t.numFaces)??1}}]),await n.start()}catch(o){console.error("[MediaSourceSession] Error initializing XR session:",o)}})(),()=>{h=!0,u==null||u.release(),c(null)}},[e,t==null?void 0:t.numFaces,d,n]),le(i)},ue=E;exports.MediaSourceSwitcher=ae;exports.defaultMediaSources=$;exports.sdkImageMediaSources=_;exports.sdkVideoMediaSources=v;exports.useFaceTrackingMediaSourceSession=ue;exports.useMediaSourceSession=E;
@@ -0,0 +1,418 @@
1
+ import { C as z, u as W, z as S, X as $ } from "./index-CIe7eCMH.js";
2
+ import { jsx as a, jsxs as y } from "react/jsx-runtime";
3
+ import { createPortal as F } from "react-dom";
4
+ import { useState as g, useRef as _, useMemo as E, useEffect as f } from "react";
5
+ import { c as u, X as T } from "./x-Co8jPhP0.js";
6
+ const R = (e, t) => new URL(`/assets/sdk/debug-ui/v1/${e}/${t}`, z.assetStorageEndpoint).href, C = (e) => e.replace(/\.[^.]+$/, "").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()), N = [
7
+ "person_fullbody.mp4",
8
+ "person_looking.mp4",
9
+ "person_shaking_head.mp4",
10
+ "person_thumbUp.mp4",
11
+ "two_people_smiling.mp4"
12
+ ], P = [
13
+ "person_fist_sign.jpg",
14
+ "person_fullbody.jpg",
15
+ "person_peace_sign.jpg",
16
+ "person_portrait.jpg",
17
+ "three_people_smiling.jpg",
18
+ "two_people_smiling.jpg"
19
+ ], V = (e, t) => ({
20
+ id: `sdk-video-${t + 1}`,
21
+ kind: "video",
22
+ label: C(e),
23
+ url: R("videos", e)
24
+ }), X = (e, t) => ({
25
+ id: `sdk-image-${t + 1}`,
26
+ kind: "image",
27
+ label: C(e),
28
+ url: R("images", e)
29
+ }), D = N.map(V), U = P.map(X), Se = [
30
+ ...D,
31
+ { id: "webcam", kind: "webcam", label: "Webcam" },
32
+ ...U
33
+ ];
34
+ /**
35
+ * @license lucide-react v1.17.0 - ISC
36
+ *
37
+ * This source code is licensed under the ISC license.
38
+ * See the LICENSE file in the root directory of this source tree.
39
+ */
40
+ const A = [
41
+ [
42
+ "path",
43
+ {
44
+ d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
45
+ key: "18u6gg"
46
+ }
47
+ ],
48
+ ["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
49
+ ], K = u("camera", A);
50
+ /**
51
+ * @license lucide-react v1.17.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */
56
+ const O = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], B = u("chevron-down", O);
57
+ /**
58
+ * @license lucide-react v1.17.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */
63
+ const H = [
64
+ ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
65
+ ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
66
+ ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
67
+ ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
68
+ ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
69
+ ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
70
+ ], G = u("grip-vertical", H);
71
+ /**
72
+ * @license lucide-react v1.17.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */
77
+ const Y = [
78
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
79
+ ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
80
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
81
+ ], q = u("image", Y);
82
+ /**
83
+ * @license lucide-react v1.17.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */
88
+ const J = [
89
+ ["path", { d: "M4 5h16", key: "1tepv9" }],
90
+ ["path", { d: "M4 12h16", key: "1lakjw" }],
91
+ ["path", { d: "M4 19h16", key: "1djgab" }]
92
+ ], Q = u("menu", J);
93
+ /**
94
+ * @license lucide-react v1.17.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */
99
+ const Z = [
100
+ [
101
+ "path",
102
+ {
103
+ d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
104
+ key: "ftymec"
105
+ }
106
+ ],
107
+ ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
108
+ ], ee = u("video", Z), te = (e) => e === "webcam" ? "📷 " : e === "image" ? "🖼 " : "▶ ", re = {
109
+ position: "fixed",
110
+ zIndex: 2e4,
111
+ pointerEvents: "none"
112
+ }, I = {
113
+ pointerEvents: "auto",
114
+ border: "1px solid rgba(255, 255, 255, 0.12)",
115
+ background: "rgba(8, 15, 28, 0.58)",
116
+ boxShadow: "0 12px 32px rgba(0, 0, 0, 0.28)",
117
+ backdropFilter: "blur(20px) saturate(1.15)",
118
+ WebkitBackdropFilter: "blur(20px) saturate(1.15)",
119
+ color: "#f8fafc",
120
+ display: "flex"
121
+ }, ne = {
122
+ ...I,
123
+ width: 34,
124
+ height: 34,
125
+ borderRadius: 17,
126
+ alignItems: "center",
127
+ justifyContent: "center",
128
+ cursor: "pointer",
129
+ transition: "transform 150ms ease"
130
+ }, ae = {
131
+ ...I,
132
+ flexDirection: "column",
133
+ borderRadius: 12,
134
+ overflow: "hidden",
135
+ padding: 4,
136
+ gap: 4
137
+ }, ie = {
138
+ display: "flex",
139
+ alignItems: "center",
140
+ gap: 3
141
+ }, se = {
142
+ width: 1,
143
+ height: 12,
144
+ background: "rgba(255, 255, 255, 0.12)",
145
+ margin: "0 3px"
146
+ }, oe = {
147
+ display: "flex",
148
+ width: 16,
149
+ height: 24,
150
+ alignItems: "center",
151
+ justifyContent: "center",
152
+ cursor: "grab",
153
+ color: "rgba(148, 163, 184, 0.8)",
154
+ flex: "0 0 auto"
155
+ }, v = (e = !1) => ({
156
+ display: "flex",
157
+ width: 24,
158
+ height: 24,
159
+ alignItems: "center",
160
+ justifyContent: "center",
161
+ borderRadius: 8,
162
+ border: `1px solid ${e ? "rgba(255, 255, 255, 0.12)" : "transparent"}`,
163
+ background: e ? "rgba(255, 255, 255, 0.08)" : "transparent",
164
+ color: e ? "#f8fafc" : "rgba(226, 232, 240, 0.72)",
165
+ cursor: "pointer",
166
+ flex: "0 0 auto",
167
+ transition: "background 120ms ease, color 120ms ease"
168
+ }), ce = {
169
+ position: "relative",
170
+ display: "flex",
171
+ alignItems: "center"
172
+ }, le = {
173
+ width: "100%",
174
+ minWidth: 140,
175
+ height: 24,
176
+ borderRadius: 8,
177
+ border: "1px solid rgba(255, 255, 255, 0.10)",
178
+ background: "rgba(15, 23, 42, 0.65)",
179
+ color: "#f8fafc",
180
+ fontSize: 11,
181
+ outline: "none",
182
+ paddingLeft: 7,
183
+ paddingRight: 20,
184
+ appearance: "none",
185
+ cursor: "pointer"
186
+ }, de = {
187
+ pointerEvents: "none",
188
+ position: "absolute",
189
+ right: 5,
190
+ top: 0,
191
+ bottom: 0,
192
+ display: "flex",
193
+ alignItems: "center",
194
+ color: "rgba(148, 163, 184, 0.9)"
195
+ }, ue = {
196
+ height: 24,
197
+ display: "flex",
198
+ alignItems: "center",
199
+ padding: "0 8px",
200
+ borderRadius: 8,
201
+ border: "1px solid rgba(255, 255, 255, 0.08)",
202
+ background: "rgba(255, 255, 255, 0.04)",
203
+ color: "rgba(226, 232, 240, 0.72)",
204
+ fontSize: 11
205
+ }, M = { width: 14, height: 14 }, ve = ({
206
+ value: e,
207
+ onChange: t,
208
+ sources: n,
209
+ style: i
210
+ }) => {
211
+ const [s, l] = g(!1), [p, m] = g({ x: 16, y: 16 }), [d, b] = g(e.kind), o = _(null), w = E(
212
+ () => ({
213
+ webcam: n.filter((r) => r.kind === "webcam"),
214
+ image: n.filter((r) => r.kind === "image"),
215
+ video: n.filter((r) => r.kind === "video")
216
+ }),
217
+ [n]
218
+ ), k = w[d];
219
+ f(() => {
220
+ b(e.kind);
221
+ }, [e.kind]);
222
+ const j = (r) => {
223
+ b(r);
224
+ const c = w[r][0];
225
+ c && t(c);
226
+ };
227
+ f(() => {
228
+ const r = (h) => {
229
+ o.current && m({
230
+ x: Math.max(8, h.clientX - o.current.x),
231
+ y: Math.max(8, h.clientY - o.current.y)
232
+ });
233
+ }, c = () => {
234
+ o.current = null, document.body.classList.remove("select-none");
235
+ };
236
+ return window.addEventListener("pointermove", r), window.addEventListener("pointerup", c), () => {
237
+ window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", c);
238
+ };
239
+ }, []);
240
+ const x = (r) => {
241
+ const c = r.currentTarget.getBoundingClientRect();
242
+ o.current = {
243
+ x: r.clientX - c.left,
244
+ y: r.clientY - c.top
245
+ }, document.body.classList.add("select-none"), r.currentTarget.setPointerCapture(r.pointerId);
246
+ }, L = () => k.length === 0 ? /* @__PURE__ */ a("div", { style: ue, children: d === "webcam" ? "No camera source" : d === "image" ? "No image preview" : "No video preview" }) : /* @__PURE__ */ y("div", { style: ce, children: [
247
+ /* @__PURE__ */ a(
248
+ "select",
249
+ {
250
+ value: e.id,
251
+ onChange: (r) => {
252
+ const c = n.find((h) => h.id === r.target.value);
253
+ c && t(c);
254
+ },
255
+ style: le,
256
+ children: k.map((r) => /* @__PURE__ */ y("option", { value: r.id, children: [
257
+ te(d),
258
+ r.label
259
+ ] }, r.id))
260
+ }
261
+ ),
262
+ /* @__PURE__ */ a("div", { style: de, children: /* @__PURE__ */ a("span", { style: { width: 10, height: 10 }, children: /* @__PURE__ */ a(B, { size: 10, strokeWidth: 1.8 }) }) })
263
+ ] });
264
+ return typeof document > "u" ? null : F(
265
+ /* @__PURE__ */ a("div", { style: { ...re, left: p.x, top: p.y, ...i }, children: s ? (
266
+ // --- Expanded State ---
267
+ /* @__PURE__ */ y("div", { style: ae, children: [
268
+ /* @__PURE__ */ y("div", { style: ie, children: [
269
+ /* @__PURE__ */ a("div", { onPointerDown: x, style: oe, title: "Drag to move", children: /* @__PURE__ */ a(G, { size: 11, strokeWidth: 2 }) }),
270
+ /* @__PURE__ */ a(
271
+ "button",
272
+ {
273
+ type: "button",
274
+ onClick: () => l(!1),
275
+ style: v(!1),
276
+ title: "Close Menu",
277
+ children: /* @__PURE__ */ a("span", { style: M, children: /* @__PURE__ */ a(T, { size: 14, strokeWidth: 1.8 }) })
278
+ }
279
+ ),
280
+ /* @__PURE__ */ a("div", { style: se }),
281
+ ["webcam", "image", "video"].map((r) => /* @__PURE__ */ a(
282
+ "button",
283
+ {
284
+ type: "button",
285
+ onClick: () => j(r),
286
+ style: v(d === r),
287
+ title: r.charAt(0).toUpperCase() + r.slice(1),
288
+ children: /* @__PURE__ */ a("span", { style: M, children: r === "webcam" ? /* @__PURE__ */ a(K, { size: 14, strokeWidth: 1.8 }) : r === "image" ? /* @__PURE__ */ a(q, { size: 14, strokeWidth: 1.8 }) : /* @__PURE__ */ a(ee, { size: 14, strokeWidth: 1.8 }) })
289
+ },
290
+ r
291
+ ))
292
+ ] }),
293
+ L()
294
+ ] })
295
+ ) : (
296
+ // --- Collapsed State (Minimal FAB) ---
297
+ /* @__PURE__ */ a(
298
+ "div",
299
+ {
300
+ style: ne,
301
+ onClick: () => l(!0),
302
+ onPointerDown: x,
303
+ title: "Open Media Menu",
304
+ children: /* @__PURE__ */ a("span", { style: { width: 16, height: 16 }, children: /* @__PURE__ */ a(Q, { size: 14, strokeWidth: 1.8 }) })
305
+ }
306
+ )
307
+ ) }),
308
+ document.body
309
+ );
310
+ }, pe = async (e) => {
311
+ const t = new Image();
312
+ t.crossOrigin = "anonymous", t.src = e, await t.decode();
313
+ const n = document.createElement("canvas");
314
+ n.width = t.naturalWidth, n.height = t.naturalHeight;
315
+ const i = n.getContext("2d");
316
+ if (!i) throw new Error("Unable to create image media canvas");
317
+ i.drawImage(t, 0, 0, n.width, n.height);
318
+ const s = n.captureStream(30);
319
+ return {
320
+ stream: s,
321
+ release: () => {
322
+ s.getTracks().forEach((l) => l.stop()), n.width = 0, n.height = 0;
323
+ }
324
+ };
325
+ }, ge = 1 / 30, me = (e) => {
326
+ const [t, n] = g(null);
327
+ return f(() => {
328
+ if (!e) {
329
+ n(null);
330
+ return;
331
+ }
332
+ const i = () => n({
333
+ paused: e.paused,
334
+ time: e.currentTime,
335
+ duration: Number.isFinite(e.duration) ? e.duration : 0,
336
+ rate: e.playbackRate
337
+ });
338
+ i();
339
+ const s = ["play", "pause", "timeupdate", "seeked", "ratechange", "durationchange"];
340
+ for (const l of s) e.addEventListener(l, i);
341
+ return () => {
342
+ for (const l of s) e.removeEventListener(l, i);
343
+ };
344
+ }, [e]), E(() => !e || !t ? null : {
345
+ ...t,
346
+ pause: () => e.pause(),
347
+ play: () => {
348
+ e.play().catch(() => {
349
+ });
350
+ },
351
+ restart: () => {
352
+ e.currentTime = 0;
353
+ },
354
+ step: (i = 1) => {
355
+ e.pause();
356
+ const s = Number.isFinite(e.duration) ? e.duration : 1 / 0;
357
+ e.currentTime = Math.min(s, Math.max(0, e.currentTime + i * ge));
358
+ },
359
+ setRate: (i) => {
360
+ e.playbackRate = i;
361
+ }
362
+ }, [e, t]);
363
+ }, he = async (e) => {
364
+ const t = document.createElement("video");
365
+ t.src = e, t.loop = !0, t.muted = !0, t.playsInline = !0, t.crossOrigin = "anonymous", await t.play();
366
+ const n = t.captureStream();
367
+ return {
368
+ stream: n,
369
+ video: t,
370
+ // Stopping the stream's tracks does not stop the video: a looping sample
371
+ // left playing kept decoding in the background, and every switch added
372
+ // one more (the page got heavier with each change until a reload).
373
+ release: () => {
374
+ n.getTracks().forEach((i) => i.stop()), t.pause(), t.removeAttribute("src"), t.load();
375
+ }
376
+ };
377
+ }, ye = (e, t) => {
378
+ const { session: n } = W(), [i, s] = g(null), l = JSON.stringify((t == null ? void 0 : t.pipeline) ?? null), p = _(t == null ? void 0 : t.pipeline);
379
+ return p.current = t == null ? void 0 : t.pipeline, f(() => {
380
+ let m = !1, d = null;
381
+ return (async () => {
382
+ try {
383
+ if (e.kind === "webcam")
384
+ await n.setMediaSource({ source: S.WEBCAM });
385
+ else {
386
+ if (!e.url) throw new Error(`Missing media URL for ${e.id}`);
387
+ const o = e.kind === "image" ? await pe(e.url) : await he(e.url);
388
+ if (d = o, m) {
389
+ o.release();
390
+ return;
391
+ }
392
+ s(o.video ?? null), await n.setMediaSource({
393
+ source: S.STREAM,
394
+ stream: o.stream,
395
+ sourceKind: e.kind
396
+ });
397
+ }
398
+ await n.registerXRPipeline(
399
+ p.current ?? [
400
+ { model: $.FACE_TRACKER, options: { numFaces: (t == null ? void 0 : t.numFaces) ?? 1 } }
401
+ ]
402
+ ), await n.start();
403
+ } catch (o) {
404
+ console.error("[MediaSourceSession] Error initializing XR session:", o);
405
+ }
406
+ })(), () => {
407
+ m = !0, d == null || d.release(), s(null);
408
+ };
409
+ }, [e, t == null ? void 0 : t.numFaces, l, n]), me(i);
410
+ }, Me = ye;
411
+ export {
412
+ ve as M,
413
+ D as a,
414
+ ye as b,
415
+ Se as d,
416
+ U as s,
417
+ Me as u
418
+ };
@@ -1,5 +1,41 @@
1
- import { D as a } from "./detector-K8aej4MB.js";
2
- const t = [
1
+ import { D as t } from "./detector-K8aej4MB.js";
2
+ const i = {
3
+ enabled: !0,
4
+ bothHands: !0,
5
+ countEnabled: !0,
6
+ minCountConfidence: 0.35,
7
+ showBones: !0,
8
+ showJoints: !0,
9
+ showBoundingBox: !0,
10
+ showLabels: !1,
11
+ visualScale: 1,
12
+ opacity: 0.9,
13
+ jointRadius: 3,
14
+ lineWidth: 1.5,
15
+ labelScale: 1,
16
+ smoothing: 0.35
17
+ }, r = [
18
+ [0, 1],
19
+ [1, 2],
20
+ [2, 3],
21
+ [3, 4],
22
+ [0, 5],
23
+ [5, 6],
24
+ [6, 7],
25
+ [7, 8],
26
+ [0, 9],
27
+ [9, 10],
28
+ [10, 11],
29
+ [11, 12],
30
+ [0, 13],
31
+ [13, 14],
32
+ [14, 15],
33
+ [15, 16],
34
+ [0, 17],
35
+ [17, 18],
36
+ [18, 19],
37
+ [19, 20]
38
+ ], a = [
3
39
  "both",
4
40
  "left",
5
41
  "right",
@@ -16,7 +52,7 @@ const t = [
16
52
  key: "hands",
17
53
  label: "Hands",
18
54
  type: "select",
19
- options: t.map((e) => ({ label: e, value: e }))
55
+ options: a.map((e) => ({ label: e, value: e }))
20
56
  },
21
57
  {
22
58
  key: "targetFps",
@@ -37,14 +73,14 @@ const t = [
37
73
  { key: "holdMs", label: "Hold (ms)", type: "number", min: 0, max: 1e3, step: 10 },
38
74
  { key: "predictMs", label: "Predict (ms)", type: "number", min: 0, max: 300, step: 10 },
39
75
  { key: "outputFaceBlendshapes", label: "Face blendshapes (re-inits)", type: "boolean" }
40
- ], r = (e) => ({ ...n, ...e }), i = (e, s) => ({ ...e, ...s }), m = (e) => ({
76
+ ], m = (e) => ({ ...n, ...e }), c = (e, s) => ({ ...e, ...s }), d = (e) => ({
41
77
  hands: e.hands,
42
78
  targetFps: e.targetFps > 0 ? e.targetFps : void 0,
43
79
  analysisMaxDimension: e.analysisMaxDimension,
44
80
  holdMs: e.holdMs,
45
81
  predictMs: e.predictMs,
46
82
  outputFaceBlendshapes: e.outputFaceBlendshapes
47
- }), o = { ...a }, c = [
83
+ }), o = { ...t }, b = [
48
84
  { key: "enterThreshold", label: "Enter threshold", type: "number", min: 0, max: 1, step: 0.01 },
49
85
  { key: "exitThreshold", label: "Exit threshold", type: "number", min: 0, max: 1, step: 0.01 },
50
86
  { key: "holdMs", label: "Hold before begin (ms)", type: "number", min: 0, max: 1e3, step: 10 },
@@ -58,16 +94,18 @@ const t = [
58
94
  },
59
95
  { key: "minConfidence", label: "Min confidence", type: "number", min: 0, max: 1, step: 0.05 },
60
96
  { key: "lostGraceMs", label: "Loss grace (ms)", type: "number", min: 0, max: 1e3, step: 10 }
61
- ], d = (e, s = o) => ({ ...s, ...e }), b = (e, s) => ({ ...e, ...s });
97
+ ], h = (e, s = o) => ({ ...s, ...e }), T = (e, s) => ({ ...e, ...s });
62
98
  export {
63
99
  n as D,
64
- c as G,
65
- t as H,
66
- p as a,
67
- o as b,
68
- b as c,
69
- d,
70
- i as p,
71
- r,
72
- m as t
100
+ b as G,
101
+ r as H,
102
+ a,
103
+ p as b,
104
+ o as c,
105
+ T as d,
106
+ h as e,
107
+ i as f,
108
+ c as p,
109
+ m as r,
110
+ d as t
73
111
  };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("./detector-ijypGtse.cjs"),l={enabled:!0,bothHands:!0,countEnabled:!0,minCountConfidence:.35,showBones:!0,showJoints:!0,showBoundingBox:!0,showLabels:!1,visualScale:1,opacity:.9,jointRadius:3,lineWidth:1.5,labelScale:1,smoothing:.35},i=[[0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[0,9],[9,10],[10,11],[11,12],[0,13],[13,14],[14,15],[15,16],[0,17],[17,18],[18,19],[19,20]],s=["both","left","right","none"],n={hands:"both",targetFps:24,analysisMaxDimension:768,holdMs:250,predictMs:0,outputFaceBlendshapes:!0},r=[{key:"hands",label:"Hands",type:"select",options:s.map(e=>({label:e,value:e}))},{key:"targetFps",label:"Target FPS (0 = uncapped)",type:"number",min:0,max:60,step:1},{key:"analysisMaxDimension",label:"Analysis max px",type:"number",min:256,max:1280,step:64},{key:"holdMs",label:"Hold (ms)",type:"number",min:0,max:1e3,step:10},{key:"predictMs",label:"Predict (ms)",type:"number",min:0,max:300,step:10},{key:"outputFaceBlendshapes",label:"Face blendshapes (re-inits)",type:"boolean"}],T=e=>({...n,...e}),S=(e,t)=>({...e,...t}),c=e=>({hands:e.hands,targetFps:e.targetFps>0?e.targetFps:void 0,analysisMaxDimension:e.analysisMaxDimension,holdMs:e.holdMs,predictMs:e.predictMs,outputFaceBlendshapes:e.outputFaceBlendshapes}),a={...o.DEFAULT_GESTURE_DETECTOR_OPTIONS},p=[{key:"enterThreshold",label:"Enter threshold",type:"number",min:0,max:1,step:.01},{key:"exitThreshold",label:"Exit threshold",type:"number",min:0,max:1,step:.01},{key:"holdMs",label:"Hold before begin (ms)",type:"number",min:0,max:1e3,step:10},{key:"cooldownMs",label:"Cooldown after end (ms)",type:"number",min:0,max:3e3,step:50},{key:"minConfidence",label:"Min confidence",type:"number",min:0,max:1,step:.05},{key:"lostGraceMs",label:"Loss grace (ms)",type:"number",min:0,max:1e3,step:10}],m=(e,t=a)=>({...t,...e}),E=(e,t)=>({...e,...t});exports.DEFAULT_GESTURE_SETTINGS=a;exports.DEFAULT_HAND_JOINTS_2D_SETTINGS=l;exports.DEFAULT_HOLISTIC_TRACKER_SETTINGS=n;exports.GESTURE_SETTINGS_FIELDS=p;exports.HAND_JOINTS_2D_BONES=i;exports.HOLISTIC_HANDS_OPTIONS=s;exports.HOLISTIC_TRACKER_SETTINGS_FIELDS=r;exports.patchGestureSettings=E;exports.patchHolisticTrackerSettings=S;exports.resolveGestureSettings=m;exports.resolveHolisticTrackerSettings=T;exports.toHolisticTrackerProps=c;
@@ -0,0 +1 @@
1
+ "use strict";const A=require("three");function B(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const S=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(e,s,S.get?S:{enumerable:!0,get:()=>o[s]})}}return e.default=o,Object.freeze(e)}const H=B(A),w=new H.Vector3,k=new H.Vector3,U=new H.Matrix3,C=new H.Matrix4,_=new H.Vector3,G=(o,e)=>{const s=o.slice();e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1;for(let S=0;S<12&&!(s[1]*s[1]+s[2]*s[2]+s[5]*s[5]<1e-24);S+=1)for(const[l,f]of[[0,1],[0,2],[1,2]]){const D=s[l*3+f];if(Math.abs(D)<1e-18)continue;const V=s[l*3+l],y=(s[f*3+f]-V)/(2*D),j=Math.sign(y||1)/(Math.abs(y)+Math.sqrt(y*y+1)),h=1/Math.sqrt(j*j+1),x=j*h;for(let t=0;t<3;t+=1){const n=s[t*3+l],a=s[t*3+f];s[t*3+l]=h*n-x*a,s[t*3+f]=x*n+h*a}for(let t=0;t<3;t+=1){const n=s[l*3+t],a=s[f*3+t];s[l*3+t]=h*n-x*a,s[f*3+t]=x*n+h*a}for(let t=0;t<3;t+=1){const n=e[t*3+l],a=e[t*3+f];e[t*3+l]=h*n-x*a,e[t*3+f]=x*n+h*a}}return[s[0],s[4],s[8]]},N=o=>o[0]*(o[4]*o[8]-o[5]*o[7])-o[1]*(o[3]*o[8]-o[5]*o[6])+o[2]*(o[3]*o[7]-o[4]*o[6]),r=[0,0,0,0,0,0,0,0,0],v=[0,0,0,0,0,0,0,0,0],F=[0,0,0,0,0,0,0,0,0],m=[0,0,0,0,0,0,0,0,0],E=[0,0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0,0],I=(o,e,s={scale:1,quaternion:new H.Quaternion,translation:new H.Vector3,rms:0},S=!0)=>{const z=Math.floor(Math.min(o.length,e.length)/3);if(z<3)throw new Error("solveSimilarity: at least 3 points are required");w.set(0,0,0),k.set(0,0,0);for(let t=0;t<z;t+=1)w.x+=o[t*3],w.y+=o[t*3+1],w.z+=o[t*3+2],k.x+=e[t*3],k.y+=e[t*3+1],k.z+=e[t*3+2];w.divideScalar(z),k.divideScalar(z),r.fill(0);let l=0;for(let t=0;t<z;t+=1){const n=o[t*3]-w.x,a=o[t*3+1]-w.y,p=o[t*3+2]-w.z,b=e[t*3]-k.x,d=e[t*3+1]-k.y,q=e[t*3+2]-k.z;l+=n*n+a*a+p*p,r[0]+=n*b,r[1]+=n*d,r[2]+=n*q,r[3]+=a*b,r[4]+=a*d,r[5]+=a*q,r[6]+=p*b,r[7]+=p*d,r[8]+=p*q}for(let t=0;t<3;t+=1)for(let n=0;n<3;n+=1)v[t*3+n]=r[t]*r[n]+r[3+t]*r[3+n]+r[6+t]*r[6+n];const f=G(v,F),D=[0,1,2].sort((t,n)=>f[n]-f[t]),V=[0,0,0],c=[];for(let t=0;t<3;t+=1){const n=D[t],a=F[n],p=F[3+n],b=F[6+n];m[t]=a,m[3+t]=p,m[6+t]=b;let d=r[0]*a+r[1]*p+r[2]*b,q=r[3]*a+r[4]*p+r[5]*b,O=r[6]*a+r[7]*p+r[8]*b;if(V[t]=Math.sqrt(Math.max(f[n],0)),t===2){const i=c[0][1]*c[1][2]-c[0][2]*c[1][1],M=c[0][2]*c[1][0]-c[0][0]*c[1][2],R=c[0][0]*c[1][1]-c[0][1]*c[1][0],T=d*i+q*M+O*R,g=Math.hypot(d,q,O)>1e-9*Math.max(V[0],1e-300)?T<0?-1:1:N(m)<0?-1:1;c.push([g*i,g*M,g*R]);continue}for(const i of c){const M=d*i[0]+q*i[1]+O*i[2];d-=M*i[0],q-=M*i[1],O-=M*i[2]}const Q=Math.hypot(d,q,O);if(Q>1e-12)c.push([d/Q,q/Q,O/Q]);else if(t===0)c.push([1,0,0]);else{const i=Math.abs(c[0][0])<.9?[1,0,0]:[0,1,0],M=i[0]*c[0][0]+i[1]*c[0][1]+i[2]*c[0][2],R=i[0]-M*c[0][0],T=i[1]-M*c[0][1],P=i[2]-M*c[0][2],g=Math.hypot(R,T,P);c.push([R/g,T/g,P/g])}}for(let t=0;t<3;t+=1)E[t]=c[t][0],E[3+t]=c[t][1],E[6+t]=c[t][2];const y=[1,1,N(m)*N(E)<0?-1:1];for(let t=0;t<3;t+=1)for(let n=0;n<3;n+=1)u[t*3+n]=m[t*3]*y[0]*E[n*3]+m[t*3+1]*y[1]*E[n*3+1]+m[t*3+2]*y[2]*E[n*3+2];U.set(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8]),s.quaternion.setFromRotationMatrix(C.setFromMatrix3(U));const j=V[0]*y[0]+V[1]*y[1]+V[2]*y[2],h=S&&l>0?j/l:1;s.scale=h,s.translation.copy(w).applyQuaternion(s.quaternion).multiplyScalar(-h).add(k);let x=0;for(let t=0;t<z;t+=1){_.set(o[t*3],o[t*3+1],o[t*3+2]).applyQuaternion(s.quaternion).multiplyScalar(h).add(s.translation);const n=_.x-e[t*3],a=_.y-e[t*3+1],p=_.z-e[t*3+2];x+=n*n+a*a+p*p}return s.rms=Math.sqrt(x/z),s};exports.solveSimilarity=I;
@@ -0,0 +1,91 @@
1
+ import * as H from "three";
2
+ const k = new H.Vector3(), z = new H.Vector3(), G = new H.Matrix3(), J = new H.Matrix4(), j = new H.Vector3(), K = (s, a) => {
3
+ const o = s.slice();
4
+ a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 0, a[4] = 1, a[5] = 0, a[6] = 0, a[7] = 0, a[8] = 1;
5
+ for (let g = 0; g < 12 && !(o[1] * o[1] + o[2] * o[2] + o[5] * o[5] < 1e-24); g += 1)
6
+ for (const [l, f] of [
7
+ [0, 1],
8
+ [0, 2],
9
+ [1, 2]
10
+ ]) {
11
+ const D = o[l * 3 + f];
12
+ if (Math.abs(D) < 1e-18) continue;
13
+ const V = o[l * 3 + l], h = (o[f * 3 + f] - V) / (2 * D), R = Math.sign(h || 1) / (Math.abs(h) + Math.sqrt(h * h + 1)), y = 1 / Math.sqrt(R * R + 1), w = R * y;
14
+ for (let t = 0; t < 3; t += 1) {
15
+ const n = o[t * 3 + l], r = o[t * 3 + f];
16
+ o[t * 3 + l] = y * n - w * r, o[t * 3 + f] = w * n + y * r;
17
+ }
18
+ for (let t = 0; t < 3; t += 1) {
19
+ const n = o[l * 3 + t], r = o[f * 3 + t];
20
+ o[l * 3 + t] = y * n - w * r, o[f * 3 + t] = w * n + y * r;
21
+ }
22
+ for (let t = 0; t < 3; t += 1) {
23
+ const n = a[t * 3 + l], r = a[t * 3 + f];
24
+ a[t * 3 + l] = y * n - w * r, a[t * 3 + f] = w * n + y * r;
25
+ }
26
+ }
27
+ return [o[0], o[4], o[8]];
28
+ }, C = (s) => s[0] * (s[4] * s[8] - s[5] * s[7]) - s[1] * (s[3] * s[8] - s[5] * s[6]) + s[2] * (s[3] * s[7] - s[4] * s[6]), e = [0, 0, 0, 0, 0, 0, 0, 0, 0], I = [0, 0, 0, 0, 0, 0, 0, 0, 0], A = [0, 0, 0, 0, 0, 0, 0, 0, 0], S = [0, 0, 0, 0, 0, 0, 0, 0, 0], E = [0, 0, 0, 0, 0, 0, 0, 0, 0], x = [0, 0, 0, 0, 0, 0, 0, 0, 0], L = (s, a, o = {
29
+ scale: 1,
30
+ quaternion: new H.Quaternion(),
31
+ translation: new H.Vector3(),
32
+ rms: 0
33
+ }, g = !0) => {
34
+ const m = Math.floor(Math.min(s.length, a.length) / 3);
35
+ if (m < 3) throw new Error("solveSimilarity: at least 3 points are required");
36
+ k.set(0, 0, 0), z.set(0, 0, 0);
37
+ for (let t = 0; t < m; t += 1)
38
+ k.x += s[t * 3], k.y += s[t * 3 + 1], k.z += s[t * 3 + 2], z.x += a[t * 3], z.y += a[t * 3 + 1], z.z += a[t * 3 + 2];
39
+ k.divideScalar(m), z.divideScalar(m), e.fill(0);
40
+ let l = 0;
41
+ for (let t = 0; t < m; t += 1) {
42
+ const n = s[t * 3] - k.x, r = s[t * 3 + 1] - k.y, p = s[t * 3 + 2] - k.z, u = a[t * 3] - z.x, q = a[t * 3 + 1] - z.y, M = a[t * 3 + 2] - z.z;
43
+ l += n * n + r * r + p * p, e[0] += n * u, e[1] += n * q, e[2] += n * M, e[3] += r * u, e[4] += r * q, e[5] += r * M, e[6] += p * u, e[7] += p * q, e[8] += p * M;
44
+ }
45
+ for (let t = 0; t < 3; t += 1)
46
+ for (let n = 0; n < 3; n += 1)
47
+ I[t * 3 + n] = e[t] * e[n] + e[3 + t] * e[3 + n] + e[6 + t] * e[6 + n];
48
+ const f = K(I, A), D = [0, 1, 2].sort((t, n) => f[n] - f[t]), V = [0, 0, 0], c = [];
49
+ for (let t = 0; t < 3; t += 1) {
50
+ const n = D[t], r = A[n], p = A[3 + n], u = A[6 + n];
51
+ S[t] = r, S[3 + t] = p, S[6 + t] = u;
52
+ let q = e[0] * r + e[1] * p + e[2] * u, M = e[3] * r + e[4] * p + e[5] * u, Q = e[6] * r + e[7] * p + e[8] * u;
53
+ if (V[t] = Math.sqrt(Math.max(f[n], 0)), t === 2) {
54
+ const i = c[0][1] * c[1][2] - c[0][2] * c[1][1], d = c[0][2] * c[1][0] - c[0][0] * c[1][2], F = c[0][0] * c[1][1] - c[0][1] * c[1][0], U = q * i + M * d + Q * F, b = Math.hypot(q, M, Q) > 1e-9 * Math.max(V[0], 1e-300) ? U < 0 ? -1 : 1 : C(S) < 0 ? -1 : 1;
55
+ c.push([b * i, b * d, b * F]);
56
+ continue;
57
+ }
58
+ for (const i of c) {
59
+ const d = q * i[0] + M * i[1] + Q * i[2];
60
+ q -= d * i[0], M -= d * i[1], Q -= d * i[2];
61
+ }
62
+ const T = Math.hypot(q, M, Q);
63
+ if (T > 1e-12)
64
+ c.push([q / T, M / T, Q / T]);
65
+ else if (t === 0)
66
+ c.push([1, 0, 0]);
67
+ else {
68
+ const i = Math.abs(c[0][0]) < 0.9 ? [1, 0, 0] : [0, 1, 0], d = i[0] * c[0][0] + i[1] * c[0][1] + i[2] * c[0][2], F = i[0] - d * c[0][0], U = i[1] - d * c[0][1], B = i[2] - d * c[0][2], b = Math.hypot(F, U, B);
69
+ c.push([F / b, U / b, B / b]);
70
+ }
71
+ }
72
+ for (let t = 0; t < 3; t += 1)
73
+ E[t] = c[t][0], E[3 + t] = c[t][1], E[6 + t] = c[t][2];
74
+ const h = [1, 1, C(S) * C(E) < 0 ? -1 : 1];
75
+ for (let t = 0; t < 3; t += 1)
76
+ for (let n = 0; n < 3; n += 1)
77
+ x[t * 3 + n] = S[t * 3] * h[0] * E[n * 3] + S[t * 3 + 1] * h[1] * E[n * 3 + 1] + S[t * 3 + 2] * h[2] * E[n * 3 + 2];
78
+ G.set(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8]), o.quaternion.setFromRotationMatrix(J.setFromMatrix3(G));
79
+ const R = V[0] * h[0] + V[1] * h[1] + V[2] * h[2], y = g && l > 0 ? R / l : 1;
80
+ o.scale = y, o.translation.copy(k).applyQuaternion(o.quaternion).multiplyScalar(-y).add(z);
81
+ let w = 0;
82
+ for (let t = 0; t < m; t += 1) {
83
+ j.set(s[t * 3], s[t * 3 + 1], s[t * 3 + 2]).applyQuaternion(o.quaternion).multiplyScalar(y).add(o.translation);
84
+ const n = j.x - a[t * 3], r = j.y - a[t * 3 + 1], p = j.z - a[t * 3 + 2];
85
+ w += n * n + r * r + p * p;
86
+ }
87
+ return o.rms = Math.sqrt(w / m), o;
88
+ };
89
+ export {
90
+ L as s
91
+ };
@@ -0,0 +1,2 @@
1
+ export { SPRING_DEFAULTS, SPRING_MAX_FRAME, SPRING_MAX_JUMP, SPRING_MAX_SUBSTEP, SPRING_SETTINGS_RANGES, SpringChain, SpringJoint, resolveSpringSettings, type SpringSettings, } from './spring';
2
+ export { SPRING_SWING_LENGTH, SpringSwingDriver, insertSwingPivots, type SpringSwingOptions, type SwingPivot, } from './swing';