@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.
- three/README.md +1 -1
- three/examples/jsm/Addons.d.ts +0 -3
- three/examples/jsm/controls/OrbitControls.d.ts +39 -0
- three/examples/jsm/effects/AnaglyphEffect.d.ts +4 -0
- three/examples/jsm/environments/ColorEnvironment.d.ts +9 -0
- three/examples/jsm/gpgpu/BitonicSort.d.ts +5 -5
- three/examples/jsm/helpers/AnimationPathHelper.d.ts +38 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +4 -1
- three/examples/jsm/inspector/tabs/Parameters.d.ts +3 -0
- three/examples/jsm/inspector/ui/Item.d.ts +5 -0
- three/examples/jsm/libs/meshopt_decoder.module.d.ts +1 -1
- three/examples/jsm/lights/LightProbeGenerator.d.ts +11 -5
- three/examples/jsm/loaders/ColladaLoader.d.ts +27 -4
- three/examples/jsm/objects/SkyMesh.d.ts +11 -6
- three/examples/jsm/objects/Water2Mesh.d.ts +7 -7
- three/examples/jsm/objects/WaterMesh.d.ts +6 -6
- three/examples/jsm/postprocessing/EffectComposer.d.ts +9 -10
- three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +4 -9
- three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +30 -0
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -1
- three/examples/jsm/tsl/display/BilateralBlurNode.d.ts +27 -0
- three/examples/jsm/tsl/display/BloomNode.d.ts +5 -5
- three/examples/jsm/tsl/display/CRT.d.ts +22 -0
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +5 -5
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +4 -6
- three/examples/jsm/tsl/display/GTAONode.d.ts +8 -8
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +4 -2
- three/examples/jsm/tsl/display/GodraysNode.d.ts +20 -0
- three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -6
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +5 -5
- three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -1
- three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -6
- three/examples/jsm/tsl/display/PixelationPassNode.d.ts +10 -10
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +2 -2
- three/examples/jsm/tsl/display/RetroPassNode.d.ts +17 -0
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -1
- three/examples/jsm/tsl/display/SSGINode.d.ts +11 -11
- three/examples/jsm/tsl/display/SSRNode.d.ts +6 -6
- three/examples/jsm/tsl/display/SSSNode.d.ts +5 -5
- three/examples/jsm/tsl/display/Shape.d.ts +3 -0
- three/examples/jsm/tsl/display/TransitionNode.d.ts +3 -3
- three/examples/jsm/tsl/display/boxBlur.d.ts +1 -1
- three/examples/jsm/tsl/display/depthAwareBlend.d.ts +15 -0
- three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
- three/examples/jsm/tsl/math/Bayer.d.ts +2 -0
- three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -2
- three/package.json +3 -3
- three/src/Three.Core.d.ts +1 -1
- three/src/Three.TSL.d.ts +6 -11
- three/src/Three.WebGPU.Nodes.d.ts +2 -0
- three/src/Three.WebGPU.d.ts +3 -0
- three/src/Three.d.ts +2 -2
- three/src/animation/AnimationClip.d.ts +1 -1
- three/src/animation/KeyframeTrack.d.ts +19 -5
- three/src/animation/PropertyMixer.d.ts +5 -4
- three/src/audio/Audio.d.ts +224 -157
- three/src/audio/AudioAnalyser.d.ts +32 -27
- three/src/audio/AudioContext.d.ts +12 -12
- three/src/audio/AudioListener.d.ts +44 -65
- three/src/audio/PositionalAudio.d.ts +69 -62
- three/src/cameras/ArrayCamera.d.ts +21 -24
- three/src/cameras/Camera.d.ts +14 -53
- three/src/cameras/CubeCamera.d.ts +32 -28
- three/src/cameras/OrthographicCamera.d.ts +70 -100
- three/src/cameras/PerspectiveCamera.d.ts +133 -146
- three/src/cameras/StereoCamera.d.ts +24 -30
- three/src/constants.d.ts +14 -2
- three/src/core/Clock.d.ts +3 -0
- three/src/core/Object3D.d.ts +31 -7
- three/src/geometries/TorusGeometry.d.ts +22 -3
- three/src/helpers/ArrowHelper.d.ts +34 -50
- three/src/helpers/AxesHelper.d.ts +22 -36
- three/src/helpers/Box3Helper.d.ts +14 -25
- three/src/helpers/BoxHelper.d.ts +28 -39
- three/src/helpers/CameraHelper.d.ts +31 -52
- three/src/helpers/DirectionalLightHelper.d.ts +32 -53
- three/src/helpers/GridHelper.d.ts +15 -29
- three/src/helpers/HemisphereLightHelper.d.ts +26 -49
- three/src/helpers/PlaneHelper.d.ts +21 -33
- three/src/helpers/PointLightHelper.d.ts +25 -50
- three/src/helpers/PolarGridHelper.d.ts +19 -32
- three/src/helpers/SkeletonHelper.d.ts +26 -50
- three/src/helpers/SpotLightHelper.d.ts +28 -55
- three/src/lights/AmbientLight.d.ts +15 -23
- three/src/lights/DirectionalLight.d.ts +40 -82
- three/src/lights/DirectionalLightShadow.d.ts +6 -61
- three/src/lights/HemisphereLight.d.ts +20 -47
- three/src/lights/Light.d.ts +18 -48
- three/src/lights/LightProbe.d.ts +24 -29
- three/src/lights/LightShadow.d.ts +107 -91
- three/src/lights/PointLight.d.ts +36 -77
- three/src/lights/PointLightShadow.d.ts +9 -6
- three/src/lights/RectAreaLight.d.ts +39 -59
- three/src/lights/SpotLight.d.ts +62 -116
- three/src/lights/SpotLightShadow.d.ts +17 -59
- three/src/lights/webgpu/IESSpotLight.d.ts +13 -1
- three/src/lights/webgpu/ProjectorLight.d.ts +9 -10
- three/src/materials/MeshLambertMaterial.d.ts +6 -0
- three/src/materials/MeshPhongMaterial.d.ts +6 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +0 -6
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +0 -4
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -2
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +0 -2
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +0 -2
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +5 -8
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +0 -4
- three/src/materials/nodes/NodeMaterial.d.ts +9 -3
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +0 -3
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +0 -2
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +39 -93
- three/src/math/Color.d.ts +1 -0
- three/src/math/Vector3.d.ts +2 -2
- three/src/math/interpolants/BezierInterpolant.d.ts +7 -0
- three/src/nodes/Nodes.d.ts +55 -35
- three/src/nodes/TSL.d.ts +2 -5
- three/src/nodes/accessors/Arrays.d.ts +19 -10
- three/src/nodes/accessors/BufferAttributeNode.d.ts +99 -33
- three/src/nodes/accessors/BufferNode.d.ts +21 -7
- three/src/nodes/accessors/Camera.d.ts +10 -10
- three/src/nodes/accessors/CubeTextureNode.d.ts +1 -1
- three/src/nodes/accessors/InstanceNode.d.ts +6 -0
- three/src/nodes/accessors/Lights.d.ts +9 -6
- three/src/nodes/accessors/MaterialNode.d.ts +1 -3
- three/src/nodes/accessors/MaterialProperties.d.ts +4 -4
- three/src/nodes/accessors/MaterialReferenceNode.d.ts +1 -1
- three/src/nodes/accessors/ModelNode.d.ts +34 -17
- three/src/nodes/accessors/MorphNode.d.ts +1 -1
- three/src/nodes/accessors/Normal.d.ts +13 -15
- three/src/nodes/accessors/Object3DNode.d.ts +35 -16
- three/src/nodes/accessors/Position.d.ts +9 -7
- three/src/nodes/accessors/ReferenceNode.d.ts +16 -7
- three/src/nodes/accessors/ReflectVector.d.ts +4 -5
- three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
- three/src/nodes/accessors/SceneProperties.d.ts +5 -0
- three/src/nodes/accessors/SkinningNode.d.ts +5 -3
- three/src/nodes/accessors/StorageBufferNode.d.ts +49 -22
- three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
- three/src/nodes/accessors/Tangent.d.ts +5 -7
- three/src/nodes/accessors/Texture3DNode.d.ts +1 -1
- three/src/nodes/accessors/TextureBicubic.d.ts +3 -2
- three/src/nodes/accessors/TextureNode.d.ts +19 -18
- three/src/nodes/accessors/UV.d.ts +1 -1
- three/src/nodes/accessors/UniformArrayNode.d.ts +10 -8
- three/src/nodes/accessors/UserDataNode.d.ts +1 -1
- three/src/nodes/accessors/VelocityNode.d.ts +3 -3
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
- three/src/nodes/code/FunctionCallNode.d.ts +0 -1
- three/src/nodes/code/FunctionNode.d.ts +7 -3
- three/src/nodes/core/ArrayNode.d.ts +2 -3
- three/src/nodes/core/AttributeNode.d.ts +12 -6
- three/src/nodes/core/BypassNode.d.ts +2 -3
- three/src/nodes/core/ConstNode.d.ts +10 -3
- three/src/nodes/core/ContextNode.d.ts +23 -28
- three/src/nodes/core/IndexNode.d.ts +1 -1
- three/src/nodes/core/InputNode.d.ts +12 -4
- three/src/nodes/core/InspectorNode.d.ts +2 -3
- three/src/nodes/core/IsolateNode.d.ts +2 -7
- three/src/nodes/core/MRTNode.d.ts +7 -0
- three/src/nodes/core/Node.d.ts +258 -39
- three/src/nodes/core/NodeAttribute.d.ts +30 -5
- three/src/nodes/core/NodeBuilder.d.ts +5 -3
- three/src/nodes/core/NodeCache.d.ts +24 -48
- three/src/nodes/core/NodeError.d.ts +9 -0
- three/src/nodes/core/NodeParser.d.ts +2 -0
- three/src/nodes/core/NodeUniform.d.ts +33 -9
- three/src/nodes/core/NodeVar.d.ts +33 -5
- three/src/nodes/core/NodeVarying.d.ts +32 -4
- three/src/nodes/core/ParameterNode.d.ts +11 -4
- three/src/nodes/core/PropertyNode.d.ts +45 -35
- three/src/nodes/core/StackTrace.d.ts +9 -0
- three/src/nodes/core/StructType.d.ts +3 -1
- three/src/nodes/core/StructTypeNode.d.ts +19 -5
- three/src/nodes/core/TempNode.d.ts +9 -3
- three/src/nodes/core/UniformNode.d.ts +53 -15
- three/src/nodes/core/VarNode.d.ts +15 -14
- three/src/nodes/core/VaryingNode.d.ts +14 -19
- three/src/nodes/core/constants.d.ts +9 -4
- three/src/nodes/display/BlendModes.d.ts +7 -27
- three/src/nodes/display/ColorAdjustment.d.ts +8 -9
- three/src/nodes/display/ColorSpaceNode.d.ts +2 -8
- three/src/nodes/display/FrontFacingNode.d.ts +1 -1
- three/src/nodes/display/PassNode.d.ts +9 -5
- three/src/nodes/display/RenderOutputNode.d.ts +3 -7
- three/src/nodes/display/ScreenNode.d.ts +25 -17
- three/src/nodes/display/ToneMappingNode.d.ts +3 -7
- three/src/nodes/display/ViewportDepthNode.d.ts +11 -7
- three/src/nodes/display/ViewportTextureNode.d.ts +2 -0
- three/src/nodes/fog/Fog.d.ts +5 -3
- three/src/nodes/geometry/RangeNode.d.ts +51 -9
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +2 -0
- three/src/nodes/gpgpu/BarrierNode.d.ts +2 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -7
- three/src/nodes/lighting/AnalyticLightNode.d.ts +1 -1
- three/src/nodes/lighting/HemisphereLightNode.d.ts +3 -2
- three/src/nodes/lighting/LightProbeNode.d.ts +1 -1
- three/src/nodes/lighting/LightUtils.d.ts +1 -1
- three/src/nodes/lighting/LightingContextNode.d.ts +1 -1
- three/src/nodes/lighting/SpotLightNode.d.ts +0 -6
- three/src/nodes/materialx/MaterialXNodes.d.ts +11 -11
- three/src/nodes/math/BitcountNode.d.ts +2 -0
- three/src/nodes/math/ConditionalNode.d.ts +43 -22
- three/src/nodes/math/Hash.d.ts +1 -1
- three/src/nodes/math/MathNode.d.ts +603 -267
- three/src/nodes/math/MathUtils.d.ts +9 -5
- three/src/nodes/math/OperatorNode.d.ts +490 -227
- three/src/nodes/math/TriNoise3D.d.ts +3 -3
- three/src/nodes/pmrem/PMREMNode.d.ts +1 -1
- three/src/nodes/procedural/Checker.d.ts +1 -1
- three/src/nodes/tsl/TSLCore.d.ts +1683 -224
- three/src/nodes/utils/ArrayElementNode.d.ts +9 -4
- three/src/nodes/utils/DebugNode.d.ts +2 -5
- three/src/nodes/utils/Discard.d.ts +2 -3
- three/src/nodes/utils/FlipNode.d.ts +11 -0
- three/src/nodes/utils/LoopNode.d.ts +17 -13
- three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
- three/src/nodes/utils/Oscillators.d.ts +4 -4
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +5 -5
- three/src/nodes/utils/RemapNode.d.ts +33 -39
- three/src/nodes/utils/RotateNode.d.ts +17 -8
- three/src/nodes/utils/SplitNode.d.ts +1 -2
- three/src/nodes/utils/SpriteSheetUV.d.ts +7 -0
- three/src/nodes/utils/StorageArrayElementNode.d.ts +18 -9
- three/src/nodes/utils/Timer.d.ts +4 -4
- three/src/nodes/utils/TriplanarTextures.d.ts +2 -2
- three/src/nodes/utils/UVUtils.d.ts +6 -4
- three/src/objects/BatchedMesh.d.ts +6 -4
- three/src/objects/InstancedMesh.d.ts +32 -24
- three/src/renderers/WebGLRenderer.d.ts +4 -93
- three/src/renderers/common/Animation.d.ts +46 -9
- three/src/renderers/common/Attributes.d.ts +11 -13
- three/src/renderers/common/Backend.d.ts +0 -2
- three/src/renderers/common/Background.d.ts +17 -15
- three/src/renderers/common/BindGroup.d.ts +27 -13
- three/src/renderers/common/Binding.d.ts +15 -3
- three/src/renderers/common/Bindings.d.ts +41 -17
- three/src/renderers/common/BlendMode.d.ts +22 -0
- three/src/renderers/common/Buffer.d.ts +35 -11
- three/src/renderers/common/BufferUtils.d.ts +3 -4
- three/src/renderers/common/BundleGroup.d.ts +16 -6
- three/src/renderers/common/CanvasTarget.d.ts +76 -13
- three/src/renderers/common/ChainMap.d.ts +12 -9
- three/src/renderers/common/ClippingContext.d.ts +61 -10
- three/src/renderers/common/Color4.d.ts +10 -5
- three/src/renderers/common/ComputePipeline.d.ts +16 -2
- three/src/renderers/common/Constants.d.ts +5 -3
- three/src/renderers/common/CubeRenderTarget.d.ts +24 -7
- three/src/renderers/common/DataMap.d.ts +10 -18
- three/src/renderers/common/Geometries.d.ts +39 -20
- three/src/renderers/common/Info.d.ts +62 -9
- three/src/renderers/common/InspectorBase.d.ts +19 -7
- three/src/renderers/common/Lighting.d.ts +2 -6
- three/src/renderers/common/Pipeline.d.ts +14 -2
- three/src/renderers/common/Pipelines.d.ts +58 -60
- three/src/renderers/common/PostProcessing.d.ts +14 -17
- three/src/renderers/common/ProgrammableStage.d.ts +48 -8
- three/src/renderers/common/RenderBundle.d.ts +4 -2
- three/src/renderers/common/RenderBundles.d.ts +6 -3
- three/src/renderers/common/RenderContext.d.ts +175 -7
- three/src/renderers/common/RenderContexts.d.ts +20 -25
- three/src/renderers/common/RenderList.d.ts +77 -11
- three/src/renderers/common/RenderLists.d.ts +16 -4
- three/src/renderers/common/RenderObject.d.ts +223 -47
- three/src/renderers/common/RenderObjectPipeline.d.ts +33 -0
- three/src/renderers/common/RenderObjects.d.ts +55 -22
- three/src/renderers/common/RenderPipeline.d.ts +20 -17
- three/src/renderers/common/Renderer.d.ts +625 -207
- three/src/renderers/common/Textures.d.ts +24 -46
- three/src/renderers/common/TimestampQueryPool.d.ts +62 -8
- three/src/renderers/common/Uniform.d.ts +143 -58
- three/src/renderers/common/UniformBuffer.d.ts +7 -5
- three/src/renderers/common/UniformsGroup.d.ts +50 -35
- three/src/renderers/common/XRManager.d.ts +321 -83
- three/src/renderers/common/XRRenderTarget.d.ts +49 -6
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +75 -15
- three/src/renderers/common/nodes/NodeLibrary.d.ts +25 -5
- three/src/renderers/common/nodes/{Nodes.d.ts → NodeManager.d.ts} +54 -73
- three/src/renderers/common/nodes/NodeUniform.d.ts +60 -70
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +23 -4
- three/src/renderers/shaders/UniformsLib.d.ts +0 -3
- three/src/renderers/webgl/WebGLAttributes.d.ts +9 -7
- three/src/renderers/webgl/WebGLEnvironments.d.ts +8 -0
- three/src/renderers/webgl/WebGLExtensions.d.ts +1 -1
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +9 -5
- three/src/renderers/webgl/WebGLLights.d.ts +19 -18
- three/src/renderers/webgl/WebGLObjects.d.ts +15 -2
- three/src/renderers/webgl/WebGLProgram.d.ts +2 -10
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -2
- three/src/renderers/webgl/WebGLRenderLists.d.ts +1 -3
- three/src/renderers/webgl/WebGLShadowMap.d.ts +0 -5
- three/src/renderers/webgl/WebGLState.d.ts +305 -28
- three/src/renderers/webgl/WebGLTextures.d.ts +10 -9
- three/src/renderers/webgl/WebGLUniforms.d.ts +0 -7
- three/src/renderers/webgpu/WebGPUBackend.d.ts +0 -1
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +2 -4
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +15 -4
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -1
- three/src/scenes/Fog.d.ts +31 -37
- three/src/scenes/FogExp2.d.ts +26 -31
- three/src/scenes/Scene.d.ts +51 -65
- three/src/textures/CompressedArrayTexture.d.ts +1 -1
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/utils.d.ts +5 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -18
- three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +0 -13
- three/examples/jsm/shaders/GodRaysShader.d.ts +0 -44
- three/src/nodes/accessors/SceneNode.d.ts +0 -21
- three/src/nodes/code/ScriptableNode.d.ts +0 -21
- three/src/nodes/code/ScriptableValueNode.d.ts +0 -9
- three/src/nodes/display/PosterizeNode.d.ts +0 -13
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +0 -15
- three/src/renderers/webgl/WebGLCubeMaps.d.ts +0 -8
- 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
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
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
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* @param left
|
|
54
|
-
* @param right
|
|
55
|
-
* @param top
|
|
56
|
-
* @param bottom
|
|
57
|
-
* @param near
|
|
58
|
-
* @param far
|
|
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
|
-
*
|
|
71
|
-
*
|
|
53
|
+
* This flag can be used for type testing.
|
|
54
|
+
*
|
|
55
|
+
* @default true
|
|
72
56
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
readonly isOrthographicCamera: boolean;
|
|
75
58
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
59
|
+
* The zoom factor of the camera.
|
|
60
|
+
*
|
|
61
|
+
* @default 1
|
|
78
62
|
*/
|
|
79
63
|
zoom: number;
|
|
80
|
-
|
|
81
64
|
/**
|
|
82
|
-
*
|
|
83
|
-
* @
|
|
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:
|
|
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
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* @
|
|
80
|
+
* The left plane of the camera's frustum.
|
|
81
|
+
*
|
|
82
|
+
* @default -1
|
|
99
83
|
*/
|
|
100
84
|
left: number;
|
|
101
|
-
|
|
102
85
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
86
|
+
* The right plane of the camera's frustum.
|
|
87
|
+
*
|
|
88
|
+
* @default 1
|
|
106
89
|
*/
|
|
107
90
|
right: number;
|
|
108
|
-
|
|
109
91
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* @
|
|
92
|
+
* The top plane of the camera's frustum.
|
|
93
|
+
*
|
|
94
|
+
* @default 1
|
|
113
95
|
*/
|
|
114
96
|
top: number;
|
|
115
|
-
|
|
116
97
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* @
|
|
98
|
+
* The bottom plane of the camera's frustum.
|
|
99
|
+
*
|
|
100
|
+
* @default -1
|
|
120
101
|
*/
|
|
121
102
|
bottom: number;
|
|
122
|
-
|
|
123
103
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* @
|
|
128
|
-
*
|
|
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
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* @
|
|
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
|
-
*
|
|
142
|
-
*
|
|
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
|
-
|
|
145
|
-
|
|
133
|
+
setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void;
|
|
146
134
|
/**
|
|
147
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
139
|
+
* Updates the camera's projection matrix. Must be called after any change of
|
|
140
|
+
* camera properties.
|
|
170
141
|
*/
|
|
171
|
-
|
|
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
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* ```
|
|
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
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @param fov
|
|
56
|
-
* @param aspect
|
|
57
|
-
* @param near
|
|
58
|
-
* @param far
|
|
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
|
-
*
|
|
77
|
-
*
|
|
55
|
+
* This flag can be used for type testing.
|
|
56
|
+
*
|
|
57
|
+
* @default true
|
|
78
58
|
*/
|
|
79
|
-
|
|
80
|
-
|
|
59
|
+
readonly isPerspectiveCamera: boolean;
|
|
81
60
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
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
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* @
|
|
68
|
+
* The zoom factor of the camera.
|
|
69
|
+
*
|
|
70
|
+
* @default 1
|
|
92
71
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
72
|
+
zoom: number;
|
|
95
73
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* @
|
|
100
|
-
*
|
|
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
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* @
|
|
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
|
-
*
|
|
115
|
-
* @
|
|
116
|
-
*
|
|
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
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* @
|
|
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:
|
|
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
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
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
|
|
145
|
-
*
|
|
146
|
-
* @
|
|
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
|
-
*
|
|
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
|
-
|
|
154
|
-
|
|
142
|
+
setFocalLength(focalLength: number): void;
|
|
155
143
|
/**
|
|
156
|
-
*
|
|
157
|
-
* @
|
|
158
|
-
*
|
|
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
|
-
|
|
161
|
-
|
|
149
|
+
getFocalLength(): number;
|
|
162
150
|
/**
|
|
163
|
-
* Returns the current vertical field of view angle in degrees considering {@link 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
|
-
* @
|
|
170
|
-
*
|
|
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
|
-
* @
|
|
177
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
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
|
-
* ```
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
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
|
-
*
|
|
229
|
-
* @param
|
|
230
|
-
* @param
|
|
231
|
-
* @param
|
|
232
|
-
* @param
|
|
233
|
-
* @param
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
*
|
|
21
|
-
*
|
|
16
|
+
* The aspect.
|
|
17
|
+
*
|
|
18
|
+
* @default 1
|
|
22
19
|
*/
|
|
23
20
|
aspect: number;
|
|
24
|
-
|
|
25
21
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
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
|
|
33
|
-
*
|
|
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
|
|
40
|
-
*
|
|
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
|
-
*
|
|
47
|
-
*
|
|
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
|
}
|