@types/three 0.180.0 → 0.182.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/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 +1 -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/geometries/TextGeometry.d.ts +2 -0
- three/examples/jsm/gpgpu/BitonicSort.d.ts +21 -0
- three/examples/jsm/inspector/Inspector.d.ts +10 -0
- three/examples/jsm/inspector/RendererInspector.d.ts +4 -0
- three/examples/jsm/inspector/tabs/Parameters.d.ts +95 -0
- three/examples/jsm/inspector/ui/Tab.d.ts +3 -0
- three/examples/jsm/inspector/ui/Values.d.ts +80 -0
- three/examples/jsm/interactive/SelectionBox.d.ts +9 -9
- three/examples/jsm/lighting/TiledLighting.d.ts +1 -2
- three/examples/jsm/loaders/FontLoader.d.ts +1 -1
- three/examples/jsm/loaders/KTX2Loader.d.ts +3 -0
- 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 +11 -7
- three/examples/jsm/objects/WaterMesh.d.ts +2 -2
- three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
- three/examples/jsm/postprocessing/OutputPass.d.ts +10 -6
- three/examples/jsm/postprocessing/RenderPass.d.ts +15 -10
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +15 -10
- three/examples/jsm/transpiler/AST.d.ts +17 -0
- three/examples/jsm/transpiler/TSLEncoder.d.ts +2 -0
- three/examples/jsm/tsl/display/AfterImageNode.d.ts +4 -5
- three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -2
- three/examples/jsm/tsl/display/BleachBypass.d.ts +1 -2
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -3
- three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +1 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +1 -2
- three/examples/jsm/tsl/display/FilmNode.d.ts +1 -2
- three/examples/jsm/tsl/display/GTAONode.d.ts +11 -10
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +2 -3
- three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -7
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +2 -3
- three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -7
- three/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/PixelationPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +1 -2
- three/examples/jsm/tsl/display/SMAANode.d.ts +1 -2
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/SSGINode.d.ts +30 -0
- three/examples/jsm/tsl/display/SSRNode.d.ts +12 -13
- three/examples/jsm/tsl/display/SSSNode.d.ts +20 -0
- three/examples/jsm/tsl/display/Sepia.d.ts +1 -2
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +1 -2
- three/examples/jsm/tsl/display/StereoPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/TRAANode.d.ts +6 -2
- three/examples/jsm/tsl/display/TransitionNode.d.ts +1 -2
- three/examples/jsm/tsl/display/boxBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/hashBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/radialBlur.d.ts +12 -0
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +3 -4
- three/examples/jsm/tsl/math/Bayer.d.ts +1 -2
- three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -3
- three/package.json +3 -3
- three/src/Three.Core.d.ts +1 -1
- three/src/Three.TSL.d.ts +21 -3
- three/src/Three.WebGPU.Nodes.d.ts +2 -0
- three/src/Three.WebGPU.d.ts +2 -0
- three/src/animation/AnimationMixer.d.ts +45 -3
- three/src/animation/AnimationUtils.d.ts +3 -8
- three/src/constants.d.ts +14 -0
- three/src/core/BufferGeometry.d.ts +3 -1
- three/src/extras/Controls.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +10 -3
- three/src/lights/HemisphereLight.d.ts +8 -1
- three/src/lights/Light.d.ts +8 -12
- three/src/lights/LightProbe.d.ts +7 -3
- three/src/lights/PointLight.d.ts +12 -1
- three/src/lights/PointLightShadow.d.ts +1 -8
- three/src/lights/SpotLight.d.ts +17 -2
- three/src/loaders/ObjectLoader.d.ts +3 -3
- three/src/loaders/TextureLoader.d.ts +3 -3
- three/src/materials/Material.d.ts +3 -2
- three/src/materials/MeshLambertMaterial.d.ts +1 -1
- three/src/materials/MeshMatcapMaterial.d.ts +14 -0
- three/src/materials/MeshPhongMaterial.d.ts +1 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +1 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -7
- three/src/materials/PointsMaterial.d.ts +1 -1
- three/src/materials/ShaderMaterial.d.ts +26 -11
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/NodeMaterial.d.ts +9 -3
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -2
- three/src/math/Vector3.d.ts +2 -2
- three/src/nodes/Nodes.d.ts +1 -1
- three/src/nodes/TSL.d.ts +5 -2
- three/src/nodes/accessors/AccessorsUtils.d.ts +4 -5
- three/src/nodes/accessors/Arrays.d.ts +2 -3
- three/src/nodes/accessors/BatchNode.d.ts +1 -2
- three/src/nodes/accessors/Bitangent.d.ts +4 -5
- three/src/nodes/accessors/BufferAttributeNode.d.ts +17 -17
- three/src/nodes/accessors/BufferNode.d.ts +2 -2
- three/src/nodes/accessors/BuiltinNode.d.ts +1 -2
- three/src/nodes/accessors/Camera.d.ts +10 -11
- three/src/nodes/accessors/ClippingNode.d.ts +3 -6
- three/src/nodes/accessors/CubeTextureNode.d.ts +8 -9
- three/src/nodes/accessors/InstanceNode.d.ts +8 -8
- three/src/nodes/accessors/InstancedMeshNode.d.ts +1 -2
- three/src/nodes/accessors/Lights.d.ts +6 -7
- three/src/nodes/accessors/MaterialNode.d.ts +38 -39
- three/src/nodes/accessors/MaterialProperties.d.ts +3 -4
- three/src/nodes/accessors/MaterialReferenceNode.d.ts +2 -2
- three/src/nodes/accessors/ModelNode.d.ts +12 -13
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +1 -2
- three/src/nodes/accessors/MorphNode.d.ts +1 -2
- three/src/nodes/accessors/Normal.d.ts +13 -14
- three/src/nodes/accessors/Object3DNode.d.ts +6 -7
- three/src/nodes/accessors/PointUVNode.d.ts +1 -2
- three/src/nodes/accessors/Position.d.ts +7 -8
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +2 -3
- three/src/nodes/accessors/ReferenceNode.d.ts +2 -3
- three/src/nodes/accessors/ReflectVector.d.ts +4 -5
- three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -2
- three/src/nodes/accessors/SceneNode.d.ts +3 -4
- three/src/nodes/accessors/SkinningNode.d.ts +5 -6
- three/src/nodes/accessors/StorageBufferNode.d.ts +5 -5
- three/src/nodes/accessors/StorageTextureNode.d.ts +7 -4
- three/src/nodes/accessors/Tangent.d.ts +4 -6
- three/src/nodes/accessors/TangentUtils.d.ts +2 -3
- three/src/nodes/accessors/Texture3DNode.d.ts +15 -4
- three/src/nodes/accessors/TextureBicubic.d.ts +2 -3
- three/src/nodes/accessors/TextureNode.d.ts +29 -24
- three/src/nodes/accessors/TextureSizeNode.d.ts +1 -2
- three/src/nodes/accessors/UV.d.ts +1 -2
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -3
- three/src/nodes/accessors/UserDataNode.d.ts +1 -2
- three/src/nodes/accessors/VelocityNode.d.ts +1 -2
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -2
- three/src/nodes/code/CodeNode.d.ts +4 -5
- three/src/nodes/code/ExpressionNode.d.ts +1 -2
- three/src/nodes/code/FunctionCallNode.d.ts +6 -5
- three/src/nodes/code/FunctionNode.d.ts +4 -6
- three/src/nodes/code/ScriptableNode.d.ts +1 -2
- three/src/nodes/code/ScriptableValueNode.d.ts +1 -2
- three/src/nodes/core/ArrayNode.d.ts +6 -6
- three/src/nodes/core/AssignNode.d.ts +1 -8
- three/src/nodes/core/AttributeNode.d.ts +1 -2
- three/src/nodes/core/BypassNode.d.ts +5 -5
- three/src/nodes/core/ContextNode.d.ts +42 -14
- three/src/nodes/core/IndexNode.d.ts +10 -7
- three/src/nodes/core/InspectorNode.d.ts +16 -0
- three/src/nodes/core/IsolateNode.d.ts +36 -0
- three/src/nodes/core/MRTNode.d.ts +3 -4
- three/src/nodes/core/Node.d.ts +18 -2
- three/src/nodes/core/NodeUtils.d.ts +1 -11
- three/src/nodes/core/OutputStructNode.d.ts +1 -2
- three/src/nodes/core/ParameterNode.d.ts +1 -2
- three/src/nodes/core/PropertyNode.d.ts +32 -31
- three/src/nodes/core/StackNode.d.ts +1 -4
- three/src/nodes/core/StructNode.d.ts +3 -4
- three/src/nodes/core/SubBuildNode.d.ts +1 -2
- three/src/nodes/core/UniformNode.d.ts +3 -6
- three/src/nodes/core/VarNode.d.ts +12 -8
- three/src/nodes/core/VaryingNode.d.ts +12 -10
- three/src/nodes/display/BlendModes.d.ts +11 -12
- three/src/nodes/display/BumpMapNode.d.ts +1 -2
- three/src/nodes/display/ColorAdjustment.d.ts +7 -8
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -3
- three/src/nodes/display/ColorSpaceNode.d.ts +19 -9
- three/src/nodes/display/FrontFacingNode.d.ts +3 -4
- three/src/nodes/display/NormalMapNode.d.ts +4 -3
- three/src/nodes/display/PassNode.d.ts +28 -11
- three/src/nodes/display/PosterizeNode.d.ts +1 -2
- three/src/nodes/display/RenderOutputNode.d.ts +11 -6
- three/src/nodes/display/ScreenNode.d.ts +9 -10
- three/src/nodes/display/ToneMappingFunctions.d.ts +6 -7
- three/src/nodes/display/ToneMappingNode.d.ts +9 -8
- three/src/nodes/display/ToonOutlinePassNode.d.ts +1 -2
- three/src/nodes/display/ViewportDepthNode.d.ts +3 -4
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +1 -2
- three/src/nodes/display/ViewportSharedTextureNode.d.ts +1 -2
- three/src/nodes/display/ViewportTextureNode.d.ts +2 -3
- three/src/nodes/fog/Fog.d.ts +5 -6
- three/src/nodes/functions/BSDF/BRDF_GGX.d.ts +4 -5
- three/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts +14 -0
- three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -2
- three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +1 -2
- three/src/nodes/functions/BSDF/DFGLUT.d.ts +12 -0
- three/src/nodes/functions/BSDF/D_GGX.d.ts +1 -2
- three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +1 -2
- three/src/nodes/functions/BSDF/F_Schlick.d.ts +1 -2
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +1 -2
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -2
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -2
- three/src/nodes/functions/PhysicalLightingModel.d.ts +8 -1
- three/src/nodes/functions/ShadowMaskModel.d.ts +1 -2
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +1 -2
- three/src/nodes/functions/material/getGeometryRoughness.d.ts +1 -2
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +1 -2
- three/src/nodes/functions/material/getRoughness.d.ts +1 -2
- three/src/nodes/functions/material/getShIrradianceAt.d.ts +1 -2
- three/src/nodes/geometry/RangeNode.d.ts +1 -2
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +10 -11
- three/src/nodes/gpgpu/BarrierNode.d.ts +3 -4
- three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +5 -6
- three/src/nodes/gpgpu/ComputeNode.d.ts +21 -13
- three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +25 -26
- three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +1 -2
- three/src/nodes/lighting/AnalyticLightNode.d.ts +3 -2
- three/src/nodes/lighting/LightUtils.d.ts +1 -2
- three/src/nodes/lighting/LightingContextNode.d.ts +1 -2
- three/src/nodes/lighting/LightsNode.d.ts +1 -2
- three/src/nodes/lighting/PointLightNode.d.ts +5 -6
- three/src/nodes/lighting/PointShadowNode.d.ts +12 -17
- three/src/nodes/lighting/ShadowBaseNode.d.ts +1 -2
- three/src/nodes/lighting/ShadowFilterNode.d.ts +6 -5
- three/src/nodes/lighting/ShadowNode.d.ts +1 -2
- three/src/nodes/lighting/SpotLightNode.d.ts +1 -2
- three/src/nodes/materialx/MaterialXNodes.d.ts +41 -42
- three/src/nodes/materialx/lib/mx_hsv.d.ts +2 -3
- three/src/nodes/materialx/lib/mx_noise.d.ts +73 -74
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +1 -2
- three/src/nodes/math/BitcastNode.d.ts +5 -6
- three/src/nodes/math/BitcountNode.d.ts +21 -0
- three/src/nodes/math/ConditionalNode.d.ts +11 -5
- three/src/nodes/math/Hash.d.ts +1 -2
- three/src/nodes/math/MathNode.d.ts +223 -77
- three/src/nodes/math/OperatorNode.d.ts +203 -59
- three/src/nodes/math/PackFloatNode.d.ts +19 -0
- three/src/nodes/math/TriNoise3D.d.ts +3 -4
- three/src/nodes/math/UnpackFloatNode.d.ts +18 -0
- three/src/nodes/pmrem/PMREMNode.d.ts +1 -2
- three/src/nodes/pmrem/PMREMUtils.d.ts +3 -4
- three/src/nodes/procedural/Checker.d.ts +1 -2
- three/src/nodes/shapes/Shapes.d.ts +1 -2
- three/src/nodes/tsl/TSLBase.d.ts +2 -1
- three/src/nodes/tsl/TSLCore.d.ts +235 -128
- three/src/nodes/utils/CubeMapNode.d.ts +1 -2
- three/src/nodes/utils/DebugNode.d.ts +9 -5
- three/src/nodes/utils/Discard.d.ts +6 -6
- three/src/nodes/utils/EquirectUV.d.ts +1 -2
- three/src/nodes/utils/EventNode.d.ts +8 -3
- three/src/nodes/utils/FunctionOverloadingNode.d.ts +1 -2
- three/src/nodes/utils/LoopNode.d.ts +7 -6
- three/src/nodes/utils/MatcapUV.d.ts +1 -2
- three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -2
- three/src/nodes/utils/Oscillators.d.ts +4 -5
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +7 -4
- three/src/nodes/utils/RTTNode.d.ts +2 -3
- three/src/nodes/utils/ReflectorNode.d.ts +2 -3
- three/src/nodes/utils/RemapNode.d.ts +29 -7
- three/src/nodes/utils/RotateNode.d.ts +1 -2
- three/src/nodes/utils/SampleNode.d.ts +1 -2
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +1 -2
- three/src/nodes/utils/SpriteUtils.d.ts +1 -2
- three/src/nodes/utils/StorageArrayElementNode.d.ts +1 -2
- three/src/nodes/utils/Timer.d.ts +3 -4
- three/src/nodes/utils/TriplanarTextures.d.ts +2 -3
- three/src/nodes/utils/UVUtils.d.ts +5 -3
- three/src/nodes/utils/ViewportUtils.d.ts +1 -2
- three/src/objects/LOD.d.ts +1 -1
- three/src/objects/Skeleton.d.ts +4 -2
- three/src/renderers/WebGLRenderer.d.ts +22 -4
- three/src/renderers/common/Animation.d.ts +4 -1
- three/src/renderers/common/Binding.d.ts +6 -0
- three/src/renderers/common/Bindings.d.ts +12 -0
- three/src/renderers/common/Buffer.d.ts +24 -0
- three/src/renderers/common/CanvasTarget.d.ts +142 -0
- three/src/renderers/common/ChainMap.d.ts +8 -1
- three/src/renderers/common/Geometries.d.ts +8 -0
- three/src/renderers/common/InspectorBase.d.ts +105 -0
- three/src/renderers/common/PostProcessing.d.ts +3 -0
- three/src/renderers/common/QuadMesh.d.ts +3 -0
- three/src/renderers/common/RenderContexts.d.ts +6 -2
- three/src/renderers/common/RenderObject.d.ts +6 -0
- three/src/renderers/common/Renderer.d.ts +145 -46
- three/src/renderers/common/SampledTexture.d.ts +2 -0
- three/src/renderers/common/Sampler.d.ts +2 -0
- three/src/renderers/common/Textures.d.ts +20 -0
- three/src/renderers/common/TimestampQueryPool.d.ts +24 -1
- three/src/renderers/common/UniformsGroup.d.ts +1 -0
- three/src/renderers/common/extras/PMREMGenerator.d.ts +19 -1
- three/src/renderers/common/nodes/NodeLibrary.d.ts +3 -7
- three/src/renderers/common/nodes/Nodes.d.ts +13 -14
- three/src/renderers/shaders/ShaderLib.d.ts +1 -1
- three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
- three/src/renderers/webgl/WebGLPrograms.d.ts +0 -1
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +5 -0
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/CanvasTexture.d.ts +3 -3
- three/src/textures/CompressedArrayTexture.d.ts +6 -9
- three/src/textures/CompressedCubeTexture.d.ts +3 -3
- three/src/textures/CompressedTexture.d.ts +6 -8
- three/src/textures/CubeDepthTexture.d.ts +41 -0
- three/src/textures/CubeTexture.d.ts +4 -11
- three/src/textures/Data3DTexture.d.ts +5 -10
- three/src/textures/DataArrayTexture.d.ts +10 -10
- three/src/textures/DataTexture.d.ts +4 -11
- three/src/textures/DepthTexture.d.ts +7 -8
- three/src/textures/ExternalTexture.d.ts +3 -1
- three/src/textures/FramebufferTexture.d.ts +6 -1
- three/src/textures/Source.d.ts +3 -3
- three/src/textures/Texture.d.ts +8 -8
- three/src/textures/VideoFrameTexture.d.ts +1 -1
- three/src/textures/VideoTexture.d.ts +2 -2
- three/src/utils.d.ts +30 -2
- three/src/nodes/core/CacheNode.d.ts +0 -21
- three/src/nodes/functions/BSDF/DFGApprox.d.ts +0 -11
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { EventDispatcher } from "../../core/EventDispatcher.js";
|
|
2
|
+
import { Vector2 } from "../../math/Vector2.js";
|
|
3
|
+
import { Vector4 } from "../../math/Vector4.js";
|
|
4
|
+
import { DepthTexture } from "../../textures/DepthTexture.js";
|
|
5
|
+
import { FramebufferTexture } from "../../textures/FramebufferTexture.js";
|
|
6
|
+
export interface CanvasTargetEventMap {
|
|
7
|
+
resize: {};
|
|
8
|
+
dispose: {};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* CanvasTarget is a class that represents the final output destination of the renderer.
|
|
12
|
+
*
|
|
13
|
+
* @augments EventDispatcher
|
|
14
|
+
*/
|
|
15
|
+
declare class CanvasTarget extends EventDispatcher<CanvasTargetEventMap> {
|
|
16
|
+
domElement: HTMLCanvasElement;
|
|
17
|
+
_pixelRatio: number;
|
|
18
|
+
_width: number;
|
|
19
|
+
_height: number;
|
|
20
|
+
_viewport: Vector4;
|
|
21
|
+
_scissor: Vector4;
|
|
22
|
+
_scissorTest: boolean;
|
|
23
|
+
colorTexture: FramebufferTexture;
|
|
24
|
+
depthTexture: DepthTexture;
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new CanvasTarget.
|
|
27
|
+
*
|
|
28
|
+
* @param {HTMLCanvasElement|OffscreenCanvas} domElement - The canvas element to render to.
|
|
29
|
+
*/
|
|
30
|
+
constructor(domElement: HTMLCanvasElement);
|
|
31
|
+
/**
|
|
32
|
+
* Returns the pixel ratio.
|
|
33
|
+
*
|
|
34
|
+
* @return {number} The pixel ratio.
|
|
35
|
+
*/
|
|
36
|
+
getPixelRatio(): number;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the drawing buffer size in physical pixels. This method honors the pixel ratio.
|
|
39
|
+
*
|
|
40
|
+
* @param {Vector2} target - The method writes the result in this target object.
|
|
41
|
+
* @return {Vector2} The drawing buffer size.
|
|
42
|
+
*/
|
|
43
|
+
getDrawingBufferSize(target: Vector2): Vector2;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the renderer's size in logical pixels. This method does not honor the pixel ratio.
|
|
46
|
+
*
|
|
47
|
+
* @param {Vector2} target - The method writes the result in this target object.
|
|
48
|
+
* @return {Vector2} The renderer's size in logical pixels.
|
|
49
|
+
*/
|
|
50
|
+
getSize(target: Vector2): Vector2;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the given pixel ratio and resizes the canvas if necessary.
|
|
53
|
+
*
|
|
54
|
+
* @param {number} [value=1] - The pixel ratio.
|
|
55
|
+
*/
|
|
56
|
+
setPixelRatio(value?: number): void;
|
|
57
|
+
/**
|
|
58
|
+
* This method allows to define the drawing buffer size by specifying
|
|
59
|
+
* width, height and pixel ratio all at once. The size of the drawing
|
|
60
|
+
* buffer is computed with this formula:
|
|
61
|
+
* ```js
|
|
62
|
+
* size.x = width * pixelRatio;
|
|
63
|
+
* size.y = height * pixelRatio;
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @param {number} width - The width in logical pixels.
|
|
67
|
+
* @param {number} height - The height in logical pixels.
|
|
68
|
+
* @param {number} pixelRatio - The pixel ratio.
|
|
69
|
+
*/
|
|
70
|
+
setDrawingBufferSize(width: number, height: number, pixelRatio: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the size of the renderer.
|
|
73
|
+
*
|
|
74
|
+
* @param {number} width - The width in logical pixels.
|
|
75
|
+
* @param {number} height - The height in logical pixels.
|
|
76
|
+
* @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not.
|
|
77
|
+
*/
|
|
78
|
+
setSize(width: number, height: number, updateStyle?: boolean): void;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the scissor rectangle.
|
|
81
|
+
*
|
|
82
|
+
* @param {Vector4} target - The method writes the result in this target object.
|
|
83
|
+
* @return {Vector4} The scissor rectangle.
|
|
84
|
+
*/
|
|
85
|
+
getScissor(target: Vector4): Vector4;
|
|
86
|
+
/**
|
|
87
|
+
* Defines the scissor rectangle.
|
|
88
|
+
*
|
|
89
|
+
* @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit.
|
|
90
|
+
* Instead of passing four arguments, the method also works with a single four-dimensional vector.
|
|
91
|
+
* @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit.
|
|
92
|
+
* @param {number} width - The width of the scissor box in logical pixel unit.
|
|
93
|
+
* @param {number} height - The height of the scissor box in logical pixel unit.
|
|
94
|
+
*/
|
|
95
|
+
setScissor(x: Vector4): void;
|
|
96
|
+
setScissor(x: number, y: number, width: number, height: number): void;
|
|
97
|
+
/**
|
|
98
|
+
* Returns the scissor test value.
|
|
99
|
+
*
|
|
100
|
+
* @return {boolean} Whether the scissor test should be enabled or not.
|
|
101
|
+
*/
|
|
102
|
+
getScissorTest(): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Defines the scissor test.
|
|
105
|
+
*
|
|
106
|
+
* @param {boolean} boolean - Whether the scissor test should be enabled or not.
|
|
107
|
+
*/
|
|
108
|
+
setScissorTest(boolean: boolean): void;
|
|
109
|
+
/**
|
|
110
|
+
* Returns the viewport definition.
|
|
111
|
+
*
|
|
112
|
+
* @param {Vector4} target - The method writes the result in this target object.
|
|
113
|
+
* @return {Vector4} The viewport definition.
|
|
114
|
+
*/
|
|
115
|
+
getViewport(target: Vector4): Vector4;
|
|
116
|
+
/**
|
|
117
|
+
* Defines the viewport.
|
|
118
|
+
*
|
|
119
|
+
* @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit.
|
|
120
|
+
* @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit.
|
|
121
|
+
* @param {number} width - The width of the viewport in logical pixel unit.
|
|
122
|
+
* @param {number} height - The height of the viewport in logical pixel unit.
|
|
123
|
+
* @param {number} minDepth - The minimum depth value of the viewport. WebGPU only.
|
|
124
|
+
* @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only.
|
|
125
|
+
*/
|
|
126
|
+
setViewport(x: Vector4): void;
|
|
127
|
+
setViewport(x: number, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void;
|
|
128
|
+
/**
|
|
129
|
+
* Dispatches the resize event.
|
|
130
|
+
*
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
_dispatchResize(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Frees the GPU-related resources allocated by this instance. Call this
|
|
136
|
+
* method whenever this instance is no longer used in your app.
|
|
137
|
+
*
|
|
138
|
+
* @fires RenderTarget#dispose
|
|
139
|
+
*/
|
|
140
|
+
dispose(): void;
|
|
141
|
+
}
|
|
142
|
+
export default CanvasTarget;
|
|
@@ -8,11 +8,18 @@ type RecursiveWeakMap<K extends readonly object[], V> = WeakMap<K[number], V | R
|
|
|
8
8
|
* @private
|
|
9
9
|
*/
|
|
10
10
|
declare class ChainMap<K extends readonly object[], V> {
|
|
11
|
-
|
|
11
|
+
weakMaps: Record<number, RecursiveWeakMap<K, V>>;
|
|
12
12
|
/**
|
|
13
13
|
* Constructs a new Chain Map.
|
|
14
14
|
*/
|
|
15
15
|
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Returns the Weak Map for the given keys.
|
|
18
|
+
*
|
|
19
|
+
* @param {Array<Object>} keys - List of keys.
|
|
20
|
+
* @return {WeakMap} The weak map.
|
|
21
|
+
*/
|
|
22
|
+
_getWeakMap(keys: K): RecursiveWeakMap<K, V>;
|
|
16
23
|
/**
|
|
17
24
|
* Returns the value for the given array of keys.
|
|
18
25
|
*
|
|
@@ -72,6 +72,13 @@ declare class Geometries extends DataMap<{
|
|
|
72
72
|
* @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used.
|
|
73
73
|
*/
|
|
74
74
|
getIndirect(renderObject: RenderObject): import("./IndirectStorageBufferAttribute.js").default | null;
|
|
75
|
+
/**
|
|
76
|
+
* Returns the byte offset into the indirect attribute buffer of the given render object.
|
|
77
|
+
*
|
|
78
|
+
* @param {RenderObject} renderObject - The render object.
|
|
79
|
+
* @return {number} The byte offset into the indirect attribute buffer.
|
|
80
|
+
*/
|
|
81
|
+
getIndirectOffset(renderObject: RenderObject): number | number[];
|
|
75
82
|
/**
|
|
76
83
|
* Returns the index of the given render object's geometry. This is implemented
|
|
77
84
|
* in a method to return a wireframe index if necessary.
|
|
@@ -80,5 +87,6 @@ declare class Geometries extends DataMap<{
|
|
|
80
87
|
* @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries.
|
|
81
88
|
*/
|
|
82
89
|
getIndex(renderObject: RenderObject): BufferAttribute | null;
|
|
90
|
+
dispose(): void;
|
|
83
91
|
}
|
|
84
92
|
export default Geometries;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
+
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
3
|
+
import ComputeNode from "../../nodes/gpgpu/ComputeNode.js";
|
|
4
|
+
import { Scene } from "../../scenes/Scene.js";
|
|
5
|
+
import { Texture } from "../../textures/Texture.js";
|
|
6
|
+
import Renderer from "./Renderer.js";
|
|
7
|
+
/**
|
|
8
|
+
* InspectorBase is the base class for all inspectors.
|
|
9
|
+
*
|
|
10
|
+
* @class InspectorBase
|
|
11
|
+
*/
|
|
12
|
+
declare class InspectorBase {
|
|
13
|
+
_renderer: Renderer | null;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new InspectorBase.
|
|
16
|
+
*/
|
|
17
|
+
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Returns the node frame for the current renderer.
|
|
20
|
+
*
|
|
21
|
+
* @return {Object} The node frame.
|
|
22
|
+
*/
|
|
23
|
+
get nodeFrame(): import("../../Three.WebGPU.Nodes.js").NodeFrame;
|
|
24
|
+
/**
|
|
25
|
+
* Sets the renderer for this inspector.
|
|
26
|
+
*
|
|
27
|
+
* @param {WebGLRenderer} renderer - The renderer to associate with this inspector.
|
|
28
|
+
* @return {InspectorBase} This inspector instance.
|
|
29
|
+
*/
|
|
30
|
+
setRenderer(renderer: Renderer | null): this;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the renderer associated with this inspector.
|
|
33
|
+
*
|
|
34
|
+
* @return {WebGLRenderer} The associated renderer.
|
|
35
|
+
*/
|
|
36
|
+
getRenderer(): Renderer | null;
|
|
37
|
+
/**
|
|
38
|
+
* Initializes the inspector.
|
|
39
|
+
*/
|
|
40
|
+
init(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Called when a frame begins.
|
|
43
|
+
*/
|
|
44
|
+
begin(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Called when a frame ends.
|
|
47
|
+
*/
|
|
48
|
+
finish(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Inspects a node.
|
|
51
|
+
*
|
|
52
|
+
* @param {Node} node - The node to inspect.
|
|
53
|
+
*/
|
|
54
|
+
inspect(): void;
|
|
55
|
+
/**
|
|
56
|
+
* When a compute operation is performed.
|
|
57
|
+
*
|
|
58
|
+
* @param {ComputeNode} computeNode - The compute node being executed.
|
|
59
|
+
* @param {number|Array<number>} dispatchSizeOrCount - The dispatch size or count.
|
|
60
|
+
*/
|
|
61
|
+
computeAsync(computeNode: ComputeNode, dispatchSizeOrCount: number | number[]): void;
|
|
62
|
+
/**
|
|
63
|
+
* Called when a compute operation begins.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} uid - A unique identifier for the render context.
|
|
66
|
+
* @param {ComputeNode} computeNode - The compute node being executed.
|
|
67
|
+
*/
|
|
68
|
+
beginCompute(uid: string, computeNode: ComputeNode): void;
|
|
69
|
+
/**
|
|
70
|
+
* Called when a compute operation ends.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} uid - A unique identifier for the render context.
|
|
73
|
+
* @param {ComputeNode} computeNode - The compute node being executed.
|
|
74
|
+
*/
|
|
75
|
+
finishCompute(uid: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Called when a render operation begins.
|
|
78
|
+
*
|
|
79
|
+
* @param {string} uid - A unique identifier for the render context.
|
|
80
|
+
* @param {Scene} scene - The scene being rendered.
|
|
81
|
+
* @param {Camera} camera - The camera being used for rendering.
|
|
82
|
+
* @param {?WebGLRenderTarget} renderTarget - The render target, if any.
|
|
83
|
+
*/
|
|
84
|
+
beginRender(uid: string, scene: Scene, camera: Camera, renderTarget: RenderTarget): void;
|
|
85
|
+
/**
|
|
86
|
+
* Called when an animation loop ends.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} uid - A unique identifier for the render context.
|
|
89
|
+
*/
|
|
90
|
+
finishRender(uid: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Called when a texture copy operation is performed.
|
|
93
|
+
*
|
|
94
|
+
* @param {Texture} srcTexture - The source texture.
|
|
95
|
+
* @param {Texture} dstTexture - The destination texture.
|
|
96
|
+
*/
|
|
97
|
+
copyTextureToTexture(srcTexture: Texture, dstTexture: Texture): void;
|
|
98
|
+
/**
|
|
99
|
+
* Called when a framebuffer copy operation is performed.
|
|
100
|
+
*
|
|
101
|
+
* @param {Texture} framebufferTexture - The texture associated with the framebuffer.
|
|
102
|
+
*/
|
|
103
|
+
copyFramebufferToTexture(framebufferTexture: Texture): void;
|
|
104
|
+
}
|
|
105
|
+
export default InspectorBase;
|
|
@@ -10,6 +10,9 @@ export default class QuadMesh extends Mesh {
|
|
|
10
10
|
|
|
11
11
|
constructor(material?: Material | null);
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated "renderAsync()" has been deprecated. Use "render()" and "await renderer.init();" when creating the renderer.
|
|
15
|
+
*/
|
|
13
16
|
renderAsync(renderer: Renderer): Promise<void>;
|
|
14
17
|
|
|
15
18
|
render(renderer: Renderer): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Camera } from "../../cameras/Camera.js";
|
|
2
2
|
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
3
|
+
import MRTNode from "../../nodes/core/MRTNode.js";
|
|
3
4
|
import { Scene } from "../../scenes/Scene.js";
|
|
4
5
|
import ChainMap from "./ChainMap.js";
|
|
5
6
|
import RenderContext from "./RenderContext.js";
|
|
@@ -22,9 +23,10 @@ declare class RenderContexts {
|
|
|
22
23
|
* @param {Scene} scene - The scene.
|
|
23
24
|
* @param {Camera} camera - The camera that is used to render the scene.
|
|
24
25
|
* @param {?RenderTarget} [renderTarget=null] - The active render target.
|
|
26
|
+
* @param {?MRT} [mrt=null] - The active multiple render target.
|
|
25
27
|
* @return {RenderContext} The render context.
|
|
26
28
|
*/
|
|
27
|
-
get(scene: Scene, camera: Camera, renderTarget?: RenderTarget | null): RenderContext;
|
|
29
|
+
get(scene: Scene, camera: Camera, renderTarget?: RenderTarget | null, mrt?: MRTNode | null): RenderContext;
|
|
28
30
|
/**
|
|
29
31
|
* Returns a render context intended for clear operations.
|
|
30
32
|
*
|
|
@@ -39,7 +41,9 @@ declare class RenderContexts {
|
|
|
39
41
|
* @param {string} attachmentState - The attachment state.
|
|
40
42
|
* @return {ChainMap} The chain map.
|
|
41
43
|
*/
|
|
42
|
-
_getChainMap(
|
|
44
|
+
_getChainMap(
|
|
45
|
+
attachmentState: string,
|
|
46
|
+
): ChainMap<readonly [Scene<import("../../Three.Core.js").Object3DEventMap>, Camera], RenderContext>;
|
|
43
47
|
/**
|
|
44
48
|
* Frees internal resources.
|
|
45
49
|
*/
|
|
@@ -163,6 +163,12 @@ declare class RenderObject {
|
|
|
163
163
|
* @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used.
|
|
164
164
|
*/
|
|
165
165
|
getIndirect(): import("./IndirectStorageBufferAttribute.js").default | null;
|
|
166
|
+
/**
|
|
167
|
+
* Returns the byte offset into the indirect attribute buffer.
|
|
168
|
+
*
|
|
169
|
+
* @return {number|Array<number>} The byte offset into the indirect attribute buffer.
|
|
170
|
+
*/
|
|
171
|
+
getIndirectOffset(): number | number[];
|
|
166
172
|
/**
|
|
167
173
|
* Returns an array that acts as a key for identifying the render object in a chain map.
|
|
168
174
|
*
|