@types/three 0.181.0 → 0.183.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +1 -1
- three/examples/jsm/Addons.d.ts +0 -3
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/DragControls.d.ts +1 -1
- three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
- three/examples/jsm/controls/FlyControls.d.ts +1 -1
- three/examples/jsm/controls/OrbitControls.d.ts +40 -1
- three/examples/jsm/controls/PointerLockControls.d.ts +1 -1
- three/examples/jsm/controls/TrackballControls.d.ts +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +1 -1
- 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/loaders/UltraHDRLoader.d.ts +7 -0
- three/examples/jsm/loaders/VOXLoader.d.ts +22 -5
- three/examples/jsm/math/Octree.d.ts +36 -14
- three/examples/jsm/objects/SkyMesh.d.ts +16 -6
- three/examples/jsm/objects/Water2Mesh.d.ts +7 -7
- three/examples/jsm/objects/WaterMesh.d.ts +6 -6
- three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
- three/examples/jsm/postprocessing/EffectComposer.d.ts +9 -10
- three/examples/jsm/postprocessing/OutputPass.d.ts +10 -6
- three/examples/jsm/postprocessing/RenderPass.d.ts +15 -10
- three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +4 -9
- three/examples/jsm/transpiler/AST.d.ts +17 -0
- three/examples/jsm/transpiler/TSLEncoder.d.ts +2 -0
- 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/BleachBypass.d.ts +1 -1
- 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 +7 -5
- three/examples/jsm/tsl/display/Shape.d.ts +3 -0
- three/examples/jsm/tsl/display/TRAANode.d.ts +5 -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/display/radialBlur.d.ts +12 -0
- three/examples/jsm/tsl/math/Bayer.d.ts +2 -0
- three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -2
- three/package.json +4 -4
- three/src/Three.Core.d.ts +1 -1
- three/src/Three.TSL.d.ts +20 -13
- 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/AnimationMixer.d.ts +42 -0
- three/src/animation/AnimationUtils.d.ts +3 -8
- 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 +28 -2
- three/src/core/BufferGeometry.d.ts +3 -1
- three/src/core/Clock.d.ts +3 -0
- three/src/core/Object3D.d.ts +31 -7
- three/src/extras/Controls.d.ts +3 -3
- 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 +49 -83
- three/src/lights/DirectionalLightShadow.d.ts +6 -61
- three/src/lights/HemisphereLight.d.ts +27 -47
- three/src/lights/Light.d.ts +22 -56
- three/src/lights/LightProbe.d.ts +31 -32
- three/src/lights/LightShadow.d.ts +107 -91
- three/src/lights/PointLight.d.ts +47 -77
- three/src/lights/PointLightShadow.d.ts +7 -11
- three/src/lights/RectAreaLight.d.ts +39 -59
- three/src/lights/SpotLight.d.ts +78 -117
- 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/Material.d.ts +1 -0
- three/src/materials/MeshLambertMaterial.d.ts +6 -0
- three/src/materials/MeshPhongMaterial.d.ts +6 -0
- three/src/materials/ShaderMaterial.d.ts +18 -3
- 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 +15 -2
- 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 +6 -6
- three/src/nodes/accessors/Arrays.d.ts +19 -10
- three/src/nodes/accessors/BufferAttributeNode.d.ts +108 -41
- 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 +13 -6
- 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 +13 -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 +32 -21
- 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/NodeUtils.d.ts +1 -1
- 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 -33
- 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/NormalMapNode.d.ts +3 -1
- three/src/nodes/display/PassNode.d.ts +16 -4
- 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/functions/BSDF/DFGLUT.d.ts +12 -0
- three/src/nodes/functions/PhysicalLightingModel.d.ts +8 -1
- 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 +3 -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/PointShadowNode.d.ts +11 -15
- three/src/nodes/lighting/ShadowFilterNode.d.ts +2 -0
- 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 +23 -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/PackFloatNode.d.ts +19 -0
- three/src/nodes/math/TriNoise3D.d.ts +3 -3
- three/src/nodes/math/UnpackFloatNode.d.ts +18 -0
- 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 -2
- three/src/nodes/utils/PostProcessingUtils.d.ts +6 -4
- 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 +8 -3
- three/src/objects/BatchedMesh.d.ts +6 -4
- three/src/objects/InstancedMesh.d.ts +32 -24
- three/src/objects/LOD.d.ts +1 -1
- three/src/objects/Skeleton.d.ts +4 -2
- three/src/renderers/WebGLRenderer.d.ts +25 -96
- 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 +21 -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 +53 -5
- 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 +18 -8
- 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 +45 -19
- 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 +21 -24
- 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 +229 -47
- three/src/renderers/common/{RenderPipeline.d.ts → RenderObjectPipeline.d.ts} +17 -5
- three/src/renderers/common/RenderObjects.d.ts +55 -22
- three/src/renderers/common/Renderer.d.ts +645 -216
- 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 +51 -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/ShaderLib.d.ts +1 -1
- three/src/renderers/shaders/UniformsLib.d.ts +0 -3
- three/src/renderers/webgl/WebGLAttributes.d.ts +9 -7
- three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
- 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 -3
- 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/CubeDepthTexture.d.ts +41 -0
- three/src/textures/CubeTexture.d.ts +4 -4
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/utils.d.ts +18 -1
- 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/functions/BSDF/DFGApprox.d.ts +0 -10
- 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
|
@@ -1,96 +1,75 @@
|
|
|
1
1
|
import { Object3D } from "../core/Object3D.js";
|
|
2
|
-
import { AudioContext } from "./AudioContext.js";
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
* The
|
|
6
|
-
* A three.js application usually creates a single
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* ```typescript
|
|
12
|
-
* // create an {@link AudioListener} and add it to the camera
|
|
13
|
-
* const listener = new THREE.AudioListener();
|
|
14
|
-
* camera.add(listener);
|
|
15
|
-
* // create a global audio source
|
|
16
|
-
* const sound = new THREE.Audio(listener);
|
|
17
|
-
* // load a sound and set it as the Audio object's buffer
|
|
18
|
-
* const audioLoader = new THREE.AudioLoader();
|
|
19
|
-
* audioLoader.load('sounds/ambient.ogg', function (buffer) {
|
|
20
|
-
* sound.setBuffer(buffer);
|
|
21
|
-
* sound.setLoop(true);
|
|
22
|
-
* sound.setVolume(0.5);
|
|
23
|
-
* sound.play();
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
* @see Example: {@link https://threejs.org/examples/#webaudio_sandbox | webaudio / sandbox }
|
|
27
|
-
* @see Example: {@link https://threejs.org/examples/#webaudio_timing | webaudio / timing }
|
|
28
|
-
* @see Example: {@link https://threejs.org/examples/#webaudio_visualizer | webaudio / visualizer }
|
|
29
|
-
* @see {@link https://threejs.org/docs/index.html#api/en/audio/AudioListener | Official Documentation}
|
|
30
|
-
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/audio/AudioListener.js | Source}
|
|
4
|
+
* The class represents a virtual listener of the all positional and non-positional audio effects
|
|
5
|
+
* in the scene. A three.js application usually creates a single listener. It is a mandatory
|
|
6
|
+
* constructor parameter for audios entities like {@link Audio} and {@link PositionalAudio}.
|
|
7
|
+
*
|
|
8
|
+
* In most cases, the listener object is a child of the camera. So the 3D transformation of the
|
|
9
|
+
* camera represents the 3D transformation of the listener.
|
|
31
10
|
*/
|
|
32
11
|
export class AudioListener extends Object3D {
|
|
33
12
|
/**
|
|
34
|
-
*
|
|
13
|
+
* The native audio context.
|
|
35
14
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
15
|
+
readonly context: AudioContext;
|
|
38
16
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @remarks Sub-classes will update this value.
|
|
41
|
-
* @defaultValue `AudioListener`
|
|
17
|
+
* The gain node used for volume control.
|
|
42
18
|
*/
|
|
43
|
-
readonly
|
|
44
|
-
|
|
19
|
+
readonly gain: GainNode;
|
|
45
20
|
/**
|
|
46
|
-
*
|
|
21
|
+
* An optional filter.
|
|
22
|
+
*
|
|
23
|
+
* Defined via {@link AudioListener#setFilter}.
|
|
24
|
+
*
|
|
25
|
+
* @default null
|
|
47
26
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
readonly filter: AudioNode | null;
|
|
50
28
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
29
|
+
* Time delta values required for `linearRampToValueAtTime()` usage.
|
|
30
|
+
*
|
|
31
|
+
* @default 0
|
|
53
32
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @defaultValue `null`
|
|
58
|
-
*/
|
|
59
|
-
filter: AudioNode;
|
|
60
|
-
|
|
33
|
+
readonly timeDelta: number;
|
|
61
34
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Return the {@link AudioListener.gain | gainNode}.
|
|
35
|
+
* Returns the listener's input node.
|
|
36
|
+
*
|
|
37
|
+
* This method is used by other audio nodes to connect to this listener.
|
|
38
|
+
*
|
|
39
|
+
* @return {GainNode} The input node.
|
|
69
40
|
*/
|
|
70
41
|
getInput(): GainNode;
|
|
71
42
|
/**
|
|
72
|
-
*
|
|
43
|
+
* Removes the current filter from this listener.
|
|
44
|
+
*
|
|
45
|
+
* @return {AudioListener} A reference to this listener.
|
|
73
46
|
*/
|
|
74
47
|
removeFilter(): this;
|
|
75
|
-
|
|
76
48
|
/**
|
|
77
|
-
* Returns the
|
|
49
|
+
* Returns the current set filter.
|
|
50
|
+
*
|
|
51
|
+
* @return {?AudioNode} The filter.
|
|
78
52
|
*/
|
|
79
|
-
getFilter(): AudioNode;
|
|
53
|
+
getFilter(): AudioNode | null;
|
|
80
54
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
55
|
+
* Sets the given filter to this listener.
|
|
56
|
+
*
|
|
57
|
+
* @param {AudioNode} value - The filter to set.
|
|
58
|
+
* @return {AudioListener} A reference to this listener.
|
|
83
59
|
*/
|
|
84
60
|
setFilter(value: AudioNode): this;
|
|
85
|
-
|
|
86
61
|
/**
|
|
87
|
-
*
|
|
62
|
+
* Returns the applications master volume.
|
|
63
|
+
*
|
|
64
|
+
* @return {number} The master volume.
|
|
88
65
|
*/
|
|
89
66
|
getMasterVolume(): number;
|
|
90
|
-
|
|
91
67
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
68
|
+
* Sets the applications master volume. This volume setting affects
|
|
69
|
+
* all audio nodes in the scene.
|
|
70
|
+
*
|
|
71
|
+
* @param {number} value - The master volume to set.
|
|
72
|
+
* @return {AudioListener} A reference to this listener.
|
|
94
73
|
*/
|
|
95
74
|
setMasterVolume(value: number): this;
|
|
96
75
|
}
|
|
@@ -1,101 +1,108 @@
|
|
|
1
1
|
import { Audio } from "./Audio.js";
|
|
2
|
-
import { AudioListener } from "./AudioListener.js";
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* ```typescript
|
|
4
|
+
* Represents a positional audio object.
|
|
5
|
+
*
|
|
6
|
+
* ```js
|
|
9
7
|
* // create an AudioListener and add it to the camera
|
|
10
8
|
* const listener = new THREE.AudioListener();
|
|
11
|
-
* camera.add(listener);
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* camera.add( listener );
|
|
10
|
+
*
|
|
11
|
+
* // create the PositionalAudio object (passing in the listener)
|
|
12
|
+
* const sound = new THREE.PositionalAudio( listener );
|
|
13
|
+
*
|
|
14
|
+
* // load a sound and set it as the PositionalAudio object's buffer
|
|
15
15
|
* const audioLoader = new THREE.AudioLoader();
|
|
16
|
-
* audioLoader.load('sounds/song.ogg', function
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* audioLoader.load( 'sounds/song.ogg', function( buffer ) {
|
|
17
|
+
* sound.setBuffer( buffer );
|
|
18
|
+
* sound.setRefDistance( 20 );
|
|
19
|
+
* sound.play();
|
|
20
20
|
* });
|
|
21
|
+
*
|
|
21
22
|
* // create an object for the sound to play from
|
|
22
|
-
* const sphere = new THREE.SphereGeometry(20, 32, 16);
|
|
23
|
-
* const material = new THREE.MeshPhongMaterial({
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* scene.add(mesh);
|
|
23
|
+
* const sphere = new THREE.SphereGeometry( 20, 32, 16 );
|
|
24
|
+
* const material = new THREE.MeshPhongMaterial( { color: 0xff2200 } );
|
|
25
|
+
* const mesh = new THREE.Mesh( sphere, material );
|
|
26
|
+
* scene.add( mesh );
|
|
27
|
+
*
|
|
28
28
|
* // finally add the sound to the mesh
|
|
29
|
-
* mesh.add(sound);
|
|
30
|
-
* ```
|
|
31
|
-
* @see Example: {@link https://threejs.org/examples/#webaudio_orientation | webaudio / orientation }
|
|
32
|
-
* @see Example: {@link https://threejs.org/examples/#webaudio_sandbox | webaudio / sandbox }
|
|
33
|
-
* @see Example: {@link https://threejs.org/examples/#webaudio_timing | webaudio / timing }
|
|
34
|
-
* @see {@link https://threejs.org/docs/index.html#api/en/audio/PositionalAudio | Official Documentation}
|
|
35
|
-
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/audio/PositionalAudio.js | Source}
|
|
29
|
+
* mesh.add( sound );
|
|
36
30
|
*/
|
|
37
31
|
export class PositionalAudio extends Audio<PannerNode> {
|
|
38
32
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
constructor(listener: AudioListener);
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* The PositionalAudio's {@link https://developer.mozilla.org/en-US/docs/Web/API/PannerNode | PannerNode}.
|
|
46
|
-
*/
|
|
47
|
-
panner: PannerNode;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Returns the {@link PositionalAudio.panner | panner}.
|
|
33
|
+
* The panner node represents the location, direction, and behavior of an audio
|
|
34
|
+
* source in 3D space.
|
|
51
35
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
36
|
+
readonly panner: PannerNode;
|
|
37
|
+
disconnect(): this;
|
|
54
38
|
/**
|
|
55
|
-
* Returns the
|
|
39
|
+
* Returns the current reference distance.
|
|
40
|
+
*
|
|
41
|
+
* @return {number} The reference distance.
|
|
56
42
|
*/
|
|
57
43
|
getRefDistance(): number;
|
|
58
44
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
45
|
+
* Defines the reference distance for reducing volume as the audio source moves
|
|
46
|
+
* further from the listener – i.e. the distance at which the volume reduction
|
|
47
|
+
* starts taking effect.
|
|
48
|
+
*
|
|
49
|
+
* @param {number} value - The reference distance to set.
|
|
50
|
+
* @return {PositionalAudio} A reference to this instance.
|
|
61
51
|
*/
|
|
62
52
|
setRefDistance(value: number): this;
|
|
63
|
-
|
|
64
53
|
/**
|
|
65
|
-
* Returns the
|
|
54
|
+
* Returns the current rolloff factor.
|
|
55
|
+
*
|
|
56
|
+
* @return {number} The rolloff factor.
|
|
66
57
|
*/
|
|
67
58
|
getRolloffFactor(): number;
|
|
68
59
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
60
|
+
* Defines how quickly the volume is reduced as the source moves away from the listener.
|
|
61
|
+
*
|
|
62
|
+
* @param {number} value - The rolloff factor.
|
|
63
|
+
* @return {PositionalAudio} A reference to this instance.
|
|
71
64
|
*/
|
|
72
65
|
setRolloffFactor(value: number): this;
|
|
73
|
-
|
|
74
66
|
/**
|
|
75
|
-
* Returns the
|
|
67
|
+
* Returns the current distance model.
|
|
68
|
+
*
|
|
69
|
+
* @return {('linear'|'inverse'|'exponential')} The distance model.
|
|
76
70
|
*/
|
|
77
|
-
getDistanceModel():
|
|
71
|
+
getDistanceModel(): "linear" | "inverse" | "exponential";
|
|
78
72
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
73
|
+
* Defines which algorithm to use to reduce the volume of the audio source
|
|
74
|
+
* as it moves away from the listener.
|
|
75
|
+
*
|
|
76
|
+
* Read [the spec](https://www.w3.org/TR/webaudio-1.1/#enumdef-distancemodeltype)
|
|
77
|
+
* for more details.
|
|
78
|
+
*
|
|
79
|
+
* @param {('linear'|'inverse'|'exponential')} value - The distance model to set.
|
|
80
|
+
* @return {PositionalAudio} A reference to this instance.
|
|
81
81
|
*/
|
|
82
|
-
setDistanceModel(value:
|
|
83
|
-
|
|
82
|
+
setDistanceModel(value: "linear" | "inverse" | "exponential"): this;
|
|
84
83
|
/**
|
|
85
|
-
* Returns the
|
|
84
|
+
* Returns the current max distance.
|
|
85
|
+
*
|
|
86
|
+
* @return {number} The max distance.
|
|
86
87
|
*/
|
|
87
88
|
getMaxDistance(): number;
|
|
88
89
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
90
|
+
* Defines the maximum distance between the audio source and the listener,
|
|
91
|
+
* after which the volume is not reduced any further.
|
|
92
|
+
*
|
|
93
|
+
* This value is used only by the `linear` distance model.
|
|
94
|
+
*
|
|
95
|
+
* @param {number} value - The max distance.
|
|
96
|
+
* @return {PositionalAudio} A reference to this instance.
|
|
91
97
|
*/
|
|
92
98
|
setMaxDistance(value: number): this;
|
|
93
|
-
|
|
94
99
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* @param
|
|
98
|
-
* @param
|
|
100
|
+
* Sets the directional cone in which the audio can be listened.
|
|
101
|
+
*
|
|
102
|
+
* @param {number} coneInnerAngle - An angle, in degrees, of a cone inside of which there will be no volume reduction.
|
|
103
|
+
* @param {number} coneOuterAngle - An angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the `coneOuterGain` parameter.
|
|
104
|
+
* @param {number} coneOuterGain - The amount of volume reduction outside the cone defined by the `coneOuterAngle`. When set to `0`, no sound can be heard.
|
|
105
|
+
* @return {PositionalAudio} A reference to this instance.
|
|
99
106
|
*/
|
|
100
107
|
setDirectionalCone(coneInnerAngle: number, coneOuterAngle: number, coneOuterGain: number): this;
|
|
101
108
|
}
|
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
import { PerspectiveCamera } from "./PerspectiveCamera.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/ArrayCamera.js | Source}
|
|
4
|
+
* This type of camera can be used in order to efficiently render a scene with a
|
|
5
|
+
* predefined set of cameras. This is an important performance aspect for
|
|
6
|
+
* rendering VR scenes.
|
|
7
|
+
*
|
|
8
|
+
* An instance of `ArrayCamera` always has an array of sub cameras. It's mandatory
|
|
9
|
+
* to define for each sub camera the `viewport` property which determines the
|
|
10
|
+
* part of the viewport that is rendered with this camera.
|
|
12
11
|
*/
|
|
13
12
|
export class ArrayCamera extends PerspectiveCamera {
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
14
|
+
* Constructs a new array camera.
|
|
15
|
+
*
|
|
16
|
+
* @param {Array<PerspectiveCamera>} [array=[]] - An array of perspective sub cameras.
|
|
18
17
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
constructor(array?: PerspectiveCamera[]);
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* This flag can be used for type testing.
|
|
21
|
+
*
|
|
22
|
+
* @default true
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
readonly isArrayCamera: boolean;
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* Whether this camera is used with multiview rendering or not.
|
|
27
|
+
*
|
|
28
|
+
* @default false
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
index: number;
|
|
33
|
-
|
|
30
|
+
readonly isMultiViewCamera: boolean;
|
|
34
31
|
/**
|
|
35
|
-
* An array of cameras.
|
|
32
|
+
* An array of perspective sub cameras.
|
|
36
33
|
*/
|
|
37
|
-
|
|
34
|
+
cameras: PerspectiveCamera[];
|
|
38
35
|
}
|
three/src/cameras/Camera.d.ts
CHANGED
|
@@ -1,81 +1,42 @@
|
|
|
1
1
|
import { CoordinateSystem } from "../constants.js";
|
|
2
|
-
import { Layers } from "../core/Layers.js";
|
|
3
2
|
import { Object3D } from "../core/Object3D.js";
|
|
4
3
|
import { Matrix4 } from "../math/Matrix4.js";
|
|
5
|
-
import { Vector3 } from "../math/Vector3.js";
|
|
6
4
|
import { Vector4 } from "../math/Vector4.js";
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
|
-
* Abstract base class for cameras
|
|
10
|
-
*
|
|
11
|
-
* This class should always be inherited when you build a new camera.
|
|
12
|
-
* @see {@link https://threejs.org/docs/index.html#api/en/cameras/Camera | Official Documentation}
|
|
13
|
-
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/Camera.js | Source}
|
|
7
|
+
* Abstract base class for cameras. This class should always be inherited
|
|
8
|
+
* when you build a new camera.
|
|
14
9
|
*/
|
|
15
10
|
export class Camera extends Object3D {
|
|
16
11
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @
|
|
20
|
-
*/
|
|
21
|
-
readonly isCamera: true;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @override
|
|
25
|
-
* @defaultValue `Camera`
|
|
26
|
-
*/
|
|
27
|
-
override readonly type: string | "Camera";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @override
|
|
31
|
-
* The {@link Layers | layers} that the {@link Camera} is a member of.
|
|
32
|
-
* @remarks Objects must share at least one layer with the {@link Camera} to be n when the camera's viewpoint is rendered.
|
|
33
|
-
* @defaultValue `new THREE.Layers()`
|
|
12
|
+
* This flag can be used for type testing.
|
|
13
|
+
*
|
|
14
|
+
* @default true
|
|
34
15
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
16
|
+
readonly isCamera: boolean;
|
|
37
17
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @remarks MatrixWorld contains the Matrix which has the world transform of the {@link Camera} .
|
|
40
|
-
* @defaultValue {@link Matrix4 | `new THREE.Matrix4()`}
|
|
18
|
+
* The inverse of the camera's world matrix.
|
|
41
19
|
*/
|
|
42
20
|
matrixWorldInverse: Matrix4;
|
|
43
|
-
|
|
44
21
|
/**
|
|
45
|
-
*
|
|
46
|
-
* @defaultValue {@link Matrix4 | `new THREE.Matrix4()`}
|
|
22
|
+
* The camera's projection matrix.
|
|
47
23
|
*/
|
|
48
24
|
projectionMatrix: Matrix4;
|
|
49
|
-
|
|
50
25
|
/**
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue {@link Matrix4 | `new THREE.Matrix4()`}
|
|
26
|
+
* The inverse of the camera's projection matrix.
|
|
53
27
|
*/
|
|
54
28
|
projectionMatrixInverse: Matrix4;
|
|
55
|
-
|
|
56
|
-
coordinateSystem: CoordinateSystem;
|
|
57
|
-
|
|
58
|
-
viewport?: Vector4;
|
|
59
|
-
|
|
60
29
|
/**
|
|
61
|
-
*
|
|
62
|
-
* Note that this class is not intended to be called directly; you probably want a
|
|
63
|
-
* {@link PerspectiveCamera | PerspectiveCamera} or
|
|
64
|
-
* {@link OrthographicCamera | OrthographicCamera} instead.
|
|
30
|
+
* The coordinate system in which the camera is used.
|
|
65
31
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
32
|
+
coordinateSystem: CoordinateSystem;
|
|
33
|
+
viewport?: Vector4;
|
|
68
34
|
/**
|
|
69
35
|
* The flag that indicates whether the camera uses a reversed depth buffer.
|
|
70
36
|
*
|
|
71
37
|
* @default false
|
|
72
38
|
*/
|
|
73
39
|
get reversedDepth(): boolean;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* Returns a {@link Vector3 | Vector3} representing the world space direction in which the {@link Camera} is looking.
|
|
77
|
-
* @remarks Note: A {@link Camera} looks down its local, negative z-axis.
|
|
78
|
-
* @param target The result will be copied into this Vector3.
|
|
79
|
-
*/
|
|
80
|
-
getWorldDirection(target: Vector3): Vector3;
|
|
40
|
+
copy(source: Camera, recursive?: boolean): this;
|
|
41
|
+
clone(): this;
|
|
81
42
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CoordinateSystem } from "../constants.js";
|
|
2
2
|
import { Object3D } from "../core/Object3D.js";
|
|
3
3
|
import { RenderTarget } from "../core/RenderTarget.js";
|
|
4
|
+
import CubeRenderTarget from "../renderers/common/CubeRenderTarget.js";
|
|
4
5
|
import { WebGLCubeRenderTarget } from "../renderers/WebGLCubeRenderTarget.js";
|
|
5
6
|
import { Camera } from "./Camera.js";
|
|
6
7
|
|
|
@@ -21,12 +22,13 @@ export interface CubeCameraRenderer {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* A special type of camera that is positioned in 3D space to render its surroundings into a
|
|
26
|
+
* cube render target. The render target can then be used as an environment map for rendering
|
|
27
|
+
* realtime reflections in your scene.
|
|
28
|
+
*
|
|
29
|
+
* ```js
|
|
28
30
|
* // Create cube render target
|
|
29
|
-
* const cubeRenderTarget = new THREE.WebGLCubeRenderTarget(
|
|
31
|
+
* const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 256, { generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } );
|
|
30
32
|
*
|
|
31
33
|
* // Create cube camera
|
|
32
34
|
* const cubeCamera = new THREE.CubeCamera( 1, 100000, cubeRenderTarget );
|
|
@@ -46,40 +48,42 @@ export interface CubeCameraRenderer {
|
|
|
46
48
|
* car.visible = true;
|
|
47
49
|
* renderer.render( scene, camera );
|
|
48
50
|
* ```
|
|
49
|
-
* @see Example: {@link https://threejs.org/examples/#webgl_materials_cubemap_dynamic | materials / cubemap / dynamic }
|
|
50
|
-
* @see {@link https://threejs.org/docs/index.html#api/en/cameras/CubeCamera | Official Documentation}
|
|
51
|
-
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/CubeCamera.js | Source}
|
|
52
51
|
*/
|
|
53
52
|
export class CubeCamera extends Object3D {
|
|
54
53
|
/**
|
|
55
|
-
* Constructs a
|
|
56
|
-
*
|
|
57
|
-
* @param
|
|
58
|
-
* @param
|
|
54
|
+
* Constructs a new cube camera.
|
|
55
|
+
*
|
|
56
|
+
* @param {number} near - The camera's near plane.
|
|
57
|
+
* @param {number} far - The camera's far plane.
|
|
58
|
+
* @param {WebGLCubeRenderTarget} renderTarget - The cube render target.
|
|
59
59
|
*/
|
|
60
|
-
constructor(near: number, far: number, renderTarget: WebGLCubeRenderTarget);
|
|
61
|
-
|
|
60
|
+
constructor(near: number, far: number, renderTarget: WebGLCubeRenderTarget | CubeRenderTarget);
|
|
62
61
|
/**
|
|
63
|
-
*
|
|
64
|
-
* @defaultValue `CubeCamera`
|
|
62
|
+
* A reference to the cube render target.
|
|
65
63
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
renderTarget: WebGLCubeRenderTarget;
|
|
68
65
|
/**
|
|
69
|
-
* The
|
|
66
|
+
* The current active coordinate system.
|
|
67
|
+
*
|
|
68
|
+
* @default null
|
|
69
|
+
*/
|
|
70
|
+
coordinateSystem: CoordinateSystem | null;
|
|
71
|
+
/**
|
|
72
|
+
* The current active mipmap level
|
|
73
|
+
*
|
|
74
|
+
* @default 0
|
|
70
75
|
*/
|
|
71
|
-
renderTarget: WebGLCubeRenderTarget;
|
|
72
|
-
|
|
73
|
-
coordinateSystem: CoordinateSystem;
|
|
74
|
-
|
|
75
76
|
activeMipmapLevel: number;
|
|
76
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Must be called when the coordinate system of the cube camera is changed.
|
|
79
|
+
*/
|
|
77
80
|
updateCoordinateSystem(): void;
|
|
78
|
-
|
|
79
81
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
82
|
+
* Calling this method will render the given scene with the given renderer
|
|
83
|
+
* into the cube render target of the camera.
|
|
84
|
+
*
|
|
85
|
+
* @param {(Renderer|WebGLRenderer)} renderer - The renderer.
|
|
86
|
+
* @param {Scene} scene - The scene to render.
|
|
83
87
|
*/
|
|
84
88
|
update(renderer: CubeCameraRenderer, scene: Object3D): void;
|
|
85
89
|
}
|