@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,1911 @@
|
|
|
1
|
+
var Ge = Object.defineProperty;
|
|
2
|
+
var Me = (b, a, e) => a in b ? Ge(b, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : b[a] = e;
|
|
3
|
+
var ne = (b, a, e) => Me(b, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
+
import * as P from "three";
|
|
5
|
+
import { TrianglesDrawMode as Pe, TriangleFanDrawMode as Z, TriangleStripDrawMode as ge, Loader as _e, LoaderUtils as B, FileLoader as me, MeshPhysicalMaterial as v, Vector2 as Ae, Color as _, LinearSRGBColorSpace as y, SRGBColorSpace as I, SpotLight as Ce, PointLight as De, DirectionalLight as He, Matrix4 as q, Vector3 as C, Quaternion as xe, InstancedMesh as Ne, InstancedBufferAttribute as Ke, Object3D as ke, TextureLoader as Be, ImageBitmapLoader as Ie, BufferAttribute as U, InterleavedBuffer as qe, InterleavedBufferAttribute as ze, LinearMipmapLinearFilter as Te, NearestMipmapLinearFilter as Ue, LinearMipmapNearestFilter as Qe, NearestMipmapNearestFilter as We, LinearFilter as $, NearestFilter as Re, RepeatWrapping as ee, MirroredRepeatWrapping as Ve, ClampToEdgeWrapping as Xe, PointsMaterial as Je, Material as Q, LineBasicMaterial as Ye, MeshStandardMaterial as we, DoubleSide as Ze, MeshBasicMaterial as K, PropertyBinding as $e, BufferGeometry as ea, SkinnedMesh as aa, Mesh as ta, LineSegments as sa, Line as na, LineLoop as ia, Points as ra, Group as W, PerspectiveCamera as oa, MathUtils as ca, OrthographicCamera as ba, Skeleton as la, AnimationClip as da, Bone as fa, InterpolateDiscrete as pa, InterpolateLinear as Ee, Texture as ie, VectorKeyframeTrack as re, NumberKeyframeTrack as oe, QuaternionKeyframeTrack as ce, ColorManagement as be, FrontSide as ha, Interpolant as ua, Box3 as ga, Sphere as ma } from "three";
|
|
6
|
+
import { q as je, v as Aa } from "./index-CKRN-xJp.js";
|
|
7
|
+
const se = (b) => {
|
|
8
|
+
if (!b) return 0;
|
|
9
|
+
const a = b.image;
|
|
10
|
+
if (!a) return 0;
|
|
11
|
+
const e = a.videoWidth || a.width || 0, n = a.videoHeight || a.height || 0;
|
|
12
|
+
if (!e || !n) return 0;
|
|
13
|
+
const t = b.isCompressedTexture, s = t ? 0.5 : b.type === P.FloatType ? 16 : 4, i = e * n * s;
|
|
14
|
+
return Math.round(b.generateMipmaps && !t ? i * 1.3334 : i);
|
|
15
|
+
}, xa = (b) => {
|
|
16
|
+
if (!b) return 0;
|
|
17
|
+
let a = 0;
|
|
18
|
+
for (const e of Object.values(b.attributes)) {
|
|
19
|
+
const n = e.array;
|
|
20
|
+
n && (a += n.byteLength);
|
|
21
|
+
}
|
|
22
|
+
return b.index && (a += b.index.array.byteLength), a;
|
|
23
|
+
}, ka = [
|
|
24
|
+
"map",
|
|
25
|
+
"alphaMap",
|
|
26
|
+
"aoMap",
|
|
27
|
+
"bumpMap",
|
|
28
|
+
"displacementMap",
|
|
29
|
+
"emissiveMap",
|
|
30
|
+
"envMap",
|
|
31
|
+
"lightMap",
|
|
32
|
+
"metalnessMap",
|
|
33
|
+
"normalMap",
|
|
34
|
+
"roughnessMap",
|
|
35
|
+
"specularMap"
|
|
36
|
+
], Se = (b) => {
|
|
37
|
+
const a = [], e = b;
|
|
38
|
+
for (const t of ka) {
|
|
39
|
+
const s = e[t];
|
|
40
|
+
s && s.isTexture && a.push(s);
|
|
41
|
+
}
|
|
42
|
+
const n = b.uniforms;
|
|
43
|
+
if (n)
|
|
44
|
+
for (const t of Object.values(n)) {
|
|
45
|
+
const s = t == null ? void 0 : t.value;
|
|
46
|
+
s && s.isTexture && a.push(s);
|
|
47
|
+
}
|
|
48
|
+
return a;
|
|
49
|
+
}, Ta = (b) => {
|
|
50
|
+
if (!b) return 0;
|
|
51
|
+
const a = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set();
|
|
52
|
+
b.traverse((t) => {
|
|
53
|
+
const s = t;
|
|
54
|
+
s.geometry && a.add(s.geometry);
|
|
55
|
+
const i = Array.isArray(s.material) ? s.material : s.material ? [s.material] : [];
|
|
56
|
+
for (const o of i) Se(o).forEach((r) => e.add(r));
|
|
57
|
+
});
|
|
58
|
+
let n = 0;
|
|
59
|
+
return a.forEach((t) => {
|
|
60
|
+
n += xa(t);
|
|
61
|
+
}), e.forEach((t) => {
|
|
62
|
+
n += se(t);
|
|
63
|
+
}), n;
|
|
64
|
+
}, le = (b) => {
|
|
65
|
+
if (!b) return;
|
|
66
|
+
const a = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
67
|
+
b.traverse((t) => {
|
|
68
|
+
const s = t;
|
|
69
|
+
s.geometry && a.add(s.geometry);
|
|
70
|
+
const i = Array.isArray(s.material) ? s.material : s.material ? [s.material] : [];
|
|
71
|
+
for (const o of i)
|
|
72
|
+
e.add(o), Se(o).forEach((r) => n.add(r));
|
|
73
|
+
}), n.forEach((t) => t.dispose()), e.forEach((t) => t.dispose()), a.forEach((t) => t.dispose()), b.removeFromParent();
|
|
74
|
+
};
|
|
75
|
+
var Ra = function() {
|
|
76
|
+
var b = "b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb", a = "b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb", e = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 3, 2, 0, 0, 5, 3, 1, 0, 1, 12, 1, 0, 10, 22, 2, 12, 0, 65, 0, 65, 0, 65, 0, 252, 10, 0, 0, 11, 7, 0, 65, 0, 253, 15, 26, 11]), n = new Uint8Array([32, 0, 65, 2, 1, 106, 34, 33, 3, 128, 11, 4, 13, 64, 6, 253, 10, 7, 15, 116, 127, 5, 8, 12, 40, 16, 19, 54, 20, 9, 27, 255, 113, 17, 42, 67, 24, 23, 146, 148, 18, 14, 22, 45, 70, 69, 56, 114, 101, 21, 25, 63, 75, 136, 108, 28, 118, 29, 73, 115]);
|
|
77
|
+
if (typeof WebAssembly != "object")
|
|
78
|
+
return {
|
|
79
|
+
supported: !1
|
|
80
|
+
};
|
|
81
|
+
var t = WebAssembly.validate(e) ? a : b, s, i = WebAssembly.instantiate(o(t), {}).then(function(u) {
|
|
82
|
+
s = u.instance, s.exports.__wasm_call_ctors();
|
|
83
|
+
});
|
|
84
|
+
function o(u) {
|
|
85
|
+
for (var p = new Uint8Array(u.length), m = 0; m < u.length; ++m) {
|
|
86
|
+
var g = u.charCodeAt(m);
|
|
87
|
+
p[m] = g > 96 ? g - 97 : g > 64 ? g - 39 : g + 4;
|
|
88
|
+
}
|
|
89
|
+
for (var R = 0, m = 0; m < u.length; ++m)
|
|
90
|
+
p[R++] = p[m] < 60 ? n[p[m]] : (p[m] - 60) * 64 + p[++m];
|
|
91
|
+
return p.buffer.slice(0, R);
|
|
92
|
+
}
|
|
93
|
+
function r(u, p, m, g, R, w) {
|
|
94
|
+
var E = s.exports.sbrk, F = m + 3 & -4, j = E(F * g), O = E(R.length), H = new Uint8Array(s.exports.memory.buffer);
|
|
95
|
+
H.set(R, O);
|
|
96
|
+
var z = u(j, m, g, O, R.length);
|
|
97
|
+
if (z == 0 && w && w(j, F, g), p.set(H.subarray(j, j + m * g)), E(j - E(0)), z != 0)
|
|
98
|
+
throw new Error("Malformed buffer data: " + z);
|
|
99
|
+
}
|
|
100
|
+
var c = {
|
|
101
|
+
NONE: "",
|
|
102
|
+
OCTAHEDRAL: "meshopt_decodeFilterOct",
|
|
103
|
+
QUATERNION: "meshopt_decodeFilterQuat",
|
|
104
|
+
EXPONENTIAL: "meshopt_decodeFilterExp"
|
|
105
|
+
}, d = {
|
|
106
|
+
ATTRIBUTES: "meshopt_decodeVertexBuffer",
|
|
107
|
+
TRIANGLES: "meshopt_decodeIndexBuffer",
|
|
108
|
+
INDICES: "meshopt_decodeIndexSequence"
|
|
109
|
+
}, l = [], f = 0;
|
|
110
|
+
function h(u) {
|
|
111
|
+
var p = {
|
|
112
|
+
object: new Worker(u),
|
|
113
|
+
pending: 0,
|
|
114
|
+
requests: {}
|
|
115
|
+
};
|
|
116
|
+
return p.object.onmessage = function(m) {
|
|
117
|
+
var g = m.data;
|
|
118
|
+
p.pending -= g.count, p.requests[g.id][g.action](g.value), delete p.requests[g.id];
|
|
119
|
+
}, p;
|
|
120
|
+
}
|
|
121
|
+
function x(u) {
|
|
122
|
+
for (var p = "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(o(t)) + "]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;" + r.toString() + A.toString(), m = new Blob([p], { type: "text/javascript" }), g = URL.createObjectURL(m), R = 0; R < u; ++R)
|
|
123
|
+
l[R] = h(g);
|
|
124
|
+
URL.revokeObjectURL(g);
|
|
125
|
+
}
|
|
126
|
+
function T(u, p, m, g, R) {
|
|
127
|
+
for (var w = l[0], E = 1; E < l.length; ++E)
|
|
128
|
+
l[E].pending < w.pending && (w = l[E]);
|
|
129
|
+
return new Promise(function(F, j) {
|
|
130
|
+
var O = new Uint8Array(m), H = f++;
|
|
131
|
+
w.pending += u, w.requests[H] = { resolve: F, reject: j }, w.object.postMessage({ id: H, count: u, size: p, source: O, mode: g, filter: R }, [O.buffer]);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function A(u) {
|
|
135
|
+
i.then(function() {
|
|
136
|
+
var p = u.data;
|
|
137
|
+
try {
|
|
138
|
+
var m = new Uint8Array(p.count * p.size);
|
|
139
|
+
r(s.exports[p.mode], m, p.count, p.size, p.source, s.exports[p.filter]), self.postMessage({ id: p.id, count: p.count, action: "resolve", value: m }, [m.buffer]);
|
|
140
|
+
} catch (g) {
|
|
141
|
+
self.postMessage({ id: p.id, count: p.count, action: "reject", value: g });
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
ready: i,
|
|
147
|
+
supported: !0,
|
|
148
|
+
useWorkers: function(u) {
|
|
149
|
+
x(u);
|
|
150
|
+
},
|
|
151
|
+
decodeVertexBuffer: function(u, p, m, g, R) {
|
|
152
|
+
r(s.exports.meshopt_decodeVertexBuffer, u, p, m, g, s.exports[c[R]]);
|
|
153
|
+
},
|
|
154
|
+
decodeIndexBuffer: function(u, p, m, g) {
|
|
155
|
+
r(s.exports.meshopt_decodeIndexBuffer, u, p, m, g);
|
|
156
|
+
},
|
|
157
|
+
decodeIndexSequence: function(u, p, m, g) {
|
|
158
|
+
r(s.exports.meshopt_decodeIndexSequence, u, p, m, g);
|
|
159
|
+
},
|
|
160
|
+
decodeGltfBuffer: function(u, p, m, g, R, w) {
|
|
161
|
+
r(s.exports[d[R]], u, p, m, g, s.exports[c[w]]);
|
|
162
|
+
},
|
|
163
|
+
decodeGltfBufferAsync: function(u, p, m, g, R) {
|
|
164
|
+
return l.length > 0 ? T(u, p, m, d[g], c[R]) : i.then(function() {
|
|
165
|
+
var w = new Uint8Array(u * p);
|
|
166
|
+
return r(s.exports[d[g]], w, u, p, m, s.exports[c[R]]), w;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}();
|
|
171
|
+
function de(b, a) {
|
|
172
|
+
if (a === Pe)
|
|
173
|
+
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), b;
|
|
174
|
+
if (a === Z || a === ge) {
|
|
175
|
+
let e = b.getIndex();
|
|
176
|
+
if (e === null) {
|
|
177
|
+
const i = [], o = b.getAttribute("position");
|
|
178
|
+
if (o !== void 0) {
|
|
179
|
+
for (let r = 0; r < o.count; r++)
|
|
180
|
+
i.push(r);
|
|
181
|
+
b.setIndex(i), e = b.getIndex();
|
|
182
|
+
} else
|
|
183
|
+
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), b;
|
|
184
|
+
}
|
|
185
|
+
const n = e.count - 2, t = [];
|
|
186
|
+
if (a === Z)
|
|
187
|
+
for (let i = 1; i <= n; i++)
|
|
188
|
+
t.push(e.getX(0)), t.push(e.getX(i)), t.push(e.getX(i + 1));
|
|
189
|
+
else
|
|
190
|
+
for (let i = 0; i < n; i++)
|
|
191
|
+
i % 2 === 0 ? (t.push(e.getX(i)), t.push(e.getX(i + 1)), t.push(e.getX(i + 2))) : (t.push(e.getX(i + 2)), t.push(e.getX(i + 1)), t.push(e.getX(i)));
|
|
192
|
+
t.length / 3 !== n && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
|
|
193
|
+
const s = b.clone();
|
|
194
|
+
return s.setIndex(t), s.clearGroups(), s;
|
|
195
|
+
} else
|
|
196
|
+
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", a), b;
|
|
197
|
+
}
|
|
198
|
+
class wa extends _e {
|
|
199
|
+
constructor(a) {
|
|
200
|
+
super(a), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(e) {
|
|
201
|
+
return new va(e);
|
|
202
|
+
}), this.register(function(e) {
|
|
203
|
+
return new Oa(e);
|
|
204
|
+
}), this.register(function(e) {
|
|
205
|
+
return new Ha(e);
|
|
206
|
+
}), this.register(function(e) {
|
|
207
|
+
return new Na(e);
|
|
208
|
+
}), this.register(function(e) {
|
|
209
|
+
return new Ka(e);
|
|
210
|
+
}), this.register(function(e) {
|
|
211
|
+
return new ya(e);
|
|
212
|
+
}), this.register(function(e) {
|
|
213
|
+
return new Ga(e);
|
|
214
|
+
}), this.register(function(e) {
|
|
215
|
+
return new Ma(e);
|
|
216
|
+
}), this.register(function(e) {
|
|
217
|
+
return new Pa(e);
|
|
218
|
+
}), this.register(function(e) {
|
|
219
|
+
return new Fa(e);
|
|
220
|
+
}), this.register(function(e) {
|
|
221
|
+
return new _a(e);
|
|
222
|
+
}), this.register(function(e) {
|
|
223
|
+
return new La(e);
|
|
224
|
+
}), this.register(function(e) {
|
|
225
|
+
return new Da(e);
|
|
226
|
+
}), this.register(function(e) {
|
|
227
|
+
return new Ca(e);
|
|
228
|
+
}), this.register(function(e) {
|
|
229
|
+
return new ja(e);
|
|
230
|
+
}), this.register(function(e) {
|
|
231
|
+
return new Ba(e);
|
|
232
|
+
}), this.register(function(e) {
|
|
233
|
+
return new Ia(e);
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
load(a, e, n, t) {
|
|
237
|
+
const s = this;
|
|
238
|
+
let i;
|
|
239
|
+
if (this.resourcePath !== "")
|
|
240
|
+
i = this.resourcePath;
|
|
241
|
+
else if (this.path !== "") {
|
|
242
|
+
const c = B.extractUrlBase(a);
|
|
243
|
+
i = B.resolveURL(c, this.path);
|
|
244
|
+
} else
|
|
245
|
+
i = B.extractUrlBase(a);
|
|
246
|
+
this.manager.itemStart(a);
|
|
247
|
+
const o = function(c) {
|
|
248
|
+
t ? t(c) : console.error(c), s.manager.itemError(a), s.manager.itemEnd(a);
|
|
249
|
+
}, r = new me(this.manager);
|
|
250
|
+
r.setPath(this.path), r.setResponseType("arraybuffer"), r.setRequestHeader(this.requestHeader), r.setWithCredentials(this.withCredentials), r.load(a, function(c) {
|
|
251
|
+
try {
|
|
252
|
+
s.parse(c, i, function(d) {
|
|
253
|
+
e(d), s.manager.itemEnd(a);
|
|
254
|
+
}, o);
|
|
255
|
+
} catch (d) {
|
|
256
|
+
o(d);
|
|
257
|
+
}
|
|
258
|
+
}, n, o);
|
|
259
|
+
}
|
|
260
|
+
setDRACOLoader(a) {
|
|
261
|
+
return this.dracoLoader = a, this;
|
|
262
|
+
}
|
|
263
|
+
setKTX2Loader(a) {
|
|
264
|
+
return this.ktx2Loader = a, this;
|
|
265
|
+
}
|
|
266
|
+
setMeshoptDecoder(a) {
|
|
267
|
+
return this.meshoptDecoder = a, this;
|
|
268
|
+
}
|
|
269
|
+
register(a) {
|
|
270
|
+
return this.pluginCallbacks.indexOf(a) === -1 && this.pluginCallbacks.push(a), this;
|
|
271
|
+
}
|
|
272
|
+
unregister(a) {
|
|
273
|
+
return this.pluginCallbacks.indexOf(a) !== -1 && this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(a), 1), this;
|
|
274
|
+
}
|
|
275
|
+
parse(a, e, n, t) {
|
|
276
|
+
let s;
|
|
277
|
+
const i = {}, o = {}, r = new TextDecoder();
|
|
278
|
+
if (typeof a == "string")
|
|
279
|
+
s = JSON.parse(a);
|
|
280
|
+
else if (a instanceof ArrayBuffer)
|
|
281
|
+
if (r.decode(new Uint8Array(a, 0, 4)) === Fe) {
|
|
282
|
+
try {
|
|
283
|
+
i[k.KHR_BINARY_GLTF] = new qa(a);
|
|
284
|
+
} catch (l) {
|
|
285
|
+
t && t(l);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
s = JSON.parse(i[k.KHR_BINARY_GLTF].content);
|
|
289
|
+
} else
|
|
290
|
+
s = JSON.parse(r.decode(a));
|
|
291
|
+
else
|
|
292
|
+
s = a;
|
|
293
|
+
if (s.asset === void 0 || s.asset.version[0] < 2) {
|
|
294
|
+
t && t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
const c = new tt(s, {
|
|
298
|
+
path: e || this.resourcePath || "",
|
|
299
|
+
crossOrigin: this.crossOrigin,
|
|
300
|
+
requestHeader: this.requestHeader,
|
|
301
|
+
manager: this.manager,
|
|
302
|
+
ktx2Loader: this.ktx2Loader,
|
|
303
|
+
meshoptDecoder: this.meshoptDecoder
|
|
304
|
+
});
|
|
305
|
+
c.fileLoader.setRequestHeader(this.requestHeader);
|
|
306
|
+
for (let d = 0; d < this.pluginCallbacks.length; d++) {
|
|
307
|
+
const l = this.pluginCallbacks[d](c);
|
|
308
|
+
l.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), o[l.name] = l, i[l.name] = !0;
|
|
309
|
+
}
|
|
310
|
+
if (s.extensionsUsed)
|
|
311
|
+
for (let d = 0; d < s.extensionsUsed.length; ++d) {
|
|
312
|
+
const l = s.extensionsUsed[d], f = s.extensionsRequired || [];
|
|
313
|
+
switch (l) {
|
|
314
|
+
case k.KHR_MATERIALS_UNLIT:
|
|
315
|
+
i[l] = new Sa();
|
|
316
|
+
break;
|
|
317
|
+
case k.KHR_DRACO_MESH_COMPRESSION:
|
|
318
|
+
i[l] = new za(s, this.dracoLoader);
|
|
319
|
+
break;
|
|
320
|
+
case k.KHR_TEXTURE_TRANSFORM:
|
|
321
|
+
i[l] = new Ua();
|
|
322
|
+
break;
|
|
323
|
+
case k.KHR_MESH_QUANTIZATION:
|
|
324
|
+
i[l] = new Qa();
|
|
325
|
+
break;
|
|
326
|
+
default:
|
|
327
|
+
f.indexOf(l) >= 0 && o[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
c.setExtensions(i), c.setPlugins(o), c.parse(n, t);
|
|
331
|
+
}
|
|
332
|
+
parseAsync(a, e) {
|
|
333
|
+
const n = this;
|
|
334
|
+
return new Promise(function(t, s) {
|
|
335
|
+
n.parse(a, e, t, s);
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function Ea() {
|
|
340
|
+
let b = {};
|
|
341
|
+
return {
|
|
342
|
+
get: function(a) {
|
|
343
|
+
return b[a];
|
|
344
|
+
},
|
|
345
|
+
add: function(a, e) {
|
|
346
|
+
b[a] = e;
|
|
347
|
+
},
|
|
348
|
+
remove: function(a) {
|
|
349
|
+
delete b[a];
|
|
350
|
+
},
|
|
351
|
+
removeAll: function() {
|
|
352
|
+
b = {};
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
const k = {
|
|
357
|
+
KHR_BINARY_GLTF: "KHR_binary_glTF",
|
|
358
|
+
KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
|
|
359
|
+
KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
|
|
360
|
+
KHR_MATERIALS_CLEARCOAT: "KHR_materials_clearcoat",
|
|
361
|
+
KHR_MATERIALS_DISPERSION: "KHR_materials_dispersion",
|
|
362
|
+
KHR_MATERIALS_IOR: "KHR_materials_ior",
|
|
363
|
+
KHR_MATERIALS_SHEEN: "KHR_materials_sheen",
|
|
364
|
+
KHR_MATERIALS_SPECULAR: "KHR_materials_specular",
|
|
365
|
+
KHR_MATERIALS_TRANSMISSION: "KHR_materials_transmission",
|
|
366
|
+
KHR_MATERIALS_IRIDESCENCE: "KHR_materials_iridescence",
|
|
367
|
+
KHR_MATERIALS_ANISOTROPY: "KHR_materials_anisotropy",
|
|
368
|
+
KHR_MATERIALS_UNLIT: "KHR_materials_unlit",
|
|
369
|
+
KHR_MATERIALS_VOLUME: "KHR_materials_volume",
|
|
370
|
+
KHR_TEXTURE_BASISU: "KHR_texture_basisu",
|
|
371
|
+
KHR_TEXTURE_TRANSFORM: "KHR_texture_transform",
|
|
372
|
+
KHR_MESH_QUANTIZATION: "KHR_mesh_quantization",
|
|
373
|
+
KHR_MATERIALS_EMISSIVE_STRENGTH: "KHR_materials_emissive_strength",
|
|
374
|
+
EXT_MATERIALS_BUMP: "EXT_materials_bump",
|
|
375
|
+
EXT_TEXTURE_WEBP: "EXT_texture_webp",
|
|
376
|
+
EXT_TEXTURE_AVIF: "EXT_texture_avif",
|
|
377
|
+
EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
|
|
378
|
+
EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
|
|
379
|
+
};
|
|
380
|
+
class ja {
|
|
381
|
+
constructor(a) {
|
|
382
|
+
this.parser = a, this.name = k.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
|
|
383
|
+
}
|
|
384
|
+
_markDefs() {
|
|
385
|
+
const a = this.parser, e = this.parser.json.nodes || [];
|
|
386
|
+
for (let n = 0, t = e.length; n < t; n++) {
|
|
387
|
+
const s = e[n];
|
|
388
|
+
s.extensions && s.extensions[this.name] && s.extensions[this.name].light !== void 0 && a._addNodeRef(this.cache, s.extensions[this.name].light);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
_loadLight(a) {
|
|
392
|
+
const e = this.parser, n = "light:" + a;
|
|
393
|
+
let t = e.cache.get(n);
|
|
394
|
+
if (t) return t;
|
|
395
|
+
const s = e.json, r = ((s.extensions && s.extensions[this.name] || {}).lights || [])[a];
|
|
396
|
+
let c;
|
|
397
|
+
const d = new _(16777215);
|
|
398
|
+
r.color !== void 0 && d.setRGB(r.color[0], r.color[1], r.color[2], y);
|
|
399
|
+
const l = r.range !== void 0 ? r.range : 0;
|
|
400
|
+
switch (r.type) {
|
|
401
|
+
case "directional":
|
|
402
|
+
c = new He(d), c.target.position.set(0, 0, -1), c.add(c.target);
|
|
403
|
+
break;
|
|
404
|
+
case "point":
|
|
405
|
+
c = new De(d), c.distance = l;
|
|
406
|
+
break;
|
|
407
|
+
case "spot":
|
|
408
|
+
c = new Ce(d), c.distance = l, r.spot = r.spot || {}, r.spot.innerConeAngle = r.spot.innerConeAngle !== void 0 ? r.spot.innerConeAngle : 0, r.spot.outerConeAngle = r.spot.outerConeAngle !== void 0 ? r.spot.outerConeAngle : Math.PI / 4, c.angle = r.spot.outerConeAngle, c.penumbra = 1 - r.spot.innerConeAngle / r.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
|
|
409
|
+
break;
|
|
410
|
+
default:
|
|
411
|
+
throw new Error("THREE.GLTFLoader: Unexpected light type: " + r.type);
|
|
412
|
+
}
|
|
413
|
+
return c.position.set(0, 0, 0), L(c, r), r.intensity !== void 0 && (c.intensity = r.intensity), c.name = e.createUniqueName(r.name || "light_" + a), t = Promise.resolve(c), e.cache.add(n, t), t;
|
|
414
|
+
}
|
|
415
|
+
getDependency(a, e) {
|
|
416
|
+
if (a === "light")
|
|
417
|
+
return this._loadLight(e);
|
|
418
|
+
}
|
|
419
|
+
createNodeAttachment(a) {
|
|
420
|
+
const e = this, n = this.parser, s = n.json.nodes[a], o = (s.extensions && s.extensions[this.name] || {}).light;
|
|
421
|
+
return o === void 0 ? null : this._loadLight(o).then(function(r) {
|
|
422
|
+
return n._getNodeRef(e.cache, o, r);
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
class Sa {
|
|
427
|
+
constructor() {
|
|
428
|
+
this.name = k.KHR_MATERIALS_UNLIT;
|
|
429
|
+
}
|
|
430
|
+
getMaterialType() {
|
|
431
|
+
return K;
|
|
432
|
+
}
|
|
433
|
+
extendParams(a, e, n) {
|
|
434
|
+
const t = [];
|
|
435
|
+
a.color = new _(1, 1, 1), a.opacity = 1;
|
|
436
|
+
const s = e.pbrMetallicRoughness;
|
|
437
|
+
if (s) {
|
|
438
|
+
if (Array.isArray(s.baseColorFactor)) {
|
|
439
|
+
const i = s.baseColorFactor;
|
|
440
|
+
a.color.setRGB(i[0], i[1], i[2], y), a.opacity = i[3];
|
|
441
|
+
}
|
|
442
|
+
s.baseColorTexture !== void 0 && t.push(n.assignTexture(a, "map", s.baseColorTexture, I));
|
|
443
|
+
}
|
|
444
|
+
return Promise.all(t);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
class Fa {
|
|
448
|
+
constructor(a) {
|
|
449
|
+
this.parser = a, this.name = k.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
450
|
+
}
|
|
451
|
+
extendMaterialParams(a, e) {
|
|
452
|
+
const t = this.parser.json.materials[a];
|
|
453
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
454
|
+
return Promise.resolve();
|
|
455
|
+
const s = t.extensions[this.name].emissiveStrength;
|
|
456
|
+
return s !== void 0 && (e.emissiveIntensity = s), Promise.resolve();
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
class va {
|
|
460
|
+
constructor(a) {
|
|
461
|
+
this.parser = a, this.name = k.KHR_MATERIALS_CLEARCOAT;
|
|
462
|
+
}
|
|
463
|
+
getMaterialType(a) {
|
|
464
|
+
const n = this.parser.json.materials[a];
|
|
465
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
466
|
+
}
|
|
467
|
+
extendMaterialParams(a, e) {
|
|
468
|
+
const n = this.parser, t = n.json.materials[a];
|
|
469
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
470
|
+
return Promise.resolve();
|
|
471
|
+
const s = [], i = t.extensions[this.name];
|
|
472
|
+
if (i.clearcoatFactor !== void 0 && (e.clearcoat = i.clearcoatFactor), i.clearcoatTexture !== void 0 && s.push(n.assignTexture(e, "clearcoatMap", i.clearcoatTexture)), i.clearcoatRoughnessFactor !== void 0 && (e.clearcoatRoughness = i.clearcoatRoughnessFactor), i.clearcoatRoughnessTexture !== void 0 && s.push(n.assignTexture(e, "clearcoatRoughnessMap", i.clearcoatRoughnessTexture)), i.clearcoatNormalTexture !== void 0 && (s.push(n.assignTexture(e, "clearcoatNormalMap", i.clearcoatNormalTexture)), i.clearcoatNormalTexture.scale !== void 0)) {
|
|
473
|
+
const o = i.clearcoatNormalTexture.scale;
|
|
474
|
+
e.clearcoatNormalScale = new Ae(o, o);
|
|
475
|
+
}
|
|
476
|
+
return Promise.all(s);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
class Oa {
|
|
480
|
+
constructor(a) {
|
|
481
|
+
this.parser = a, this.name = k.KHR_MATERIALS_DISPERSION;
|
|
482
|
+
}
|
|
483
|
+
getMaterialType(a) {
|
|
484
|
+
const n = this.parser.json.materials[a];
|
|
485
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
486
|
+
}
|
|
487
|
+
extendMaterialParams(a, e) {
|
|
488
|
+
const t = this.parser.json.materials[a];
|
|
489
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
490
|
+
return Promise.resolve();
|
|
491
|
+
const s = t.extensions[this.name];
|
|
492
|
+
return e.dispersion = s.dispersion !== void 0 ? s.dispersion : 0, Promise.resolve();
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
class La {
|
|
496
|
+
constructor(a) {
|
|
497
|
+
this.parser = a, this.name = k.KHR_MATERIALS_IRIDESCENCE;
|
|
498
|
+
}
|
|
499
|
+
getMaterialType(a) {
|
|
500
|
+
const n = this.parser.json.materials[a];
|
|
501
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
502
|
+
}
|
|
503
|
+
extendMaterialParams(a, e) {
|
|
504
|
+
const n = this.parser, t = n.json.materials[a];
|
|
505
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
506
|
+
return Promise.resolve();
|
|
507
|
+
const s = [], i = t.extensions[this.name];
|
|
508
|
+
return i.iridescenceFactor !== void 0 && (e.iridescence = i.iridescenceFactor), i.iridescenceTexture !== void 0 && s.push(n.assignTexture(e, "iridescenceMap", i.iridescenceTexture)), i.iridescenceIor !== void 0 && (e.iridescenceIOR = i.iridescenceIor), e.iridescenceThicknessRange === void 0 && (e.iridescenceThicknessRange = [100, 400]), i.iridescenceThicknessMinimum !== void 0 && (e.iridescenceThicknessRange[0] = i.iridescenceThicknessMinimum), i.iridescenceThicknessMaximum !== void 0 && (e.iridescenceThicknessRange[1] = i.iridescenceThicknessMaximum), i.iridescenceThicknessTexture !== void 0 && s.push(n.assignTexture(e, "iridescenceThicknessMap", i.iridescenceThicknessTexture)), Promise.all(s);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
class ya {
|
|
512
|
+
constructor(a) {
|
|
513
|
+
this.parser = a, this.name = k.KHR_MATERIALS_SHEEN;
|
|
514
|
+
}
|
|
515
|
+
getMaterialType(a) {
|
|
516
|
+
const n = this.parser.json.materials[a];
|
|
517
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
518
|
+
}
|
|
519
|
+
extendMaterialParams(a, e) {
|
|
520
|
+
const n = this.parser, t = n.json.materials[a];
|
|
521
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
522
|
+
return Promise.resolve();
|
|
523
|
+
const s = [];
|
|
524
|
+
e.sheenColor = new _(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
|
|
525
|
+
const i = t.extensions[this.name];
|
|
526
|
+
if (i.sheenColorFactor !== void 0) {
|
|
527
|
+
const o = i.sheenColorFactor;
|
|
528
|
+
e.sheenColor.setRGB(o[0], o[1], o[2], y);
|
|
529
|
+
}
|
|
530
|
+
return i.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = i.sheenRoughnessFactor), i.sheenColorTexture !== void 0 && s.push(n.assignTexture(e, "sheenColorMap", i.sheenColorTexture, I)), i.sheenRoughnessTexture !== void 0 && s.push(n.assignTexture(e, "sheenRoughnessMap", i.sheenRoughnessTexture)), Promise.all(s);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
class Ga {
|
|
534
|
+
constructor(a) {
|
|
535
|
+
this.parser = a, this.name = k.KHR_MATERIALS_TRANSMISSION;
|
|
536
|
+
}
|
|
537
|
+
getMaterialType(a) {
|
|
538
|
+
const n = this.parser.json.materials[a];
|
|
539
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
540
|
+
}
|
|
541
|
+
extendMaterialParams(a, e) {
|
|
542
|
+
const n = this.parser, t = n.json.materials[a];
|
|
543
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
544
|
+
return Promise.resolve();
|
|
545
|
+
const s = [], i = t.extensions[this.name];
|
|
546
|
+
return i.transmissionFactor !== void 0 && (e.transmission = i.transmissionFactor), i.transmissionTexture !== void 0 && s.push(n.assignTexture(e, "transmissionMap", i.transmissionTexture)), Promise.all(s);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
class Ma {
|
|
550
|
+
constructor(a) {
|
|
551
|
+
this.parser = a, this.name = k.KHR_MATERIALS_VOLUME;
|
|
552
|
+
}
|
|
553
|
+
getMaterialType(a) {
|
|
554
|
+
const n = this.parser.json.materials[a];
|
|
555
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
556
|
+
}
|
|
557
|
+
extendMaterialParams(a, e) {
|
|
558
|
+
const n = this.parser, t = n.json.materials[a];
|
|
559
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
560
|
+
return Promise.resolve();
|
|
561
|
+
const s = [], i = t.extensions[this.name];
|
|
562
|
+
e.thickness = i.thicknessFactor !== void 0 ? i.thicknessFactor : 0, i.thicknessTexture !== void 0 && s.push(n.assignTexture(e, "thicknessMap", i.thicknessTexture)), e.attenuationDistance = i.attenuationDistance || 1 / 0;
|
|
563
|
+
const o = i.attenuationColor || [1, 1, 1];
|
|
564
|
+
return e.attenuationColor = new _().setRGB(o[0], o[1], o[2], y), Promise.all(s);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
class Pa {
|
|
568
|
+
constructor(a) {
|
|
569
|
+
this.parser = a, this.name = k.KHR_MATERIALS_IOR;
|
|
570
|
+
}
|
|
571
|
+
getMaterialType(a) {
|
|
572
|
+
const n = this.parser.json.materials[a];
|
|
573
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
574
|
+
}
|
|
575
|
+
extendMaterialParams(a, e) {
|
|
576
|
+
const t = this.parser.json.materials[a];
|
|
577
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
578
|
+
return Promise.resolve();
|
|
579
|
+
const s = t.extensions[this.name];
|
|
580
|
+
return e.ior = s.ior !== void 0 ? s.ior : 1.5, Promise.resolve();
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
class _a {
|
|
584
|
+
constructor(a) {
|
|
585
|
+
this.parser = a, this.name = k.KHR_MATERIALS_SPECULAR;
|
|
586
|
+
}
|
|
587
|
+
getMaterialType(a) {
|
|
588
|
+
const n = this.parser.json.materials[a];
|
|
589
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
590
|
+
}
|
|
591
|
+
extendMaterialParams(a, e) {
|
|
592
|
+
const n = this.parser, t = n.json.materials[a];
|
|
593
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
594
|
+
return Promise.resolve();
|
|
595
|
+
const s = [], i = t.extensions[this.name];
|
|
596
|
+
e.specularIntensity = i.specularFactor !== void 0 ? i.specularFactor : 1, i.specularTexture !== void 0 && s.push(n.assignTexture(e, "specularIntensityMap", i.specularTexture));
|
|
597
|
+
const o = i.specularColorFactor || [1, 1, 1];
|
|
598
|
+
return e.specularColor = new _().setRGB(o[0], o[1], o[2], y), i.specularColorTexture !== void 0 && s.push(n.assignTexture(e, "specularColorMap", i.specularColorTexture, I)), Promise.all(s);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
class Ca {
|
|
602
|
+
constructor(a) {
|
|
603
|
+
this.parser = a, this.name = k.EXT_MATERIALS_BUMP;
|
|
604
|
+
}
|
|
605
|
+
getMaterialType(a) {
|
|
606
|
+
const n = this.parser.json.materials[a];
|
|
607
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
608
|
+
}
|
|
609
|
+
extendMaterialParams(a, e) {
|
|
610
|
+
const n = this.parser, t = n.json.materials[a];
|
|
611
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
612
|
+
return Promise.resolve();
|
|
613
|
+
const s = [], i = t.extensions[this.name];
|
|
614
|
+
return e.bumpScale = i.bumpFactor !== void 0 ? i.bumpFactor : 1, i.bumpTexture !== void 0 && s.push(n.assignTexture(e, "bumpMap", i.bumpTexture)), Promise.all(s);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
class Da {
|
|
618
|
+
constructor(a) {
|
|
619
|
+
this.parser = a, this.name = k.KHR_MATERIALS_ANISOTROPY;
|
|
620
|
+
}
|
|
621
|
+
getMaterialType(a) {
|
|
622
|
+
const n = this.parser.json.materials[a];
|
|
623
|
+
return !n.extensions || !n.extensions[this.name] ? null : v;
|
|
624
|
+
}
|
|
625
|
+
extendMaterialParams(a, e) {
|
|
626
|
+
const n = this.parser, t = n.json.materials[a];
|
|
627
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
628
|
+
return Promise.resolve();
|
|
629
|
+
const s = [], i = t.extensions[this.name];
|
|
630
|
+
return i.anisotropyStrength !== void 0 && (e.anisotropy = i.anisotropyStrength), i.anisotropyRotation !== void 0 && (e.anisotropyRotation = i.anisotropyRotation), i.anisotropyTexture !== void 0 && s.push(n.assignTexture(e, "anisotropyMap", i.anisotropyTexture)), Promise.all(s);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
class Ha {
|
|
634
|
+
constructor(a) {
|
|
635
|
+
this.parser = a, this.name = k.KHR_TEXTURE_BASISU;
|
|
636
|
+
}
|
|
637
|
+
loadTexture(a) {
|
|
638
|
+
const e = this.parser, n = e.json, t = n.textures[a];
|
|
639
|
+
if (!t.extensions || !t.extensions[this.name])
|
|
640
|
+
return null;
|
|
641
|
+
const s = t.extensions[this.name], i = e.options.ktx2Loader;
|
|
642
|
+
if (!i) {
|
|
643
|
+
if (n.extensionsRequired && n.extensionsRequired.indexOf(this.name) >= 0)
|
|
644
|
+
throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");
|
|
645
|
+
return null;
|
|
646
|
+
}
|
|
647
|
+
return e.loadTextureImage(a, s.source, i);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
class Na {
|
|
651
|
+
constructor(a) {
|
|
652
|
+
this.parser = a, this.name = k.EXT_TEXTURE_WEBP, this.isSupported = null;
|
|
653
|
+
}
|
|
654
|
+
loadTexture(a) {
|
|
655
|
+
const e = this.name, n = this.parser, t = n.json, s = t.textures[a];
|
|
656
|
+
if (!s.extensions || !s.extensions[e])
|
|
657
|
+
return null;
|
|
658
|
+
const i = s.extensions[e], o = t.images[i.source];
|
|
659
|
+
let r = n.textureLoader;
|
|
660
|
+
if (o.uri) {
|
|
661
|
+
const c = n.options.manager.getHandler(o.uri);
|
|
662
|
+
c !== null && (r = c);
|
|
663
|
+
}
|
|
664
|
+
return this.detectSupport().then(function(c) {
|
|
665
|
+
if (c) return n.loadTextureImage(a, i.source, r);
|
|
666
|
+
if (t.extensionsRequired && t.extensionsRequired.indexOf(e) >= 0)
|
|
667
|
+
throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");
|
|
668
|
+
return n.loadTexture(a);
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
detectSupport() {
|
|
672
|
+
return this.isSupported || (this.isSupported = new Promise(function(a) {
|
|
673
|
+
const e = new Image();
|
|
674
|
+
e.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", e.onload = e.onerror = function() {
|
|
675
|
+
a(e.height === 1);
|
|
676
|
+
};
|
|
677
|
+
})), this.isSupported;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
class Ka {
|
|
681
|
+
constructor(a) {
|
|
682
|
+
this.parser = a, this.name = k.EXT_TEXTURE_AVIF, this.isSupported = null;
|
|
683
|
+
}
|
|
684
|
+
loadTexture(a) {
|
|
685
|
+
const e = this.name, n = this.parser, t = n.json, s = t.textures[a];
|
|
686
|
+
if (!s.extensions || !s.extensions[e])
|
|
687
|
+
return null;
|
|
688
|
+
const i = s.extensions[e], o = t.images[i.source];
|
|
689
|
+
let r = n.textureLoader;
|
|
690
|
+
if (o.uri) {
|
|
691
|
+
const c = n.options.manager.getHandler(o.uri);
|
|
692
|
+
c !== null && (r = c);
|
|
693
|
+
}
|
|
694
|
+
return this.detectSupport().then(function(c) {
|
|
695
|
+
if (c) return n.loadTextureImage(a, i.source, r);
|
|
696
|
+
if (t.extensionsRequired && t.extensionsRequired.indexOf(e) >= 0)
|
|
697
|
+
throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");
|
|
698
|
+
return n.loadTexture(a);
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
detectSupport() {
|
|
702
|
+
return this.isSupported || (this.isSupported = new Promise(function(a) {
|
|
703
|
+
const e = new Image();
|
|
704
|
+
e.src = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=", e.onload = e.onerror = function() {
|
|
705
|
+
a(e.height === 1);
|
|
706
|
+
};
|
|
707
|
+
})), this.isSupported;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
class Ba {
|
|
711
|
+
constructor(a) {
|
|
712
|
+
this.name = k.EXT_MESHOPT_COMPRESSION, this.parser = a;
|
|
713
|
+
}
|
|
714
|
+
loadBufferView(a) {
|
|
715
|
+
const e = this.parser.json, n = e.bufferViews[a];
|
|
716
|
+
if (n.extensions && n.extensions[this.name]) {
|
|
717
|
+
const t = n.extensions[this.name], s = this.parser.getDependency("buffer", t.buffer), i = this.parser.options.meshoptDecoder;
|
|
718
|
+
if (!i || !i.supported) {
|
|
719
|
+
if (e.extensionsRequired && e.extensionsRequired.indexOf(this.name) >= 0)
|
|
720
|
+
throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");
|
|
721
|
+
return null;
|
|
722
|
+
}
|
|
723
|
+
return s.then(function(o) {
|
|
724
|
+
const r = t.byteOffset || 0, c = t.byteLength || 0, d = t.count, l = t.byteStride, f = new Uint8Array(o, r, c);
|
|
725
|
+
return i.decodeGltfBufferAsync ? i.decodeGltfBufferAsync(d, l, f, t.mode, t.filter).then(function(h) {
|
|
726
|
+
return h.buffer;
|
|
727
|
+
}) : i.ready.then(function() {
|
|
728
|
+
const h = new ArrayBuffer(d * l);
|
|
729
|
+
return i.decodeGltfBuffer(new Uint8Array(h), d, l, f, t.mode, t.filter), h;
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
} else
|
|
733
|
+
return null;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
class Ia {
|
|
737
|
+
constructor(a) {
|
|
738
|
+
this.name = k.EXT_MESH_GPU_INSTANCING, this.parser = a;
|
|
739
|
+
}
|
|
740
|
+
createNodeMesh(a) {
|
|
741
|
+
const e = this.parser.json, n = e.nodes[a];
|
|
742
|
+
if (!n.extensions || !n.extensions[this.name] || n.mesh === void 0)
|
|
743
|
+
return null;
|
|
744
|
+
const t = e.meshes[n.mesh];
|
|
745
|
+
for (const c of t.primitives)
|
|
746
|
+
if (c.mode !== S.TRIANGLES && c.mode !== S.TRIANGLE_STRIP && c.mode !== S.TRIANGLE_FAN && c.mode !== void 0)
|
|
747
|
+
return null;
|
|
748
|
+
const i = n.extensions[this.name].attributes, o = [], r = {};
|
|
749
|
+
for (const c in i)
|
|
750
|
+
o.push(this.parser.getDependency("accessor", i[c]).then((d) => (r[c] = d, r[c])));
|
|
751
|
+
return o.length < 1 ? null : (o.push(this.parser.createNodeMesh(a)), Promise.all(o).then((c) => {
|
|
752
|
+
const d = c.pop(), l = d.isGroup ? d.children : [d], f = c[0].count, h = [];
|
|
753
|
+
for (const x of l) {
|
|
754
|
+
const T = new q(), A = new C(), u = new xe(), p = new C(1, 1, 1), m = new Ne(x.geometry, x.material, f);
|
|
755
|
+
for (let g = 0; g < f; g++)
|
|
756
|
+
r.TRANSLATION && A.fromBufferAttribute(r.TRANSLATION, g), r.ROTATION && u.fromBufferAttribute(r.ROTATION, g), r.SCALE && p.fromBufferAttribute(r.SCALE, g), m.setMatrixAt(g, T.compose(A, u, p));
|
|
757
|
+
for (const g in r)
|
|
758
|
+
if (g === "_COLOR_0") {
|
|
759
|
+
const R = r[g];
|
|
760
|
+
m.instanceColor = new Ke(R.array, R.itemSize, R.normalized);
|
|
761
|
+
} else g !== "TRANSLATION" && g !== "ROTATION" && g !== "SCALE" && x.geometry.setAttribute(g, r[g]);
|
|
762
|
+
ke.prototype.copy.call(m, x), this.parser.assignFinalMaterial(m), h.push(m);
|
|
763
|
+
}
|
|
764
|
+
return d.isGroup ? (d.clear(), d.add(...h), d) : h[0];
|
|
765
|
+
}));
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
const Fe = "glTF", N = 12, fe = { JSON: 1313821514, BIN: 5130562 };
|
|
769
|
+
class qa {
|
|
770
|
+
constructor(a) {
|
|
771
|
+
this.name = k.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
772
|
+
const e = new DataView(a, 0, N), n = new TextDecoder();
|
|
773
|
+
if (this.header = {
|
|
774
|
+
magic: n.decode(new Uint8Array(a.slice(0, 4))),
|
|
775
|
+
version: e.getUint32(4, !0),
|
|
776
|
+
length: e.getUint32(8, !0)
|
|
777
|
+
}, this.header.magic !== Fe)
|
|
778
|
+
throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
|
|
779
|
+
if (this.header.version < 2)
|
|
780
|
+
throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
|
|
781
|
+
const t = this.header.length - N, s = new DataView(a, N);
|
|
782
|
+
let i = 0;
|
|
783
|
+
for (; i < t; ) {
|
|
784
|
+
const o = s.getUint32(i, !0);
|
|
785
|
+
i += 4;
|
|
786
|
+
const r = s.getUint32(i, !0);
|
|
787
|
+
if (i += 4, r === fe.JSON) {
|
|
788
|
+
const c = new Uint8Array(a, N + i, o);
|
|
789
|
+
this.content = n.decode(c);
|
|
790
|
+
} else if (r === fe.BIN) {
|
|
791
|
+
const c = N + i;
|
|
792
|
+
this.body = a.slice(c, c + o);
|
|
793
|
+
}
|
|
794
|
+
i += o;
|
|
795
|
+
}
|
|
796
|
+
if (this.content === null)
|
|
797
|
+
throw new Error("THREE.GLTFLoader: JSON content not found.");
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
class za {
|
|
801
|
+
constructor(a, e) {
|
|
802
|
+
if (!e)
|
|
803
|
+
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
804
|
+
this.name = k.KHR_DRACO_MESH_COMPRESSION, this.json = a, this.dracoLoader = e, this.dracoLoader.preload();
|
|
805
|
+
}
|
|
806
|
+
decodePrimitive(a, e) {
|
|
807
|
+
const n = this.json, t = this.dracoLoader, s = a.extensions[this.name].bufferView, i = a.extensions[this.name].attributes, o = {}, r = {}, c = {};
|
|
808
|
+
for (const d in i) {
|
|
809
|
+
const l = ae[d] || d.toLowerCase();
|
|
810
|
+
o[l] = i[d];
|
|
811
|
+
}
|
|
812
|
+
for (const d in a.attributes) {
|
|
813
|
+
const l = ae[d] || d.toLowerCase();
|
|
814
|
+
if (i[d] !== void 0) {
|
|
815
|
+
const f = n.accessors[a.attributes[d]], h = D[f.componentType];
|
|
816
|
+
c[l] = h.name, r[l] = f.normalized === !0;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return e.getDependency("bufferView", s).then(function(d) {
|
|
820
|
+
return new Promise(function(l, f) {
|
|
821
|
+
t.decodeDracoFile(d, function(h) {
|
|
822
|
+
for (const x in h.attributes) {
|
|
823
|
+
const T = h.attributes[x], A = r[x];
|
|
824
|
+
A !== void 0 && (T.normalized = A);
|
|
825
|
+
}
|
|
826
|
+
l(h);
|
|
827
|
+
}, o, c, y, f);
|
|
828
|
+
});
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
class Ua {
|
|
833
|
+
constructor() {
|
|
834
|
+
this.name = k.KHR_TEXTURE_TRANSFORM;
|
|
835
|
+
}
|
|
836
|
+
extendTexture(a, e) {
|
|
837
|
+
return (e.texCoord === void 0 || e.texCoord === a.channel) && e.offset === void 0 && e.rotation === void 0 && e.scale === void 0 || (a = a.clone(), e.texCoord !== void 0 && (a.channel = e.texCoord), e.offset !== void 0 && a.offset.fromArray(e.offset), e.rotation !== void 0 && (a.rotation = e.rotation), e.scale !== void 0 && a.repeat.fromArray(e.scale), a.needsUpdate = !0), a;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
class Qa {
|
|
841
|
+
constructor() {
|
|
842
|
+
this.name = k.KHR_MESH_QUANTIZATION;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
class ve extends ua {
|
|
846
|
+
constructor(a, e, n, t) {
|
|
847
|
+
super(a, e, n, t);
|
|
848
|
+
}
|
|
849
|
+
copySampleValue_(a) {
|
|
850
|
+
const e = this.resultBuffer, n = this.sampleValues, t = this.valueSize, s = a * t * 3 + t;
|
|
851
|
+
for (let i = 0; i !== t; i++)
|
|
852
|
+
e[i] = n[s + i];
|
|
853
|
+
return e;
|
|
854
|
+
}
|
|
855
|
+
interpolate_(a, e, n, t) {
|
|
856
|
+
const s = this.resultBuffer, i = this.sampleValues, o = this.valueSize, r = o * 2, c = o * 3, d = t - e, l = (n - e) / d, f = l * l, h = f * l, x = a * c, T = x - c, A = -2 * h + 3 * f, u = h - f, p = 1 - A, m = u - f + l;
|
|
857
|
+
for (let g = 0; g !== o; g++) {
|
|
858
|
+
const R = i[T + g + o], w = i[T + g + r] * d, E = i[x + g + o], F = i[x + g] * d;
|
|
859
|
+
s[g] = p * R + m * w + A * E + u * F;
|
|
860
|
+
}
|
|
861
|
+
return s;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
const Wa = new xe();
|
|
865
|
+
class Va extends ve {
|
|
866
|
+
interpolate_(a, e, n, t) {
|
|
867
|
+
const s = super.interpolate_(a, e, n, t);
|
|
868
|
+
return Wa.fromArray(s).normalize().toArray(s), s;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
const S = {
|
|
872
|
+
POINTS: 0,
|
|
873
|
+
LINES: 1,
|
|
874
|
+
LINE_LOOP: 2,
|
|
875
|
+
LINE_STRIP: 3,
|
|
876
|
+
TRIANGLES: 4,
|
|
877
|
+
TRIANGLE_STRIP: 5,
|
|
878
|
+
TRIANGLE_FAN: 6
|
|
879
|
+
}, D = {
|
|
880
|
+
5120: Int8Array,
|
|
881
|
+
5121: Uint8Array,
|
|
882
|
+
5122: Int16Array,
|
|
883
|
+
5123: Uint16Array,
|
|
884
|
+
5125: Uint32Array,
|
|
885
|
+
5126: Float32Array
|
|
886
|
+
}, pe = {
|
|
887
|
+
9728: Re,
|
|
888
|
+
9729: $,
|
|
889
|
+
9984: We,
|
|
890
|
+
9985: Qe,
|
|
891
|
+
9986: Ue,
|
|
892
|
+
9987: Te
|
|
893
|
+
}, he = {
|
|
894
|
+
33071: Xe,
|
|
895
|
+
33648: Ve,
|
|
896
|
+
10497: ee
|
|
897
|
+
}, V = {
|
|
898
|
+
SCALAR: 1,
|
|
899
|
+
VEC2: 2,
|
|
900
|
+
VEC3: 3,
|
|
901
|
+
VEC4: 4,
|
|
902
|
+
MAT2: 4,
|
|
903
|
+
MAT3: 9,
|
|
904
|
+
MAT4: 16
|
|
905
|
+
}, ae = {
|
|
906
|
+
POSITION: "position",
|
|
907
|
+
NORMAL: "normal",
|
|
908
|
+
TANGENT: "tangent",
|
|
909
|
+
TEXCOORD_0: "uv",
|
|
910
|
+
TEXCOORD_1: "uv1",
|
|
911
|
+
TEXCOORD_2: "uv2",
|
|
912
|
+
TEXCOORD_3: "uv3",
|
|
913
|
+
COLOR_0: "color",
|
|
914
|
+
WEIGHTS_0: "skinWeight",
|
|
915
|
+
JOINTS_0: "skinIndex"
|
|
916
|
+
}, G = {
|
|
917
|
+
scale: "scale",
|
|
918
|
+
translation: "position",
|
|
919
|
+
rotation: "quaternion",
|
|
920
|
+
weights: "morphTargetInfluences"
|
|
921
|
+
}, Xa = {
|
|
922
|
+
CUBICSPLINE: void 0,
|
|
923
|
+
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
924
|
+
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
925
|
+
LINEAR: Ee,
|
|
926
|
+
STEP: pa
|
|
927
|
+
}, X = {
|
|
928
|
+
OPAQUE: "OPAQUE",
|
|
929
|
+
MASK: "MASK",
|
|
930
|
+
BLEND: "BLEND"
|
|
931
|
+
};
|
|
932
|
+
function Ja(b) {
|
|
933
|
+
return b.DefaultMaterial === void 0 && (b.DefaultMaterial = new we({
|
|
934
|
+
color: 16777215,
|
|
935
|
+
emissive: 0,
|
|
936
|
+
metalness: 1,
|
|
937
|
+
roughness: 1,
|
|
938
|
+
transparent: !1,
|
|
939
|
+
depthTest: !0,
|
|
940
|
+
side: ha
|
|
941
|
+
})), b.DefaultMaterial;
|
|
942
|
+
}
|
|
943
|
+
function M(b, a, e) {
|
|
944
|
+
for (const n in e.extensions)
|
|
945
|
+
b[n] === void 0 && (a.userData.gltfExtensions = a.userData.gltfExtensions || {}, a.userData.gltfExtensions[n] = e.extensions[n]);
|
|
946
|
+
}
|
|
947
|
+
function L(b, a) {
|
|
948
|
+
a.extras !== void 0 && (typeof a.extras == "object" ? Object.assign(b.userData, a.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + a.extras));
|
|
949
|
+
}
|
|
950
|
+
function Ya(b, a, e) {
|
|
951
|
+
let n = !1, t = !1, s = !1;
|
|
952
|
+
for (let c = 0, d = a.length; c < d; c++) {
|
|
953
|
+
const l = a[c];
|
|
954
|
+
if (l.POSITION !== void 0 && (n = !0), l.NORMAL !== void 0 && (t = !0), l.COLOR_0 !== void 0 && (s = !0), n && t && s) break;
|
|
955
|
+
}
|
|
956
|
+
if (!n && !t && !s) return Promise.resolve(b);
|
|
957
|
+
const i = [], o = [], r = [];
|
|
958
|
+
for (let c = 0, d = a.length; c < d; c++) {
|
|
959
|
+
const l = a[c];
|
|
960
|
+
if (n) {
|
|
961
|
+
const f = l.POSITION !== void 0 ? e.getDependency("accessor", l.POSITION) : b.attributes.position;
|
|
962
|
+
i.push(f);
|
|
963
|
+
}
|
|
964
|
+
if (t) {
|
|
965
|
+
const f = l.NORMAL !== void 0 ? e.getDependency("accessor", l.NORMAL) : b.attributes.normal;
|
|
966
|
+
o.push(f);
|
|
967
|
+
}
|
|
968
|
+
if (s) {
|
|
969
|
+
const f = l.COLOR_0 !== void 0 ? e.getDependency("accessor", l.COLOR_0) : b.attributes.color;
|
|
970
|
+
r.push(f);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
return Promise.all([
|
|
974
|
+
Promise.all(i),
|
|
975
|
+
Promise.all(o),
|
|
976
|
+
Promise.all(r)
|
|
977
|
+
]).then(function(c) {
|
|
978
|
+
const d = c[0], l = c[1], f = c[2];
|
|
979
|
+
return n && (b.morphAttributes.position = d), t && (b.morphAttributes.normal = l), s && (b.morphAttributes.color = f), b.morphTargetsRelative = !0, b;
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
function Za(b, a) {
|
|
983
|
+
if (b.updateMorphTargets(), a.weights !== void 0)
|
|
984
|
+
for (let e = 0, n = a.weights.length; e < n; e++)
|
|
985
|
+
b.morphTargetInfluences[e] = a.weights[e];
|
|
986
|
+
if (a.extras && Array.isArray(a.extras.targetNames)) {
|
|
987
|
+
const e = a.extras.targetNames;
|
|
988
|
+
if (b.morphTargetInfluences.length === e.length) {
|
|
989
|
+
b.morphTargetDictionary = {};
|
|
990
|
+
for (let n = 0, t = e.length; n < t; n++)
|
|
991
|
+
b.morphTargetDictionary[e[n]] = n;
|
|
992
|
+
} else
|
|
993
|
+
console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
function $a(b) {
|
|
997
|
+
let a;
|
|
998
|
+
const e = b.extensions && b.extensions[k.KHR_DRACO_MESH_COMPRESSION];
|
|
999
|
+
if (e ? a = "draco:" + e.bufferView + ":" + e.indices + ":" + J(e.attributes) : a = b.indices + ":" + J(b.attributes) + ":" + b.mode, b.targets !== void 0)
|
|
1000
|
+
for (let n = 0, t = b.targets.length; n < t; n++)
|
|
1001
|
+
a += ":" + J(b.targets[n]);
|
|
1002
|
+
return a;
|
|
1003
|
+
}
|
|
1004
|
+
function J(b) {
|
|
1005
|
+
let a = "";
|
|
1006
|
+
const e = Object.keys(b).sort();
|
|
1007
|
+
for (let n = 0, t = e.length; n < t; n++)
|
|
1008
|
+
a += e[n] + ":" + b[e[n]] + ";";
|
|
1009
|
+
return a;
|
|
1010
|
+
}
|
|
1011
|
+
function te(b) {
|
|
1012
|
+
switch (b) {
|
|
1013
|
+
case Int8Array:
|
|
1014
|
+
return 1 / 127;
|
|
1015
|
+
case Uint8Array:
|
|
1016
|
+
return 1 / 255;
|
|
1017
|
+
case Int16Array:
|
|
1018
|
+
return 1 / 32767;
|
|
1019
|
+
case Uint16Array:
|
|
1020
|
+
return 1 / 65535;
|
|
1021
|
+
default:
|
|
1022
|
+
throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
function et(b) {
|
|
1026
|
+
return b.search(/\.jpe?g($|\?)/i) > 0 || b.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : b.search(/\.webp($|\?)/i) > 0 || b.search(/^data\:image\/webp/) === 0 ? "image/webp" : b.search(/\.ktx2($|\?)/i) > 0 || b.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
|
|
1027
|
+
}
|
|
1028
|
+
const at = new q();
|
|
1029
|
+
class tt {
|
|
1030
|
+
constructor(a = {}, e = {}) {
|
|
1031
|
+
this.json = a, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new Ea(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
|
|
1032
|
+
let n = !1, t = -1, s = !1, i = -1;
|
|
1033
|
+
if (typeof navigator < "u") {
|
|
1034
|
+
const o = navigator.userAgent;
|
|
1035
|
+
n = /^((?!chrome|android).)*safari/i.test(o) === !0;
|
|
1036
|
+
const r = o.match(/Version\/(\d+)/);
|
|
1037
|
+
t = n && r ? parseInt(r[1], 10) : -1, s = o.indexOf("Firefox") > -1, i = s ? o.match(/Firefox\/([0-9]+)\./)[1] : -1;
|
|
1038
|
+
}
|
|
1039
|
+
typeof createImageBitmap > "u" || n && t < 17 || s && i < 98 ? this.textureLoader = new Be(this.options.manager) : this.textureLoader = new Ie(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new me(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
|
|
1040
|
+
}
|
|
1041
|
+
setExtensions(a) {
|
|
1042
|
+
this.extensions = a;
|
|
1043
|
+
}
|
|
1044
|
+
setPlugins(a) {
|
|
1045
|
+
this.plugins = a;
|
|
1046
|
+
}
|
|
1047
|
+
parse(a, e) {
|
|
1048
|
+
const n = this, t = this.json, s = this.extensions;
|
|
1049
|
+
this.cache.removeAll(), this.nodeCache = {}, this._invokeAll(function(i) {
|
|
1050
|
+
return i._markDefs && i._markDefs();
|
|
1051
|
+
}), Promise.all(this._invokeAll(function(i) {
|
|
1052
|
+
return i.beforeRoot && i.beforeRoot();
|
|
1053
|
+
})).then(function() {
|
|
1054
|
+
return Promise.all([
|
|
1055
|
+
n.getDependencies("scene"),
|
|
1056
|
+
n.getDependencies("animation"),
|
|
1057
|
+
n.getDependencies("camera")
|
|
1058
|
+
]);
|
|
1059
|
+
}).then(function(i) {
|
|
1060
|
+
const o = {
|
|
1061
|
+
scene: i[0][t.scene || 0],
|
|
1062
|
+
scenes: i[0],
|
|
1063
|
+
animations: i[1],
|
|
1064
|
+
cameras: i[2],
|
|
1065
|
+
asset: t.asset,
|
|
1066
|
+
parser: n,
|
|
1067
|
+
userData: {}
|
|
1068
|
+
};
|
|
1069
|
+
return M(s, o, t), L(o, t), Promise.all(n._invokeAll(function(r) {
|
|
1070
|
+
return r.afterRoot && r.afterRoot(o);
|
|
1071
|
+
})).then(function() {
|
|
1072
|
+
for (const r of o.scenes)
|
|
1073
|
+
r.updateMatrixWorld();
|
|
1074
|
+
a(o);
|
|
1075
|
+
});
|
|
1076
|
+
}).catch(e);
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Marks the special nodes/meshes in json for efficient parse.
|
|
1080
|
+
*/
|
|
1081
|
+
_markDefs() {
|
|
1082
|
+
const a = this.json.nodes || [], e = this.json.skins || [], n = this.json.meshes || [];
|
|
1083
|
+
for (let t = 0, s = e.length; t < s; t++) {
|
|
1084
|
+
const i = e[t].joints;
|
|
1085
|
+
for (let o = 0, r = i.length; o < r; o++)
|
|
1086
|
+
a[i[o]].isBone = !0;
|
|
1087
|
+
}
|
|
1088
|
+
for (let t = 0, s = a.length; t < s; t++) {
|
|
1089
|
+
const i = a[t];
|
|
1090
|
+
i.mesh !== void 0 && (this._addNodeRef(this.meshCache, i.mesh), i.skin !== void 0 && (n[i.mesh].isSkinnedMesh = !0)), i.camera !== void 0 && this._addNodeRef(this.cameraCache, i.camera);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* Counts references to shared node / Object3D resources. These resources
|
|
1095
|
+
* can be reused, or "instantiated", at multiple nodes in the scene
|
|
1096
|
+
* hierarchy. Mesh, Camera, and Light instances are instantiated and must
|
|
1097
|
+
* be marked. Non-scenegraph resources (like Materials, Geometries, and
|
|
1098
|
+
* Textures) can be reused directly and are not marked here.
|
|
1099
|
+
*
|
|
1100
|
+
* Example: CesiumMilkTruck sample model reuses "Wheel" meshes.
|
|
1101
|
+
*
|
|
1102
|
+
* @param {Object} cache
|
|
1103
|
+
* @param {Object3D} index
|
|
1104
|
+
*/
|
|
1105
|
+
_addNodeRef(a, e) {
|
|
1106
|
+
e !== void 0 && (a.refs[e] === void 0 && (a.refs[e] = a.uses[e] = 0), a.refs[e]++);
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* Returns a reference to a shared resource, cloning it if necessary.
|
|
1110
|
+
*
|
|
1111
|
+
* @param {Object} cache
|
|
1112
|
+
* @param {Number} index
|
|
1113
|
+
* @param {Object} object
|
|
1114
|
+
* @return {Object}
|
|
1115
|
+
*/
|
|
1116
|
+
_getNodeRef(a, e, n) {
|
|
1117
|
+
if (a.refs[e] <= 1) return n;
|
|
1118
|
+
const t = n.clone(), s = (i, o) => {
|
|
1119
|
+
const r = this.associations.get(i);
|
|
1120
|
+
r != null && this.associations.set(o, r);
|
|
1121
|
+
for (const [c, d] of i.children.entries())
|
|
1122
|
+
s(d, o.children[c]);
|
|
1123
|
+
};
|
|
1124
|
+
return s(n, t), t.name += "_instance_" + a.uses[e]++, t;
|
|
1125
|
+
}
|
|
1126
|
+
_invokeOne(a) {
|
|
1127
|
+
const e = Object.values(this.plugins);
|
|
1128
|
+
e.push(this);
|
|
1129
|
+
for (let n = 0; n < e.length; n++) {
|
|
1130
|
+
const t = a(e[n]);
|
|
1131
|
+
if (t) return t;
|
|
1132
|
+
}
|
|
1133
|
+
return null;
|
|
1134
|
+
}
|
|
1135
|
+
_invokeAll(a) {
|
|
1136
|
+
const e = Object.values(this.plugins);
|
|
1137
|
+
e.unshift(this);
|
|
1138
|
+
const n = [];
|
|
1139
|
+
for (let t = 0; t < e.length; t++) {
|
|
1140
|
+
const s = a(e[t]);
|
|
1141
|
+
s && n.push(s);
|
|
1142
|
+
}
|
|
1143
|
+
return n;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Requests the specified dependency asynchronously, with caching.
|
|
1147
|
+
* @param {string} type
|
|
1148
|
+
* @param {number} index
|
|
1149
|
+
* @return {Promise<Object3D|Material|THREE.Texture|AnimationClip|ArrayBuffer|Object>}
|
|
1150
|
+
*/
|
|
1151
|
+
getDependency(a, e) {
|
|
1152
|
+
const n = a + ":" + e;
|
|
1153
|
+
let t = this.cache.get(n);
|
|
1154
|
+
if (!t) {
|
|
1155
|
+
switch (a) {
|
|
1156
|
+
case "scene":
|
|
1157
|
+
t = this.loadScene(e);
|
|
1158
|
+
break;
|
|
1159
|
+
case "node":
|
|
1160
|
+
t = this._invokeOne(function(s) {
|
|
1161
|
+
return s.loadNode && s.loadNode(e);
|
|
1162
|
+
});
|
|
1163
|
+
break;
|
|
1164
|
+
case "mesh":
|
|
1165
|
+
t = this._invokeOne(function(s) {
|
|
1166
|
+
return s.loadMesh && s.loadMesh(e);
|
|
1167
|
+
});
|
|
1168
|
+
break;
|
|
1169
|
+
case "accessor":
|
|
1170
|
+
t = this.loadAccessor(e);
|
|
1171
|
+
break;
|
|
1172
|
+
case "bufferView":
|
|
1173
|
+
t = this._invokeOne(function(s) {
|
|
1174
|
+
return s.loadBufferView && s.loadBufferView(e);
|
|
1175
|
+
});
|
|
1176
|
+
break;
|
|
1177
|
+
case "buffer":
|
|
1178
|
+
t = this.loadBuffer(e);
|
|
1179
|
+
break;
|
|
1180
|
+
case "material":
|
|
1181
|
+
t = this._invokeOne(function(s) {
|
|
1182
|
+
return s.loadMaterial && s.loadMaterial(e);
|
|
1183
|
+
});
|
|
1184
|
+
break;
|
|
1185
|
+
case "texture":
|
|
1186
|
+
t = this._invokeOne(function(s) {
|
|
1187
|
+
return s.loadTexture && s.loadTexture(e);
|
|
1188
|
+
});
|
|
1189
|
+
break;
|
|
1190
|
+
case "skin":
|
|
1191
|
+
t = this.loadSkin(e);
|
|
1192
|
+
break;
|
|
1193
|
+
case "animation":
|
|
1194
|
+
t = this._invokeOne(function(s) {
|
|
1195
|
+
return s.loadAnimation && s.loadAnimation(e);
|
|
1196
|
+
});
|
|
1197
|
+
break;
|
|
1198
|
+
case "camera":
|
|
1199
|
+
t = this.loadCamera(e);
|
|
1200
|
+
break;
|
|
1201
|
+
default:
|
|
1202
|
+
if (t = this._invokeOne(function(s) {
|
|
1203
|
+
return s != this && s.getDependency && s.getDependency(a, e);
|
|
1204
|
+
}), !t)
|
|
1205
|
+
throw new Error("Unknown type: " + a);
|
|
1206
|
+
break;
|
|
1207
|
+
}
|
|
1208
|
+
this.cache.add(n, t);
|
|
1209
|
+
}
|
|
1210
|
+
return t;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Requests all dependencies of the specified type asynchronously, with caching.
|
|
1214
|
+
* @param {string} type
|
|
1215
|
+
* @return {Promise<Array<Object>>}
|
|
1216
|
+
*/
|
|
1217
|
+
getDependencies(a) {
|
|
1218
|
+
let e = this.cache.get(a);
|
|
1219
|
+
if (!e) {
|
|
1220
|
+
const n = this, t = this.json[a + (a === "mesh" ? "es" : "s")] || [];
|
|
1221
|
+
e = Promise.all(t.map(function(s, i) {
|
|
1222
|
+
return n.getDependency(a, i);
|
|
1223
|
+
})), this.cache.add(a, e);
|
|
1224
|
+
}
|
|
1225
|
+
return e;
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views
|
|
1229
|
+
* @param {number} bufferIndex
|
|
1230
|
+
* @return {Promise<ArrayBuffer>}
|
|
1231
|
+
*/
|
|
1232
|
+
loadBuffer(a) {
|
|
1233
|
+
const e = this.json.buffers[a], n = this.fileLoader;
|
|
1234
|
+
if (e.type && e.type !== "arraybuffer")
|
|
1235
|
+
throw new Error("THREE.GLTFLoader: " + e.type + " buffer type is not supported.");
|
|
1236
|
+
if (e.uri === void 0 && a === 0)
|
|
1237
|
+
return Promise.resolve(this.extensions[k.KHR_BINARY_GLTF].body);
|
|
1238
|
+
const t = this.options;
|
|
1239
|
+
return new Promise(function(s, i) {
|
|
1240
|
+
n.load(B.resolveURL(e.uri, t.path), s, void 0, function() {
|
|
1241
|
+
i(new Error('THREE.GLTFLoader: Failed to load buffer "' + e.uri + '".'));
|
|
1242
|
+
});
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views
|
|
1247
|
+
* @param {number} bufferViewIndex
|
|
1248
|
+
* @return {Promise<ArrayBuffer>}
|
|
1249
|
+
*/
|
|
1250
|
+
loadBufferView(a) {
|
|
1251
|
+
const e = this.json.bufferViews[a];
|
|
1252
|
+
return this.getDependency("buffer", e.buffer).then(function(n) {
|
|
1253
|
+
const t = e.byteLength || 0, s = e.byteOffset || 0;
|
|
1254
|
+
return n.slice(s, s + t);
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors
|
|
1259
|
+
* @param {number} accessorIndex
|
|
1260
|
+
* @return {Promise<BufferAttribute|InterleavedBufferAttribute>}
|
|
1261
|
+
*/
|
|
1262
|
+
loadAccessor(a) {
|
|
1263
|
+
const e = this, n = this.json, t = this.json.accessors[a];
|
|
1264
|
+
if (t.bufferView === void 0 && t.sparse === void 0) {
|
|
1265
|
+
const i = V[t.type], o = D[t.componentType], r = t.normalized === !0, c = new o(t.count * i);
|
|
1266
|
+
return Promise.resolve(new U(c, i, r));
|
|
1267
|
+
}
|
|
1268
|
+
const s = [];
|
|
1269
|
+
return t.bufferView !== void 0 ? s.push(this.getDependency("bufferView", t.bufferView)) : s.push(null), t.sparse !== void 0 && (s.push(this.getDependency("bufferView", t.sparse.indices.bufferView)), s.push(this.getDependency("bufferView", t.sparse.values.bufferView))), Promise.all(s).then(function(i) {
|
|
1270
|
+
const o = i[0], r = V[t.type], c = D[t.componentType], d = c.BYTES_PER_ELEMENT, l = d * r, f = t.byteOffset || 0, h = t.bufferView !== void 0 ? n.bufferViews[t.bufferView].byteStride : void 0, x = t.normalized === !0;
|
|
1271
|
+
let T, A;
|
|
1272
|
+
if (h && h !== l) {
|
|
1273
|
+
const u = Math.floor(f / h), p = "InterleavedBuffer:" + t.bufferView + ":" + t.componentType + ":" + u + ":" + t.count;
|
|
1274
|
+
let m = e.cache.get(p);
|
|
1275
|
+
m || (T = new c(o, u * h, t.count * h / d), m = new qe(T, h / d), e.cache.add(p, m)), A = new ze(m, r, f % h / d, x);
|
|
1276
|
+
} else
|
|
1277
|
+
o === null ? T = new c(t.count * r) : T = new c(o, f, t.count * r), A = new U(T, r, x);
|
|
1278
|
+
if (t.sparse !== void 0) {
|
|
1279
|
+
const u = V.SCALAR, p = D[t.sparse.indices.componentType], m = t.sparse.indices.byteOffset || 0, g = t.sparse.values.byteOffset || 0, R = new p(i[1], m, t.sparse.count * u), w = new c(i[2], g, t.sparse.count * r);
|
|
1280
|
+
o !== null && (A = new U(A.array.slice(), A.itemSize, A.normalized)), A.normalized = !1;
|
|
1281
|
+
for (let E = 0, F = R.length; E < F; E++) {
|
|
1282
|
+
const j = R[E];
|
|
1283
|
+
if (A.setX(j, w[E * r]), r >= 2 && A.setY(j, w[E * r + 1]), r >= 3 && A.setZ(j, w[E * r + 2]), r >= 4 && A.setW(j, w[E * r + 3]), r >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
1284
|
+
}
|
|
1285
|
+
A.normalized = x;
|
|
1286
|
+
}
|
|
1287
|
+
return A;
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures
|
|
1292
|
+
* @param {number} textureIndex
|
|
1293
|
+
* @return {Promise<THREE.Texture|null>}
|
|
1294
|
+
*/
|
|
1295
|
+
loadTexture(a) {
|
|
1296
|
+
const e = this.json, n = this.options, s = e.textures[a].source, i = e.images[s];
|
|
1297
|
+
let o = this.textureLoader;
|
|
1298
|
+
if (i.uri) {
|
|
1299
|
+
const r = n.manager.getHandler(i.uri);
|
|
1300
|
+
r !== null && (o = r);
|
|
1301
|
+
}
|
|
1302
|
+
return this.loadTextureImage(a, s, o);
|
|
1303
|
+
}
|
|
1304
|
+
loadTextureImage(a, e, n) {
|
|
1305
|
+
const t = this, s = this.json, i = s.textures[a], o = s.images[e], r = (o.uri || o.bufferView) + ":" + i.sampler;
|
|
1306
|
+
if (this.textureCache[r])
|
|
1307
|
+
return this.textureCache[r];
|
|
1308
|
+
const c = this.loadImageSource(e, n).then(function(d) {
|
|
1309
|
+
d.flipY = !1, d.name = i.name || o.name || "", d.name === "" && typeof o.uri == "string" && o.uri.startsWith("data:image/") === !1 && (d.name = o.uri);
|
|
1310
|
+
const f = (s.samplers || {})[i.sampler] || {};
|
|
1311
|
+
return d.magFilter = pe[f.magFilter] || $, d.minFilter = pe[f.minFilter] || Te, d.wrapS = he[f.wrapS] || ee, d.wrapT = he[f.wrapT] || ee, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Re && d.minFilter !== $, t.associations.set(d, { textures: a }), d;
|
|
1312
|
+
}).catch(function() {
|
|
1313
|
+
return null;
|
|
1314
|
+
});
|
|
1315
|
+
return this.textureCache[r] = c, c;
|
|
1316
|
+
}
|
|
1317
|
+
loadImageSource(a, e) {
|
|
1318
|
+
const n = this, t = this.json, s = this.options;
|
|
1319
|
+
if (this.sourceCache[a] !== void 0)
|
|
1320
|
+
return this.sourceCache[a].then((l) => l.clone());
|
|
1321
|
+
const i = t.images[a], o = self.URL || self.webkitURL;
|
|
1322
|
+
let r = i.uri || "", c = !1;
|
|
1323
|
+
if (i.bufferView !== void 0)
|
|
1324
|
+
r = n.getDependency("bufferView", i.bufferView).then(function(l) {
|
|
1325
|
+
c = !0;
|
|
1326
|
+
const f = new Blob([l], { type: i.mimeType });
|
|
1327
|
+
return r = o.createObjectURL(f), r;
|
|
1328
|
+
});
|
|
1329
|
+
else if (i.uri === void 0)
|
|
1330
|
+
throw new Error("THREE.GLTFLoader: Image " + a + " is missing URI and bufferView");
|
|
1331
|
+
const d = Promise.resolve(r).then(function(l) {
|
|
1332
|
+
return new Promise(function(f, h) {
|
|
1333
|
+
let x = f;
|
|
1334
|
+
e.isImageBitmapLoader === !0 && (x = function(T) {
|
|
1335
|
+
const A = new ie(T);
|
|
1336
|
+
A.needsUpdate = !0, f(A);
|
|
1337
|
+
}), e.load(B.resolveURL(l, s.path), x, void 0, h);
|
|
1338
|
+
});
|
|
1339
|
+
}).then(function(l) {
|
|
1340
|
+
return c === !0 && o.revokeObjectURL(r), L(l, i), l.userData.mimeType = i.mimeType || et(i.uri), l;
|
|
1341
|
+
}).catch(function(l) {
|
|
1342
|
+
throw console.error("THREE.GLTFLoader: Couldn't load texture", r), l;
|
|
1343
|
+
});
|
|
1344
|
+
return this.sourceCache[a] = d, d;
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* Asynchronously assigns a texture to the given material parameters.
|
|
1348
|
+
*
|
|
1349
|
+
* @param {Object} materialParams
|
|
1350
|
+
* @param {string} mapName
|
|
1351
|
+
* @param {Object} mapDef
|
|
1352
|
+
* @param {string} colorSpace
|
|
1353
|
+
* @return {Promise<Texture>}
|
|
1354
|
+
*/
|
|
1355
|
+
assignTexture(a, e, n, t) {
|
|
1356
|
+
const s = this;
|
|
1357
|
+
return this.getDependency("texture", n.index).then(function(i) {
|
|
1358
|
+
if (!i) return null;
|
|
1359
|
+
if (n.texCoord !== void 0 && n.texCoord > 0 && (i = i.clone(), i.channel = n.texCoord), s.extensions[k.KHR_TEXTURE_TRANSFORM]) {
|
|
1360
|
+
const o = n.extensions !== void 0 ? n.extensions[k.KHR_TEXTURE_TRANSFORM] : void 0;
|
|
1361
|
+
if (o) {
|
|
1362
|
+
const r = s.associations.get(i);
|
|
1363
|
+
i = s.extensions[k.KHR_TEXTURE_TRANSFORM].extendTexture(i, o), s.associations.set(i, r);
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
return t !== void 0 && (i.colorSpace = t), a[e] = i, i;
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Assigns final material to a Mesh, Line, or Points instance. The instance
|
|
1371
|
+
* already has a material (generated from the glTF material options alone)
|
|
1372
|
+
* but reuse of the same glTF material may require multiple threejs materials
|
|
1373
|
+
* to accommodate different primitive types, defines, etc. New materials will
|
|
1374
|
+
* be created if necessary, and reused from a cache.
|
|
1375
|
+
* @param {Object3D} mesh Mesh, Line, or Points instance.
|
|
1376
|
+
*/
|
|
1377
|
+
assignFinalMaterial(a) {
|
|
1378
|
+
const e = a.geometry;
|
|
1379
|
+
let n = a.material;
|
|
1380
|
+
const t = e.attributes.tangent === void 0, s = e.attributes.color !== void 0, i = e.attributes.normal === void 0;
|
|
1381
|
+
if (a.isPoints) {
|
|
1382
|
+
const o = "PointsMaterial:" + n.uuid;
|
|
1383
|
+
let r = this.cache.get(o);
|
|
1384
|
+
r || (r = new Je(), Q.prototype.copy.call(r, n), r.color.copy(n.color), r.map = n.map, r.sizeAttenuation = !1, this.cache.add(o, r)), n = r;
|
|
1385
|
+
} else if (a.isLine) {
|
|
1386
|
+
const o = "LineBasicMaterial:" + n.uuid;
|
|
1387
|
+
let r = this.cache.get(o);
|
|
1388
|
+
r || (r = new Ye(), Q.prototype.copy.call(r, n), r.color.copy(n.color), r.map = n.map, this.cache.add(o, r)), n = r;
|
|
1389
|
+
}
|
|
1390
|
+
if (t || s || i) {
|
|
1391
|
+
let o = "ClonedMaterial:" + n.uuid + ":";
|
|
1392
|
+
t && (o += "derivative-tangents:"), s && (o += "vertex-colors:"), i && (o += "flat-shading:");
|
|
1393
|
+
let r = this.cache.get(o);
|
|
1394
|
+
r || (r = n.clone(), s && (r.vertexColors = !0), i && (r.flatShading = !0), t && (r.normalScale && (r.normalScale.y *= -1), r.clearcoatNormalScale && (r.clearcoatNormalScale.y *= -1)), this.cache.add(o, r), this.associations.set(r, this.associations.get(n))), n = r;
|
|
1395
|
+
}
|
|
1396
|
+
a.material = n;
|
|
1397
|
+
}
|
|
1398
|
+
getMaterialType() {
|
|
1399
|
+
return we;
|
|
1400
|
+
}
|
|
1401
|
+
/**
|
|
1402
|
+
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
|
|
1403
|
+
* @param {number} materialIndex
|
|
1404
|
+
* @return {Promise<Material>}
|
|
1405
|
+
*/
|
|
1406
|
+
loadMaterial(a) {
|
|
1407
|
+
const e = this, n = this.json, t = this.extensions, s = n.materials[a];
|
|
1408
|
+
let i;
|
|
1409
|
+
const o = {}, r = s.extensions || {}, c = [];
|
|
1410
|
+
if (r[k.KHR_MATERIALS_UNLIT]) {
|
|
1411
|
+
const l = t[k.KHR_MATERIALS_UNLIT];
|
|
1412
|
+
i = l.getMaterialType(), c.push(l.extendParams(o, s, e));
|
|
1413
|
+
} else {
|
|
1414
|
+
const l = s.pbrMetallicRoughness || {};
|
|
1415
|
+
if (o.color = new _(1, 1, 1), o.opacity = 1, Array.isArray(l.baseColorFactor)) {
|
|
1416
|
+
const f = l.baseColorFactor;
|
|
1417
|
+
o.color.setRGB(f[0], f[1], f[2], y), o.opacity = f[3];
|
|
1418
|
+
}
|
|
1419
|
+
l.baseColorTexture !== void 0 && c.push(e.assignTexture(o, "map", l.baseColorTexture, I)), o.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, o.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(o, "metalnessMap", l.metallicRoughnessTexture)), c.push(e.assignTexture(o, "roughnessMap", l.metallicRoughnessTexture))), i = this._invokeOne(function(f) {
|
|
1420
|
+
return f.getMaterialType && f.getMaterialType(a);
|
|
1421
|
+
}), c.push(Promise.all(this._invokeAll(function(f) {
|
|
1422
|
+
return f.extendMaterialParams && f.extendMaterialParams(a, o);
|
|
1423
|
+
})));
|
|
1424
|
+
}
|
|
1425
|
+
s.doubleSided === !0 && (o.side = Ze);
|
|
1426
|
+
const d = s.alphaMode || X.OPAQUE;
|
|
1427
|
+
if (d === X.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, d === X.MASK && (o.alphaTest = s.alphaCutoff !== void 0 ? s.alphaCutoff : 0.5)), s.normalTexture !== void 0 && i !== K && (c.push(e.assignTexture(o, "normalMap", s.normalTexture)), o.normalScale = new Ae(1, 1), s.normalTexture.scale !== void 0)) {
|
|
1428
|
+
const l = s.normalTexture.scale;
|
|
1429
|
+
o.normalScale.set(l, l);
|
|
1430
|
+
}
|
|
1431
|
+
if (s.occlusionTexture !== void 0 && i !== K && (c.push(e.assignTexture(o, "aoMap", s.occlusionTexture)), s.occlusionTexture.strength !== void 0 && (o.aoMapIntensity = s.occlusionTexture.strength)), s.emissiveFactor !== void 0 && i !== K) {
|
|
1432
|
+
const l = s.emissiveFactor;
|
|
1433
|
+
o.emissive = new _().setRGB(l[0], l[1], l[2], y);
|
|
1434
|
+
}
|
|
1435
|
+
return s.emissiveTexture !== void 0 && i !== K && c.push(e.assignTexture(o, "emissiveMap", s.emissiveTexture, I)), Promise.all(c).then(function() {
|
|
1436
|
+
const l = new i(o);
|
|
1437
|
+
return s.name && (l.name = s.name), L(l, s), e.associations.set(l, { materials: a }), s.extensions && M(t, l, s), l;
|
|
1438
|
+
});
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* When Object3D instances are targeted by animation, they need unique names.
|
|
1442
|
+
*
|
|
1443
|
+
* @param {String} originalName
|
|
1444
|
+
* @return {String}
|
|
1445
|
+
*/
|
|
1446
|
+
createUniqueName(a) {
|
|
1447
|
+
const e = $e.sanitizeNodeName(a || "");
|
|
1448
|
+
return e in this.nodeNamesUsed ? e + "_" + ++this.nodeNamesUsed[e] : (this.nodeNamesUsed[e] = 0, e);
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry
|
|
1452
|
+
*
|
|
1453
|
+
* Creates BufferGeometries from primitives.
|
|
1454
|
+
*
|
|
1455
|
+
* @param {Array<GLTF.Primitive>} primitives
|
|
1456
|
+
* @return {Promise<Array<BufferGeometry>>}
|
|
1457
|
+
*/
|
|
1458
|
+
loadGeometries(a) {
|
|
1459
|
+
const e = this, n = this.extensions, t = this.primitiveCache;
|
|
1460
|
+
function s(o) {
|
|
1461
|
+
return n[k.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o, e).then(function(r) {
|
|
1462
|
+
return ue(r, o, e);
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
const i = [];
|
|
1466
|
+
for (let o = 0, r = a.length; o < r; o++) {
|
|
1467
|
+
const c = a[o], d = $a(c), l = t[d];
|
|
1468
|
+
if (l)
|
|
1469
|
+
i.push(l.promise);
|
|
1470
|
+
else {
|
|
1471
|
+
let f;
|
|
1472
|
+
c.extensions && c.extensions[k.KHR_DRACO_MESH_COMPRESSION] ? f = s(c) : f = ue(new ea(), c, e), t[d] = { primitive: c, promise: f }, i.push(f);
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
return Promise.all(i);
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes
|
|
1479
|
+
* @param {number} meshIndex
|
|
1480
|
+
* @return {Promise<Group|Mesh|SkinnedMesh>}
|
|
1481
|
+
*/
|
|
1482
|
+
loadMesh(a) {
|
|
1483
|
+
const e = this, n = this.json, t = this.extensions, s = n.meshes[a], i = s.primitives, o = [];
|
|
1484
|
+
for (let r = 0, c = i.length; r < c; r++) {
|
|
1485
|
+
const d = i[r].material === void 0 ? Ja(this.cache) : this.getDependency("material", i[r].material);
|
|
1486
|
+
o.push(d);
|
|
1487
|
+
}
|
|
1488
|
+
return o.push(e.loadGeometries(i)), Promise.all(o).then(function(r) {
|
|
1489
|
+
const c = r.slice(0, r.length - 1), d = r[r.length - 1], l = [];
|
|
1490
|
+
for (let h = 0, x = d.length; h < x; h++) {
|
|
1491
|
+
const T = d[h], A = i[h];
|
|
1492
|
+
let u;
|
|
1493
|
+
const p = c[h];
|
|
1494
|
+
if (A.mode === S.TRIANGLES || A.mode === S.TRIANGLE_STRIP || A.mode === S.TRIANGLE_FAN || A.mode === void 0)
|
|
1495
|
+
u = s.isSkinnedMesh === !0 ? new aa(T, p) : new ta(T, p), u.isSkinnedMesh === !0 && u.normalizeSkinWeights(), A.mode === S.TRIANGLE_STRIP ? u.geometry = de(u.geometry, ge) : A.mode === S.TRIANGLE_FAN && (u.geometry = de(u.geometry, Z));
|
|
1496
|
+
else if (A.mode === S.LINES)
|
|
1497
|
+
u = new sa(T, p);
|
|
1498
|
+
else if (A.mode === S.LINE_STRIP)
|
|
1499
|
+
u = new na(T, p);
|
|
1500
|
+
else if (A.mode === S.LINE_LOOP)
|
|
1501
|
+
u = new ia(T, p);
|
|
1502
|
+
else if (A.mode === S.POINTS)
|
|
1503
|
+
u = new ra(T, p);
|
|
1504
|
+
else
|
|
1505
|
+
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + A.mode);
|
|
1506
|
+
Object.keys(u.geometry.morphAttributes).length > 0 && Za(u, s), u.name = e.createUniqueName(s.name || "mesh_" + a), L(u, s), A.extensions && M(t, u, A), e.assignFinalMaterial(u), l.push(u);
|
|
1507
|
+
}
|
|
1508
|
+
for (let h = 0, x = l.length; h < x; h++)
|
|
1509
|
+
e.associations.set(l[h], {
|
|
1510
|
+
meshes: a,
|
|
1511
|
+
primitives: h
|
|
1512
|
+
});
|
|
1513
|
+
if (l.length === 1)
|
|
1514
|
+
return s.extensions && M(t, l[0], s), l[0];
|
|
1515
|
+
const f = new W();
|
|
1516
|
+
s.extensions && M(t, f, s), e.associations.set(f, { meshes: a });
|
|
1517
|
+
for (let h = 0, x = l.length; h < x; h++)
|
|
1518
|
+
f.add(l[h]);
|
|
1519
|
+
return f;
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras
|
|
1524
|
+
* @param {number} cameraIndex
|
|
1525
|
+
* @return {Promise<THREE.Camera>}
|
|
1526
|
+
*/
|
|
1527
|
+
loadCamera(a) {
|
|
1528
|
+
let e;
|
|
1529
|
+
const n = this.json.cameras[a], t = n[n.type];
|
|
1530
|
+
if (!t) {
|
|
1531
|
+
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
1532
|
+
return;
|
|
1533
|
+
}
|
|
1534
|
+
return n.type === "perspective" ? e = new oa(ca.radToDeg(t.yfov), t.aspectRatio || 1, t.znear || 1, t.zfar || 2e6) : n.type === "orthographic" && (e = new ba(-t.xmag, t.xmag, t.ymag, -t.ymag, t.znear, t.zfar)), n.name && (e.name = this.createUniqueName(n.name)), L(e, n), Promise.resolve(e);
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
1538
|
+
* @param {number} skinIndex
|
|
1539
|
+
* @return {Promise<Skeleton>}
|
|
1540
|
+
*/
|
|
1541
|
+
loadSkin(a) {
|
|
1542
|
+
const e = this.json.skins[a], n = [];
|
|
1543
|
+
for (let t = 0, s = e.joints.length; t < s; t++)
|
|
1544
|
+
n.push(this._loadNodeShallow(e.joints[t]));
|
|
1545
|
+
return e.inverseBindMatrices !== void 0 ? n.push(this.getDependency("accessor", e.inverseBindMatrices)) : n.push(null), Promise.all(n).then(function(t) {
|
|
1546
|
+
const s = t.pop(), i = t, o = [], r = [];
|
|
1547
|
+
for (let c = 0, d = i.length; c < d; c++) {
|
|
1548
|
+
const l = i[c];
|
|
1549
|
+
if (l) {
|
|
1550
|
+
o.push(l);
|
|
1551
|
+
const f = new q();
|
|
1552
|
+
s !== null && f.fromArray(s.array, c * 16), r.push(f);
|
|
1553
|
+
} else
|
|
1554
|
+
console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', e.joints[c]);
|
|
1555
|
+
}
|
|
1556
|
+
return new la(o, r);
|
|
1557
|
+
});
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations
|
|
1561
|
+
* @param {number} animationIndex
|
|
1562
|
+
* @return {Promise<AnimationClip>}
|
|
1563
|
+
*/
|
|
1564
|
+
loadAnimation(a) {
|
|
1565
|
+
const e = this.json, n = this, t = e.animations[a], s = t.name ? t.name : "animation_" + a, i = [], o = [], r = [], c = [], d = [];
|
|
1566
|
+
for (let l = 0, f = t.channels.length; l < f; l++) {
|
|
1567
|
+
const h = t.channels[l], x = t.samplers[h.sampler], T = h.target, A = T.node, u = t.parameters !== void 0 ? t.parameters[x.input] : x.input, p = t.parameters !== void 0 ? t.parameters[x.output] : x.output;
|
|
1568
|
+
T.node !== void 0 && (i.push(this.getDependency("node", A)), o.push(this.getDependency("accessor", u)), r.push(this.getDependency("accessor", p)), c.push(x), d.push(T));
|
|
1569
|
+
}
|
|
1570
|
+
return Promise.all([
|
|
1571
|
+
Promise.all(i),
|
|
1572
|
+
Promise.all(o),
|
|
1573
|
+
Promise.all(r),
|
|
1574
|
+
Promise.all(c),
|
|
1575
|
+
Promise.all(d)
|
|
1576
|
+
]).then(function(l) {
|
|
1577
|
+
const f = l[0], h = l[1], x = l[2], T = l[3], A = l[4], u = [];
|
|
1578
|
+
for (let p = 0, m = f.length; p < m; p++) {
|
|
1579
|
+
const g = f[p], R = h[p], w = x[p], E = T[p], F = A[p];
|
|
1580
|
+
if (g === void 0) continue;
|
|
1581
|
+
g.updateMatrix && g.updateMatrix();
|
|
1582
|
+
const j = n._createAnimationTracks(g, R, w, E, F);
|
|
1583
|
+
if (j)
|
|
1584
|
+
for (let O = 0; O < j.length; O++)
|
|
1585
|
+
u.push(j[O]);
|
|
1586
|
+
}
|
|
1587
|
+
return new da(s, void 0, u);
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
createNodeMesh(a) {
|
|
1591
|
+
const e = this.json, n = this, t = e.nodes[a];
|
|
1592
|
+
return t.mesh === void 0 ? null : n.getDependency("mesh", t.mesh).then(function(s) {
|
|
1593
|
+
const i = n._getNodeRef(n.meshCache, t.mesh, s);
|
|
1594
|
+
return t.weights !== void 0 && i.traverse(function(o) {
|
|
1595
|
+
if (o.isMesh)
|
|
1596
|
+
for (let r = 0, c = t.weights.length; r < c; r++)
|
|
1597
|
+
o.morphTargetInfluences[r] = t.weights[r];
|
|
1598
|
+
}), i;
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy
|
|
1603
|
+
* @param {number} nodeIndex
|
|
1604
|
+
* @return {Promise<Object3D>}
|
|
1605
|
+
*/
|
|
1606
|
+
loadNode(a) {
|
|
1607
|
+
const e = this.json, n = this, t = e.nodes[a], s = n._loadNodeShallow(a), i = [], o = t.children || [];
|
|
1608
|
+
for (let c = 0, d = o.length; c < d; c++)
|
|
1609
|
+
i.push(n.getDependency("node", o[c]));
|
|
1610
|
+
const r = t.skin === void 0 ? Promise.resolve(null) : n.getDependency("skin", t.skin);
|
|
1611
|
+
return Promise.all([
|
|
1612
|
+
s,
|
|
1613
|
+
Promise.all(i),
|
|
1614
|
+
r
|
|
1615
|
+
]).then(function(c) {
|
|
1616
|
+
const d = c[0], l = c[1], f = c[2];
|
|
1617
|
+
f !== null && d.traverse(function(h) {
|
|
1618
|
+
h.isSkinnedMesh && h.bind(f, at);
|
|
1619
|
+
});
|
|
1620
|
+
for (let h = 0, x = l.length; h < x; h++)
|
|
1621
|
+
d.add(l[h]);
|
|
1622
|
+
return d;
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
// ._loadNodeShallow() parses a single node.
|
|
1626
|
+
// skin and child nodes are created and added in .loadNode() (no '_' prefix).
|
|
1627
|
+
_loadNodeShallow(a) {
|
|
1628
|
+
const e = this.json, n = this.extensions, t = this;
|
|
1629
|
+
if (this.nodeCache[a] !== void 0)
|
|
1630
|
+
return this.nodeCache[a];
|
|
1631
|
+
const s = e.nodes[a], i = s.name ? t.createUniqueName(s.name) : "", o = [], r = t._invokeOne(function(c) {
|
|
1632
|
+
return c.createNodeMesh && c.createNodeMesh(a);
|
|
1633
|
+
});
|
|
1634
|
+
return r && o.push(r), s.camera !== void 0 && o.push(t.getDependency("camera", s.camera).then(function(c) {
|
|
1635
|
+
return t._getNodeRef(t.cameraCache, s.camera, c);
|
|
1636
|
+
})), t._invokeAll(function(c) {
|
|
1637
|
+
return c.createNodeAttachment && c.createNodeAttachment(a);
|
|
1638
|
+
}).forEach(function(c) {
|
|
1639
|
+
o.push(c);
|
|
1640
|
+
}), this.nodeCache[a] = Promise.all(o).then(function(c) {
|
|
1641
|
+
let d;
|
|
1642
|
+
if (s.isBone === !0 ? d = new fa() : c.length > 1 ? d = new W() : c.length === 1 ? d = c[0] : d = new ke(), d !== c[0])
|
|
1643
|
+
for (let l = 0, f = c.length; l < f; l++)
|
|
1644
|
+
d.add(c[l]);
|
|
1645
|
+
if (s.name && (d.userData.name = s.name, d.name = i), L(d, s), s.extensions && M(n, d, s), s.matrix !== void 0) {
|
|
1646
|
+
const l = new q();
|
|
1647
|
+
l.fromArray(s.matrix), d.applyMatrix4(l);
|
|
1648
|
+
} else
|
|
1649
|
+
s.translation !== void 0 && d.position.fromArray(s.translation), s.rotation !== void 0 && d.quaternion.fromArray(s.rotation), s.scale !== void 0 && d.scale.fromArray(s.scale);
|
|
1650
|
+
return t.associations.has(d) || t.associations.set(d, {}), t.associations.get(d).nodes = a, d;
|
|
1651
|
+
}), this.nodeCache[a];
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes
|
|
1655
|
+
* @param {number} sceneIndex
|
|
1656
|
+
* @return {Promise<Group>}
|
|
1657
|
+
*/
|
|
1658
|
+
loadScene(a) {
|
|
1659
|
+
const e = this.extensions, n = this.json.scenes[a], t = this, s = new W();
|
|
1660
|
+
n.name && (s.name = t.createUniqueName(n.name)), L(s, n), n.extensions && M(e, s, n);
|
|
1661
|
+
const i = n.nodes || [], o = [];
|
|
1662
|
+
for (let r = 0, c = i.length; r < c; r++)
|
|
1663
|
+
o.push(t.getDependency("node", i[r]));
|
|
1664
|
+
return Promise.all(o).then(function(r) {
|
|
1665
|
+
for (let d = 0, l = r.length; d < l; d++)
|
|
1666
|
+
s.add(r[d]);
|
|
1667
|
+
const c = (d) => {
|
|
1668
|
+
const l = /* @__PURE__ */ new Map();
|
|
1669
|
+
for (const [f, h] of t.associations)
|
|
1670
|
+
(f instanceof Q || f instanceof ie) && l.set(f, h);
|
|
1671
|
+
return d.traverse((f) => {
|
|
1672
|
+
const h = t.associations.get(f);
|
|
1673
|
+
h != null && l.set(f, h);
|
|
1674
|
+
}), l;
|
|
1675
|
+
};
|
|
1676
|
+
return t.associations = c(s), s;
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
_createAnimationTracks(a, e, n, t, s) {
|
|
1680
|
+
const i = [], o = a.name ? a.name : a.uuid, r = [];
|
|
1681
|
+
G[s.path] === G.weights ? a.traverse(function(f) {
|
|
1682
|
+
f.morphTargetInfluences && r.push(f.name ? f.name : f.uuid);
|
|
1683
|
+
}) : r.push(o);
|
|
1684
|
+
let c;
|
|
1685
|
+
switch (G[s.path]) {
|
|
1686
|
+
case G.weights:
|
|
1687
|
+
c = oe;
|
|
1688
|
+
break;
|
|
1689
|
+
case G.rotation:
|
|
1690
|
+
c = ce;
|
|
1691
|
+
break;
|
|
1692
|
+
case G.position:
|
|
1693
|
+
case G.scale:
|
|
1694
|
+
c = re;
|
|
1695
|
+
break;
|
|
1696
|
+
default:
|
|
1697
|
+
switch (n.itemSize) {
|
|
1698
|
+
case 1:
|
|
1699
|
+
c = oe;
|
|
1700
|
+
break;
|
|
1701
|
+
case 2:
|
|
1702
|
+
case 3:
|
|
1703
|
+
default:
|
|
1704
|
+
c = re;
|
|
1705
|
+
break;
|
|
1706
|
+
}
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
const d = t.interpolation !== void 0 ? Xa[t.interpolation] : Ee, l = this._getArrayFromAccessor(n);
|
|
1710
|
+
for (let f = 0, h = r.length; f < h; f++) {
|
|
1711
|
+
const x = new c(
|
|
1712
|
+
r[f] + "." + G[s.path],
|
|
1713
|
+
e.array,
|
|
1714
|
+
l,
|
|
1715
|
+
d
|
|
1716
|
+
);
|
|
1717
|
+
t.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(x), i.push(x);
|
|
1718
|
+
}
|
|
1719
|
+
return i;
|
|
1720
|
+
}
|
|
1721
|
+
_getArrayFromAccessor(a) {
|
|
1722
|
+
let e = a.array;
|
|
1723
|
+
if (a.normalized) {
|
|
1724
|
+
const n = te(e.constructor), t = new Float32Array(e.length);
|
|
1725
|
+
for (let s = 0, i = e.length; s < i; s++)
|
|
1726
|
+
t[s] = e[s] * n;
|
|
1727
|
+
e = t;
|
|
1728
|
+
}
|
|
1729
|
+
return e;
|
|
1730
|
+
}
|
|
1731
|
+
_createCubicSplineTrackInterpolant(a) {
|
|
1732
|
+
a.createInterpolant = function(n) {
|
|
1733
|
+
const t = this instanceof ce ? Va : ve;
|
|
1734
|
+
return new t(this.times, this.values, this.getValueSize() / 3, n);
|
|
1735
|
+
}, a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
function st(b, a, e) {
|
|
1739
|
+
const n = a.attributes, t = new ga();
|
|
1740
|
+
if (n.POSITION !== void 0) {
|
|
1741
|
+
const o = e.json.accessors[n.POSITION], r = o.min, c = o.max;
|
|
1742
|
+
if (r !== void 0 && c !== void 0) {
|
|
1743
|
+
if (t.set(
|
|
1744
|
+
new C(r[0], r[1], r[2]),
|
|
1745
|
+
new C(c[0], c[1], c[2])
|
|
1746
|
+
), o.normalized) {
|
|
1747
|
+
const d = te(D[o.componentType]);
|
|
1748
|
+
t.min.multiplyScalar(d), t.max.multiplyScalar(d);
|
|
1749
|
+
}
|
|
1750
|
+
} else {
|
|
1751
|
+
console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1754
|
+
} else
|
|
1755
|
+
return;
|
|
1756
|
+
const s = a.targets;
|
|
1757
|
+
if (s !== void 0) {
|
|
1758
|
+
const o = new C(), r = new C();
|
|
1759
|
+
for (let c = 0, d = s.length; c < d; c++) {
|
|
1760
|
+
const l = s[c];
|
|
1761
|
+
if (l.POSITION !== void 0) {
|
|
1762
|
+
const f = e.json.accessors[l.POSITION], h = f.min, x = f.max;
|
|
1763
|
+
if (h !== void 0 && x !== void 0) {
|
|
1764
|
+
if (r.setX(Math.max(Math.abs(h[0]), Math.abs(x[0]))), r.setY(Math.max(Math.abs(h[1]), Math.abs(x[1]))), r.setZ(Math.max(Math.abs(h[2]), Math.abs(x[2]))), f.normalized) {
|
|
1765
|
+
const T = te(D[f.componentType]);
|
|
1766
|
+
r.multiplyScalar(T);
|
|
1767
|
+
}
|
|
1768
|
+
o.max(r);
|
|
1769
|
+
} else
|
|
1770
|
+
console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
t.expandByVector(o);
|
|
1774
|
+
}
|
|
1775
|
+
b.boundingBox = t;
|
|
1776
|
+
const i = new ma();
|
|
1777
|
+
t.getCenter(i.center), i.radius = t.min.distanceTo(t.max) / 2, b.boundingSphere = i;
|
|
1778
|
+
}
|
|
1779
|
+
function ue(b, a, e) {
|
|
1780
|
+
const n = a.attributes, t = [];
|
|
1781
|
+
function s(i, o) {
|
|
1782
|
+
return e.getDependency("accessor", i).then(function(r) {
|
|
1783
|
+
b.setAttribute(o, r);
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
for (const i in n) {
|
|
1787
|
+
const o = ae[i] || i.toLowerCase();
|
|
1788
|
+
o in b.attributes || t.push(s(n[i], o));
|
|
1789
|
+
}
|
|
1790
|
+
if (a.indices !== void 0 && !b.index) {
|
|
1791
|
+
const i = e.getDependency("accessor", a.indices).then(function(o) {
|
|
1792
|
+
b.setIndex(o);
|
|
1793
|
+
});
|
|
1794
|
+
t.push(i);
|
|
1795
|
+
}
|
|
1796
|
+
return be.workingColorSpace !== y && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${be.workingColorSpace}" not supported.`), L(b, a), st(b, a, e), Promise.all(t).then(function() {
|
|
1797
|
+
return a.targets !== void 0 ? Ya(b, a.targets, e) : b;
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
const nt = () => new wa().setMeshoptDecoder(Ra), it = [
|
|
1801
|
+
[/DRACOLoader/, "Draco (KHR_draco_mesh_compression)"],
|
|
1802
|
+
[/KTX2/, "KTX2 (KHR_texture_basisu)"]
|
|
1803
|
+
], rt = (b, a) => {
|
|
1804
|
+
const e = b instanceof Error ? b.message : String(b), n = it.find(([t]) => t.test(e));
|
|
1805
|
+
return n ? new Error(
|
|
1806
|
+
`[xr-sdk] ${a} uses ${n[1]}, which the SDK does not load. Compress models with meshopt and textures with WebP (gltf-transform meshopt / webp). (${e})`
|
|
1807
|
+
) : b;
|
|
1808
|
+
}, Oe = async (b, a = "", e = "model") => {
|
|
1809
|
+
try {
|
|
1810
|
+
return await nt().parseAsync(b, a);
|
|
1811
|
+
} catch (n) {
|
|
1812
|
+
throw rt(n, e);
|
|
1813
|
+
}
|
|
1814
|
+
}, dt = () => {
|
|
1815
|
+
const b = /* @__PURE__ */ new Map();
|
|
1816
|
+
return (a) => {
|
|
1817
|
+
const e = b.get(a);
|
|
1818
|
+
if (e) return e;
|
|
1819
|
+
const n = je(a).then((t) => Oe(t, "", a)).catch((t) => {
|
|
1820
|
+
throw b.delete(a), t;
|
|
1821
|
+
});
|
|
1822
|
+
return b.set(a, n), n;
|
|
1823
|
+
};
|
|
1824
|
+
};
|
|
1825
|
+
class Y extends Error {
|
|
1826
|
+
constructor(e, n) {
|
|
1827
|
+
super(e);
|
|
1828
|
+
/** The underlying error, when there was one. */
|
|
1829
|
+
ne(this, "cause");
|
|
1830
|
+
this.name = "AssetFetchError", this.cause = n;
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
const ot = (b) => (b == null ? void 0 : b.name) === "AbortError", Le = async (b, a) => {
|
|
1834
|
+
try {
|
|
1835
|
+
if (Aa(b)) return await je(b, { signal: a });
|
|
1836
|
+
const e = await fetch(b, { signal: a });
|
|
1837
|
+
if (!e.ok) throw new Y(`Asset fetch failed (${e.status}): ${b}`);
|
|
1838
|
+
return await e.arrayBuffer();
|
|
1839
|
+
} catch (e) {
|
|
1840
|
+
if (e instanceof Y || ot(e) || a.aborted) throw e;
|
|
1841
|
+
const n = e instanceof Error ? e.message : String(e);
|
|
1842
|
+
throw new Y(`Asset fetch failed: ${b}: ${n}`, e);
|
|
1843
|
+
}
|
|
1844
|
+
}, ye = (b) => new Promise((a, e) => {
|
|
1845
|
+
const n = () => e(new DOMException("Asset load aborted", "AbortError"));
|
|
1846
|
+
b.aborted ? n() : b.addEventListener("abort", n, { once: !0 });
|
|
1847
|
+
}), ft = (b, a = {}) => ({
|
|
1848
|
+
key: `texture:${b}${a.variant ? `#${a.variant}` : ""}`,
|
|
1849
|
+
load: async (e) => {
|
|
1850
|
+
const n = await Le(b, e), t = new Blob([n]), s = createImageBitmap(t, {
|
|
1851
|
+
imageOrientation: a.flipY === !1 ? "none" : "flipY"
|
|
1852
|
+
}), i = await Promise.race([s, ye(e)]).catch((r) => {
|
|
1853
|
+
throw s.then((c) => c.close()).catch(() => {
|
|
1854
|
+
}), r;
|
|
1855
|
+
}), o = new P.Texture(i);
|
|
1856
|
+
return o.flipY = !1, o.colorSpace = a.colorSpace ?? P.SRGBColorSpace, o.generateMipmaps = a.generateMipmaps ?? !0, o.minFilter = o.generateMipmaps ? P.LinearMipmapLinearFilter : P.LinearFilter, o.needsUpdate = !0, o;
|
|
1857
|
+
},
|
|
1858
|
+
dispose: (e) => {
|
|
1859
|
+
var t;
|
|
1860
|
+
const n = e.image;
|
|
1861
|
+
e.dispose(), (t = n == null ? void 0 : n.close) == null || t.call(n);
|
|
1862
|
+
},
|
|
1863
|
+
bytes: se
|
|
1864
|
+
}), pt = (b) => ({
|
|
1865
|
+
key: `gltf:${b}`,
|
|
1866
|
+
load: async (a) => {
|
|
1867
|
+
const e = await Le(b, a), n = b.slice(0, b.lastIndexOf("/") + 1), t = Oe(e, n, b);
|
|
1868
|
+
return Promise.race([t, ye(a)]).catch((s) => {
|
|
1869
|
+
throw t.then((i) => le(i.scene)).catch(() => {
|
|
1870
|
+
}), s;
|
|
1871
|
+
});
|
|
1872
|
+
},
|
|
1873
|
+
dispose: (a) => le(a.scene),
|
|
1874
|
+
bytes: (a) => Ta(a.scene)
|
|
1875
|
+
}), ht = (b, a = {}) => ({
|
|
1876
|
+
key: `video:${b}`,
|
|
1877
|
+
load: (e) => new Promise((n, t) => {
|
|
1878
|
+
const s = document.createElement("video");
|
|
1879
|
+
s.src = b, s.loop = a.loop ?? !0, s.muted = a.muted ?? !0, s.playsInline = !0, s.crossOrigin = a.crossOrigin ?? "anonymous", s.preload = "auto";
|
|
1880
|
+
const i = (o) => {
|
|
1881
|
+
s.removeAttribute("src"), s.load(), t(o instanceof Error ? o : new Error(`Video failed to load: ${b}`));
|
|
1882
|
+
};
|
|
1883
|
+
e.addEventListener(
|
|
1884
|
+
"abort",
|
|
1885
|
+
() => i(new DOMException("Asset load aborted", "AbortError")),
|
|
1886
|
+
{
|
|
1887
|
+
once: !0
|
|
1888
|
+
}
|
|
1889
|
+
), s.onerror = () => i(s.error), s.onloadeddata = () => {
|
|
1890
|
+
const o = new P.VideoTexture(s);
|
|
1891
|
+
o.colorSpace = P.SRGBColorSpace, n({ video: s, texture: o });
|
|
1892
|
+
}, s.load();
|
|
1893
|
+
}),
|
|
1894
|
+
dispose: ({ video: e, texture: n }) => {
|
|
1895
|
+
n.dispose(), e.pause(), e.removeAttribute("src"), e.load();
|
|
1896
|
+
},
|
|
1897
|
+
bytes: ({ texture: e }) => se(e)
|
|
1898
|
+
}), ut = ["portrait"], gt = ["hair", "multiclass", "nails"];
|
|
1899
|
+
export {
|
|
1900
|
+
Y as A,
|
|
1901
|
+
gt as S,
|
|
1902
|
+
ft as a,
|
|
1903
|
+
ht as b,
|
|
1904
|
+
dt as c,
|
|
1905
|
+
pt as d,
|
|
1906
|
+
le as e,
|
|
1907
|
+
xa as f,
|
|
1908
|
+
Ta as g,
|
|
1909
|
+
se as h,
|
|
1910
|
+
ut as i
|
|
1911
|
+
};
|