@types/three 0.167.2 → 0.169.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +2 -2
- three/build/three.webgpu.nodes.d.ts +1 -0
- three/build/three.webgpu.nodes.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +1 -4
- three/examples/jsm/capabilities/WebGL.d.ts +11 -3
- three/examples/jsm/controls/ArcballControls.d.ts +111 -77
- three/examples/jsm/controls/DragControls.d.ts +43 -29
- three/examples/jsm/controls/FirstPersonControls.d.ts +82 -12
- three/examples/jsm/controls/FlyControls.d.ts +35 -11
- three/examples/jsm/controls/OrbitControls.d.ts +84 -137
- three/examples/jsm/controls/PointerLockControls.d.ts +68 -9
- three/examples/jsm/controls/TrackballControls.d.ts +110 -26
- three/examples/jsm/controls/TransformControls.d.ts +152 -25
- three/examples/jsm/effects/AnaglyphEffect.d.ts +11 -5
- three/examples/jsm/effects/ParallaxBarrierEffect.d.ts +7 -4
- three/examples/jsm/environments/RoomEnvironment.d.ts +2 -2
- three/examples/jsm/exporters/EXRExporter.d.ts +7 -2
- three/examples/jsm/exporters/KTX2Exporter.d.ts +3 -1
- three/examples/jsm/helpers/LightProbeHelper.d.ts +5 -3
- three/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
- three/examples/jsm/lights/LightProbeGenerator.d.ts +5 -1
- three/examples/jsm/lines/Line2.d.ts +15 -1
- three/examples/jsm/lines/LineGeometry.d.ts +18 -1
- three/examples/jsm/lines/LineMaterial.d.ts +65 -12
- three/examples/jsm/lines/LineSegments2.d.ts +25 -2
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +46 -9
- three/examples/jsm/loaders/DRACOLoader.d.ts +6 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +4 -0
- three/examples/jsm/modifiers/CurveModifier.d.ts +7 -3
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
- three/examples/jsm/objects/Lensflare.d.ts +13 -9
- three/examples/jsm/objects/LensflareMesh.d.ts +21 -0
- three/examples/jsm/objects/SkyMesh.d.ts +17 -0
- three/examples/jsm/objects/Water2.d.ts +2 -2
- three/examples/jsm/objects/Water2Mesh.d.ts +42 -0
- three/examples/jsm/objects/WaterMesh.d.ts +31 -0
- three/examples/jsm/postprocessing/OutlinePass.d.ts +1 -1
- three/examples/jsm/postprocessing/SSAARenderPass.d.ts +11 -2
- three/examples/jsm/utils/GeometryCompressionUtils.d.ts +20 -4
- three/examples/jsm/utils/ShadowMapViewer.d.ts +8 -6
- three/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
- three/examples/jsm/utils/SkeletonUtils.d.ts +25 -5
- three/examples/jsm/utils/TextureUtilsGPU.d.ts +3 -0
- three/package.json +4 -3
- three/src/Three.WebGPU.Nodes.d.ts +201 -0
- three/src/Three.WebGPU.d.ts +7 -0
- three/src/Three.d.ts +1 -0
- three/src/audio/Audio.d.ts +4 -1
- three/src/core/BufferAttribute.d.ts +0 -15
- three/src/core/EventDispatcher.d.ts +0 -3
- three/src/core/InterleavedBuffer.d.ts +0 -12
- three/src/core/Object3D.d.ts +3 -1
- three/src/core/Raycaster.d.ts +2 -1
- three/src/extras/Controls.d.ts +54 -0
- three/src/loaders/MaterialLoader.d.ts +2 -0
- three/src/{nodes/loaders → loaders/nodes}/NodeLoader.d.ts +8 -3
- three/src/loaders/nodes/NodeMaterialLoader.d.ts +11 -0
- three/src/loaders/nodes/NodeObjectLoader.d.ts +22 -0
- three/src/materials/Material.d.ts +17 -13
- three/src/materials/nodes/InstancedPointsNodeMaterial.d.ts +33 -0
- three/src/{nodes/materials → materials/nodes}/Line2NodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/LineBasicNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +29 -0
- three/src/{nodes/materials → materials/nodes}/MeshBasicNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -0
- three/src/{nodes/materials → materials/nodes}/MeshMatcapNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/MeshNormalNodeMaterial.d.ts +1 -1
- three/src/{nodes/materials → materials/nodes}/MeshPhongNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/MeshPhysicalNodeMaterial.d.ts +5 -2
- three/src/{nodes/materials → materials/nodes}/MeshSSSNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/MeshStandardNodeMaterial.d.ts +3 -3
- three/src/{nodes/materials → materials/nodes}/MeshToonNodeMaterial.d.ts +2 -2
- three/src/materials/nodes/NodeMaterial.d.ts +89 -0
- three/src/{nodes/materials/Materials.d.ts → materials/nodes/NodeMaterials.d.ts} +5 -2
- three/src/{nodes/materials → materials/nodes}/PointsNodeMaterial.d.ts +1 -2
- three/src/{nodes/materials → materials/nodes}/ShadowNodeMaterial.d.ts +1 -1
- three/src/{nodes/materials → materials/nodes}/SpriteNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/VolumeNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +81 -0
- three/src/math/Quaternion.d.ts +4 -3
- three/src/math/Triangle.d.ts +24 -0
- three/src/nodes/Nodes.d.ts +117 -362
- three/src/nodes/TSL.d.ts +175 -0
- three/src/nodes/accessors/AccessorsUtils.d.ts +1 -1
- three/src/nodes/accessors/BatchNode.d.ts +1 -2
- three/src/nodes/accessors/{BitangentNode.d.ts → Bitangent.d.ts} +1 -1
- three/src/nodes/accessors/BufferAttributeNode.d.ts +5 -4
- three/src/nodes/accessors/BufferNode.d.ts +1 -1
- three/src/nodes/accessors/{CameraNode.d.ts → Camera.d.ts} +1 -1
- three/src/nodes/accessors/ClippingNode.d.ts +1 -1
- three/src/nodes/accessors/CubeTextureNode.d.ts +1 -7
- three/src/nodes/accessors/InstanceNode.d.ts +1 -1
- three/src/nodes/accessors/MaterialNode.d.ts +3 -4
- three/src/nodes/accessors/MaterialProperties.d.ts +4 -0
- three/src/nodes/accessors/MaterialReferenceNode.d.ts +3 -1
- three/src/nodes/accessors/ModelNode.d.ts +8 -4
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +1 -1
- three/src/nodes/accessors/MorphNode.d.ts +15 -0
- three/src/nodes/accessors/Normal.d.ts +25 -0
- three/src/nodes/accessors/Object3DNode.d.ts +2 -6
- three/src/nodes/accessors/PointUVNode.d.ts +1 -1
- three/src/nodes/accessors/{PositionNode.d.ts → Position.d.ts} +2 -1
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +27 -0
- three/src/nodes/accessors/ReferenceNode.d.ts +7 -5
- three/src/nodes/accessors/{ReflectVectorNode.d.ts → ReflectVector.d.ts} +1 -1
- three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
- three/src/nodes/accessors/SceneNode.d.ts +20 -0
- three/src/nodes/accessors/SkinningNode.d.ts +11 -1
- three/src/nodes/accessors/StorageBufferNode.d.ts +2 -2
- three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
- three/src/nodes/accessors/{TangentNode.d.ts → Tangent.d.ts} +1 -1
- three/src/nodes/accessors/Texture3DNode.d.ts +1 -1
- three/src/nodes/accessors/TextureBicubic.d.ts +4 -0
- three/src/nodes/accessors/TextureNode.d.ts +26 -7
- three/src/nodes/accessors/TextureSizeNode.d.ts +18 -0
- three/src/nodes/accessors/{UVNode.d.ts → UV.d.ts} +1 -1
- three/src/nodes/accessors/UniformArrayNode.d.ts +30 -0
- three/src/nodes/accessors/UserDataNode.d.ts +1 -1
- three/src/nodes/accessors/VelocityNode.d.ts +16 -0
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
- three/src/nodes/code/CodeNode.d.ts +1 -1
- three/src/nodes/code/ExpressionNode.d.ts +1 -1
- three/src/nodes/code/FunctionCallNode.d.ts +2 -2
- three/src/nodes/code/FunctionNode.d.ts +5 -6
- three/src/nodes/code/ScriptableNode.d.ts +22 -0
- three/src/nodes/code/ScriptableValueNode.d.ts +10 -0
- three/src/nodes/core/AssignNode.d.ts +2 -2
- three/src/nodes/core/AttributeNode.d.ts +2 -5
- three/src/nodes/core/BypassNode.d.ts +2 -2
- three/src/nodes/core/CacheNode.d.ts +2 -2
- three/src/nodes/core/ContextNode.d.ts +10 -7
- three/src/nodes/core/IndexNode.d.ts +11 -3
- three/src/nodes/core/MRTNode.d.ts +7 -2
- three/src/nodes/core/Node.d.ts +4 -7
- three/src/nodes/core/NodeUtils.d.ts +5 -1
- three/src/nodes/core/OutputStructNode.d.ts +1 -1
- three/src/nodes/core/ParameterNode.d.ts +12 -0
- three/src/nodes/core/PropertyNode.d.ts +1 -1
- three/src/nodes/core/StackNode.d.ts +12 -2
- three/src/nodes/core/StructTypeNode.d.ts +1 -0
- three/src/nodes/core/UniformNode.d.ts +2 -1
- three/src/nodes/core/VarNode.d.ts +2 -10
- three/src/nodes/core/VaryingNode.d.ts +2 -2
- three/src/nodes/display/AfterImageNode.d.ts +1 -7
- three/src/nodes/display/AnaglyphPassNode.d.ts +14 -0
- three/src/nodes/display/AnamorphicNode.d.ts +1 -7
- three/src/nodes/display/BleachBypass.d.ts +4 -0
- three/src/nodes/display/BlendMode.d.ts +10 -0
- three/src/nodes/display/BloomNode.d.ts +1 -7
- three/src/nodes/display/BumpMapNode.d.ts +16 -0
- three/src/nodes/display/ColorAdjustment.d.ts +27 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +6 -0
- three/src/nodes/display/ColorSpaceNode.d.ts +40 -21
- three/src/nodes/display/DenoiseNode.d.ts +3 -9
- three/src/nodes/display/DepthOfFieldNode.d.ts +4 -8
- three/src/nodes/display/DotScreenNode.d.ts +4 -8
- three/src/nodes/display/FXAANode.d.ts +3 -9
- three/src/nodes/display/FilmNode.d.ts +3 -9
- three/src/nodes/display/FrontFacingNode.d.ts +4 -2
- three/src/nodes/display/GTAONode.d.ts +3 -9
- three/src/nodes/display/GaussianBlurNode.d.ts +4 -8
- three/src/nodes/display/Lut3DNode.d.ts +3 -9
- three/src/nodes/display/MotionBlur.d.ts +8 -0
- three/src/nodes/display/NormalMapNode.d.ts +4 -8
- three/src/nodes/display/ParallaxBarrierPassNode.d.ts +14 -0
- three/src/nodes/display/PassNode.d.ts +11 -2
- three/src/nodes/display/PixelationPassNode.d.ts +1 -37
- three/src/nodes/display/PosterizeNode.d.ts +1 -7
- three/src/nodes/display/RGBShiftNode.d.ts +1 -7
- three/src/nodes/display/RenderOutputNode.d.ts +2 -2
- three/src/nodes/display/SSAAPassNode.d.ts +26 -0
- three/src/nodes/display/ScreenNode.d.ts +48 -0
- three/src/nodes/display/Sepia.d.ts +4 -0
- three/src/nodes/display/SobelOperatorNode.d.ts +4 -8
- three/src/nodes/display/StereoCompositePassNode.d.ts +17 -0
- three/src/nodes/display/StereoPassNode.d.ts +17 -0
- three/src/nodes/display/ToneMappingFunctions.d.ts +14 -0
- three/src/nodes/display/ToneMappingNode.d.ts +5 -6
- three/src/nodes/display/ToonOutlinePassNode.d.ts +24 -0
- three/src/nodes/display/TransitionNode.d.ts +3 -9
- three/src/nodes/display/ViewportDepthNode.d.ts +6 -2
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +4 -2
- three/src/nodes/display/ViewportSharedTextureNode.d.ts +4 -8
- three/src/nodes/display/ViewportTextureNode.d.ts +4 -9
- three/src/nodes/fog/FogExp2Node.d.ts +4 -8
- three/src/nodes/fog/FogNode.d.ts +4 -8
- three/src/nodes/fog/FogRangeNode.d.ts +4 -8
- three/src/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
- three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
- three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +1 -1
- three/src/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
- three/src/nodes/functions/BSDF/D_GGX.d.ts +1 -1
- three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +1 -1
- three/src/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +10 -0
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -1
- three/src/nodes/functions/ShadowMaskModel.d.ts +1 -1
- three/src/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/src/nodes/functions/material/getRoughness.d.ts +1 -1
- three/src/nodes/functions/material/getShIrradianceAt.d.ts +6 -0
- three/src/nodes/geometry/RangeNode.d.ts +1 -1
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
- three/src/nodes/lighting/AmbientLightNode.d.ts +8 -0
- three/src/nodes/lighting/DirectionalLightNode.d.ts +8 -0
- three/src/nodes/lighting/IESSpotLightNode.d.ts +5 -0
- three/src/nodes/lighting/LightNode.d.ts +18 -0
- three/src/nodes/lighting/LightProbeNode.d.ts +11 -0
- three/src/nodes/lighting/LightUtils.d.ts +3 -3
- three/src/nodes/lighting/LightingContextNode.d.ts +1 -7
- three/src/nodes/lighting/LightsNode.d.ts +9 -13
- three/src/nodes/materialx/MaterialXNodes.d.ts +1 -1
- three/src/nodes/materialx/lib/mx_hsv.d.ts +2 -2
- three/src/nodes/materialx/lib/mx_noise.d.ts +1 -1
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +1 -1
- three/src/nodes/math/ConditionalNode.d.ts +39 -0
- three/src/nodes/math/Hash.d.ts +4 -0
- three/src/nodes/math/MathNode.d.ts +2 -2
- three/src/nodes/math/MathUtils.d.ts +0 -10
- three/src/nodes/math/OperatorNode.d.ts +18 -4
- three/src/nodes/math/TriNoise3D.d.ts +1 -1
- three/src/nodes/parsers/GLSLNodeFunction.d.ts +9 -0
- three/src/nodes/parsers/GLSLNodeParser.d.ts +8 -0
- three/src/nodes/pmrem/PMREMNode.d.ts +4 -2
- three/src/nodes/pmrem/PMREMUtils.d.ts +28 -0
- three/src/nodes/procedural/Checker.d.ts +4 -0
- three/src/nodes/tsl/TSLBase.d.ts +21 -0
- three/src/nodes/{shadernode/ShaderNode.d.ts → tsl/TSLCore.d.ts} +23 -23
- three/src/nodes/utils/CubeMapNode.d.ts +13 -0
- three/src/nodes/utils/Discard.d.ts +11 -0
- three/src/nodes/utils/EquirectUVNode.d.ts +1 -1
- three/src/nodes/utils/FunctionOverloadingNode.d.ts +13 -0
- three/src/nodes/utils/LoopNode.d.ts +22 -0
- three/src/nodes/utils/MatcapUVNode.d.ts +1 -1
- three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
- three/src/nodes/utils/OscNode.d.ts +1 -1
- three/src/nodes/utils/Packing.d.ts +5 -0
- three/src/nodes/utils/RTTNode.d.ts +7 -7
- three/src/nodes/utils/ReflectorNode.d.ts +1 -1
- three/src/nodes/utils/RemapNode.d.ts +2 -2
- three/src/nodes/utils/RotateNode.d.ts +1 -7
- three/src/nodes/utils/SetNode.d.ts +11 -0
- three/src/nodes/utils/SplitNode.d.ts +1 -1
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +1 -1
- three/src/nodes/utils/SpriteUtils.d.ts +6 -0
- three/src/nodes/utils/{StoargeArrayElementNode.d.ts → StorageArrayElementNode.d.ts} +1 -7
- three/src/nodes/utils/TimerNode.d.ts +1 -1
- three/src/nodes/utils/TriplanarTexturesNode.d.ts +1 -7
- three/src/nodes/utils/UVUtils.d.ts +14 -0
- three/src/nodes/utils/ViewportUtils.d.ts +4 -0
- three/src/objects/BatchedMesh.d.ts +33 -0
- three/src/objects/Group.d.ts +0 -6
- three/src/objects/LOD.d.ts +7 -0
- three/src/renderers/WebGLRenderer.d.ts +2 -12
- three/src/renderers/common/BindGroup.d.ts +8 -1
- three/src/renderers/common/Bindings.d.ts +2 -2
- three/src/renderers/common/BundleGroup.d.ts +10 -0
- three/src/renderers/common/ClippingContext.d.ts +1 -0
- three/src/renderers/common/QuadMesh.d.ts +2 -0
- three/src/renderers/common/RenderBundles.d.ts +3 -3
- three/src/renderers/common/RenderContext.d.ts +2 -0
- three/src/renderers/common/RenderContexts.d.ts +6 -4
- three/src/renderers/common/RenderList.d.ts +2 -1
- three/src/renderers/common/RenderObject.d.ts +19 -1
- three/src/renderers/common/RenderObjects.d.ts +1 -1
- three/src/renderers/common/Renderer.d.ts +24 -5
- three/src/renderers/common/SampledTexture.d.ts +7 -1
- three/src/renderers/common/Textures.d.ts +1 -0
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +56 -0
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +3 -3
- three/src/renderers/common/nodes/Nodes.d.ts +15 -9
- three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +5 -0
- three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +1 -0
- three/src/renderers/webgl/WebGLProperties.d.ts +5 -4
- three/src/renderers/webgpu/WebGPUBackend.d.ts +6 -2
- three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
- three/src/renderers/webgpu/WebGPURenderer.d.ts +5 -1
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +5 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +5 -0
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +2 -2
- three/src/renderers/webxr/WebXRManager.d.ts +0 -2
- three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +0 -16
- three/examples/jsm/loaders/LogLuvLoader.d.ts +0 -19
- three/examples/jsm/loaders/TiltLoader.d.ts +0 -7
- three/examples/jsm/utils/GPUStatsPanel.d.ts +0 -12
- three/examples/jsm/utils/PackedPhongMaterial.d.ts +0 -10
- three/src/nodes/accessors/NormalNode.d.ts +0 -12
- three/src/nodes/accessors/TextureBicubicNode.d.ts +0 -18
- three/src/nodes/accessors/UniformsNode.d.ts +0 -23
- three/src/nodes/core/NodeKeywords.d.ts +0 -17
- three/src/nodes/display/BlendModeNode.d.ts +0 -47
- three/src/nodes/display/ColorAdjustmentNode.d.ts +0 -47
- three/src/nodes/display/ViewportNode.d.ts +0 -31
- three/src/nodes/loaders/NodeMaterialLoader.d.ts +0 -8
- three/src/nodes/loaders/NodeObjectLoader.d.ts +0 -10
- three/src/nodes/materials/NodeMaterial.d.ts +0 -124
- three/src/nodes/math/CondNode.d.ts +0 -22
- three/src/nodes/math/HashNode.d.ts +0 -16
- three/src/nodes/procedural/CheckerNode.d.ts +0 -15
- three/src/nodes/utils/DiscardNode.d.ts +0 -17
- three/src/nodes/utils/PackingNode.d.ts +0 -24
- three/src/nodes/utils/RotateUVNode.d.ts +0 -19
|
@@ -1,49 +1,32 @@
|
|
|
1
|
-
import { Camera,
|
|
1
|
+
import { Camera, Controls, MOUSE, TOUCH, Vector3 } from "three";
|
|
2
2
|
|
|
3
3
|
export interface OrbitControlsEventMap {
|
|
4
|
-
change: {};
|
|
5
|
-
start: {};
|
|
6
|
-
end: {};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Orbit controls allow the camera to orbit around a target.
|
|
11
|
-
* @param object - The camera to be controlled. The camera must not
|
|
12
|
-
* be a child of another object, unless that object is the scene itself.
|
|
13
|
-
* @param domElement - The HTML element used for
|
|
14
|
-
* event listeners.
|
|
15
|
-
*/
|
|
16
|
-
export class OrbitControls extends EventDispatcher<OrbitControlsEventMap> {
|
|
17
|
-
constructor(object: Camera, domElement: HTMLElement);
|
|
18
|
-
|
|
19
4
|
/**
|
|
20
|
-
*
|
|
5
|
+
* Fires when the camera has been transformed by the controls.
|
|
21
6
|
*/
|
|
22
|
-
|
|
7
|
+
change: {};
|
|
23
8
|
|
|
24
9
|
/**
|
|
25
|
-
*
|
|
26
|
-
* This must be passed in the constructor;
|
|
27
|
-
* changing it here will not set up new event listeners.
|
|
10
|
+
* Fires when an interaction was initiated.
|
|
28
11
|
*/
|
|
29
|
-
|
|
12
|
+
start: {};
|
|
30
13
|
|
|
31
14
|
/**
|
|
32
|
-
*
|
|
33
|
-
* @default true
|
|
15
|
+
* Fires when an interaction has finished.
|
|
34
16
|
*/
|
|
35
|
-
|
|
17
|
+
end: {};
|
|
18
|
+
}
|
|
36
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Orbit controls allow the camera to orbit around a target.
|
|
22
|
+
*/
|
|
23
|
+
declare class OrbitControls extends Controls<OrbitControlsEventMap> {
|
|
37
24
|
/**
|
|
38
|
-
* The focus point of the controls, the .object orbits around this.
|
|
39
|
-
*
|
|
40
|
-
* of the controls.
|
|
25
|
+
* The focus point of the controls, the {@link .object} orbits around this. It can be updated manually at any point
|
|
26
|
+
* to change the focus of the controls.
|
|
41
27
|
*/
|
|
42
28
|
target: Vector3;
|
|
43
29
|
|
|
44
|
-
/** @deprecated */
|
|
45
|
-
center: Vector3;
|
|
46
|
-
|
|
47
30
|
/**
|
|
48
31
|
* The focus point of the {@link .minTargetRadius} and {@link .maxTargetRadius} limits. It can be updated manually
|
|
49
32
|
* at any point to change the center of interest for the {@link .target}.
|
|
@@ -51,178 +34,141 @@ export class OrbitControls extends EventDispatcher<OrbitControlsEventMap> {
|
|
|
51
34
|
cursor: Vector3;
|
|
52
35
|
|
|
53
36
|
/**
|
|
54
|
-
* How far you can dolly in ( PerspectiveCamera only ).
|
|
55
|
-
* @default 0
|
|
37
|
+
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is 0.
|
|
56
38
|
*/
|
|
57
39
|
minDistance: number;
|
|
58
40
|
|
|
59
41
|
/**
|
|
60
|
-
* How far you can dolly out ( PerspectiveCamera only ).
|
|
61
|
-
* @default Infinity
|
|
42
|
+
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is Infinity.
|
|
62
43
|
*/
|
|
63
44
|
maxDistance: number;
|
|
64
45
|
|
|
65
46
|
/**
|
|
66
|
-
* How far you can zoom in ( OrthographicCamera only ).
|
|
67
|
-
* @default 0
|
|
47
|
+
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is 0.
|
|
68
48
|
*/
|
|
69
49
|
minZoom: number;
|
|
70
50
|
|
|
71
51
|
/**
|
|
72
|
-
* How far you can zoom out ( OrthographicCamera only ).
|
|
73
|
-
* @default Infinity
|
|
52
|
+
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is Infinity.
|
|
74
53
|
*/
|
|
75
54
|
maxZoom: number;
|
|
76
55
|
|
|
77
56
|
/**
|
|
78
|
-
* How close you can get the target to the 3D {@link .cursor}.
|
|
79
|
-
* @default 0
|
|
57
|
+
* How close you can get the target to the 3D {@link .cursor}. Default is 0.
|
|
80
58
|
*/
|
|
81
59
|
minTargetRadius: number;
|
|
82
60
|
|
|
83
61
|
/**
|
|
84
|
-
* How far you can move the target from the 3D {@link .cursor}.
|
|
85
|
-
* @default Infinity
|
|
62
|
+
* How far you can move the target from the 3D {@link .cursor}. Default is Infinity.
|
|
86
63
|
*/
|
|
87
64
|
maxTargetRadius: number;
|
|
88
65
|
|
|
89
66
|
/**
|
|
90
|
-
* How far you can orbit vertically, lower limit.
|
|
91
|
-
* Range is 0 to Math.PI radians.
|
|
92
|
-
* @default 0
|
|
67
|
+
* How far you can orbit vertically, lower limit. Range is 0 to Math.PI radians, and default is 0.
|
|
93
68
|
*/
|
|
94
69
|
minPolarAngle: number;
|
|
95
70
|
|
|
96
71
|
/**
|
|
97
|
-
* How far you can orbit vertically, upper limit.
|
|
98
|
-
* Range is 0 to Math.PI radians.
|
|
99
|
-
* @default Math.PI.
|
|
72
|
+
* How far you can orbit vertically, upper limit. Range is 0 to Math.PI radians, and default is Math.PI.
|
|
100
73
|
*/
|
|
101
74
|
maxPolarAngle: number;
|
|
102
75
|
|
|
103
76
|
/**
|
|
104
|
-
* How far you can orbit horizontally, lower limit.
|
|
105
|
-
*
|
|
106
|
-
* must be a sub-interval of [ - 2 PI, 2 PI ],
|
|
107
|
-
* with ( max - min < 2 PI ).
|
|
108
|
-
* @default Infinity
|
|
77
|
+
* How far you can orbit horizontally, lower limit. If set, the interval [ min, max ] must be a sub-interval of
|
|
78
|
+
* [ - 2 PI, 2 PI ], with ( max - min < 2 PI ). Default is Infinity.
|
|
109
79
|
*/
|
|
110
80
|
minAzimuthAngle: number;
|
|
111
81
|
|
|
112
82
|
/**
|
|
113
|
-
* How far you can orbit horizontally, upper limit.
|
|
114
|
-
*
|
|
115
|
-
* of [ - 2 PI, 2 PI ], with ( max - min < 2 PI ).
|
|
116
|
-
* @default Infinity
|
|
83
|
+
* How far you can orbit horizontally, upper limit. If set, the interval [ min, max ] must be a sub-interval of
|
|
84
|
+
* [ - 2 PI, 2 PI ], with ( max - min < 2 PI ). Default is Infinity.
|
|
117
85
|
*/
|
|
118
86
|
maxAzimuthAngle: number;
|
|
119
87
|
|
|
120
88
|
/**
|
|
121
|
-
* Set to true to enable damping (inertia), which can
|
|
122
|
-
*
|
|
123
|
-
* Note that if this is enabled, you must call
|
|
124
|
-
* .update () in your animation loop.
|
|
125
|
-
* @default false
|
|
89
|
+
* Set to true to enable damping (inertia), which can be used to give a sense of weight to the controls. Default is
|
|
90
|
+
* false.
|
|
91
|
+
* Note that if this is enabled, you must call {@link .update}() in your animation loop.
|
|
126
92
|
*/
|
|
127
93
|
enableDamping: boolean;
|
|
128
94
|
|
|
129
95
|
/**
|
|
130
|
-
* The damping inertia used if .enableDamping is set to true.
|
|
131
|
-
* Note that for this to work,
|
|
132
|
-
* you must call .update () in your animation loop.
|
|
133
|
-
* @default 0.05
|
|
96
|
+
* The damping inertia used if .enableDamping is set to true. Default is `0.05`.
|
|
97
|
+
* Note that for this to work, you must call {@link .update}() in your animation loop.
|
|
134
98
|
*/
|
|
135
99
|
dampingFactor: number;
|
|
136
100
|
|
|
137
101
|
/**
|
|
138
102
|
* Enable or disable zooming (dollying) of the camera.
|
|
139
|
-
* @default true
|
|
140
103
|
*/
|
|
141
104
|
enableZoom: boolean;
|
|
142
105
|
|
|
143
106
|
/**
|
|
144
|
-
* Speed of zooming / dollying.
|
|
145
|
-
* @default 1
|
|
107
|
+
* Speed of zooming / dollying. Default is 1.
|
|
146
108
|
*/
|
|
147
109
|
zoomSpeed: number;
|
|
148
110
|
|
|
149
111
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Enable or disable horizontal and
|
|
157
|
-
* vertical rotation of the camera.
|
|
158
|
-
* Note that it is possible to disable a single axis
|
|
159
|
-
* by setting the min and max of the polar angle or
|
|
160
|
-
* azimuth angle to the same value, which will cause
|
|
161
|
-
* the vertical or horizontal rotation to be fixed at that value.
|
|
162
|
-
* @default true
|
|
112
|
+
* Enable or disable horizontal and vertical rotation of the camera. Default is true.
|
|
113
|
+
* Note that it is possible to disable a single axis by setting the min and max of the
|
|
114
|
+
* [polar angle]{@link .minPolarAngle} or [azimuth angle]{@link .minAzimuthAngle} to the same value, which will
|
|
115
|
+
* cause the vertical or horizontal rotation to be fixed at that value.
|
|
163
116
|
*/
|
|
164
117
|
enableRotate: boolean;
|
|
165
118
|
|
|
166
119
|
/**
|
|
167
|
-
* Speed of rotation.
|
|
168
|
-
* @default 1
|
|
120
|
+
* Speed of rotation. Default is 1.
|
|
169
121
|
*/
|
|
170
122
|
rotateSpeed: number;
|
|
171
123
|
|
|
172
124
|
/**
|
|
173
|
-
* Enable or disable camera panning.
|
|
174
|
-
* @default true
|
|
125
|
+
* Enable or disable camera panning. Default is true.
|
|
175
126
|
*/
|
|
176
127
|
enablePan: boolean;
|
|
177
128
|
|
|
178
129
|
/**
|
|
179
|
-
* Speed of panning.
|
|
180
|
-
* @default 1
|
|
130
|
+
* Speed of panning. Default is 1.
|
|
181
131
|
*/
|
|
182
132
|
panSpeed: number;
|
|
183
133
|
|
|
184
134
|
/**
|
|
185
|
-
* Defines how the camera's position is translated when panning.
|
|
186
|
-
*
|
|
187
|
-
* the camera pans in the plane orthogonal to the camera's
|
|
188
|
-
* up direction. Default is true for OrbitControls; false for MapControls.
|
|
189
|
-
* @default true
|
|
135
|
+
* Defines how the camera's position is translated when panning. If true, the camera pans in screen space.
|
|
136
|
+
* Otherwise, the camera pans in the plane orthogonal to the camera's up direction. Default is `true`.
|
|
190
137
|
*/
|
|
191
138
|
screenSpacePanning: boolean;
|
|
192
139
|
|
|
193
140
|
/**
|
|
194
|
-
* How fast to pan the camera when the keyboard is used.
|
|
195
|
-
* Default is 7.0 pixels per keypress.
|
|
196
|
-
* @default 7
|
|
141
|
+
* How fast to pan the camera when the keyboard is used. Default is 7.0 pixels per keypress.
|
|
197
142
|
*/
|
|
198
143
|
keyPanSpeed: number;
|
|
199
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Setting this property to `true` allows to zoom to the cursor's position. Default is `false`.
|
|
147
|
+
*/
|
|
148
|
+
zoomToCursor: boolean;
|
|
149
|
+
|
|
200
150
|
/**
|
|
201
151
|
* Set to true to automatically rotate around the target.
|
|
202
|
-
* Note that if this is enabled, you must call .update() in your animation loop. If you want the auto-rotate speed
|
|
152
|
+
* Note that if this is enabled, you must call {@link .update}() in your animation loop. If you want the auto-rotate speed
|
|
203
153
|
* to be independent of the frame rate (the refresh rate of the display), you must pass the time `deltaTime`, in
|
|
204
|
-
* seconds, to .update().
|
|
154
|
+
* seconds, to {@link .update}().
|
|
205
155
|
*/
|
|
206
156
|
autoRotate: boolean;
|
|
207
157
|
|
|
208
158
|
/**
|
|
209
|
-
* How fast to rotate around the target if .autoRotate is true.
|
|
210
|
-
*
|
|
211
|
-
* Note that if .autoRotate is enabled, you must call
|
|
212
|
-
* .update () in your animation loop.
|
|
213
|
-
* @default 2
|
|
159
|
+
* How fast to rotate around the target if {@link .autoRotate} is true. Default is 2.0, which equates to 30 seconds
|
|
160
|
+
* per orbit at 60fps.
|
|
161
|
+
* Note that if {@link .autoRotate} is enabled, you must call {@link .update}() in your animation loop.
|
|
214
162
|
*/
|
|
215
163
|
autoRotateSpeed: number;
|
|
216
164
|
|
|
217
165
|
/**
|
|
218
|
-
* This object contains references to the keycodes for controlling
|
|
219
|
-
* camera panning. Default is the 4 arrow keys.
|
|
166
|
+
* This object contains references to the keycodes for controlling camera panning. Default is the 4 arrow keys.
|
|
220
167
|
*/
|
|
221
168
|
keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string };
|
|
222
169
|
|
|
223
170
|
/**
|
|
224
|
-
* This object contains references to the mouse actions used
|
|
225
|
-
* by the controls.
|
|
171
|
+
* This object contains references to the mouse actions used by the controls.
|
|
226
172
|
*/
|
|
227
173
|
mouseButtons: {
|
|
228
174
|
LEFT?: MOUSE | null | undefined;
|
|
@@ -231,74 +177,75 @@ export class OrbitControls extends EventDispatcher<OrbitControlsEventMap> {
|
|
|
231
177
|
};
|
|
232
178
|
|
|
233
179
|
/**
|
|
234
|
-
* This object contains references to the touch actions used by
|
|
235
|
-
* the controls.
|
|
180
|
+
* This object contains references to the touch actions used by the controls.
|
|
236
181
|
*/
|
|
237
182
|
touches: { ONE?: TOUCH | null | undefined; TWO?: TOUCH | null | undefined };
|
|
238
183
|
|
|
239
184
|
/**
|
|
240
|
-
* Used internally by the .saveState and .reset methods.
|
|
185
|
+
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
|
241
186
|
*/
|
|
242
187
|
target0: Vector3;
|
|
243
188
|
|
|
244
189
|
/**
|
|
245
|
-
* Used internally by the .saveState and .reset methods.
|
|
190
|
+
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
|
246
191
|
*/
|
|
247
192
|
position0: Vector3;
|
|
248
193
|
|
|
249
194
|
/**
|
|
250
|
-
* Used internally by the .saveState and .reset methods.
|
|
195
|
+
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
|
251
196
|
*/
|
|
252
197
|
zoom0: number;
|
|
253
198
|
|
|
254
199
|
/**
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
200
|
+
* @param object The camera to be controlled. The camera must not be a child of another object, unless that object
|
|
201
|
+
* is the scene itself.
|
|
202
|
+
* @param domElement The HTML element used for event listeners. (optional)
|
|
258
203
|
*/
|
|
259
|
-
|
|
204
|
+
constructor(object: Camera, domElement?: HTMLElement | null);
|
|
260
205
|
|
|
261
206
|
/**
|
|
262
|
-
*
|
|
263
|
-
* is a recommended argument for using this method.
|
|
264
|
-
* @param domElement
|
|
207
|
+
* Get the current vertical rotation, in radians.
|
|
265
208
|
*/
|
|
266
|
-
|
|
209
|
+
getPolarAngle(): number;
|
|
267
210
|
|
|
268
211
|
/**
|
|
269
|
-
*
|
|
212
|
+
* Get the current horizontal rotation, in radians.
|
|
270
213
|
*/
|
|
271
|
-
|
|
214
|
+
getAzimuthalAngle(): number;
|
|
272
215
|
|
|
273
216
|
/**
|
|
274
|
-
*
|
|
275
|
-
* recovered with .reset.
|
|
217
|
+
* Returns the distance from the camera to the target.
|
|
276
218
|
*/
|
|
277
|
-
|
|
219
|
+
getDistance(): number;
|
|
278
220
|
|
|
279
221
|
/**
|
|
280
|
-
*
|
|
281
|
-
*
|
|
222
|
+
* Adds key event listeners to the given DOM element. `window` is a recommended argument for using this method.
|
|
223
|
+
* @param domElement
|
|
282
224
|
*/
|
|
283
|
-
|
|
225
|
+
listenToKeyEvents(domElement: HTMLElement | Window): void;
|
|
284
226
|
|
|
285
227
|
/**
|
|
286
|
-
*
|
|
228
|
+
* Removes the key event listener previously defined with {@link .listenToKeyEvents}().
|
|
287
229
|
*/
|
|
288
|
-
|
|
230
|
+
stopListenToKeyEvents(): void;
|
|
289
231
|
|
|
290
232
|
/**
|
|
291
|
-
*
|
|
233
|
+
* Save the current state of the controls. This can later be recovered with {@link .reset}.
|
|
292
234
|
*/
|
|
293
|
-
|
|
235
|
+
saveState(): void;
|
|
294
236
|
|
|
295
237
|
/**
|
|
296
|
-
*
|
|
238
|
+
* Reset the controls to their state from either the last time the {@link .saveState} was called, or the initial
|
|
239
|
+
* state.
|
|
297
240
|
*/
|
|
298
|
-
|
|
241
|
+
reset(): void;
|
|
299
242
|
|
|
300
243
|
/**
|
|
301
|
-
*
|
|
244
|
+
* Update the controls. Must be called after any manual changes to the camera's transform, or in the update loop if
|
|
245
|
+
* {@link .autoRotate} or {@link .enableDamping} are set. `deltaTime`, in seconds, is optional, and is only required
|
|
246
|
+
* if you want the auto-rotate speed to be independent of the frame rate (the refresh rate of the display).
|
|
302
247
|
*/
|
|
303
|
-
|
|
248
|
+
update(deltaTime?: number | null): boolean;
|
|
304
249
|
}
|
|
250
|
+
|
|
251
|
+
export { OrbitControls };
|
|
@@ -1,27 +1,86 @@
|
|
|
1
|
-
import { Camera,
|
|
1
|
+
import { Camera, Controls, Vector3 } from "three";
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export interface PointerLockControlsEventMap {
|
|
4
|
+
/**
|
|
5
|
+
* Fires when the user moves the mouse.
|
|
6
|
+
*/
|
|
7
|
+
change: {};
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Fires when the pointer lock status is "locked" (in other words: the mouse is captured).
|
|
11
|
+
*/
|
|
12
|
+
lock: {};
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Fires when the pointer lock status is "unlocked" (in other words: the mouse is not captured anymore).
|
|
16
|
+
*/
|
|
17
|
+
unlock: {};
|
|
18
|
+
}
|
|
10
19
|
|
|
20
|
+
/**
|
|
21
|
+
* The implementation of this class is based on the [Pointer Lock API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API}.
|
|
22
|
+
* {@link PointerLockControls} is a perfect choice for first person 3D games.
|
|
23
|
+
*/
|
|
24
|
+
declare class PointerLockControls extends Controls<PointerLockControlsEventMap> {
|
|
25
|
+
/**
|
|
26
|
+
* Whether or not the controls are locked.
|
|
27
|
+
*/
|
|
11
28
|
isLocked: boolean;
|
|
12
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Camera pitch, lower limit. Range is 0 to Math.PI radians. Default is 0.
|
|
32
|
+
*/
|
|
13
33
|
minPolarAngle: number;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Camera pitch, upper limit. Range is 0 to Math.PI radians. Default is Math.PI.
|
|
37
|
+
*/
|
|
14
38
|
maxPolarAngle: number;
|
|
15
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Multiplier for how much the pointer movement influences the camera rotation. Default is 1.
|
|
42
|
+
*/
|
|
16
43
|
pointerSpeed: number;
|
|
17
44
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new instance of {@link PointerLockControls}.
|
|
47
|
+
* @param camera The camera of the rendered scene.
|
|
48
|
+
* @param domElement The HTML element used for event listeners.
|
|
49
|
+
*/
|
|
50
|
+
constructor(camera: Camera, domElement?: HTMLElement | null);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated getObject() has been deprecated. Use controls.object instead.
|
|
54
|
+
*/
|
|
21
55
|
getObject(): Camera;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns the look direction of the camera.
|
|
59
|
+
* @param v The target vector.
|
|
60
|
+
*/
|
|
22
61
|
getDirection(v: Vector3): Vector3;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Moves the camera forward parallel to the xz-plane. Assumes camera.up is y-up.
|
|
65
|
+
* @param distance The signed distance.
|
|
66
|
+
*/
|
|
23
67
|
moveForward(distance: number): void;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Moves the camera sidewards parallel to the xz-plane.
|
|
71
|
+
* @param distance The signed distance.
|
|
72
|
+
*/
|
|
24
73
|
moveRight(distance: number): void;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Activates the pointer lock.
|
|
77
|
+
*/
|
|
25
78
|
lock(): void;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Exits the pointer lock.
|
|
82
|
+
*/
|
|
26
83
|
unlock(): void;
|
|
27
84
|
}
|
|
85
|
+
|
|
86
|
+
export { PointerLockControls };
|
|
@@ -1,58 +1,142 @@
|
|
|
1
|
-
import { Camera,
|
|
1
|
+
import { Camera, Controls, MOUSE, Vector3 } from "three";
|
|
2
2
|
|
|
3
3
|
export interface TrackballControlsEventMap {
|
|
4
|
+
/**
|
|
5
|
+
* Fires when the camera has been transformed by the controls.
|
|
6
|
+
*/
|
|
4
7
|
change: {};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Fires when an interaction (e.g. touch) was initiated.
|
|
11
|
+
*/
|
|
5
12
|
start: {};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fires when an interaction has finished.
|
|
16
|
+
*/
|
|
6
17
|
end: {};
|
|
7
18
|
}
|
|
8
19
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
/**
|
|
21
|
+
* TrackballControls is similar to {@link OrbitControls}. However, it does not maintain a constant camera
|
|
22
|
+
* [up]{@link Object3D.up} vector. That means if the camera orbits over the “north” and “south” poles, it does not flip
|
|
23
|
+
* to stay "right side up".
|
|
24
|
+
*/
|
|
25
|
+
declare class TrackballControls extends Controls<TrackballControlsEventMap> {
|
|
26
|
+
/**
|
|
27
|
+
* Represents the properties of the screen. Automatically set when {@link .handleResize}() is called.
|
|
28
|
+
* - left: Represents the offset in pixels to the screen's left boundary.
|
|
29
|
+
* - top: Represents the offset in pixels to the screen's top boundary.
|
|
30
|
+
* - width: Represents the screen width in pixels.
|
|
31
|
+
* - height: Represents the screen height in pixels.
|
|
32
|
+
*/
|
|
17
33
|
screen: { left: number; top: number; width: number; height: number };
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The rotation speed. Default is `1.0`.
|
|
37
|
+
*/
|
|
18
38
|
rotateSpeed: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The zoom speed. Default is `1.2`.
|
|
42
|
+
*/
|
|
19
43
|
zoomSpeed: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The pan speed. Default is `0.3`.
|
|
47
|
+
*/
|
|
20
48
|
panSpeed: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Whether or not rotation is disabled. Default is `false`.
|
|
52
|
+
*/
|
|
21
53
|
noRotate: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Whether or not zooming is disabled. Default is `false`.
|
|
57
|
+
*/
|
|
22
58
|
noZoom: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Whether or not panning is disabled. Default is `false`.
|
|
62
|
+
*/
|
|
23
63
|
noPan: boolean;
|
|
24
|
-
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Whether or not damping is disabled. Default is `false`.
|
|
67
|
+
*/
|
|
25
68
|
staticMoving: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Defines the intensity of damping. Only considered if {@link .staticMoving} is set to `false`. Default is `0.2`.
|
|
72
|
+
*/
|
|
26
73
|
dynamicDampingFactor: number;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is *0*.
|
|
77
|
+
*/
|
|
27
78
|
minDistance: number;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is `Infinity`.
|
|
82
|
+
*/
|
|
28
83
|
maxDistance: number;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is `Infinity`.
|
|
87
|
+
*/
|
|
29
88
|
minZoom: number;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is *0*.
|
|
92
|
+
*/
|
|
30
93
|
maxZoom: number;
|
|
31
|
-
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* This array holds keycodes for controlling interactions.
|
|
97
|
+
* - When the first defined key is pressed, all mouse interactions (left, middle, right) performs orbiting.
|
|
98
|
+
* - When the second defined key is pressed, all mouse interactions (left, middle, right) performs zooming.
|
|
99
|
+
* - When the third defined key is pressed, all mouse interactions (left, middle, right) performs panning.
|
|
100
|
+
*
|
|
101
|
+
* Default is *KeyA, KeyS, KeyD* which represents A, S, D.
|
|
102
|
+
*/
|
|
103
|
+
keys: [string, string, string];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* This object contains references to the mouse actions used by the controls.
|
|
107
|
+
* - .LEFT is assigned with `THREE.MOUSE.ROTATE`
|
|
108
|
+
* - .MIDDLE is assigned with `THREE.MOUSE.ZOOM`
|
|
109
|
+
* - .RIGHT is assigned with `THREE.MOUSE.PAN`
|
|
110
|
+
*/
|
|
32
111
|
mouseButtons: {
|
|
33
112
|
LEFT?: MOUSE | null | undefined;
|
|
34
113
|
MIDDLE?: MOUSE | null | undefined;
|
|
35
114
|
RIGHT?: MOUSE | null | undefined;
|
|
36
115
|
};
|
|
37
116
|
|
|
117
|
+
/**
|
|
118
|
+
* The focus point of the controls.
|
|
119
|
+
*/
|
|
38
120
|
target: Vector3;
|
|
39
|
-
position0: Vector3;
|
|
40
|
-
target0: Vector3;
|
|
41
|
-
up0: Vector3;
|
|
42
|
-
|
|
43
|
-
update(): void;
|
|
44
|
-
|
|
45
|
-
reset(): void;
|
|
46
121
|
|
|
47
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Creates a new instance of TrackballControls.
|
|
124
|
+
* @param camera The camera of the rendered scene.
|
|
125
|
+
* @param domElement The HTML element used for event listeners. (optional)
|
|
126
|
+
*/
|
|
127
|
+
constructor(camera: Camera, domElement?: HTMLElement | null);
|
|
48
128
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
panCamera(): void;
|
|
129
|
+
/**
|
|
130
|
+
* Should be called if the application window is resized.
|
|
131
|
+
*/
|
|
132
|
+
handleResize(): void;
|
|
54
133
|
|
|
55
|
-
|
|
134
|
+
update(): void;
|
|
56
135
|
|
|
57
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Resets the controls to its initial state.
|
|
138
|
+
*/
|
|
139
|
+
reset(): void;
|
|
58
140
|
}
|
|
141
|
+
|
|
142
|
+
export { TrackballControls };
|