@types/three 0.182.0 → 0.183.1

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 (313) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +0 -3
  3. three/examples/jsm/controls/OrbitControls.d.ts +39 -0
  4. three/examples/jsm/effects/AnaglyphEffect.d.ts +4 -0
  5. three/examples/jsm/environments/ColorEnvironment.d.ts +9 -0
  6. three/examples/jsm/gpgpu/BitonicSort.d.ts +5 -5
  7. three/examples/jsm/helpers/AnimationPathHelper.d.ts +38 -0
  8. three/examples/jsm/helpers/ViewHelper.d.ts +4 -1
  9. three/examples/jsm/inspector/tabs/Parameters.d.ts +3 -0
  10. three/examples/jsm/inspector/ui/Item.d.ts +5 -0
  11. three/examples/jsm/libs/meshopt_decoder.module.d.ts +1 -1
  12. three/examples/jsm/lights/LightProbeGenerator.d.ts +11 -5
  13. three/examples/jsm/loaders/ColladaLoader.d.ts +27 -4
  14. three/examples/jsm/objects/SkyMesh.d.ts +11 -6
  15. three/examples/jsm/objects/Water2Mesh.d.ts +7 -7
  16. three/examples/jsm/objects/WaterMesh.d.ts +6 -6
  17. three/examples/jsm/postprocessing/EffectComposer.d.ts +9 -10
  18. three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +4 -9
  19. three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +30 -0
  20. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -1
  21. three/examples/jsm/tsl/display/BilateralBlurNode.d.ts +27 -0
  22. three/examples/jsm/tsl/display/BloomNode.d.ts +5 -5
  23. three/examples/jsm/tsl/display/CRT.d.ts +22 -0
  24. three/examples/jsm/tsl/display/DenoiseNode.d.ts +5 -5
  25. three/examples/jsm/tsl/display/DotScreenNode.d.ts +4 -6
  26. three/examples/jsm/tsl/display/GTAONode.d.ts +8 -8
  27. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +4 -2
  28. three/examples/jsm/tsl/display/GodraysNode.d.ts +20 -0
  29. three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -6
  30. three/examples/jsm/tsl/display/Lut3DNode.d.ts +5 -5
  31. three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -1
  32. three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -6
  33. three/examples/jsm/tsl/display/PixelationPassNode.d.ts +10 -10
  34. three/examples/jsm/tsl/display/RGBShiftNode.d.ts +2 -2
  35. three/examples/jsm/tsl/display/RetroPassNode.d.ts +17 -0
  36. three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -1
  37. three/examples/jsm/tsl/display/SSGINode.d.ts +11 -11
  38. three/examples/jsm/tsl/display/SSRNode.d.ts +6 -6
  39. three/examples/jsm/tsl/display/SSSNode.d.ts +5 -5
  40. three/examples/jsm/tsl/display/Shape.d.ts +3 -0
  41. three/examples/jsm/tsl/display/TransitionNode.d.ts +3 -3
  42. three/examples/jsm/tsl/display/boxBlur.d.ts +1 -1
  43. three/examples/jsm/tsl/display/depthAwareBlend.d.ts +15 -0
  44. three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
  45. three/examples/jsm/tsl/math/Bayer.d.ts +2 -0
  46. three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -2
  47. three/package.json +3 -3
  48. three/src/Three.Core.d.ts +1 -1
  49. three/src/Three.TSL.d.ts +6 -11
  50. three/src/Three.WebGPU.Nodes.d.ts +2 -0
  51. three/src/Three.WebGPU.d.ts +3 -0
  52. three/src/Three.d.ts +2 -2
  53. three/src/animation/AnimationClip.d.ts +1 -1
  54. three/src/animation/KeyframeTrack.d.ts +19 -5
  55. three/src/animation/PropertyMixer.d.ts +5 -4
  56. three/src/audio/Audio.d.ts +224 -157
  57. three/src/audio/AudioAnalyser.d.ts +32 -27
  58. three/src/audio/AudioContext.d.ts +12 -12
  59. three/src/audio/AudioListener.d.ts +44 -65
  60. three/src/audio/PositionalAudio.d.ts +69 -62
  61. three/src/cameras/ArrayCamera.d.ts +21 -24
  62. three/src/cameras/Camera.d.ts +14 -53
  63. three/src/cameras/CubeCamera.d.ts +32 -28
  64. three/src/cameras/OrthographicCamera.d.ts +70 -100
  65. three/src/cameras/PerspectiveCamera.d.ts +133 -146
  66. three/src/cameras/StereoCamera.d.ts +24 -30
  67. three/src/constants.d.ts +14 -2
  68. three/src/core/Clock.d.ts +3 -0
  69. three/src/core/Object3D.d.ts +31 -7
  70. three/src/geometries/TorusGeometry.d.ts +22 -3
  71. three/src/helpers/ArrowHelper.d.ts +34 -50
  72. three/src/helpers/AxesHelper.d.ts +22 -36
  73. three/src/helpers/Box3Helper.d.ts +14 -25
  74. three/src/helpers/BoxHelper.d.ts +28 -39
  75. three/src/helpers/CameraHelper.d.ts +31 -52
  76. three/src/helpers/DirectionalLightHelper.d.ts +32 -53
  77. three/src/helpers/GridHelper.d.ts +15 -29
  78. three/src/helpers/HemisphereLightHelper.d.ts +26 -49
  79. three/src/helpers/PlaneHelper.d.ts +21 -33
  80. three/src/helpers/PointLightHelper.d.ts +25 -50
  81. three/src/helpers/PolarGridHelper.d.ts +19 -32
  82. three/src/helpers/SkeletonHelper.d.ts +26 -50
  83. three/src/helpers/SpotLightHelper.d.ts +28 -55
  84. three/src/lights/AmbientLight.d.ts +15 -23
  85. three/src/lights/DirectionalLight.d.ts +40 -82
  86. three/src/lights/DirectionalLightShadow.d.ts +6 -61
  87. three/src/lights/HemisphereLight.d.ts +20 -47
  88. three/src/lights/Light.d.ts +18 -48
  89. three/src/lights/LightProbe.d.ts +24 -29
  90. three/src/lights/LightShadow.d.ts +107 -91
  91. three/src/lights/PointLight.d.ts +36 -77
  92. three/src/lights/PointLightShadow.d.ts +9 -6
  93. three/src/lights/RectAreaLight.d.ts +39 -59
  94. three/src/lights/SpotLight.d.ts +62 -116
  95. three/src/lights/SpotLightShadow.d.ts +17 -59
  96. three/src/lights/webgpu/IESSpotLight.d.ts +13 -1
  97. three/src/lights/webgpu/ProjectorLight.d.ts +9 -10
  98. three/src/materials/MeshLambertMaterial.d.ts +6 -0
  99. three/src/materials/MeshPhongMaterial.d.ts +6 -0
  100. three/src/materials/nodes/Line2NodeMaterial.d.ts +0 -6
  101. three/src/materials/nodes/LineBasicNodeMaterial.d.ts +0 -4
  102. three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -2
  103. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +0 -2
  104. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +0 -2
  105. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +5 -8
  106. three/src/materials/nodes/MeshToonNodeMaterial.d.ts +0 -4
  107. three/src/materials/nodes/NodeMaterial.d.ts +9 -3
  108. three/src/materials/nodes/SpriteNodeMaterial.d.ts +0 -3
  109. three/src/materials/nodes/VolumeNodeMaterial.d.ts +0 -2
  110. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +39 -93
  111. three/src/math/Color.d.ts +1 -0
  112. three/src/math/Vector3.d.ts +2 -2
  113. three/src/math/interpolants/BezierInterpolant.d.ts +7 -0
  114. three/src/nodes/Nodes.d.ts +55 -35
  115. three/src/nodes/TSL.d.ts +2 -5
  116. three/src/nodes/accessors/Arrays.d.ts +19 -10
  117. three/src/nodes/accessors/BufferAttributeNode.d.ts +99 -33
  118. three/src/nodes/accessors/BufferNode.d.ts +21 -7
  119. three/src/nodes/accessors/Camera.d.ts +10 -10
  120. three/src/nodes/accessors/CubeTextureNode.d.ts +1 -1
  121. three/src/nodes/accessors/InstanceNode.d.ts +6 -0
  122. three/src/nodes/accessors/Lights.d.ts +9 -6
  123. three/src/nodes/accessors/MaterialNode.d.ts +1 -3
  124. three/src/nodes/accessors/MaterialProperties.d.ts +4 -4
  125. three/src/nodes/accessors/MaterialReferenceNode.d.ts +1 -1
  126. three/src/nodes/accessors/ModelNode.d.ts +34 -17
  127. three/src/nodes/accessors/MorphNode.d.ts +1 -1
  128. three/src/nodes/accessors/Normal.d.ts +13 -15
  129. three/src/nodes/accessors/Object3DNode.d.ts +35 -16
  130. three/src/nodes/accessors/Position.d.ts +9 -7
  131. three/src/nodes/accessors/ReferenceNode.d.ts +16 -7
  132. three/src/nodes/accessors/ReflectVector.d.ts +4 -5
  133. three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
  134. three/src/nodes/accessors/SceneProperties.d.ts +5 -0
  135. three/src/nodes/accessors/SkinningNode.d.ts +5 -3
  136. three/src/nodes/accessors/StorageBufferNode.d.ts +49 -22
  137. three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
  138. three/src/nodes/accessors/Tangent.d.ts +5 -7
  139. three/src/nodes/accessors/Texture3DNode.d.ts +1 -1
  140. three/src/nodes/accessors/TextureBicubic.d.ts +3 -2
  141. three/src/nodes/accessors/TextureNode.d.ts +19 -18
  142. three/src/nodes/accessors/UV.d.ts +1 -1
  143. three/src/nodes/accessors/UniformArrayNode.d.ts +10 -8
  144. three/src/nodes/accessors/UserDataNode.d.ts +1 -1
  145. three/src/nodes/accessors/VelocityNode.d.ts +3 -3
  146. three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
  147. three/src/nodes/code/FunctionCallNode.d.ts +0 -1
  148. three/src/nodes/code/FunctionNode.d.ts +7 -3
  149. three/src/nodes/core/ArrayNode.d.ts +2 -3
  150. three/src/nodes/core/AttributeNode.d.ts +12 -6
  151. three/src/nodes/core/BypassNode.d.ts +2 -3
  152. three/src/nodes/core/ConstNode.d.ts +10 -3
  153. three/src/nodes/core/ContextNode.d.ts +23 -28
  154. three/src/nodes/core/IndexNode.d.ts +1 -1
  155. three/src/nodes/core/InputNode.d.ts +12 -4
  156. three/src/nodes/core/InspectorNode.d.ts +2 -3
  157. three/src/nodes/core/IsolateNode.d.ts +2 -7
  158. three/src/nodes/core/MRTNode.d.ts +7 -0
  159. three/src/nodes/core/Node.d.ts +258 -39
  160. three/src/nodes/core/NodeAttribute.d.ts +30 -5
  161. three/src/nodes/core/NodeBuilder.d.ts +5 -3
  162. three/src/nodes/core/NodeCache.d.ts +24 -48
  163. three/src/nodes/core/NodeError.d.ts +9 -0
  164. three/src/nodes/core/NodeParser.d.ts +2 -0
  165. three/src/nodes/core/NodeUniform.d.ts +33 -9
  166. three/src/nodes/core/NodeVar.d.ts +33 -5
  167. three/src/nodes/core/NodeVarying.d.ts +32 -4
  168. three/src/nodes/core/ParameterNode.d.ts +11 -4
  169. three/src/nodes/core/PropertyNode.d.ts +45 -35
  170. three/src/nodes/core/StackTrace.d.ts +9 -0
  171. three/src/nodes/core/StructType.d.ts +3 -1
  172. three/src/nodes/core/StructTypeNode.d.ts +19 -5
  173. three/src/nodes/core/TempNode.d.ts +9 -3
  174. three/src/nodes/core/UniformNode.d.ts +53 -15
  175. three/src/nodes/core/VarNode.d.ts +15 -14
  176. three/src/nodes/core/VaryingNode.d.ts +14 -19
  177. three/src/nodes/core/constants.d.ts +9 -4
  178. three/src/nodes/display/BlendModes.d.ts +7 -27
  179. three/src/nodes/display/ColorAdjustment.d.ts +8 -9
  180. three/src/nodes/display/ColorSpaceNode.d.ts +2 -8
  181. three/src/nodes/display/FrontFacingNode.d.ts +1 -1
  182. three/src/nodes/display/PassNode.d.ts +9 -5
  183. three/src/nodes/display/RenderOutputNode.d.ts +3 -7
  184. three/src/nodes/display/ScreenNode.d.ts +25 -17
  185. three/src/nodes/display/ToneMappingNode.d.ts +3 -7
  186. three/src/nodes/display/ViewportDepthNode.d.ts +11 -7
  187. three/src/nodes/display/ViewportTextureNode.d.ts +2 -0
  188. three/src/nodes/fog/Fog.d.ts +5 -3
  189. three/src/nodes/geometry/RangeNode.d.ts +51 -9
  190. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +2 -0
  191. three/src/nodes/gpgpu/BarrierNode.d.ts +2 -0
  192. three/src/nodes/gpgpu/ComputeNode.d.ts +2 -7
  193. three/src/nodes/lighting/AnalyticLightNode.d.ts +1 -1
  194. three/src/nodes/lighting/HemisphereLightNode.d.ts +3 -2
  195. three/src/nodes/lighting/LightProbeNode.d.ts +1 -1
  196. three/src/nodes/lighting/LightUtils.d.ts +1 -1
  197. three/src/nodes/lighting/LightingContextNode.d.ts +1 -1
  198. three/src/nodes/lighting/SpotLightNode.d.ts +0 -6
  199. three/src/nodes/materialx/MaterialXNodes.d.ts +11 -11
  200. three/src/nodes/math/BitcountNode.d.ts +2 -0
  201. three/src/nodes/math/ConditionalNode.d.ts +43 -22
  202. three/src/nodes/math/Hash.d.ts +1 -1
  203. three/src/nodes/math/MathNode.d.ts +603 -267
  204. three/src/nodes/math/MathUtils.d.ts +9 -5
  205. three/src/nodes/math/OperatorNode.d.ts +490 -227
  206. three/src/nodes/math/TriNoise3D.d.ts +3 -3
  207. three/src/nodes/pmrem/PMREMNode.d.ts +1 -1
  208. three/src/nodes/procedural/Checker.d.ts +1 -1
  209. three/src/nodes/tsl/TSLCore.d.ts +1683 -224
  210. three/src/nodes/utils/ArrayElementNode.d.ts +9 -4
  211. three/src/nodes/utils/DebugNode.d.ts +2 -5
  212. three/src/nodes/utils/Discard.d.ts +2 -3
  213. three/src/nodes/utils/FlipNode.d.ts +11 -0
  214. three/src/nodes/utils/LoopNode.d.ts +17 -13
  215. three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
  216. three/src/nodes/utils/Oscillators.d.ts +4 -4
  217. three/src/nodes/utils/Packing.d.ts +3 -3
  218. three/src/nodes/utils/PostProcessingUtils.d.ts +5 -5
  219. three/src/nodes/utils/RemapNode.d.ts +33 -39
  220. three/src/nodes/utils/RotateNode.d.ts +17 -8
  221. three/src/nodes/utils/SplitNode.d.ts +1 -2
  222. three/src/nodes/utils/SpriteSheetUV.d.ts +7 -0
  223. three/src/nodes/utils/StorageArrayElementNode.d.ts +18 -9
  224. three/src/nodes/utils/Timer.d.ts +4 -4
  225. three/src/nodes/utils/TriplanarTextures.d.ts +2 -2
  226. three/src/nodes/utils/UVUtils.d.ts +6 -4
  227. three/src/objects/BatchedMesh.d.ts +6 -4
  228. three/src/objects/InstancedMesh.d.ts +32 -24
  229. three/src/renderers/WebGLRenderer.d.ts +4 -93
  230. three/src/renderers/common/Animation.d.ts +46 -9
  231. three/src/renderers/common/Attributes.d.ts +11 -13
  232. three/src/renderers/common/Backend.d.ts +0 -2
  233. three/src/renderers/common/Background.d.ts +17 -15
  234. three/src/renderers/common/BindGroup.d.ts +27 -13
  235. three/src/renderers/common/Binding.d.ts +15 -3
  236. three/src/renderers/common/Bindings.d.ts +41 -17
  237. three/src/renderers/common/BlendMode.d.ts +22 -0
  238. three/src/renderers/common/Buffer.d.ts +35 -11
  239. three/src/renderers/common/BufferUtils.d.ts +3 -4
  240. three/src/renderers/common/BundleGroup.d.ts +16 -6
  241. three/src/renderers/common/CanvasTarget.d.ts +76 -13
  242. three/src/renderers/common/ChainMap.d.ts +12 -9
  243. three/src/renderers/common/ClippingContext.d.ts +61 -10
  244. three/src/renderers/common/Color4.d.ts +10 -5
  245. three/src/renderers/common/ComputePipeline.d.ts +16 -2
  246. three/src/renderers/common/Constants.d.ts +5 -3
  247. three/src/renderers/common/CubeRenderTarget.d.ts +24 -7
  248. three/src/renderers/common/DataMap.d.ts +10 -18
  249. three/src/renderers/common/Geometries.d.ts +39 -20
  250. three/src/renderers/common/Info.d.ts +62 -9
  251. three/src/renderers/common/InspectorBase.d.ts +19 -7
  252. three/src/renderers/common/Lighting.d.ts +2 -6
  253. three/src/renderers/common/Pipeline.d.ts +14 -2
  254. three/src/renderers/common/Pipelines.d.ts +58 -60
  255. three/src/renderers/common/PostProcessing.d.ts +14 -17
  256. three/src/renderers/common/ProgrammableStage.d.ts +48 -8
  257. three/src/renderers/common/RenderBundle.d.ts +4 -2
  258. three/src/renderers/common/RenderBundles.d.ts +6 -3
  259. three/src/renderers/common/RenderContext.d.ts +175 -7
  260. three/src/renderers/common/RenderContexts.d.ts +20 -25
  261. three/src/renderers/common/RenderList.d.ts +77 -11
  262. three/src/renderers/common/RenderLists.d.ts +16 -4
  263. three/src/renderers/common/RenderObject.d.ts +223 -47
  264. three/src/renderers/common/RenderObjectPipeline.d.ts +33 -0
  265. three/src/renderers/common/RenderObjects.d.ts +55 -22
  266. three/src/renderers/common/RenderPipeline.d.ts +20 -17
  267. three/src/renderers/common/Renderer.d.ts +625 -207
  268. three/src/renderers/common/Textures.d.ts +24 -46
  269. three/src/renderers/common/TimestampQueryPool.d.ts +62 -8
  270. three/src/renderers/common/Uniform.d.ts +143 -58
  271. three/src/renderers/common/UniformBuffer.d.ts +7 -5
  272. three/src/renderers/common/UniformsGroup.d.ts +50 -35
  273. three/src/renderers/common/XRManager.d.ts +321 -83
  274. three/src/renderers/common/XRRenderTarget.d.ts +49 -6
  275. three/src/renderers/common/nodes/NodeBuilderState.d.ts +75 -15
  276. three/src/renderers/common/nodes/NodeLibrary.d.ts +25 -5
  277. three/src/renderers/common/nodes/{Nodes.d.ts → NodeManager.d.ts} +54 -73
  278. three/src/renderers/common/nodes/NodeUniform.d.ts +60 -70
  279. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +23 -4
  280. three/src/renderers/shaders/UniformsLib.d.ts +0 -3
  281. three/src/renderers/webgl/WebGLAttributes.d.ts +9 -7
  282. three/src/renderers/webgl/WebGLEnvironments.d.ts +8 -0
  283. three/src/renderers/webgl/WebGLExtensions.d.ts +1 -1
  284. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +9 -5
  285. three/src/renderers/webgl/WebGLLights.d.ts +19 -18
  286. three/src/renderers/webgl/WebGLObjects.d.ts +15 -2
  287. three/src/renderers/webgl/WebGLProgram.d.ts +2 -10
  288. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -2
  289. three/src/renderers/webgl/WebGLRenderLists.d.ts +1 -3
  290. three/src/renderers/webgl/WebGLShadowMap.d.ts +0 -5
  291. three/src/renderers/webgl/WebGLState.d.ts +305 -28
  292. three/src/renderers/webgl/WebGLTextures.d.ts +10 -9
  293. three/src/renderers/webgl/WebGLUniforms.d.ts +0 -7
  294. three/src/renderers/webgpu/WebGPUBackend.d.ts +0 -1
  295. three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +2 -4
  296. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +15 -4
  297. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -1
  298. three/src/scenes/Fog.d.ts +31 -37
  299. three/src/scenes/FogExp2.d.ts +26 -31
  300. three/src/scenes/Scene.d.ts +51 -65
  301. three/src/textures/CompressedArrayTexture.d.ts +1 -1
  302. three/src/textures/DataArrayTexture.d.ts +1 -1
  303. three/src/utils.d.ts +5 -0
  304. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -18
  305. three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +0 -13
  306. three/examples/jsm/shaders/GodRaysShader.d.ts +0 -44
  307. three/src/nodes/accessors/SceneNode.d.ts +0 -21
  308. three/src/nodes/code/ScriptableNode.d.ts +0 -21
  309. three/src/nodes/code/ScriptableValueNode.d.ts +0 -9
  310. three/src/nodes/display/PosterizeNode.d.ts +0 -13
  311. three/src/nodes/utils/SpriteSheetUVNode.d.ts +0 -15
  312. three/src/renderers/webgl/WebGLCubeMaps.d.ts +0 -8
  313. three/src/renderers/webgl/WebGLCubeUVMaps.d.ts +0 -9
@@ -26,63 +26,48 @@ export interface OrthographicCameraJSON extends Object3DJSON {
26
26
  }
27
27
 
28
28
  /**
29
- * Camera that uses {@link https://en.wikipedia.org/wiki/Orthographic_projection | orthographic projection}.
30
- * In this projection mode, an object's size in the rendered image stays constant regardless of its distance from the camera.
31
- * This can be useful for rendering 2D scenes and UI elements, amongst other things.
32
- * @example
33
- * ```typescript
34
- * const camera = new THREE.OrthographicCamera(width / -2, width / 2, height / 2, height / -2, 1, 1000);
35
- * scene.add(camera);
29
+ * Camera that uses [orthographic projection](https://en.wikipedia.org/wiki/Orthographic_projection).
30
+ *
31
+ * In this projection mode, an object's size in the rendered image stays
32
+ * constant regardless of its distance from the camera. This can be useful
33
+ * for rendering 2D scenes and UI elements, amongst other things.
34
+ *
35
+ * ```js
36
+ * const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
37
+ * scene.add( camera );
36
38
  * ```
37
- * @see Example: {@link https://threejs.org/examples/#webgl_camera | camera }
38
- * @see Example: {@link https://threejs.org/examples/#webgl_interactive_cubes_ortho | interactive / cubes / ortho }
39
- * @see Example: {@link https://threejs.org/examples/#webgl_materials_cubemap_dynamic | materials / cubemap / dynamic }
40
- * @see Example: {@link https://threejs.org/examples/#webgl_postprocessing_advanced | postprocessing / advanced }
41
- * @see Example: {@link https://threejs.org/examples/#webgl_postprocessing_dof2 | postprocessing / dof2 }
42
- * @see Example: {@link https://threejs.org/examples/#webgl_postprocessing_godrays | postprocessing / godrays }
43
- * @see Example: {@link https://threejs.org/examples/#webgl_rtt | rtt }
44
- * @see Example: {@link https://threejs.org/examples/#webgl_shaders_tonemapping | shaders / tonemapping }
45
- * @see Example: {@link https://threejs.org/examples/#webgl_shadowmap | shadowmap }
46
- * @see {@link https://threejs.org/docs/index.html#api/en/cameras/OrthographicCamera | Official Documentation}
47
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/OrthographicCamera.js | Source}
48
39
  */
49
40
  export class OrthographicCamera extends Camera {
50
41
  /**
51
- * Creates a new {@link OrthographicCamera}.
52
- * @remarks Together these define the camera's {@link https://en.wikipedia.org/wiki/Viewing_frustum | viewing frustum}.
53
- * @param left Camera frustum left plane. Default `-1`.
54
- * @param right Camera frustum right plane. Default `1`.
55
- * @param top Camera frustum top plane. Default `1`.
56
- * @param bottom Camera frustum bottom plane. Default `-1`.
57
- * @param near Camera frustum near plane. Default `0.1`.
58
- * @param far Camera frustum far plane. Default `2000`.
42
+ * Constructs a new orthographic camera.
43
+ *
44
+ * @param {number} [left=-1] - The left plane of the camera's frustum.
45
+ * @param {number} [right=1] - The right plane of the camera's frustum.
46
+ * @param {number} [top=1] - The top plane of the camera's frustum.
47
+ * @param {number} [bottom=-1] - The bottom plane of the camera's frustum.
48
+ * @param {number} [near=0.1] - The camera's near plane.
49
+ * @param {number} [far=2000] - The camera's far plane.
59
50
  */
60
51
  constructor(left?: number, right?: number, top?: number, bottom?: number, near?: number, far?: number);
61
-
62
- /**
63
- * Read-only flag to check if a given object is of type {@link OrthographicCamera}.
64
- * @remarks This is a _constant_ value
65
- * @defaultValue `true`
66
- */
67
- readonly isOrthographicCamera: true;
68
-
69
52
  /**
70
- * @override
71
- * @defaultValue `OrthographicCamera`
53
+ * This flag can be used for type testing.
54
+ *
55
+ * @default true
72
56
  */
73
- override readonly type: string | "OrthographicCamera";
74
-
57
+ readonly isOrthographicCamera: boolean;
75
58
  /**
76
- * Gets or sets the zoom factor of the camera.
77
- * @defaultValue `1`
59
+ * The zoom factor of the camera.
60
+ *
61
+ * @default 1
78
62
  */
79
63
  zoom: number;
80
-
81
64
  /**
82
- * Set by {@link setViewOffset | .setViewOffset()}.
83
- * @defaultValue `null`
65
+ * Represents the frustum window specification. This property should not be edited
66
+ * directly but via {@link PerspectiveCamera#setViewOffset} and {@link PerspectiveCamera#clearViewOffset}.
67
+ *
68
+ * @default null
84
69
  */
85
- view: null | {
70
+ view: {
86
71
  enabled: boolean;
87
72
  fullWidth: number;
88
73
  fullHeight: number;
@@ -90,85 +75,70 @@ export class OrthographicCamera extends Camera {
90
75
  offsetY: number;
91
76
  width: number;
92
77
  height: number;
93
- };
94
-
78
+ } | null;
95
79
  /**
96
- * Camera frustum left plane.
97
- * @remarks Expects a `Float`
98
- * @defaultValue `-1`
80
+ * The left plane of the camera's frustum.
81
+ *
82
+ * @default -1
99
83
  */
100
84
  left: number;
101
-
102
85
  /**
103
- * Camera frustum right plane.
104
- * @remarks Expects a `Float`
105
- * @defaultValue `1`
86
+ * The right plane of the camera's frustum.
87
+ *
88
+ * @default 1
106
89
  */
107
90
  right: number;
108
-
109
91
  /**
110
- * Camera frustum top plane.
111
- * @remarks Expects a `Float`
112
- * @defaultValue `1`
92
+ * The top plane of the camera's frustum.
93
+ *
94
+ * @default 1
113
95
  */
114
96
  top: number;
115
-
116
97
  /**
117
- * Camera frustum bottom plane.
118
- * @remarks Expects a `Float`.
119
- * @defaultValue `-1`
98
+ * The bottom plane of the camera's frustum.
99
+ *
100
+ * @default -1
120
101
  */
121
102
  bottom: number;
122
-
123
103
  /**
124
- * Camera frustum near plane.`.
125
- * @remarks The valid range is between `0` and the current value of the {@link far | .far} plane.
126
- * @remarks Note that, unlike for the {@link THREE.PerspectiveCamera | PerspectiveCamera}, `0` is a valid value for an {@link THREE.OrthographicCamera | OrthographicCamera's} near plane.
127
- * @remarks Expects a `Float`
128
- * @defaultValue `0.1`
104
+ * The camera's near plane. The valid range is greater than `0`
105
+ * and less than the current value of {@link OrthographicCamera#far}.
106
+ *
107
+ * Note that, unlike for the {@link PerspectiveCamera}, `0` is a
108
+ * valid value for an orthographic camera's near plane.
109
+ *
110
+ * @default 0.1
129
111
  */
130
112
  near: number;
131
-
132
113
  /**
133
- * Camera frustum far plane.
134
- * @remarks Must be greater than the current value of {@link near | .near} plane.
135
- * @remarks Expects a `Float`
136
- * @defaultValue `2000`
114
+ * The camera's far plane. Must be greater than the
115
+ * current value of {@link OrthographicCamera#near}.
116
+ *
117
+ * @default 2000
137
118
  */
138
119
  far: number;
139
-
120
+ copy(source: OrthographicCamera, recursive?: boolean): this;
140
121
  /**
141
- * Updates the camera projection matrix
142
- * @remarks Must be called after any change of parameters.
122
+ * Sets an offset in a larger frustum. This is useful for multi-window or
123
+ * multi-monitor/multi-machine setups.
124
+ *
125
+ * @param {number} fullWidth - The full width of multiview setup.
126
+ * @param {number} fullHeight - The full height of multiview setup.
127
+ * @param {number} x - The horizontal offset of the subcamera.
128
+ * @param {number} y - The vertical offset of the subcamera.
129
+ * @param {number} width - The width of subcamera.
130
+ * @param {number} height - The height of subcamera.
131
+ * @see {@link PerspectiveCamera#setViewOffset}
143
132
  */
144
- updateProjectionMatrix(): void;
145
-
133
+ setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void;
146
134
  /**
147
- * Sets an offset in a larger {@link https://en.wikipedia.org/wiki/Viewing_frustum | viewing frustum}
148
- * @remarks
149
- * This is useful for multi-window or multi-monitor/multi-machine setups
150
- * For an example on how to use it see {@link PerspectiveCamera.setViewOffset | PerspectiveCamera}.
151
- * @see {@link THREE.PerspectiveCamera.setViewOffset | PerspectiveCamera}.
152
- * @param fullWidth Full width of multiview setup Expects a `Float`.
153
- * @param fullHeight Full height of multiview setup Expects a `Float`.
154
- * @param x Horizontal offset of subcamera Expects a `Float`.
155
- * @param y Vertical offset of subcamera Expects a `Float`.
156
- * @param width Width of subcamera Expects a `Float`.
157
- * @param height Height of subcamera Expects a `Float`.
135
+ * Removes the view offset from the projection matrix.
158
136
  */
159
- setViewOffset(
160
- fullWidth: number,
161
- fullHeight: number,
162
- offsetX: number,
163
- offsetY: number,
164
- width: number,
165
- height: number,
166
- ): void;
167
-
137
+ clearViewOffset(): void;
168
138
  /**
169
- * Removes any offset set by the {@link setViewOffset | .setViewOffset} method.
139
+ * Updates the camera's projection matrix. Must be called after any change of
140
+ * camera properties.
170
141
  */
171
- clearViewOffset(): void;
172
-
142
+ updateProjectionMatrix(): void;
173
143
  toJSON(meta?: JSONMeta): OrthographicCameraJSON;
174
144
  }
@@ -31,98 +31,83 @@ export interface PerspectiveCameraJSON extends Object3DJSON {
31
31
  }
32
32
 
33
33
  /**
34
- * Camera that uses {@link https://en.wikipedia.org/wiki/Perspective_(graphical) | perspective projection}.
35
- * This projection mode is designed to mimic the way the human eye sees
36
- * @remarks
37
- * It is the most common projection mode used for rendering a 3D scene.
38
- * @example
39
- * ```typescript
40
- * const camera = new THREE.PerspectiveCamera(45, width / height, 1, 1000);
41
- * scene.add(camera);
34
+ * Camera that uses [perspective projection](https://en.wikipedia.org/wiki/Perspective_(graphical)).
35
+ *
36
+ * This projection mode is designed to mimic the way the human eye sees. It
37
+ * is the most common projection mode used for rendering a 3D scene.
38
+ *
39
+ * ```js
40
+ * const camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 );
41
+ * scene.add( camera );
42
42
  * ```
43
- * @see Example: {@link https://threejs.org/examples/#webgl_animation_skinning_blending | animation / skinning / blending }
44
- * @see Example: {@link https://threejs.org/examples/#webgl_animation_skinning_morph | animation / skinning / morph }
45
- * @see Example: {@link https://threejs.org/examples/#webgl_effects_stereo | effects / stereo }
46
- * @see Example: {@link https://threejs.org/examples/#webgl_interactive_cubes | interactive / cubes }
47
- * @see Example: {@link https://threejs.org/examples/#webgl_loader_collada_skinning | loader / collada / skinning }
48
- * @see {@link https://threejs.org/docs/index.html#api/en/cameras/PerspectiveCamera | Official Documentation}
49
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/PerspectiveCamera.js | Source}
50
43
  */
51
44
  export class PerspectiveCamera extends Camera {
52
45
  /**
53
- * Creates a new {@link PerspectiveCamera}.
54
- * @remarks Together these define the camera's {@link https://en.wikipedia.org/wiki/Viewing_frustum | viewing frustum}.
55
- * @param fov Camera frustum vertical field of view. Default `50`.
56
- * @param aspect Camera frustum aspect ratio. Default `1`.
57
- * @param near Camera frustum near plane. Default `0.1`.
58
- * @param far Camera frustum far plane. Default `2000`.
46
+ * Constructs a new perspective camera.
47
+ *
48
+ * @param {number} [fov=50] - The vertical field of view.
49
+ * @param {number} [aspect=1] - The aspect ratio.
50
+ * @param {number} [near=0.1] - The camera's near plane.
51
+ * @param {number} [far=2000] - The camera's far plane.
59
52
  */
60
53
  constructor(fov?: number, aspect?: number, near?: number, far?: number);
61
-
62
- /**
63
- * Read-only flag to check if a given object is of type {@link Camera}.
64
- * @remarks This is a _constant_ value
65
- * @defaultValue `true`
66
- */
67
- readonly isPerspectiveCamera: true;
68
-
69
- /**
70
- * @override
71
- * @defaultValue `PerspectiveCamera`
72
- */
73
- override readonly type: string | "PerspectiveCamera";
74
-
75
54
  /**
76
- * Gets or sets the zoom factor of the camera.
77
- * @defaultValue `1`
55
+ * This flag can be used for type testing.
56
+ *
57
+ * @default true
78
58
  */
79
- zoom: number;
80
-
59
+ readonly isPerspectiveCamera: boolean;
81
60
  /**
82
- * Camera frustum vertical field of view, from bottom to top of view, in degrees.
83
- * @remarks Expects a `Float`
84
- * @defaultValue `50`
61
+ * The vertical field of view, from bottom to top of view,
62
+ * in degrees.
63
+ *
64
+ * @default 50
85
65
  */
86
66
  fov: number;
87
-
88
67
  /**
89
- * Camera frustum aspect ratio, usually the canvas width / canvas height.
90
- * @remarks Expects a `Float`
91
- * @defaultValue `1`, _(square canvas)_.
68
+ * The zoom factor of the camera.
69
+ *
70
+ * @default 1
92
71
  */
93
- aspect: number;
94
-
72
+ zoom: number;
95
73
  /**
96
- * Camera frustum near plane.
97
- * @remarks The valid range is greater than `0` and less than the current value of the {@link far | .far} plane.
98
- * @remarks Note that, unlike for the {@link THREE.OrthographicCamera | OrthographicCamera}, `0` is **not** a valid value for a {@link PerspectiveCamera |PerspectiveCamera's}. near plane.
99
- * @defaultValue `0.1`
100
- * @remarks Expects a `Float`
74
+ * The camera's near plane. The valid range is greater than `0`
75
+ * and less than the current value of {@link PerspectiveCamera#far}.
76
+ *
77
+ * Note that, unlike for the {@link OrthographicCamera}, `0` is <em>not</em> a
78
+ * valid value for a perspective camera's near plane.
79
+ *
80
+ * @default 0.1
101
81
  */
102
82
  near: number;
103
-
104
83
  /**
105
- * Camera frustum far plane.
106
- * @remarks Must be greater than the current value of {@link near | .near} plane.
107
- * @remarks Expects a `Float`
108
- * @defaultValue `2000`
84
+ * The camera's far plane. Must be greater than the
85
+ * current value of {@link PerspectiveCamera#near}.
86
+ *
87
+ * @default 2000
109
88
  */
110
89
  far: number;
111
-
112
90
  /**
113
- * Object distance used for stereoscopy and depth-of-field effects.
114
- * @remarks This parameter does not influence the projection matrix unless a {@link THREE.StereoCamera | StereoCamera} is being used.
115
- * @remarks Expects a `Float`
116
- * @defaultValue `10`
91
+ * Object distance used for stereoscopy and depth-of-field effects. This
92
+ * parameter does not influence the projection matrix unless a
93
+ * {@link StereoCamera} is being used.
94
+ *
95
+ * @default 10
117
96
  */
118
97
  focus: number;
119
-
120
98
  /**
121
- * Frustum window specification or null.
122
- * This is set using the {@link setViewOffset | .setViewOffset} method and cleared using {@link clearViewOffset | .clearViewOffset}.
123
- * @defaultValue `null`
99
+ * The aspect ratio, usually the canvas width / canvas height.
100
+ *
101
+ * @default 1
102
+ */
103
+ aspect: number;
104
+ /**
105
+ * Represents the frustum window specification. This property should not be edited
106
+ * directly but via {@link PerspectiveCamera#setViewOffset} and {@link PerspectiveCamera#clearViewOffset}.
107
+ *
108
+ * @default null
124
109
  */
125
- view: null | {
110
+ view: {
126
111
  enabled: boolean;
127
112
  fullWidth: number;
128
113
  fullHeight: number;
@@ -130,125 +115,127 @@ export class PerspectiveCamera extends Camera {
130
115
  offsetY: number;
131
116
  width: number;
132
117
  height: number;
133
- };
134
-
118
+ } | null;
135
119
  /**
136
- * Film size used for the larger axis.
137
- * This parameter does not influence the projection matrix unless {@link filmOffset | .filmOffset} is set to a nonzero value.
138
- * @remarks Expects a `Float`
139
- * @defaultValue `35`, _millimeters_.
120
+ * Film size used for the larger axis. Default is `35` (millimeters). This
121
+ * parameter does not influence the projection matrix unless {@link PerspectiveCamera#filmOffset}
122
+ * is set to a nonzero value.
123
+ *
124
+ * @default 35
140
125
  */
141
126
  filmGauge: number;
142
-
143
127
  /**
144
- * Horizontal off-center offset in the same unit as {@link filmGauge | .filmGauge}.
145
- * @remarks Expects a `Float`
146
- * @defaultValue `0`
128
+ * Horizontal off-center offset in the same unit as {@link PerspectiveCamera#filmGauge}.
129
+ *
130
+ * @default 0
147
131
  */
148
132
  filmOffset: number;
149
-
133
+ copy(source: PerspectiveCamera, recursive?: boolean): this;
150
134
  /**
151
- * Returns the focal length of the current {@link .fov | fov} in respect to {@link filmGauge | .filmGauge}.
135
+ * Sets the FOV by focal length in respect to the current {@link PerspectiveCamera#filmGauge}.
136
+ *
137
+ * The default film gauge is 35, so that the focal length can be specified for
138
+ * a 35mm (full frame) camera.
139
+ *
140
+ * @param {number} focalLength - Values for focal length and film gauge must have the same unit.
152
141
  */
153
- getFocalLength(): number;
154
-
142
+ setFocalLength(focalLength: number): void;
155
143
  /**
156
- * Sets the FOV by focal length in respect to the current {@link filmGauge | .filmGauge}.
157
- * @remarks By default, the focal length is specified for a `35mm` (full frame) camera.
158
- * @param focalLength Expects a `Float`
144
+ * Returns the focal length from the current {@link PerspectiveCamera#fov} and
145
+ * {@link PerspectiveCamera#filmGauge}.
146
+ *
147
+ * @return {number} The computed focal length.
159
148
  */
160
- setFocalLength(focalLength: number): void;
161
-
149
+ getFocalLength(): number;
162
150
  /**
163
- * Returns the current vertical field of view angle in degrees considering {@link zoom | .zoom}.
151
+ * Returns the current vertical field of view angle in degrees considering {@link PerspectiveCamera#zoom}.
152
+ *
153
+ * @return {number} The effective FOV.
164
154
  */
165
155
  getEffectiveFOV(): number;
166
-
167
156
  /**
168
- * Returns the width of the image on the film
169
- * @remarks
170
- * If {@link aspect | .aspect}. is greater than or equal to one (landscape format), the result equals {@link filmGauge | .filmGauge}.
157
+ * Returns the width of the image on the film. If {@link PerspectiveCamera#aspect} is greater than or
158
+ * equal to one (landscape format), the result equals {@link PerspectiveCamera#filmGauge}.
159
+ *
160
+ * @return {number} The film width.
171
161
  */
172
162
  getFilmWidth(): number;
173
-
174
163
  /**
175
- * Returns the height of the image on the film
176
- * @remarks
177
- * If {@link aspect | .aspect}. is less than or equal to one (portrait format), the result equals {@link filmGauge | .filmGauge}.
164
+ * Returns the height of the image on the film. If {@link PerspectiveCamera#aspect} is greater than or
165
+ * equal to one (landscape format), the result equals {@link PerspectiveCamera#filmGauge}.
166
+ *
167
+ * @return {number} The film width.
178
168
  */
179
169
  getFilmHeight(): number;
180
-
181
170
  /**
182
171
  * Computes the 2D bounds of the camera's viewable rectangle at a given distance along the viewing direction.
183
- * Sets minTarget and maxTarget to the coordinates of the lower-left and upper-right corners of the view rectangle.
172
+ * Sets `minTarget` and `maxTarget` to the coordinates of the lower-left and upper-right corners of the view rectangle.
173
+ *
174
+ * @param {number} distance - The viewing distance.
175
+ * @param {Vector2} minTarget - The lower-left corner of the view rectangle is written into this vector.
176
+ * @param {Vector2} maxTarget - The upper-right corner of the view rectangle is written into this vector.
184
177
  */
185
178
  getViewBounds(distance: number, minTarget: Vector2, maxTarget: Vector2): void;
186
-
187
179
  /**
188
180
  * Computes the width and height of the camera's viewable rectangle at a given distance along the viewing direction.
189
- * Copies the result into the target Vector2, where x is width and y is height.
181
+ *
182
+ * @param {number} distance - The viewing distance.
183
+ * @param {Vector2} target - The target vector that is used to store result where x is width and y is height.
184
+ * @returns {Vector2} The view size.
190
185
  */
191
186
  getViewSize(distance: number, target: Vector2): Vector2;
192
-
193
187
  /**
194
- * Sets an offset in a larger frustum.
195
- * @remarks
196
- * This is useful for multi-window or multi-monitor/multi-machine setups.
188
+ * Sets an offset in a larger frustum. This is useful for multi-window or
189
+ * multi-monitor/multi-machine setups.
197
190
  *
198
- * For example, if you have 3x2 monitors and each monitor is _1920x1080_ and
191
+ * For example, if you have 3x2 monitors and each monitor is 1920x1080 and
199
192
  * the monitors are in grid like this
200
193
  * ```
201
- * ┌───┬───┬───┐
202
- * A B C
203
- * ├───┼───┼───┤
204
- * D E F
205
- * └───┴───┴───┘
194
+ * +---+---+---+
195
+ * | A | B | C |
196
+ * +---+---+---+
197
+ * | D | E | F |
198
+ * +---+---+---+
206
199
  * ```
207
- * then for each monitor you would call it like this
208
- * ```typescript
209
- * const w = 1920;
210
- * const h = 1080;
211
- * const fullWidth = w * 3;
212
- * const fullHeight = h * 2;
213
- *
214
- * // Monitor - A
215
- * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
216
- * // Monitor - B
217
- * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
218
- * // Monitor - C
219
- * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
220
- * // Monitor - D
221
- * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
222
- * // Monitor - E
223
- * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
224
- * // Monitor - F
225
- * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
200
+ * then for each monitor you would call it like this:
201
+ * ```js
202
+ * const w = 1920;
203
+ * const h = 1080;
204
+ * const fullWidth = w * 3;
205
+ * const fullHeight = h * 2;
206
+ *
207
+ * // --A--
208
+ * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
209
+ * // --B--
210
+ * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
211
+ * // --C--
212
+ * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
213
+ * // --D--
214
+ * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
215
+ * // --E--
216
+ * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
217
+ * // --F--
218
+ * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
226
219
  * ```
220
+ *
227
221
  * Note there is no reason monitors have to be the same size or in a grid.
228
- * @param fullWidth Full width of multiview setup Expects a `Float`.
229
- * @param fullHeight Full height of multiview setup Expects a `Float`.
230
- * @param x Horizontal offset of subcamera Expects a `Float`.
231
- * @param y Vertical offset of subcamera Expects a `Float`.
232
- * @param width Width of subcamera Expects a `Float`.
233
- * @param height Height of subcamera Expects a `Float`.
222
+ *
223
+ * @param {number} fullWidth - The full width of multiview setup.
224
+ * @param {number} fullHeight - The full height of multiview setup.
225
+ * @param {number} x - The horizontal offset of the subcamera.
226
+ * @param {number} y - The vertical offset of the subcamera.
227
+ * @param {number} width - The width of subcamera.
228
+ * @param {number} height - The height of subcamera.
234
229
  */
235
230
  setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void;
236
-
237
231
  /**
238
- * Removes any offset set by the {@link setViewOffset | .setViewOffset} method.
232
+ * Removes the view offset from the projection matrix.
239
233
  */
240
234
  clearViewOffset(): void;
241
-
242
235
  /**
243
- * Updates the camera projection matrix
244
- * @remarks Must be called after any change of parameters.
236
+ * Updates the camera's projection matrix. Must be called after any change of
237
+ * camera properties.
245
238
  */
246
239
  updateProjectionMatrix(): void;
247
-
248
- /**
249
- * @deprecated Use {@link PerspectiveCamera.setFocalLength | .setFocalLength()} and {@link PerspectiveCamera.filmGauge | .filmGauge} instead.
250
- */
251
- setLens(focalLength: number, frameHeight?: number): void;
252
-
253
240
  toJSON(meta?: JSONMeta): PerspectiveCameraJSON;
254
241
  }
@@ -1,50 +1,44 @@
1
- import { Camera } from "./Camera.js";
2
1
  import { PerspectiveCamera } from "./PerspectiveCamera.js";
3
2
 
4
3
  /**
5
- * Dual {@link PerspectiveCamera | PerspectiveCamera}s used for effects such as
6
- * {@link https://en.wikipedia.org/wiki/Anaglyph_3D | 3D Anaglyph} or
7
- * {@link https://en.wikipedia.org/wiki/parallax_barrier | Parallax Barrier}.
8
- * @see Example: {@link https://threejs.org/examples/#webgl_effects_anaglyph | effects / anaglyph }
9
- * @see Example: {@link https://threejs.org/examples/#webgl_effects_parallaxbarrier | effects / parallaxbarrier }
10
- * @see Example: {@link https://threejs.org/examples/#webgl_effects_stereo | effects / stereo }
11
- * @see {@link https://threejs.org/docs/index.html#api/en/cameras/StereoCamera | Official Documentation}
12
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/StereoCamera.js | Source}
4
+ * A special type of camera that uses two perspective cameras with
5
+ * stereoscopic projection. Can be used for rendering stereo effects
6
+ * like [3D Anaglyph](https://en.wikipedia.org/wiki/Anaglyph_3D) or
7
+ * [Parallax Barrier](https://en.wikipedia.org/wiki/parallax_barrier).
13
8
  */
14
- export class StereoCamera extends Camera {
15
- constructor();
16
-
17
- type: "StereoCamera";
18
-
9
+ export class StereoCamera {
10
+ /**
11
+ * The type property is used for detecting the object type
12
+ * in context of serialization/deserialization.
13
+ */
14
+ readonly type: string;
19
15
  /**
20
- * @remarks Expects a `Float`
21
- * @defaultValue `1`
16
+ * The aspect.
17
+ *
18
+ * @default 1
22
19
  */
23
20
  aspect: number;
24
-
25
21
  /**
26
- * @remarks Expects a `Float`
27
- * @defaultValue `0.064`
22
+ * The eye separation which represents the distance
23
+ * between the left and right camera.
24
+ *
25
+ * @default 0.064
28
26
  */
29
27
  eyeSep: number;
30
-
31
28
  /**
32
- * The Left camera.
33
- * A {@link PerspectiveCamera } added to {@link THREE.PerspectiveCamera.layers | layer 1}
34
- * @remarks Objects to be rendered by the **left** camera must also be added to this layer.
29
+ * The camera representing the left eye. This is added to layer `1` so objects to be
30
+ * rendered by the left camera must also be added to this layer.
35
31
  */
36
32
  cameraL: PerspectiveCamera;
37
-
38
33
  /**
39
- * The Right camera.
40
- * A {@link PerspectiveCamera } added to {@link THREE.PerspectiveCamera.layers | layer 2}
41
- * @remarks Objects to be rendered by the **right** camera must also be added to this layer.
34
+ * The camera representing the right eye. This is added to layer `2` so objects to be
35
+ * rendered by the right camera must also be added to this layer.
42
36
  */
43
37
  cameraR: PerspectiveCamera;
44
-
45
38
  /**
46
- * Update the stereo cameras based on the camera passed in.
47
- * @param camera
39
+ * Updates the stereo camera based on the given perspective camera.
40
+ *
41
+ * @param {PerspectiveCamera} camera - The perspective camera.
48
42
  */
49
43
  update(camera: PerspectiveCamera): void;
50
44
  }