three-stdlib 2.35.7 → 2.35.9
Sign up to get free protection for your applications and to get access to all the features.
- package/_polyfill/constants.d.cts +1 -0
- package/_polyfill/constants.d.ts +1 -1
- package/_polyfill/uv1.d.cts +5 -0
- package/_polyfill/uv1.d.ts +1 -1
- package/animation/AnimationClipCreator.d.cts +12 -0
- package/animation/AnimationClipCreator.d.ts +1 -1
- package/animation/CCDIKSolver.d.cts +30 -0
- package/animation/CCDIKSolver.d.ts +1 -1
- package/animation/MMDAnimationHelper.d.cts +93 -0
- package/animation/MMDAnimationHelper.d.ts +3 -3
- package/animation/MMDPhysics.d.cts +119 -0
- package/animation/MMDPhysics.d.ts +1 -1
- package/cameras/CinematicCamera.d.cts +34 -0
- package/cameras/CinematicCamera.d.ts +2 -2
- package/controls/ArcballControls.d.cts +376 -0
- package/controls/ArcballControls.d.ts +4 -4
- package/controls/DeviceOrientationControls.d.cts +29 -0
- package/controls/DeviceOrientationControls.d.ts +4 -4
- package/controls/DragControls.d.cts +67 -0
- package/controls/DragControls.d.ts +3 -3
- package/controls/EventDispatcher.d.cts +41 -0
- package/controls/EventDispatcher.d.ts +1 -1
- package/controls/FirstPersonControls.d.cts +49 -0
- package/controls/FirstPersonControls.d.ts +3 -3
- package/controls/FlyControls.d.cts +39 -0
- package/controls/FlyControls.d.ts +3 -3
- package/controls/OrbitControls.d.cts +74 -0
- package/controls/OrbitControls.d.ts +4 -4
- package/controls/PointerLockControls.d.cts +39 -0
- package/controls/PointerLockControls.d.ts +3 -3
- package/controls/StandardControlsEventMap.d.cts +14 -0
- package/controls/TrackballControls.d.cts +97 -0
- package/controls/TrackballControls.d.ts +4 -4
- package/controls/TransformControls.d.cts +151 -0
- package/controls/TransformControls.d.ts +2 -2
- package/controls/experimental/CameraControls.d.cts +213 -0
- package/controls/experimental/CameraControls.d.ts +4 -4
- package/csm/CSM.d.cts +61 -0
- package/csm/CSM.d.ts +2 -2
- package/csm/CSMFrustum.d.cts +19 -0
- package/csm/CSMFrustum.d.ts +2 -2
- package/csm/CSMHelper.d.cts +26 -0
- package/csm/CSMHelper.d.ts +2 -2
- package/csm/CSMShader.d.cts +4 -0
- package/curves/CurveExtras.d.cts +68 -0
- package/curves/CurveExtras.d.ts +1 -1
- package/curves/NURBSCurve.d.cts +11 -0
- package/curves/NURBSCurve.d.ts +1 -1
- package/curves/NURBSSurface.d.cts +13 -0
- package/curves/NURBSSurface.d.ts +1 -1
- package/curves/NURBSUtils.d.cts +20 -0
- package/curves/NURBSUtils.d.ts +1 -1
- package/deprecated/Geometry.d.cts +341 -0
- package/deprecated/Geometry.d.ts +1 -1
- package/effects/AnaglyphEffect.d.cts +11 -0
- package/effects/AnaglyphEffect.d.ts +1 -1
- package/effects/AsciiEffect.d.cts +18 -0
- package/effects/AsciiEffect.d.ts +1 -1
- package/effects/OutlineEffect.d.cts +28 -0
- package/effects/OutlineEffect.d.ts +1 -1
- package/effects/ParallaxBarrierEffect.d.cts +8 -0
- package/effects/ParallaxBarrierEffect.d.ts +1 -1
- package/effects/PeppersGhostEffect.d.cts +10 -0
- package/effects/PeppersGhostEffect.d.ts +1 -1
- package/effects/StereoEffect.d.cts +9 -0
- package/effects/StereoEffect.d.ts +1 -1
- package/environments/RoomEnvironment.d.cts +6 -0
- package/environments/RoomEnvironment.d.ts +2 -2
- package/exporters/ColladaExporter.d.cts +50 -0
- package/exporters/ColladaExporter.d.ts +2 -2
- package/exporters/DRACOExporter.d.cts +36 -0
- package/exporters/DRACOExporter.d.ts +2 -2
- package/exporters/GLTFExporter.d.cts +114 -0
- package/exporters/GLTFExporter.d.ts +4 -4
- package/exporters/MMDExporter.d.cts +12 -0
- package/exporters/MMDExporter.d.ts +2 -2
- package/exporters/OBJExporter.d.cts +18 -0
- package/exporters/OBJExporter.d.ts +2 -2
- package/exporters/PLYExporter.d.cts +23 -0
- package/exporters/PLYExporter.d.ts +2 -2
- package/exporters/STLExporter.d.cts +28 -0
- package/exporters/STLExporter.d.ts +2 -2
- package/exporters/USDZExporter.d.cts +27 -0
- package/exporters/USDZExporter.d.ts +2 -2
- package/geometries/BoxLineGeometry.d.cts +12 -0
- package/geometries/BoxLineGeometry.d.ts +1 -1
- package/geometries/ConvexGeometry.d.cts +5 -0
- package/geometries/ConvexGeometry.d.ts +1 -1
- package/geometries/DecalGeometry.d.cts +10 -0
- package/geometries/DecalGeometry.d.ts +1 -1
- package/geometries/LightningStrike.d.cts +108 -0
- package/geometries/LightningStrike.d.ts +1 -1
- package/geometries/ParametricGeometries.d.cts +26 -0
- package/geometries/ParametricGeometries.d.ts +3 -3
- package/geometries/ParametricGeometry.d.cts +18 -0
- package/geometries/ParametricGeometry.d.ts +2 -2
- package/geometries/RoundedBoxGeometry.d.cts +5 -0
- package/geometries/RoundedBoxGeometry.d.ts +1 -1
- package/geometries/TeapotGeometry.d.cts +13 -0
- package/geometries/TeapotGeometry.d.ts +1 -1
- package/geometries/TextGeometry.d.cts +18 -0
- package/geometries/TextGeometry.d.ts +4 -4
- package/helpers/LightProbeHelper.d.cts +10 -0
- package/helpers/LightProbeHelper.d.ts +1 -1
- package/helpers/PositionalAudioHelper.d.cts +13 -0
- package/helpers/PositionalAudioHelper.d.ts +1 -1
- package/helpers/RaycasterHelper.d.cts +33 -0
- package/helpers/RaycasterHelper.d.ts +2 -2
- package/helpers/RectAreaLightHelper.d.cts +11 -0
- package/helpers/RectAreaLightHelper.d.ts +1 -1
- package/helpers/VertexNormalsHelper.d.cts +13 -0
- package/helpers/VertexNormalsHelper.d.ts +1 -1
- package/helpers/VertexTangentsHelper.d.cts +13 -0
- package/helpers/VertexTangentsHelper.d.ts +1 -1
- package/index.d.cts +262 -0
- package/index.d.ts +262 -262
- package/interactive/HTMLMesh.d.cts +6 -0
- package/interactive/HTMLMesh.d.ts +1 -1
- package/interactive/InteractiveGroup.d.cts +5 -0
- package/interactive/InteractiveGroup.d.ts +1 -1
- package/interactive/SelectionBox.d.cts +15 -0
- package/interactive/SelectionBox.d.ts +1 -1
- package/interactive/SelectionHelper.d.cts +17 -0
- package/interactive/SelectionHelper.d.ts +2 -2
- package/libs/MeshoptDecoder.d.cts +12 -0
- package/libs/MeshoptDecoder.d.ts +1 -1
- package/libs/MotionControllers.d.cts +176 -0
- package/libs/MotionControllers.d.ts +1 -1
- package/libs/zstddec.d.cts +8 -0
- package/libs/zstddec.d.ts +1 -1
- package/lights/LightProbeGenerator.d.cts +6 -0
- package/lights/LightProbeGenerator.d.ts +2 -2
- package/lights/RectAreaLightUniformsLib.d.cts +3 -0
- package/lights/RectAreaLightUniformsLib.d.ts +1 -1
- package/lines/Line2.d.cts +11 -0
- package/lines/Line2.d.ts +3 -3
- package/lines/LineGeometry.d.cts +10 -0
- package/lines/LineGeometry.d.ts +2 -2
- package/lines/LineMaterial.d.cts +31 -0
- package/lines/LineMaterial.d.ts +1 -1
- package/lines/LineSegments2.d.cts +14 -0
- package/lines/LineSegments2.d.ts +3 -3
- package/lines/LineSegmentsGeometry.d.cts +16 -0
- package/lines/LineSegmentsGeometry.d.ts +1 -1
- package/lines/Wireframe.d.cts +11 -0
- package/lines/Wireframe.d.ts +3 -3
- package/lines/WireframeGeometry2.d.cts +8 -0
- package/lines/WireframeGeometry2.d.ts +2 -2
- package/loaders/3DMLoader.d.cts +17 -0
- package/loaders/3DMLoader.d.ts +1 -1
- package/loaders/3MFLoader.d.cts +16 -0
- package/loaders/3MFLoader.d.ts +1 -1
- package/loaders/AMFLoader.d.cts +14 -0
- package/loaders/AMFLoader.d.ts +1 -1
- package/loaders/AssimpLoader.d.cts +19 -0
- package/loaders/AssimpLoader.d.ts +1 -1
- package/loaders/BVHLoader.d.cts +21 -0
- package/loaders/BVHLoader.d.ts +1 -1
- package/loaders/BasisTextureLoader.d.cts +32 -0
- package/loaders/BasisTextureLoader.d.ts +1 -1
- package/loaders/ColladaLoader.d.cts +20 -0
- package/loaders/ColladaLoader.d.ts +1 -1
- package/loaders/DDSLoader.d.cts +16 -0
- package/loaders/DDSLoader.d.ts +1 -1
- package/loaders/DRACOLoader.d.cts +18 -0
- package/loaders/DRACOLoader.d.ts +1 -1
- package/loaders/EXRLoader.d.cts +18 -0
- package/loaders/EXRLoader.d.ts +1 -1
- package/loaders/FBXLoader.d.cts +14 -0
- package/loaders/FBXLoader.d.ts +1 -1
- package/loaders/FontLoader.d.cts +37 -0
- package/loaders/FontLoader.d.ts +4 -4
- package/loaders/GCodeLoader.d.cts +15 -0
- package/loaders/GCodeLoader.d.ts +1 -1
- package/loaders/GLTFLoader.d.cts +155 -0
- package/loaders/GLTFLoader.d.ts +3 -3
- package/loaders/HDRCubeTextureLoader.d.cts +18 -0
- package/loaders/HDRCubeTextureLoader.d.ts +2 -2
- package/loaders/KMZLoader.d.cts +16 -0
- package/loaders/KMZLoader.d.ts +2 -2
- package/loaders/KTX2Loader.d.cts +10 -0
- package/loaders/KTX2Loader.d.ts +1 -1
- package/loaders/KTXLoader.d.cts +16 -0
- package/loaders/KTXLoader.d.ts +1 -1
- package/loaders/LDrawLoader.d.cts +26 -0
- package/loaders/LDrawLoader.d.ts +1 -1
- package/loaders/LUT3dlLoader.d.cts +20 -0
- package/loaders/LUT3dlLoader.d.ts +1 -1
- package/loaders/LUTCubeLoader.d.cts +23 -0
- package/loaders/LUTCubeLoader.d.ts +1 -1
- package/loaders/LWOLoader.d.cts +26 -0
- package/loaders/LWOLoader.d.ts +1 -1
- package/loaders/LottieLoader.d.cts +15 -0
- package/loaders/LottieLoader.d.ts +1 -1
- package/loaders/MD2Loader.d.cts +14 -0
- package/loaders/MD2Loader.d.ts +1 -1
- package/loaders/MDDLoader.d.cts +19 -0
- package/loaders/MDDLoader.d.ts +1 -1
- package/loaders/MMDLoader.d.cts +63 -0
- package/loaders/MMDLoader.d.ts +1 -1
- package/loaders/MTLLoader.d.cts +100 -0
- package/loaders/MTLLoader.d.ts +1 -1
- package/loaders/NRRDLoader.d.cts +22 -0
- package/loaders/NRRDLoader.d.ts +2 -2
- package/loaders/OBJLoader.d.cts +17 -0
- package/loaders/OBJLoader.d.ts +2 -2
- package/loaders/PCDLoader.d.cts +15 -0
- package/loaders/PCDLoader.d.ts +1 -1
- package/loaders/PDBLoader.d.cts +22 -0
- package/loaders/PDBLoader.d.ts +1 -1
- package/loaders/PLYLoader.d.cts +16 -0
- package/loaders/PLYLoader.d.ts +1 -1
- package/loaders/PRWMLoader.d.cts +16 -0
- package/loaders/PRWMLoader.d.ts +1 -1
- package/loaders/PVRLoader.d.cts +16 -0
- package/loaders/PVRLoader.d.ts +1 -1
- package/loaders/RGBELoader.d.cts +20 -0
- package/loaders/RGBELoader.d.ts +1 -1
- package/loaders/RGBMLoader.d.cts +32 -0
- package/loaders/RGBMLoader.d.ts +1 -1
- package/loaders/STLLoader.d.cts +14 -0
- package/loaders/STLLoader.d.ts +1 -1
- package/loaders/SVGLoader.d.cts +63 -0
- package/loaders/SVGLoader.d.ts +1 -1
- package/loaders/TDSLoader.d.cts +42 -0
- package/loaders/TDSLoader.d.ts +1 -1
- package/loaders/TGALoader.d.cts +14 -0
- package/loaders/TGALoader.d.ts +1 -1
- package/loaders/TTFLoader.d.cts +15 -0
- package/loaders/TTFLoader.d.ts +1 -1
- package/loaders/TiltLoader.d.cts +14 -0
- package/loaders/TiltLoader.d.ts +1 -1
- package/loaders/VOXLoader.d.cts +29 -0
- package/loaders/VOXLoader.d.ts +1 -1
- package/loaders/VRMLLoader.d.cts +14 -0
- package/loaders/VRMLLoader.d.ts +1 -1
- package/loaders/VRMLoader.d.cts +19 -0
- package/loaders/VRMLoader.d.ts +3 -3
- package/loaders/VTKLoader.d.cts +14 -0
- package/loaders/VTKLoader.d.ts +1 -1
- package/loaders/XLoader.d.cts +19 -0
- package/loaders/XLoader.d.ts +1 -1
- package/loaders/XYZLoader.d.cts +14 -0
- package/loaders/XYZLoader.d.ts +1 -1
- package/math/Capsule.d.cts +27 -0
- package/math/Capsule.d.ts +1 -1
- package/math/ColorConverter.d.cts +21 -0
- package/math/ColorConverter.d.ts +2 -2
- package/math/ConvexHull.d.cts +89 -0
- package/math/ConvexHull.d.ts +1 -1
- package/math/ImprovedNoise.d.cts +4 -0
- package/math/Lut.d.cts +27 -0
- package/math/Lut.d.ts +1 -1
- package/math/MeshSurfaceSampler.d.cts +18 -0
- package/math/MeshSurfaceSampler.d.ts +1 -1
- package/math/OBB.d.cts +24 -0
- package/math/OBB.d.ts +1 -1
- package/math/Octree.d.cts +24 -0
- package/math/Octree.d.ts +2 -2
- package/math/SimplexNoise.d.cts +21 -0
- package/math/SimplexNoise.d.ts +1 -1
- package/misc/ConvexObjectBreaker.d.cts +25 -0
- package/misc/ConvexObjectBreaker.d.ts +1 -1
- package/misc/GPUComputationRenderer.d.cts +53 -0
- package/misc/GPUComputationRenderer.d.ts +1 -1
- package/misc/Gyroscope.d.cts +5 -0
- package/misc/Gyroscope.d.ts +1 -1
- package/misc/MD2Character.d.cts +33 -0
- package/misc/MD2Character.d.ts +1 -1
- package/misc/MD2CharacterComplex.d.cts +47 -0
- package/misc/MD2CharacterComplex.d.ts +1 -1
- package/misc/MorphAnimMesh.d.cts +13 -0
- package/misc/MorphAnimMesh.d.ts +1 -1
- package/misc/MorphBlendMesh.d.cts +21 -0
- package/misc/MorphBlendMesh.d.ts +1 -1
- package/misc/ProgressiveLightmap.d.cts +60 -0
- package/misc/ProgressiveLightmap.d.ts +1 -1
- package/misc/RollerCoaster.d.cts +21 -0
- package/misc/RollerCoaster.d.ts +1 -1
- package/misc/Timer.d.cts +27 -0
- package/misc/Timer.d.ts +1 -1
- package/misc/TubePainter.d.cts +10 -0
- package/misc/TubePainter.d.ts +1 -1
- package/misc/Volume.d.cts +37 -0
- package/misc/Volume.d.ts +2 -2
- package/misc/VolumeSlice.d.cts +28 -0
- package/misc/VolumeSlice.d.ts +2 -2
- package/misc/WebGL.d.cts +5 -0
- package/misc/WebGL.d.ts +5 -5
- package/modifiers/CurveModifier.d.cts +91 -0
- package/modifiers/CurveModifier.d.ts +7 -7
- package/modifiers/EdgeSplitModifier.d.cts +19 -0
- package/modifiers/EdgeSplitModifier.d.ts +2 -2
- package/modifiers/SimplifyModifier.d.cts +19 -0
- package/modifiers/SimplifyModifier.d.ts +2 -2
- package/modifiers/TessellateModifier.d.cts +11 -0
- package/modifiers/TessellateModifier.d.ts +2 -2
- package/objects/BatchedMesh.d.cts +48 -0
- package/objects/BatchedMesh.d.ts +2 -2
- package/objects/GroundProjectedEnv.d.cts +12 -0
- package/objects/GroundProjectedEnv.d.ts +2 -2
- package/objects/Lensflare.d.cts +17 -0
- package/objects/Lensflare.d.ts +1 -1
- package/objects/LightningStorm.d.cts +32 -0
- package/objects/LightningStorm.d.ts +2 -2
- package/objects/MarchingCubes.d.cts +76 -0
- package/objects/MarchingCubes.d.ts +1 -1
- package/objects/Reflector.d.cts +23 -0
- package/objects/Reflector.d.ts +2 -2
- package/objects/ReflectorForSSRPass.d.cts +48 -0
- package/objects/ReflectorForSSRPass.d.ts +1 -1
- package/objects/ReflectorRTT.d.cts +6 -0
- package/objects/ReflectorRTT.d.ts +3 -3
- package/objects/Refractor.d.cts +23 -0
- package/objects/Refractor.d.ts +2 -2
- package/objects/ShadowMesh.d.cts +10 -0
- package/objects/ShadowMesh.d.ts +1 -1
- package/objects/Sky.d.cts +18 -0
- package/objects/Sky.d.ts +2 -2
- package/objects/Water.d.cts +22 -0
- package/objects/Water.d.ts +1 -1
- package/objects/Water2.d.cts +23 -0
- package/objects/Water2.d.ts +2 -2
- package/package.json +11 -5
- package/physics/AmmoPhysics.d.cts +7 -0
- package/physics/AmmoPhysics.d.ts +1 -1
- package/postprocessing/AdaptiveToneMappingPass.d.cts +29 -0
- package/postprocessing/AdaptiveToneMappingPass.d.ts +2 -2
- package/postprocessing/AfterimagePass.d.cts +15 -0
- package/postprocessing/AfterimagePass.d.ts +3 -3
- package/postprocessing/BloomPass.d.cts +29 -0
- package/postprocessing/BloomPass.d.ts +4 -4
- package/postprocessing/BokehPass.d.cts +26 -0
- package/postprocessing/BokehPass.d.ts +3 -3
- package/postprocessing/ClearPass.d.cts +10 -0
- package/postprocessing/ClearPass.d.ts +3 -3
- package/postprocessing/CubeTexturePass.d.cts +14 -0
- package/postprocessing/CubeTexturePass.d.ts +2 -2
- package/postprocessing/DotScreenPass.d.cts +11 -0
- package/postprocessing/DotScreenPass.d.ts +4 -4
- package/postprocessing/EffectComposer.d.cts +28 -0
- package/postprocessing/EffectComposer.d.ts +3 -3
- package/postprocessing/FilmPass.d.cts +11 -0
- package/postprocessing/FilmPass.d.ts +4 -4
- package/postprocessing/GlitchPass.d.cts +16 -0
- package/postprocessing/GlitchPass.d.ts +4 -4
- package/postprocessing/HalftonePass.d.cts +26 -0
- package/postprocessing/HalftonePass.d.ts +3 -3
- package/postprocessing/LUTPass.d.cts +13 -0
- package/postprocessing/LUTPass.d.ts +2 -2
- package/postprocessing/MaskPass.d.cts +14 -0
- package/postprocessing/MaskPass.d.ts +3 -3
- package/postprocessing/OutlinePass.d.cts +53 -0
- package/postprocessing/OutlinePass.d.ts +3 -3
- package/postprocessing/Pass.d.cts +21 -0
- package/postprocessing/Pass.d.ts +2 -2
- package/postprocessing/RenderPass.d.cts +14 -0
- package/postprocessing/RenderPass.d.ts +3 -3
- package/postprocessing/RenderPixelatedPass.d.cts +34 -0
- package/postprocessing/RenderPixelatedPass.d.ts +2 -2
- package/postprocessing/SAOPass.d.cts +78 -0
- package/postprocessing/SAOPass.d.ts +2 -2
- package/postprocessing/SMAAPass.d.cts +21 -0
- package/postprocessing/SMAAPass.d.ts +2 -2
- package/postprocessing/SSAARenderPass.d.cts +17 -0
- package/postprocessing/SSAARenderPass.d.ts +2 -2
- package/postprocessing/SSAOPass.d.cts +70 -0
- package/postprocessing/SSAOPass.d.ts +2 -2
- package/postprocessing/SSRPass.d.cts +123 -0
- package/postprocessing/SSRPass.d.ts +3 -3
- package/postprocessing/SavePass.d.cts +12 -0
- package/postprocessing/SavePass.d.ts +2 -2
- package/postprocessing/ShaderPass.d.cts +13 -0
- package/postprocessing/ShaderPass.d.ts +4 -4
- package/postprocessing/TAARenderPass.d.cts +8 -0
- package/postprocessing/TAARenderPass.d.ts +2 -2
- package/postprocessing/TexturePass.d.cts +12 -0
- package/postprocessing/TexturePass.d.ts +2 -2
- package/postprocessing/UnrealBloomPass.d.cts +31 -0
- package/postprocessing/UnrealBloomPass.d.ts +2 -2
- package/postprocessing/WaterPass.d.cts +35 -0
- package/postprocessing/WaterPass.d.ts +3 -3
- package/renderers/CSS2DRenderer.d.cts +23 -0
- package/renderers/CSS2DRenderer.d.ts +1 -1
- package/renderers/CSS3DRenderer.d.cts +26 -0
- package/renderers/CSS3DRenderer.d.ts +1 -1
- package/renderers/Projector.d.cts +60 -0
- package/renderers/Projector.d.ts +1 -1
- package/renderers/SVGRenderer.d.cts +25 -0
- package/renderers/SVGRenderer.d.ts +1 -1
- package/shaders/ACESFilmicToneMappingShader.d.cts +16 -0
- package/shaders/ACESFilmicToneMappingShader.d.ts +2 -2
- package/shaders/AfterimageShader.d.cts +15 -0
- package/shaders/AfterimageShader.d.ts +2 -2
- package/shaders/BasicShader.d.cts +8 -0
- package/shaders/BasicShader.d.ts +2 -2
- package/shaders/BleachBypassShader.d.cts +14 -0
- package/shaders/BleachBypassShader.d.ts +2 -2
- package/shaders/BlendShader.d.cts +21 -0
- package/shaders/BlendShader.d.ts +1 -1
- package/shaders/BokehShader.d.cts +24 -0
- package/shaders/BokehShader.d.ts +2 -2
- package/shaders/BokehShader2.d.cts +50 -0
- package/shaders/BokehShader2.d.ts +3 -3
- package/shaders/BrightnessContrastShader.d.cts +21 -0
- package/shaders/BrightnessContrastShader.d.ts +1 -1
- package/shaders/ColorCorrectionShader.d.cts +22 -0
- package/shaders/ColorCorrectionShader.d.ts +2 -2
- package/shaders/ColorifyShader.d.cts +16 -0
- package/shaders/ColorifyShader.d.ts +2 -2
- package/shaders/ConvolutionShader.d.cts +21 -0
- package/shaders/ConvolutionShader.d.ts +3 -3
- package/shaders/CopyShader.d.cts +12 -0
- package/shaders/CopyShader.d.ts +2 -2
- package/shaders/DOFMipMapShader.d.cts +23 -0
- package/shaders/DOFMipMapShader.d.ts +1 -1
- package/shaders/DepthLimitedBlurShader.d.cts +28 -0
- package/shaders/DepthLimitedBlurShader.d.ts +4 -4
- package/shaders/DigitalGlitch.d.cts +39 -0
- package/shaders/DigitalGlitch.d.ts +1 -1
- package/shaders/DotScreenShader.d.cts +27 -0
- package/shaders/DotScreenShader.d.ts +2 -2
- package/shaders/FXAAShader.d.cts +19 -0
- package/shaders/FXAAShader.d.ts +2 -2
- package/shaders/FilmShader.d.cts +43 -0
- package/shaders/FilmShader.d.ts +1 -1
- package/shaders/FocusShader.d.cts +26 -0
- package/shaders/FocusShader.d.ts +1 -1
- package/shaders/FreiChenShader.d.cts +19 -0
- package/shaders/FreiChenShader.d.ts +2 -2
- package/shaders/FresnelShader.d.cts +24 -0
- package/shaders/FresnelShader.d.ts +1 -1
- package/shaders/GammaCorrectionShader.d.cts +12 -0
- package/shaders/GammaCorrectionShader.d.ts +2 -2
- package/shaders/GodRaysShader.d.cts +97 -0
- package/shaders/GodRaysShader.d.ts +5 -5
- package/shaders/HalftoneShader.d.cts +51 -0
- package/shaders/HalftoneShader.d.ts +1 -1
- package/shaders/HorizontalBlurShader.d.cts +18 -0
- package/shaders/HorizontalBlurShader.d.ts +2 -2
- package/shaders/HorizontalTiltShiftShader.d.cts +23 -0
- package/shaders/HorizontalTiltShiftShader.d.ts +1 -1
- package/shaders/HueSaturationShader.d.cts +21 -0
- package/shaders/HueSaturationShader.d.ts +1 -1
- package/shaders/KaleidoShader.d.cts +24 -0
- package/shaders/KaleidoShader.d.ts +1 -1
- package/shaders/LuminosityHighPassShader.d.cts +27 -0
- package/shaders/LuminosityHighPassShader.d.ts +2 -2
- package/shaders/LuminosityShader.d.cts +13 -0
- package/shaders/LuminosityShader.d.ts +1 -1
- package/shaders/MirrorShader.d.cts +18 -0
- package/shaders/MirrorShader.d.ts +1 -1
- package/shaders/NormalMapShader.d.cts +23 -0
- package/shaders/NormalMapShader.d.ts +2 -2
- package/shaders/ParallaxShader.d.cts +28 -0
- package/shaders/ParallaxShader.d.ts +1 -1
- package/shaders/PixelShader.d.cts +18 -0
- package/shaders/PixelShader.d.ts +1 -1
- package/shaders/RGBShiftShader.d.cts +24 -0
- package/shaders/RGBShiftShader.d.ts +1 -1
- package/shaders/SAOShader.d.cts +25 -0
- package/shaders/SAOShader.d.ts +3 -3
- package/shaders/SMAAShader.d.cts +60 -0
- package/shaders/SMAAShader.d.ts +4 -4
- package/shaders/SSAOShader.d.cts +86 -0
- package/shaders/SSAOShader.d.ts +4 -4
- package/shaders/SSRShader.d.cts +94 -0
- package/shaders/SSRShader.d.ts +4 -4
- package/shaders/SepiaShader.d.cts +17 -0
- package/shaders/SepiaShader.d.ts +1 -1
- package/shaders/SobelOperatorShader.d.cts +19 -0
- package/shaders/SobelOperatorShader.d.ts +2 -2
- package/shaders/SubsurfaceScatteringShader.d.cts +5 -0
- package/shaders/SubsurfaceScatteringShader.d.ts +1 -1
- package/shaders/TechnicolorShader.d.cts +15 -0
- package/shaders/TechnicolorShader.d.ts +1 -1
- package/shaders/ToneMapShader.d.cts +27 -0
- package/shaders/ToneMapShader.d.ts +1 -1
- package/shaders/ToonShader.d.cts +108 -0
- package/shaders/ToonShader.d.ts +5 -5
- package/shaders/TriangleBlurShader.d.cts +22 -0
- package/shaders/TriangleBlurShader.d.ts +2 -2
- package/shaders/UnpackDepthRGBAShader.d.cts +16 -0
- package/shaders/UnpackDepthRGBAShader.d.ts +1 -1
- package/shaders/VerticalBlurShader.d.cts +18 -0
- package/shaders/VerticalBlurShader.d.ts +2 -2
- package/shaders/VerticalTiltShiftShader.d.cts +23 -0
- package/shaders/VerticalTiltShiftShader.d.ts +1 -1
- package/shaders/VignetteShader.d.cts +20 -0
- package/shaders/VignetteShader.d.ts +1 -1
- package/shaders/VolumeShader.d.cts +30 -0
- package/shaders/VolumeShader.d.ts +2 -2
- package/shaders/WaterRefractionShader.d.cts +21 -0
- package/shaders/WaterRefractionShader.d.ts +1 -1
- package/shaders/types.d.cts +13 -0
- package/textures/FlakesTexture.d.cts +4 -0
- package/textures/FlakesTexture.d.ts +1 -1
- package/types/helpers.d.cts +1 -0
- package/types/helpers.d.ts +1 -1
- package/types/shared.d.cts +9 -0
- package/types/shared.d.ts +1 -1
- package/types/utils.d.cts +3 -0
- package/utils/BufferGeometryUtils.d.cts +63 -0
- package/utils/BufferGeometryUtils.d.ts +9 -9
- package/utils/GeometryCompressionUtils.d.cts +7 -0
- package/utils/GeometryCompressionUtils.d.ts +2 -2
- package/utils/GeometryUtils.d.cts +6 -0
- package/utils/GeometryUtils.d.ts +2 -2
- package/utils/LDrawUtils.d.cts +5 -0
- package/utils/LDrawUtils.d.ts +2 -2
- package/utils/RoughnessMipmapper.d.cts +8 -0
- package/utils/RoughnessMipmapper.d.ts +1 -1
- package/utils/SceneUtils.d.cts +9 -0
- package/utils/SceneUtils.d.ts +2 -2
- package/utils/ShadowMapViewer.d.cts +24 -0
- package/utils/ShadowMapViewer.d.ts +1 -1
- package/utils/SkeletonUtils.d.cts +14 -0
- package/utils/SkeletonUtils.d.ts +2 -2
- package/utils/UVsDebug.d.cts +3 -0
- package/utils/UVsDebug.d.ts +1 -1
- package/webxr/ARButton.d.cts +6 -0
- package/webxr/ARButton.d.ts +2 -2
- package/webxr/OculusHandModel.d.cts +23 -0
- package/webxr/OculusHandModel.d.ts +3 -3
- package/webxr/OculusHandPointerModel.d.cts +65 -0
- package/webxr/OculusHandPointerModel.d.ts +1 -1
- package/webxr/Text2D.d.cts +3 -0
- package/webxr/Text2D.d.ts +1 -1
- package/webxr/VRButton.d.cts +11 -0
- package/webxr/VRButton.d.ts +2 -2
- package/webxr/XRControllerModelFactory.d.cts +23 -0
- package/webxr/XRControllerModelFactory.d.ts +4 -4
- package/webxr/XREstimatedLight.d.cts +33 -0
- package/webxr/XREstimatedLight.d.ts +1 -1
- package/webxr/XRHandMeshModel.d.cts +9 -0
- package/webxr/XRHandMeshModel.d.ts +2 -2
- package/webxr/XRHandModelFactory.d.cts +25 -0
- package/webxr/XRHandModelFactory.d.ts +3 -3
- package/webxr/XRHandPrimitiveModel.d.cts +24 -0
- package/webxr/XRHandPrimitiveModel.d.ts +2 -2
@@ -0,0 +1,376 @@
|
|
1
|
+
import type { Vector3, Scene, PerspectiveCamera, OrthographicCamera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.cts';
|
3
|
+
import type { StandardControlsEventMap } from './StandardControlsEventMap.d.cts';
|
4
|
+
type Camera = OrthographicCamera | PerspectiveCamera;
|
5
|
+
/**
|
6
|
+
*
|
7
|
+
* @param {CamOrthographicCamera | PerspectiveCameraera} camera Virtual camera used in the scene
|
8
|
+
* @param {HTMLElement=null} domElement Renderer's dom element
|
9
|
+
* @param {Scene=null} scene The scene to be rendered
|
10
|
+
*/
|
11
|
+
declare class ArcballControls extends EventDispatcher<StandardControlsEventMap> {
|
12
|
+
private camera;
|
13
|
+
private domElement;
|
14
|
+
private scene;
|
15
|
+
private mouseActions;
|
16
|
+
private _mouseOp;
|
17
|
+
private _v2_1;
|
18
|
+
private _v3_1;
|
19
|
+
private _v3_2;
|
20
|
+
private _m4_1;
|
21
|
+
private _m4_2;
|
22
|
+
private _quat;
|
23
|
+
private _translationMatrix;
|
24
|
+
private _rotationMatrix;
|
25
|
+
private _scaleMatrix;
|
26
|
+
private _rotationAxis;
|
27
|
+
private _cameraMatrixState;
|
28
|
+
private _cameraProjectionState;
|
29
|
+
private _fovState;
|
30
|
+
private _upState;
|
31
|
+
private _zoomState;
|
32
|
+
private _nearPos;
|
33
|
+
private _farPos;
|
34
|
+
private _gizmoMatrixState;
|
35
|
+
private _up0;
|
36
|
+
private _zoom0;
|
37
|
+
private _fov0;
|
38
|
+
private _initialNear;
|
39
|
+
private _nearPos0;
|
40
|
+
private _initialFar;
|
41
|
+
private _farPos0;
|
42
|
+
private _cameraMatrixState0;
|
43
|
+
private _gizmoMatrixState0;
|
44
|
+
private _button;
|
45
|
+
private _touchStart;
|
46
|
+
private _touchCurrent;
|
47
|
+
private _input;
|
48
|
+
private _switchSensibility;
|
49
|
+
private _startFingerDistance;
|
50
|
+
private _currentFingerDistance;
|
51
|
+
private _startFingerRotation;
|
52
|
+
private _currentFingerRotation;
|
53
|
+
private _devPxRatio;
|
54
|
+
private _downValid;
|
55
|
+
private _nclicks;
|
56
|
+
private _downEvents;
|
57
|
+
private _clickStart;
|
58
|
+
private _maxDownTime;
|
59
|
+
private _maxInterval;
|
60
|
+
private _posThreshold;
|
61
|
+
private _movementThreshold;
|
62
|
+
private _currentCursorPosition;
|
63
|
+
private _startCursorPosition;
|
64
|
+
private _grid;
|
65
|
+
private _gridPosition;
|
66
|
+
private _gizmos;
|
67
|
+
private _curvePts;
|
68
|
+
private _timeStart;
|
69
|
+
private _animationId;
|
70
|
+
focusAnimationTime: number;
|
71
|
+
private _timePrev;
|
72
|
+
private _timeCurrent;
|
73
|
+
private _anglePrev;
|
74
|
+
private _angleCurrent;
|
75
|
+
private _cursorPosPrev;
|
76
|
+
private _cursorPosCurr;
|
77
|
+
private _wPrev;
|
78
|
+
private _wCurr;
|
79
|
+
adjustNearFar: boolean;
|
80
|
+
scaleFactor: number;
|
81
|
+
dampingFactor: number;
|
82
|
+
wMax: number;
|
83
|
+
enableAnimations: boolean;
|
84
|
+
enableGrid: boolean;
|
85
|
+
cursorZoom: boolean;
|
86
|
+
minFov: number;
|
87
|
+
maxFov: number;
|
88
|
+
enabled: boolean;
|
89
|
+
enablePan: boolean;
|
90
|
+
enableRotate: boolean;
|
91
|
+
enableZoom: boolean;
|
92
|
+
minDistance: number;
|
93
|
+
maxDistance: number;
|
94
|
+
minZoom: number;
|
95
|
+
maxZoom: number;
|
96
|
+
readonly target: Vector3;
|
97
|
+
private _currentTarget;
|
98
|
+
private _tbRadius;
|
99
|
+
private _state;
|
100
|
+
constructor(camera: Camera | null, domElement?: HTMLElement | null | undefined, scene?: Scene | null | undefined);
|
101
|
+
private onWindowResize;
|
102
|
+
private onContextMenu;
|
103
|
+
private onPointerCancel;
|
104
|
+
private onPointerDown;
|
105
|
+
private onPointerMove;
|
106
|
+
private onPointerUp;
|
107
|
+
private onWheel;
|
108
|
+
private onSinglePanStart;
|
109
|
+
private onSinglePanMove;
|
110
|
+
private onSinglePanEnd;
|
111
|
+
private onDoubleTap;
|
112
|
+
private onDoublePanStart;
|
113
|
+
private onDoublePanMove;
|
114
|
+
private onDoublePanEnd;
|
115
|
+
private onRotateStart;
|
116
|
+
private onRotateMove;
|
117
|
+
private onRotateEnd;
|
118
|
+
private onPinchStart;
|
119
|
+
private onPinchMove;
|
120
|
+
private onPinchEnd;
|
121
|
+
private onTriplePanStart;
|
122
|
+
private onTriplePanMove;
|
123
|
+
private onTriplePanEnd;
|
124
|
+
/**
|
125
|
+
* Set _center's x/y coordinates
|
126
|
+
* @param {Number} clientX
|
127
|
+
* @param {Number} clientY
|
128
|
+
*/
|
129
|
+
private setCenter;
|
130
|
+
/**
|
131
|
+
* Set default mouse actions
|
132
|
+
*/
|
133
|
+
private initializeMouseActions;
|
134
|
+
/**
|
135
|
+
* Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of conflict, replaces the existing one
|
136
|
+
* @param {String} operation The operation to be performed ('PAN', 'ROTATE', 'ZOOM', 'FOV)
|
137
|
+
* @param {*} mouse A mouse button (0, 1, 2) or 'WHEEL' for wheel notches
|
138
|
+
* @param {*} key The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed
|
139
|
+
* @returns {Boolean} True if the mouse action has been successfully added, false otherwise
|
140
|
+
*/
|
141
|
+
private setMouseAction;
|
142
|
+
/**
|
143
|
+
* Return the operation associated to a mouse/keyboard combination
|
144
|
+
* @param {*} mouse A mouse button (0, 1, 2) or 'WHEEL' for wheel notches
|
145
|
+
* @param {*} key The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed
|
146
|
+
* @returns The operation if it has been found, null otherwise
|
147
|
+
*/
|
148
|
+
private getOpFromAction;
|
149
|
+
/**
|
150
|
+
* Get the operation associated to mouse and key combination and returns the corresponding FSA state
|
151
|
+
* @param {Number} mouse Mouse button
|
152
|
+
* @param {String} key Keyboard modifier
|
153
|
+
* @returns The FSA state obtained from the operation associated to mouse/keyboard combination
|
154
|
+
*/
|
155
|
+
private getOpStateFromAction;
|
156
|
+
/**
|
157
|
+
* Calculate the angle between two pointers
|
158
|
+
* @param {PointerEvent} p1
|
159
|
+
* @param {PointerEvent} p2
|
160
|
+
* @returns {Number} The angle between two pointers in degrees
|
161
|
+
*/
|
162
|
+
private getAngle;
|
163
|
+
/**
|
164
|
+
* Update a PointerEvent inside current pointerevents array
|
165
|
+
* @param {PointerEvent} event
|
166
|
+
*/
|
167
|
+
private updateTouchEvent;
|
168
|
+
/**
|
169
|
+
* Apply a transformation matrix, to the camera and gizmos
|
170
|
+
* @param {Object} transformation Object containing matrices to apply to camera and gizmos
|
171
|
+
*/
|
172
|
+
private applyTransformMatrix;
|
173
|
+
/**
|
174
|
+
* Calculate the angular speed
|
175
|
+
* @param {Number} p0 Position at t0
|
176
|
+
* @param {Number} p1 Position at t1
|
177
|
+
* @param {Number} t0 Initial time in milliseconds
|
178
|
+
* @param {Number} t1 Ending time in milliseconds
|
179
|
+
*/
|
180
|
+
private calculateAngularSpeed;
|
181
|
+
/**
|
182
|
+
* Calculate the distance between two pointers
|
183
|
+
* @param {PointerEvent} p0 The first pointer
|
184
|
+
* @param {PointerEvent} p1 The second pointer
|
185
|
+
* @returns {number} The distance between the two pointers
|
186
|
+
*/
|
187
|
+
private calculatePointersDistance;
|
188
|
+
/**
|
189
|
+
* Calculate the rotation axis as the vector perpendicular between two vectors
|
190
|
+
* @param {Vector3} vec1 The first vector
|
191
|
+
* @param {Vector3} vec2 The second vector
|
192
|
+
* @returns {Vector3} The normalized rotation axis
|
193
|
+
*/
|
194
|
+
private calculateRotationAxis;
|
195
|
+
/**
|
196
|
+
* Calculate the trackball radius so that gizmo's diamater will be 2/3 of the minimum side of the camera frustum
|
197
|
+
* @param {Camera} camera
|
198
|
+
* @returns {Number} The trackball radius
|
199
|
+
*/
|
200
|
+
private calculateTbRadius;
|
201
|
+
/**
|
202
|
+
* Focus operation consist of positioning the point of interest in front of the camera and a slightly zoom in
|
203
|
+
* @param {Vector3} point The point of interest
|
204
|
+
* @param {Number} size Scale factor
|
205
|
+
* @param {Number} amount Amount of operation to be completed (used for focus animations, default is complete full operation)
|
206
|
+
*/
|
207
|
+
private focus;
|
208
|
+
/**
|
209
|
+
* Draw a grid and add it to the scene
|
210
|
+
*/
|
211
|
+
private drawGrid;
|
212
|
+
connect: (domElement: HTMLElement) => void;
|
213
|
+
/**
|
214
|
+
* Remove all listeners, stop animations and clean scene
|
215
|
+
*/
|
216
|
+
dispose: () => void;
|
217
|
+
/**
|
218
|
+
* remove the grid from the scene
|
219
|
+
*/
|
220
|
+
private disposeGrid;
|
221
|
+
/**
|
222
|
+
* Compute the easing out cubic function for ease out effect in animation
|
223
|
+
* @param {Number} t The absolute progress of the animation in the bound of 0 (beginning of the) and 1 (ending of animation)
|
224
|
+
* @returns {Number} Result of easing out cubic at time t
|
225
|
+
*/
|
226
|
+
private easeOutCubic;
|
227
|
+
/**
|
228
|
+
* Make rotation gizmos more or less visible
|
229
|
+
* @param {Boolean} isActive If true, make gizmos more visible
|
230
|
+
*/
|
231
|
+
private activateGizmos;
|
232
|
+
/**
|
233
|
+
* Calculate the cursor position in NDC
|
234
|
+
* @param {number} x Cursor horizontal coordinate within the canvas
|
235
|
+
* @param {number} y Cursor vertical coordinate within the canvas
|
236
|
+
* @param {HTMLElement} canvas The canvas where the renderer draws its output
|
237
|
+
* @returns {Vector2} Cursor normalized position inside the canvas
|
238
|
+
*/
|
239
|
+
private getCursorNDC;
|
240
|
+
/**
|
241
|
+
* Calculate the cursor position inside the canvas x/y coordinates with the origin being in the center of the canvas
|
242
|
+
* @param {Number} x Cursor horizontal coordinate within the canvas
|
243
|
+
* @param {Number} y Cursor vertical coordinate within the canvas
|
244
|
+
* @param {HTMLElement} canvas The canvas where the renderer draws its output
|
245
|
+
* @returns {Vector2} Cursor position inside the canvas
|
246
|
+
*/
|
247
|
+
private getCursorPosition;
|
248
|
+
/**
|
249
|
+
* Set the camera to be controlled
|
250
|
+
* @param {Camera} camera The virtual camera to be controlled
|
251
|
+
*/
|
252
|
+
private setCamera;
|
253
|
+
/**
|
254
|
+
* Set gizmos visibility
|
255
|
+
* @param {Boolean} value Value of gizmos visibility
|
256
|
+
*/
|
257
|
+
setGizmosVisible(value: boolean): void;
|
258
|
+
/**
|
259
|
+
* Creates the rotation gizmos matching trackball center and radius
|
260
|
+
* @param {Vector3} tbCenter The trackball center
|
261
|
+
* @param {number} tbRadius The trackball radius
|
262
|
+
*/
|
263
|
+
private makeGizmos;
|
264
|
+
/**
|
265
|
+
* Perform animation for focus operation
|
266
|
+
* @param {Number} time Instant in which this function is called as performance.now()
|
267
|
+
* @param {Vector3} point Point of interest for focus operation
|
268
|
+
* @param {Matrix4} cameraMatrix Camera matrix
|
269
|
+
* @param {Matrix4} gizmoMatrix Gizmos matrix
|
270
|
+
*/
|
271
|
+
private onFocusAnim;
|
272
|
+
/**
|
273
|
+
* Perform animation for rotation operation
|
274
|
+
* @param {Number} time Instant in which this function is called as performance.now()
|
275
|
+
* @param {Vector3} rotationAxis Rotation axis
|
276
|
+
* @param {number} w0 Initial angular velocity
|
277
|
+
*/
|
278
|
+
private onRotationAnim;
|
279
|
+
/**
|
280
|
+
* Perform pan operation moving camera between two points
|
281
|
+
* @param {Vector3} p0 Initial point
|
282
|
+
* @param {Vector3} p1 Ending point
|
283
|
+
* @param {Boolean} adjust If movement should be adjusted considering camera distance (Perspective only)
|
284
|
+
*/
|
285
|
+
private pan;
|
286
|
+
/**
|
287
|
+
* Reset trackball
|
288
|
+
*/
|
289
|
+
reset: () => void;
|
290
|
+
/**
|
291
|
+
* Rotate the camera around an axis passing by trackball's center
|
292
|
+
* @param {Vector3} axis Rotation axis
|
293
|
+
* @param {number} angle Angle in radians
|
294
|
+
* @returns {Object} Object with 'camera' field containing transformation matrix resulting from the operation to be applied to the camera
|
295
|
+
*/
|
296
|
+
private rotate;
|
297
|
+
copyState: () => void;
|
298
|
+
pasteState: () => void;
|
299
|
+
/**
|
300
|
+
* Save the current state of the control. This can later be recovered with .reset
|
301
|
+
*/
|
302
|
+
saveState: () => void;
|
303
|
+
/**
|
304
|
+
* Perform uniform scale operation around a given point
|
305
|
+
* @param {Number} size Scale factor
|
306
|
+
* @param {Vector3} point Point around which scale
|
307
|
+
* @param {Boolean} scaleGizmos If gizmos should be scaled (Perspective only)
|
308
|
+
* @returns {Object} Object with 'camera' and 'gizmo' fields containing transformation matrices resulting from the operation to be applied to the camera and gizmos
|
309
|
+
*/
|
310
|
+
private applyScale;
|
311
|
+
/**
|
312
|
+
* Set camera fov
|
313
|
+
* @param {Number} value fov to be setted
|
314
|
+
*/
|
315
|
+
private setFov;
|
316
|
+
/**
|
317
|
+
* Set the trackball's center point
|
318
|
+
* @param {Number} x X coordinate
|
319
|
+
* @param {Number} y Y coordinate
|
320
|
+
* @param {Number} z Z coordinate
|
321
|
+
*/
|
322
|
+
setTarget: (x: number, y: number, z: number) => void;
|
323
|
+
/**
|
324
|
+
* Set values in transformation object
|
325
|
+
* @param {Matrix4} camera Transformation to be applied to the camera
|
326
|
+
* @param {Matrix4} gizmos Transformation to be applied to gizmos
|
327
|
+
*/
|
328
|
+
private setTransformationMatrices;
|
329
|
+
/**
|
330
|
+
* Rotate camera around its direction axis passing by a given point by a given angle
|
331
|
+
* @param {Vector3} point The point where the rotation axis is passing trough
|
332
|
+
* @param {Number} angle Angle in radians
|
333
|
+
* @returns The computed transormation matix
|
334
|
+
*/
|
335
|
+
private zRotate;
|
336
|
+
/**
|
337
|
+
* Unproject the cursor on the 3D object surface
|
338
|
+
* @param {Vector2} cursor Cursor coordinates in NDC
|
339
|
+
* @param {Camera} camera Virtual camera
|
340
|
+
* @returns {Vector3} The point of intersection with the model, if exist, null otherwise
|
341
|
+
*/
|
342
|
+
private unprojectOnObj;
|
343
|
+
/**
|
344
|
+
* Unproject the cursor on the trackball surface
|
345
|
+
* @param {Camera} camera The virtual camera
|
346
|
+
* @param {Number} cursorX Cursor horizontal coordinate on screen
|
347
|
+
* @param {Number} cursorY Cursor vertical coordinate on screen
|
348
|
+
* @param {HTMLElement} canvas The canvas where the renderer draws its output
|
349
|
+
* @param {number} tbRadius The trackball radius
|
350
|
+
* @returns {Vector3} The unprojected point on the trackball surface
|
351
|
+
*/
|
352
|
+
private unprojectOnTbSurface;
|
353
|
+
/**
|
354
|
+
* Unproject the cursor on the plane passing through the center of the trackball orthogonal to the camera
|
355
|
+
* @param {Camera} camera The virtual camera
|
356
|
+
* @param {Number} cursorX Cursor horizontal coordinate on screen
|
357
|
+
* @param {Number} cursorY Cursor vertical coordinate on screen
|
358
|
+
* @param {HTMLElement} canvas The canvas where the renderer draws its output
|
359
|
+
* @param {Boolean} initialDistance If initial distance between camera and gizmos should be used for calculations instead of current (Perspective only)
|
360
|
+
* @returns {Vector3} The unprojected point on the trackball plane
|
361
|
+
*/
|
362
|
+
private unprojectOnTbPlane;
|
363
|
+
/**
|
364
|
+
* Update camera and gizmos state
|
365
|
+
*/
|
366
|
+
private updateMatrixState;
|
367
|
+
/**
|
368
|
+
* Update the trackball FSA
|
369
|
+
* @param {STATE} newState New state of the FSA
|
370
|
+
* @param {Boolean} updateMatrices If matriices state should be updated
|
371
|
+
*/
|
372
|
+
private updateTbState;
|
373
|
+
update: () => void;
|
374
|
+
private setStateFromJSON;
|
375
|
+
}
|
376
|
+
export type { ArcballControls };
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Vector3, Scene, PerspectiveCamera, OrthographicCamera } from 'three';
|
2
|
-
import { EventDispatcher } from './EventDispatcher';
|
3
|
-
import { StandardControlsEventMap } from './StandardControlsEventMap';
|
1
|
+
import type { Vector3, Scene, PerspectiveCamera, OrthographicCamera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.ts';
|
3
|
+
import type { StandardControlsEventMap } from './StandardControlsEventMap.d.ts';
|
4
4
|
type Camera = OrthographicCamera | PerspectiveCamera;
|
5
5
|
/**
|
6
6
|
*
|
@@ -373,4 +373,4 @@ declare class ArcballControls extends EventDispatcher<StandardControlsEventMap>
|
|
373
373
|
update: () => void;
|
374
374
|
private setStateFromJSON;
|
375
375
|
}
|
376
|
-
export { ArcballControls };
|
376
|
+
export type { ArcballControls };
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import type { Camera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.cts';
|
3
|
+
import type { StandardControlsEventMap } from './StandardControlsEventMap.d.cts';
|
4
|
+
/**
|
5
|
+
* W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)
|
6
|
+
*/
|
7
|
+
declare class DeviceOrientationControls extends EventDispatcher<StandardControlsEventMap> {
|
8
|
+
object: Camera;
|
9
|
+
private changeEvent;
|
10
|
+
private EPS;
|
11
|
+
enabled: boolean;
|
12
|
+
deviceOrientation: Partial<DeviceOrientationEvent>;
|
13
|
+
screenOrientation: string | number;
|
14
|
+
alphaOffset: number;
|
15
|
+
constructor(object: Camera);
|
16
|
+
private onDeviceOrientationChangeEvent;
|
17
|
+
private onScreenOrientationChangeEvent;
|
18
|
+
private zee;
|
19
|
+
private euler;
|
20
|
+
private q0;
|
21
|
+
private q1;
|
22
|
+
private setObjectQuaternion;
|
23
|
+
connect: () => void;
|
24
|
+
disconnect: () => void;
|
25
|
+
private lastQuaternion;
|
26
|
+
update: () => void;
|
27
|
+
dispose: () => void;
|
28
|
+
}
|
29
|
+
export type { DeviceOrientationControls };
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Camera } from 'three';
|
2
|
-
import { EventDispatcher } from './EventDispatcher';
|
3
|
-
import { StandardControlsEventMap } from './StandardControlsEventMap';
|
1
|
+
import type { Camera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.ts';
|
3
|
+
import type { StandardControlsEventMap } from './StandardControlsEventMap.d.ts';
|
4
4
|
/**
|
5
5
|
* W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)
|
6
6
|
*/
|
@@ -26,4 +26,4 @@ declare class DeviceOrientationControls extends EventDispatcher<StandardControls
|
|
26
26
|
update: () => void;
|
27
27
|
dispose: () => void;
|
28
28
|
}
|
29
|
-
export { DeviceOrientationControls };
|
29
|
+
export type { DeviceOrientationControls };
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import type { Camera, Object3D, Raycaster } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.cts';
|
3
|
+
export interface DragControlsEventMap {
|
4
|
+
/**
|
5
|
+
* Fires when the pointer is moved onto a 3D object, or onto one of its children.
|
6
|
+
*/
|
7
|
+
hoveron: {
|
8
|
+
object: Object3D;
|
9
|
+
};
|
10
|
+
/**
|
11
|
+
* Fires when the pointer is moved out of a 3D object.
|
12
|
+
*/
|
13
|
+
hoveroff: {
|
14
|
+
object: Object3D;
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* Fires when the user starts to drag a 3D object.
|
18
|
+
*/
|
19
|
+
dragstart: {
|
20
|
+
object: Object3D;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* Fires when the user drags a 3D object.
|
24
|
+
*/
|
25
|
+
drag: {
|
26
|
+
object: Object3D;
|
27
|
+
};
|
28
|
+
/**
|
29
|
+
* Fires when the user has finished dragging a 3D object.
|
30
|
+
*/
|
31
|
+
dragend: {
|
32
|
+
object: Object3D;
|
33
|
+
};
|
34
|
+
}
|
35
|
+
declare class DragControls extends EventDispatcher<DragControlsEventMap> {
|
36
|
+
enabled: boolean;
|
37
|
+
transformGroup: boolean;
|
38
|
+
private _objects;
|
39
|
+
private _camera;
|
40
|
+
private _domElement;
|
41
|
+
private _plane;
|
42
|
+
private _raycaster;
|
43
|
+
private _mouse;
|
44
|
+
private _offset;
|
45
|
+
private _intersection;
|
46
|
+
private _worldPosition;
|
47
|
+
private _inverseMatrix;
|
48
|
+
private _intersections;
|
49
|
+
private _selected;
|
50
|
+
private _hovered;
|
51
|
+
constructor(_objects: Object3D[], _camera: Camera, _domElement: HTMLElement);
|
52
|
+
activate: () => void;
|
53
|
+
deactivate: () => void;
|
54
|
+
dispose: () => void;
|
55
|
+
getObjects: () => Object3D[];
|
56
|
+
getRaycaster: () => Raycaster;
|
57
|
+
private onMouseMove;
|
58
|
+
private onMouseDown;
|
59
|
+
private onMouseCancel;
|
60
|
+
private onPointerMove;
|
61
|
+
private onPointerDown;
|
62
|
+
private onPointerCancel;
|
63
|
+
private onTouchMove;
|
64
|
+
private onTouchStart;
|
65
|
+
private onTouchEnd;
|
66
|
+
}
|
67
|
+
export type { DragControls };
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Camera, Object3D, Raycaster } from 'three';
|
2
|
-
import { EventDispatcher } from './EventDispatcher';
|
1
|
+
import type { Camera, Object3D, Raycaster } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.ts';
|
3
3
|
export interface DragControlsEventMap {
|
4
4
|
/**
|
5
5
|
* Fires when the pointer is moved onto a 3D object, or onto one of its children.
|
@@ -64,4 +64,4 @@ declare class DragControls extends EventDispatcher<DragControlsEventMap> {
|
|
64
64
|
private onTouchStart;
|
65
65
|
private onTouchEnd;
|
66
66
|
}
|
67
|
-
export { DragControls };
|
67
|
+
export type { DragControls };
|
@@ -0,0 +1,41 @@
|
|
1
|
+
/**
|
2
|
+
* The minimal basic Event that can be dispatched by a {@link EventDispatcher<>}.
|
3
|
+
*/
|
4
|
+
export interface BaseEvent<TEventType extends string = string> {
|
5
|
+
readonly type: TEventType;
|
6
|
+
target: any;
|
7
|
+
}
|
8
|
+
/**
|
9
|
+
* The minimal expected contract of a fired Event that was dispatched by a {@link EventDispatcher<>}.
|
10
|
+
*/
|
11
|
+
export interface Event<TEventType extends string = string, TTarget = unknown> {
|
12
|
+
readonly type: TEventType;
|
13
|
+
readonly target: TTarget;
|
14
|
+
}
|
15
|
+
export type EventListener<TEventData, TEventType extends string, TTarget> = (event: TEventData & Event<TEventType, TTarget>) => void;
|
16
|
+
export type declare class EventDispatcher<TEventMap extends {} = {}> {
|
17
|
+
private _listeners;
|
18
|
+
/**
|
19
|
+
* Adds a listener to an event type.
|
20
|
+
* @param type The type of event to listen to.
|
21
|
+
* @param listener The function that gets called when the event is fired.
|
22
|
+
*/
|
23
|
+
addEventListener<T extends Extract<keyof TEventMap, string>>(type: T, listener: EventListener<TEventMap[T], T, this>): void;
|
24
|
+
/**
|
25
|
+
* Checks if listener is added to an event type.
|
26
|
+
* @param type The type of event to listen to.
|
27
|
+
* @param listener The function that gets called when the event is fired.
|
28
|
+
*/
|
29
|
+
hasEventListener<T extends Extract<keyof TEventMap, string>>(type: T, listener: EventListener<TEventMap[T], T, this>): boolean;
|
30
|
+
/**
|
31
|
+
* Removes a listener from an event type.
|
32
|
+
* @param type The type of the listener that gets removed.
|
33
|
+
* @param listener The listener function that gets removed.
|
34
|
+
*/
|
35
|
+
removeEventListener<T extends Extract<keyof TEventMap, string>>(type: T, listener: EventListener<TEventMap[T], T, this>): void;
|
36
|
+
/**
|
37
|
+
* Fire an event type.
|
38
|
+
* @param event The event that gets fired.
|
39
|
+
*/
|
40
|
+
dispatchEvent<T extends Extract<keyof TEventMap, string>>(event: BaseEvent<T> & TEventMap[T]): void;
|
41
|
+
}
|
@@ -13,7 +13,7 @@ export interface Event<TEventType extends string = string, TTarget = unknown> {
|
|
13
13
|
readonly target: TTarget;
|
14
14
|
}
|
15
15
|
export type EventListener<TEventData, TEventType extends string, TTarget> = (event: TEventData & Event<TEventType, TTarget>) => void;
|
16
|
-
export declare class EventDispatcher<TEventMap extends {} = {}> {
|
16
|
+
export type declare class EventDispatcher<TEventMap extends {} = {}> {
|
17
17
|
private _listeners;
|
18
18
|
/**
|
19
19
|
* Adds a listener to an event type.
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import type { Vector3, Camera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.cts';
|
3
|
+
export type declare class FirstPersonControls extends EventDispatcher<{}> {
|
4
|
+
object: Camera;
|
5
|
+
domElement?: HTMLElement | null;
|
6
|
+
enabled: boolean;
|
7
|
+
movementSpeed: number;
|
8
|
+
lookSpeed: number;
|
9
|
+
lookVertical: boolean;
|
10
|
+
autoForward: boolean;
|
11
|
+
activeLook: boolean;
|
12
|
+
heightSpeed: boolean;
|
13
|
+
heightCoef: number;
|
14
|
+
heightMin: number;
|
15
|
+
heightMax: number;
|
16
|
+
constrainVertical: boolean;
|
17
|
+
verticalMin: number;
|
18
|
+
verticalMax: number;
|
19
|
+
mouseDragOn: boolean;
|
20
|
+
private autoSpeedFactor;
|
21
|
+
private mouseX;
|
22
|
+
private mouseY;
|
23
|
+
private moveForward;
|
24
|
+
private moveBackward;
|
25
|
+
private moveLeft;
|
26
|
+
private moveRight;
|
27
|
+
private moveUp;
|
28
|
+
private moveDown;
|
29
|
+
private viewHalfX;
|
30
|
+
private viewHalfY;
|
31
|
+
private lat;
|
32
|
+
private lon;
|
33
|
+
private lookDirection;
|
34
|
+
private spherical;
|
35
|
+
readonly target: Vector3;
|
36
|
+
constructor(object: Camera, domElement?: HTMLElement | null);
|
37
|
+
connect: (domElement: HTMLElement) => void;
|
38
|
+
dispose: () => void;
|
39
|
+
handleResize: () => void;
|
40
|
+
private onMouseDown;
|
41
|
+
private onMouseUp;
|
42
|
+
private onMouseMove;
|
43
|
+
private onKeyDown;
|
44
|
+
private onKeyUp;
|
45
|
+
lookAt: (x: Vector3 | number, y?: number, z?: number) => this;
|
46
|
+
update: (delta: number) => void;
|
47
|
+
private contextmenu;
|
48
|
+
private setOrientation;
|
49
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Vector3, Camera } from 'three';
|
2
|
-
import { EventDispatcher } from './EventDispatcher';
|
3
|
-
export declare class FirstPersonControls extends EventDispatcher<{}> {
|
1
|
+
import type { Vector3, Camera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.ts';
|
3
|
+
export type declare class FirstPersonControls extends EventDispatcher<{}> {
|
4
4
|
object: Camera;
|
5
5
|
domElement?: HTMLElement | null;
|
6
6
|
enabled: boolean;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import type { Camera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.cts';
|
3
|
+
export interface FlyControlsEventMap {
|
4
|
+
/**
|
5
|
+
* Fires when the camera has been transformed by the controls.
|
6
|
+
*/
|
7
|
+
change: {};
|
8
|
+
}
|
9
|
+
declare class FlyControls extends EventDispatcher<FlyControlsEventMap> {
|
10
|
+
object: Camera;
|
11
|
+
domElement: HTMLElement | Document;
|
12
|
+
movementSpeed: number;
|
13
|
+
rollSpeed: number;
|
14
|
+
dragToLook: boolean;
|
15
|
+
autoForward: boolean;
|
16
|
+
private changeEvent;
|
17
|
+
private EPS;
|
18
|
+
private tmpQuaternion;
|
19
|
+
private mouseStatus;
|
20
|
+
private movementSpeedMultiplier;
|
21
|
+
private moveState;
|
22
|
+
private moveVector;
|
23
|
+
private rotationVector;
|
24
|
+
constructor(object: Camera, domElement?: HTMLElement | Document);
|
25
|
+
private keydown;
|
26
|
+
private keyup;
|
27
|
+
private pointerdown;
|
28
|
+
private pointermove;
|
29
|
+
private pointerup;
|
30
|
+
private lastQuaternion;
|
31
|
+
private lastPosition;
|
32
|
+
update: (delta: number) => void;
|
33
|
+
private updateMovementVector;
|
34
|
+
private updateRotationVector;
|
35
|
+
private getContainerDimensions;
|
36
|
+
connect: (domElement: HTMLElement | Document) => void;
|
37
|
+
dispose: () => void;
|
38
|
+
}
|
39
|
+
export type { FlyControls };
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Camera } from 'three';
|
2
|
-
import { EventDispatcher } from './EventDispatcher';
|
1
|
+
import type { Camera } from 'three';
|
2
|
+
import type { EventDispatcher } from './EventDispatcher.d.ts';
|
3
3
|
export interface FlyControlsEventMap {
|
4
4
|
/**
|
5
5
|
* Fires when the camera has been transformed by the controls.
|
@@ -36,4 +36,4 @@ declare class FlyControls extends EventDispatcher<FlyControlsEventMap> {
|
|
36
36
|
connect: (domElement: HTMLElement | Document) => void;
|
37
37
|
dispose: () => void;
|
38
38
|
}
|
39
|
-
export { FlyControls };
|
39
|
+
export type { FlyControls };
|