@vincentt-xr/sdk 2.0.0-alpha.8 → 2.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GROUNDING.md +4643 -170
- package/README.md +1 -0
- package/dist/CanonicalHeadFrame-BHcWyaiK.js +1506 -0
- package/dist/CanonicalHeadFrame-D-_T1OMU.cjs +1 -0
- package/dist/DebuggerUI-7ngnJsBe.js +275 -0
- package/dist/DebuggerUI-CoglgKdO.cjs +1 -0
- package/dist/FaceRetouch-CLoTfrcs.js +1071 -0
- package/dist/FaceRetouch-J1lC1WbS.cjs +134 -0
- package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
- package/dist/FaceSurface-DmP9AEeC.js +27 -0
- package/dist/SegmentationOverlay-D_FWkcyP.cjs +35 -0
- package/dist/SegmentationOverlay-vn5x_knv.js +6237 -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/gltfLoader.d.ts +16 -0
- package/dist/assets/loaders.d.ts +16 -1
- 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/calibration/calibration.d.ts +11 -6
- package/dist/canonicalFace-BHwyCx1c.js +9 -0
- package/dist/canonicalFace-C83I225R.cjs +1 -0
- package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
- package/dist/components/BodyInstruction/index.d.ts +69 -0
- package/dist/components/BodyInstruction/useBodyPose.d.ts +23 -0
- package/dist/components/BodyTracker/index.d.ts +10 -2
- package/dist/components/BodyTrigger/index.d.ts +49 -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/canonical/CanonicalFaceMeshRenderer.d.ts +5 -3
- package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +21 -0
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +9 -0
- package/dist/components/FaceMesh/index.d.ts +1 -1
- package/dist/components/FaceRetouch/Background.d.ts +3 -1
- package/dist/components/FaceRetouch/FaceRetouch.d.ts +5 -0
- package/dist/components/FaceRetouch/renderState.d.ts +19 -0
- 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/FaceWarp3D/FaceWarp3D.d.ts +50 -0
- package/dist/components/FaceWarp3D/index.d.ts +2 -3
- package/dist/components/Faceless/Faceless.d.ts +51 -0
- package/dist/components/Faceless/index.d.ts +2 -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/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/HandRig/ForearmOccluder.d.ts +29 -0
- package/dist/components/HandRig/HandAttachment.d.ts +34 -0
- package/dist/components/HandRig/HandOccluder.d.ts +55 -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 +101 -0
- package/dist/components/HandRig/useArmMask.d.ts +29 -0
- package/dist/components/HandRig/wristSolve.d.ts +69 -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/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 +64 -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/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/LipEffect/LipEffect.d.ts +22 -2
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +62 -10
- package/dist/components/LipEffect/LipEffects.d.ts +5 -2
- package/dist/components/LipEffect/defaults.d.ts +21 -2
- package/dist/components/LipEffect/index.d.ts +1 -1
- package/dist/components/LipEffect/lipShading.d.ts +73 -0
- package/dist/components/LipEffect/settings.d.ts +117 -13
- package/dist/components/LipEffect/shader.d.ts +39 -0
- package/dist/components/LipEffect/types.d.ts +82 -10
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +6 -0
- package/dist/components/LipEffect/uvGuide.d.ts +31 -16
- 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/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/ShoulderOccluder/index.d.ts +43 -0
- package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +24 -0
- package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
- package/dist/components/SpringSwing/index.d.ts +1 -0
- package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/config/index.d.ts +0 -1
- package/dist/context-DTxSQvp4.js +13 -0
- package/dist/context-hA0Rb2Xa.cjs +1 -0
- package/dist/contexts-BH7PdKFS.cjs +1 -0
- package/dist/contexts-jak8-tND.js +667 -0
- package/dist/coordinates/index.d.ts +2 -0
- package/dist/coordinates/side.d.ts +40 -0
- package/dist/debug-ui/default-setting.cjs +2 -2
- package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
- package/dist/debug-ui/hierarchy-panel/index.d.ts +3 -2
- package/dist/debug-ui/index.d.ts +4 -3
- package/dist/debug-ui/media-source/index.d.ts +1 -1
- package/dist/debug-ui/media-source/session.d.ts +30 -2
- package/dist/debug-ui/media-source.cjs +1 -1
- package/dist/debug-ui/media-source.js +1 -1
- package/dist/debug-ui/object-inspector-panel/index.d.ts +3 -2
- package/dist/debug-ui/product-hotspots/index.d.ts +3 -2
- package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +3 -1
- package/dist/debug-ui/scene-editor/inspector-panel.d.ts +3 -1
- package/dist/debug-ui/screen-image-settings/index.d.ts +3 -1
- package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +1 -1
- package/dist/debug-ui/screen-text-settings/types.d.ts +2 -0
- package/dist/debug-ui/settings-panel/index.d.ts +6 -1
- package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +3 -2
- package/dist/debug-ui.cjs +3 -3
- package/dist/debug-ui.js +2250 -2472
- package/dist/entries/all.d.ts +3 -1
- package/dist/entries/core.d.ts +3 -2
- package/dist/entries/face-effects.d.ts +114 -8
- package/dist/entries/instructions.d.ts +48 -0
- package/dist/entries/internal.d.ts +2 -1
- package/dist/entries/low-level.d.ts +28 -1
- package/dist/entries/particles.d.ts +11 -0
- package/dist/entries/tracking.d.ts +37 -2
- 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-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 +2252 -83
- package/dist/face-effects.js +14234 -1231
- package/dist/face-expression/index.d.ts +182 -0
- package/dist/face-info/landmarks.d.ts +17 -3
- package/dist/face-info/types.d.ts +20 -3
- package/dist/gestures/definitions.d.ts +15 -2
- package/dist/gestures/index.d.ts +1 -1
- package/dist/gestures/measures.d.ts +21 -8
- package/dist/getFaceInfo-B1otSDMX.cjs +1 -0
- package/dist/getFaceInfo-Cu4xDWiL.js +62 -0
- package/dist/hand/armFit.d.ts +46 -0
- package/dist/hand/armMask.d.ts +178 -0
- package/dist/hand/handCutout.d.ts +23 -0
- package/dist/hand/handCutoutRegistry.d.ts +7 -0
- package/dist/hand/handGestures.d.ts +524 -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/wrist.d.ts +44 -0
- package/dist/hand/wristFilter.d.ts +44 -0
- package/dist/hooks/selectors.d.ts +8 -0
- package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
- package/dist/hooks/useTrackerContext.d.ts +6 -0
- package/dist/index-B1_TzJaI.js +1104 -0
- package/dist/index-BavF06C6.js +190 -0
- package/dist/index-BfFmpddl.cjs +21 -0
- package/dist/index-BuBzneeW.cjs +46 -0
- package/dist/index-CGsQWodV.cjs +1 -0
- package/dist/index-CIe7eCMH.js +3200 -0
- package/dist/index-CfSF8LXa.cjs +1 -0
- package/dist/index-D5GTzOzD.cjs +1 -0
- package/dist/index-DBhQzvVa.js +314 -0
- package/dist/index-DE17y0ZI.cjs +1 -0
- package/dist/index-JII7huPk.js +442 -0
- package/dist/index-tpCr9CLj.cjs +1 -0
- package/dist/{renderPasses-NnKZVfBy.js → index-w1S7fI2B.js} +219 -247
- package/dist/index-zGaqrz_K.js +188 -0
- package/dist/instructions.cjs +30 -0
- package/dist/instructions.js +1507 -0
- package/dist/{internal-vsfNQycj.js → internal-B90P-clC.js} +138 -118
- package/dist/internal-Cjinca64.cjs +1 -0
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +15 -10
- package/dist/iris/compute.d.ts +7 -5
- package/dist/iris/types.d.ts +6 -4
- package/dist/{landmarkMask-CbTFzBYG.js → landmarkMask-BFDyBnKM.js} +6 -6
- package/dist/landmarks-BlUqf5MZ.cjs +1 -0
- package/dist/landmarks-bftdwq6Z.js +76 -0
- package/dist/loaders-BGAUACsd.js +363 -0
- package/dist/loaders-BJ1_QCHt.cjs +1 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +666 -602
- package/dist/main.cjs +1 -1
- package/dist/main.js +866 -1182
- package/dist/models/Body/index.d.ts +2 -0
- package/dist/models/Face/constants.d.ts +8 -0
- package/dist/models/Face/index.d.ts +3 -11
- package/dist/models/Face/rotation.d.ts +18 -3
- package/dist/models/Hand/HandTracking.d.ts +17 -1
- package/dist/models/Segmentation/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 +60 -0
- package/dist/particles/system.d.ts +64 -0
- package/dist/particles.cjs +122 -0
- package/dist/particles.js +774 -0
- package/dist/product.cjs +1 -1
- package/dist/product.js +29 -29
- package/dist/{providers-C0Dlhh9Z.js → providers-C8rE26Uf.js} +127 -126
- package/dist/providers-DHsrhDI2.cjs +62 -0
- package/dist/render/renderPasses.d.ts +8 -0
- package/dist/render/sceneBeforeRender.d.ts +12 -0
- package/dist/{renderGroups-CN1cGFUo.js → renderGroups-B38pUaX2.js} +1 -1
- package/dist/{renderGroups-O4KmaMl9.cjs → renderGroups-Cb_4Ar1Q.cjs} +1 -1
- package/dist/renderPasses-B6l8IpJv.js +1290 -0
- package/dist/renderPasses-dqmkft4P.cjs +158 -0
- package/dist/renderState-CJNmj5jz.js +39 -0
- package/dist/renderState-apSfg4eR.cjs +1 -0
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +2 -2
- package/dist/segmentation-Cb3ouK6Z.js +1758 -0
- package/dist/segmentation-D9pYO6aR.cjs +1 -0
- package/dist/segmentation2d/types.d.ts +6 -0
- package/dist/select-Ck5LGz-J.cjs +1 -0
- package/dist/select-pYRo_win.js +233 -0
- package/dist/selectors-C4X71aoD.cjs +1 -0
- package/dist/selectors-DmNaKIwE.js +196 -0
- package/dist/session-BrH8G7iJ.cjs +31 -0
- package/dist/session-DgA_z6O1.js +418 -0
- package/dist/{settings-aQk845NJ.js → settings-BJ7FMBsO.js} +53 -15
- 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/tracking.cjs +10 -1
- package/dist/tracking.js +1002 -855
- package/dist/trigger-D0Pm9noT.cjs +49 -0
- package/dist/trigger-IQeys0oS.js +2128 -0
- package/dist/types/face.d.ts +20 -1
- package/dist/types/hand-tracking.d.ts +9 -0
- package/dist/types/nodes.d.ts +20 -1
- package/dist/types/segmentation.d.ts +5 -0
- package/dist/updateThrottle-BseecYag.js +4 -0
- package/dist/updateThrottle-Of5Y4SVa.cjs +1 -0
- package/dist/useFaceInfo-BHDNCvsJ.cjs +1 -0
- package/dist/useFaceInfo-J4x7LsqL.js +76 -0
- package/dist/useFaceResultReader-BvEo5REG.js +61 -0
- package/dist/useFaceResultReader-DuaL1KJG.cjs +1 -0
- package/dist/useInstructionHold-DOu-RpCM.js +53 -0
- package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
- package/dist/{useXRCapabilities-B1R2ghy-.cjs → useXRCapabilities-Cr3RzuAW.cjs} +1 -1
- package/dist/{useXRCapabilities-C68v__wB.js → useXRCapabilities-Cxmlmpbd.js} +1 -1
- package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
- package/dist/utils/headOccluderFit.d.ts +42 -0
- package/dist/utils/integrity.d.ts +17 -0
- 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/uv-BMFt19bg.cjs +1 -0
- package/dist/{index-CsUdQ-pn.js → uv-DJU_XfmN.js} +15 -249
- package/docs/SDK_DOCUMENTATION.md +1 -2
- package/docs/api/adaptive-quality.mdx +1 -1
- package/docs/api/body-instructions.mdx +285 -0
- package/docs/api/body-triggers.mdx +234 -0
- package/docs/api/camera-permission.mdx +1 -1
- package/docs/api/coordinate-spaces.mdx +7 -4
- package/docs/api/cross-camera.mdx +3 -2
- package/docs/api/debug-ui-scene-editor.mdx +23 -2
- package/docs/api/external-face-mesh.mdx +231 -0
- package/docs/api/face-actions.mdx +20 -16
- package/docs/api/face-attribute-expression.mdx +1 -1
- package/docs/api/face-binding-anchors.mdx +4 -2
- package/docs/api/face-character.mdx +157 -0
- package/docs/api/face-effects.mdx +3 -0
- package/docs/api/face-expression-controller.mdx +153 -0
- package/docs/api/face-info.mdx +17 -11
- 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 +4 -7
- package/docs/api/face-morph.mdx +117 -0
- package/docs/api/face-painting.mdx +7 -0
- package/docs/api/face-reprojection.mdx +154 -0
- package/docs/api/face-retouching.mdx +18 -10
- 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 +68 -32
- package/docs/api/hair.mdx +97 -0
- package/docs/api/hand-instructions.mdx +222 -0
- package/docs/api/hand-rig.mdx +535 -0
- package/docs/api/hand-touch.mdx +162 -0
- package/docs/api/head-occluder.mdx +563 -0
- package/docs/api/holistic-tracker.mdx +6 -1
- package/docs/api/instructions.mdx +323 -0
- package/docs/api/iris-tracking.mdx +24 -19
- 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/multi-subject.mdx +4 -1
- package/docs/api/particles.mdx +155 -0
- package/docs/api/person-cutout.mdx +1 -1
- package/docs/api/pin-to-face-mesh.mdx +274 -0
- package/docs/api/product-ar.mdx +5 -2
- package/docs/api/segmentation-overlay.mdx +1 -1
- package/docs/docs.json +29 -1
- package/docs/examples/lip-shaders.mdx +82 -33
- 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 +4 -4
- package/docs/guides/lip-effect-textures.mdx +178 -102
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -1
- package/docs/guides/makeup-design-textures.mdx +109 -0
- package/docs/introduction.mdx +1 -2
- package/package.json +11 -1
- package/dist/DebuggerUI-C-ldiozL.js +0 -269
- package/dist/DebuggerUI-CWX5EtQv.cjs +0 -1
- package/dist/FaceMeshRenderer-BEEXZwS6.cjs +0 -158
- package/dist/FaceMeshRenderer-UuH5sTXG.js +0 -1322
- package/dist/FaceRetouch-C7h7x9kd.js +0 -683
- package/dist/FaceRetouch-DqftT26Y.cjs +0 -134
- package/dist/GLTFLoader-C5q63sKO.js +0 -1633
- package/dist/GLTFLoader-Cb_CRwmG.cjs +0 -1
- package/dist/SegmentationOverlay-DQuW3dsc.js +0 -133
- package/dist/SegmentationOverlay-aWVod8Kl.cjs +0 -1
- package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +0 -15
- package/dist/components/FaceWarp3D/defaults.d.ts +0 -37
- package/dist/components/FaceWarp3D/warp.d.ts +0 -13
- package/dist/contexts-CO0sd4JQ.cjs +0 -1
- package/dist/contexts-FzlnnMYD.js +0 -669
- package/dist/debug-ui/face-warp-3d/index.d.ts +0 -6
- package/dist/getFaceInfo-BkZfaQs-.js +0 -118
- package/dist/getFaceInfo-ahPxQFGu.cjs +0 -1
- package/dist/index--RgGzZ6X.cjs +0 -47
- package/dist/index-CHVbH0hz.js +0 -214
- package/dist/index-CeVkgsag.cjs +0 -1
- package/dist/index-CnGox6Xr.js +0 -3054
- package/dist/index-DKBAh6hV.cjs +0 -1
- package/dist/index-DsZwTfG0.cjs +0 -1
- package/dist/index-Dw6tj2Mi.js +0 -144
- package/dist/index-OCPjOaeP.cjs +0 -1
- package/dist/index-s9pF4zkG.js +0 -2053
- package/dist/internal-BYza1h8_.cjs +0 -1
- package/dist/measures-9dQPdw96.js +0 -154
- package/dist/measures-KfJzpvod.cjs +0 -1
- package/dist/providers-YNwkmNeK.cjs +0 -62
- package/dist/renderPasses-Cg-zqmEz.cjs +0 -21
- package/dist/screenTransform-BenfCtZt.js +0 -44
- package/dist/screenTransform-BiXdpVf0.cjs +0 -1
- package/dist/segmentation-9PhSvc-R.cjs +0 -1
- package/dist/segmentation-CeOTKemr.js +0 -5
- package/dist/selectors-C5G1PMYL.js +0 -195
- package/dist/selectors-Du_PsVnW.cjs +0 -1
- package/dist/session-BBr0yN8h.cjs +0 -31
- package/dist/session-Cy0m7l7-.js +0 -363
- package/dist/settings-DRR7-snV.cjs +0 -1
- package/dist/useFaceInfo-Blf7FCu3.js +0 -303
- package/dist/useFaceInfo-C5mO8NQY.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useThree as
|
|
3
|
-
import { useRef as
|
|
1
|
+
import { D as Me } from "./index-zGaqrz_K.js";
|
|
2
|
+
import { useThree as ge, useFrame as Ee } from "@react-three/fiber";
|
|
3
|
+
import { useRef as _, useState as ze, useCallback as N, useEffect as U, useMemo as W, createElement as Oe } from "react";
|
|
4
4
|
import * as ae from "three";
|
|
5
|
-
import { Vector2 as q, Vector3 as z, Box3 as
|
|
6
|
-
import {
|
|
7
|
-
import { D as Fe } from "./index-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { Vector2 as q, Vector3 as z, Box3 as Pe, Matrix4 as B, Quaternion as X, Euler as H, MathUtils as L, Color as Re } from "three";
|
|
6
|
+
import { D as De } from "./index-CIe7eCMH.js";
|
|
7
|
+
import { r as de, D as C, a as fe, m as Le, b as Z, c as Fe } from "./index-DBhQzvVa.js";
|
|
8
|
+
import { u as Ce, D as Ae, n as Ie, h as je, i as _e, j as We } from "./renderPasses-B6l8IpJv.js";
|
|
9
|
+
import { jsxs as R, jsx as u } from "react/jsx-runtime";
|
|
10
|
+
import { Line as Ge } from "@react-three/drei";
|
|
11
|
+
import { u as Ne, S as Ue, a as ke } from "./context-DTxSQvp4.js";
|
|
12
12
|
const he = {
|
|
13
13
|
move: "grab",
|
|
14
14
|
pivot: "all-scroll",
|
|
@@ -46,7 +46,7 @@ const he = {
|
|
|
46
46
|
depthWrite: !1,
|
|
47
47
|
toneMapped: !1
|
|
48
48
|
}
|
|
49
|
-
),
|
|
49
|
+
), b = /* @__PURE__ */ u(
|
|
50
50
|
"meshBasicMaterial",
|
|
51
51
|
{
|
|
52
52
|
color: o,
|
|
@@ -56,7 +56,7 @@ const he = {
|
|
|
56
56
|
depthWrite: !1,
|
|
57
57
|
toneMapped: !1
|
|
58
58
|
}
|
|
59
|
-
), w = Math.max(d * 7, 0.028),
|
|
59
|
+
), w = Math.max(d * 7, 0.028), g = Math.max(d * 7, 0.03), M = Math.max(d * 8, 0.032), h = 0.04, c = 0.06, T = 0.08, y = 0.1, f = i ?? 0, F = [
|
|
60
60
|
["topLeft", -0.5, 0.5],
|
|
61
61
|
["topRight", 0.5, 0.5],
|
|
62
62
|
["bottomLeft", -0.5, -0.5],
|
|
@@ -72,71 +72,71 @@ const he = {
|
|
|
72
72
|
["rotateTopRight", 0.56, 0.56, -Math.PI / 2],
|
|
73
73
|
["rotateBottomRight", 0.56, -0.56, Math.PI],
|
|
74
74
|
["rotateBottomLeft", -0.56, -0.56, Math.PI / 2]
|
|
75
|
-
],
|
|
76
|
-
|
|
75
|
+
], S = (m) => n ? (P) => {
|
|
76
|
+
P.stopPropagation(), document.body.style.cursor = m === "move" ? "grabbing" : he[m], n(m, P);
|
|
77
77
|
} : void 0, x = (m) => {
|
|
78
78
|
n && (document.body.style.cursor = he[m]);
|
|
79
|
-
},
|
|
79
|
+
}, O = () => {
|
|
80
80
|
n && (document.body.style.cursor = "");
|
|
81
81
|
}, v = [s[0] - 0.5, s[1] - 0.5, y];
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ R("group", { renderOrder: f, children: [
|
|
83
|
+
/* @__PURE__ */ R("mesh", { position: [0, 0.5, h], scale: [1, d, 1], renderOrder: f, children: [
|
|
84
84
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
85
85
|
p
|
|
86
86
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ R("mesh", { position: [0, -0.5, h], scale: [1, d, 1], renderOrder: f, children: [
|
|
88
88
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
89
89
|
p
|
|
90
90
|
] }),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ R("mesh", { position: [-0.5, 0, h], scale: [d, 1, 1], renderOrder: f, children: [
|
|
92
92
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
93
93
|
p
|
|
94
94
|
] }),
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ R("mesh", { position: [0.5, 0, h], scale: [d, 1, 1], renderOrder: f, children: [
|
|
96
96
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
97
97
|
p
|
|
98
98
|
] }),
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ R(
|
|
100
100
|
"mesh",
|
|
101
101
|
{
|
|
102
102
|
position: [0, 0, c],
|
|
103
103
|
renderOrder: f + 1,
|
|
104
|
-
onPointerDown:
|
|
104
|
+
onPointerDown: S("move"),
|
|
105
105
|
onPointerOver: () => x("move"),
|
|
106
|
-
onPointerOut:
|
|
106
|
+
onPointerOut: O,
|
|
107
107
|
children: [
|
|
108
108
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
109
109
|
/* @__PURE__ */ u("meshBasicMaterial", { transparent: !0, opacity: 0, depthTest: !1, depthWrite: !1 })
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
|
-
|
|
113
|
+
F.map(([m, P, A]) => /* @__PURE__ */ R(
|
|
114
114
|
"mesh",
|
|
115
115
|
{
|
|
116
|
-
position: [
|
|
116
|
+
position: [P, A, T],
|
|
117
117
|
scale: [w * t[0], w * t[1], t[2]],
|
|
118
118
|
renderOrder: f + 2,
|
|
119
|
-
onPointerDown:
|
|
119
|
+
onPointerDown: S(m),
|
|
120
120
|
onPointerOver: () => x(m),
|
|
121
|
-
onPointerOut:
|
|
121
|
+
onPointerOut: O,
|
|
122
122
|
children: [
|
|
123
123
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
124
|
-
|
|
124
|
+
b
|
|
125
125
|
]
|
|
126
126
|
},
|
|
127
127
|
m
|
|
128
128
|
)),
|
|
129
|
-
E.map(([m,
|
|
129
|
+
E.map(([m, P, A, $]) => /* @__PURE__ */ u(
|
|
130
130
|
"group",
|
|
131
131
|
{
|
|
132
|
-
position: [
|
|
133
|
-
rotation: [0, 0,
|
|
132
|
+
position: [P, A, T + 0.01],
|
|
133
|
+
rotation: [0, 0, $],
|
|
134
134
|
scale: [M * t[0], M * t[1], t[2]],
|
|
135
135
|
renderOrder: f + 3,
|
|
136
|
-
onPointerDown:
|
|
136
|
+
onPointerDown: S(m),
|
|
137
137
|
onPointerOver: () => x(m),
|
|
138
|
-
onPointerOut:
|
|
139
|
-
children: /* @__PURE__ */
|
|
138
|
+
onPointerOut: O,
|
|
139
|
+
children: /* @__PURE__ */ R("mesh", { renderOrder: f + 3, children: [
|
|
140
140
|
/* @__PURE__ */ u("planeGeometry", { args: [1.9, 1.9] }),
|
|
141
141
|
/* @__PURE__ */ u("meshBasicMaterial", { transparent: !0, opacity: 0, depthTest: !1, depthWrite: !1 })
|
|
142
142
|
] })
|
|
@@ -147,21 +147,21 @@ const he = {
|
|
|
147
147
|
"group",
|
|
148
148
|
{
|
|
149
149
|
position: v,
|
|
150
|
-
scale: [
|
|
150
|
+
scale: [g * a[0], g * a[1], a[2]],
|
|
151
151
|
renderOrder: f + 5,
|
|
152
|
-
onPointerDown:
|
|
152
|
+
onPointerDown: S("pivot"),
|
|
153
153
|
onPointerOver: () => x("pivot"),
|
|
154
|
-
onPointerOut:
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
154
|
+
onPointerOut: O,
|
|
155
|
+
children: /* @__PURE__ */ R("group", { rotation: [0, 0, Math.PI / 4], children: [
|
|
156
|
+
/* @__PURE__ */ R("mesh", { scale: [1.8, 1.8, 1], renderOrder: f + 5, children: [
|
|
157
157
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
158
158
|
/* @__PURE__ */ u("meshBasicMaterial", { transparent: !0, opacity: 0, depthTest: !1, depthWrite: !1 })
|
|
159
159
|
] }),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ R("mesh", { position: [0, 0, 2e-3], renderOrder: f + 6, children: [
|
|
161
161
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
162
|
-
|
|
162
|
+
b
|
|
163
163
|
] }),
|
|
164
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ R("mesh", { scale: [0.62, 0.62, 1], position: [0, 0, 4e-3], renderOrder: f + 7, children: [
|
|
165
165
|
/* @__PURE__ */ u("planeGeometry", { args: [1, 1] }),
|
|
166
166
|
/* @__PURE__ */ u(
|
|
167
167
|
"meshBasicMaterial",
|
|
@@ -179,7 +179,7 @@ const he = {
|
|
|
179
179
|
}
|
|
180
180
|
)
|
|
181
181
|
] });
|
|
182
|
-
},
|
|
182
|
+
}, I = (e) => Math.round(e * 2) / 2, ue = (e) => Math.min(1, Math.max(0, e)), ee = {
|
|
183
183
|
move: "grab",
|
|
184
184
|
pivot: "all-scroll",
|
|
185
185
|
rotateTopLeft: "alias",
|
|
@@ -208,24 +208,24 @@ const he = {
|
|
|
208
208
|
["rotateTopRight", 1.03, -0.03],
|
|
209
209
|
["rotateBottomRight", 1.03, 1.03],
|
|
210
210
|
["rotateBottomLeft", -0.03, 1.03]
|
|
211
|
-
],
|
|
211
|
+
], He = (e, t) => {
|
|
212
212
|
const o = de({
|
|
213
213
|
transform: t,
|
|
214
214
|
parentSize: { width: e.width, height: e.height }
|
|
215
215
|
}), n = Math.min(
|
|
216
216
|
e.width / C.width,
|
|
217
217
|
e.height / C.height
|
|
218
|
-
) * (fe / Math.max(t.referencePixelsPerUnit, 1e-6)) || 1, r = C.width * n, s = C.height * n, a = e.left + (e.width - r) / 2, i = e.top + (e.height - s) / 2, l = a + r / 2, d = i + s / 2, p = o.size[0],
|
|
218
|
+
) * (fe / Math.max(t.referencePixelsPerUnit, 1e-6)) || 1, r = C.width * n, s = C.height * n, a = e.left + (e.width - r) / 2, i = e.top + (e.height - s) / 2, l = a + r / 2, d = i + s / 2, p = o.size[0], b = o.size[1], w = l + o.center[0], g = d - o.center[1];
|
|
219
219
|
return {
|
|
220
220
|
centerX: w,
|
|
221
|
-
centerY:
|
|
222
|
-
height:
|
|
221
|
+
centerY: g,
|
|
222
|
+
height: b,
|
|
223
223
|
left: w - p / 2,
|
|
224
224
|
scale: n,
|
|
225
|
-
top:
|
|
225
|
+
top: g - b / 2,
|
|
226
226
|
width: p
|
|
227
227
|
};
|
|
228
|
-
},
|
|
228
|
+
}, $e = (e, t, o, n) => {
|
|
229
229
|
const r = C.width * n, s = C.height * n, a = o.left + (o.width - r) / 2, i = o.top + (o.height - s) / 2;
|
|
230
230
|
return {
|
|
231
231
|
x: (e - (a + r / 2)) / n,
|
|
@@ -237,21 +237,21 @@ const he = {
|
|
|
237
237
|
onChange: o,
|
|
238
238
|
transform: n
|
|
239
239
|
}) => {
|
|
240
|
-
const r =
|
|
240
|
+
const r = _(o);
|
|
241
241
|
r.current = o;
|
|
242
|
-
const { gl: s } =
|
|
242
|
+
const { gl: s } = ge(), [a, i] = ze(null), l = _(null), d = _(null), p = N(() => {
|
|
243
243
|
i(s.domElement.getBoundingClientRect());
|
|
244
244
|
}, [s.domElement]);
|
|
245
245
|
U(() => (p(), window.addEventListener("resize", p), window.addEventListener("scroll", p, !0), () => {
|
|
246
246
|
window.removeEventListener("resize", p), window.removeEventListener("scroll", p, !0);
|
|
247
247
|
}), [p]);
|
|
248
|
-
const
|
|
249
|
-
() => a ?
|
|
248
|
+
const b = W(
|
|
249
|
+
() => a ? He(a, n) : null,
|
|
250
250
|
[a, n]
|
|
251
251
|
), w = N((h) => {
|
|
252
252
|
const c = l.current, T = r.current;
|
|
253
253
|
if (!c || !T) return;
|
|
254
|
-
const y = (h.clientX - c.startX) / c.scale, f = -(h.clientY - c.startY) / c.scale,
|
|
254
|
+
const y = (h.clientX - c.startX) / c.scale, f = -(h.clientY - c.startY) / c.scale, F = {
|
|
255
255
|
x: c.startPointerDesign.x + y,
|
|
256
256
|
y: c.startPointerDesign.y + f
|
|
257
257
|
}, E = {
|
|
@@ -262,60 +262,60 @@ const he = {
|
|
|
262
262
|
};
|
|
263
263
|
if (c.handle === "move")
|
|
264
264
|
E.position = {
|
|
265
|
-
x:
|
|
266
|
-
y:
|
|
265
|
+
x: I(c.startTransform.position.x + y),
|
|
266
|
+
y: I(c.startTransform.position.y + f)
|
|
267
267
|
};
|
|
268
268
|
else if (c.handle === "pivot") {
|
|
269
|
-
const
|
|
269
|
+
const S = Math.max(
|
|
270
270
|
1,
|
|
271
271
|
c.startTransform.size.width * c.startTransform.scale2D.x
|
|
272
272
|
), x = Math.max(
|
|
273
273
|
1,
|
|
274
274
|
c.startTransform.size.height * c.startTransform.scale2D.y
|
|
275
|
-
),
|
|
276
|
-
E.pivot = [
|
|
277
|
-
x:
|
|
278
|
-
c.startTransform.position.x + (E.pivot[0] - c.startTransform.pivot[0]) *
|
|
275
|
+
), O = ue(c.startTransform.pivot[0] + y / S), v = ue(c.startTransform.pivot[1] + f / x);
|
|
276
|
+
E.pivot = [I(O * 1e3) / 1e3, I(v * 1e3) / 1e3], E.position = {
|
|
277
|
+
x: I(
|
|
278
|
+
c.startTransform.position.x + (E.pivot[0] - c.startTransform.pivot[0]) * S
|
|
279
279
|
),
|
|
280
|
-
y:
|
|
280
|
+
y: I(
|
|
281
281
|
c.startTransform.position.y + (E.pivot[1] - c.startTransform.pivot[1]) * x
|
|
282
282
|
)
|
|
283
283
|
};
|
|
284
284
|
} else if (c.handle.startsWith("rotate")) {
|
|
285
|
-
const
|
|
285
|
+
const S = Math.atan2(
|
|
286
286
|
c.startPointerDesign.y - c.startTransform.position.y,
|
|
287
287
|
c.startPointerDesign.x - c.startTransform.position.x
|
|
288
288
|
), x = Math.atan2(
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
F.y - c.startTransform.position.y,
|
|
290
|
+
F.x - c.startTransform.position.x
|
|
291
291
|
);
|
|
292
|
-
E.rotation =
|
|
293
|
-
c.startTransform.rotation + (x -
|
|
292
|
+
E.rotation = I(
|
|
293
|
+
c.startTransform.rotation + (x - S) * 180 / Math.PI
|
|
294
294
|
);
|
|
295
295
|
} else {
|
|
296
|
-
const
|
|
296
|
+
const S = c.handle === "left" || c.handle.endsWith("Left"), x = c.handle === "right" || c.handle.endsWith("Right"), O = c.handle === "top" || c.handle.startsWith("top"), v = c.handle === "bottom" || c.handle.startsWith("bottom"), m = x ? y * 2 : S ? -y * 2 : 0, P = O ? f * 2 : v ? -f * 2 : 0;
|
|
297
297
|
E.size = {
|
|
298
|
-
width: Math.max(1,
|
|
299
|
-
height: Math.max(1,
|
|
298
|
+
width: Math.max(1, I(c.startTransform.size.width + m)),
|
|
299
|
+
height: Math.max(1, I(c.startTransform.size.height + P))
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
302
|
T(E);
|
|
303
|
-
}, []),
|
|
304
|
-
l.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove", w), window.removeEventListener("pointerup",
|
|
303
|
+
}, []), g = N(() => {
|
|
304
|
+
l.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove", w), window.removeEventListener("pointerup", g);
|
|
305
305
|
}, [w]);
|
|
306
|
-
U(() =>
|
|
306
|
+
U(() => g, [g]);
|
|
307
307
|
const M = N(
|
|
308
308
|
(h, c) => {
|
|
309
|
-
!a || !
|
|
309
|
+
!a || !b || !o || (c.preventDefault(), document.body.style.cursor = h === "move" ? "grabbing" : ee[h], l.current = {
|
|
310
310
|
handle: h,
|
|
311
311
|
startX: c.clientX,
|
|
312
312
|
startY: c.clientY,
|
|
313
|
-
startPointerDesign:
|
|
313
|
+
startPointerDesign: $e(c.clientX, c.clientY, a, b.scale),
|
|
314
314
|
startTransform: n,
|
|
315
|
-
scale:
|
|
316
|
-
}, window.addEventListener("pointermove", w), window.addEventListener("pointerup",
|
|
315
|
+
scale: b.scale
|
|
316
|
+
}, window.addEventListener("pointermove", w), window.addEventListener("pointerup", g));
|
|
317
317
|
},
|
|
318
|
-
[a,
|
|
318
|
+
[a, b, o, g, n, w]
|
|
319
319
|
);
|
|
320
320
|
return U(() => {
|
|
321
321
|
if (typeof document > "u") return;
|
|
@@ -325,7 +325,7 @@ const he = {
|
|
|
325
325
|
};
|
|
326
326
|
}, []), U(() => {
|
|
327
327
|
const h = d.current;
|
|
328
|
-
if (!h || (h.replaceChildren(), !
|
|
328
|
+
if (!h || (h.replaceChildren(), !b))
|
|
329
329
|
return;
|
|
330
330
|
const c = 12, T = 12, y = document.createElement("div");
|
|
331
331
|
Object.assign(y.style, {
|
|
@@ -337,39 +337,39 @@ const he = {
|
|
|
337
337
|
const f = document.createElement("div");
|
|
338
338
|
Object.assign(f.style, {
|
|
339
339
|
position: "absolute",
|
|
340
|
-
left: `${
|
|
341
|
-
top: `${
|
|
342
|
-
width: `${
|
|
343
|
-
height: `${
|
|
340
|
+
left: `${b.left}px`,
|
|
341
|
+
top: `${b.top}px`,
|
|
342
|
+
width: `${b.width}px`,
|
|
343
|
+
height: `${b.height}px`,
|
|
344
344
|
border: `1px solid ${e}`,
|
|
345
345
|
boxSizing: "border-box",
|
|
346
346
|
transform: `rotate(${-n.rotation}deg)`,
|
|
347
347
|
transformOrigin: `${n.pivot[0] * 100}% ${(1 - n.pivot[1]) * 100}%`,
|
|
348
348
|
pointerEvents: o ? "auto" : "none",
|
|
349
349
|
cursor: ee.move
|
|
350
|
-
}), f.addEventListener("pointerdown", (
|
|
351
|
-
const
|
|
352
|
-
const
|
|
353
|
-
return Object.assign(
|
|
350
|
+
}), f.addEventListener("pointerdown", (S) => M("move", S));
|
|
351
|
+
const F = (S, x, O, v, m = "translate(-50%, -50%)") => {
|
|
352
|
+
const P = document.createElement("div");
|
|
353
|
+
return Object.assign(P.style, {
|
|
354
354
|
position: "absolute",
|
|
355
355
|
left: `${x * 100}%`,
|
|
356
|
-
top: `${
|
|
356
|
+
top: `${O * 100}%`,
|
|
357
357
|
width: `${v}px`,
|
|
358
358
|
height: `${v}px`,
|
|
359
|
-
cursor: ee[
|
|
359
|
+
cursor: ee[S],
|
|
360
360
|
transform: m,
|
|
361
361
|
pointerEvents: "auto"
|
|
362
|
-
}),
|
|
363
|
-
|
|
364
|
-
}),
|
|
362
|
+
}), P.addEventListener("pointerdown", (A) => {
|
|
363
|
+
A.stopPropagation(), M(S, A);
|
|
364
|
+
}), P;
|
|
365
365
|
};
|
|
366
|
-
for (const [
|
|
367
|
-
const v =
|
|
366
|
+
for (const [S, x, O] of Xe) {
|
|
367
|
+
const v = F(S, x, O, c);
|
|
368
368
|
v.style.background = t, f.appendChild(v);
|
|
369
369
|
}
|
|
370
|
-
for (const [
|
|
371
|
-
f.appendChild(
|
|
372
|
-
const E =
|
|
370
|
+
for (const [S, x, O] of Ye)
|
|
371
|
+
f.appendChild(F(S, x, O, 26));
|
|
372
|
+
const E = F(
|
|
373
373
|
"pivot",
|
|
374
374
|
n.pivot[0],
|
|
375
375
|
1 - n.pivot[1],
|
|
@@ -383,7 +383,7 @@ const he = {
|
|
|
383
383
|
}), f.appendChild(E), y.appendChild(f), h.appendChild(y), () => {
|
|
384
384
|
h.replaceChildren();
|
|
385
385
|
};
|
|
386
|
-
}, [e, t,
|
|
386
|
+
}, [e, t, b, o, M, n]), null;
|
|
387
387
|
}, V = {
|
|
388
388
|
// Pinning is opt-in. A serialized scene must never move an object until
|
|
389
389
|
// the author explicitly enables the component and chooses a target.
|
|
@@ -401,22 +401,22 @@ const he = {
|
|
|
401
401
|
const l = (a.x * s.y - s.x * a.y) / i, d = (r.x * a.y - a.x * r.y) / i, p = 1 - l - d;
|
|
402
402
|
return p >= -1e-5 && l >= -1e-5 && d >= -1e-5 ? [p, l, d] : null;
|
|
403
403
|
}, Ke = (e, t, o = !1) => {
|
|
404
|
-
const n = new q(t.x, t.y), r = new q(), s = new q(), a = new q(), i = new z(), l = new z(), d = new z(), p = new z(),
|
|
405
|
-
let
|
|
404
|
+
const n = new q(t.x, t.y), r = new q(), s = new q(), a = new q(), i = new z(), l = new z(), d = new z(), p = new z(), b = new z(), w = new z();
|
|
405
|
+
let g = null;
|
|
406
406
|
if (e.traverse((h) => {
|
|
407
|
-
var x,
|
|
408
|
-
if (
|
|
409
|
-
const c = h, T = c.geometry, y = (x = T == null ? void 0 : T.attributes) == null ? void 0 : x.position, f = (
|
|
407
|
+
var x, O;
|
|
408
|
+
if (g || !h.isMesh) return;
|
|
409
|
+
const c = h, T = c.geometry, y = (x = T == null ? void 0 : T.attributes) == null ? void 0 : x.position, f = (O = T == null ? void 0 : T.attributes) == null ? void 0 : O.uv;
|
|
410
410
|
if (!y || !f) return;
|
|
411
|
-
const
|
|
411
|
+
const F = T.attributes.normal, E = T.index, S = (v) => (E == null ? void 0 : E.getX(v)) ?? v;
|
|
412
412
|
for (let v = 0; v < (E ? E.count : y.count); v += 3) {
|
|
413
|
-
const m = [
|
|
413
|
+
const m = [S(v), S(v + 1), S(v + 2)];
|
|
414
414
|
r.set(f.getX(m[0]), f.getY(m[0])), s.set(f.getX(m[1]), f.getY(m[1])), a.set(f.getX(m[2]), f.getY(m[2]));
|
|
415
|
-
const
|
|
416
|
-
if (
|
|
417
|
-
i.set(0, 0, 0), l.set(0, 0, 0), m.forEach((
|
|
418
|
-
d.fromBufferAttribute(y,
|
|
419
|
-
}), o || (p.fromBufferAttribute(y, m[0]),
|
|
415
|
+
const P = Ve(n, r, s, a);
|
|
416
|
+
if (P) {
|
|
417
|
+
i.set(0, 0, 0), l.set(0, 0, 0), m.forEach((A, $) => {
|
|
418
|
+
d.fromBufferAttribute(y, A), i.addScaledVector(d, P[$]), F && o && l.addScaledVector(d.fromBufferAttribute(F, A), P[$]);
|
|
419
|
+
}), o || (p.fromBufferAttribute(y, m[0]), b.fromBufferAttribute(y, m[1]), w.fromBufferAttribute(y, m[2]), l.copy(b.sub(p).cross(w.sub(p)).normalize())), g = {
|
|
420
420
|
mesh: c,
|
|
421
421
|
localPosition: i.clone(),
|
|
422
422
|
localNormal: l.clone().normalize()
|
|
@@ -424,8 +424,8 @@ const he = {
|
|
|
424
424
|
break;
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
}),
|
|
428
|
-
const M = new
|
|
427
|
+
}), g) return g;
|
|
428
|
+
const M = new Pe().setFromObject(e);
|
|
429
429
|
return {
|
|
430
430
|
mesh: e,
|
|
431
431
|
localPosition: e.worldToLocal(M.getCenter(new z())),
|
|
@@ -442,21 +442,21 @@ const he = {
|
|
|
442
442
|
k(e.offsetPosition.y),
|
|
443
443
|
k(e.offsetPosition.z)
|
|
444
444
|
), e.offsetSpace === "local" && oe.applyQuaternion(t.quaternion), te.copy(o.position).add(oe), t.parent && t.parent.worldToLocal(te), t.position.copy(te), re.setFromEuler(
|
|
445
|
-
new
|
|
445
|
+
new H(
|
|
446
446
|
k(e.offsetRotation.x) * Math.PI / 180,
|
|
447
447
|
k(e.offsetRotation.y) * Math.PI / 180,
|
|
448
448
|
k(e.offsetRotation.z) * Math.PI / 180
|
|
449
449
|
)
|
|
450
450
|
), e.offsetSpace === "local" ? t.quaternion.multiply(re) : t.quaternion.premultiply(re);
|
|
451
|
-
},
|
|
452
|
-
const n =
|
|
451
|
+
}, eo = ({ target: e, settings: t, children: o }) => {
|
|
452
|
+
const n = De(), r = _(null), s = _(null), a = () => {
|
|
453
453
|
r.current && Je(r.current);
|
|
454
454
|
};
|
|
455
455
|
return U(() => {
|
|
456
456
|
s.current = null;
|
|
457
457
|
}, [t.targetObjectId]), U(() => {
|
|
458
458
|
t.enabled || a();
|
|
459
|
-
}, [t.enabled]),
|
|
459
|
+
}, [t.enabled]), Ee(() => {
|
|
460
460
|
const i = e ?? n(t.targetObjectId);
|
|
461
461
|
if (!t.enabled || !i || !r.current) {
|
|
462
462
|
(!t.enabled || !i) && a();
|
|
@@ -470,8 +470,8 @@ const he = {
|
|
|
470
470
|
}), i.updateWorldMatrix(!0, !0);
|
|
471
471
|
const d = Qe(s.current.surface);
|
|
472
472
|
et({ source: r.current, surface: d, settings: t });
|
|
473
|
-
}),
|
|
474
|
-
},
|
|
473
|
+
}), Oe("group", { ref: r }, o);
|
|
474
|
+
}, j = (e) => Math.round(e * 2) / 2, ye = (e) => Math.min(1, Math.max(0, e));
|
|
475
475
|
function tt(e) {
|
|
476
476
|
return Math.min(
|
|
477
477
|
e.width / C.width,
|
|
@@ -516,8 +516,8 @@ function rt({
|
|
|
516
516
|
};
|
|
517
517
|
if (e.handle === "move")
|
|
518
518
|
return i.position = {
|
|
519
|
-
x:
|
|
520
|
-
y:
|
|
519
|
+
x: j(e.startTransform.position.x + r),
|
|
520
|
+
y: j(e.startTransform.position.y + s)
|
|
521
521
|
}, i;
|
|
522
522
|
if (e.handle === "pivot") {
|
|
523
523
|
const M = Math.max(
|
|
@@ -527,11 +527,11 @@ function rt({
|
|
|
527
527
|
1,
|
|
528
528
|
e.startTransform.size.height * e.startTransform.scale2D.y
|
|
529
529
|
), c = ye(e.startTransform.pivot[0] + r / M), T = ye(e.startTransform.pivot[1] + s / h);
|
|
530
|
-
return i.pivot = [
|
|
531
|
-
x:
|
|
530
|
+
return i.pivot = [j(c * 1e3) / 1e3, j(T * 1e3) / 1e3], i.position = {
|
|
531
|
+
x: j(
|
|
532
532
|
e.startTransform.position.x + (i.pivot[0] - e.startTransform.pivot[0]) * M
|
|
533
533
|
),
|
|
534
|
-
y:
|
|
534
|
+
y: j(
|
|
535
535
|
e.startTransform.position.y + (i.pivot[1] - e.startTransform.pivot[1]) * h
|
|
536
536
|
)
|
|
537
537
|
}, i;
|
|
@@ -544,14 +544,14 @@ function rt({
|
|
|
544
544
|
a.y - e.startTransform.position.y,
|
|
545
545
|
a.x - e.startTransform.position.x
|
|
546
546
|
);
|
|
547
|
-
return i.rotation =
|
|
547
|
+
return i.rotation = j(
|
|
548
548
|
e.startTransform.rotation + (h - M) * 180 / Math.PI
|
|
549
549
|
), i;
|
|
550
550
|
}
|
|
551
|
-
const l = e.handle === "left" || e.handle.endsWith("Left"), d = e.handle === "right" || e.handle.endsWith("Right"), p = e.handle === "top" || e.handle.startsWith("top"),
|
|
551
|
+
const l = e.handle === "left" || e.handle.endsWith("Left"), d = e.handle === "right" || e.handle.endsWith("Right"), p = e.handle === "top" || e.handle.startsWith("top"), b = e.handle === "bottom" || e.handle.startsWith("bottom"), w = d ? r * 2 : l ? -r * 2 : 0, g = p ? s * 2 : b ? -s * 2 : 0;
|
|
552
552
|
return i.size = {
|
|
553
|
-
width: Math.max(1,
|
|
554
|
-
height: Math.max(1,
|
|
553
|
+
width: Math.max(1, j(e.startTransform.size.width + w)),
|
|
554
|
+
height: Math.max(1, j(e.startTransform.size.height + g))
|
|
555
555
|
}, i;
|
|
556
556
|
}
|
|
557
557
|
function st({
|
|
@@ -561,26 +561,26 @@ function st({
|
|
|
561
561
|
onChange: n,
|
|
562
562
|
children: r
|
|
563
563
|
}) {
|
|
564
|
-
const s =
|
|
564
|
+
const s = Ne(), { size: a } = ge(), i = _(n);
|
|
565
565
|
i.current = n;
|
|
566
|
-
const l =
|
|
566
|
+
const l = _(null), d = W(
|
|
567
567
|
() => de({ transform: e, parentSize: s }),
|
|
568
568
|
[s, e]
|
|
569
|
-
), p = tt(a),
|
|
570
|
-
|
|
571
|
-
const w = ot({ resolved: d, transform: e }),
|
|
569
|
+
), p = tt(a), b = _(p);
|
|
570
|
+
b.current = p;
|
|
571
|
+
const w = ot({ resolved: d, transform: e }), g = N((T) => {
|
|
572
572
|
const y = l.current, f = i.current;
|
|
573
573
|
!y || !f || f(
|
|
574
574
|
rt({
|
|
575
575
|
drag: y,
|
|
576
576
|
clientX: T.clientX,
|
|
577
577
|
clientY: T.clientY,
|
|
578
|
-
designScale:
|
|
578
|
+
designScale: b.current
|
|
579
579
|
})
|
|
580
580
|
);
|
|
581
581
|
}, []), M = N(() => {
|
|
582
|
-
l.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove",
|
|
583
|
-
}, [
|
|
582
|
+
l.current = null, document.body.style.cursor = "", window.removeEventListener("pointermove", g), window.removeEventListener("pointerup", M);
|
|
583
|
+
}, [g]);
|
|
584
584
|
U(() => M, [M]);
|
|
585
585
|
const h = N(
|
|
586
586
|
(T, y) => {
|
|
@@ -593,9 +593,9 @@ function st({
|
|
|
593
593
|
y: y.point.y / w
|
|
594
594
|
},
|
|
595
595
|
startTransform: e
|
|
596
|
-
}, window.addEventListener("pointermove",
|
|
596
|
+
}, window.addEventListener("pointermove", g), window.addEventListener("pointerup", M));
|
|
597
597
|
},
|
|
598
|
-
[n, M, e, w,
|
|
598
|
+
[n, M, e, w, g]
|
|
599
599
|
), c = W(
|
|
600
600
|
() => nt({ parent: s, resolved: d, transform: e }),
|
|
601
601
|
[s, d, e]
|
|
@@ -618,7 +618,7 @@ function st({
|
|
|
618
618
|
0
|
|
619
619
|
],
|
|
620
620
|
scale: d.size,
|
|
621
|
-
children: /* @__PURE__ */
|
|
621
|
+
children: /* @__PURE__ */ R(Ue.Provider, { value: d.aspect, children: [
|
|
622
622
|
r,
|
|
623
623
|
e.showTransformGuides && t === "scene" ? /* @__PURE__ */ u(
|
|
624
624
|
Be,
|
|
@@ -680,12 +680,12 @@ const Y = {
|
|
|
680
680
|
const o = W(() => {
|
|
681
681
|
const r = Te(t);
|
|
682
682
|
return {
|
|
683
|
-
tint: new
|
|
683
|
+
tint: new Re(r.tint),
|
|
684
684
|
opacity: r.opacity * e,
|
|
685
685
|
frost: r.frost,
|
|
686
686
|
highlight: r.highlight
|
|
687
687
|
};
|
|
688
|
-
}, [e, t]), n =
|
|
688
|
+
}, [e, t]), n = Ce(o);
|
|
689
689
|
return /* @__PURE__ */ u(
|
|
690
690
|
"shaderMaterial",
|
|
691
691
|
{
|
|
@@ -749,7 +749,7 @@ const Y = {
|
|
|
749
749
|
fillColor: "#38bdf8",
|
|
750
750
|
fillOpacity: 1,
|
|
751
751
|
fillMode: "solid",
|
|
752
|
-
gradient:
|
|
752
|
+
gradient: Ae,
|
|
753
753
|
glass: Y,
|
|
754
754
|
strokeColor: "#ffffff",
|
|
755
755
|
strokeOpacity: 1,
|
|
@@ -766,7 +766,7 @@ const Y = {
|
|
|
766
766
|
...e,
|
|
767
767
|
lineStart: { ...K.lineStart, ...e == null ? void 0 : e.lineStart },
|
|
768
768
|
lineEnd: { ...K.lineEnd, ...e == null ? void 0 : e.lineEnd },
|
|
769
|
-
gradient:
|
|
769
|
+
gradient: Ie(e == null ? void 0 : e.gradient),
|
|
770
770
|
glass: Te(e == null ? void 0 : e.glass)
|
|
771
771
|
}, o = (n, r) => Number.isFinite(n) ? n : r;
|
|
772
772
|
return {
|
|
@@ -792,12 +792,12 @@ const Y = {
|
|
|
792
792
|
settings: o,
|
|
793
793
|
visible: n
|
|
794
794
|
}) => {
|
|
795
|
-
const r =
|
|
796
|
-
return /* @__PURE__ */
|
|
797
|
-
o.kind !== "line" && o.fillOpacity > 0 ? /* @__PURE__ */
|
|
795
|
+
const r = ke(), s = W(() => lt(o), [o]), a = W(() => dt(s), [s]), l = ["circle", "polygon", "star"].includes(o.kind) ? [Math.min(1, 1 / r), Math.min(1, r), 1] : [1, 1, 1], p = o.kind !== "line" ? [...s, s[0]] : s;
|
|
796
|
+
return /* @__PURE__ */ R("group", { name: e, visible: n, scale: l, children: [
|
|
797
|
+
o.kind !== "line" && o.fillOpacity > 0 ? /* @__PURE__ */ R("mesh", { renderOrder: t, children: [
|
|
798
798
|
/* @__PURE__ */ u("shapeGeometry", { args: [a] }),
|
|
799
799
|
o.fillMode === "glass" ? /* @__PURE__ */ u(ct, { value: o.glass, opacity: o.fillOpacity }) : /* @__PURE__ */ u(
|
|
800
|
-
|
|
800
|
+
je,
|
|
801
801
|
{
|
|
802
802
|
settings: {
|
|
803
803
|
source: o.fillMode,
|
|
@@ -809,7 +809,7 @@ const Y = {
|
|
|
809
809
|
)
|
|
810
810
|
] }) : null,
|
|
811
811
|
o.strokeWidth > 0 && o.strokeOpacity > 0 ? /* @__PURE__ */ u(
|
|
812
|
-
|
|
812
|
+
Ge,
|
|
813
813
|
{
|
|
814
814
|
points: p,
|
|
815
815
|
color: o.strokeColor,
|
|
@@ -825,7 +825,7 @@ const Y = {
|
|
|
825
825
|
}
|
|
826
826
|
) : null
|
|
827
827
|
] });
|
|
828
|
-
},
|
|
828
|
+
}, to = ({
|
|
829
829
|
name: e,
|
|
830
830
|
onScreenTransformChange: t,
|
|
831
831
|
renderOrder: o,
|
|
@@ -835,7 +835,7 @@ const Y = {
|
|
|
835
835
|
visible: a = !0
|
|
836
836
|
}) => {
|
|
837
837
|
const i = W(() => ft(n), [n]), l = W(
|
|
838
|
-
() =>
|
|
838
|
+
() => Le(r ?? Z),
|
|
839
839
|
[r]
|
|
840
840
|
);
|
|
841
841
|
return l.enabled ? /* @__PURE__ */ u(
|
|
@@ -857,7 +857,7 @@ const Y = {
|
|
|
857
857
|
}
|
|
858
858
|
) : null;
|
|
859
859
|
};
|
|
860
|
-
function
|
|
860
|
+
function oo(e) {
|
|
861
861
|
const { screenSpaceUI: t, screenImage: o } = e, { image: n, transformation: r } = o, s = n.src.trim();
|
|
862
862
|
return {
|
|
863
863
|
shouldRender: t.enabled && o.enabled && r.enabled,
|
|
@@ -918,7 +918,7 @@ const pe = {
|
|
|
918
918
|
transparent: !0,
|
|
919
919
|
alphaTest: 0
|
|
920
920
|
}
|
|
921
|
-
},
|
|
921
|
+
}, no = {
|
|
922
922
|
screenImage: pe,
|
|
923
923
|
screenSpaceUI: {
|
|
924
924
|
enabled: !0
|
|
@@ -935,7 +935,7 @@ function ut(e) {
|
|
|
935
935
|
offsetY: Math.sin(o) * t
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function ro(e) {
|
|
939
939
|
const { screenSpaceUI: t, screenText: o } = e, { content: n, layout: r, style: s, transformation: a } = o, i = s.background;
|
|
940
940
|
return {
|
|
941
941
|
shouldRender: t.enabled && o.enabled && a.enabled,
|
|
@@ -1105,17 +1105,17 @@ const mt = {
|
|
|
1105
1105
|
}, xe = (e) => {
|
|
1106
1106
|
const t = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
1107
1107
|
return `${e}_${t}`;
|
|
1108
|
-
},
|
|
1108
|
+
}, bt = () => xe("obj"), St = () => xe("cmp"), G = (e) => typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e)), gt = () => G(We), Tt = () => G(Z), xt = () => G(pe), vt = () => G(yt.screenText), wt = () => G(K), Mt = () => G(Me), Et = () => G(_e), zt = () => ({
|
|
1109
1109
|
type: "standard",
|
|
1110
1110
|
color: "#ffffff",
|
|
1111
1111
|
opacity: 1,
|
|
1112
1112
|
wireframe: !1,
|
|
1113
1113
|
roughness: 0.42,
|
|
1114
1114
|
metalness: 0.08
|
|
1115
|
-
}),
|
|
1115
|
+
}), Ot = () => ({
|
|
1116
1116
|
flipX: !1,
|
|
1117
1117
|
flipY: !1
|
|
1118
|
-
}),
|
|
1118
|
+
}), Pt = () => ({
|
|
1119
1119
|
enabled: !0,
|
|
1120
1120
|
type: "directional",
|
|
1121
1121
|
color: "#ffffff",
|
|
@@ -1126,7 +1126,7 @@ const mt = {
|
|
|
1126
1126
|
penumbra: 0.2,
|
|
1127
1127
|
decay: 2,
|
|
1128
1128
|
showHelper: !1
|
|
1129
|
-
}),
|
|
1129
|
+
}), Rt = () => ({
|
|
1130
1130
|
enabled: !1,
|
|
1131
1131
|
targetObjectId: null,
|
|
1132
1132
|
mode: "point",
|
|
@@ -1137,8 +1137,8 @@ const mt = {
|
|
|
1137
1137
|
uv: { ...V.uv },
|
|
1138
1138
|
offsetPosition: { ...V.offsetPosition },
|
|
1139
1139
|
offsetRotation: { ...V.offsetRotation }
|
|
1140
|
-
}), Lt = () => G(Fe),
|
|
1141
|
-
Transform:
|
|
1140
|
+
}), Lt = () => G(Fe), Ft = {
|
|
1141
|
+
Transform: gt,
|
|
1142
1142
|
ScreenTransform: Tt,
|
|
1143
1143
|
ScreenImage: xt,
|
|
1144
1144
|
ScreenText: vt,
|
|
@@ -1146,15 +1146,15 @@ const mt = {
|
|
|
1146
1146
|
MeshRenderer: Mt,
|
|
1147
1147
|
FaceMeshRenderer: Et,
|
|
1148
1148
|
Material: zt,
|
|
1149
|
-
Texture:
|
|
1150
|
-
Light:
|
|
1151
|
-
LookAt:
|
|
1149
|
+
Texture: Ot,
|
|
1150
|
+
Light: Pt,
|
|
1151
|
+
LookAt: Rt,
|
|
1152
1152
|
PinToMesh: Dt,
|
|
1153
1153
|
TrackingAnchor: Lt
|
|
1154
|
-
},
|
|
1154
|
+
}, so = ({
|
|
1155
1155
|
componentIds: e = [],
|
|
1156
1156
|
enabled: t = !0,
|
|
1157
|
-
id: o =
|
|
1157
|
+
id: o = bt(),
|
|
1158
1158
|
parentObjectId: n = null,
|
|
1159
1159
|
childObjectIds: r = [],
|
|
1160
1160
|
renderGroupId: s,
|
|
@@ -1169,16 +1169,16 @@ const mt = {
|
|
|
1169
1169
|
layerId: a,
|
|
1170
1170
|
renderGroupId: s ?? a,
|
|
1171
1171
|
componentIds: e
|
|
1172
|
-
}),
|
|
1173
|
-
id:
|
|
1172
|
+
}), io = (e, t) => ({
|
|
1173
|
+
id: St(),
|
|
1174
1174
|
objectId: t,
|
|
1175
1175
|
type: e,
|
|
1176
1176
|
enabled: !0,
|
|
1177
|
-
settings:
|
|
1177
|
+
settings: Ft[e]()
|
|
1178
1178
|
}), J = (e, t) => {
|
|
1179
1179
|
const o = e.objects[t];
|
|
1180
1180
|
return o ? o.componentIds.map((n) => e.components[n]).filter((n) => !!n) : [];
|
|
1181
|
-
},
|
|
1181
|
+
}, ao = () => {
|
|
1182
1182
|
let e = null, t = null, o = null, n = [];
|
|
1183
1183
|
return (r, s) => {
|
|
1184
1184
|
const a = r.objects[s];
|
|
@@ -1187,7 +1187,7 @@ const mt = {
|
|
|
1187
1187
|
const i = a.componentIds;
|
|
1188
1188
|
return e === r && t === s && o === i && n.length === i.length && n.every((d) => r.components[d.id] === d) || (e = r, t = s, o = i, n = J(r, s)), n;
|
|
1189
1189
|
};
|
|
1190
|
-
},
|
|
1190
|
+
}, co = (e, t) => {
|
|
1191
1191
|
const o = e.objects[t.objectId];
|
|
1192
1192
|
return o ? {
|
|
1193
1193
|
...e,
|
|
@@ -1203,7 +1203,7 @@ const mt = {
|
|
|
1203
1203
|
[t.id]: t
|
|
1204
1204
|
}
|
|
1205
1205
|
} : e;
|
|
1206
|
-
},
|
|
1206
|
+
}, lo = (e, t, o, n) => {
|
|
1207
1207
|
const r = e.objects[t];
|
|
1208
1208
|
if (!r || r.componentIds.indexOf(o) < 0) return e;
|
|
1209
1209
|
const a = r.componentIds.filter((i) => i !== o);
|
|
@@ -1214,7 +1214,7 @@ const mt = {
|
|
|
1214
1214
|
[t]: { ...r, componentIds: a }
|
|
1215
1215
|
}
|
|
1216
1216
|
};
|
|
1217
|
-
},
|
|
1217
|
+
}, fo = (e, t, o) => {
|
|
1218
1218
|
const n = e.objects[t];
|
|
1219
1219
|
if (!n) return e;
|
|
1220
1220
|
const r = { ...e.components };
|
|
@@ -1229,7 +1229,7 @@ const mt = {
|
|
|
1229
1229
|
},
|
|
1230
1230
|
components: r
|
|
1231
1231
|
};
|
|
1232
|
-
},
|
|
1232
|
+
}, be = (e, t) => e.components[t.id] ? {
|
|
1233
1233
|
...e,
|
|
1234
1234
|
components: {
|
|
1235
1235
|
...e.components,
|
|
@@ -1241,10 +1241,10 @@ const mt = {
|
|
|
1241
1241
|
...e.objects,
|
|
1242
1242
|
[t.id]: t
|
|
1243
1243
|
}
|
|
1244
|
-
} : e,
|
|
1244
|
+
} : e, At = (e, t) => {
|
|
1245
1245
|
const o = e.objects[t], n = (o == null ? void 0 : o.childObjectIds) ?? [], r = Object.values(e.objects).filter((a) => a.parentObjectId === t).map((a) => a.id);
|
|
1246
1246
|
return [.../* @__PURE__ */ new Set([...n, ...r])].map((a) => e.objects[a]).filter((a) => !!a);
|
|
1247
|
-
},
|
|
1247
|
+
}, It = (e, t, o) => {
|
|
1248
1248
|
var s;
|
|
1249
1249
|
let n = o;
|
|
1250
1250
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -1253,17 +1253,17 @@ const mt = {
|
|
|
1253
1253
|
r.add(n), n = ((s = e.objects[n]) == null ? void 0 : s.parentObjectId) ?? null;
|
|
1254
1254
|
}
|
|
1255
1255
|
return !1;
|
|
1256
|
-
},
|
|
1256
|
+
}, Se = (e, t) => {
|
|
1257
1257
|
const o = new Set(J(e, t).map((n) => n.type));
|
|
1258
1258
|
return o.has("Transform") ? "3d" : o.has("ScreenTransform") ? "2d" : null;
|
|
1259
|
-
},
|
|
1259
|
+
}, jt = (e, t, o, n) => {
|
|
1260
1260
|
const r = e.objects[t];
|
|
1261
1261
|
if (!r || o !== null && !e.objects[o]) return e;
|
|
1262
1262
|
if (o !== null) {
|
|
1263
|
-
const i =
|
|
1263
|
+
const i = Se(e, t), l = Se(e, o);
|
|
1264
1264
|
if (i && l && i !== l) return e;
|
|
1265
1265
|
}
|
|
1266
|
-
if (
|
|
1266
|
+
if (It(e, t, o)) return e;
|
|
1267
1267
|
const s = r.parentObjectId ?? null;
|
|
1268
1268
|
if (s === o && o === null) return e;
|
|
1269
1269
|
const a = { ...e.objects };
|
|
@@ -1283,10 +1283,10 @@ const mt = {
|
|
|
1283
1283
|
), a[o] = { ...i, childObjectIds: l };
|
|
1284
1284
|
}
|
|
1285
1285
|
return { ...e, objects: a };
|
|
1286
|
-
}, ie = Math.PI / 180, Q = 180 / Math.PI, D = (e) => Number(e.toFixed(4)),
|
|
1286
|
+
}, ie = Math.PI / 180, Q = 180 / Math.PI, D = (e) => Number(e.toFixed(4)), _t = (e) => (e == null ? void 0 : e.type) === "Transform", ve = (e, t) => J(e, t).find(_t) ?? null, Wt = (e) => (e == null ? void 0 : e.type) === "ScreenTransform", we = (e, t) => J(e, t).find(Wt) ?? null, Gt = (e) => new B().compose(
|
|
1287
1287
|
new z(e.position.x, e.position.y, e.position.z),
|
|
1288
1288
|
new X().setFromEuler(
|
|
1289
|
-
new
|
|
1289
|
+
new H(
|
|
1290
1290
|
e.rotation.x * ie,
|
|
1291
1291
|
e.rotation.y * ie,
|
|
1292
1292
|
e.rotation.z * ie
|
|
@@ -1307,7 +1307,7 @@ const mt = {
|
|
|
1307
1307
|
});
|
|
1308
1308
|
return new B().compose(
|
|
1309
1309
|
new z(...t.center),
|
|
1310
|
-
new X().setFromEuler(new
|
|
1310
|
+
new X().setFromEuler(new H(...t.rotation)),
|
|
1311
1311
|
new z(...t.size)
|
|
1312
1312
|
);
|
|
1313
1313
|
}, le = (e, t) => {
|
|
@@ -1317,7 +1317,7 @@ const mt = {
|
|
|
1317
1317
|
}, kt = (e, t) => {
|
|
1318
1318
|
const o = new z(), n = new X(), r = new z();
|
|
1319
1319
|
e.decompose(o, n, r);
|
|
1320
|
-
const s = new
|
|
1320
|
+
const s = new H().setFromQuaternion(n);
|
|
1321
1321
|
return {
|
|
1322
1322
|
...t,
|
|
1323
1323
|
position: {
|
|
@@ -1339,7 +1339,7 @@ const mt = {
|
|
|
1339
1339
|
}, Bt = (e, t) => {
|
|
1340
1340
|
const o = new z(), n = new X(), r = new z();
|
|
1341
1341
|
e.decompose(o, n, r);
|
|
1342
|
-
const s = new
|
|
1342
|
+
const s = new H().setFromQuaternion(n), a = fe / t.referencePixelsPerUnit, i = Math.abs(r.x), l = Math.abs(r.y), d = (t.pivot[0] - 0.5) * i, p = (t.pivot[1] - 0.5) * l;
|
|
1343
1343
|
return {
|
|
1344
1344
|
...t,
|
|
1345
1345
|
position: {
|
|
@@ -1352,24 +1352,24 @@ const mt = {
|
|
|
1352
1352
|
y: D(l / (t.size.height * a))
|
|
1353
1353
|
}
|
|
1354
1354
|
};
|
|
1355
|
-
},
|
|
1356
|
-
const r = ve(e, t), s = we(e, t), a = r ? ce(e, t) : s ? le(e, t) : null, i =
|
|
1355
|
+
}, po = (e, t, o, n) => {
|
|
1356
|
+
const r = ve(e, t), s = we(e, t), a = r ? ce(e, t) : s ? le(e, t) : null, i = jt(e, t, o, n);
|
|
1357
1357
|
if (i === e || !a) return i;
|
|
1358
1358
|
const d = (o ? r ? ce(i, o) : le(i, o) : new B()).clone().invert().multiply(a);
|
|
1359
|
-
return s ?
|
|
1359
|
+
return s ? be(i, {
|
|
1360
1360
|
...s,
|
|
1361
1361
|
settings: Bt(d, s.settings)
|
|
1362
|
-
}) : r ?
|
|
1362
|
+
}) : r ? be(i, {
|
|
1363
1363
|
...r,
|
|
1364
1364
|
settings: kt(d, r.settings)
|
|
1365
1365
|
}) : i;
|
|
1366
|
-
},
|
|
1366
|
+
}, ho = (e, t, o) => {
|
|
1367
1367
|
const n = e.objects[t];
|
|
1368
1368
|
return n ? Ct(e, { ...n, enabled: o }) : e;
|
|
1369
|
-
},
|
|
1369
|
+
}, uo = (e, t) => {
|
|
1370
1370
|
const o = e.objects[t];
|
|
1371
1371
|
if (!o) return e;
|
|
1372
|
-
const n =
|
|
1372
|
+
const n = At(e, t).map((i) => i.id), r = { ...e.objects };
|
|
1373
1373
|
delete r[t];
|
|
1374
1374
|
const s = Object.fromEntries(
|
|
1375
1375
|
Object.entries(r).map(([i, l]) => [
|
|
@@ -1385,55 +1385,27 @@ const mt = {
|
|
|
1385
1385
|
for (const i of o.componentIds)
|
|
1386
1386
|
delete a[i];
|
|
1387
1387
|
return { ...e, objects: s, components: a };
|
|
1388
|
-
}, Xt = 30, yo = 31, So = (e, t = 1) => {
|
|
1389
|
-
const o = t + e;
|
|
1390
|
-
if (o < 1 || o > Xt)
|
|
1391
|
-
throw new RangeError(`Render-group layer ${o} is outside the supported range 1-30.`);
|
|
1392
|
-
return o;
|
|
1393
|
-
}, go = ({
|
|
1394
|
-
renderer: e,
|
|
1395
|
-
scene: t,
|
|
1396
|
-
camera: o,
|
|
1397
|
-
layers: n,
|
|
1398
|
-
includeDefaultLayer: r = !0
|
|
1399
|
-
}) => {
|
|
1400
|
-
const s = o.layers.mask, a = e.autoClear;
|
|
1401
|
-
try {
|
|
1402
|
-
if (e.autoClear = !1, e.clear(!0, !0, !0), n.length === 0) {
|
|
1403
|
-
o.layers.set(0), e.render(t, o);
|
|
1404
|
-
return;
|
|
1405
|
-
}
|
|
1406
|
-
n.forEach((i, l) => {
|
|
1407
|
-
o.layers.set(i), r && i !== 0 && o.layers.enable(0), l > 0 && e.clearDepth(), e.render(t, o);
|
|
1408
|
-
});
|
|
1409
|
-
} finally {
|
|
1410
|
-
o.layers.mask = s, e.autoClear = a;
|
|
1411
|
-
}
|
|
1412
1388
|
};
|
|
1413
1389
|
export {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1390
|
+
ho as A,
|
|
1391
|
+
Te as B,
|
|
1392
|
+
to as C,
|
|
1417
1393
|
Y as D,
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
to as P,
|
|
1430
|
-
ut as Q,
|
|
1431
|
-
so as R,
|
|
1394
|
+
K as E,
|
|
1395
|
+
ft as F,
|
|
1396
|
+
pe as G,
|
|
1397
|
+
no as H,
|
|
1398
|
+
oo as I,
|
|
1399
|
+
yt as J,
|
|
1400
|
+
mt as K,
|
|
1401
|
+
ut as L,
|
|
1402
|
+
ro as M,
|
|
1403
|
+
st as N,
|
|
1404
|
+
eo as P,
|
|
1432
1405
|
ct as S,
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
At as c,
|
|
1406
|
+
co as a,
|
|
1407
|
+
io as b,
|
|
1408
|
+
Ft as c,
|
|
1437
1409
|
Et as d,
|
|
1438
1410
|
zt as e,
|
|
1439
1411
|
Mt as f,
|
|
@@ -1441,20 +1413,20 @@ export {
|
|
|
1441
1413
|
vt as h,
|
|
1442
1414
|
wt as i,
|
|
1443
1415
|
Tt as j,
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1416
|
+
Ot as k,
|
|
1417
|
+
gt as l,
|
|
1418
|
+
St as m,
|
|
1447
1419
|
xe as n,
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1420
|
+
so as o,
|
|
1421
|
+
bt as p,
|
|
1422
|
+
ao as q,
|
|
1423
|
+
uo as r,
|
|
1452
1424
|
J as s,
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1425
|
+
At as t,
|
|
1426
|
+
lo as u,
|
|
1427
|
+
fo as v,
|
|
1428
|
+
be as w,
|
|
1457
1429
|
Ct as x,
|
|
1458
|
-
|
|
1459
|
-
|
|
1430
|
+
jt as y,
|
|
1431
|
+
po as z
|
|
1460
1432
|
};
|