@types/three 0.180.0 → 0.181.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/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/objects/SkyMesh.d.ts +6 -7
- three/examples/jsm/objects/WaterMesh.d.ts +2 -2
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +15 -10
- 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 +18 -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 +1 -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/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 +2 -2
- three/src/Three.Core.d.ts +1 -1
- three/src/Three.TSL.d.ts +7 -1
- three/src/Three.WebGPU.Nodes.d.ts +2 -0
- three/src/Three.WebGPU.d.ts +2 -0
- three/src/animation/AnimationMixer.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +0 -1
- three/src/loaders/ObjectLoader.d.ts +3 -3
- three/src/loaders/TextureLoader.d.ts +3 -3
- three/src/materials/Material.d.ts +2 -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 +8 -8
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/NodeMaterial.d.ts +2 -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 +1 -1
- 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 +8 -9
- 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 +1 -2
- 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 +3 -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 +24 -12
- 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 +0 -10
- 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 +30 -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 +1 -2
- three/src/nodes/display/PassNode.d.ts +20 -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/DFGApprox.d.ts +1 -2
- 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/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 +1 -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 +4 -5
- three/src/nodes/lighting/ShadowBaseNode.d.ts +1 -2
- three/src/nodes/lighting/ShadowFilterNode.d.ts +4 -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/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/TriNoise3D.d.ts +3 -4
- 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 +2 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +5 -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 +2 -3
- three/src/nodes/utils/ViewportUtils.d.ts +1 -2
- three/src/renderers/common/Animation.d.ts +4 -1
- three/src/renderers/common/Bindings.d.ts +12 -0
- three/src/renderers/common/CanvasTarget.d.ts +142 -0
- three/src/renderers/common/Geometries.d.ts +1 -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 +3 -1
- three/src/renderers/common/Renderer.d.ts +124 -36
- 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/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/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/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 +18 -2
- three/src/nodes/core/CacheNode.d.ts +0 -21
|
@@ -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;
|
|
@@ -39,7 +39,9 @@ declare class RenderContexts {
|
|
|
39
39
|
* @param {string} attachmentState - The attachment state.
|
|
40
40
|
* @return {ChainMap} The chain map.
|
|
41
41
|
*/
|
|
42
|
-
_getChainMap(
|
|
42
|
+
_getChainMap(
|
|
43
|
+
attachmentState: string,
|
|
44
|
+
): ChainMap<readonly [Scene<import("../../Three.Core.js").Object3DEventMap>, Camera], RenderContext>;
|
|
43
45
|
/**
|
|
44
46
|
* Frees internal resources.
|
|
45
47
|
*/
|
|
@@ -23,10 +23,13 @@ import Attributes from "./Attributes.js";
|
|
|
23
23
|
import Backend from "./Backend.js";
|
|
24
24
|
import Background from "./Background.js";
|
|
25
25
|
import Bindings from "./Bindings.js";
|
|
26
|
+
import CanvasTarget from "./CanvasTarget.js";
|
|
26
27
|
import ClippingContext from "./ClippingContext.js";
|
|
27
28
|
import Color4 from "./Color4.js";
|
|
28
29
|
import Geometries from "./Geometries.js";
|
|
30
|
+
import IndirectStorageBufferAttribute from "./IndirectStorageBufferAttribute.js";
|
|
29
31
|
import Info from "./Info.js";
|
|
32
|
+
import InspectorBase from "./InspectorBase.js";
|
|
30
33
|
import Lighting from "./Lighting.js";
|
|
31
34
|
import NodeLibrary from "./nodes/NodeLibrary.js";
|
|
32
35
|
import Nodes from "./nodes/Nodes.js";
|
|
@@ -69,9 +72,7 @@ export interface RendererParameters {
|
|
|
69
72
|
*/
|
|
70
73
|
declare class Renderer {
|
|
71
74
|
readonly isRenderer: true;
|
|
72
|
-
domElement: HTMLCanvasElement;
|
|
73
75
|
backend: Backend;
|
|
74
|
-
samples: number;
|
|
75
76
|
autoClear: boolean;
|
|
76
77
|
autoClearColor: boolean;
|
|
77
78
|
autoClearDepth: boolean;
|
|
@@ -87,13 +88,10 @@ declare class Renderer {
|
|
|
87
88
|
info: Info;
|
|
88
89
|
library: NodeLibrary;
|
|
89
90
|
lighting: Lighting;
|
|
91
|
+
_samples: number;
|
|
92
|
+
_canvasTarget: CanvasTarget;
|
|
93
|
+
_inspector: InspectorBase;
|
|
90
94
|
_getFallback: ((error: unknown) => Backend) | null;
|
|
91
|
-
_pixelRatio: number;
|
|
92
|
-
_width: number;
|
|
93
|
-
_height: number;
|
|
94
|
-
_viewport: Vector4;
|
|
95
|
-
_scissor: Vector4;
|
|
96
|
-
_scissorTest: boolean;
|
|
97
95
|
_attributes: Attributes | null;
|
|
98
96
|
_geometries: Geometries | null;
|
|
99
97
|
_nodes: Nodes | null;
|
|
@@ -215,6 +213,14 @@ declare class Renderer {
|
|
|
215
213
|
* @return {Promise<this>} A Promise that resolves when the renderer has been initialized.
|
|
216
214
|
*/
|
|
217
215
|
init(): Promise<this>;
|
|
216
|
+
/**
|
|
217
|
+
* A reference to the canvas element the renderer is drawing to.
|
|
218
|
+
* This value of this property will automatically be created by
|
|
219
|
+
* the renderer.
|
|
220
|
+
*
|
|
221
|
+
* @type {HTMLCanvasElement|OffscreenCanvas}
|
|
222
|
+
*/
|
|
223
|
+
get domElement(): HTMLCanvasElement;
|
|
218
224
|
/**
|
|
219
225
|
* The coordinate system of the renderer. The value of this property
|
|
220
226
|
* depends on the selected backend. Either `THREE.WebGLCoordinateSystem` or
|
|
@@ -244,6 +250,7 @@ declare class Renderer {
|
|
|
244
250
|
* Renders the scene in an async fashion.
|
|
245
251
|
*
|
|
246
252
|
* @async
|
|
253
|
+
* @deprecated
|
|
247
254
|
* @param {Object3D} scene - The scene or 3D object to render.
|
|
248
255
|
* @param {Camera} camera - The camera.
|
|
249
256
|
* @return {Promise} A Promise that resolves when the render has been finished.
|
|
@@ -254,9 +261,17 @@ declare class Renderer {
|
|
|
254
261
|
* the CPU waits for the GPU to complete its operation (e.g. a compute task).
|
|
255
262
|
*
|
|
256
263
|
* @async
|
|
264
|
+
* @deprecated
|
|
257
265
|
* @return {Promise} A Promise that resolves when synchronization has been finished.
|
|
258
266
|
*/
|
|
259
267
|
waitForGPU(): Promise<void>;
|
|
268
|
+
/**
|
|
269
|
+
* Sets the inspector instance. The inspector can be any class that extends from `InspectorBase`.
|
|
270
|
+
*
|
|
271
|
+
* @param {InspectorBase} value - The new inspector.
|
|
272
|
+
*/
|
|
273
|
+
set inspector(value: InspectorBase);
|
|
274
|
+
get inspector(): InspectorBase;
|
|
260
275
|
/**
|
|
261
276
|
* Enables or disables high precision for model-view and normal-view matrices.
|
|
262
277
|
* When enabled, will use CPU 64-bit precision for higher precision instead of GPU 32-bit for higher performance.
|
|
@@ -311,17 +326,27 @@ declare class Renderer {
|
|
|
311
326
|
_renderBundle(bundle: Bundle, sceneRef: Scene, lightsNode: LightsNode): void;
|
|
312
327
|
/**
|
|
313
328
|
* Renders the scene or 3D object with the given camera. This method can only be called
|
|
314
|
-
* if the renderer has been initialized.
|
|
329
|
+
* if the renderer has been initialized. When using `render()` inside an animation loop,
|
|
330
|
+
* it's guaranteed the renderer will be initialized. The animation loop must be defined
|
|
331
|
+
* with {@link Renderer#setAnimationLoop} though.
|
|
332
|
+
*
|
|
333
|
+
* For all other use cases (like when using on-demand rendering), you must call
|
|
334
|
+
* {@link Renderer#init} before rendering.
|
|
315
335
|
*
|
|
316
336
|
* The target of the method is the default framebuffer (meaning the canvas)
|
|
317
337
|
* or alternatively a render target when specified via `setRenderTarget()`.
|
|
318
338
|
*
|
|
319
339
|
* @param {Object3D} scene - The scene or 3D object to render.
|
|
320
340
|
* @param {Camera} camera - The camera to render the scene with.
|
|
321
|
-
* @return {?Promise} A Promise that resolve when the scene has been rendered.
|
|
322
|
-
* Only returned when the renderer has not been initialized.
|
|
323
341
|
*/
|
|
324
|
-
render(scene: Object3D, camera: Camera):
|
|
342
|
+
render(scene: Object3D, camera: Camera): void;
|
|
343
|
+
/**
|
|
344
|
+
* Returns whether the renderer has been initialized or not.
|
|
345
|
+
*
|
|
346
|
+
* @readonly
|
|
347
|
+
* @return {boolean} Whether the renderer has been initialized or not.
|
|
348
|
+
*/
|
|
349
|
+
get initialized(): boolean;
|
|
325
350
|
/**
|
|
326
351
|
* Returns an internal render target which is used when computing the output tone mapping
|
|
327
352
|
* and color space conversion. Unlike in `WebGLRenderer`, this is done in a separate render
|
|
@@ -330,7 +355,7 @@ declare class Renderer {
|
|
|
330
355
|
* @private
|
|
331
356
|
* @return {?RenderTarget} The render target. The method returns `null` if no output conversion should be applied.
|
|
332
357
|
*/
|
|
333
|
-
_getFrameBufferTarget(): RenderTarget<Texture
|
|
358
|
+
_getFrameBufferTarget(): RenderTarget<Texture<unknown>> | null;
|
|
334
359
|
/**
|
|
335
360
|
* Renders the scene or 3D object with the given camera.
|
|
336
361
|
*
|
|
@@ -373,10 +398,16 @@ declare class Renderer {
|
|
|
373
398
|
* for best compatibility.
|
|
374
399
|
*
|
|
375
400
|
* @async
|
|
376
|
-
* @param {?
|
|
401
|
+
* @param {?onAnimationCallback} callback - The application's animation loop.
|
|
377
402
|
* @return {Promise} A Promise that resolves when the set has been executed.
|
|
378
403
|
*/
|
|
379
404
|
setAnimationLoop(callback: ((time: DOMHighResTimeStamp, frame?: XRFrame) => void) | null): Promise<void>;
|
|
405
|
+
/**
|
|
406
|
+
* Returns the current animation loop callback.
|
|
407
|
+
*
|
|
408
|
+
* @return {?Function} The current animation loop callback.
|
|
409
|
+
*/
|
|
410
|
+
getAnimationLoop(): ((time: DOMHighResTimeStamp, xrFrame?: XRFrame) => void) | null;
|
|
380
411
|
/**
|
|
381
412
|
* Can be used to transfer buffer data from a storage buffer attribute
|
|
382
413
|
* from the GPU to the CPU in context of compute shaders.
|
|
@@ -568,35 +599,25 @@ declare class Renderer {
|
|
|
568
599
|
* @param {boolean} [color=true] - Whether the color buffer should be cleared or not.
|
|
569
600
|
* @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not.
|
|
570
601
|
* @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not.
|
|
571
|
-
* @return {Promise} A Promise that resolves when the clear operation has been executed.
|
|
572
|
-
* Only returned when the renderer has not been initialized.
|
|
573
602
|
*/
|
|
574
|
-
clear(color?: boolean, depth?: boolean, stencil?: boolean):
|
|
603
|
+
clear(color?: boolean, depth?: boolean, stencil?: boolean): void;
|
|
575
604
|
/**
|
|
576
605
|
* Performs a manual clear operation of the color buffer. This method ignores `autoClear` properties.
|
|
577
|
-
*
|
|
578
|
-
* @return {Promise} A Promise that resolves when the clear operation has been executed.
|
|
579
|
-
* Only returned when the renderer has not been initialized.
|
|
580
606
|
*/
|
|
581
|
-
clearColor():
|
|
607
|
+
clearColor(): void;
|
|
582
608
|
/**
|
|
583
609
|
* Performs a manual clear operation of the depth buffer. This method ignores `autoClear` properties.
|
|
584
|
-
*
|
|
585
|
-
* @return {Promise} A Promise that resolves when the clear operation has been executed.
|
|
586
|
-
* Only returned when the renderer has not been initialized.
|
|
587
610
|
*/
|
|
588
|
-
clearDepth():
|
|
611
|
+
clearDepth(): void;
|
|
589
612
|
/**
|
|
590
613
|
* Performs a manual clear operation of the stencil buffer. This method ignores `autoClear` properties.
|
|
591
|
-
*
|
|
592
|
-
* @return {Promise} A Promise that resolves when the clear operation has been executed.
|
|
593
|
-
* Only returned when the renderer has not been initialized.
|
|
594
614
|
*/
|
|
595
|
-
clearStencil():
|
|
615
|
+
clearStencil(): void;
|
|
596
616
|
/**
|
|
597
617
|
* Async version of {@link Renderer#clear}.
|
|
598
618
|
*
|
|
599
619
|
* @async
|
|
620
|
+
* @deprecated
|
|
600
621
|
* @param {boolean} [color=true] - Whether the color buffer should be cleared or not.
|
|
601
622
|
* @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not.
|
|
602
623
|
* @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not.
|
|
@@ -607,6 +628,7 @@ declare class Renderer {
|
|
|
607
628
|
* Async version of {@link Renderer#clearColor}.
|
|
608
629
|
*
|
|
609
630
|
* @async
|
|
631
|
+
* @deprecated
|
|
610
632
|
* @return {Promise} A Promise that resolves when the clear operation has been executed.
|
|
611
633
|
*/
|
|
612
634
|
clearColorAsync(): Promise<void>;
|
|
@@ -614,6 +636,7 @@ declare class Renderer {
|
|
|
614
636
|
* Async version of {@link Renderer#clearDepth}.
|
|
615
637
|
*
|
|
616
638
|
* @async
|
|
639
|
+
* @deprecated
|
|
617
640
|
* @return {Promise} A Promise that resolves when the clear operation has been executed.
|
|
618
641
|
*/
|
|
619
642
|
clearDepthAsync(): Promise<void>;
|
|
@@ -621,9 +644,32 @@ declare class Renderer {
|
|
|
621
644
|
* Async version of {@link Renderer#clearStencil}.
|
|
622
645
|
*
|
|
623
646
|
* @async
|
|
647
|
+
* @deprecated
|
|
624
648
|
* @return {Promise} A Promise that resolves when the clear operation has been executed.
|
|
625
649
|
*/
|
|
626
650
|
clearStencilAsync(): Promise<void>;
|
|
651
|
+
/**
|
|
652
|
+
* Returns `true` if a framebuffer target is needed to perform tone mapping or color space conversion.
|
|
653
|
+
* If this is the case, the renderer allocates an internal render target for that purpose.
|
|
654
|
+
*/
|
|
655
|
+
get needsFrameBufferTarget(): boolean;
|
|
656
|
+
/**
|
|
657
|
+
* The number of samples used for multi-sample anti-aliasing (MSAA).
|
|
658
|
+
*
|
|
659
|
+
* @type {number}
|
|
660
|
+
* @default 0
|
|
661
|
+
*/
|
|
662
|
+
get samples(): number;
|
|
663
|
+
/**
|
|
664
|
+
* The current number of samples used for multi-sample anti-aliasing (MSAA).
|
|
665
|
+
*
|
|
666
|
+
* When rendering to a custom render target, the number of samples of that render target is used.
|
|
667
|
+
* If the renderer needs an internal framebuffer target for tone mapping or color space conversion,
|
|
668
|
+
* the number of samples is set to 0.
|
|
669
|
+
*
|
|
670
|
+
* @type {number}
|
|
671
|
+
*/
|
|
672
|
+
get currentSamples(): number;
|
|
627
673
|
/**
|
|
628
674
|
* The current tone mapping of the renderer. When not producing screen output,
|
|
629
675
|
* the tone mapping is always `NoToneMapping`.
|
|
@@ -664,7 +710,7 @@ declare class Renderer {
|
|
|
664
710
|
*
|
|
665
711
|
* @return {?RenderTarget} The render target. Returns `null` if no render target is set.
|
|
666
712
|
*/
|
|
667
|
-
getRenderTarget(): RenderTarget<Texture
|
|
713
|
+
getRenderTarget(): RenderTarget<Texture<unknown>> | null;
|
|
668
714
|
/**
|
|
669
715
|
* Sets the output render target for the renderer.
|
|
670
716
|
*
|
|
@@ -676,7 +722,20 @@ declare class Renderer {
|
|
|
676
722
|
*
|
|
677
723
|
* @return {?RenderTarget} The current output render target. Returns `null` if no output target is set.
|
|
678
724
|
*/
|
|
679
|
-
getOutputRenderTarget(): RenderTarget<Texture
|
|
725
|
+
getOutputRenderTarget(): RenderTarget<Texture<unknown>> | null;
|
|
726
|
+
/**
|
|
727
|
+
* Sets the canvas target. The canvas target manages the HTML canvas
|
|
728
|
+
* or the offscreen canvas the renderer draws into.
|
|
729
|
+
*
|
|
730
|
+
* @param {CanvasTarget} canvasTarget - The canvas target.
|
|
731
|
+
*/
|
|
732
|
+
setCanvasTarget(canvasTarget: CanvasTarget): void;
|
|
733
|
+
/**
|
|
734
|
+
* Returns the current canvas target.
|
|
735
|
+
*
|
|
736
|
+
* @return {CanvasTarget} The current canvas target.
|
|
737
|
+
*/
|
|
738
|
+
getCanvasTarget(): CanvasTarget;
|
|
680
739
|
/**
|
|
681
740
|
* Resets the renderer to the initial state before WebXR started.
|
|
682
741
|
*/
|
|
@@ -742,29 +801,36 @@ declare class Renderer {
|
|
|
742
801
|
* if the renderer has been initialized.
|
|
743
802
|
*
|
|
744
803
|
* @param {Node|Array<Node>} computeNodes - The compute node(s).
|
|
745
|
-
* @param {
|
|
804
|
+
* @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
|
|
805
|
+
* - A single number representing count, or
|
|
806
|
+
* - An array [x, y, z] representing dispatch size, or
|
|
807
|
+
* - A IndirectStorageBufferAttribute for indirect dispatch size.
|
|
746
808
|
* @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized.
|
|
747
809
|
*/
|
|
748
810
|
compute(
|
|
749
811
|
computeNodes: ComputeNode | ComputeNode[],
|
|
750
|
-
|
|
812
|
+
dispatchSize?: number[] | number | IndirectStorageBufferAttribute | null,
|
|
751
813
|
): Promise<void> | undefined;
|
|
752
814
|
/**
|
|
753
815
|
* Execute a single or an array of compute nodes.
|
|
754
816
|
*
|
|
755
817
|
* @async
|
|
756
818
|
* @param {Node|Array<Node>} computeNodes - The compute node(s).
|
|
757
|
-
* @param {
|
|
819
|
+
* @param {number|Array<number>|IndirectStorageBufferAttribute} [dispatchSize=null]
|
|
820
|
+
* - A single number representing count, or
|
|
821
|
+
* - An array [x, y, z] representing dispatch size, or
|
|
822
|
+
* - A IndirectStorageBufferAttribute for indirect dispatch size.
|
|
758
823
|
* @return {Promise} A Promise that resolve when the compute has finished.
|
|
759
824
|
*/
|
|
760
825
|
computeAsync(
|
|
761
826
|
computeNodes: ComputeNode | ComputeNode[],
|
|
762
|
-
|
|
827
|
+
dispatchSize?: number[] | number | IndirectStorageBufferAttribute | null,
|
|
763
828
|
): Promise<void>;
|
|
764
829
|
/**
|
|
765
830
|
* Checks if the given feature is supported by the selected backend.
|
|
766
831
|
*
|
|
767
832
|
* @async
|
|
833
|
+
* @deprecated
|
|
768
834
|
* @param {string} name - The feature's name.
|
|
769
835
|
* @return {Promise<boolean>} A Promise that resolves with a bool that indicates whether the feature is supported or not.
|
|
770
836
|
*/
|
|
@@ -777,7 +843,7 @@ declare class Renderer {
|
|
|
777
843
|
* @param {string} name - The feature's name.
|
|
778
844
|
* @return {boolean} Whether the feature is supported or not.
|
|
779
845
|
*/
|
|
780
|
-
hasFeature(name: string):
|
|
846
|
+
hasFeature(name: string): void;
|
|
781
847
|
/**
|
|
782
848
|
* Returns `true` when the renderer has been initialized.
|
|
783
849
|
*
|
|
@@ -789,6 +855,7 @@ declare class Renderer {
|
|
|
789
855
|
* (which can cause noticeable lags due to decode and GPU upload overhead).
|
|
790
856
|
*
|
|
791
857
|
* @async
|
|
858
|
+
* @deprecated
|
|
792
859
|
* @param {Texture} texture - The texture.
|
|
793
860
|
* @return {Promise} A Promise that resolves when the texture has been initialized.
|
|
794
861
|
*/
|
|
@@ -909,6 +976,14 @@ declare class Renderer {
|
|
|
909
976
|
lightsNode: LightsNode,
|
|
910
977
|
passId?: string | null,
|
|
911
978
|
): void;
|
|
979
|
+
/**
|
|
980
|
+
* Retrieves shadow nodes for the given material. This is used to setup shadow passes.
|
|
981
|
+
* The result is cached per material and updated when the material's version changes.
|
|
982
|
+
*
|
|
983
|
+
* @param {Material} material
|
|
984
|
+
* @returns {Object} - The shadow nodes for the material.
|
|
985
|
+
*/
|
|
986
|
+
_getShadowNodes(material: Material): any;
|
|
912
987
|
/**
|
|
913
988
|
* This method represents the default render object function that manages the render lifecycle
|
|
914
989
|
* of the object.
|
|
@@ -982,6 +1057,12 @@ declare class Renderer {
|
|
|
982
1057
|
clippingContext: ClippingContext | null,
|
|
983
1058
|
passId?: string,
|
|
984
1059
|
): void;
|
|
1060
|
+
/**
|
|
1061
|
+
* Callback when the canvas has been resized.
|
|
1062
|
+
*
|
|
1063
|
+
* @private
|
|
1064
|
+
*/
|
|
1065
|
+
_onCanvasTargetResize(): void;
|
|
985
1066
|
/**
|
|
986
1067
|
* Alias for `compileAsync()`.
|
|
987
1068
|
*
|
|
@@ -993,4 +1074,11 @@ declare class Renderer {
|
|
|
993
1074
|
*/
|
|
994
1075
|
get compile(): (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise<void>;
|
|
995
1076
|
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Animation loop parameter of `renderer.setAnimationLoop()`.
|
|
1079
|
+
*
|
|
1080
|
+
* @callback onAnimationCallback
|
|
1081
|
+
* @param {DOMHighResTimeStamp} time - A timestamp indicating the end time of the previous frame's rendering.
|
|
1082
|
+
* @param {XRFrame} [frame] - A reference to the current XR frame. Only relevant when using XR rendering.
|
|
1083
|
+
*/
|
|
996
1084
|
export default Renderer;
|
|
@@ -87,6 +87,19 @@ declare class Textures extends DataMap<{
|
|
|
87
87
|
* @param {Object} [options={}] - The options.
|
|
88
88
|
*/
|
|
89
89
|
updateTexture(texture: Texture, options?: TextureOptions): void;
|
|
90
|
+
/**
|
|
91
|
+
* Updates the sampler for the given texture. This method has no effect
|
|
92
|
+
* for the WebGL backend since it has no concept of samplers. Texture
|
|
93
|
+
* parameters are configured with the `texParameter()` command for each
|
|
94
|
+
* texture.
|
|
95
|
+
*
|
|
96
|
+
* In WebGPU, samplers are objects like textures and it's possible to share
|
|
97
|
+
* them when the texture parameters match.
|
|
98
|
+
*
|
|
99
|
+
* @param {Texture} texture - The texture to update the sampler for.
|
|
100
|
+
* @return {string} The current sampler key.
|
|
101
|
+
*/
|
|
102
|
+
updateSampler(texture: Texture): void;
|
|
90
103
|
/**
|
|
91
104
|
* Computes the size of the given texture and writes the result
|
|
92
105
|
* into the target vector. This vector is also returned by the
|
|
@@ -116,6 +129,13 @@ declare class Textures extends DataMap<{
|
|
|
116
129
|
* @return {boolean} Whether mipmaps are required or not.
|
|
117
130
|
*/
|
|
118
131
|
needsMipmaps(texture: Texture): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Frees internal resources when the given render target isn't
|
|
134
|
+
* required anymore.
|
|
135
|
+
*
|
|
136
|
+
* @param {RenderTarget} renderTarget - The render target to destroy.
|
|
137
|
+
*/
|
|
138
|
+
_destroyRenderTarget(renderTarget: RenderTarget): void;
|
|
119
139
|
/**
|
|
120
140
|
* Frees internal resource when the given texture isn't
|
|
121
141
|
* required anymore.
|
|
@@ -10,21 +10,44 @@ declare abstract class TimestampQueryPool {
|
|
|
10
10
|
queryOffsets: Map<number, number>;
|
|
11
11
|
isDisposed: boolean;
|
|
12
12
|
lastValue: number;
|
|
13
|
+
frames: number[];
|
|
13
14
|
pendingResolve: boolean;
|
|
15
|
+
timestamps: Map<string, number>;
|
|
14
16
|
/**
|
|
15
17
|
* Creates a new timestamp query pool.
|
|
16
18
|
*
|
|
17
19
|
* @param {number} [maxQueries=256] - Maximum number of queries this pool can hold.
|
|
18
20
|
*/
|
|
19
21
|
constructor(maxQueries?: number);
|
|
22
|
+
/**
|
|
23
|
+
* Returns all timestamp frames.
|
|
24
|
+
*
|
|
25
|
+
* @return {Array<number>} The timestamp frames.
|
|
26
|
+
*/
|
|
27
|
+
getTimestampFrames(): number[];
|
|
28
|
+
/**
|
|
29
|
+
* Returns the timestamp for a given render context.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} uid - A unique identifier for the render context.
|
|
32
|
+
* @return {?number} The timestamp, or undefined if not available.
|
|
33
|
+
*/
|
|
34
|
+
getTimestamp(uid: string): number;
|
|
35
|
+
/**
|
|
36
|
+
* Returns whether a timestamp is available for a given render context.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} uid - A unique identifier for the render context.
|
|
39
|
+
* @return {boolean} True if a timestamp is available, false otherwise.
|
|
40
|
+
*/
|
|
41
|
+
hasTimestamp(uid: string): boolean;
|
|
20
42
|
/**
|
|
21
43
|
* Allocate queries for a specific uid.
|
|
22
44
|
*
|
|
23
45
|
* @abstract
|
|
24
46
|
* @param {string} uid - A unique identifier for the render context.
|
|
47
|
+
* @param {number} frameId - The current frame identifier.
|
|
25
48
|
* @returns {?number}
|
|
26
49
|
*/
|
|
27
|
-
abstract allocateQueriesForContext(uid: string): number | null;
|
|
50
|
+
abstract allocateQueriesForContext(uid: string, frameId: number): number | null;
|
|
28
51
|
/**
|
|
29
52
|
* Resolve all timestamps and return data (or process them).
|
|
30
53
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RenderTarget } from "../../../core/RenderTarget.js";
|
|
2
2
|
import { Vector3 } from "../../../math/Vector3.js";
|
|
3
3
|
import { Scene } from "../../../scenes/Scene.js";
|
|
4
|
+
import { Texture } from "../../../textures/Texture.js";
|
|
4
5
|
import Renderer from "../Renderer.js";
|
|
5
6
|
|
|
6
7
|
export interface PMREMGeneratorOptions {
|
|
@@ -19,7 +20,9 @@ declare class PMREMGenerator {
|
|
|
19
20
|
far?: number,
|
|
20
21
|
options?: PMREMGeneratorOptions,
|
|
21
22
|
): RenderTarget;
|
|
22
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated ".fromSceneAsync()" is deprecated. Use "await renderer.init()" instead.
|
|
25
|
+
*/
|
|
23
26
|
fromSceneAsync(
|
|
24
27
|
scene: Scene,
|
|
25
28
|
sigma?: number,
|
|
@@ -28,6 +31,21 @@ declare class PMREMGenerator {
|
|
|
28
31
|
options?: PMREMGeneratorOptions,
|
|
29
32
|
): Promise<RenderTarget>;
|
|
30
33
|
|
|
34
|
+
fromEquirectangular(equirectangular: Texture, renderTarget?: RenderTarget | null): RenderTarget;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated ".fromEquirectangularAsync()" is deprecated. Use "await renderer.init()" instead.
|
|
37
|
+
*/
|
|
38
|
+
fromEquirectangularAsync(equirectangular: Texture, renderTarget?: RenderTarget | null): Promise<RenderTarget>;
|
|
39
|
+
|
|
40
|
+
fromCubemap(cubemap: Texture, renderTarget?: RenderTarget | null): RenderTarget;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated ".fromCubemapAsync()" is deprecated. Use "await renderer.init()" instead.
|
|
43
|
+
*/
|
|
44
|
+
fromCubemapAsync(cubemap: Texture, renderTarget?: RenderTarget | null): Promise<RenderTarget>;
|
|
45
|
+
|
|
46
|
+
compileCubemapShader(): Promise<void>;
|
|
47
|
+
compileEquirectangularShader(): Promise<void>;
|
|
48
|
+
|
|
31
49
|
dispose(): void;
|
|
32
50
|
}
|
|
33
51
|
|
|
@@ -4,7 +4,6 @@ import { Material } from "../../../materials/Material.js";
|
|
|
4
4
|
import NodeMaterial from "../../../materials/nodes/NodeMaterial.js";
|
|
5
5
|
import Node from "../../../nodes/core/Node.js";
|
|
6
6
|
import AnalyticLightNode from "../../../nodes/lighting/AnalyticLightNode.js";
|
|
7
|
-
import { ShaderNodeObject } from "../../../nodes/tsl/TSLCore.js";
|
|
8
7
|
/**
|
|
9
8
|
* The purpose of a node library is to assign node implementations
|
|
10
9
|
* to existing library features. In `WebGPURenderer` lights, materials
|
|
@@ -22,7 +21,7 @@ declare class NodeLibrary {
|
|
|
22
21
|
materialNodes: Map<string, {
|
|
23
22
|
new(): NodeMaterial;
|
|
24
23
|
}>;
|
|
25
|
-
toneMappingNodes: Map<ToneMapping, (color: Node, exposure: Node) =>
|
|
24
|
+
toneMappingNodes: Map<ToneMapping, (color: Node, exposure: Node) => Node>;
|
|
26
25
|
/**
|
|
27
26
|
* Constructs a new node library.
|
|
28
27
|
*/
|
|
@@ -44,17 +43,14 @@ declare class NodeLibrary {
|
|
|
44
43
|
* @param {Function} toneMappingNode - The tone mapping node function.
|
|
45
44
|
* @param {number} toneMapping - The tone mapping.
|
|
46
45
|
*/
|
|
47
|
-
addToneMapping(
|
|
48
|
-
toneMappingNode: (color: Node, exposure: Node) => ShaderNodeObject<Node>,
|
|
49
|
-
toneMapping: ToneMapping,
|
|
50
|
-
): void;
|
|
46
|
+
addToneMapping(toneMappingNode: (color: Node, exposure: Node) => Node, toneMapping: ToneMapping): void;
|
|
51
47
|
/**
|
|
52
48
|
* Returns a tone mapping node function for a tone mapping technique (constant).
|
|
53
49
|
*
|
|
54
50
|
* @param {number} toneMapping - The tone mapping.
|
|
55
51
|
* @return {?Function} The tone mapping node function. Returns `null` if no node function is found.
|
|
56
52
|
*/
|
|
57
|
-
getToneMappingFunction(toneMapping: ToneMapping): ((color: Node, exposure: Node) =>
|
|
53
|
+
getToneMappingFunction(toneMapping: ToneMapping): ((color: Node, exposure: Node) => Node) | null;
|
|
58
54
|
/**
|
|
59
55
|
* Returns a node material class definition for a material type.
|
|
60
56
|
*
|