@types/three 0.157.1 → 0.158.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.
Files changed (246) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +290 -0
  3. three/examples/jsm/animation/CCDIKSolver.d.ts +30 -0
  4. three/examples/jsm/animation/MMDAnimationHelper.d.ts +105 -0
  5. three/examples/jsm/animation/MMDPhysics.d.ts +124 -0
  6. three/examples/jsm/cameras/CinematicCamera.d.ts +41 -0
  7. three/examples/jsm/capabilities/WebGL.d.ts +9 -0
  8. three/examples/jsm/controls/OrbitControls.d.ts +304 -0
  9. three/examples/jsm/controls/TrackballControls.d.ts +58 -0
  10. three/examples/jsm/effects/OutlineEffect.d.ts +36 -0
  11. three/examples/jsm/environments/RoomEnvironment.d.ts +6 -0
  12. three/examples/jsm/exporters/PLYExporter.d.ts +30 -0
  13. three/examples/jsm/exporters/STLExporter.d.ts +21 -0
  14. three/examples/jsm/helpers/RectAreaLightHelper.d.ts +10 -0
  15. three/examples/jsm/helpers/ViewHelper.d.ts +15 -0
  16. three/examples/jsm/libs/fflate.module.d.ts +1 -0
  17. three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -0
  18. three/examples/jsm/libs/tween.module.d.ts +219 -0
  19. three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +3 -0
  20. three/examples/jsm/lines/Line2.d.ts +11 -0
  21. three/examples/jsm/lines/LineGeometry.d.ts +10 -0
  22. three/examples/jsm/lines/LineMaterial.d.ts +31 -0
  23. three/examples/jsm/lines/LineSegments2.d.ts +14 -0
  24. three/examples/jsm/lines/LineSegmentsGeometry.d.ts +23 -0
  25. three/examples/jsm/loaders/DDSLoader.d.ts +16 -0
  26. three/examples/jsm/loaders/DRACOLoader.d.ts +19 -0
  27. three/examples/jsm/loaders/GLTFLoader.d.ts +147 -0
  28. three/examples/jsm/loaders/KTX2Loader.d.ts +17 -0
  29. three/examples/jsm/loaders/LDrawLoader.d.ts +19 -0
  30. three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
  31. three/examples/jsm/loaders/MMDLoader.d.ts +56 -0
  32. three/examples/jsm/loaders/MTLLoader.d.ts +104 -0
  33. three/examples/jsm/loaders/OBJLoader.d.ts +10 -0
  34. three/examples/jsm/loaders/PCDLoader.d.ts +8 -0
  35. three/examples/jsm/loaders/RGBELoader.d.ts +19 -0
  36. three/examples/jsm/loaders/SVGLoader.d.ts +68 -0
  37. three/examples/jsm/loaders/TGALoader.d.ts +7 -0
  38. three/examples/jsm/loaders/TTFLoader.d.ts +8 -0
  39. three/examples/jsm/loaders/USDZLoader.d.ts +11 -0
  40. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
  41. three/examples/jsm/math/Capsule.d.ts +0 -1
  42. three/examples/jsm/misc/MD2CharacterComplex.d.ts +9 -1
  43. three/examples/jsm/nodes/Nodes.d.ts +149 -0
  44. three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
  45. three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
  46. three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
  47. three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +13 -0
  48. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
  49. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
  50. three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
  51. three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
  52. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
  53. three/examples/jsm/nodes/accessors/NormalNode.d.ts +12 -0
  54. three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
  55. three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
  56. three/examples/jsm/nodes/accessors/PositionNode.d.ts +21 -0
  57. three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
  58. three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
  59. three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
  60. three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
  61. three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
  62. three/examples/jsm/nodes/accessors/TextureNode.d.ts +14 -0
  63. three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
  64. three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
  65. three/examples/jsm/nodes/code/CodeNode.d.ts +15 -0
  66. three/examples/jsm/nodes/code/ExpressionNode.d.ts +7 -0
  67. three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -0
  68. three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
  69. three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
  70. three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
  71. three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
  72. three/examples/jsm/nodes/core/CacheNode.d.ts +10 -0
  73. three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
  74. three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
  75. three/examples/jsm/nodes/core/InputNode.d.ts +16 -0
  76. three/examples/jsm/nodes/core/Node.d.ts +31 -0
  77. three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
  78. three/examples/jsm/nodes/core/NodeBuilder.d.ts +138 -0
  79. three/examples/jsm/nodes/core/NodeCache.d.ts +9 -0
  80. three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
  81. three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
  82. three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
  83. three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
  84. three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
  85. three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
  86. three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
  87. three/examples/jsm/nodes/core/NodeUtils.d.ts +13 -0
  88. three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
  89. three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
  90. three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
  91. three/examples/jsm/nodes/core/StackNode.d.ts +11 -0
  92. three/examples/jsm/nodes/core/TempNode.d.ts +11 -0
  93. three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
  94. three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
  95. three/examples/jsm/nodes/core/VaryingNode.d.ts +8 -0
  96. three/examples/jsm/nodes/core/constants.d.ts +78 -0
  97. three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
  98. three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
  99. three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +18 -0
  100. three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
  101. three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
  102. three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
  103. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
  104. three/examples/jsm/nodes/display/ViewportNode.d.ts +23 -0
  105. three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
  106. three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
  107. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
  108. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
  109. three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
  110. three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
  111. three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
  112. three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
  113. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
  114. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
  115. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
  116. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
  117. three/examples/jsm/nodes/geometry/RangeNode.d.ts +13 -0
  118. three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
  119. three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
  120. three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
  121. three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
  122. three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
  123. three/examples/jsm/nodes/lighting/LightUtils.d.ts +4 -0
  124. three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
  125. three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
  126. three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
  127. three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
  128. three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
  129. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +14 -0
  130. three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
  131. three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +9 -0
  132. three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +9 -0
  133. three/examples/jsm/nodes/materials/Materials.d.ts +17 -0
  134. three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +10 -0
  135. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
  136. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +18 -0
  137. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +38 -0
  138. three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
  139. three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
  140. three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
  141. three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
  142. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
  143. three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
  144. three/examples/jsm/nodes/math/MathNode.d.ts +115 -0
  145. three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
  146. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
  147. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +156 -0
  148. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +310 -0
  149. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +166 -0
  150. three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
  151. three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
  152. three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
  153. three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
  154. three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
  155. three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +11 -0
  156. three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
  157. three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
  158. three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
  159. three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +8 -0
  160. three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
  161. three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
  162. three/examples/jsm/nodes/utils/TimerNode.d.ts +19 -0
  163. three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
  164. three/examples/jsm/objects/Reflector.d.ts +29 -0
  165. three/examples/jsm/objects/ReflectorForSSRPass.d.ts +1 -0
  166. three/examples/jsm/objects/Refractor.d.ts +2 -1
  167. three/examples/jsm/physics/AmmoPhysics.d.ts +2 -1
  168. three/examples/jsm/physics/RapierPhysics.d.ts +2 -1
  169. three/examples/jsm/postprocessing/EffectComposer.d.ts +31 -0
  170. three/examples/jsm/postprocessing/Pass.d.ts +31 -0
  171. three/examples/jsm/postprocessing/SavePass.d.ts +12 -0
  172. three/examples/jsm/postprocessing/ShaderPass.d.ts +11 -0
  173. three/examples/jsm/renderers/CSS3DRenderer.d.ts +26 -0
  174. three/examples/jsm/renderers/SVGRenderer.d.ts +2 -1
  175. three/examples/jsm/renderers/common/Backend.d.ts +15 -0
  176. three/examples/jsm/renderers/common/Info.d.ts +15 -0
  177. three/examples/jsm/renderers/common/Renderer.d.ts +42 -0
  178. three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +17 -0
  179. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +37 -0
  180. three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
  181. three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +9 -0
  182. three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +11 -0
  183. three/examples/jsm/shaders/AfterimageShader.d.ts +1 -0
  184. three/examples/jsm/shaders/BasicShader.d.ts +1 -0
  185. three/examples/jsm/shaders/BlendShader.d.ts +1 -0
  186. three/examples/jsm/shaders/BokehShader.d.ts +1 -0
  187. three/examples/jsm/shaders/BokehShader2.d.ts +44 -0
  188. three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -0
  189. three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -0
  190. three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -0
  191. three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -0
  192. three/examples/jsm/shaders/FXAAShader.d.ts +1 -0
  193. three/examples/jsm/shaders/FocusShader.d.ts +1 -0
  194. three/examples/jsm/shaders/FreiChenShader.d.ts +1 -0
  195. three/examples/jsm/shaders/GodRaysShader.d.ts +4 -0
  196. three/examples/jsm/shaders/HalftoneShader.d.ts +1 -0
  197. three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -0
  198. three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -0
  199. three/examples/jsm/shaders/KaleidoShader.d.ts +1 -0
  200. three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -0
  201. three/examples/jsm/shaders/LuminosityShader.d.ts +1 -0
  202. three/examples/jsm/shaders/MirrorShader.d.ts +1 -0
  203. three/examples/jsm/shaders/NormalMapShader.d.ts +1 -0
  204. three/examples/jsm/shaders/OutputShader.d.ts +1 -0
  205. three/examples/jsm/shaders/SAOShader.d.ts +1 -0
  206. three/examples/jsm/shaders/SMAAShader.d.ts +3 -0
  207. three/examples/jsm/shaders/SSAOShader.d.ts +3 -0
  208. three/examples/jsm/shaders/SSRShader.d.ts +3 -0
  209. three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -0
  210. three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -0
  211. three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -0
  212. three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -0
  213. three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -0
  214. three/examples/jsm/shaders/VelocityShader.d.ts +14 -0
  215. three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -0
  216. three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -0
  217. three/examples/jsm/utils/GPUStatsPanel.d.ts +12 -0
  218. three/examples/jsm/utils/GeometryUtils.d.ts +25 -0
  219. three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
  220. three/examples/jsm/webxr/VRButton.d.ts +5 -0
  221. three/examples/jsm/webxr/XRButton.d.ts +6 -0
  222. three/examples/jsm/webxr/XRControllerModelFactory.d.ts +21 -0
  223. three/examples/jsm/webxr/XREstimatedLight.d.ts +32 -0
  224. three/examples/jsm/webxr/XRHandMeshModel.d.ts +11 -0
  225. three/examples/jsm/webxr/XRHandModelFactory.d.ts +25 -0
  226. three/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +24 -0
  227. three/package.json +3 -2
  228. three/src/cameras/CubeCamera.d.ts +1 -2
  229. three/src/constants.d.ts +21 -10
  230. three/src/core/Object3D.d.ts +4 -4
  231. three/src/core/Raycaster.d.ts +1 -0
  232. three/src/extras/Earcut.d.ts +15 -0
  233. three/src/extras/core/Curve.d.ts +1 -1
  234. three/src/geometries/CapsuleGeometry.d.ts +1 -1
  235. three/src/helpers/AxesHelper.d.ts +2 -2
  236. three/src/helpers/Box3Helper.d.ts +2 -2
  237. three/src/lights/Light.d.ts +1 -2
  238. three/src/materials/Material.d.ts +20 -2
  239. three/src/materials/MeshPhysicalMaterial.d.ts +8 -6
  240. three/src/math/ColorManagement.d.ts +1 -1
  241. three/src/math/Matrix4.d.ts +2 -1
  242. three/src/objects/SkinnedMesh.d.ts +9 -8
  243. three/src/renderers/WebGLRenderer.d.ts +12 -2
  244. three/src/scenes/Scene.d.ts +2 -2
  245. three/src/textures/DepthTexture.d.ts +3 -3
  246. three/src/textures/Texture.d.ts +2 -2
@@ -0,0 +1,304 @@
1
+ import { Camera, EventDispatcher, MOUSE, TOUCH, Vector3 } from '../../../src/Three.js';
2
+
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
+ /**
20
+ * The camera being controlled.
21
+ */
22
+ object: Camera;
23
+
24
+ /**
25
+ * The HTMLElement used to listen for mouse / touch events.
26
+ * This must be passed in the constructor;
27
+ * changing it here will not set up new event listeners.
28
+ */
29
+ domElement: HTMLElement | Document;
30
+
31
+ /**
32
+ * When set to `false`, the controls will not respond to user input.
33
+ * @default true
34
+ */
35
+ enabled: boolean;
36
+
37
+ /**
38
+ * The focus point of the controls, the .object orbits around this.
39
+ * It can be updated manually at any point to change the focus
40
+ * of the controls.
41
+ */
42
+ target: Vector3;
43
+
44
+ /** @deprecated */
45
+ center: Vector3;
46
+
47
+ /**
48
+ * The focus point of the {@link .minTargetRadius} and {@link .maxTargetRadius} limits. It can be updated manually
49
+ * at any point to change the center of interest for the {@link .target}.
50
+ */
51
+ cursor: Vector3;
52
+
53
+ /**
54
+ * How far you can dolly in ( PerspectiveCamera only ).
55
+ * @default 0
56
+ */
57
+ minDistance: number;
58
+
59
+ /**
60
+ * How far you can dolly out ( PerspectiveCamera only ).
61
+ * @default Infinity
62
+ */
63
+ maxDistance: number;
64
+
65
+ /**
66
+ * How far you can zoom in ( OrthographicCamera only ).
67
+ * @default 0
68
+ */
69
+ minZoom: number;
70
+
71
+ /**
72
+ * How far you can zoom out ( OrthographicCamera only ).
73
+ * @default Infinity
74
+ */
75
+ maxZoom: number;
76
+
77
+ /**
78
+ * How close you can get the target to the 3D {@link .cursor}.
79
+ * @default 0
80
+ */
81
+ minTargetRadius: number;
82
+
83
+ /**
84
+ * How far you can move the target from the 3D {@link .cursor}.
85
+ * @default Infinity
86
+ */
87
+ maxTargetRadius: number;
88
+
89
+ /**
90
+ * How far you can orbit vertically, lower limit.
91
+ * Range is 0 to Math.PI radians.
92
+ * @default 0
93
+ */
94
+ minPolarAngle: number;
95
+
96
+ /**
97
+ * How far you can orbit vertically, upper limit.
98
+ * Range is 0 to Math.PI radians.
99
+ * @default Math.PI.
100
+ */
101
+ maxPolarAngle: number;
102
+
103
+ /**
104
+ * How far you can orbit horizontally, lower limit.
105
+ * If set, the interval [ min, max ]
106
+ * must be a sub-interval of [ - 2 PI, 2 PI ],
107
+ * with ( max - min < 2 PI ).
108
+ * @default Infinity
109
+ */
110
+ minAzimuthAngle: number;
111
+
112
+ /**
113
+ * How far you can orbit horizontally, upper limit.
114
+ * If set, the interval [ min, max ] must be a sub-interval
115
+ * of [ - 2 PI, 2 PI ], with ( max - min < 2 PI ).
116
+ * @default Infinity
117
+ */
118
+ maxAzimuthAngle: number;
119
+
120
+ /**
121
+ * Set to true to enable damping (inertia), which can
122
+ * be used to give a sense of weight to the controls.
123
+ * Note that if this is enabled, you must call
124
+ * .update () in your animation loop.
125
+ * @default false
126
+ */
127
+ enableDamping: boolean;
128
+
129
+ /**
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
134
+ */
135
+ dampingFactor: number;
136
+
137
+ /**
138
+ * Enable or disable zooming (dollying) of the camera.
139
+ * @default true
140
+ */
141
+ enableZoom: boolean;
142
+
143
+ /**
144
+ * Speed of zooming / dollying.
145
+ * @default 1
146
+ */
147
+ zoomSpeed: number;
148
+
149
+ /**
150
+ * Setting this property to `true` allows to zoom to the cursor's position.
151
+ * @default false
152
+ */
153
+ zoomToCursor: boolean;
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
163
+ */
164
+ enableRotate: boolean;
165
+
166
+ /**
167
+ * Speed of rotation.
168
+ * @default 1
169
+ */
170
+ rotateSpeed: number;
171
+
172
+ /**
173
+ * Enable or disable camera panning.
174
+ * @default true
175
+ */
176
+ enablePan: boolean;
177
+
178
+ /**
179
+ * Speed of panning.
180
+ * @default 1
181
+ */
182
+ panSpeed: number;
183
+
184
+ /**
185
+ * Defines how the camera's position is translated when panning.
186
+ * If true, the camera pans in screen space. Otherwise,
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
190
+ */
191
+ screenSpacePanning: boolean;
192
+
193
+ /**
194
+ * How fast to pan the camera when the keyboard is used.
195
+ * Default is 7.0 pixels per keypress.
196
+ * @default 7
197
+ */
198
+ keyPanSpeed: number;
199
+
200
+ /**
201
+ * 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
203
+ * to be independent of the frame rate (the refresh rate of the display), you must pass the time `deltaTime`, in
204
+ * seconds, to .update().
205
+ */
206
+ autoRotate: boolean;
207
+
208
+ /**
209
+ * How fast to rotate around the target if .autoRotate is true.
210
+ * Default is 2.0, which equates to 30 seconds per orbit at 60fps.
211
+ * Note that if .autoRotate is enabled, you must call
212
+ * .update () in your animation loop.
213
+ * @default 2
214
+ */
215
+ autoRotateSpeed: number;
216
+
217
+ /**
218
+ * This object contains references to the keycodes for controlling
219
+ * camera panning. Default is the 4 arrow keys.
220
+ */
221
+ keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string };
222
+
223
+ /**
224
+ * This object contains references to the mouse actions used
225
+ * by the controls.
226
+ */
227
+ mouseButtons: {
228
+ LEFT?: MOUSE | null | undefined;
229
+ MIDDLE?: MOUSE | null | undefined;
230
+ RIGHT?: MOUSE | null | undefined;
231
+ };
232
+
233
+ /**
234
+ * This object contains references to the touch actions used by
235
+ * the controls.
236
+ */
237
+ touches: { ONE?: TOUCH | null | undefined; TWO?: TOUCH | null | undefined };
238
+
239
+ /**
240
+ * Used internally by the .saveState and .reset methods.
241
+ */
242
+ target0: Vector3;
243
+
244
+ /**
245
+ * Used internally by the .saveState and .reset methods.
246
+ */
247
+ position0: Vector3;
248
+
249
+ /**
250
+ * Used internally by the .saveState and .reset methods.
251
+ */
252
+ zoom0: number;
253
+
254
+ /**
255
+ * Update the controls. Must be called after any manual changes to the camera's transform, or in the update loop if
256
+ * .autoRotate or .enableDamping are set. `deltaTime`, in seconds, is optional, and is only required if you want the
257
+ * auto-rotate speed to be independent of the frame rate (the refresh rate of the display).
258
+ */
259
+ update(deltaTime?: number): boolean;
260
+
261
+ /**
262
+ * Adds key event listeners to the given DOM element. `window`
263
+ * is a recommended argument for using this method.
264
+ * @param domElement
265
+ */
266
+ listenToKeyEvents(domElement: HTMLElement | Window): void;
267
+
268
+ /**
269
+ * Removes the key event listener previously defined with {@link listenToKeyEvents}.
270
+ */
271
+ stopListenToKeyEvents(): void;
272
+
273
+ /**
274
+ * Save the current state of the controls. This can later be
275
+ * recovered with .reset.
276
+ */
277
+ saveState(): void;
278
+
279
+ /**
280
+ * Reset the controls to their state from either the last time
281
+ * the .saveState was called, or the initial state.
282
+ */
283
+ reset(): void;
284
+
285
+ /**
286
+ * Remove all the event listeners.
287
+ */
288
+ dispose(): void;
289
+
290
+ /**
291
+ * Get the current vertical rotation, in radians.
292
+ */
293
+ getPolarAngle(): number;
294
+
295
+ /**
296
+ * Get the current horizontal rotation, in radians.
297
+ */
298
+ getAzimuthalAngle(): number;
299
+
300
+ /**
301
+ * Returns the distance from the camera to the target.
302
+ */
303
+ getDistance(): number;
304
+ }
@@ -0,0 +1,58 @@
1
+ import { Camera, EventDispatcher, MOUSE, Vector3 } from '../../../src/Three.js';
2
+
3
+ export interface TrackballControlsEventMap {
4
+ change: {};
5
+ start: {};
6
+ end: {};
7
+ }
8
+
9
+ export class TrackballControls extends EventDispatcher<TrackballControlsEventMap> {
10
+ constructor(object: Camera, domElement?: HTMLElement);
11
+
12
+ object: Camera;
13
+ domElement: HTMLElement;
14
+
15
+ // API
16
+ enabled: boolean;
17
+ screen: { left: number; top: number; width: number; height: number };
18
+ rotateSpeed: number;
19
+ zoomSpeed: number;
20
+ panSpeed: number;
21
+ noRotate: boolean;
22
+ noZoom: boolean;
23
+ noPan: boolean;
24
+ noRoll: boolean;
25
+ staticMoving: boolean;
26
+ dynamicDampingFactor: number;
27
+ minDistance: number;
28
+ maxDistance: number;
29
+ minZoom: number;
30
+ maxZoom: number;
31
+ keys: string[];
32
+ mouseButtons: {
33
+ LEFT?: MOUSE | null | undefined;
34
+ MIDDLE?: MOUSE | null | undefined;
35
+ RIGHT?: MOUSE | null | undefined;
36
+ };
37
+
38
+ target: Vector3;
39
+ position0: Vector3;
40
+ target0: Vector3;
41
+ up0: Vector3;
42
+
43
+ update(): void;
44
+
45
+ reset(): void;
46
+
47
+ dispose(): void;
48
+
49
+ checkDistances(): void;
50
+
51
+ zoomCamera(): void;
52
+
53
+ panCamera(): void;
54
+
55
+ rotateCamera(): void;
56
+
57
+ handleResize(): void;
58
+ }
@@ -0,0 +1,36 @@
1
+ import {
2
+ Camera,
3
+ Scene,
4
+ Vector2,
5
+ Vector4,
6
+ WebGLRenderer,
7
+ WebGLRenderTarget,
8
+ WebGLShadowMap,
9
+ } from '../../../src/Three.js';
10
+
11
+ export interface OutlineEffectParameters {
12
+ defaultThickness?: number | undefined;
13
+ defaultColor?: number[] | undefined;
14
+ defaultAlpha?: number | undefined;
15
+ defaultKeepAlive?: boolean | undefined;
16
+ }
17
+
18
+ export class OutlineEffect {
19
+ constructor(renderer: WebGLRenderer, parameters?: OutlineEffectParameters);
20
+ enabled: boolean;
21
+ autoClear: boolean;
22
+ domElement: HTMLElement;
23
+ shadowMap: WebGLShadowMap;
24
+
25
+ clear(color?: boolean, depth?: boolean, stencil?: boolean): void;
26
+ getPixelRatio(): number;
27
+ getSize(target: Vector2): Vector2;
28
+ render(scene: Scene, camera: Camera): void;
29
+ renderOutline(scene: Scene, camera: Camera): void;
30
+ setRenderTarget(renderTarget: WebGLRenderTarget | null): void;
31
+ setPixelRatio(value: number): void;
32
+ setScissor(x: Vector4 | number, y?: number, width?: number, height?: number): void;
33
+ setScissorTest(enable: boolean): void;
34
+ setSize(width: number, height: number, updateStyle?: boolean): void;
35
+ setViewport(x: Vector4 | number, y?: number, width?: number, height?: number): void;
36
+ }
@@ -0,0 +1,6 @@
1
+ import { Scene, WebGLRenderer } from '../../../src/Three.js';
2
+
3
+ export class RoomEnvironment extends Scene {
4
+ constructor(renderer?: WebGLRenderer);
5
+ dispose(): void;
6
+ }
@@ -0,0 +1,30 @@
1
+ import { Object3D } from '../../../src/Three.js';
2
+
3
+ export interface PLYExporterOptionsBase {
4
+ excludeAttributes?: string[];
5
+ littleEndian?: boolean;
6
+ }
7
+
8
+ export interface PLYExporterOptionsBinary extends PLYExporterOptionsBase {
9
+ binary: true;
10
+ }
11
+
12
+ export interface PLYExporterOptionsString extends PLYExporterOptionsBase {
13
+ binary?: false;
14
+ }
15
+
16
+ export interface PLYExporterOptions extends PLYExporterOptionsBase {
17
+ binary?: boolean;
18
+ }
19
+
20
+ export class PLYExporter {
21
+ constructor();
22
+
23
+ parse(object: Object3D, onDone: (res: ArrayBuffer) => void, options: PLYExporterOptionsBinary): ArrayBuffer | null;
24
+ parse(object: Object3D, onDone: (res: string) => void, options?: PLYExporterOptionsString): string | null;
25
+ parse(
26
+ object: Object3D,
27
+ onDone: (res: string | ArrayBuffer) => void,
28
+ options?: PLYExporterOptions,
29
+ ): string | ArrayBuffer | null;
30
+ }
@@ -0,0 +1,21 @@
1
+ import { Object3D } from '../../../src/Three.js';
2
+
3
+ export interface STLExporterOptionsBinary {
4
+ binary: true;
5
+ }
6
+
7
+ export interface STLExporterOptionsString {
8
+ binary?: false;
9
+ }
10
+
11
+ export interface STLExporterOptions {
12
+ binary?: boolean;
13
+ }
14
+
15
+ export class STLExporter {
16
+ constructor();
17
+
18
+ parse(scene: Object3D, options: STLExporterOptionsBinary): DataView;
19
+ parse(scene: Object3D, options?: STLExporterOptionsString): string;
20
+ parse(scene: Object3D, options?: STLExporterOptions): string | DataView;
21
+ }
@@ -0,0 +1,10 @@
1
+ import { Line, RectAreaLight, ColorRepresentation } from '../../../src/Three.js';
2
+
3
+ export class RectAreaLightHelper extends Line {
4
+ constructor(light: RectAreaLight, color?: ColorRepresentation);
5
+
6
+ light: RectAreaLight;
7
+ color: ColorRepresentation | undefined;
8
+
9
+ dispose(): void;
10
+ }
@@ -0,0 +1,15 @@
1
+ import { Camera, Object3D, Vector3, WebGLRenderer } from '../../../src/Three.js';
2
+
3
+ export class ViewHelper extends Object3D {
4
+ animating: boolean;
5
+ center: Vector3;
6
+
7
+ readonly isViewHelper: true;
8
+
9
+ constructor(camera: Camera, domElement: HTMLElement);
10
+
11
+ render(renderer: WebGLRenderer): void;
12
+ handleClick(event: MouseEvent): boolean;
13
+ update(delta: number): void;
14
+ dispose(): void;
15
+ }
@@ -0,0 +1 @@
1
+ export * from 'fflate';