@vincentt-xr/sdk 2.0.0-alpha.0 → 2.0.0-alpha.10
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.
- package/GROUNDING.md +8193 -111
- package/README.md +86 -52
- package/dist/CanonicalHeadFrame-D_0OzdB9.cjs +1 -0
- package/dist/CanonicalHeadFrame-DdUqF6Fv.js +1506 -0
- package/dist/DebuggerUI-CVuV-VJ5.cjs +1 -0
- package/dist/DebuggerUI-D-rcPa54.js +275 -0
- package/dist/FaceRetouch-C1AxBNex.js +1071 -0
- package/dist/FaceRetouch-D7kryDE6.cjs +134 -0
- package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
- package/dist/FaceSurface-DmP9AEeC.js +27 -0
- package/dist/SkeletonUtils-C2r90MtN.js +21 -0
- package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
- package/dist/TextLabel-XE0rQSDn.cjs +2 -0
- package/dist/TextLabel-c9BCucOI.js +961 -0
- package/dist/assets/cache.d.ts +99 -0
- package/dist/assets/estimate.d.ts +11 -0
- package/dist/assets/gltfLoader.d.ts +16 -0
- package/dist/assets/index.d.ts +7 -0
- package/dist/assets/loaders.d.ts +43 -0
- package/dist/assets/react.d.ts +33 -0
- package/dist/assets/sdkModels.d.ts +22 -0
- package/dist/audio/AudioEngine.d.ts +3 -1
- package/dist/audio/AudioPlayer.d.ts +29 -0
- package/dist/audio/AudioPlayerLogic.d.ts +4 -0
- package/dist/audio/index.d.ts +2 -0
- package/dist/body/__fixtures__/syntheticRig.d.ts +21 -0
- package/dist/body/bodyFlipGuard.d.ts +39 -0
- package/dist/body/bodyIdentity.d.ts +72 -0
- package/dist/body/bodyMask.d.ts +79 -0
- package/dist/body/bodyMaskMaterial.d.ts +15 -0
- package/dist/body/bodyPose.d.ts +58 -0
- package/dist/body/bodyRigFit.d.ts +148 -0
- package/dist/body/bodyRigSolver.d.ts +114 -0
- package/dist/body/bodySubject.d.ts +46 -0
- package/dist/body-pose/index.d.ts +521 -0
- package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
- package/dist/body-trigger/frame.d.ts +88 -0
- package/dist/body-trigger/index.d.ts +6 -0
- package/dist/body-trigger/moves.d.ts +235 -0
- package/dist/body-trigger/trigger.d.ts +75 -0
- package/dist/bodyMaskMaterial-CBWub5t_.cjs +68 -0
- package/dist/bodyMaskMaterial-Cs2awskk.js +207 -0
- package/dist/cache-2x3CUJuY.js +212 -0
- package/dist/cache-DL1Dbz6k.cjs +1 -0
- package/dist/calibration/calibration.d.ts +75 -0
- package/dist/calibration/index.d.ts +6 -0
- package/dist/calibration/storage.d.ts +13 -0
- package/dist/calibration/types.d.ts +53 -0
- package/dist/calibration/useXRCalibration.d.ts +46 -0
- package/dist/camera/CameraPermissionGate.d.ts +26 -0
- package/dist/camera/devices.d.ts +26 -0
- package/dist/camera/index.d.ts +8 -0
- package/dist/camera/permission.d.ts +86 -0
- package/dist/camera/useCameraPermission.d.ts +35 -0
- package/dist/canonicalFace-BHwyCx1c.js +9 -0
- package/dist/canonicalFace-C83I225R.cjs +1 -0
- package/dist/capabilities/detect.d.ts +45 -0
- package/dist/capabilities/index.d.ts +5 -0
- package/dist/capabilities/types.d.ts +120 -0
- package/dist/capabilities/useXRCapabilities.d.ts +18 -0
- package/dist/compat/environment.d.ts +5 -0
- package/dist/compat/index.d.ts +4 -0
- package/dist/compat/run.d.ts +18 -0
- package/dist/compat/scenarios.d.ts +10 -0
- package/dist/compat/types.d.ts +101 -0
- package/dist/components/Axes/index.d.ts +6 -0
- package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
- package/dist/components/BodyInstruction/index.d.ts +76 -0
- package/dist/components/BodyInstruction/useBodyPose.d.ts +30 -0
- package/dist/components/BodyRig/BodyAttachment.d.ts +28 -0
- package/dist/components/BodyRig/BodyOccluder.d.ts +27 -0
- package/dist/components/BodyRig/bodyDepth.d.ts +57 -0
- package/dist/components/BodyRig/index.d.ts +129 -0
- package/dist/components/BodyRig/useBodyDepthTexture.d.ts +40 -0
- package/dist/components/BodyTracker/index.d.ts +26 -1
- package/dist/components/BodyTrigger/index.d.ts +56 -0
- package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
- package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
- package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
- package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
- package/dist/components/FaceAtlas/constants.d.ts +8 -0
- package/dist/components/FaceAtlas/index.d.ts +7 -0
- package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
- package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
- package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
- package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
- package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
- package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
- package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
- package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
- package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
- package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
- package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
- package/dist/components/FaceCharacter/index.d.ts +18 -0
- package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
- package/dist/components/FaceInset/FaceInset.d.ts +68 -0
- package/dist/components/FaceInset/frame.d.ts +94 -0
- package/dist/components/FaceInset/index.d.ts +6 -0
- package/dist/components/FaceInset/material.d.ts +40 -0
- package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
- package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
- package/dist/components/FaceInstruction/index.d.ts +56 -0
- package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
- package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
- package/dist/components/FaceLiquify/debug.d.ts +37 -0
- package/dist/components/FaceLiquify/frame.d.ts +55 -0
- package/dist/components/FaceLiquify/index.d.ts +10 -0
- package/dist/components/FaceLiquify/material.d.ts +39 -0
- package/dist/components/FaceLiquify/pass.d.ts +49 -0
- package/dist/components/FaceLiquify/presence.d.ts +25 -0
- package/dist/components/FaceLiquify/presets.d.ts +82 -0
- package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
- package/dist/components/FaceLiquify/target.d.ts +85 -0
- package/dist/components/FaceLiquify/warp.d.ts +72 -0
- package/dist/components/FaceMesh/FaceMeshRenderer.d.ts +25 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +70 -1
- package/dist/components/FaceMesh/canonical/FaceMeshMaterial.d.ts +25 -0
- package/dist/components/FaceMesh/canonical/assets.d.ts +3 -0
- package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +30 -0
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +24 -0
- package/dist/components/FaceMesh/canonical/shaders.d.ts +2 -0
- package/dist/components/FaceMesh/deform.d.ts +3 -0
- package/dist/components/FaceMesh/index.d.ts +6 -1
- package/dist/components/FaceMesh/material/defaults.d.ts +74 -0
- package/dist/components/FaceMesh/material/index.d.ts +1 -0
- package/dist/components/FaceMesh/material/options.d.ts +5 -1
- package/dist/components/FaceMesh/material/support.d.ts +7 -2
- package/dist/components/FaceMesh/material/textures.d.ts +4 -0
- package/dist/components/FaceMesh/material/types.d.ts +4 -2
- package/dist/components/FaceRetouch/Background.d.ts +11 -5
- package/dist/components/FaceRetouch/FaceRetouch.d.ts +52 -0
- package/dist/components/FaceRetouch/index.d.ts +2 -6
- package/dist/components/FaceRetouch/landmarkMask.d.ts +4 -6
- package/dist/components/FaceRetouch/renderState.d.ts +19 -0
- package/dist/components/FaceRetouch/useFaceRetouchMask.d.ts +4 -7
- package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
- package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
- package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
- package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
- package/dist/components/FaceSwap/index.d.ts +13 -0
- package/dist/components/FaceSwap/settings.d.ts +300 -0
- package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
- package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
- package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
- package/dist/components/FaceTracker/index.d.ts +5 -3
- package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
- package/dist/components/FaceWarp3D/index.d.ts +2 -0
- package/dist/components/Faceless/Faceless.d.ts +51 -0
- package/dist/components/Faceless/index.d.ts +2 -0
- package/dist/components/GestureListener/index.d.ts +11 -0
- package/dist/components/HairLock/HairLock.d.ts +39 -0
- package/dist/components/HairLock/index.d.ts +2 -0
- package/dist/components/HairLock/lockGeometry.d.ts +15 -0
- package/dist/components/HandCutout/index.d.ts +35 -0
- package/dist/components/HandEffect/index.d.ts +36 -0
- package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
- package/dist/components/HandInstruction/index.d.ts +74 -0
- package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
- package/dist/components/HandJoints2D/index.d.ts +6 -0
- package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
- package/dist/components/HandRig/HandAttachment.d.ts +34 -0
- package/dist/components/HandRig/HandNails.d.ts +61 -0
- package/dist/components/HandRig/HandOccluder.d.ts +45 -0
- package/dist/components/HandRig/HandTattoo.d.ts +61 -0
- package/dist/components/HandRig/WristAttachment.d.ts +34 -0
- package/dist/components/HandRig/index.d.ts +127 -0
- package/dist/components/HandRig/useArmMask.d.ts +29 -0
- package/dist/components/HandRig/wristSolve.d.ts +96 -0
- package/dist/components/HandTouch/HandTouch.d.ts +62 -0
- package/dist/components/HandTouch/Touchable.d.ts +36 -0
- package/dist/components/HandTouch/index.d.ts +2 -0
- package/dist/components/HandTracker/index.d.ts +12 -2
- package/dist/components/HandTracking2D/HandVisual.d.ts +12 -0
- package/dist/components/HandTracking2D/index.d.ts +5 -0
- package/dist/components/HandTracking2DController/index.d.ts +5 -0
- package/dist/components/HandTracking3D/index.d.ts +6 -0
- package/dist/components/HeadBinding/index.d.ts +14 -0
- package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
- package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
- package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
- package/dist/components/HeadOccluder/NeckOccluder.d.ts +67 -0
- package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
- package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
- package/dist/components/HeadOccluder/index.d.ts +57 -3
- package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
- package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
- package/dist/components/HolisticTracker/index.d.ts +69 -0
- package/dist/components/HolisticTracker/settings.d.ts +58 -0
- package/dist/components/HolisticTracker/signals.d.ts +49 -0
- package/dist/components/Instruction/HintStage.d.ts +29 -0
- package/dist/components/Instruction/InstructionCue.d.ts +126 -0
- package/dist/components/Instruction/gestureHold.d.ts +20 -0
- package/dist/components/Instruction/ghost.d.ts +129 -0
- package/dist/components/Instruction/hintBlend.d.ts +19 -0
- package/dist/components/Instruction/hintLook.d.ts +81 -0
- package/dist/components/Instruction/hintLoop.d.ts +36 -0
- package/dist/components/Instruction/index.d.ts +41 -0
- package/dist/components/Instruction/useGhostModel.d.ts +33 -0
- package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
- package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
- package/dist/components/IrisEffect/index.d.ts +51 -0
- package/dist/components/IrisEffect/settings.d.ts +117 -0
- package/dist/components/LightObject/index.d.ts +20 -0
- package/dist/components/LipEffect/LipEffect.d.ts +28 -0
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +98 -0
- package/dist/components/LipEffect/LipEffects.d.ts +12 -0
- package/dist/components/LipEffect/defaults.d.ts +51 -0
- package/dist/components/LipEffect/index.d.ts +12 -0
- package/dist/components/LipEffect/lipShading.d.ts +73 -0
- package/dist/components/LipEffect/settings.d.ts +375 -0
- package/dist/components/LipEffect/shader.d.ts +39 -0
- package/dist/components/LipEffect/types.d.ts +141 -0
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +17 -0
- package/dist/components/LipEffect/uvGuide.d.ts +74 -0
- package/dist/components/LookAt/index.d.ts +23 -0
- package/dist/components/Makeup/Blush.d.ts +18 -0
- package/dist/components/Makeup/Brows.d.ts +20 -0
- package/dist/components/Makeup/Contour.d.ts +17 -0
- package/dist/components/Makeup/Eyeliner.d.ts +20 -0
- package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
- package/dist/components/Makeup/Highlighter.d.ts +18 -0
- package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
- package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
- package/dist/components/Makeup/constants.d.ts +44 -0
- package/dist/components/Makeup/design.d.ts +106 -0
- package/dist/components/Makeup/designSamples.d.ts +42 -0
- package/dist/components/Makeup/eyes.d.ts +114 -0
- package/dist/components/Makeup/fields.d.ts +10 -0
- package/dist/components/Makeup/geometry.d.ts +106 -0
- package/dist/components/Makeup/index.d.ts +26 -0
- package/dist/components/Makeup/looks.d.ts +28 -0
- package/dist/components/Makeup/material.d.ts +239 -0
- package/dist/components/Makeup/settings.d.ts +54 -0
- package/dist/components/Makeup/shades.d.ts +143 -0
- package/dist/components/Makeup/shapes.d.ts +27 -0
- package/dist/components/Makeup/skinTone.d.ts +135 -0
- package/dist/components/Makeup/types.d.ts +110 -0
- package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
- package/dist/components/MeshRenderer/index.d.ts +59 -0
- package/dist/components/Necklace/Necklace.d.ts +44 -0
- package/dist/components/Necklace/index.d.ts +1 -0
- package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
- package/dist/components/ParticleEmitter/index.d.ts +1 -0
- package/dist/components/PersonCutout/index.d.ts +46 -0
- package/dist/components/PersonCutout/personCutout.d.ts +16 -0
- package/dist/components/PersonCutout/personMask.d.ts +19 -0
- package/dist/components/PersonCutout/useBodyMaskTexture.d.ts +35 -0
- package/dist/components/PerspectiveCamera/index.d.ts +2 -8
- package/dist/components/PinToMesh/index.d.ts +47 -0
- package/dist/components/RenderGroupLayer/index.d.ts +6 -0
- package/dist/components/SceneObjectRenderer/index.d.ts +23 -0
- package/dist/components/Screen2D/ScreenTransformFrame.d.ts +11 -0
- package/dist/components/Screen2D/ScreenTransformHelpers.d.ts +19 -0
- package/dist/components/Screen2D/ScreenTransformInteraction.d.ts +18 -0
- package/dist/components/Screen2D/index.d.ts +5 -0
- package/dist/components/ScreenGlass/defaults.d.ts +3 -0
- package/dist/components/ScreenGlass/index.d.ts +5 -0
- package/dist/components/ScreenGlass/shaders.d.ts +2 -0
- package/dist/components/ScreenGlass/types.d.ts +10 -0
- package/dist/components/ScreenGradient/defaults.d.ts +5 -0
- package/dist/components/ScreenGradient/index.d.ts +5 -0
- package/dist/components/ScreenGradient/shaders.d.ts +2 -0
- package/dist/components/ScreenGradient/types.d.ts +19 -0
- package/dist/components/ScreenImage/ScreenImage.d.ts +4 -0
- package/dist/components/ScreenImage/components/DynamicTextureSync.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageFrame.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageTransformFrame.d.ts +9 -0
- package/dist/components/ScreenImage/fit.d.ts +52 -0
- package/dist/components/ScreenImage/index.d.ts +10 -0
- package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +9 -0
- package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
- package/dist/components/ScreenImage/materials/ScreenImageMatcap.d.ts +3 -0
- package/dist/components/ScreenImage/source.d.ts +25 -0
- package/dist/components/ScreenImage/types.d.ts +64 -0
- package/dist/components/ScreenImage/utils/ScreenImageConstants.d.ts +9 -0
- package/dist/components/ScreenImage/utils/ScreenImageHelpers.d.ts +4 -0
- package/dist/components/ScreenShape/geometry.d.ts +5 -0
- package/dist/components/ScreenShape/index.d.ts +5 -0
- package/dist/components/ScreenShape/types.d.ts +54 -0
- package/dist/components/ScreenSpaceUI/ScreenTransformGuide.d.ts +15 -0
- package/dist/components/ScreenSpaceUI/ScreenTransformOverlayGuide.d.ts +9 -0
- package/dist/components/ScreenSpaceUI/index.d.ts +3 -0
- package/dist/components/ScreenText/components/ScreenTextBody.d.ts +2 -0
- package/dist/components/ScreenText/components/ScreenTextTransformFrame.d.ts +9 -0
- package/dist/components/ScreenText/constants.d.ts +5 -0
- package/dist/components/ScreenText/index.d.ts +6 -0
- package/dist/components/ScreenText/types.d.ts +31 -0
- package/dist/components/ScreenText/utils/ScreenTextHelpers.d.ts +14 -0
- package/dist/components/ScreenText/utils/ScreenTextMappings.d.ts +17 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
- package/dist/components/SegmentationOverlay/index.d.ts +9 -0
- package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
- package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
- package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
- package/dist/components/SequentialRenderPasses/index.d.ts +6 -0
- package/dist/components/ShoulderOccluder/index.d.ts +46 -0
- package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +27 -0
- package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
- package/dist/components/SpringSwing/index.d.ts +1 -0
- package/dist/components/TextLabel/TextLabel.d.ts +5 -0
- package/dist/components/TextLabel/alignment.d.ts +4 -0
- package/dist/components/TextLabel/bend.d.ts +9 -0
- package/dist/components/TextLabel/canvas/buildTextLabelTexture.d.ts +4 -0
- package/dist/components/TextLabel/canvas/canvasTypography.d.ts +13 -0
- package/dist/components/TextLabel/canvas/drawBackground.d.ts +21 -0
- package/dist/components/TextLabel/canvas/drawEffects.d.ts +34 -0
- package/dist/components/TextLabel/canvas/drawText.d.ts +19 -0
- package/dist/components/TextLabel/components/TextLabelMesh.d.ts +13 -0
- package/dist/components/TextLabel/constants.d.ts +2 -0
- package/dist/components/TextLabel/hooks/useTextLabelTexture.d.ts +7 -0
- package/dist/components/TextLabel/index.d.ts +2 -62
- package/dist/components/TextLabel/layout/measurement.d.ts +8 -0
- package/dist/components/TextLabel/layout/resolveTextLayout.d.ts +25 -0
- package/dist/components/TextLabel/layout/wrapText.d.ts +6 -0
- package/dist/components/TextLabel/types.d.ts +337 -0
- package/dist/components/TrackingAnchor/index.d.ts +18 -2
- package/dist/components/Transform3D/index.d.ts +30 -0
- package/dist/components/XRMediaSurface/index.d.ts +8 -7
- package/dist/components/XRProvider/index.d.ts +16 -2
- package/dist/components/XRScene/index.d.ts +14 -3
- package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
- package/dist/components/XRViewport/XRViewport.d.ts +11 -0
- package/dist/components/XRViewport/components/HiddenMedia.d.ts +7 -0
- package/dist/components/XRViewport/components/MediaAssetPicker.d.ts +8 -0
- package/dist/components/XRViewport/components/MediaControlStack.d.ts +13 -0
- package/dist/components/XRViewport/components/XRViewportLayers.d.ts +30 -0
- package/dist/components/XRViewport/constants.d.ts +24 -0
- package/dist/components/XRViewport/contexts.d.ts +6 -0
- package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +13 -0
- package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +16 -0
- package/dist/components/XRViewport/hooks/useViewportMediaTexture.d.ts +10 -0
- package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +41 -0
- package/dist/components/XRViewport/hooks/useViewportRenderState.d.ts +47 -0
- package/dist/components/XRViewport/index.d.ts +3 -101
- package/dist/components/XRViewport/layout.d.ts +16 -0
- package/dist/components/XRViewport/slots.d.ts +16 -0
- package/dist/components/XRViewport/types.d.ts +89 -0
- package/dist/components/XRViewport/useViewportSize.d.ts +3 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/occluder/skinnedOccluder.d.ts +39 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/constants/index.d.ts +4 -1
- package/dist/context-DTxSQvp4.js +13 -0
- package/dist/context-hA0Rb2Xa.cjs +1 -0
- package/dist/contexts-DQc7zyqT.cjs +1 -0
- package/dist/contexts-Y_FhdnIv.js +667 -0
- package/dist/coordinates/feed.d.ts +52 -0
- package/dist/coordinates/index.d.ts +7 -0
- package/dist/coordinates/side.d.ts +40 -0
- package/dist/coordinates/spaces.d.ts +49 -0
- package/dist/coordinates/viewport.d.ts +22 -0
- package/dist/coordinates/world.d.ts +15 -0
- package/dist/debug-ui/component-editor/index.d.ts +19 -0
- package/dist/debug-ui/default-setting/index.d.ts +37 -0
- package/dist/debug-ui/default-setting.cjs +21 -0
- package/dist/debug-ui/default-setting.js +777 -0
- package/dist/debug-ui/face-mesh-renderer-settings/index.d.ts +8 -0
- package/dist/debug-ui/face-retouch/index.d.ts +11 -0
- package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
- package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
- package/dist/debug-ui/hand-joints-2d/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-2d/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-2d-controller/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-3d/index.d.ts +6 -0
- package/dist/debug-ui/hierarchy-panel/index.d.ts +30 -0
- package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
- package/dist/debug-ui/index.d.ts +61 -0
- package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
- package/dist/debug-ui/layer-panel/index.d.ts +18 -0
- package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
- package/dist/debug-ui/media-source/MediaSourceSwitcher.d.ts +10 -0
- package/dist/debug-ui/media-source/index.d.ts +6 -0
- package/dist/debug-ui/media-source/media-preset.d.ts +21 -0
- package/dist/debug-ui/media-source/session.d.ts +40 -0
- package/dist/debug-ui/media-source.cjs +1 -0
- package/dist/debug-ui/media-source.js +11 -0
- package/dist/debug-ui/mesh-renderer-settings/index.d.ts +6 -0
- package/dist/debug-ui/object-inspector-panel/index.d.ts +26 -0
- package/dist/debug-ui/pin-to-mesh-settings/index.d.ts +10 -0
- package/dist/debug-ui/product-hotspots/index.d.ts +25 -0
- package/dist/debug-ui/scene-editor/context.d.ts +38 -0
- package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +11 -0
- package/dist/debug-ui/scene-editor/index.d.ts +11 -0
- package/dist/debug-ui/scene-editor/inspector-panel.d.ts +9 -0
- package/dist/debug-ui/scene-editor/store-utils.d.ts +2 -0
- package/dist/debug-ui/scene-editor/viewport-toolbar.d.ts +4 -0
- package/dist/debug-ui/scene-editor/viewport.d.ts +21 -0
- package/dist/debug-ui/screen-glass-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-gradient-settings/GradientStopsEditor.d.ts +5 -0
- package/dist/debug-ui/screen-gradient-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-gradient-settings/styles.d.ts +3 -0
- package/dist/debug-ui/screen-image-settings/index.d.ts +11 -0
- package/dist/debug-ui/screen-shape-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-text-settings/NumberField.d.ts +9 -0
- package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +3 -0
- package/dist/debug-ui/screen-text-settings/controls/NestedSection.d.ts +7 -0
- package/dist/debug-ui/screen-text-settings/controls/Section.d.ts +8 -0
- package/dist/debug-ui/screen-text-settings/controls/icons.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/index.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/BackgroundSection.d.ts +8 -0
- package/dist/debug-ui/screen-text-settings/sections/ContentSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/EffectsSection.d.ts +25 -0
- package/dist/debug-ui/screen-text-settings/sections/StyleSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/TransformSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundFillControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundSizeControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundStrokeControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/types.d.ts +7 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/BendEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/EffectChrome.d.ts +21 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/GlowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/InnerShadowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/OutlineEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/ShadowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/types.d.ts +14 -0
- package/dist/debug-ui/screen-text-settings/settings.d.ts +90 -0
- package/dist/debug-ui/screen-text-settings/styles.d.ts +26 -0
- package/dist/debug-ui/screen-text-settings/transform.d.ts +6 -0
- package/dist/debug-ui/screen-text-settings/types.d.ts +11 -0
- package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
- package/dist/debug-ui/settings-panel/index.d.ts +43 -0
- package/dist/debug-ui/shared/MaterialSection.d.ts +13 -0
- package/dist/debug-ui/shared/ScreenTransformSection.d.ts +32 -0
- package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
- package/dist/debug-ui/transform-3d-settings/index.d.ts +11 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +26 -0
- package/dist/debug-ui.cjs +10 -0
- package/dist/debug-ui.js +9051 -0
- package/dist/detector-K8aej4MB.js +59 -0
- package/dist/detector-ijypGtse.cjs +1 -0
- package/dist/drawNormalizedCrop-C4KFaRne.cjs +1 -0
- package/dist/drawNormalizedCrop-DG3gtJxf.js +135 -0
- package/dist/entries/all.d.ts +4 -1
- package/dist/entries/core.d.ts +76 -6
- package/dist/entries/face-effects.d.ts +130 -10
- package/dist/entries/instructions.d.ts +48 -0
- package/dist/entries/internal.d.ts +5 -2
- package/dist/entries/low-level.d.ts +104 -6
- package/dist/entries/particles.d.ts +15 -0
- package/dist/entries/product.d.ts +11 -0
- package/dist/entries/scene-object.d.ts +10 -0
- package/dist/entries/tracking.d.ts +110 -2
- package/dist/face-action/index.d.ts +34 -0
- package/dist/face-atlas/attributes.d.ts +30 -0
- package/dist/face-atlas/eyes.d.ts +272 -0
- package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
- package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
- package/dist/face-atlas/glsl/common.d.ts +55 -0
- package/dist/face-atlas/glsl/design.d.ts +49 -0
- package/dist/face-atlas/glsl/eyes.d.ts +73 -0
- package/dist/face-atlas/glsl/finish.d.ts +24 -0
- package/dist/face-atlas/glsl/format.d.ts +4 -0
- package/dist/face-atlas/glsl/index.d.ts +59 -0
- package/dist/face-atlas/glsl/shading.d.ts +15 -0
- package/dist/face-atlas/glsl/shapes.d.ts +66 -0
- package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
- package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
- package/dist/face-atlas/guide.d.ts +51 -0
- package/dist/face-atlas/index.d.ts +25 -0
- package/dist/face-atlas/lead.d.ts +117 -0
- package/dist/face-atlas/madeUpCamera.d.ts +125 -0
- package/dist/face-atlas/masks.d.ts +53 -0
- package/dist/face-atlas/obj.d.ts +69 -0
- package/dist/face-atlas/polylines.d.ts +63 -0
- package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
- package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
- package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
- package/dist/face-atlas/probe/constants.d.ts +137 -0
- package/dist/face-atlas/probe/glsl.d.ts +43 -0
- package/dist/face-atlas/probe/lightFit.d.ts +108 -0
- package/dist/face-atlas/probe/schedule.d.ts +44 -0
- package/dist/face-atlas/probe/selfTest.d.ts +87 -0
- package/dist/face-atlas/probe/stats.d.ts +143 -0
- package/dist/face-atlas/probe/targets.d.ts +70 -0
- package/dist/face-atlas/probe/unwrap.d.ts +76 -0
- package/dist/face-atlas/quality.d.ts +28 -0
- package/dist/face-atlas/regions.d.ts +31 -0
- package/dist/face-atlas/registry.d.ts +252 -0
- package/dist/face-atlas/renderState.d.ts +86 -0
- package/dist/face-atlas/selfOcclusion.d.ts +62 -0
- package/dist/face-atlas/shading.d.ts +406 -0
- package/dist/face-atlas/shapes.d.ts +86 -0
- package/dist/face-atlas/sides.d.ts +41 -0
- package/dist/face-atlas/skinMask.d.ts +35 -0
- package/dist/face-atlas/surface.d.ts +155 -0
- package/dist/face-atlas/topology.d.ts +44 -0
- package/dist/face-attribute-expression/index.d.ts +10 -0
- package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
- package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
- package/dist/face-character/bindFaceModel.d.ts +106 -0
- package/dist/face-character/canonicalFace.d.ts +17 -0
- package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
- package/dist/face-character/canonicalFacePositions.d.ts +7 -0
- package/dist/face-character/driveFaceModel.d.ts +57 -0
- package/dist/face-character/expressionOutputs.d.ts +45 -0
- package/dist/face-character/faceExpressions.d.ts +104 -0
- package/dist/face-character/faceImageLandmarker.d.ts +93 -0
- package/dist/face-character/faceMeshBinding.d.ts +62 -0
- package/dist/face-character/faceMorph.d.ts +77 -0
- package/dist/face-character/faceMorphs.d.ts +46 -0
- package/dist/face-character/facePhoto.d.ts +138 -0
- package/dist/face-character/facePiercings.d.ts +116 -0
- package/dist/face-character/facePin.d.ts +131 -0
- package/dist/face-character/faceReprojection.d.ts +273 -0
- package/dist/face-character/faceReprojector.d.ts +171 -0
- package/dist/face-character/faceRig.d.ts +176 -0
- package/dist/face-character/faceSwapPresence.d.ts +85 -0
- package/dist/face-character/faceTexture.d.ts +169 -0
- package/dist/face-character/faceTextureBaker.d.ts +86 -0
- package/dist/face-character/faceTextureGuide.d.ts +106 -0
- package/dist/face-character/faceTextureStats.d.ts +298 -0
- package/dist/face-character/faceTransfer.d.ts +396 -0
- package/dist/face-character/faceTransferGeometry.d.ts +109 -0
- package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
- package/dist/face-character/faceWarp3D.d.ts +101 -0
- package/dist/face-character/faceless.d.ts +79 -0
- package/dist/face-character/featureWarp.d.ts +28 -0
- package/dist/face-character/liveFaceRegistry.d.ts +370 -0
- package/dist/face-character/liveValue.d.ts +12 -0
- package/dist/face-character/memo.d.ts +15 -0
- package/dist/face-effects.cjs +2267 -195
- package/dist/face-effects.js +14191 -3346
- package/dist/face-expression/index.d.ts +182 -0
- package/dist/face-info/blendshapes.d.ts +3 -0
- package/dist/face-info/derive.d.ts +8 -0
- package/dist/face-info/drawFaceCrop.d.ts +10 -0
- package/dist/face-info/getFaceInfo.d.ts +8 -0
- package/dist/face-info/index.d.ts +8 -0
- package/dist/face-info/landmarks.d.ts +35 -0
- package/dist/face-info/types.d.ts +69 -0
- package/dist/gestures/definitions.d.ts +98 -0
- package/dist/gestures/detector.d.ts +87 -0
- package/dist/gestures/index.d.ts +8 -0
- package/dist/gestures/measures.d.ts +114 -0
- package/dist/gestures/settings.d.ts +49 -0
- package/dist/getFaceInfo-BafgGT27.js +62 -0
- package/dist/getFaceInfo-BzlwHMjX.cjs +1 -0
- package/dist/hand/armFit.d.ts +46 -0
- package/dist/hand/armMask.d.ts +190 -0
- package/dist/hand/forearm.d.ts +114 -0
- package/dist/hand/handCutout.d.ts +23 -0
- package/dist/hand/handCutoutRegistry.d.ts +7 -0
- package/dist/hand/handEffect.d.ts +38 -0
- package/dist/hand/handGestures.d.ts +524 -0
- package/dist/hand/handJoints2d.d.ts +49 -0
- package/dist/hand/handNail.d.ts +73 -0
- package/dist/hand/handPose.d.ts +98 -0
- package/dist/hand/handRigSolver.d.ts +159 -0
- package/dist/hand/handTattoo.d.ts +81 -0
- package/dist/hand/handTouch.d.ts +240 -0
- package/dist/hand/handTracking2d.d.ts +33 -0
- package/dist/hand/handTracking2dController.d.ts +65 -0
- package/dist/hand/handTracking3d.d.ts +52 -0
- package/dist/hand/nailImageMask.d.ts +40 -0
- package/dist/hand/nailMaskFingers.d.ts +23 -0
- package/dist/hand/nailTipRefine.d.ts +37 -0
- package/dist/hand/wrist.d.ts +44 -0
- package/dist/hand/wristFilter.d.ts +44 -0
- package/dist/hooks/faceResults.d.ts +1 -1
- package/dist/hooks/selectors.d.ts +77 -4
- package/dist/hooks/useBodies.d.ts +39 -0
- package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
- package/dist/hooks/useFaceAction.d.ts +3 -0
- package/dist/hooks/useFaceAttributeExpression.d.ts +16 -0
- package/dist/hooks/useFaceDetection.d.ts +18 -0
- package/dist/hooks/useFaceInfo.d.ts +19 -0
- package/dist/hooks/useFaceInfos.d.ts +15 -0
- package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
- package/dist/hooks/useFaceResultReader.d.ts +10 -0
- package/dist/hooks/useFrameCapture.d.ts +18 -0
- package/dist/hooks/useGesture.d.ts +39 -0
- package/dist/hooks/useIrisTracking.d.ts +45 -0
- package/dist/hooks/useMediaRecorder.d.ts +14 -2
- package/dist/hooks/useOwnedTexture.d.ts +6 -0
- package/dist/hooks/useTrackerContext.d.ts +14 -2
- package/dist/hooks/useXRDiagnostics.d.ts +81 -0
- package/dist/hooks/useXRModel.d.ts +12 -0
- package/dist/hooks/useXRSession/facade.d.ts +47 -2
- package/dist/hooks/useXRSession/index.d.ts +2 -2
- package/dist/hooks/useXRSession/reason.d.ts +21 -0
- package/dist/hooks/useXRSession/registry.d.ts +23 -0
- package/dist/hooks/useXRSession/store.d.ts +64 -7
- package/dist/index-BZoBxyLn.js +1103 -0
- package/dist/index-By_LCo2V.cjs +1 -0
- package/dist/index-C-Mryx_u.cjs +21 -0
- package/dist/index-CKRN-xJp.js +3740 -0
- package/dist/index-CUldCMRl.js +188 -0
- package/dist/index-Cyk_VIZE.js +1432 -0
- package/dist/index-D-4w34GO.cjs +1 -0
- package/dist/index-DiIoHK_4.js +442 -0
- package/dist/index-Dv3WnY9n.cjs +46 -0
- package/dist/index-ItufYyHH.cjs +1 -0
- package/dist/index-S3gqudT6.cjs +1 -0
- package/dist/index-Sho4F4it.cjs +1 -0
- package/dist/index-iIQ9jBDb.js +240 -0
- package/dist/index-vr2ichWQ.js +190 -0
- package/dist/instructions.cjs +30 -0
- package/dist/instructions.js +1528 -0
- package/dist/internal-Bb9ZXbpr.cjs +1 -0
- package/dist/{internal-KOKJDxCG.js → internal-Gt1wn6Z3.js} +152 -127
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +16 -9
- package/dist/iris/compute.d.ts +27 -0
- package/dist/iris/index.d.ts +4 -0
- package/dist/iris/lead.d.ts +19 -0
- package/dist/iris/types.d.ts +89 -0
- package/dist/landmarkMask-CvN-L5NT.cjs +1 -0
- package/dist/landmarkMask-DHivVjJm.js +225 -0
- package/dist/landmarks-BEjJXcnE.cjs +1 -0
- package/dist/landmarks-DtCAFV_m.js +76 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +1494 -629
- package/dist/main.cjs +1 -1
- package/dist/main.js +1306 -475
- package/dist/material/MaterialFill.d.ts +20 -0
- package/dist/material/MeshMaterial.d.ts +14 -0
- package/dist/material/index.d.ts +2 -0
- package/dist/models/Base/index.d.ts +49 -0
- package/dist/models/Body/index.d.ts +30 -1
- package/dist/models/Face/constants.d.ts +8 -0
- package/dist/models/Face/index.d.ts +5 -12
- package/dist/models/Face/rotation.d.ts +18 -0
- package/dist/models/Hand/GestureTracking.d.ts +1 -1
- package/dist/models/Hand/HandTracking.d.ts +19 -1
- package/dist/models/Holistic/index.d.ts +49 -0
- package/dist/models/Holistic/result.d.ts +68 -0
- package/dist/models/Segmentation/index.d.ts +6 -3
- package/dist/models/SemanticSegmentation/index.d.ts +31 -0
- package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/nodeSource.d.ts +9 -0
- package/dist/particles/emission.d.ts +24 -0
- package/dist/particles/eyes.d.ts +24 -0
- package/dist/particles/glsl.d.ts +14 -0
- package/dist/particles/index.d.ts +10 -0
- package/dist/particles/motion.d.ts +42 -0
- package/dist/particles/presets.d.ts +12 -0
- package/dist/particles/ring.d.ts +58 -0
- package/dist/particles/selfTest.d.ts +53 -0
- package/dist/particles/settings.d.ts +127 -0
- package/dist/particles/shapes.d.ts +29 -0
- package/dist/particles/spawner.d.ts +71 -0
- package/dist/particles/system.d.ts +66 -0
- package/dist/particles.cjs +122 -0
- package/dist/particles.js +999 -0
- package/dist/product/ProductDimensions.d.ts +16 -0
- package/dist/product/ProductHotspot.d.ts +16 -0
- package/dist/product/ProductViewer.d.ts +9 -0
- package/dist/product/details.d.ts +53 -0
- package/dist/product/index.d.ts +14 -0
- package/dist/product/loadModelViewer.d.ts +4 -0
- package/dist/product/types.d.ts +71 -0
- package/dist/product/useProductAr.d.ts +37 -0
- package/dist/product/useProductDetails.d.ts +60 -0
- package/dist/product.cjs +1 -0
- package/dist/product.js +414 -0
- package/dist/providers-CEZQgz2s.cjs +62 -0
- package/dist/providers-CRuaD8bi.js +424 -0
- package/dist/quality/XRQualityController.d.ts +25 -0
- package/dist/quality/controller.d.ts +33 -0
- package/dist/quality/index.d.ts +6 -0
- package/dist/quality/types.d.ts +100 -0
- package/dist/quality/useXRQuality.d.ts +28 -0
- package/dist/render/layerStack.d.ts +29 -0
- package/dist/render/renderGroups.d.ts +47 -0
- package/dist/render/renderPasses.d.ts +26 -0
- package/dist/render/sceneBeforeRender.d.ts +12 -0
- package/dist/renderGroups-BADrepA1.cjs +1 -0
- package/dist/renderGroups-CNB99dZ2.js +152 -0
- package/dist/renderPasses-DgxUKn9b.cjs +158 -0
- package/dist/renderPasses-DuapJA6V.js +1290 -0
- package/dist/renderState-CJNmj5jz.js +39 -0
- package/dist/renderState-apSfg4eR.cjs +1 -0
- package/dist/scene-object/index.d.ts +146 -0
- package/dist/scene-object/runtimeRegistry.d.ts +14 -0
- package/dist/scene-object.cjs +1 -0
- package/dist/scene-object.js +40 -0
- package/dist/screen-image/screenImagePresets.d.ts +13 -0
- package/dist/screen-image/screenImageSettings.d.ts +57 -0
- package/dist/screen-text/screenTextPresets.d.ts +6 -0
- package/dist/screen-text/screenTextSettings.d.ts +147 -0
- package/dist/screen2d/coordinates.d.ts +107 -0
- package/dist/screen2d/index.d.ts +7 -0
- package/dist/screen2d/material-runtime.d.ts +32 -0
- package/dist/screen2d/screenTransform.d.ts +60 -0
- package/dist/screen2d/smoothing.d.ts +5 -0
- package/dist/screen2d/texture.d.ts +10 -0
- package/dist/screen2d/transform.d.ts +25 -0
- package/dist/screen2d/types.d.ts +90 -0
- package/dist/segmentation-BOZJdWFC.js +1911 -0
- package/dist/segmentation-J8GoNBvP.cjs +1 -0
- package/dist/segmentation2d/faceMemory.d.ts +28 -0
- package/dist/segmentation2d/faceRegions.d.ts +24 -0
- package/dist/segmentation2d/index.d.ts +9 -0
- package/dist/segmentation2d/maskUv.d.ts +23 -0
- package/dist/segmentation2d/rasterize.d.ts +14 -0
- package/dist/segmentation2d/types.d.ts +52 -0
- package/dist/selectors-BvJepq6H.js +196 -0
- package/dist/selectors-QB2qsaxy.cjs +1 -0
- package/dist/services/MetricsCollector/index.d.ts +7 -1
- package/dist/services/MetricsCollector/utils.d.ts +1 -1
- package/dist/session-BVX859as.cjs +31 -0
- package/dist/session-Cz8aie4K.js +493 -0
- package/dist/settings-BJ7FMBsO.js +111 -0
- package/dist/settings-C63FMBlF.cjs +1 -0
- package/dist/similarityFit-BFqHND2e.cjs +1 -0
- package/dist/similarityFit-Bbz-R8AY.js +91 -0
- package/dist/spring/index.d.ts +2 -0
- package/dist/spring/spring.d.ts +69 -0
- package/dist/spring/swing.d.ts +54 -0
- package/dist/subjects/index.d.ts +2 -0
- package/dist/subjects/select.d.ts +70 -0
- package/dist/subjects/types.d.ts +59 -0
- package/dist/texture/animatedTexture.d.ts +63 -0
- package/dist/texture/animationMath.d.ts +8 -0
- package/dist/texture/gifReader.d.ts +17 -0
- package/dist/texture/gifTextureSource.d.ts +16 -0
- package/dist/texture/sourceResolver.d.ts +30 -0
- package/dist/textures-BVwo9Z7z.js +38 -0
- package/dist/textures-DAfc61zz.cjs +1 -0
- package/dist/tracking/coordinates.d.ts +5 -0
- package/dist/tracking-config/apply.d.ts +57 -0
- package/dist/tracking-config/index.d.ts +7 -0
- package/dist/tracking-config/resolve.d.ts +25 -0
- package/dist/tracking-config/storage.d.ts +8 -0
- package/dist/tracking-config/types.d.ts +106 -0
- package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
- package/dist/tracking.cjs +10 -1
- package/dist/tracking.js +1531 -294
- package/dist/trigger-D9L4GPmQ.js +3726 -0
- package/dist/trigger-DZ9vU7jo.cjs +147 -0
- package/dist/types/common.d.ts +11 -1
- package/dist/types/compositor.d.ts +21 -0
- package/dist/types/face.d.ts +21 -14
- package/dist/types/gesture-tracking.d.ts +2 -2
- package/dist/types/hand-tracking.d.ts +19 -2
- package/dist/types/holistic.d.ts +121 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model.d.ts +22 -2
- package/dist/types/nodes.d.ts +83 -6
- package/dist/types/segmentation.d.ts +26 -0
- package/dist/types/session.d.ts +50 -4
- package/dist/types/tracking.d.ts +8 -2
- package/dist/types/util-types.d.ts +1 -1
- package/dist/useBodies-BYzJpQ4L.js +75 -0
- package/dist/useBodies-Cxpmx6Bb.cjs +1 -0
- package/dist/useFaceInfo-BzEUj2OI.js +75 -0
- package/dist/useFaceInfo-DlLRAVNw.cjs +1 -0
- package/dist/useFaceResultReader-Cc4Qrutf.js +61 -0
- package/dist/useFaceResultReader-D3jOQNKz.cjs +1 -0
- package/dist/useInstructionHold-DOu-RpCM.js +53 -0
- package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
- package/dist/useIrisTracking-Bz4uLDa7.js +6190 -0
- package/dist/useIrisTracking-DRGWgoNy.cjs +35 -0
- package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
- package/dist/useXRCapabilities-B1KLckqw.js +30 -0
- package/dist/useXRCapabilities-CZlPUBjF.cjs +1 -0
- package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
- package/dist/utils/drawNormalizedCrop.d.ts +22 -0
- package/dist/utils/fns.d.ts +6 -3
- package/dist/utils/headOccluderFit.d.ts +42 -0
- package/dist/utils/integrity.d.ts +25 -26
- package/dist/utils/landmarkBounds.d.ts +1 -1
- package/dist/utils/logger.d.ts +2 -2
- package/dist/utils/resolveNumFaces.d.ts +13 -0
- package/dist/utils/shoulderOccluderFit.d.ts +38 -0
- package/dist/utils/similarityFit.d.ts +23 -0
- package/dist/utils/updateThrottle.d.ts +2 -0
- package/dist/utils/useStableUniforms.d.ts +18 -0
- package/dist/utils/visionWasm.d.ts +18 -0
- package/dist/uv-BMFt19bg.cjs +1 -0
- package/dist/{index-BD-JWMjE.js → uv-DJU_XfmN.js} +15 -180
- package/dist/x-Co8jPhP0.js +127 -0
- package/dist/x-KC8E4Gaj.cjs +41 -0
- package/docs/MIGRATION_GUIDE.md +589 -0
- package/docs/SDK_DOCUMENTATION.md +1157 -0
- package/docs/api/adaptive-quality.mdx +104 -0
- package/docs/api/asset-lifecycle.mdx +78 -0
- package/docs/api/audio.mdx +36 -0
- package/docs/api/behavior-components.mdx +164 -0
- package/docs/api/body-instructions.mdx +287 -0
- package/docs/api/body-rig.mdx +384 -0
- package/docs/api/body-triggers.mdx +235 -0
- package/docs/api/camera-permission.mdx +142 -0
- package/docs/api/capture-recording.mdx +111 -0
- package/docs/api/coordinate-spaces.mdx +168 -0
- package/docs/api/cross-camera.mdx +89 -0
- package/docs/api/debug-ui-scene-editor.mdx +270 -0
- package/docs/api/diagnostics-calibration.mdx +97 -0
- package/docs/api/external-face-mesh.mdx +231 -0
- package/docs/api/face-actions.mdx +108 -0
- package/docs/api/face-attribute-expression.mdx +87 -0
- package/docs/api/face-binding-anchors.mdx +55 -0
- package/docs/api/face-character.mdx +157 -0
- package/docs/api/face-effects.mdx +28 -0
- package/docs/api/face-expression-controller.mdx +153 -0
- package/docs/api/face-info.mdx +118 -0
- package/docs/api/face-inset.mdx +204 -0
- package/docs/api/face-instructions.mdx +183 -0
- package/docs/api/face-liquify.mdx +196 -0
- package/docs/api/face-mesh.mdx +130 -0
- package/docs/api/face-morph.mdx +117 -0
- package/docs/api/face-painting.mdx +40 -0
- package/docs/api/face-reprojection.mdx +154 -0
- package/docs/api/face-retouching.mdx +81 -0
- package/docs/api/face-swap.mdx +350 -0
- package/docs/api/face-warp-3d.mdx +166 -0
- package/docs/api/faceless.mdx +143 -0
- package/docs/api/gestures.mdx +210 -0
- package/docs/api/hair.mdx +97 -0
- package/docs/api/hand-instructions.mdx +222 -0
- package/docs/api/hand-rig.mdx +661 -0
- package/docs/api/hand-touch.mdx +162 -0
- package/docs/api/head-occluder.mdx +563 -0
- package/docs/api/holistic-tracker.mdx +164 -0
- package/docs/api/instructions.mdx +323 -0
- package/docs/api/iris-tracking.mdx +247 -0
- package/docs/api/made-up-camera.mdx +131 -0
- package/docs/api/makeup-skin-tone.mdx +135 -0
- package/docs/api/makeup.mdx +353 -0
- package/docs/api/material-render-state.mdx +132 -0
- package/docs/api/multi-subject.mdx +185 -0
- package/docs/api/particles.mdx +183 -0
- package/docs/api/person-cutout.mdx +171 -0
- package/docs/api/pin-to-face-mesh.mdx +274 -0
- package/docs/api/product-ar.mdx +114 -0
- package/docs/api/product-details.mdx +78 -0
- package/docs/api/runtime-3d.mdx +316 -0
- package/docs/api/scene-object-store.mdx +213 -0
- package/docs/api/screen-image.mdx +67 -0
- package/docs/api/screen-shape.mdx +64 -0
- package/docs/api/screen-space-coordinates.mdx +75 -0
- package/docs/api/screen-text.mdx +39 -0
- package/docs/api/segmentation-overlay.mdx +301 -0
- package/docs/api/session-lifecycle.mdx +136 -0
- package/docs/api/texture-sources.mdx +74 -0
- package/docs/api/trackers.mdx +65 -0
- package/docs/api/tracking-config.mdx +108 -0
- package/docs/docs.json +121 -0
- package/docs/examples/lip-shaders.mdx +273 -0
- package/docs/examples/scene-object-recipes.mdx +194 -0
- package/docs/guides/face-atlas-template.svg +1 -0
- package/docs/guides/face-atlas-textures.mdx +186 -0
- package/docs/guides/face-texture-template.svg +1 -0
- package/docs/guides/harness-debug-ui.mdx +139 -0
- package/docs/guides/lip-effect-textures.mdx +368 -0
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -0
- package/docs/guides/makeup-design-textures.mdx +109 -0
- package/docs/inspector/hierarchy-panel.mdx +51 -0
- package/docs/inspector/object-inspector-panel.mdx +51 -0
- package/docs/introduction.mdx +120 -0
- package/docs/scene-objects/overview.mdx +127 -0
- package/docs/scene-objects/render-groups.mdx +77 -0
- package/docs/scene-objects/runtime-rendering.mdx +75 -0
- package/docs/texture-api-consumer.md +84 -0
- package/package.json +86 -8
- package/settings.json +1998 -0
- package/dist/DebuggerUI-CEfdddkZ.cjs +0 -1
- package/dist/DebuggerUI-Dgop6Q6o.js +0 -269
- package/dist/components/FaceRetouch/retouchRegions.d.ts +0 -23
- package/dist/components/FaceRetouch/useFaceRetouchRegions.d.ts +0 -12
- package/dist/index-B5J4gzn2.cjs +0 -1
- package/dist/index-BVBVg96G.cjs +0 -1
- package/dist/index-CYMj26Ej.js +0 -1331
- package/dist/index-DtwHElmG.js +0 -157
- package/dist/index-PtFmD6B8.cjs +0 -1
- package/dist/internal-DH5d1Xnq.cjs +0 -1
- package/dist/modules/XRClient/index.d.ts +0 -9
- package/dist/modules/index.d.ts +0 -1
- package/dist/selectors-BHO6TnoC.js +0 -59
- package/dist/selectors-Bub0o3qy.cjs +0 -1
- package/dist/services/ApiService.d.ts +0 -12
- package/dist/types/client.d.ts +0 -3
- package/dist/useFaceResults-cpsSmKKc.js +0 -81
- package/dist/useFaceResults-hVUJYSEY.cjs +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";const i=require("./renderPasses-DgxUKn9b.cjs"),xe=require("three"),M=require("react/jsx-runtime"),_=require("react"),Ce=require("./index-Sho4F4it.cjs"),Le=require("./landmarks-BEjJXcnE.cjs"),Y=require("./renderState-apSfg4eR.cjs"),oe=require("@react-three/fiber"),we=require("./selectors-QB2qsaxy.cjs"),Ie=require("./FaceSurface-CHAMEeG1.cjs"),re=require("./landmarkMask-CvN-L5NT.cjs");function Pe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const f=Pe(xe),Oe=[{label:"Wireframe",value:i.FACE_MESH_MATERIAL_TYPES.wireframe},{label:"Basic",value:i.FACE_MESH_MATERIAL_TYPES.basic},{label:"Standard",value:i.FACE_MESH_MATERIAL_TYPES.standard},{label:"Physical",value:i.FACE_MESH_MATERIAL_TYPES.physical},{label:"Toon",value:i.FACE_MESH_MATERIAL_TYPES.toon},{label:"Normal",value:i.FACE_MESH_MATERIAL_TYPES.normal},{label:"Matcap",value:i.FACE_MESH_MATERIAL_TYPES.matcap},{label:"Shader",value:i.FACE_MESH_MATERIAL_TYPES.shader}],De=[{label:"Original Face",value:i.FACE_MESH_SHADER_PRESETS.originalFace},{label:"Composite",value:i.FACE_MESH_SHADER_PRESETS.composite}],Ue=[{label:"Front",value:i.FACE_MESH_SIDES.front},{label:"Back",value:i.FACE_MESH_SIDES.back},{label:"Double",value:i.FACE_MESH_SIDES.double}],Ne=[{label:"None",value:i.FACE_MESH_TEXTURE_MAPS.none},{label:"UV Map 1",value:i.FACE_MESH_TEXTURE_MAPS.canonical},{label:"UV Map 2",value:i.FACE_MESH_TEXTURE_MAPS.style2}],He=[{label:"None",value:i.FACE_MESH_ALPHA_MAPS.none},{label:"Default Mask",value:i.FACE_MESH_ALPHA_MAPS.canonical}],Be=[{label:"Solid",value:i.FACE_MESH_MASK_TEXTURE_SOURCES.solid},{label:"Gradient",value:i.FACE_MESH_MASK_TEXTURE_SOURCES.gradient},{label:"Image URL",value:i.FACE_MESH_MASK_TEXTURE_SOURCES.imageUrl},{label:"Media URL",value:i.FACE_MESH_MASK_TEXTURE_SOURCES.mediaUrl}],Xe=[{label:"Normal",value:i.FACE_MESH_BLEND_MODES.normal},{label:"Add",value:i.FACE_MESH_BLEND_MODES.add},{label:"Subtract",value:i.FACE_MESH_BLEND_MODES.subtract},{label:"Multiply",value:i.FACE_MESH_BLEND_MODES.multiply},{label:"Screen",value:i.FACE_MESH_BLEND_MODES.screen},{label:"Overlay",value:i.FACE_MESH_BLEND_MODES.overlay},{label:"Soft Light",value:i.FACE_MESH_BLEND_MODES.softLight},{label:"Hard Light",value:i.FACE_MESH_BLEND_MODES.hardLight},{label:"Lighten",value:i.FACE_MESH_BLEND_MODES.lighten},{label:"Darken",value:i.FACE_MESH_BLEND_MODES.darken},{label:"Difference",value:i.FACE_MESH_BLEND_MODES.difference},{label:"Exclusion",value:i.FACE_MESH_BLEND_MODES.exclusion}],ie=["both","left","right"],le=["shader","image"],ce={eye:"both",mode:"shader",color:"#4fa3ff",textureUrl:"",tintImage:!1,scale:1,opacity:.85,targetFps:0,smoothing:0,leadMs:80,mirrored:!1,faceIndex:0,holdMs:250},Ke=[{key:"eye",label:"Eye",type:"select",options:ie.map(e=>({label:e,value:e}))},{key:"mode",label:"Material",type:"select",options:le.map(e=>({label:e,value:e}))},{key:"color",label:"Color / tint",type:"color"},{key:"textureUrl",label:"Image URL (image mode)",type:"text"},{key:"tintImage",label:"Tint image with color",type:"boolean"},{key:"scale",label:"Scale (× iris radius)",type:"number",min:.2,max:4,step:.05},{key:"opacity",label:"Opacity",type:"number",min:0,max:1,step:.05},{key:"targetFps",label:"Face FPS (0 = session)",type:"number",min:0,max:60,step:1},{key:"smoothing",label:"Smoothing (0 = raw)",type:"number",min:0,max:60,step:1},{key:"leadMs",label:"Lead between samples (ms)",type:"number",min:0,max:200,step:10},{key:"mirrored",label:"Mirror material",type:"boolean"},{key:"faceIndex",label:"Face index",type:"number",min:0,max:3,step:1},{key:"holdMs",label:"Hold (ms)",type:"number",min:0,max:1e3,step:10}],Ge=e=>({...ce,...e}),Ye=(e,t)=>({...e,...t}),je=["lips","contour","blush","highlighter","eyeshadow","eyeliner","brows"],O=["matte","satin","gloss","shimmer","metallic","glitter"],ze=["both","left","right"],ue=["lips","blush","contour","highlighter","brows"],D={matte:{shine:0,sparkleDensity:0,sparkleSize:.25},satin:{shine:.3,sparkleDensity:0,sparkleSize:.25},gloss:{shine:.8,sparkleDensity:0,sparkleSize:.25},shimmer:{shine:.5,sparkleDensity:.6,sparkleSize:.25},metallic:{shine:.7,sparkleDensity:0,sparkleSize:.25},glitter:{shine:.7,sparkleDensity:.35,sparkleSize:.8}},me=["shine","sparkleDensity","sparkleSize"],P=[.1,1.5],T={lips:{nude:"#b9826f",rosewood:"#9e5a5a",mauve:"#a0606e",softPink:"#d88a95",coral:"#e0645a",peach:"#e8907a",classicRed:"#a3202d",brick:"#8e3b2c",berry:"#7b2846",plum:"#5e2a45",wine:"#5a1a28",chocolate:"#5b3a2e"},contour:{fair:"#c9a08a",light:"#b48a72",medium:"#98705a",tan:"#7f5a45",deep:"#5e4032",rich:"#432c22",bronzeLight:"#b9805a",bronzeDeep:"#8a5532"},blush:{softPink:"#e8a0a8",rose:"#d97a85",peach:"#f0a07c",coral:"#ec7b67",apricot:"#f2a86b",mauve:"#c0828f",berry:"#b04a68",brick:"#b4574a",terracotta:"#c4694c",plum:"#8f4a68"},highlighter:{pearl:"#f6eee6",champagne:"#f2dcc0",gold:"#e9c27a",roseGold:"#eab3a0",bronzeGlow:"#d29a66",lilacPearl:"#e6d6ef"},eyeshadow:{ivory:"#f3e6d3",champagne:"#e9d2b0",sand:"#d2b48c",taupe:"#8f7a6e",warmBrown:"#8b5a3c",coolBrown:"#6e5a50",espresso:"#3e2a22",charcoal:"#3a3a3c",black:"#141414",bronze:"#a8743f",copper:"#b5653a",gold:"#d4ae5a",roseGold:"#d49a8a",plum:"#6b3a5a",burgundy:"#6e2433",olive:"#6f6a3a",navy:"#23314f",emerald:"#1f6b52",teal:"#1f6f73",lilac:"#b8a0cf",silver:"#c5c7cb"},eyeliner:{black:"#0d0d0d",brownBlack:"#231a16",brown:"#4a3226",charcoal:"#33343a",navy:"#1c2848",plum:"#4f2442",emerald:"#145a44",bronze:"#8a5a2e",gold:"#c9a14e",white:"#f5f3ef"},brows:{blonde:"#a88a62",taupe:"#7c6a5c",softBrown:"#6b4f3c",mediumBrown:"#57402f",darkBrown:"#3d2c22",softBlack:"#252020",auburn:"#7a4030",grey:"#8a8580"}},v=e=>Object.keys(T[e]),pe={lips:v("lips"),contour:v("contour"),blush:v("blush"),highlighter:v("highlighter"),eyeshadow:v("eyeshadow"),eyeliner:v("eyeliner"),brows:v("brows")},U=e=>ue.includes(e),z=(e,t)=>typeof t=="string"&&Object.prototype.hasOwnProperty.call(T[e],t),se=(e,t)=>t==="custom"||t==="auto"&&U(e)||z(e,t);function de(e,t){return t==="auto"?U(e)?"auto":void 0:z(e,t)?T[e][t]:void 0}const w=e=>{const t=e.trim().toLowerCase(),o=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(t);return o?`#${o[1]}${o[1]}${o[2]}${o[2]}${o[3]}${o[3]}`:t},We=(e,t)=>Object.values(T[e]).some(o=>w(o)===t),he=(e,t,o,r,n)=>{const a=se(e,t),s=a?t:se(e,r)?r:"custom",l=typeof o=="string"&&o.trim()?o.trim():void 0;if(s==="custom")return{shade:s,color:l??n};const u=s==="auto"?n:de(e,s)??n;if(l!==void 0){const c=w(l),g=a&&(We(e,c)||c===w(n));if(c!==w(u)&&!g)return{shade:"custom",color:l}}return{shade:s,color:u}},W=e=>{const t=e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase();return t[0].toUpperCase()+t.slice(1)},Se=e=>[{label:"Custom color",value:"custom"},...U(e)?[{label:"Auto (own color)",value:"auto"}]:[],...pe[e].map(t=>({label:W(t),value:t}))],V=["lipstick","gloss","matte","tint","metallic","gradient","shimmer","glitter"],ge=["texture","solid"],Ee=["outward","vertical","horizontal"],fe={enabled:!0,preset:"custom",shade:"custom",maskMode:"outer-and-inner-lips",colorMode:"texture",color:"#e85d75",opacity:.8,coverage:.8,finish:"satin",...D.satin,sparkleColor:"",intensity:1,shading:1,gloss:.35,roughness:.5,highlightColor:"#ffffff",gradientColor:"#ffd6de",gradientAmount:0,gradientDirection:"outward",edgeSoftness:.12,innerLipColor:"#7a1f36",innerLipAmount:0,innerLipWidth:.35,splitLips:!1,lowerLipColor:"#e85d75",lowerLipOpacity:.8,textureScaleX:1,textureScaleY:1,textureOffsetX:0,textureOffsetY:0,textureRotation:0,textureFlipX:!1,textureFlipY:!1},q={lipstick:{finish:"satin",coverage:.85,color:"#c0304f",opacity:.85,intensity:1,shading:1,gloss:.35,roughness:.5,highlightColor:"#ffffff",gradientAmount:0},gloss:{finish:"gloss",coverage:.45,color:"#e05a7a",opacity:.7,intensity:1,shading:1,gloss:.95,roughness:.12,highlightColor:"#ffffff",gradientAmount:0},matte:{finish:"matte",coverage:.95,color:"#a8323e",opacity:.92,intensity:1,shading:1,gloss:0,roughness:1,highlightColor:"#ffffff",gradientAmount:0},tint:{finish:"matte",coverage:.3,color:"#ff6b81",opacity:.4,intensity:1,shading:1,gloss:.1,roughness:.7,highlightColor:"#ffffff",gradientAmount:0},metallic:{finish:"metallic",coverage:.9,color:"#b5485a",opacity:.9,intensity:1,shading:1,gloss:1,roughness:.3,highlightColor:"#f3c46b",gradientAmount:0},gradient:{finish:"satin",coverage:.8,color:"#d6336c",opacity:.8,intensity:1,shading:1,gloss:.3,roughness:.5,highlightColor:"#ffffff",gradientColor:"#f9c2cf",gradientAmount:.85,gradientDirection:"outward"},shimmer:{finish:"shimmer",coverage:.7,color:"#c8577a",opacity:.8,intensity:1,shading:1,gloss:.4,roughness:.45,highlightColor:"#ffffff",gradientAmount:0},glitter:{finish:"glitter",coverage:.5,color:"#b8406a",opacity:.8,intensity:1,shading:1,gloss:.5,roughness:.35,highlightColor:"#ffffff",gradientAmount:0}},$=e=>typeof e=="string"&&V.includes(e),p=(e,t,o,r)=>typeof e=="number"&&Number.isFinite(e)?Math.min(o,Math.max(t,e)):r,Ve=(e,t)=>typeof e=="number"&&Number.isFinite(e)?e:t,x=(e,t)=>typeof e=="string"&&e.trim()?e:t,qe=(e,t)=>typeof e=="string"?e.trim():t,C=(e,t)=>typeof e=="boolean"?e:t,K=(e,t,o)=>typeof t=="string"&&e.includes(t)?t:o,$e=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),be=(e={})=>{const t=$(e.preset)?e.preset:"custom",o=$e(e),r={...fe,...t==="custom"?{}:q[t]},n=K(O,o.finish,r.finish),a={...r,...D[n]},s={...a,...o},{shade:l,color:u}=he("lips",o.shade,o.color,a.shade,a.color);return{enabled:C(s.enabled,a.enabled),preset:t,shade:l,maskMode:s.maskMode==="outer-lips"?"outer-lips":"outer-and-inner-lips",colorMode:K(ge,s.colorMode,a.colorMode),color:u,opacity:p(s.opacity,0,1,a.opacity),coverage:p(s.coverage,0,1,a.coverage),finish:n,shine:p(s.shine,0,1,a.shine),sparkleDensity:p(s.sparkleDensity,0,1,a.sparkleDensity),sparkleSize:p(s.sparkleSize,...P,a.sparkleSize),sparkleColor:qe(s.sparkleColor,a.sparkleColor),intensity:p(s.intensity,0,1,a.intensity),shading:p(s.shading,0,1,a.shading),gloss:p(s.gloss,0,1,a.gloss),roughness:p(s.roughness,0,1,a.roughness),highlightColor:x(s.highlightColor,a.highlightColor),gradientColor:x(s.gradientColor,a.gradientColor),gradientAmount:p(s.gradientAmount,0,1,a.gradientAmount),gradientDirection:K(Ee,s.gradientDirection,a.gradientDirection),edgeSoftness:p(s.edgeSoftness,0,1,a.edgeSoftness),innerLipColor:x(s.innerLipColor,a.innerLipColor),innerLipAmount:p(s.innerLipAmount,0,1,a.innerLipAmount),innerLipWidth:p(s.innerLipWidth,0,1,a.innerLipWidth),splitLips:C(s.splitLips,a.splitLips),lowerLipColor:x(s.lowerLipColor,a.lowerLipColor),lowerLipOpacity:p(s.lowerLipOpacity,0,1,a.lowerLipOpacity),textureScaleX:p(s.textureScaleX,.05,20,a.textureScaleX),textureScaleY:p(s.textureScaleY,.05,20,a.textureScaleY),textureOffsetX:p(s.textureOffsetX,-2,2,a.textureOffsetX),textureOffsetY:p(s.textureOffsetY,-2,2,a.textureOffsetY),textureRotation:Ve(s.textureRotation,a.textureRotation),textureFlipX:C(s.textureFlipX,a.textureFlipX),textureFlipY:C(s.textureFlipY,a.textureFlipY)}},Ze=(e,t)=>{const o=Object.keys(e).some(a=>t[a]===void 0),r=Object.fromEntries(Object.entries(t).filter(([a,s])=>s!==void 0&&(o||s!==e[a]))),n={...e};if(r.preset!==e.preset&&$(r.preset)&&Object.assign(n,q[r.preset]),Object.assign(n,r),n.finish!==e.finish&&O.includes(n.finish)){Object.assign(n,D[n.finish]);for(const a of me)r[a]!==void 0&&(n[a]=r[a])}return r.color===void 0?n.shade!=="custom"&&delete n.color:r.shade===void 0&&r.color!==e.color&&(n.shade="custom"),be(n)},d={min:0,max:1,step:.01},Je=[{key:"enabled",label:"On",type:"boolean"},{key:"preset",label:"Preset",type:"select",options:[{label:"Custom",value:"custom"},...V.map(e=>({label:e[0].toUpperCase()+e.slice(1),value:e}))]},{key:"shade",label:"Shade",type:"select",options:Se("lips")},{key:"maskMode",label:"Mask mode",type:"select",options:[{label:"Outer + inner lips (mouth cut out)",value:"outer-and-inner-lips"},{label:"Outer lips (mouth included)",value:"outer-lips"}]},{key:"colorMode",label:"Color mode",type:"select",options:[{label:"Design texture",value:"texture"},{label:"Procedural (solid / gradient)",value:"solid"}]},{key:"color",label:"Tint color",type:"color"},{key:"opacity",label:"Opacity",type:"number",...d},{key:"coverage",label:"Coverage (sheer → opaque)",type:"number",...d},{key:"finish",label:"Finish",type:"select",options:O.map(e=>({label:W(e),value:e}))},{key:"shine",label:"Shine",type:"number",...d},{key:"sparkleColor",label:"Sparkle color (blank = from shade)",type:"text"},{key:"sparkleDensity",label:"Sparkle density",type:"number",...d},{key:"sparkleSize",label:"Sparkle size (mm)",type:"number",min:P[0],max:P[1],step:.05},{key:"intensity",label:"Tint intensity",type:"number",...d},{key:"shading",label:"Follow light (0 = flat)",type:"number",...d},{key:"gloss",label:"Gloss",type:"number",...d},{key:"roughness",label:"Roughness",type:"number",...d},{key:"highlightColor",label:"Highlight color",type:"color"},{key:"gradientColor",label:"Gradient color",type:"color"},{key:"gradientAmount",label:"Gradient amount",type:"number",...d},{key:"gradientDirection",label:"Gradient direction",type:"select",options:[{label:"Mouth line → outer edge",value:"outward"},{label:"Bottom → top",value:"vertical"},{label:"Person's right → left corner",value:"horizontal"}]},{key:"edgeSoftness",label:"Edge softness",type:"number",...d},{key:"innerLipColor",label:"Inner lip color",type:"color"},{key:"innerLipAmount",label:"Inner lip amount",type:"number",...d},{key:"innerLipWidth",label:"Inner lip width",type:"number",...d},{key:"splitLips",label:"Separate lower lip",type:"boolean"},{key:"lowerLipColor",label:"Lower lip color",type:"color"},{key:"lowerLipOpacity",label:"Lower lip opacity",type:"number",...d},{key:"textureScaleX",label:"Texture scale X",type:"number",min:.1,max:10,step:.05},{key:"textureScaleY",label:"Texture scale Y",type:"number",min:.1,max:10,step:.05},{key:"textureOffsetX",label:"Texture offset X",type:"number",min:-1,max:1,step:.01},{key:"textureOffsetY",label:"Texture offset Y",type:"number",min:-1,max:1,step:.01},{key:"textureRotation",label:"Texture rotation°",type:"number",min:-180,max:180,step:1},{key:"textureFlipX",label:"Flip horizontal",type:"boolean"},{key:"textureFlipY",label:"Flip vertical",type:"boolean"}],Qe=(e,t,o=new f.Matrix3)=>{const r=(t.minU+t.maxU)/2,n=(t.minV+t.maxV)/2,a=t.maxU-t.minU,s=t.maxV-t.minV,l=-f.MathUtils.degToRad(e.textureRotation),u=Math.cos(l),c=Math.sin(l),g=(e.textureFlipX?-1:1)/Math.max(e.textureScaleX,.001),h=(e.textureFlipY?-1:1)/Math.max(e.textureScaleY,.001),S=g*u,b=-g*c,m=h*c,y=h*u,k=r+e.textureOffsetX*a,B=n+e.textureOffsetY*s,te=r-(S*k+b*B),X=n-(m*k+y*B);return o.set(S,b,te,m,y,X,0,0,1)},et=["eachOther","photo","canonicalTexture","faceTexture"],Z=["natural","keepColors","raw"],F={preset:"natural",matchSkinTone:1,matchLighting:1,edgeMatch:1,edgeSoftness:1.2,edgeInset:.3,ownEyes:!0,ownMouth:!0,featureSoftness:.25,detail:1,smoothing:.35,amount:1},N={natural:{matchSkinTone:1,matchLighting:1,edgeMatch:1,edgeSoftness:1.2,ownEyes:!0,ownMouth:!0,detail:1},keepColors:{matchSkinTone:0,matchLighting:.7,edgeMatch:1,edgeSoftness:1},raw:{matchSkinTone:0,matchLighting:0,edgeMatch:0,edgeSoftness:.4}},J=e=>typeof e=="string"&&Z.includes(e),ve=e=>_e(e)?"keepColors":"natural",_e=e=>{var t;return(e==null?void 0:e.kind)==="canonicalTexture"||(e==null?void 0:e.kind)==="faceTexture"&&((t=e.face)==null?void 0:t.kind)==="canonical"},ye=.1,ke=(e,t,o,r)=>typeof e=="number"&&Number.isFinite(e)?Math.min(o,Math.max(t,e)):r,ne=(e,t)=>typeof e=="boolean"?e:t,tt=(e,t,o)=>typeof t=="string"&&e.includes(t)?t:o,Q=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),R={matchSkinTone:[0,1],matchLighting:[0,1],edgeMatch:[0,1],edgeSoftness:[.3,3],edgeInset:[0,1.5],featureSoftness:[.1,.6],detail:[0,1],smoothing:[0,1],amount:[0,1]},Me=(e,t)=>Object.entries(N[t]).every(([o,r])=>e[o]===r),j=(e={},t={})=>{const o=e.preset??ve(t.source),r=J(o)?o:"custom",n={...F,..._e(t.source)?{featureSoftness:ye}:{},...r==="custom"?{}:N[r]},a={...n,...Q(e)},s=R,l=c=>ke(a[c],s[c][0],s[c][1],n[c]),u={preset:r,matchSkinTone:l("matchSkinTone"),matchLighting:l("matchLighting"),edgeMatch:l("edgeMatch"),edgeSoftness:l("edgeSoftness"),edgeInset:l("edgeInset"),ownEyes:ne(a.ownEyes,n.ownEyes),ownMouth:ne(a.ownMouth,n.ownMouth),featureSoftness:l("featureSoftness"),detail:l("detail"),smoothing:l("smoothing"),amount:l("amount")};return r!=="custom"&&!Me(u,r)&&(u.preset="custom"),u},at=(e,t)=>{const o=Object.fromEntries(Object.entries(t).filter(([n,a])=>n!=="preset"&&a!==void 0&&a!==e[n])),r=t.preset;return J(r)&&(r!==e.preset||!Me(e,r))?j({...e,...N[r],...o,preset:r}):j({...e,...o,preset:r==="custom"?"custom":e.preset})},E={min:0,max:1,step:.01},I=(e,t)=>({min:R[e][0],max:R[e][1],step:t}),ot={natural:"Natural",keepColors:"Keep colors",raw:"Raw"},rt=[{key:"preset",label:"Preset",type:"select",options:[{label:"Custom",value:"custom"},...Z.map(e=>({label:ot[e],value:e}))]},{key:"matchSkinTone",label:"Match skin tone",type:"number",...E},{key:"matchLighting",label:"Match lighting",type:"number",...E},{key:"edgeMatch",label:"Match at the edge",type:"number",...E},{key:"edgeSoftness",label:"Edge softness (cm)",type:"number",...I("edgeSoftness",.05)},{key:"edgeInset",label:"Edge inset (cm)",type:"number",...I("edgeInset",.05)},{key:"ownEyes",label:"Keep own eyes",type:"boolean"},{key:"ownMouth",label:"Keep own mouth",type:"boolean"},{key:"featureSoftness",label:"Eye and mouth rim (cm)",type:"number",...I("featureSoftness",.01)},{key:"detail",label:"Detail",type:"number",...E},{key:"smoothing",label:"Smoothing",type:"number",...E},{key:"amount",label:"Amount",type:"number",...E}],H=["leftLeft","rightRight","flip","upsideDown"],Ae={leftLeft:"your left half twice",rightRight:"your right half twice",flip:"left and right swapped",upsideDown:"eyes and mouth upside down"},st=e=>typeof e=="string"&&H.includes(e),Fe={variant:"leftLeft",matchLighting:1,edgeSoftness:1.2,smoothing:.35,amount:1},Re=(e={})=>{const t=Fe,o={...t,...Q(e)},r=R,n=a=>ke(o[a],r[a][0],r[a][1],t[a]);return{variant:tt(H,o.variant,t.variant),matchLighting:n("matchLighting"),edgeSoftness:n("edgeSoftness"),smoothing:n("smoothing"),amount:n("amount")}},nt=(e,t)=>Re({...e,...Q(t)}),it=[{key:"variant",label:"Variant",type:"select",options:H.map(e=>({label:Ae[e],value:e}))},{key:"matchLighting",label:"Match lighting",type:"number",...E},{key:"edgeSoftness",label:"Edge softness (cm)",type:"number",...I("edgeSoftness",.05)},{key:"smoothing",label:"Smoothing",type:"number",...E},{key:"amount",label:"Amount",type:"number",...E}],lt=e=>({matchSkinTone:0,matchLighting:e.matchLighting,edgeMatch:e.matchLighting,edgeSoftness:e.edgeSoftness,edgeInset:F.edgeInset,ownEyes:!1,ownMouth:!1,featureSoftness:F.featureSoftness,detail:F.detail,smoothing:e.smoothing,amount:e.amount}),ct=Object.freeze({...Ie.faceSurfaceBlending,transparent:!1,depthTest:!0,depthWrite:!1,toneMapped:!1}),ut=`
|
|
2
|
+
varying vec2 vUv;
|
|
3
|
+
|
|
4
|
+
void main() {
|
|
5
|
+
vUv = uv;
|
|
6
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
7
|
+
}
|
|
8
|
+
`,mt=`
|
|
9
|
+
uniform sampler2D cameraTexture;
|
|
10
|
+
uniform sampler2D retouchMaskTexture;
|
|
11
|
+
uniform vec2 texelSize;
|
|
12
|
+
uniform float retouchAmount;
|
|
13
|
+
uniform float blurRadius;
|
|
14
|
+
uniform float detailPreservation;
|
|
15
|
+
uniform float blemishReduction;
|
|
16
|
+
uniform float blemishRadius;
|
|
17
|
+
uniform float previewMask;
|
|
18
|
+
uniform float protectLandmarks;
|
|
19
|
+
uniform float clipMinX;
|
|
20
|
+
uniform float clipMaxX;
|
|
21
|
+
varying vec2 vUv;
|
|
22
|
+
|
|
23
|
+
vec3 sampleCamera(vec2 uv) {
|
|
24
|
+
return texture2D(cameraTexture, clamp(uv, vec2(0.0), vec2(1.0))).rgb;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
vec3 readRetouchMask(vec2 uv) {
|
|
28
|
+
vec4 mask = texture2D(retouchMaskTexture, uv);
|
|
29
|
+
float faceRegion = clamp(mask.b, 0.0, 1.0);
|
|
30
|
+
float softFaceRegion = min(mask.r, faceRegion);
|
|
31
|
+
float protectedRegion = min(mask.g, faceRegion) * protectLandmarks;
|
|
32
|
+
float hardProtectedRegion = step(0.08, protectedRegion);
|
|
33
|
+
float softRetouchRegion = softFaceRegion * (1.0 - protectedRegion);
|
|
34
|
+
float hardRetouchRegion = step(0.5, faceRegion) * (1.0 - hardProtectedRegion);
|
|
35
|
+
|
|
36
|
+
return vec3(
|
|
37
|
+
clamp(softRetouchRegion, 0.0, 1.0),
|
|
38
|
+
clamp(protectedRegion, 0.0, 1.0),
|
|
39
|
+
clamp(hardRetouchRegion, 0.0, 1.0)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
float retouchCoverage(vec2 uv) {
|
|
44
|
+
return step(0.001, readRetouchMask(uv).x);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
void addMaskedBlurSample(inout vec3 color, inout float weightSum, vec2 centerUv, vec2 sampleUv, float weight) {
|
|
48
|
+
float coverage = retouchCoverage(sampleUv);
|
|
49
|
+
vec3 sampleColor = mix(sampleCamera(centerUv), sampleCamera(sampleUv), coverage);
|
|
50
|
+
color += sampleColor * weight;
|
|
51
|
+
weightSum += weight;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
vec3 maskedBlurCamera(vec2 uv, float radius) {
|
|
55
|
+
vec2 r = texelSize * radius;
|
|
56
|
+
vec3 color = sampleCamera(uv) * 0.2;
|
|
57
|
+
float weightSum = 0.2;
|
|
58
|
+
|
|
59
|
+
addMaskedBlurSample(color, weightSum, uv, uv + vec2(r.x, 0.0), 0.1);
|
|
60
|
+
addMaskedBlurSample(color, weightSum, uv, uv - vec2(r.x, 0.0), 0.1);
|
|
61
|
+
addMaskedBlurSample(color, weightSum, uv, uv + vec2(0.0, r.y), 0.1);
|
|
62
|
+
addMaskedBlurSample(color, weightSum, uv, uv - vec2(0.0, r.y), 0.1);
|
|
63
|
+
addMaskedBlurSample(color, weightSum, uv, uv + r, 0.075);
|
|
64
|
+
addMaskedBlurSample(color, weightSum, uv, uv - r, 0.075);
|
|
65
|
+
addMaskedBlurSample(color, weightSum, uv, uv + vec2(r.x, -r.y), 0.075);
|
|
66
|
+
addMaskedBlurSample(color, weightSum, uv, uv + vec2(-r.x, r.y), 0.075);
|
|
67
|
+
addMaskedBlurSample(color, weightSum, uv, uv + r * 2.0, 0.05);
|
|
68
|
+
addMaskedBlurSample(color, weightSum, uv, uv - r * 2.0, 0.05);
|
|
69
|
+
|
|
70
|
+
return color / max(weightSum, 0.001);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
float retouchLuminance(vec3 color) {
|
|
74
|
+
return dot(color, vec3(0.299, 0.587, 0.114));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
vec3 reduceBlemishes(vec3 current, vec3 source, vec3 localAverage, vec3 skinBase, float skinMask) {
|
|
78
|
+
float originalLum = retouchLuminance(source);
|
|
79
|
+
float localLum = retouchLuminance(localAverage);
|
|
80
|
+
float redness = max(source.r - max(source.g, source.b), 0.0);
|
|
81
|
+
float localRedness = max(localAverage.r - max(localAverage.g, localAverage.b), 0.0);
|
|
82
|
+
float excessRedness = max(redness - localRedness * 0.72, 0.0);
|
|
83
|
+
float darkSpot = max(localLum - originalLum, 0.0);
|
|
84
|
+
float contrast = length(source - localAverage);
|
|
85
|
+
float candidate =
|
|
86
|
+
smoothstep(0.012, 0.09, excessRedness) +
|
|
87
|
+
smoothstep(0.018, 0.13, darkSpot) +
|
|
88
|
+
smoothstep(0.03, 0.16, contrast);
|
|
89
|
+
float blemishMask = clamp(candidate * 0.72, 0.0, 1.0) * skinMask * blemishReduction;
|
|
90
|
+
|
|
91
|
+
vec3 chromaReduced = vec3(
|
|
92
|
+
mix(current.r, min(current.r, localAverage.r * 1.04), blemishMask),
|
|
93
|
+
mix(current.g, max(current.g, localAverage.g * 0.98), 0.35 * blemishMask),
|
|
94
|
+
mix(current.b, max(current.b, localAverage.b * 0.98), 0.35 * blemishMask)
|
|
95
|
+
);
|
|
96
|
+
vec3 texture = source - localAverage;
|
|
97
|
+
vec3 repaired = clamp(skinBase + texture * detailPreservation * 0.18, 0.0, 1.0);
|
|
98
|
+
|
|
99
|
+
return mix(chromaReduced, repaired, min(blemishMask * 1.15, 1.0));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
void main() {
|
|
103
|
+
if (vUv.x < clipMinX || vUv.x > clipMaxX) discard;
|
|
104
|
+
|
|
105
|
+
vec3 original = sampleCamera(vUv);
|
|
106
|
+
vec3 masks = readRetouchMask(vUv);
|
|
107
|
+
float faceAlpha = max(max(masks.x, masks.y), masks.z);
|
|
108
|
+
|
|
109
|
+
if (previewMask > 0.5) {
|
|
110
|
+
float sharpPreview = 1.0 - step(0.001, retouchAmount + blurRadius);
|
|
111
|
+
float retouchPreview = mix(masks.x, masks.z, sharpPreview);
|
|
112
|
+
float protectedPreview = mix(masks.y, step(0.08, masks.y), sharpPreview);
|
|
113
|
+
vec3 facePreview = vec3(retouchPreview, 0.08, 0.08);
|
|
114
|
+
vec3 featurePreview = vec3(0.05, protectedPreview, 0.1);
|
|
115
|
+
vec3 maskPreview = max(facePreview, featurePreview);
|
|
116
|
+
vec3 debugColor = mix(original * 0.18, maskPreview, max(retouchPreview, protectedPreview));
|
|
117
|
+
gl_FragColor = vec4(debugColor, faceAlpha);
|
|
118
|
+
#include <colorspace_fragment>
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
float effectiveBlurRadius = min(blurRadius, 12.0);
|
|
123
|
+
vec3 smallBlur = maskedBlurCamera(vUv, max(0.0, effectiveBlurRadius * 0.45));
|
|
124
|
+
vec3 largeBlur = maskedBlurCamera(vUv, max(0.0, effectiveBlurRadius));
|
|
125
|
+
vec3 detail = original - smallBlur;
|
|
126
|
+
float detailAmount = mix(detailPreservation, 0.9, masks.y);
|
|
127
|
+
vec3 smoothed = clamp(largeBlur + detail * detailAmount, 0.0, 1.0);
|
|
128
|
+
vec3 color = mix(original, smoothed, min(retouchAmount, 0.72) * masks.x);
|
|
129
|
+
vec3 blemishAverage = maskedBlurCamera(vUv, max(1.0, blemishRadius));
|
|
130
|
+
color = reduceBlemishes(color, original, blemishAverage, smoothed, masks.x);
|
|
131
|
+
gl_FragColor = vec4(color, faceAlpha);
|
|
132
|
+
#include <colorspace_fragment>
|
|
133
|
+
}
|
|
134
|
+
`,pt=({retouchMask:e,retouchAmount:t,blurRadius:o,detailPreservation:r=.62,blemishReduction:n=.35,blemishRadius:a=3,previewMask:s,protectLandmarks:l,clipMinX:u=0,clipMaxX:c=1,renderOrder:g=Y.FACE_RETOUCH_RENDER_ORDER})=>{const{camera:h,size:S}=oe.useThree(),b=we.useXRCameraTexture(),m=_.useMemo(()=>({cameraTexture:{value:null},retouchMaskTexture:{value:null},texelSize:{value:new f.Vector2(1/1280,1/720)},retouchAmount:{value:0},blurRadius:{value:0},detailPreservation:{value:0},blemishReduction:{value:0},blemishRadius:{value:0},previewMask:{value:0},protectLandmarks:{value:1},clipMinX:{value:0},clipMaxX:{value:1}}),[]),y=_.useMemo(()=>{if(!h.isPerspectiveCamera)return[10,10];const k=h,X=(k.position.z||5)- -1,Te=f.MathUtils.degToRad(k.fov),ae=2*Math.tan(Te/2)*X;return[ae*(S.width/S.height),ae]},[h,S]);return oe.useFrame(()=>{m.cameraTexture.value=b??null,m.retouchMaskTexture.value=e,m.texelSize.value.set(1/Math.max(S.width,1),1/Math.max(S.height,1)),m.retouchAmount.value=t,m.blurRadius.value=o,m.detailPreservation.value=r,m.blemishReduction.value=n,m.blemishRadius.value=a,m.previewMask.value=s?1:0,m.protectLandmarks.value=l?1:0,m.clipMinX.value=u,m.clipMaxX.value=c}),b?M.jsx("group",{position:[0,0,-1],children:M.jsxs("mesh",{renderOrder:g,children:[M.jsx("planeGeometry",{args:y}),M.jsx("shaderMaterial",{uniforms:m,vertexShader:ut,fragmentShader:mt,...ct})]})}):null},dt=e=>{const t=document.createElement("canvas");t.width=e,t.height=e;const o=t.getContext("2d",{willReadFrequently:!1});if(!o)throw new Error("Unable to create face retouch mask context");const r=new f.CanvasTexture(t);return r.colorSpace=f.NoColorSpace,r.minFilter=f.LinearFilter,r.magFilter=f.LinearFilter,r.generateMipmaps=!1,r.needsUpdate=!0,{canvas:t,context:o,texture:r}},ht=(e,t=re.FACE_MASK_SIZE,o={},r=0)=>{const n=_.useMemo(()=>dt(t),[t]);return _.useEffect(()=>{let a=0;const s=()=>{var u,c;a=requestAnimationFrame(s);const l=(c=(u=e==null?void 0:e.detectionResults)==null?void 0:u.faceLandmarks)==null?void 0:c[r];re.drawFaceRetouchMask(n.context,l,t,o),n.texture.needsUpdate=!0};return s(),()=>{cancelAnimationFrame(a)}},[r,e,n.context,n.texture,o,t]),_.useEffect(()=>()=>{n.texture.dispose()},[n.texture]),{canvas:n.canvas,texture:n.texture}},St=[{key:"skinSmoothing",label:"Skin smoothing",type:"number",min:0,max:1,step:.01},{key:"skinRealism",label:"Skin realism",type:"number",min:0,max:1,step:.01},{key:"blemishReduction",label:"Blemish reduction",type:"number",min:0,max:1,step:.01},{key:"previewMask",label:"Preview mask",type:"boolean"}],A={skinSmoothing:.55,skinRealism:.62,blemishReduction:.35,previewMask:!1},L={blurRadius:8,blemishRadius:3,protectLandmarks:!0,foreheadCoverage:!0},G=(e,t)=>{const o=Number(e);return Number.isFinite(o)?Math.min(1,Math.max(0,o)):t},ee=(e={})=>({skinSmoothing:G(e.skinSmoothing,A.skinSmoothing),skinRealism:G(e.skinRealism,A.skinRealism),blemishReduction:G(e.blemishReduction,A.blemishReduction),previewMask:typeof e.previewMask=="boolean"?e.previewMask:A.previewMask}),gt=(e,t)=>ee({...e,...t}),Et=({faceIndex:e,numFaces:t,skinSmoothing:o,skinRealism:r,blemishReduction:n,previewMask:a,clipMinX:s=0,clipMaxX:l=1,renderOrder:u})=>{const c=Y.resolveFaceIndex(e),g=Y.resolveNumFaces(c,t),h=ee({skinSmoothing:o,skinRealism:r,blemishReduction:n,previewMask:a}),S=_.useMemo(()=>({numFaces:g}),[g]),{node:b}=Le.useXRModel(Ce.XRModel.FACE_TRACKER,S),m=_.useMemo(()=>({foreheadCoverage:L.foreheadCoverage}),[]),y=ht(b,void 0,m,c);return M.jsx(pt,{retouchMask:y.texture,retouchAmount:h.skinSmoothing,blurRadius:L.blurRadius,detailPreservation:h.skinRealism,blemishReduction:h.blemishReduction,blemishRadius:L.blemishRadius,previewMask:h.previewMask,protectLandmarks:L.protectLandmarks,clipMinX:s,clipMaxX:l,renderOrder:u})};exports.DEFAULT_FACE_MIRROR_SETTINGS=Fe;exports.DEFAULT_FACE_SWAP_SETTINGS=F;exports.DEFAULT_IRIS_EFFECT_SETTINGS=ce;exports.DEFAULT_LIP_EFFECT_SETTINGS=fe;exports.FACE_MIRROR_SETTINGS_FIELDS=it;exports.FACE_MIRROR_VARIANTS=H;exports.FACE_MIRROR_VARIANT_LABELS=Ae;exports.FACE_RETOUCH_DEFAULT_CONTROLS=A;exports.FACE_RETOUCH_SETTINGS_FIELDS=St;exports.FACE_SWAP_PAINTED_FEATURE_SOFTNESS=ye;exports.FACE_SWAP_PRESETS=N;exports.FACE_SWAP_PRESET_KEYS=Z;exports.FACE_SWAP_SETTINGS_FIELDS=rt;exports.FACE_SWAP_SETTINGS_RANGES=R;exports.FACE_SWAP_SOURCE_KINDS=et;exports.FaceRetouch=Et;exports.IRIS_EFFECT_EYES=ie;exports.IRIS_EFFECT_MODES=le;exports.IRIS_EFFECT_SETTINGS_FIELDS=Ke;exports.LIP_EFFECT_COLOR_MODES=ge;exports.LIP_EFFECT_GRADIENT_DIRECTIONS=Ee;exports.LIP_EFFECT_PRESETS=q;exports.LIP_EFFECT_PRESET_KEYS=V;exports.LIP_EFFECT_SETTINGS_FIELDS=Je;exports.MAKEUP_AUTO_SHADE_REGIONS=ue;exports.MAKEUP_FINISHES=O;exports.MAKEUP_FINISH_DEFAULTS=D;exports.MAKEUP_FINISH_KEYS=me;exports.MAKEUP_REGIONS=je;exports.MAKEUP_SHADES=T;exports.MAKEUP_SHADE_NAMES=pe;exports.MAKEUP_SIDES=ze;exports.MAKEUP_SPARKLE_SIZE_RANGE=P;exports.alphaMapOptions=He;exports.blendModeOptions=Xe;exports.createLipTextureTransform=Qe;exports.defaultFaceSwapPreset=ve;exports.faceMirrorTransferSettings=lt;exports.isFaceMirrorVariant=st;exports.isFaceSwapPresetKey=J;exports.isLipEffectPresetKey=$;exports.isMakeupShadeName=z;exports.makeupNameLabel=W;exports.makeupShadeOptions=Se;exports.maskTextureSourceOptions=Be;exports.materialTypeOptions=Oe;exports.patchFaceMirrorSettings=nt;exports.patchFaceRetouchControls=gt;exports.patchFaceSwapSettings=at;exports.patchIrisEffectSettings=Ye;exports.patchLipEffectSettings=Ze;exports.resolveFaceMirrorSettings=Re;exports.resolveFaceRetouchControls=ee;exports.resolveFaceSwapSettings=j;exports.resolveIrisEffectSettings=Ge;exports.resolveLipEffectSettings=be;exports.resolveMakeupShade=de;exports.resolveMakeupShadePair=he;exports.shaderPresetOptions=De;exports.sideOptions=Ue;exports.supportsAutoMakeupShade=U;exports.textureMapOptions=Ne;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("react"),e=require("three"),s=require("./canonicalFace-C83I225R.cjs"),F=()=>({offsets:new Float32Array(s.CANONICAL_FACE_LANDMARK_COUNT*3),active:!1}),r=a.createContext(null),o=()=>a.useContext(r),u=-.5,t=-2,A=n=>{n.traverse(c=>{c.isGroup||(c.renderOrder=t)})},R={blending:e.CustomBlending,blendSrc:e.SrcAlphaFactor,blendDst:e.OneMinusSrcAlphaFactor,blendSrcAlpha:e.OneFactor,blendDstAlpha:e.OneMinusSrcAlphaFactor};exports.FACE_SURFACE_FRAME_PRIORITY=u;exports.FACE_SURFACE_RENDER_ORDER=t;exports.FaceSurfaceContext=r;exports.createFaceSurfaceState=F;exports.faceSurfaceBlending=R;exports.markFaceSurface=A;exports.useFaceSurface=o;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useContext as t, createContext as c } from "react";
|
|
2
|
+
import { OneMinusSrcAlphaFactor as a, OneFactor as n, SrcAlphaFactor as s, CustomBlending as o } from "three";
|
|
3
|
+
import { C as l } from "./canonicalFace-BHwyCx1c.js";
|
|
4
|
+
const S = () => ({
|
|
5
|
+
offsets: new Float32Array(l * 3),
|
|
6
|
+
active: !1
|
|
7
|
+
}), A = c(null), i = () => t(A), R = -0.5, F = -2, d = (r) => {
|
|
8
|
+
r.traverse((e) => {
|
|
9
|
+
e.isGroup || (e.renderOrder = F);
|
|
10
|
+
});
|
|
11
|
+
}, m = {
|
|
12
|
+
blending: o,
|
|
13
|
+
blendSrc: s,
|
|
14
|
+
blendDst: a,
|
|
15
|
+
// Alpha as three's normal blending: the canvas stays opaque under a soft edge.
|
|
16
|
+
blendSrcAlpha: n,
|
|
17
|
+
blendDstAlpha: a
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
R as F,
|
|
21
|
+
A as a,
|
|
22
|
+
F as b,
|
|
23
|
+
S as c,
|
|
24
|
+
m as f,
|
|
25
|
+
d as m,
|
|
26
|
+
i as u
|
|
27
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "three";
|
|
2
|
+
function M(t) {
|
|
3
|
+
const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), e = t.clone();
|
|
4
|
+
return i(t, e, function(o, n) {
|
|
5
|
+
s.set(n, o), r.set(o, n);
|
|
6
|
+
}), e.traverse(function(o) {
|
|
7
|
+
if (!o.isSkinnedMesh) return;
|
|
8
|
+
const n = o, c = s.get(o), l = c.skeleton.bones;
|
|
9
|
+
n.skeleton = c.skeleton.clone(), n.bindMatrix.copy(c.bindMatrix), n.skeleton.bones = l.map(function(u) {
|
|
10
|
+
return r.get(u);
|
|
11
|
+
}), n.bind(n.skeleton, n.bindMatrix);
|
|
12
|
+
}), e;
|
|
13
|
+
}
|
|
14
|
+
function i(t, s, r) {
|
|
15
|
+
r(t, s);
|
|
16
|
+
for (let e = 0; e < t.children.length; e++)
|
|
17
|
+
i(t.children[e], s.children[e], r);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
M as c
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("three");function M(t){const s=new Map,r=new Map,e=t.clone();return i(t,e,function(o,n){s.set(n,o),r.set(o,n)}),e.traverse(function(o){if(!o.isSkinnedMesh)return;const n=o,c=s.get(o),l=c.skeleton.bones;n.skeleton=c.skeleton.clone(),n.bindMatrix.copy(c.bindMatrix),n.skeleton.bones=l.map(function(u){return r.get(u)}),n.bind(n.skeleton,n.bindMatrix)}),e}function i(t,s,r){r(t,s);for(let e=0;e<t.children.length;e++)i(t.children[e],s.children[e],r)}exports.clone=M;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const P=require("react/jsx-runtime"),C=require("react"),Me=require("@react-three/fiber"),ve=require("./context-hA0Rb2Xa.cjs"),Te=require("three");function xe(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Ce=xe(Te),Oe=({children:t,depth:e=0})=>{const{camera:n,size:r}=Me.useThree(),a=C.useMemo(()=>{if(!n.isPerspectiveCamera)return{width:10,height:10};const i=n,l=Math.abs(i.position.z-e),f=i.fov*Math.PI/180,s=2*Math.tan(f/2)*l;return{width:s*(r.width/r.height),height:s}},[n,r,e]);return P.jsx(ve.ScreenSpaceContext.Provider,{value:a,children:P.jsx("group",{position:[0,0,e],children:t})})},de=C.forwardRef(({texture:t,name:e,overlay:n,opacity:r,position:a,rotation:i,scale:l,visible:f,renderOrder:s},h)=>P.jsxs("mesh",{ref:h,name:e,position:a,rotation:i,scale:l,visible:f,renderOrder:s,children:[P.jsx("planeGeometry",{args:[1,1]}),P.jsx("meshBasicMaterial",{map:t,transparent:!0,opacity:r,depthTest:!n,depthWrite:!n})]}));de.displayName="TextLabelMesh";const Fe={color:"#ffffff",strokeWidth:0,strokeOpacity:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowOpacity:1,fontWeight:"bold",fontStyle:"normal",fontFamily:"Arial, sans-serif",fontSize:48,textAlign:"center",verticalAlign:"center",minFontSize:12,letterSpacing:0,lineSpacing:.3,bgColor:"rgba(20,40,110,0.88)",bgFillMode:"solid",bgOpacity:1,bgFit:"full",bgTextureFit:"cover",bgTextureFlipX:!1,bgTextureFlipY:!1,borderWidth:0,borderRadius:24,padding:32,aspect:2.5,resolution:512,opacity:1,underline:!1,strikethrough:!1,bendPreset:"arc",bendStrength:0},ue=t=>{C.useEffect(()=>()=>{t==null||t.dispose()},[t])};function Le(t,e,n){return n==="left"?e:n==="right"?t-e:t/2}function We(t,e,n,r,a){return a==="top"?e+n/2:a==="bottom"?t-e-r+n/2:t/2-(r-n)/2}function Ye(t,e,n,r){return r==="full"||n==="left"?0:n==="right"?t-e:(t-e)/2}function be(t,e,n,r){return`${t} ${e} ${n}px ${r}`}function B(t,e){const n=Math.max(0,Math.min(e,1));return t*n*.08}function me(t,e){const n=Math.max(0,Math.min(e,1));return t*(1.2+n*.6)}function Se(t,e){"letterSpacing"in t&&(t.letterSpacing=`${e}px`)}function ye(t){"letterSpacing"in t&&(t.letterSpacing="0px")}function X(t,e,n){Se(t,n);const r=t.measureText(e).width;return ye(t),r}function J(t,e,n,r){return Math.max(1,Math.floor((t-e*2)/me(n,r)))}function ke(t,e,n,r,a){return e.length<=r&&e.every(i=>X(t,i,a)<=n)}function K(t,e,n,r,a,i,l,f){t.font=be(r,a,i,l);const s=e.split(" "),h=[];let o="";for(const d of s){const c=o?`${o} ${d}`:d;X(t,c,f)>n&&o?(h.push(o),o=d):o=c}return o&&h.push(o),h}function fe(t,e,n,r,a,i,l,f){const h=e.split(/\r?\n/).flatMap(o=>o.trim().length===0?[""]:K(t,o,n,r,a,i,l,f));return h.length>0?h:[e]}function we(t,e,n,r,a){const i=r?"...":"";let l=e.trimEnd();for(;l.length>0&&X(t,`${l}${i}`,a)>n;)l=l.slice(0,-1).trimEnd();return`${l}${i}`}function Q(t,e,n,r,a){return e.map((i,l)=>{if(X(t,i,a)<=n)return i;const f=l===e.length-1;return we(t,i,n,r==="ellipsis"&&f,a)})}function he(t,e,n,r,a,i){if(e.length<=n)return Q(t,e,r,a?"ellipsis":"clip",i);const l=e.slice(0,n),f=l[n-1];return l[n-1]=we(t,f,r,a,i),Q(t,l,r,a?"ellipsis":"clip",i)}function Pe(t){const{ctx:e,text:n,explicitLines:r,maxWidth:a,maxHeight:i,padding:l,fontStyle:f,fontWeight:s,fontSize:h,fontFamily:o,letterSpacing:d,lineSpacing:c,overflow:u,resizeToFit:S,minFontSize:g}=t;let b=h,m=B(b,d),y=r??fe(e,n,a,f,s,b,o,m),v=J(i,l,b,c);const O=S===!0||u==="shrink";for(;O&&!ke(e,y,a,v,m)&&b>g&&(b=Math.max(g,b-4),m=B(b,d),y=r??fe(e,n,a,f,s,b,o,m),v=J(i,l,b,c),b!==g););return u==="ellipsis"?y=he(e,y,v,a,!0,m):u==="clamp"||u==="shrink"?y=he(e,y,v,a,!1,m):u!=="clip"&&(y=Q(e,y,a,void 0,m)),{fontSize:b,lines:y}}function He(t){const{ctx:e,text:n,maxWidth:r,maxHeight:a,padding:i,fontStyle:l,fontWeight:f,fontSize:s,fontFamily:h,letterSpacing:o,lineSpacing:d}=t;let c=s,u=K(e,n,r,l,f,c,h,B(c,o));const S=J(a,i,c,d);return u.length>S&&(c=Math.max(12,Math.round(c*.75)),u=K(e,n,r,l,f,c,h,B(c,o))),{fontSize:c,lines:u}}function V(t,e){return typeof OffscreenCanvas<"u"?new OffscreenCanvas(t,e):(()=>{const n=document.createElement("canvas");return n.width=t,n.height=e,n})()}function Xe(t,e){const n=e.width-e.padding*2,a=Array.isArray(e.lines)||e.text.includes(`
|
|
2
|
+
`)||e.overflow!==void 0||e.resizeToFit!==void 0?Pe({ctx:t,text:e.text,explicitLines:e.lines,maxWidth:n,maxHeight:e.height,padding:e.padding,fontStyle:e.fontStyle,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFamily:e.fontFamily,overflow:e.overflow,resizeToFit:e.resizeToFit,minFontSize:e.minFontSize,letterSpacing:e.letterSpacing,lineSpacing:e.lineSpacing}):He({ctx:t,text:e.text,maxWidth:n,maxHeight:e.height,padding:e.padding,fontStyle:e.fontStyle,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFamily:e.fontFamily,letterSpacing:e.letterSpacing,lineSpacing:e.lineSpacing}),i=a.fontSize,l=a.lines;t.font=be(e.fontStyle,e.fontWeight,i,e.fontFamily);const f=B(i,e.letterSpacing),s=me(i,e.lineSpacing),h=Math.max(i,i+(l.length-1)*s),o=We(e.height,e.padding,i,h,e.verticalAlign),d=l.map(c=>X(t,c,f));return{fontSize:i,resolvedLines:l,letterSpacingPx:f,lineHeight:s,startY:o,textBlockWidth:Math.min(e.width,Math.max(0,Math.max(...d,0))+e.padding*2),textBlockHeight:Math.min(e.height,h+e.padding*2),textX:Le(e.width,e.padding,e.textAlign)}}function Ae(t,e,n,r,a,i){t.beginPath(),t.moveTo(e+i,n),t.lineTo(e+r-i,n),t.quadraticCurveTo(e+r,n,e+r,n+i),t.lineTo(e+r,n+a-i),t.quadraticCurveTo(e+r,n+a,e+r-i,n+a),t.lineTo(e+i,n+a),t.quadraticCurveTo(e,n+a,e,n+a-i),t.lineTo(e,n+i),t.quadraticCurveTo(e,n,e+i,n),t.closePath()}function ce(t,e,n){return typeof t!="number"||Number.isNaN(t)||t<=0?e:Math.min(t,n)}function pe(t,e){const n=Ye(e.canvasWidth,e.panelWidth,e.textAlign,e.bgFit),r=(e.canvasHeight-e.panelHeight)/2,a=Math.min(e.borderRadius,Math.min(e.panelWidth,e.panelHeight)/2);Ae(t,n,r,e.panelWidth,e.panelHeight,a),ze(t,{panelX:n,panelY:r,panelWidth:e.panelWidth,panelHeight:e.panelHeight,bgColor:e.bgColor,bgFillMode:e.bgFillMode,bgOpacity:e.bgOpacity,bgGradientStops:e.bgGradientStops,bgTextureImage:e.bgTextureImage,bgTextureFit:e.bgTextureFit,bgTextureFlipX:e.bgTextureFlipX,bgTextureFlipY:e.bgTextureFlipY}),e.borderColor&&e.borderWidth>0&&(t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,t.stroke())}function ze(t,e){if(t.save(),t.globalAlpha=Math.max(0,Math.min(e.bgOpacity,1)),e.bgFillMode==="gradient"&&e.bgGradientStops&&e.bgGradientStops.length>1){const n=t.createLinearGradient(e.panelX,e.panelY,e.panelX+e.panelWidth,e.panelY+e.panelHeight);[...e.bgGradientStops].sort((r,a)=>r.position-a.position).forEach(r=>n.addColorStop(Math.max(0,Math.min(r.position,1)),r.color)),t.fillStyle=n,t.fill(),t.restore();return}if(e.bgTextureImage){t.clip(),Be(t,{image:e.bgTextureImage,x:e.panelX,y:e.panelY,width:e.panelWidth,height:e.panelHeight,fit:e.bgTextureFit,flipX:e.bgTextureFlipX,flipY:e.bgTextureFlipY}),t.restore();return}t.fillStyle=e.bgColor,t.fill(),t.restore()}function Be(t,e){const{image:n,x:r,y:a,width:i,height:l,fit:f,flipX:s,flipY:h}=e,o="naturalWidth"in n?n.naturalWidth:"videoWidth"in n?n.videoWidth:n.width,d="naturalHeight"in n?n.naturalHeight:"videoHeight"in n?n.videoHeight:n.height;let c=i,u=l,S=r,g=a;if(f!=="stretch"&&o>0&&d>0){const b=f==="cover"?Math.max(i/o,l/d):Math.min(i/o,l/d);c=o*b,u=d*b,S=r+(i-c)/2,g=a+(l-u)/2}t.save(),(s||h)&&(t.translate(s?r+i:0,h?a+l:0),t.scale(s?-1:1,h?-1:1),S=s?-(S-r)-c+r:S,g=h?-(g-a)-u+a:g),t.drawImage(n,S,g,c,u),t.restore()}function Re(t,e,n,r,a,i){const l=a/72,f=Math.abs(l),s=1-Math.min(1,Math.abs(e)),h=Math.min(1,Math.abs(e)),o=r<=1?.5:n/(r-1),d=Math.sin(o*Math.PI*2-Math.PI/2),c=Math.sin(o*Math.PI*2.7-Math.PI/2)*(.65+o*.35),u=a*e*e,S=2*a*e/i,g={xOffset:0,yOffset:0,rotation:0,scaleX:1,scaleY:1};switch(t){case"arc":return{...g,yOffset:u,rotation:Math.atan(S)};case"arc-lower":return{...g,yOffset:u*.55,scaleY:Math.max(.2,1+l*e*e*.45)};case"arc-upper":return{...g,yOffset:-u*.55,scaleY:Math.max(.2,1-l*e*e*.45)};case"arch":return{...g,yOffset:u};case"bulge":return{...g,scaleY:Math.max(.2,1+l*s*.75)};case"shell-lower":return{...g,yOffset:a*.45*o*s,scaleY:Math.max(.2,1+l*o*s)};case"shell-upper":return{...g,yOffset:-a*.45*(1-o)*s,scaleY:Math.max(.2,1+l*(1-o)*s)};case"flag":return{...g,yOffset:a*.65*c,rotation:Math.atan(a/Math.max(i,1)*Math.cos(o*Math.PI*2.7)*1.6)};case"wave":return{...g,yOffset:a*.6*d,rotation:Math.atan(a/Math.max(i,1)*Math.cos(o*Math.PI*2)*1.4)};case"fish":return{...g,scaleX:Math.max(.25,1-f*h*.55),scaleY:Math.max(.2,1+l*s)};case"rise":return{...g,yOffset:a*e};case"fisheye":return{...g,yOffset:a*.18*e*s,scaleX:Math.max(.25,1+l*s*.7),scaleY:Math.max(.2,1+l*s*.7)};case"inflate":return{...g,scaleX:Math.max(.25,1+l*s*.6),scaleY:Math.max(.2,1+l*s*.6)};case"squeeze":return{...g,scaleY:Math.max(.2,1-l*s*.8)};case"twist":return{...g,yOffset:a*e,rotation:l*e*.45,scaleY:Math.max(.2,1+l*e*.25)};default:return g}}function H(t,e,n,r,a,i,l="arc",f=0){if(f!==0){Ie(t,e,n,r,a,i,l,f);return}Se(t,a),i==="fill"?t.fillText(e,n,r):t.strokeText(e,n,r),ye(t)}function Ie(t,e,n,r,a,i,l,f){const s=Array.from(e);if(s.length===0)return;const h=s.map(m=>t.measureText(m).width),o=h.reduce((m,y)=>m+y,0)+a*Math.max(0,s.length-1),d=t.textAlign,c=d==="right"?n-o:d==="center"?n-o/2:n,S=Math.max(-100,Math.min(f,100))/100*72,g=Math.max(o/2,1);let b=c;for(let m=0;m<s.length;m++){const y=s[m],v=h[m],O=b+v/2,F=(O-c-o/2)/g,M=Re(l,F,m,s.length,S,g);t.save(),t.translate(O+M.xOffset,r+M.yOffset),t.rotate(M.rotation),t.scale(M.scaleX,M.scaleY),t.textAlign="center",i==="fill"?t.fillText(y,0,0):t.strokeText(y,0,0),t.restore(),b+=v+a}}function ge(t,e,n,r,a,i,l,f,s){const h=X(t,e,f),o=a==="center"?n-h/2:a==="right"?n-h:n,d=s==="underline"?l*.42:-l*.08,c=r+d;t.save(),t.strokeStyle=i,t.lineWidth=Math.max(2,l*.06),t.lineCap="round",t.beginPath(),t.moveTo(o,c),t.lineTo(o+h,c),t.stroke(),t.restore()}function Ee(t,e){for(let n=0;n<e.lines.length;n++){const r=e.lines[n],a=e.startY+n*e.lineHeight;for(const i of e.shadowLayers)t.save(),t.shadowColor=i.color,t.shadowBlur=i.blur,t.shadowOffsetX=i.offsetX??0,t.shadowOffsetY=i.offsetY??0,t.globalAlpha=i.opacity??1,t.fillStyle=e.color,H(t,r,e.textX,a,e.letterSpacingPx,"fill",e.bendPreset,e.bendStrength),t.restore();for(const i of e.strokeLayers)t.save(),t.lineJoin="round",t.miterLimit=2,t.lineWidth=i.width,t.strokeStyle=i.color,t.globalAlpha=i.opacity??1,H(t,r,e.textX,a,e.letterSpacingPx,"stroke",e.bendPreset,e.bendStrength),t.restore();t.save(),t.fillStyle=e.color,t.globalAlpha=1,H(t,r,e.textX,a,e.letterSpacingPx,"fill",e.bendPreset,e.bendStrength),t.restore(),e.underline&&ge(t,r,e.textX,a,e.textAlign,e.color,e.fontSize,e.letterSpacingPx,"underline"),e.strikethrough&&ge(t,r,e.textX,a,e.textAlign,e.color,e.fontSize,e.letterSpacingPx,"strikethrough")}}function $e(t,e){const n=Math.max(0,Math.min(e.intensity,1));if(n<=0)return;const r=Math.max(0,Math.min(e.range,1)),a=r*72,i=Math.max(-.5,Math.min(e.horizontalAngle,.5))*80,l=Math.max(-.5,Math.min(e.verticalAngle,.5))*80;for(let f=0;f<e.lines.length;f++){const s=e.startY+f*e.lineHeight;t.save(),t.globalAlpha=n,t.shadowColor=e.color,t.shadowBlur=a,t.shadowOffsetX=i,t.shadowOffsetY=l,e.style==="contoured"?(t.lineJoin="round",t.miterLimit=2,t.lineWidth=Math.max(2,r*42),t.strokeStyle=e.color,H(t,e.lines[f],e.textX,s,e.letterSpacingPx,"stroke",e.bendPreset,e.bendStrength)):(t.fillStyle=e.color,H(t,e.lines[f],e.textX,s,e.letterSpacingPx,"fill",e.bendPreset,e.bendStrength)),t.restore()}}function je(t,e){const n=V(e.width,e.height),r=n.getContext("2d");r.clearRect(0,0,e.width,e.height),r.font=e.font,r.fillStyle="#ffffff",r.textAlign=e.textAlign,r.textBaseline="middle";for(let l=0;l<e.lines.length;l++)H(r,e.lines[l],e.textX,e.startY+l*e.lineHeight,e.letterSpacingPx,"fill",e.bendPreset,e.bendStrength);const a=V(e.width,e.height),i=a.getContext("2d");i.clearRect(0,0,e.width,e.height),i.save(),i.globalAlpha=e.opacity,i.filter=e.blur>0?`blur(${e.blur}px)`:"none",i.drawImage(n,e.offsetX,e.offsetY),i.restore(),i.globalCompositeOperation="destination-in",i.drawImage(n,0,0),i.globalCompositeOperation="source-in",i.globalAlpha=e.opacity,i.fillStyle=e.color,i.fillRect(0,0,e.width,e.height),t.drawImage(a,0,0)}function De(t){const{width:e,height:n,color:r,strokeLayers:a,strokeColor:i,strokeWidth:l,strokeOpacity:f,shadowLayers:s,innerShadow:h,glow:o,shadowColor:d,shadowBlur:c,shadowOffsetX:u,shadowOffsetY:S,shadowOpacity:g,textAlign:b,bgFillMode:m,bgOpacity:y,bgFit:v,bgAutoSize:O,bgWidth:F,bgHeight:M,bgGradientStops:L,bgTextureImage:R,bgTextureFit:I,bgTextureFlipX:E,bgTextureFlipY:$,underline:j,strikethrough:D,bendPreset:W,bendStrength:Y}=t;let{fontSize:A,bgColor:p}=t;const G=[...a??[],...i&&l>0?[{color:i,width:l,opacity:f}]:[]].filter(x=>x.width>0),q=[...s??[],...d&&(c>0||u!==0||S!==0)?[{color:d,blur:c,offsetX:u,offsetY:S,opacity:g}]:[]].filter(x=>x.blur>0||(x.offsetX??0)!==0||(x.offsetY??0)!==0);let k;const z=V(e,n),T=z.getContext("2d");T.clearRect(0,0,e,n),T.fillStyle=r,T.textAlign=b,T.textBaseline="middle";const w=Xe(T,t);if(A=w.fontSize,p!=="transparent"){const x=O===!0,N=ce(x?void 0:F,v==="text"||x?w.textBlockWidth:e,e),_=ce(x?void 0:M,v==="text"||x?w.textBlockHeight:n,n);pe(T,{canvasWidth:e,canvasHeight:n,textAlign:b,bgFit:v,panelWidth:N,panelHeight:_,bgColor:p,bgFillMode:m,bgOpacity:y,bgGradientStops:L,bgTextureImage:R,bgTextureFit:I,bgTextureFlipX:E,bgTextureFlipY:$,borderColor:t.borderColor,borderWidth:t.borderWidth,borderRadius:t.borderRadius})}return o&&$e(T,{lines:w.resolvedLines,textX:w.textX,startY:w.startY,lineHeight:w.lineHeight,letterSpacingPx:w.letterSpacingPx,bendPreset:W,bendStrength:Y,color:o.color,style:o.style,intensity:o.intensity??.5,range:o.range??.5,horizontalAngle:o.horizontalAngle??0,verticalAngle:o.verticalAngle??0}),Ee(T,{lines:w.resolvedLines,textX:w.textX,startY:w.startY,lineHeight:w.lineHeight,textAlign:b,color:r,fontSize:A,letterSpacingPx:w.letterSpacingPx,bendPreset:W,bendStrength:Y,shadowLayers:q,strokeLayers:G,underline:j,strikethrough:D}),h&&je(T,{width:e,height:n,font:T.font,lines:w.resolvedLines,textX:w.textX,startY:w.startY,lineHeight:w.lineHeight,letterSpacingPx:w.letterSpacingPx,bendPreset:W,bendStrength:Y,textAlign:b,color:h.color,opacity:h.opacity??1,blur:h.blur,offsetX:h.offsetX??0,offsetY:h.offsetY??0}),k=new Ce.CanvasTexture(z),k.needsUpdate=!0,k}function Ge(t,e){const{lines:n,color:r,strokeLayers:a,outlineEnabled:i,strokeColor:l,strokeWidth:f,strokeOpacity:s,shadowLayers:h,shadowEnabled:o,innerShadow:d,glow:c,shadowColor:u,shadowBlur:S,shadowOffsetX:g,shadowOffsetY:b,shadowOpacity:m,fontWeight:y,fontStyle:v,fontFamily:O,fontSize:F,textAlign:M,verticalAlign:L,overflow:R,resizeToFit:I,minFontSize:E,letterSpacing:$,lineSpacing:j,bgFillMode:D,bgOpacity:W,bgFit:Y,bgAutoSize:A,bgWidth:p,bgHeight:G,bgGradientStops:q,bgTextureFit:k,bgTextureFlipX:z,bgTextureFlipY:T,borderColor:w,borderWidth:x,borderRadius:N,padding:_,aspect:Z,resolution:U,underline:ee,strikethrough:te,bendPreset:ne,bendStrength:re}=t,ie=C.useMemo(()=>i===!1?[]:a,[i,a]),ae=C.useMemo(()=>o===!1?[]:h,[o,h]),le=void 0,oe=C.useMemo(()=>({text:e.text,lines:n,color:r,strokeLayers:ie,strokeColor:i===!1?void 0:l,strokeWidth:i===!1?0:f,strokeOpacity:s,shadowLayers:ae,innerShadow:d,glow:c,shadowColor:o===!1?void 0:u,shadowBlur:o===!1?0:S,shadowOffsetX:o===!1?0:g,shadowOffsetY:o===!1?0:b,shadowOpacity:m,fontWeight:y,fontStyle:v,fontFamily:O,fontSize:F,textAlign:M,verticalAlign:L,overflow:R,resizeToFit:I,minFontSize:E,letterSpacing:$,lineSpacing:j,bgColor:e.bgColor,bgFillMode:D,bgOpacity:W,bgFit:Y,bgAutoSize:A,bgWidth:p,bgHeight:G,bgGradientStops:q,bgTextureImage:le,bgTextureFit:k,bgTextureFlipX:z,bgTextureFlipY:T,borderColor:w,borderWidth:x,borderRadius:N,padding:_,height:U,width:Math.round(U*Math.max(Z,.1)),underline:ee,strikethrough:te,bendPreset:ne,bendStrength:re}),[e.text,e.bgColor,n,r,ie,i,l,f,s,ae,d,c,o,u,S,g,b,m,y,v,O,F,M,L,R,I,E,$,j,D,W,Y,A,p,G,q,le,k,z,T,w,x,N,_,Z,U,ee,te,ne,re]),se=C.useMemo(()=>De(oe),[oe]);return ue(se),se}function qe(t){const e={...Fe,...t},{text:n,bgColor:r,opacity:a,name:i,overlay:l=!0,position:f,rotation:s,scale:h,visible:o,renderOrder:d}=e,[c,u]=C.useState(null),[S,g]=C.useState(null),b=C.useRef(n);b.current!==n&&(b.current=n,c!==null&&u(null));const m=C.useRef(r);m.current!==r&&(m.current=r,S!==null&&g(null));const y=C.useRef(null),F=Ge(e,{text:c??n,bgColor:S??r});return C.useEffect(()=>{const M=y.current;if(M)return M.userData.setText=L=>u(L),M.userData.setBgColor=L=>g(L),()=>{delete M.userData.setText,delete M.userData.setBgColor}},[]),P.jsx(de,{ref:y,name:i,texture:F,overlay:l,opacity:a,position:f,rotation:s,scale:h,visible:o,renderOrder:d})}exports.ScreenSpaceUI=Oe;exports.TextLabel=qe;exports.useOwnedTexture=ue;
|