three-stdlib 2.23.0 → 2.23.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_polyfill/CompressedArrayTexture.cjs +12 -0
- package/dist/_polyfill/CompressedArrayTexture.js +6 -6
- package/dist/_polyfill/Data3DTexture.cjs +17 -0
- package/dist/_polyfill/Data3DTexture.js +8 -8
- package/dist/animation/{AnimationClipCreator.mjs → AnimationClipCreator.cjs} +18 -18
- package/dist/animation/AnimationClipCreator.js +18 -18
- package/dist/animation/{CCDIKSolver.mjs → CCDIKSolver.cjs} +32 -32
- package/dist/animation/CCDIKSolver.js +32 -32
- package/dist/animation/{MMDAnimationHelper.mjs → MMDAnimationHelper.cjs} +17 -17
- package/dist/animation/MMDAnimationHelper.js +17 -17
- package/dist/animation/{MMDPhysics.mjs → MMDPhysics.cjs} +25 -25
- package/dist/animation/MMDPhysics.js +25 -25
- package/dist/cameras/{CinematicCamera.mjs → CinematicCamera.cjs} +17 -17
- package/dist/cameras/CinematicCamera.js +17 -17
- package/dist/controls/{ArcballControls.mjs → ArcballControls.cjs} +102 -102
- package/dist/controls/ArcballControls.js +102 -102
- package/dist/controls/{DeviceOrientationControls.mjs → DeviceOrientationControls.cjs} +14 -14
- package/dist/controls/DeviceOrientationControls.js +14 -14
- package/dist/controls/{DragControls.mjs → DragControls.cjs} +12 -12
- package/dist/controls/DragControls.js +12 -12
- package/dist/controls/{FirstPersonControls.mjs → FirstPersonControls.cjs} +16 -16
- package/dist/controls/FirstPersonControls.js +16 -16
- package/dist/controls/{FlyControls.mjs → FlyControls.cjs} +10 -10
- package/dist/controls/FlyControls.js +10 -10
- package/dist/controls/{OrbitControls.mjs → OrbitControls.cjs} +52 -54
- package/dist/controls/OrbitControls.d.ts +4 -4
- package/dist/controls/OrbitControls.js +52 -54
- package/dist/controls/{PointerLockControls.mjs → PointerLockControls.cjs} +8 -8
- package/dist/controls/PointerLockControls.js +8 -8
- package/dist/controls/{TrackballControls.mjs → TrackballControls.cjs} +32 -32
- package/dist/controls/TrackballControls.js +32 -32
- package/dist/controls/{TransformControls.mjs → TransformControls.cjs} +169 -169
- package/dist/controls/TransformControls.js +169 -169
- package/dist/controls/experimental/{CameraControls.mjs → CameraControls.cjs} +59 -59
- package/dist/controls/experimental/CameraControls.js +59 -59
- package/dist/csm/{CSM.mjs → CSM.cjs} +17 -17
- package/dist/csm/CSM.js +17 -17
- package/dist/csm/{CSMFrustum.mjs → CSMFrustum.cjs} +7 -7
- package/dist/csm/CSMFrustum.js +7 -7
- package/dist/csm/{CSMHelper.mjs → CSMHelper.cjs} +14 -14
- package/dist/csm/CSMHelper.js +14 -14
- package/dist/csm/{CSMShader.mjs → CSMShader.cjs} +5 -5
- package/dist/csm/CSMShader.js +5 -5
- package/dist/curves/{CurveExtras.mjs → CurveExtras.cjs} +45 -45
- package/dist/curves/CurveExtras.js +45 -45
- package/dist/curves/{NURBSCurve.mjs → NURBSCurve.cjs} +11 -11
- package/dist/curves/NURBSCurve.js +11 -11
- package/dist/curves/{NURBSSurface.mjs → NURBSSurface.cjs} +7 -7
- package/dist/curves/NURBSSurface.js +7 -7
- package/dist/curves/{NURBSUtils.mjs → NURBSUtils.cjs} +17 -17
- package/dist/curves/NURBSUtils.js +17 -17
- package/dist/deprecated/{Geometry.mjs → Geometry.cjs} +51 -51
- package/dist/deprecated/Geometry.js +51 -51
- package/dist/effects/{AnaglyphEffect.mjs → AnaglyphEffect.cjs} +14 -14
- package/dist/effects/AnaglyphEffect.js +14 -14
- package/dist/effects/{AsciiEffect.mjs → AsciiEffect.cjs} +3 -3
- package/dist/effects/AsciiEffect.js +3 -3
- package/dist/effects/{OutlineEffect.mjs → OutlineEffect.cjs} +8 -8
- package/dist/effects/OutlineEffect.js +8 -8
- package/dist/effects/{ParallaxBarrierEffect.mjs → ParallaxBarrierEffect.cjs} +12 -12
- package/dist/effects/ParallaxBarrierEffect.js +12 -12
- package/dist/effects/{PeppersGhostEffect.mjs → PeppersGhostEffect.cjs} +11 -11
- package/dist/effects/PeppersGhostEffect.js +11 -11
- package/dist/effects/{StereoEffect.mjs → StereoEffect.cjs} +6 -6
- package/dist/effects/StereoEffect.js +6 -6
- package/dist/environments/RoomEnvironment.cjs +95 -0
- package/dist/environments/RoomEnvironment.js +23 -40
- package/dist/exporters/{ColladaExporter.mjs → ColladaExporter.cjs} +16 -16
- package/dist/exporters/ColladaExporter.js +16 -16
- package/dist/exporters/{DRACOExporter.mjs → DRACOExporter.cjs} +8 -8
- package/dist/exporters/DRACOExporter.js +8 -8
- package/dist/exporters/{GLTFExporter.mjs → GLTFExporter.cjs} +47 -47
- package/dist/exporters/GLTFExporter.js +47 -47
- package/dist/exporters/{MMDExporter.mjs → MMDExporter.cjs} +10 -10
- package/dist/exporters/MMDExporter.js +10 -10
- package/dist/exporters/{OBJExporter.mjs → OBJExporter.cjs} +13 -13
- package/dist/exporters/OBJExporter.js +13 -13
- package/dist/exporters/{PLYExporter.mjs → PLYExporter.cjs} +8 -8
- package/dist/exporters/PLYExporter.js +8 -8
- package/dist/exporters/{STLExporter.mjs → STLExporter.cjs} +12 -12
- package/dist/exporters/STLExporter.js +12 -12
- package/dist/exporters/{USDZExporter.mjs → USDZExporter.cjs} +10 -10
- package/dist/exporters/USDZExporter.js +10 -10
- package/dist/geometries/{BoxLineGeometry.mjs → BoxLineGeometry.cjs} +6 -6
- package/dist/geometries/BoxLineGeometry.js +6 -6
- package/dist/geometries/ConvexGeometry.cjs +26 -0
- package/dist/geometries/ConvexGeometry.js +9 -9
- package/dist/geometries/{DecalGeometry.mjs → DecalGeometry.cjs} +16 -16
- package/dist/geometries/DecalGeometry.js +16 -16
- package/dist/geometries/{LightningStrike.mjs → LightningStrike.cjs} +45 -45
- package/dist/geometries/LightningStrike.js +45 -45
- package/dist/geometries/{ParametricGeometries.mjs → ParametricGeometries.cjs} +11 -11
- package/dist/geometries/ParametricGeometries.js +11 -11
- package/dist/geometries/{ParametricGeometry.mjs → ParametricGeometry.cjs} +11 -11
- package/dist/geometries/ParametricGeometry.js +11 -11
- package/dist/geometries/{RoundedBoxGeometry.mjs → RoundedBoxGeometry.cjs} +10 -10
- package/dist/geometries/RoundedBoxGeometry.js +10 -10
- package/dist/geometries/{TeapotGeometry.mjs → TeapotGeometry.cjs} +21 -21
- package/dist/geometries/TeapotGeometry.js +21 -21
- package/dist/geometries/{TextGeometry.mjs → TextGeometry.cjs} +6 -6
- package/dist/geometries/TextGeometry.js +6 -6
- package/dist/helpers/{LightProbeHelper.mjs → LightProbeHelper.cjs} +7 -7
- package/dist/helpers/LightProbeHelper.js +7 -7
- package/dist/helpers/{PositionalAudioHelper.mjs → PositionalAudioHelper.cjs} +11 -11
- package/dist/helpers/PositionalAudioHelper.js +11 -11
- package/dist/helpers/{RectAreaLightHelper.mjs → RectAreaLightHelper.cjs} +11 -11
- package/dist/helpers/RectAreaLightHelper.js +11 -11
- package/dist/helpers/{VertexNormalsHelper.mjs → VertexNormalsHelper.cjs} +11 -11
- package/dist/helpers/VertexNormalsHelper.js +11 -11
- package/dist/helpers/{VertexTangentsHelper.mjs → VertexTangentsHelper.cjs} +10 -10
- package/dist/helpers/VertexTangentsHelper.js +10 -10
- package/dist/index.cjs +613 -0
- package/dist/index.js +613 -613
- package/dist/interactive/{HTMLMesh.mjs → HTMLMesh.cjs} +11 -11
- package/dist/interactive/HTMLMesh.js +11 -11
- package/dist/interactive/{InteractiveGroup.mjs → InteractiveGroup.cjs} +8 -8
- package/dist/interactive/InteractiveGroup.js +8 -8
- package/dist/interactive/{SelectionBox.mjs → SelectionBox.cjs} +21 -21
- package/dist/interactive/SelectionBox.js +21 -21
- package/dist/interactive/{SelectionHelper.mjs → SelectionHelper.cjs} +7 -7
- package/dist/interactive/SelectionHelper.js +7 -7
- package/dist/libs/{MeshoptDecoder.mjs → MeshoptDecoder.cjs} +3 -3
- package/dist/libs/MeshoptDecoder.js +3 -3
- package/dist/libs/{MotionControllers.mjs → MotionControllers.cjs} +6 -6
- package/dist/libs/MotionControllers.js +6 -6
- package/dist/lights/{LightProbeGenerator.mjs → LightProbeGenerator.cjs} +16 -16
- package/dist/lights/LightProbeGenerator.js +16 -16
- package/dist/lights/{RectAreaLightUniformsLib.mjs → RectAreaLightUniformsLib.cjs} +42 -42
- package/dist/lights/RectAreaLightUniformsLib.js +42 -42
- package/dist/lines/Line2.cjs +13 -0
- package/dist/lines/Line2.js +8 -8
- package/dist/lines/{LineGeometry.mjs → LineGeometry.cjs} +5 -5
- package/dist/lines/LineGeometry.js +5 -5
- package/dist/lines/{LineMaterial.mjs → LineMaterial.cjs} +10 -10
- package/dist/lines/LineMaterial.js +10 -10
- package/dist/lines/{LineSegments2.mjs → LineSegments2.cjs} +28 -28
- package/dist/lines/LineSegments2.js +28 -28
- package/dist/lines/{LineSegmentsGeometry.mjs → LineSegmentsGeometry.cjs} +18 -18
- package/dist/lines/LineSegmentsGeometry.js +18 -18
- package/dist/lines/Wireframe.cjs +32 -0
- package/dist/lines/Wireframe.js +13 -13
- package/dist/lines/WireframeGeometry2.cjs +13 -0
- package/dist/lines/WireframeGeometry2.js +7 -7
- package/dist/loaders/{3DMLoader.mjs → 3DMLoader.cjs} +37 -37
- package/dist/loaders/3DMLoader.js +37 -37
- package/dist/loaders/{3MFLoader.mjs → 3MFLoader.cjs} +53 -53
- package/dist/loaders/3MFLoader.js +53 -53
- package/dist/loaders/{AMFLoader.mjs → AMFLoader.cjs} +19 -19
- package/dist/loaders/AMFLoader.js +19 -19
- package/dist/loaders/{AssimpLoader.mjs → AssimpLoader.cjs} +41 -41
- package/dist/loaders/AssimpLoader.js +41 -41
- package/dist/loaders/{BVHLoader.mjs → BVHLoader.cjs} +18 -18
- package/dist/loaders/BVHLoader.js +18 -18
- package/dist/loaders/{BasisTextureLoader.mjs → BasisTextureLoader.cjs} +22 -22
- package/dist/loaders/BasisTextureLoader.js +22 -22
- package/dist/loaders/{ColladaLoader.mjs → ColladaLoader.cjs} +76 -76
- package/dist/loaders/ColladaLoader.js +76 -76
- package/dist/loaders/{DDSLoader.mjs → DDSLoader.cjs} +10 -10
- package/dist/loaders/DDSLoader.js +10 -10
- package/dist/loaders/{DRACOLoader.mjs → DRACOLoader.cjs} +12 -12
- package/dist/loaders/DRACOLoader.js +12 -12
- package/dist/loaders/{EXRLoader.mjs → EXRLoader.cjs} +23 -23
- package/dist/loaders/EXRLoader.js +23 -23
- package/dist/loaders/{FBXLoader.mjs → FBXLoader.cjs} +116 -116
- package/dist/loaders/FBXLoader.js +116 -116
- package/dist/loaders/{FontLoader.mjs → FontLoader.cjs} +9 -9
- package/dist/loaders/FontLoader.js +9 -9
- package/dist/loaders/{GCodeLoader.mjs → GCodeLoader.cjs} +13 -13
- package/dist/loaders/GCodeLoader.js +13 -13
- package/dist/loaders/{GLTFLoader.mjs → GLTFLoader.cjs} +112 -112
- package/dist/loaders/GLTFLoader.js +112 -112
- package/dist/loaders/{HDRCubeTextureLoader.mjs → HDRCubeTextureLoader.cjs} +15 -15
- package/dist/loaders/HDRCubeTextureLoader.js +15 -15
- package/dist/loaders/{KMZLoader.mjs → KMZLoader.cjs} +13 -13
- package/dist/loaders/KMZLoader.js +13 -13
- package/dist/loaders/{KTX2Loader.mjs → KTX2Loader.cjs} +65 -65
- package/dist/loaders/KTX2Loader.js +65 -65
- package/dist/loaders/{KTXLoader.mjs → KTXLoader.cjs} +5 -5
- package/dist/loaders/KTXLoader.js +5 -5
- package/dist/loaders/{LDrawLoader.mjs → LDrawLoader.cjs} +39 -39
- package/dist/loaders/LDrawLoader.js +39 -39
- package/dist/loaders/{LUT3dlLoader.mjs → LUT3dlLoader.cjs} +22 -22
- package/dist/loaders/LUT3dlLoader.js +22 -22
- package/dist/loaders/{LUTCubeLoader.mjs → LUTCubeLoader.cjs} +22 -22
- package/dist/loaders/LUTCubeLoader.js +22 -22
- package/dist/loaders/{LWOLoader.mjs → LWOLoader.cjs} +42 -42
- package/dist/loaders/LWOLoader.js +42 -42
- package/dist/loaders/{LottieLoader.mjs → LottieLoader.cjs} +8 -8
- package/dist/loaders/LottieLoader.js +8 -8
- package/dist/loaders/{MD2Loader.mjs → MD2Loader.cjs} +15 -15
- package/dist/loaders/MD2Loader.js +15 -15
- package/dist/loaders/{MDDLoader.mjs → MDDLoader.cjs} +9 -9
- package/dist/loaders/MDDLoader.js +9 -9
- package/dist/loaders/{MMDLoader.mjs → MMDLoader.cjs} +59 -59
- package/dist/loaders/MMDLoader.js +59 -59
- package/dist/loaders/{MTLLoader.mjs → MTLLoader.cjs} +17 -17
- package/dist/loaders/MTLLoader.js +17 -17
- package/dist/loaders/{NRRDLoader.mjs → NRRDLoader.cjs} +17 -17
- package/dist/loaders/NRRDLoader.js +17 -17
- package/dist/loaders/{OBJLoader.mjs → OBJLoader.cjs} +37 -37
- package/dist/loaders/OBJLoader.js +37 -37
- package/dist/loaders/{PCDLoader.mjs → PCDLoader.cjs} +13 -13
- package/dist/loaders/PCDLoader.js +13 -13
- package/dist/loaders/{PDBLoader.mjs → PDBLoader.cjs} +11 -11
- package/dist/loaders/PDBLoader.js +11 -11
- package/dist/loaders/{PLYLoader.mjs → PLYLoader.cjs} +13 -13
- package/dist/loaders/PLYLoader.js +13 -13
- package/dist/loaders/{PRWMLoader.mjs → PRWMLoader.cjs} +9 -9
- package/dist/loaders/PRWMLoader.js +9 -9
- package/dist/loaders/{PVRLoader.mjs → PVRLoader.cjs} +11 -11
- package/dist/loaders/PVRLoader.js +11 -11
- package/dist/loaders/{RGBELoader.mjs → RGBELoader.cjs} +18 -18
- package/dist/loaders/RGBELoader.js +18 -18
- package/dist/loaders/{RGBMLoader.mjs → RGBMLoader.cjs} +16 -16
- package/dist/loaders/RGBMLoader.js +16 -16
- package/dist/loaders/{STLLoader.mjs → STLLoader.cjs} +15 -15
- package/dist/loaders/STLLoader.js +15 -15
- package/dist/loaders/{SVGLoader.mjs → SVGLoader.cjs} +55 -55
- package/dist/loaders/SVGLoader.js +55 -55
- package/dist/loaders/{TDSLoader.mjs → TDSLoader.cjs} +20 -20
- package/dist/loaders/TDSLoader.js +20 -20
- package/dist/loaders/{TGALoader.mjs → TGALoader.cjs} +6 -6
- package/dist/loaders/TGALoader.js +6 -6
- package/dist/loaders/{TTFLoader.mjs → TTFLoader.cjs} +9 -9
- package/dist/loaders/TTFLoader.js +9 -9
- package/dist/loaders/{TiltLoader.mjs → TiltLoader.cjs} +26 -26
- package/dist/loaders/TiltLoader.js +26 -26
- package/dist/loaders/{VOXLoader.mjs → VOXLoader.cjs} +18 -18
- package/dist/loaders/VOXLoader.js +18 -18
- package/dist/loaders/{VRMLLoader.mjs → VRMLLoader.cjs} +125 -125
- package/dist/loaders/VRMLLoader.js +125 -125
- package/dist/loaders/{VRMLoader.mjs → VRMLoader.cjs} +7 -7
- package/dist/loaders/VRMLoader.js +7 -7
- package/dist/loaders/{VTKLoader.mjs → VTKLoader.cjs} +24 -24
- package/dist/loaders/VTKLoader.js +24 -24
- package/dist/loaders/{XLoader.mjs → XLoader.cjs} +42 -42
- package/dist/loaders/XLoader.js +42 -42
- package/dist/loaders/{XYZLoader.mjs → XYZLoader.cjs} +9 -9
- package/dist/loaders/XYZLoader.js +9 -9
- package/dist/loaders/lwo/{IFFParser.mjs → IFFParser.cjs} +7 -7
- package/dist/loaders/lwo/IFFParser.js +7 -7
- package/dist/loaders/lwo/{LWO2Parser.mjs → LWO2Parser.cjs} +3 -3
- package/dist/loaders/lwo/LWO2Parser.js +3 -3
- package/dist/loaders/lwo/{LWO3Parser.mjs → LWO3Parser.cjs} +3 -3
- package/dist/loaders/lwo/LWO3Parser.js +3 -3
- package/dist/math/{Capsule.mjs → Capsule.cjs} +8 -8
- package/dist/math/Capsule.js +8 -8
- package/dist/math/{ColorConverter.mjs → ColorConverter.cjs} +7 -7
- package/dist/math/ColorConverter.js +7 -7
- package/dist/math/{ConvexHull.mjs → ConvexHull.cjs} +18 -18
- package/dist/math/ConvexHull.js +18 -18
- package/dist/math/{ImprovedNoise.mjs → ImprovedNoise.cjs} +3 -3
- package/dist/math/ImprovedNoise.js +3 -3
- package/dist/math/{Lut.mjs → Lut.cjs} +14 -14
- package/dist/math/Lut.js +14 -14
- package/dist/math/{MeshSurfaceSampler.mjs → MeshSurfaceSampler.cjs} +6 -6
- package/dist/math/MeshSurfaceSampler.js +6 -6
- package/dist/math/{OBB.mjs → OBB.cjs} +21 -21
- package/dist/math/OBB.js +21 -21
- package/dist/math/{Octree.mjs → Octree.cjs} +19 -19
- package/dist/math/Octree.js +19 -19
- package/dist/math/{SimplexNoise.mjs → SimplexNoise.cjs} +3 -3
- package/dist/math/SimplexNoise.js +3 -3
- package/dist/misc/{ConvexObjectBreaker.mjs → ConvexObjectBreaker.cjs} +25 -25
- package/dist/misc/ConvexObjectBreaker.js +25 -25
- package/dist/misc/{GPUComputationRenderer.mjs → GPUComputationRenderer.cjs} +19 -19
- package/dist/misc/GPUComputationRenderer.js +19 -19
- package/dist/misc/{Gyroscope.mjs → Gyroscope.cjs} +11 -11
- package/dist/misc/Gyroscope.js +11 -11
- package/dist/misc/{MD2Character.mjs → MD2Character.cjs} +14 -14
- package/dist/misc/MD2Character.js +14 -14
- package/dist/misc/{MD2CharacterComplex.mjs → MD2CharacterComplex.cjs} +20 -20
- package/dist/misc/MD2CharacterComplex.js +20 -20
- package/dist/misc/{MorphAnimMesh.mjs → MorphAnimMesh.cjs} +8 -8
- package/dist/misc/MorphAnimMesh.js +8 -8
- package/dist/misc/{MorphBlendMesh.mjs → MorphBlendMesh.cjs} +6 -6
- package/dist/misc/MorphBlendMesh.js +6 -6
- package/dist/misc/{ProgressiveLightmap.mjs → ProgressiveLightmap.cjs} +17 -17
- package/dist/misc/ProgressiveLightmap.js +17 -17
- package/dist/misc/{RollerCoaster.mjs → RollerCoaster.cjs} +77 -77
- package/dist/misc/RollerCoaster.js +77 -77
- package/dist/misc/{Timer.mjs → Timer.cjs} +3 -3
- package/dist/misc/Timer.js +3 -3
- package/dist/misc/{TubePainter.mjs → TubePainter.cjs} +24 -24
- package/dist/misc/TubePainter.js +24 -24
- package/dist/misc/{Volume.mjs → Volume.cjs} +18 -18
- package/dist/misc/Volume.js +18 -18
- package/dist/misc/{VolumeSlice.mjs → VolumeSlice.cjs} +10 -10
- package/dist/misc/VolumeSlice.js +10 -10
- package/dist/misc/{WebGL.mjs → WebGL.cjs} +7 -7
- package/dist/misc/WebGL.js +7 -7
- package/dist/modifiers/{CurveModifier.mjs → CurveModifier.cjs} +17 -17
- package/dist/modifiers/CurveModifier.js +17 -17
- package/dist/modifiers/{EdgeSplitModifier.mjs → EdgeSplitModifier.cjs} +12 -13
- package/dist/modifiers/EdgeSplitModifier.js +13 -12
- package/dist/modifiers/{SimplifyModifier.mjs → SimplifyModifier.cjs} +12 -12
- package/dist/modifiers/SimplifyModifier.js +12 -12
- package/dist/modifiers/{TessellateModifier.mjs → TessellateModifier.cjs} +30 -30
- package/dist/modifiers/TessellateModifier.js +30 -30
- package/dist/objects/{GroundProjectedEnv.mjs → GroundProjectedEnv.cjs} +8 -8
- package/dist/objects/GroundProjectedEnv.js +8 -8
- package/dist/objects/{Lensflare.mjs → Lensflare.cjs} +37 -37
- package/dist/objects/Lensflare.js +37 -37
- package/dist/objects/{LightningStorm.mjs → LightningStorm.cjs} +17 -17
- package/dist/objects/LightningStorm.js +17 -17
- package/dist/objects/{MarchingCubes.mjs → MarchingCubes.cjs} +21 -21
- package/dist/objects/MarchingCubes.js +21 -21
- package/dist/objects/{Reflector.mjs → Reflector.cjs} +23 -23
- package/dist/objects/Reflector.js +23 -23
- package/dist/objects/{ReflectorForSSRPass.mjs → ReflectorForSSRPass.cjs} +33 -33
- package/dist/objects/ReflectorForSSRPass.js +33 -33
- package/dist/objects/ReflectorRTT.cjs +10 -0
- package/dist/objects/ReflectorRTT.js +5 -5
- package/dist/objects/{Refractor.mjs → Refractor.cjs} +26 -26
- package/dist/objects/Refractor.js +26 -26
- package/dist/objects/{ShadowMesh.mjs → ShadowMesh.cjs} +9 -9
- package/dist/objects/ShadowMesh.js +9 -9
- package/dist/objects/{Sky.mjs → Sky.cjs} +11 -11
- package/dist/objects/Sky.js +11 -11
- package/dist/objects/{Water.mjs → Water.cjs} +33 -33
- package/dist/objects/Water.js +33 -33
- package/dist/objects/{Water2.mjs → Water2.cjs} +20 -20
- package/dist/objects/Water2.js +20 -20
- package/dist/physics/{AmmoPhysics.mjs → AmmoPhysics.cjs} +3 -3
- package/dist/physics/AmmoPhysics.js +3 -3
- package/dist/postprocessing/{AdaptiveToneMappingPass.mjs → AdaptiveToneMappingPass.cjs} +32 -32
- package/dist/postprocessing/AdaptiveToneMappingPass.js +32 -32
- package/dist/postprocessing/{AfterimagePass.mjs → AfterimagePass.cjs} +21 -21
- package/dist/postprocessing/AfterimagePass.js +21 -21
- package/dist/postprocessing/{BloomPass.mjs → BloomPass.cjs} +20 -20
- package/dist/postprocessing/BloomPass.js +20 -20
- package/dist/postprocessing/{BokehPass.mjs → BokehPass.cjs} +19 -19
- package/dist/postprocessing/BokehPass.js +19 -19
- package/dist/postprocessing/{ClearPass.mjs → ClearPass.cjs} +7 -7
- package/dist/postprocessing/ClearPass.js +7 -7
- package/dist/postprocessing/{CubeTexturePass.mjs → CubeTexturePass.cjs} +14 -14
- package/dist/postprocessing/CubeTexturePass.js +14 -14
- package/dist/postprocessing/{DotScreenPass.mjs → DotScreenPass.cjs} +12 -12
- package/dist/postprocessing/DotScreenPass.js +12 -12
- package/dist/postprocessing/{EffectComposer.mjs → EffectComposer.cjs} +20 -20
- package/dist/postprocessing/EffectComposer.js +20 -20
- package/dist/postprocessing/{FilmPass.mjs → FilmPass.cjs} +12 -12
- package/dist/postprocessing/FilmPass.js +12 -12
- package/dist/postprocessing/{GlitchPass.mjs → GlitchPass.cjs} +26 -26
- package/dist/postprocessing/GlitchPass.js +26 -26
- package/dist/postprocessing/{HalftonePass.mjs → HalftonePass.cjs} +13 -13
- package/dist/postprocessing/HalftonePass.js +13 -13
- package/dist/postprocessing/{LUTPass.mjs → LUTPass.cjs} +5 -5
- package/dist/postprocessing/LUTPass.js +5 -5
- package/dist/postprocessing/{MaskPass.mjs → MaskPass.cjs} +7 -7
- package/dist/postprocessing/MaskPass.js +7 -7
- package/dist/postprocessing/{OutlinePass.mjs → OutlinePass.cjs} +45 -45
- package/dist/postprocessing/OutlinePass.js +45 -45
- package/dist/postprocessing/{Pass.mjs → Pass.cjs} +8 -8
- package/dist/postprocessing/Pass.js +8 -8
- package/dist/postprocessing/{RenderPass.mjs → RenderPass.cjs} +7 -7
- package/dist/postprocessing/RenderPass.js +7 -7
- package/dist/postprocessing/{RenderPixelatedPass.mjs → RenderPixelatedPass.cjs} +18 -18
- package/dist/postprocessing/RenderPixelatedPass.js +18 -18
- package/dist/postprocessing/{SAOPass.mjs → SAOPass.cjs} +69 -69
- package/dist/postprocessing/SAOPass.js +69 -69
- package/dist/postprocessing/{SMAAPass.mjs → SMAAPass.cjs} +30 -30
- package/dist/postprocessing/SMAAPass.js +30 -30
- package/dist/postprocessing/{SSAARenderPass.mjs → SSAARenderPass.cjs} +19 -19
- package/dist/postprocessing/SSAARenderPass.js +19 -19
- package/dist/postprocessing/{SSAOPass.mjs → SSAOPass.cjs} +63 -63
- package/dist/postprocessing/SSAOPass.js +63 -63
- package/dist/postprocessing/{SSRPass.mjs → SSRPass.cjs} +86 -86
- package/dist/postprocessing/SSRPass.js +86 -86
- package/dist/postprocessing/{SavePass.mjs → SavePass.cjs} +13 -13
- package/dist/postprocessing/SavePass.js +13 -13
- package/dist/postprocessing/{ShaderPass.mjs → ShaderPass.cjs} +10 -10
- package/dist/postprocessing/ShaderPass.js +10 -10
- package/dist/postprocessing/{TAARenderPass.mjs → TAARenderPass.cjs} +8 -8
- package/dist/postprocessing/TAARenderPass.js +8 -8
- package/dist/postprocessing/{TexturePass.mjs → TexturePass.cjs} +11 -11
- package/dist/postprocessing/TexturePass.js +11 -11
- package/dist/postprocessing/{UnrealBloomPass.mjs → UnrealBloomPass.cjs} +36 -36
- package/dist/postprocessing/UnrealBloomPass.js +36 -36
- package/dist/postprocessing/{WaterPass.mjs → WaterPass.cjs} +10 -10
- package/dist/postprocessing/WaterPass.js +10 -10
- package/dist/renderers/{CSS2DRenderer.mjs → CSS2DRenderer.cjs} +12 -12
- package/dist/renderers/CSS2DRenderer.js +12 -12
- package/dist/renderers/{CSS3DRenderer.mjs → CSS3DRenderer.cjs} +12 -12
- package/dist/renderers/CSS3DRenderer.js +12 -12
- package/dist/renderers/{Projector.mjs → Projector.cjs} +21 -21
- package/dist/renderers/Projector.js +21 -21
- package/dist/renderers/{SVGRenderer.mjs → SVGRenderer.cjs} +12 -12
- package/dist/renderers/SVGRenderer.js +12 -12
- package/dist/shaders/{ACESFilmicToneMappingShader.mjs → ACESFilmicToneMappingShader.cjs} +3 -3
- package/dist/shaders/ACESFilmicToneMappingShader.js +3 -3
- package/dist/shaders/{AfterimageShader.mjs → AfterimageShader.cjs} +3 -3
- package/dist/shaders/AfterimageShader.js +3 -3
- package/dist/shaders/{BasicShader.mjs → BasicShader.cjs} +3 -3
- package/dist/shaders/BasicShader.js +3 -3
- package/dist/shaders/{BleachBypassShader.mjs → BleachBypassShader.cjs} +3 -3
- package/dist/shaders/BleachBypassShader.js +3 -3
- package/dist/shaders/{BlendShader.mjs → BlendShader.cjs} +3 -3
- package/dist/shaders/BlendShader.js +3 -3
- package/dist/shaders/{BokehShader.mjs → BokehShader.cjs} +3 -3
- package/dist/shaders/BokehShader.js +3 -3
- package/dist/shaders/{BokehShader2.mjs → BokehShader2.cjs} +6 -6
- package/dist/shaders/BokehShader2.js +6 -6
- package/dist/shaders/{BrightnessContrastShader.mjs → BrightnessContrastShader.cjs} +3 -3
- package/dist/shaders/BrightnessContrastShader.js +3 -3
- package/dist/shaders/{ColorCorrectionShader.mjs → ColorCorrectionShader.cjs} +7 -7
- package/dist/shaders/ColorCorrectionShader.js +7 -7
- package/dist/shaders/{ColorifyShader.mjs → ColorifyShader.cjs} +5 -5
- package/dist/shaders/ColorifyShader.js +5 -5
- package/dist/shaders/{ConvolutionShader.mjs → ConvolutionShader.cjs} +5 -5
- package/dist/shaders/ConvolutionShader.js +5 -5
- package/dist/shaders/{CopyShader.mjs → CopyShader.cjs} +3 -3
- package/dist/shaders/CopyShader.js +3 -3
- package/dist/shaders/{DOFMipMapShader.mjs → DOFMipMapShader.cjs} +3 -3
- package/dist/shaders/DOFMipMapShader.js +3 -3
- package/dist/shaders/{DepthLimitedBlurShader.mjs → DepthLimitedBlurShader.cjs} +7 -7
- package/dist/shaders/DepthLimitedBlurShader.js +7 -7
- package/dist/shaders/{DigitalGlitch.mjs → DigitalGlitch.cjs} +3 -3
- package/dist/shaders/DigitalGlitch.js +3 -3
- package/dist/shaders/{DotScreenShader.mjs → DotScreenShader.cjs} +6 -6
- package/dist/shaders/DotScreenShader.js +6 -6
- package/dist/shaders/{FXAAShader.mjs → FXAAShader.cjs} +5 -5
- package/dist/shaders/FXAAShader.js +5 -5
- package/dist/shaders/{FilmShader.mjs → FilmShader.cjs} +3 -3
- package/dist/shaders/FilmShader.js +3 -3
- package/dist/shaders/{FocusShader.mjs → FocusShader.cjs} +3 -3
- package/dist/shaders/FocusShader.js +3 -3
- package/dist/shaders/{FreiChenShader.mjs → FreiChenShader.cjs} +5 -5
- package/dist/shaders/FreiChenShader.js +5 -5
- package/dist/shaders/{FresnelShader.mjs → FresnelShader.cjs} +3 -3
- package/dist/shaders/FresnelShader.js +3 -3
- package/dist/shaders/{GammaCorrectionShader.mjs → GammaCorrectionShader.cjs} +3 -3
- package/dist/shaders/GammaCorrectionShader.js +3 -3
- package/dist/shaders/{GodRaysShader.mjs → GodRaysShader.cjs} +11 -11
- package/dist/shaders/GodRaysShader.js +11 -11
- package/dist/shaders/{HalftoneShader.mjs → HalftoneShader.cjs} +3 -3
- package/dist/shaders/HalftoneShader.js +3 -3
- package/dist/shaders/{HorizontalBlurShader.mjs → HorizontalBlurShader.cjs} +3 -3
- package/dist/shaders/HorizontalBlurShader.js +3 -3
- package/dist/shaders/{HorizontalTiltShiftShader.mjs → HorizontalTiltShiftShader.cjs} +3 -3
- package/dist/shaders/HorizontalTiltShiftShader.js +3 -3
- package/dist/shaders/{HueSaturationShader.mjs → HueSaturationShader.cjs} +3 -3
- package/dist/shaders/HueSaturationShader.js +3 -3
- package/dist/shaders/{KaleidoShader.mjs → KaleidoShader.cjs} +3 -3
- package/dist/shaders/KaleidoShader.js +3 -3
- package/dist/shaders/{LuminosityHighPassShader.mjs → LuminosityHighPassShader.cjs} +5 -5
- package/dist/shaders/LuminosityHighPassShader.js +5 -5
- package/dist/shaders/{LuminosityShader.mjs → LuminosityShader.cjs} +3 -3
- package/dist/shaders/LuminosityShader.js +3 -3
- package/dist/shaders/{MirrorShader.mjs → MirrorShader.cjs} +3 -3
- package/dist/shaders/MirrorShader.js +3 -3
- package/dist/shaders/{NormalMapShader.mjs → NormalMapShader.cjs} +6 -6
- package/dist/shaders/NormalMapShader.js +6 -6
- package/dist/shaders/{ParallaxShader.mjs → ParallaxShader.cjs} +3 -3
- package/dist/shaders/ParallaxShader.js +3 -3
- package/dist/shaders/{PixelShader.mjs → PixelShader.cjs} +3 -3
- package/dist/shaders/PixelShader.js +3 -3
- package/dist/shaders/{RGBShiftShader.mjs → RGBShiftShader.cjs} +3 -3
- package/dist/shaders/RGBShiftShader.js +3 -3
- package/dist/shaders/{SAOShader.mjs → SAOShader.cjs} +7 -7
- package/dist/shaders/SAOShader.js +7 -7
- package/dist/shaders/{SMAAShader.mjs → SMAAShader.cjs} +9 -9
- package/dist/shaders/SMAAShader.js +9 -9
- package/dist/shaders/{SSAOShader.mjs → SSAOShader.cjs} +10 -10
- package/dist/shaders/SSAOShader.js +10 -10
- package/dist/shaders/{SSRShader.mjs → SSRShader.cjs} +10 -10
- package/dist/shaders/SSRShader.js +10 -10
- package/dist/shaders/{SepiaShader.mjs → SepiaShader.cjs} +3 -3
- package/dist/shaders/SepiaShader.js +3 -3
- package/dist/shaders/{SobelOperatorShader.mjs → SobelOperatorShader.cjs} +5 -5
- package/dist/shaders/SobelOperatorShader.js +5 -5
- package/dist/shaders/{SubsurfaceScatteringShader.mjs → SubsurfaceScatteringShader.cjs} +13 -13
- package/dist/shaders/SubsurfaceScatteringShader.js +13 -13
- package/dist/shaders/{TechnicolorShader.mjs → TechnicolorShader.cjs} +3 -3
- package/dist/shaders/TechnicolorShader.js +3 -3
- package/dist/shaders/{ToneMapShader.mjs → ToneMapShader.cjs} +3 -3
- package/dist/shaders/ToneMapShader.js +3 -3
- package/dist/shaders/{ToonShader.mjs → ToonShader.cjs} +32 -32
- package/dist/shaders/ToonShader.js +32 -32
- package/dist/shaders/{TriangleBlurShader.mjs → TriangleBlurShader.cjs} +5 -5
- package/dist/shaders/TriangleBlurShader.js +5 -5
- package/dist/shaders/{UnpackDepthRGBAShader.mjs → UnpackDepthRGBAShader.cjs} +3 -3
- package/dist/shaders/UnpackDepthRGBAShader.js +3 -3
- package/dist/shaders/{VerticalBlurShader.mjs → VerticalBlurShader.cjs} +3 -3
- package/dist/shaders/VerticalBlurShader.js +3 -3
- package/dist/shaders/{VerticalTiltShiftShader.mjs → VerticalTiltShiftShader.cjs} +3 -3
- package/dist/shaders/VerticalTiltShiftShader.js +3 -3
- package/dist/shaders/{VignetteShader.mjs → VignetteShader.cjs} +3 -3
- package/dist/shaders/VignetteShader.js +3 -3
- package/dist/shaders/{VolumeShader.mjs → VolumeShader.cjs} +6 -6
- package/dist/shaders/VolumeShader.js +6 -6
- package/dist/shaders/{WaterRefractionShader.mjs → WaterRefractionShader.cjs} +3 -3
- package/dist/shaders/WaterRefractionShader.js +3 -3
- package/dist/shaders/types.cjs +1 -0
- package/dist/shaders/types.js +1 -1
- package/dist/textures/{FlakesTexture.mjs → FlakesTexture.cjs} +3 -3
- package/dist/textures/FlakesTexture.js +3 -3
- package/dist/types/Loader.cjs +26 -0
- package/dist/types/Loader.js +5 -22
- package/dist/types/helpers.cjs +4 -0
- package/dist/types/helpers.js +3 -3
- package/dist/utils/{BufferGeometryUtils.mjs → BufferGeometryUtils.cjs} +41 -41
- package/dist/utils/BufferGeometryUtils.js +41 -41
- package/dist/utils/{GeometryCompressionUtils.mjs → GeometryCompressionUtils.cjs} +94 -94
- package/dist/utils/GeometryCompressionUtils.js +94 -94
- package/dist/utils/{GeometryUtils.mjs → GeometryUtils.cjs} +18 -18
- package/dist/utils/GeometryUtils.js +18 -18
- package/dist/utils/{RoughnessMipmapper.mjs → RoughnessMipmapper.cjs} +13 -13
- package/dist/utils/RoughnessMipmapper.js +13 -13
- package/dist/utils/{SceneUtils.mjs → SceneUtils.cjs} +8 -8
- package/dist/utils/SceneUtils.js +8 -8
- package/dist/utils/{ShadowMapViewer.mjs → ShadowMapViewer.cjs} +18 -18
- package/dist/utils/ShadowMapViewer.js +18 -18
- package/dist/utils/{SkeletonUtils.mjs → SkeletonUtils.cjs} +10 -10
- package/dist/utils/SkeletonUtils.js +10 -10
- package/dist/utils/{UVsDebug.mjs → UVsDebug.cjs} +7 -7
- package/dist/utils/UVsDebug.js +7 -7
- package/dist/utils/{WorkerPool.mjs → WorkerPool.cjs} +3 -3
- package/dist/utils/WorkerPool.js +3 -3
- package/dist/webxr/{ARButton.mjs → ARButton.cjs} +3 -3
- package/dist/webxr/ARButton.js +3 -3
- package/dist/webxr/{OculusHandModel.mjs → OculusHandModel.cjs} +9 -9
- package/dist/webxr/OculusHandModel.js +9 -9
- package/dist/webxr/{OculusHandPointerModel.mjs → OculusHandPointerModel.cjs} +41 -24
- package/dist/webxr/OculusHandPointerModel.js +24 -41
- package/dist/webxr/Text2D.cjs +48 -0
- package/dist/webxr/Text2D.js +9 -26
- package/dist/webxr/{VRButton.mjs → VRButton.cjs} +3 -3
- package/dist/webxr/VRButton.js +3 -3
- package/dist/webxr/{XRControllerModelFactory.mjs → XRControllerModelFactory.cjs} +18 -18
- package/dist/webxr/XRControllerModelFactory.js +18 -18
- package/dist/webxr/{XREstimatedLight.mjs → XREstimatedLight.cjs} +8 -8
- package/dist/webxr/XREstimatedLight.js +8 -8
- package/dist/webxr/{XRHandMeshModel.mjs → XRHandMeshModel.cjs} +5 -5
- package/dist/webxr/XRHandMeshModel.js +5 -5
- package/dist/webxr/{XRHandModelFactory.mjs → XRHandModelFactory.cjs} +10 -10
- package/dist/webxr/XRHandModelFactory.js +10 -10
- package/dist/webxr/{XRHandPrimitiveModel.mjs → XRHandPrimitiveModel.cjs} +11 -11
- package/dist/webxr/XRHandPrimitiveModel.js +11 -11
- package/package.json +3 -3
- package/dist/_polyfill/CompressedArrayTexture.mjs +0 -12
- package/dist/_polyfill/Data3DTexture.mjs +0 -17
- package/dist/environments/RoomEnvironment.mjs +0 -78
- package/dist/geometries/ConvexGeometry.mjs +0 -26
- package/dist/index.mjs +0 -613
- package/dist/lines/Line2.mjs +0 -13
- package/dist/lines/Wireframe.mjs +0 -32
- package/dist/lines/WireframeGeometry2.mjs +0 -13
- package/dist/objects/ReflectorRTT.mjs +0 -10
- package/dist/shaders/types.mjs +0 -1
- package/dist/types/Loader.mjs +0 -9
- package/dist/types/helpers.mjs +0 -4
- package/dist/webxr/Text2D.mjs +0 -31
@@ -1,12 +1,14 @@
|
|
1
|
+
"use strict";
|
1
2
|
var __defProp = Object.defineProperty;
|
2
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3
4
|
var __publicField = (obj, key, value) => {
|
4
5
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
5
6
|
return value;
|
6
7
|
};
|
7
|
-
|
8
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
9
|
+
const THREE = require("three");
|
8
10
|
const moduloWrapAround = (offset, capacity) => (offset % capacity + capacity) % capacity;
|
9
|
-
class OrbitControls extends EventDispatcher {
|
11
|
+
class OrbitControls extends THREE.EventDispatcher {
|
10
12
|
constructor(object, domElement) {
|
11
13
|
super();
|
12
14
|
__publicField(this, "object");
|
@@ -14,7 +16,7 @@ class OrbitControls extends EventDispatcher {
|
|
14
16
|
// Set to false to disable this control
|
15
17
|
__publicField(this, "enabled", true);
|
16
18
|
// "target" sets the location of focus, where the object orbits around
|
17
|
-
__publicField(this, "target", new Vector3());
|
19
|
+
__publicField(this, "target", new THREE.Vector3());
|
18
20
|
// How far you can dolly in and out ( PerspectiveCamera only )
|
19
21
|
__publicField(this, "minDistance", 0);
|
20
22
|
__publicField(this, "maxDistance", Infinity);
|
@@ -62,12 +64,12 @@ class OrbitControls extends EventDispatcher {
|
|
62
64
|
__publicField(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" });
|
63
65
|
// Mouse buttons
|
64
66
|
__publicField(this, "mouseButtons", {
|
65
|
-
LEFT: MOUSE.ROTATE,
|
66
|
-
MIDDLE: MOUSE.DOLLY,
|
67
|
-
RIGHT: MOUSE.PAN
|
67
|
+
LEFT: THREE.MOUSE.ROTATE,
|
68
|
+
MIDDLE: THREE.MOUSE.DOLLY,
|
69
|
+
RIGHT: THREE.MOUSE.PAN
|
68
70
|
});
|
69
71
|
// Touch fingers
|
70
|
-
__publicField(this, "touches", { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN });
|
72
|
+
__publicField(this, "touches", { ONE: THREE.TOUCH.ROTATE, TWO: THREE.TOUCH.DOLLY_PAN });
|
71
73
|
__publicField(this, "target0");
|
72
74
|
__publicField(this, "position0");
|
73
75
|
__publicField(this, "zoom0");
|
@@ -88,7 +90,7 @@ class OrbitControls extends EventDispatcher {
|
|
88
90
|
this.domElement = domElement;
|
89
91
|
this.target0 = this.target.clone();
|
90
92
|
this.position0 = this.object.position.clone();
|
91
|
-
this.zoom0 = this.object
|
93
|
+
this.zoom0 = this.object.zoom;
|
92
94
|
this.getPolarAngle = () => spherical.phi;
|
93
95
|
this.getAzimuthalAngle = () => spherical.theta;
|
94
96
|
this.setPolarAngle = (value) => {
|
@@ -135,25 +137,23 @@ class OrbitControls extends EventDispatcher {
|
|
135
137
|
this.saveState = () => {
|
136
138
|
scope.target0.copy(scope.target);
|
137
139
|
scope.position0.copy(scope.object.position);
|
138
|
-
scope.zoom0 = scope.object
|
140
|
+
scope.zoom0 = scope.object.zoom;
|
139
141
|
};
|
140
142
|
this.reset = () => {
|
141
143
|
scope.target.copy(scope.target0);
|
142
144
|
scope.object.position.copy(scope.position0);
|
143
|
-
|
144
|
-
|
145
|
-
scope.object.updateProjectionMatrix();
|
146
|
-
}
|
145
|
+
scope.object.zoom = scope.zoom0;
|
146
|
+
scope.object.updateProjectionMatrix();
|
147
147
|
scope.dispatchEvent(changeEvent);
|
148
148
|
scope.update();
|
149
149
|
state = STATE.NONE;
|
150
150
|
};
|
151
151
|
this.update = (() => {
|
152
|
-
const offset = new Vector3();
|
153
|
-
const quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));
|
152
|
+
const offset = new THREE.Vector3();
|
153
|
+
const quat = new THREE.Quaternion().setFromUnitVectors(object.up, new THREE.Vector3(0, 1, 0));
|
154
154
|
const quatInverse = quat.clone().invert();
|
155
|
-
const lastPosition = new Vector3();
|
156
|
-
const lastQuaternion = new Quaternion();
|
155
|
+
const lastPosition = new THREE.Vector3();
|
156
|
+
const lastQuaternion = new THREE.Quaternion();
|
157
157
|
const twoPI = 2 * Math.PI;
|
158
158
|
return function update() {
|
159
159
|
const position = scope.object.position;
|
@@ -260,20 +260,20 @@ class OrbitControls extends EventDispatcher {
|
|
260
260
|
};
|
261
261
|
let state = STATE.NONE;
|
262
262
|
const EPS = 1e-6;
|
263
|
-
const spherical = new Spherical();
|
264
|
-
const sphericalDelta = new Spherical();
|
263
|
+
const spherical = new THREE.Spherical();
|
264
|
+
const sphericalDelta = new THREE.Spherical();
|
265
265
|
let scale = 1;
|
266
|
-
const panOffset = new Vector3();
|
266
|
+
const panOffset = new THREE.Vector3();
|
267
267
|
let zoomChanged = false;
|
268
|
-
const rotateStart = new Vector2();
|
269
|
-
const rotateEnd = new Vector2();
|
270
|
-
const rotateDelta = new Vector2();
|
271
|
-
const panStart = new Vector2();
|
272
|
-
const panEnd = new Vector2();
|
273
|
-
const panDelta = new Vector2();
|
274
|
-
const dollyStart = new Vector2();
|
275
|
-
const dollyEnd = new Vector2();
|
276
|
-
const dollyDelta = new Vector2();
|
268
|
+
const rotateStart = new THREE.Vector2();
|
269
|
+
const rotateEnd = new THREE.Vector2();
|
270
|
+
const rotateDelta = new THREE.Vector2();
|
271
|
+
const panStart = new THREE.Vector2();
|
272
|
+
const panEnd = new THREE.Vector2();
|
273
|
+
const panDelta = new THREE.Vector2();
|
274
|
+
const dollyStart = new THREE.Vector2();
|
275
|
+
const dollyEnd = new THREE.Vector2();
|
276
|
+
const dollyDelta = new THREE.Vector2();
|
277
277
|
const pointers = [];
|
278
278
|
const pointerPositions = {};
|
279
279
|
function getAutoRotationAngle() {
|
@@ -297,7 +297,7 @@ class OrbitControls extends EventDispatcher {
|
|
297
297
|
}
|
298
298
|
}
|
299
299
|
const panLeft = (() => {
|
300
|
-
const v = new Vector3();
|
300
|
+
const v = new THREE.Vector3();
|
301
301
|
return function panLeft2(distance, objectMatrix) {
|
302
302
|
v.setFromMatrixColumn(objectMatrix, 0);
|
303
303
|
v.multiplyScalar(-distance);
|
@@ -305,7 +305,7 @@ class OrbitControls extends EventDispatcher {
|
|
305
305
|
};
|
306
306
|
})();
|
307
307
|
const panUp = (() => {
|
308
|
-
const v = new Vector3();
|
308
|
+
const v = new THREE.Vector3();
|
309
309
|
return function panUp2(distance, objectMatrix) {
|
310
310
|
if (scope.screenSpacePanning === true) {
|
311
311
|
v.setFromMatrixColumn(objectMatrix, 1);
|
@@ -318,17 +318,17 @@ class OrbitControls extends EventDispatcher {
|
|
318
318
|
};
|
319
319
|
})();
|
320
320
|
const pan = (() => {
|
321
|
-
const offset = new Vector3();
|
321
|
+
const offset = new THREE.Vector3();
|
322
322
|
return function pan2(deltaX, deltaY) {
|
323
323
|
const element = scope.domElement;
|
324
|
-
if (element && scope.object instanceof PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
324
|
+
if (element && scope.object instanceof THREE.PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
325
325
|
const position = scope.object.position;
|
326
326
|
offset.copy(position).sub(scope.target);
|
327
327
|
let targetDistance = offset.length();
|
328
328
|
targetDistance *= Math.tan(scope.object.fov / 2 * Math.PI / 180);
|
329
329
|
panLeft(2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix);
|
330
330
|
panUp(2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix);
|
331
|
-
} else if (element && scope.object instanceof OrthographicCamera && scope.object.isOrthographicCamera) {
|
331
|
+
} else if (element && scope.object instanceof THREE.OrthographicCamera && scope.object.isOrthographicCamera) {
|
332
332
|
panLeft(
|
333
333
|
deltaX * (scope.object.right - scope.object.left) / scope.object.zoom / element.clientWidth,
|
334
334
|
scope.object.matrix
|
@@ -344,9 +344,9 @@ class OrbitControls extends EventDispatcher {
|
|
344
344
|
};
|
345
345
|
})();
|
346
346
|
function dollyOut(dollyScale) {
|
347
|
-
if (scope.object instanceof PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
347
|
+
if (scope.object instanceof THREE.PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
348
348
|
scale /= dollyScale;
|
349
|
-
} else if (scope.object instanceof OrthographicCamera && scope.object.isOrthographicCamera) {
|
349
|
+
} else if (scope.object instanceof THREE.OrthographicCamera && scope.object.isOrthographicCamera) {
|
350
350
|
scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom * dollyScale));
|
351
351
|
scope.object.updateProjectionMatrix();
|
352
352
|
zoomChanged = true;
|
@@ -356,9 +356,9 @@ class OrbitControls extends EventDispatcher {
|
|
356
356
|
}
|
357
357
|
}
|
358
358
|
function dollyIn(dollyScale) {
|
359
|
-
if (scope.object instanceof PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
359
|
+
if (scope.object instanceof THREE.PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
360
360
|
scale *= dollyScale;
|
361
|
-
} else if (scope.object instanceof OrthographicCamera && scope.object.isOrthographicCamera) {
|
361
|
+
} else if (scope.object instanceof THREE.OrthographicCamera && scope.object.isOrthographicCamera) {
|
362
362
|
scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / dollyScale));
|
363
363
|
scope.object.updateProjectionMatrix();
|
364
364
|
zoomChanged = true;
|
@@ -580,13 +580,13 @@ class OrbitControls extends EventDispatcher {
|
|
580
580
|
mouseAction = -1;
|
581
581
|
}
|
582
582
|
switch (mouseAction) {
|
583
|
-
case MOUSE.DOLLY:
|
583
|
+
case THREE.MOUSE.DOLLY:
|
584
584
|
if (scope.enableZoom === false)
|
585
585
|
return;
|
586
586
|
handleMouseDownDolly(event);
|
587
587
|
state = STATE.DOLLY;
|
588
588
|
break;
|
589
|
-
case MOUSE.ROTATE:
|
589
|
+
case THREE.MOUSE.ROTATE:
|
590
590
|
if (event.ctrlKey || event.metaKey || event.shiftKey) {
|
591
591
|
if (scope.enablePan === false)
|
592
592
|
return;
|
@@ -599,7 +599,7 @@ class OrbitControls extends EventDispatcher {
|
|
599
599
|
state = STATE.ROTATE;
|
600
600
|
}
|
601
601
|
break;
|
602
|
-
case MOUSE.PAN:
|
602
|
+
case THREE.MOUSE.PAN:
|
603
603
|
if (event.ctrlKey || event.metaKey || event.shiftKey) {
|
604
604
|
if (scope.enableRotate === false)
|
605
605
|
return;
|
@@ -659,13 +659,13 @@ class OrbitControls extends EventDispatcher {
|
|
659
659
|
switch (pointers.length) {
|
660
660
|
case 1:
|
661
661
|
switch (scope.touches.ONE) {
|
662
|
-
case TOUCH.ROTATE:
|
662
|
+
case THREE.TOUCH.ROTATE:
|
663
663
|
if (scope.enableRotate === false)
|
664
664
|
return;
|
665
665
|
handleTouchStartRotate();
|
666
666
|
state = STATE.TOUCH_ROTATE;
|
667
667
|
break;
|
668
|
-
case TOUCH.PAN:
|
668
|
+
case THREE.TOUCH.PAN:
|
669
669
|
if (scope.enablePan === false)
|
670
670
|
return;
|
671
671
|
handleTouchStartPan();
|
@@ -677,13 +677,13 @@ class OrbitControls extends EventDispatcher {
|
|
677
677
|
break;
|
678
678
|
case 2:
|
679
679
|
switch (scope.touches.TWO) {
|
680
|
-
case TOUCH.DOLLY_PAN:
|
680
|
+
case THREE.TOUCH.DOLLY_PAN:
|
681
681
|
if (scope.enableZoom === false && scope.enablePan === false)
|
682
682
|
return;
|
683
683
|
handleTouchStartDollyPan();
|
684
684
|
state = STATE.TOUCH_DOLLY_PAN;
|
685
685
|
break;
|
686
|
-
case TOUCH.DOLLY_ROTATE:
|
686
|
+
case THREE.TOUCH.DOLLY_ROTATE:
|
687
687
|
if (scope.enableZoom === false && scope.enableRotate === false)
|
688
688
|
return;
|
689
689
|
handleTouchStartDollyRotate();
|
@@ -751,7 +751,7 @@ class OrbitControls extends EventDispatcher {
|
|
751
751
|
function trackPointer(event) {
|
752
752
|
let position = pointerPositions[event.pointerId];
|
753
753
|
if (position === void 0) {
|
754
|
-
position = new Vector2();
|
754
|
+
position = new THREE.Vector2();
|
755
755
|
pointerPositions[event.pointerId] = position;
|
756
756
|
}
|
757
757
|
position.set(event.pageX, event.pageY);
|
@@ -769,13 +769,11 @@ class MapControls extends OrbitControls {
|
|
769
769
|
constructor(object, domElement) {
|
770
770
|
super(object, domElement);
|
771
771
|
this.screenSpacePanning = false;
|
772
|
-
this.mouseButtons.LEFT = MOUSE.PAN;
|
773
|
-
this.mouseButtons.RIGHT = MOUSE.ROTATE;
|
774
|
-
this.touches.ONE = TOUCH.PAN;
|
775
|
-
this.touches.TWO = TOUCH.DOLLY_ROTATE;
|
772
|
+
this.mouseButtons.LEFT = THREE.MOUSE.PAN;
|
773
|
+
this.mouseButtons.RIGHT = THREE.MOUSE.ROTATE;
|
774
|
+
this.touches.ONE = THREE.TOUCH.PAN;
|
775
|
+
this.touches.TWO = THREE.TOUCH.DOLLY_ROTATE;
|
776
776
|
}
|
777
777
|
}
|
778
|
-
|
779
|
-
|
780
|
-
OrbitControls
|
781
|
-
};
|
778
|
+
exports.MapControls = MapControls;
|
779
|
+
exports.OrbitControls = OrbitControls;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { EventDispatcher, MOUSE, OrthographicCamera, PerspectiveCamera, TOUCH, Vector3 } from 'three';
|
2
2
|
declare class OrbitControls extends EventDispatcher {
|
3
|
-
object:
|
3
|
+
object: PerspectiveCamera | OrthographicCamera;
|
4
4
|
domElement: HTMLElement | undefined;
|
5
5
|
enabled: boolean;
|
6
6
|
target: Vector3;
|
@@ -55,9 +55,9 @@ declare class OrbitControls extends EventDispatcher {
|
|
55
55
|
update: () => void;
|
56
56
|
connect: (domElement: HTMLElement) => void;
|
57
57
|
dispose: () => void;
|
58
|
-
constructor(object:
|
58
|
+
constructor(object: PerspectiveCamera | OrthographicCamera, domElement?: HTMLElement);
|
59
59
|
}
|
60
60
|
declare class MapControls extends OrbitControls {
|
61
|
-
constructor(object:
|
61
|
+
constructor(object: PerspectiveCamera | OrthographicCamera, domElement?: HTMLElement);
|
62
62
|
}
|
63
63
|
export { OrbitControls, MapControls };
|
@@ -1,14 +1,12 @@
|
|
1
|
-
"use strict";
|
2
1
|
var __defProp = Object.defineProperty;
|
3
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4
3
|
var __publicField = (obj, key, value) => {
|
5
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
6
5
|
return value;
|
7
6
|
};
|
8
|
-
|
9
|
-
const THREE = require("three");
|
7
|
+
import { EventDispatcher, Vector3, MOUSE, TOUCH, Quaternion, Spherical, Vector2, PerspectiveCamera, OrthographicCamera } from "three";
|
10
8
|
const moduloWrapAround = (offset, capacity) => (offset % capacity + capacity) % capacity;
|
11
|
-
class OrbitControls extends
|
9
|
+
class OrbitControls extends EventDispatcher {
|
12
10
|
constructor(object, domElement) {
|
13
11
|
super();
|
14
12
|
__publicField(this, "object");
|
@@ -16,7 +14,7 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
16
14
|
// Set to false to disable this control
|
17
15
|
__publicField(this, "enabled", true);
|
18
16
|
// "target" sets the location of focus, where the object orbits around
|
19
|
-
__publicField(this, "target", new
|
17
|
+
__publicField(this, "target", new Vector3());
|
20
18
|
// How far you can dolly in and out ( PerspectiveCamera only )
|
21
19
|
__publicField(this, "minDistance", 0);
|
22
20
|
__publicField(this, "maxDistance", Infinity);
|
@@ -64,12 +62,12 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
64
62
|
__publicField(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" });
|
65
63
|
// Mouse buttons
|
66
64
|
__publicField(this, "mouseButtons", {
|
67
|
-
LEFT:
|
68
|
-
MIDDLE:
|
69
|
-
RIGHT:
|
65
|
+
LEFT: MOUSE.ROTATE,
|
66
|
+
MIDDLE: MOUSE.DOLLY,
|
67
|
+
RIGHT: MOUSE.PAN
|
70
68
|
});
|
71
69
|
// Touch fingers
|
72
|
-
__publicField(this, "touches", { ONE:
|
70
|
+
__publicField(this, "touches", { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN });
|
73
71
|
__publicField(this, "target0");
|
74
72
|
__publicField(this, "position0");
|
75
73
|
__publicField(this, "zoom0");
|
@@ -90,7 +88,7 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
90
88
|
this.domElement = domElement;
|
91
89
|
this.target0 = this.target.clone();
|
92
90
|
this.position0 = this.object.position.clone();
|
93
|
-
this.zoom0 = this.object
|
91
|
+
this.zoom0 = this.object.zoom;
|
94
92
|
this.getPolarAngle = () => spherical.phi;
|
95
93
|
this.getAzimuthalAngle = () => spherical.theta;
|
96
94
|
this.setPolarAngle = (value) => {
|
@@ -137,25 +135,23 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
137
135
|
this.saveState = () => {
|
138
136
|
scope.target0.copy(scope.target);
|
139
137
|
scope.position0.copy(scope.object.position);
|
140
|
-
scope.zoom0 = scope.object
|
138
|
+
scope.zoom0 = scope.object.zoom;
|
141
139
|
};
|
142
140
|
this.reset = () => {
|
143
141
|
scope.target.copy(scope.target0);
|
144
142
|
scope.object.position.copy(scope.position0);
|
145
|
-
|
146
|
-
|
147
|
-
scope.object.updateProjectionMatrix();
|
148
|
-
}
|
143
|
+
scope.object.zoom = scope.zoom0;
|
144
|
+
scope.object.updateProjectionMatrix();
|
149
145
|
scope.dispatchEvent(changeEvent);
|
150
146
|
scope.update();
|
151
147
|
state = STATE.NONE;
|
152
148
|
};
|
153
149
|
this.update = (() => {
|
154
|
-
const offset = new
|
155
|
-
const quat = new
|
150
|
+
const offset = new Vector3();
|
151
|
+
const quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));
|
156
152
|
const quatInverse = quat.clone().invert();
|
157
|
-
const lastPosition = new
|
158
|
-
const lastQuaternion = new
|
153
|
+
const lastPosition = new Vector3();
|
154
|
+
const lastQuaternion = new Quaternion();
|
159
155
|
const twoPI = 2 * Math.PI;
|
160
156
|
return function update() {
|
161
157
|
const position = scope.object.position;
|
@@ -262,20 +258,20 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
262
258
|
};
|
263
259
|
let state = STATE.NONE;
|
264
260
|
const EPS = 1e-6;
|
265
|
-
const spherical = new
|
266
|
-
const sphericalDelta = new
|
261
|
+
const spherical = new Spherical();
|
262
|
+
const sphericalDelta = new Spherical();
|
267
263
|
let scale = 1;
|
268
|
-
const panOffset = new
|
264
|
+
const panOffset = new Vector3();
|
269
265
|
let zoomChanged = false;
|
270
|
-
const rotateStart = new
|
271
|
-
const rotateEnd = new
|
272
|
-
const rotateDelta = new
|
273
|
-
const panStart = new
|
274
|
-
const panEnd = new
|
275
|
-
const panDelta = new
|
276
|
-
const dollyStart = new
|
277
|
-
const dollyEnd = new
|
278
|
-
const dollyDelta = new
|
266
|
+
const rotateStart = new Vector2();
|
267
|
+
const rotateEnd = new Vector2();
|
268
|
+
const rotateDelta = new Vector2();
|
269
|
+
const panStart = new Vector2();
|
270
|
+
const panEnd = new Vector2();
|
271
|
+
const panDelta = new Vector2();
|
272
|
+
const dollyStart = new Vector2();
|
273
|
+
const dollyEnd = new Vector2();
|
274
|
+
const dollyDelta = new Vector2();
|
279
275
|
const pointers = [];
|
280
276
|
const pointerPositions = {};
|
281
277
|
function getAutoRotationAngle() {
|
@@ -299,7 +295,7 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
299
295
|
}
|
300
296
|
}
|
301
297
|
const panLeft = (() => {
|
302
|
-
const v = new
|
298
|
+
const v = new Vector3();
|
303
299
|
return function panLeft2(distance, objectMatrix) {
|
304
300
|
v.setFromMatrixColumn(objectMatrix, 0);
|
305
301
|
v.multiplyScalar(-distance);
|
@@ -307,7 +303,7 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
307
303
|
};
|
308
304
|
})();
|
309
305
|
const panUp = (() => {
|
310
|
-
const v = new
|
306
|
+
const v = new Vector3();
|
311
307
|
return function panUp2(distance, objectMatrix) {
|
312
308
|
if (scope.screenSpacePanning === true) {
|
313
309
|
v.setFromMatrixColumn(objectMatrix, 1);
|
@@ -320,17 +316,17 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
320
316
|
};
|
321
317
|
})();
|
322
318
|
const pan = (() => {
|
323
|
-
const offset = new
|
319
|
+
const offset = new Vector3();
|
324
320
|
return function pan2(deltaX, deltaY) {
|
325
321
|
const element = scope.domElement;
|
326
|
-
if (element && scope.object instanceof
|
322
|
+
if (element && scope.object instanceof PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
327
323
|
const position = scope.object.position;
|
328
324
|
offset.copy(position).sub(scope.target);
|
329
325
|
let targetDistance = offset.length();
|
330
326
|
targetDistance *= Math.tan(scope.object.fov / 2 * Math.PI / 180);
|
331
327
|
panLeft(2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix);
|
332
328
|
panUp(2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix);
|
333
|
-
} else if (element && scope.object instanceof
|
329
|
+
} else if (element && scope.object instanceof OrthographicCamera && scope.object.isOrthographicCamera) {
|
334
330
|
panLeft(
|
335
331
|
deltaX * (scope.object.right - scope.object.left) / scope.object.zoom / element.clientWidth,
|
336
332
|
scope.object.matrix
|
@@ -346,9 +342,9 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
346
342
|
};
|
347
343
|
})();
|
348
344
|
function dollyOut(dollyScale) {
|
349
|
-
if (scope.object instanceof
|
345
|
+
if (scope.object instanceof PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
350
346
|
scale /= dollyScale;
|
351
|
-
} else if (scope.object instanceof
|
347
|
+
} else if (scope.object instanceof OrthographicCamera && scope.object.isOrthographicCamera) {
|
352
348
|
scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom * dollyScale));
|
353
349
|
scope.object.updateProjectionMatrix();
|
354
350
|
zoomChanged = true;
|
@@ -358,9 +354,9 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
358
354
|
}
|
359
355
|
}
|
360
356
|
function dollyIn(dollyScale) {
|
361
|
-
if (scope.object instanceof
|
357
|
+
if (scope.object instanceof PerspectiveCamera && scope.object.isPerspectiveCamera) {
|
362
358
|
scale *= dollyScale;
|
363
|
-
} else if (scope.object instanceof
|
359
|
+
} else if (scope.object instanceof OrthographicCamera && scope.object.isOrthographicCamera) {
|
364
360
|
scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / dollyScale));
|
365
361
|
scope.object.updateProjectionMatrix();
|
366
362
|
zoomChanged = true;
|
@@ -582,13 +578,13 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
582
578
|
mouseAction = -1;
|
583
579
|
}
|
584
580
|
switch (mouseAction) {
|
585
|
-
case
|
581
|
+
case MOUSE.DOLLY:
|
586
582
|
if (scope.enableZoom === false)
|
587
583
|
return;
|
588
584
|
handleMouseDownDolly(event);
|
589
585
|
state = STATE.DOLLY;
|
590
586
|
break;
|
591
|
-
case
|
587
|
+
case MOUSE.ROTATE:
|
592
588
|
if (event.ctrlKey || event.metaKey || event.shiftKey) {
|
593
589
|
if (scope.enablePan === false)
|
594
590
|
return;
|
@@ -601,7 +597,7 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
601
597
|
state = STATE.ROTATE;
|
602
598
|
}
|
603
599
|
break;
|
604
|
-
case
|
600
|
+
case MOUSE.PAN:
|
605
601
|
if (event.ctrlKey || event.metaKey || event.shiftKey) {
|
606
602
|
if (scope.enableRotate === false)
|
607
603
|
return;
|
@@ -661,13 +657,13 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
661
657
|
switch (pointers.length) {
|
662
658
|
case 1:
|
663
659
|
switch (scope.touches.ONE) {
|
664
|
-
case
|
660
|
+
case TOUCH.ROTATE:
|
665
661
|
if (scope.enableRotate === false)
|
666
662
|
return;
|
667
663
|
handleTouchStartRotate();
|
668
664
|
state = STATE.TOUCH_ROTATE;
|
669
665
|
break;
|
670
|
-
case
|
666
|
+
case TOUCH.PAN:
|
671
667
|
if (scope.enablePan === false)
|
672
668
|
return;
|
673
669
|
handleTouchStartPan();
|
@@ -679,13 +675,13 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
679
675
|
break;
|
680
676
|
case 2:
|
681
677
|
switch (scope.touches.TWO) {
|
682
|
-
case
|
678
|
+
case TOUCH.DOLLY_PAN:
|
683
679
|
if (scope.enableZoom === false && scope.enablePan === false)
|
684
680
|
return;
|
685
681
|
handleTouchStartDollyPan();
|
686
682
|
state = STATE.TOUCH_DOLLY_PAN;
|
687
683
|
break;
|
688
|
-
case
|
684
|
+
case TOUCH.DOLLY_ROTATE:
|
689
685
|
if (scope.enableZoom === false && scope.enableRotate === false)
|
690
686
|
return;
|
691
687
|
handleTouchStartDollyRotate();
|
@@ -753,7 +749,7 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
753
749
|
function trackPointer(event) {
|
754
750
|
let position = pointerPositions[event.pointerId];
|
755
751
|
if (position === void 0) {
|
756
|
-
position = new
|
752
|
+
position = new Vector2();
|
757
753
|
pointerPositions[event.pointerId] = position;
|
758
754
|
}
|
759
755
|
position.set(event.pageX, event.pageY);
|
@@ -771,11 +767,13 @@ class MapControls extends OrbitControls {
|
|
771
767
|
constructor(object, domElement) {
|
772
768
|
super(object, domElement);
|
773
769
|
this.screenSpacePanning = false;
|
774
|
-
this.mouseButtons.LEFT =
|
775
|
-
this.mouseButtons.RIGHT =
|
776
|
-
this.touches.ONE =
|
777
|
-
this.touches.TWO =
|
770
|
+
this.mouseButtons.LEFT = MOUSE.PAN;
|
771
|
+
this.mouseButtons.RIGHT = MOUSE.ROTATE;
|
772
|
+
this.touches.ONE = TOUCH.PAN;
|
773
|
+
this.touches.TWO = TOUCH.DOLLY_ROTATE;
|
778
774
|
}
|
779
775
|
}
|
780
|
-
|
781
|
-
|
776
|
+
export {
|
777
|
+
MapControls,
|
778
|
+
OrbitControls
|
779
|
+
};
|
@@ -1,17 +1,19 @@
|
|
1
|
+
"use strict";
|
1
2
|
var __defProp = Object.defineProperty;
|
2
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3
4
|
var __publicField = (obj, key, value) => {
|
4
5
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
5
6
|
return value;
|
6
7
|
};
|
7
|
-
|
8
|
-
const
|
9
|
-
const
|
8
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
9
|
+
const THREE = require("three");
|
10
|
+
const _euler = /* @__PURE__ */ new THREE.Euler(0, 0, 0, "YXZ");
|
11
|
+
const _vector = /* @__PURE__ */ new THREE.Vector3();
|
10
12
|
const _changeEvent = { type: "change" };
|
11
13
|
const _lockEvent = { type: "lock" };
|
12
14
|
const _unlockEvent = { type: "unlock" };
|
13
15
|
const _PI_2 = Math.PI / 2;
|
14
|
-
class PointerLockControls extends EventDispatcher {
|
16
|
+
class PointerLockControls extends THREE.EventDispatcher {
|
15
17
|
constructor(camera, domElement) {
|
16
18
|
super();
|
17
19
|
__publicField(this, "camera");
|
@@ -67,7 +69,7 @@ class PointerLockControls extends EventDispatcher {
|
|
67
69
|
__publicField(this, "getObject", () => {
|
68
70
|
return this.camera;
|
69
71
|
});
|
70
|
-
__publicField(this, "direction", new Vector3(0, 0, -1));
|
72
|
+
__publicField(this, "direction", new THREE.Vector3(0, 0, -1));
|
71
73
|
__publicField(this, "getDirection", (v) => {
|
72
74
|
return v.copy(this.direction).applyQuaternion(this.camera.quaternion);
|
73
75
|
});
|
@@ -98,6 +100,4 @@ class PointerLockControls extends EventDispatcher {
|
|
98
100
|
this.connect(domElement);
|
99
101
|
}
|
100
102
|
}
|
101
|
-
|
102
|
-
PointerLockControls
|
103
|
-
};
|
103
|
+
exports.PointerLockControls = PointerLockControls;
|
@@ -1,19 +1,17 @@
|
|
1
|
-
"use strict";
|
2
1
|
var __defProp = Object.defineProperty;
|
3
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4
3
|
var __publicField = (obj, key, value) => {
|
5
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
6
5
|
return value;
|
7
6
|
};
|
8
|
-
|
9
|
-
const
|
10
|
-
const
|
11
|
-
const _vector = /* @__PURE__ */ new THREE.Vector3();
|
7
|
+
import { Euler, Vector3, EventDispatcher } from "three";
|
8
|
+
const _euler = /* @__PURE__ */ new Euler(0, 0, 0, "YXZ");
|
9
|
+
const _vector = /* @__PURE__ */ new Vector3();
|
12
10
|
const _changeEvent = { type: "change" };
|
13
11
|
const _lockEvent = { type: "lock" };
|
14
12
|
const _unlockEvent = { type: "unlock" };
|
15
13
|
const _PI_2 = Math.PI / 2;
|
16
|
-
class PointerLockControls extends
|
14
|
+
class PointerLockControls extends EventDispatcher {
|
17
15
|
constructor(camera, domElement) {
|
18
16
|
super();
|
19
17
|
__publicField(this, "camera");
|
@@ -69,7 +67,7 @@ class PointerLockControls extends THREE.EventDispatcher {
|
|
69
67
|
__publicField(this, "getObject", () => {
|
70
68
|
return this.camera;
|
71
69
|
});
|
72
|
-
__publicField(this, "direction", new
|
70
|
+
__publicField(this, "direction", new Vector3(0, 0, -1));
|
73
71
|
__publicField(this, "getDirection", (v) => {
|
74
72
|
return v.copy(this.direction).applyQuaternion(this.camera.quaternion);
|
75
73
|
});
|
@@ -100,4 +98,6 @@ class PointerLockControls extends THREE.EventDispatcher {
|
|
100
98
|
this.connect(domElement);
|
101
99
|
}
|
102
100
|
}
|
103
|
-
|
101
|
+
export {
|
102
|
+
PointerLockControls
|
103
|
+
};
|