@types/three 0.170.0 → 0.172.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/build/three.core.d.ts +1 -0
- three/build/three.core.min.d.ts +1 -0
- three/build/three.tsl.d.ts +1 -0
- three/build/three.tsl.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +0 -5
- three/examples/jsm/controls/ArcballControls.d.ts +6 -1
- three/examples/jsm/controls/OrbitControls.d.ts +5 -0
- three/examples/jsm/controls/TransformControls.d.ts +1 -1
- three/examples/jsm/csm/CSMShadowNode.d.ts +2 -4
- three/examples/jsm/exporters/GLTFExporter.d.ts +23 -7
- three/examples/jsm/geometries/DecalGeometry.d.ts +1 -1
- three/examples/jsm/geometries/InstancedPointsGeometry.d.ts +13 -0
- three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
- three/examples/jsm/lines/LineSegments2.d.ts +3 -1
- three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +1 -1
- three/examples/jsm/modifiers/CurveModifier.d.ts +1 -1
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +1 -1
- three/examples/jsm/objects/InstancedPoints.d.ts +10 -0
- three/examples/jsm/objects/SkyMesh.d.ts +2 -2
- three/examples/jsm/objects/Water2Mesh.d.ts +13 -2
- three/examples/jsm/objects/WaterMesh.d.ts +11 -2
- three/examples/jsm/postprocessing/OutlinePass.d.ts +1 -1
- three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +1 -1
- three/examples/jsm/tsl/display/AfterImageNode.d.ts +2 -1
- three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +1 -1
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +2 -2
- three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -1
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -1
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +3 -4
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +2 -1
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +2 -1
- three/examples/jsm/tsl/display/FilmNode.d.ts +2 -1
- three/examples/jsm/tsl/display/GTAONode.d.ts +5 -8
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +2 -2
- three/examples/jsm/tsl/display/LensflareNode.d.ts +2 -2
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +2 -2
- three/examples/jsm/tsl/display/MotionBlur.d.ts +2 -1
- three/examples/jsm/tsl/display/OutlineNode.d.ts +2 -2
- three/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +1 -1
- three/examples/jsm/tsl/display/PixelationPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +2 -1
- three/examples/jsm/tsl/display/SMAANode.d.ts +2 -1
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/SSRNode.d.ts +2 -2
- three/examples/jsm/tsl/display/Sepia.d.ts +2 -1
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +2 -1
- three/examples/jsm/tsl/display/StereoCompositePassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/StereoPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/TransitionNode.d.ts +2 -1
- three/examples/jsm/tsl/display/hashBlur.d.ts +2 -1
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +2 -1
- three/examples/jsm/utils/ShadowMapViewer.d.ts +2 -2
- three/package.json +4 -4
- three/src/Three.Core.d.ts +159 -0
- three/src/Three.TSL.d.ts +533 -0
- three/src/Three.WebGPU.Nodes.d.ts +14 -195
- three/src/Three.WebGPU.d.ts +14 -196
- three/src/Three.d.ts +2 -158
- three/src/animation/AnimationClip.d.ts +3 -1
- three/src/cameras/CubeCamera.d.ts +19 -2
- three/src/core/Clock.d.ts +4 -6
- three/src/core/InterleavedBuffer.d.ts +12 -0
- three/src/core/RenderTarget.d.ts +3 -5
- three/src/core/RenderTarget3D.d.ts +9 -0
- three/src/core/RenderTargetArray.d.ts +9 -0
- three/src/materials/Material.d.ts +9 -5
- three/src/materials/MeshDepthMaterial.d.ts +0 -5
- three/src/materials/MeshDistanceMaterial.d.ts +0 -5
- three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -0
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +3 -0
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +6 -6
- three/src/materials/nodes/NodeMaterial.d.ts +7 -1
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +56 -0
- three/src/nodes/Nodes.d.ts +2 -7
- three/src/nodes/TSL.d.ts +10 -5
- three/src/nodes/accessors/Arrays.d.ts +7 -0
- three/src/nodes/accessors/BufferAttributeNode.d.ts +117 -0
- three/src/nodes/accessors/BufferNode.d.ts +4 -4
- three/src/nodes/accessors/BuiltinNode.d.ts +14 -0
- three/src/nodes/accessors/ClippingNode.d.ts +6 -0
- three/src/nodes/accessors/InstanceNode.d.ts +15 -3
- three/src/nodes/accessors/InstancedMeshNode.d.ts +11 -0
- three/src/nodes/accessors/Lights.d.ts +15 -0
- three/src/nodes/accessors/MaterialNode.d.ts +3 -3
- three/src/nodes/accessors/ModelNode.d.ts +10 -2
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +2 -6
- three/src/nodes/accessors/StorageBufferNode.d.ts +25 -12
- three/src/nodes/accessors/StorageTextureNode.d.ts +5 -3
- three/src/nodes/accessors/TextureNode.d.ts +5 -0
- three/src/nodes/accessors/UniformArrayNode.d.ts +3 -2
- three/src/nodes/core/IndexNode.d.ts +2 -0
- three/src/nodes/core/Node.d.ts +237 -0
- three/src/nodes/core/NodeAttribute.d.ts +13 -0
- three/src/nodes/core/NodeBuilder.d.ts +1 -2
- three/src/nodes/core/NodeCache.d.ts +21 -0
- three/src/nodes/core/NodeParser.d.ts +11 -0
- three/src/nodes/core/NodeUniform.d.ts +28 -0
- three/src/nodes/core/NodeUtils.d.ts +7 -0
- three/src/nodes/core/NodeVar.d.ts +12 -0
- three/src/nodes/core/NodeVarying.d.ts +14 -0
- three/src/nodes/core/StackNode.d.ts +6 -1
- three/src/nodes/core/StructTypeNode.d.ts +19 -1
- three/src/nodes/core/UniformNode.d.ts +44 -0
- three/src/nodes/core/VaryingNode.d.ts +3 -0
- three/src/nodes/core/constants.d.ts +41 -0
- three/src/nodes/display/BlendModes.d.ts +32 -0
- three/src/nodes/display/PassNode.d.ts +1 -1
- three/src/nodes/display/ScreenNode.d.ts +5 -0
- three/src/nodes/display/ViewportDepthNode.d.ts +3 -1
- three/src/nodes/fog/Fog.d.ts +26 -0
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +88 -0
- three/src/nodes/gpgpu/BarrierNode.d.ts +12 -0
- three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +13 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +6 -1
- three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +19 -0
- three/src/nodes/lighting/AnalyticLightNode.d.ts +11 -0
- three/src/nodes/lighting/LightsNode.d.ts +2 -2
- three/src/nodes/lighting/PointLightNode.d.ts +3 -0
- three/src/nodes/lighting/PointShadowNode.d.ts +30 -0
- three/src/nodes/lighting/ShadowBaseNode.d.ts +15 -0
- three/src/nodes/lighting/ShadowNode.d.ts +28 -4
- three/src/nodes/math/MathNode.d.ts +13 -4
- three/src/nodes/math/OperatorNode.d.ts +3 -0
- three/src/nodes/tsl/TSLBase.d.ts +5 -0
- three/src/nodes/tsl/TSLCore.d.ts +51 -16
- three/src/nodes/utils/EquirectUVNode.d.ts +2 -2
- three/src/nodes/utils/LoopNode.d.ts +23 -2
- three/src/nodes/utils/SplitNode.d.ts +1 -1
- three/src/objects/BatchedMesh.d.ts +4 -4
- three/src/objects/ClippingGroup.d.ts +41 -0
- three/src/renderers/WebGLRenderer.d.ts +10 -8
- three/src/renderers/common/Animation.d.ts +41 -4
- three/src/renderers/common/Attributes.d.ts +31 -0
- three/src/renderers/common/Backend.d.ts +11 -0
- three/src/renderers/common/Background.d.ts +22 -0
- three/src/renderers/common/BindGroup.d.ts +15 -0
- three/src/renderers/common/Binding.d.ts +24 -0
- three/src/renderers/common/Bindings.d.ts +54 -0
- three/src/renderers/common/Buffer.d.ts +31 -0
- three/src/renderers/common/BufferUtils.d.ts +26 -0
- three/src/renderers/common/BundleGroup.d.ts +22 -0
- three/src/renderers/common/ChainMap.d.ts +31 -1
- three/src/renderers/common/ClippingContext.d.ts +61 -14
- three/src/renderers/common/Color4.d.ts +36 -0
- three/src/renderers/common/ComputePipeline.d.ts +12 -0
- three/src/renderers/common/CubeRenderTarget.d.ts +13 -0
- three/src/renderers/common/DataMap.d.ts +30 -0
- three/src/renderers/common/Geometries.d.ts +52 -0
- three/src/renderers/common/Info.d.ts +27 -0
- three/src/renderers/common/Pipeline.d.ts +11 -0
- three/src/renderers/common/Pipelines.d.ts +104 -0
- three/src/renderers/common/ProgrammableStage.d.ts +19 -1
- three/src/renderers/common/RenderBundle.d.ts +15 -4
- three/src/renderers/common/RenderBundles.d.ts +20 -2
- three/src/renderers/common/RenderContext.d.ts +22 -0
- three/src/renderers/common/RenderContexts.d.ts +42 -3
- three/src/renderers/common/RenderList.d.ts +90 -0
- three/src/renderers/common/RenderLists.d.ts +21 -0
- three/src/renderers/common/RenderObject.d.ts +160 -5
- three/src/renderers/common/RenderObjects.d.ts +56 -0
- three/src/renderers/common/RenderPipeline.d.ts +13 -0
- three/src/renderers/common/Renderer.d.ts +596 -6
- three/src/renderers/common/{PostProcessingUtils.d.ts → RendererUtils.d.ts} +16 -4
- three/src/renderers/common/StorageBufferAttribute.d.ts +1 -1
- three/src/renderers/common/Textures.d.ts +66 -0
- three/src/renderers/common/Uniform.d.ts +106 -0
- three/src/renderers/common/UniformBuffer.d.ts +12 -0
- three/src/renderers/common/UniformsGroup.d.ts +104 -0
- three/src/renderers/common/extras/PMREMGenerator.d.ts +15 -1
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +30 -0
- three/src/renderers/common/nodes/NodeLibrary.d.ts +73 -4
- three/src/renderers/common/nodes/NodeUniform.d.ts +161 -0
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +14 -2
- three/src/renderers/common/nodes/Nodes.d.ts +185 -11
- three/src/renderers/webgl/WebGLState.d.ts +1 -1
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +10 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +11 -0
- three/src/textures/Data3DTexture.d.ts +4 -2
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/textures/DataTexture.d.ts +7 -2
- three/src/textures/Texture.d.ts +3 -0
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +0 -99
- three/examples/jsm/animation/MMDPhysics.d.ts +0 -128
- three/examples/jsm/exporters/MMDExporter.d.ts +0 -11
- three/examples/jsm/loaders/MMDLoader.d.ts +0 -60
- three/examples/jsm/shaders/MMDToonShader.d.ts +0 -15
- three/src/Three.Legacy.d.ts +0 -20
- three/src/nodes/core/UniformGroup.d.ts +0 -7
- three/src/nodes/display/BlendMode.d.ts +0 -10
- three/src/nodes/fog/FogExp2Node.d.ts +0 -14
- three/src/nodes/fog/FogNode.d.ts +0 -20
- three/src/nodes/fog/FogRangeNode.d.ts +0 -19
- three/src/nodes/lighting/LightNode.d.ts +0 -18
- three/src/textures/types.d.ts +0 -9
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
import NodeAttribute from "../../nodes/core/NodeAttribute.js";
|
|
2
|
+
/**
|
|
3
|
+
* Class for representing programmable stages which are vertex,
|
|
4
|
+
* fragment or compute shaders. Unlike fixed-function states (like blending),
|
|
5
|
+
* they represent the programmable part of a pipeline.
|
|
6
|
+
*
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
2
9
|
declare class ProgrammableStage {
|
|
3
10
|
id: number;
|
|
4
11
|
code: string;
|
|
5
12
|
stage: "compute" | "vertex" | "fragment";
|
|
13
|
+
name: string;
|
|
6
14
|
attributes: NodeAttribute[] | null;
|
|
7
15
|
usedTimes: number;
|
|
16
|
+
/**
|
|
17
|
+
* Constructs a new programmable stage.
|
|
18
|
+
*
|
|
19
|
+
* @param {String} code - The shader code.
|
|
20
|
+
* @param {('vertex'|'fragment'|'compute')} stage - The type of stage.
|
|
21
|
+
* @param {String} name - The name of the shader.
|
|
22
|
+
* @param {Array<Object>?} [transforms=null] - The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback).
|
|
23
|
+
* @param {Array<Object>?} [attributes=null] - The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback).
|
|
24
|
+
*/
|
|
8
25
|
constructor(
|
|
9
26
|
code: string,
|
|
10
|
-
|
|
27
|
+
stage: "compute" | "vertex" | "fragment",
|
|
28
|
+
name: string,
|
|
11
29
|
transforms?: null,
|
|
12
30
|
attributes?: NodeAttribute[] | null,
|
|
13
31
|
);
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
-
import
|
|
2
|
+
import BundleGroup from "./BundleGroup.js";
|
|
3
|
+
/**
|
|
4
|
+
* This module is used to represent render bundles inside the renderer
|
|
5
|
+
* for further processing.
|
|
6
|
+
*
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
3
9
|
declare class RenderBundle {
|
|
4
|
-
|
|
10
|
+
bundleGroup: BundleGroup;
|
|
5
11
|
camera: Camera;
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a new bundle group.
|
|
14
|
+
*
|
|
15
|
+
* @param {BundleGroup} bundleGroup - The bundle group.
|
|
16
|
+
* @param {Camera} camera - The camera the bundle group is rendered with.
|
|
17
|
+
*/
|
|
18
|
+
constructor(bundleGroup: BundleGroup, camera: Camera);
|
|
8
19
|
}
|
|
9
20
|
export default RenderBundle;
|
|
@@ -2,10 +2,28 @@ import { Camera } from "../../cameras/Camera.js";
|
|
|
2
2
|
import BundleGroup from "./BundleGroup.js";
|
|
3
3
|
import ChainMap from "./ChainMap.js";
|
|
4
4
|
import RenderBundle from "./RenderBundle.js";
|
|
5
|
+
/**
|
|
6
|
+
* This renderer module manages render bundles.
|
|
7
|
+
*
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
5
10
|
declare class RenderBundles {
|
|
6
|
-
|
|
11
|
+
bundles: ChainMap<readonly [BundleGroup, Camera], RenderBundle>;
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a new render bundle management component.
|
|
14
|
+
*/
|
|
7
15
|
constructor();
|
|
8
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Returns a render bundle for the given bundle group and camera.
|
|
18
|
+
*
|
|
19
|
+
* @param {BundleGroup} bundleGroup - The bundle group.
|
|
20
|
+
* @param {Camera} camera - The camera the bundle group is rendered with.
|
|
21
|
+
* @return {RenderBundle} The render bundle.
|
|
22
|
+
*/
|
|
23
|
+
get(bundleGroup: BundleGroup, camera: Camera): RenderBundle;
|
|
24
|
+
/**
|
|
25
|
+
* Frees all internal resources.
|
|
26
|
+
*/
|
|
9
27
|
dispose(): void;
|
|
10
28
|
}
|
|
11
29
|
export default RenderBundles;
|
|
@@ -3,6 +3,14 @@ import { Vector4 } from "../../math/Vector4.js";
|
|
|
3
3
|
import { DepthTexture } from "../../textures/DepthTexture.js";
|
|
4
4
|
import { Texture } from "../../textures/Texture.js";
|
|
5
5
|
import ClippingContext from "./ClippingContext.js";
|
|
6
|
+
/**
|
|
7
|
+
* Any render or compute command is executed in a specific context that defines
|
|
8
|
+
* the state of the renderer and its backend. Typical examples for such context
|
|
9
|
+
* data are the current clear values or data from the active framebuffer. This
|
|
10
|
+
* module is used to represent these contexts as objects.
|
|
11
|
+
*
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
6
14
|
declare class RenderContext {
|
|
7
15
|
id: number;
|
|
8
16
|
color: boolean;
|
|
@@ -36,8 +44,22 @@ declare class RenderContext {
|
|
|
36
44
|
renderTarget?: RenderTarget | undefined;
|
|
37
45
|
activeMipmapLevel?: number | undefined;
|
|
38
46
|
occlusionQueryCount?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a new render context.
|
|
49
|
+
*/
|
|
39
50
|
constructor();
|
|
51
|
+
/**
|
|
52
|
+
* Returns the cache key of this render context.
|
|
53
|
+
*
|
|
54
|
+
* @return {Number} The cache key.
|
|
55
|
+
*/
|
|
40
56
|
getCacheKey(): number;
|
|
41
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Computes a cache key for the given render context.
|
|
60
|
+
*
|
|
61
|
+
* @param {RenderContext} renderContext - The render context.
|
|
62
|
+
* @return {Number} The cache key.
|
|
63
|
+
*/
|
|
42
64
|
export declare function getCacheKey(renderContext: RenderContext): number;
|
|
43
65
|
export default RenderContext;
|
|
@@ -3,15 +3,54 @@ import { Object3D } from "../../core/Object3D.js";
|
|
|
3
3
|
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
4
4
|
import ChainMap from "./ChainMap.js";
|
|
5
5
|
import RenderContext from "./RenderContext.js";
|
|
6
|
+
/**
|
|
7
|
+
* This module manages the render contexts of the renderer.
|
|
8
|
+
*
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
6
11
|
declare class RenderContexts {
|
|
7
12
|
chainMaps: {
|
|
8
|
-
[attachmentState: string]:
|
|
13
|
+
[attachmentState: string]:
|
|
14
|
+
| ChainMap<
|
|
15
|
+
| readonly [Object3D, Camera]
|
|
16
|
+
| readonly [Object3D, Camera, {
|
|
17
|
+
id: "default";
|
|
18
|
+
}],
|
|
19
|
+
RenderContext
|
|
20
|
+
>
|
|
21
|
+
| undefined;
|
|
9
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new render context management component.
|
|
25
|
+
*/
|
|
10
26
|
constructor();
|
|
11
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Returns a render context for the given scene, camera and render target.
|
|
29
|
+
*
|
|
30
|
+
* @param {Scene?} [scene=null] - The scene. The parameter can become `null` e.g. when the renderer clears a render target.
|
|
31
|
+
* @param {Camera?} [camera=null] - The camera that is used to render the scene. The parameter can become `null` e.g. when the renderer clears a render target.
|
|
32
|
+
* @param {RenderTarget?} [renderTarget=null] - The active render target.
|
|
33
|
+
* @return {RenderContext} The render context.
|
|
34
|
+
*/
|
|
35
|
+
get(scene?: Object3D | null, camera?: Camera | null, renderTarget?: RenderTarget | null): RenderContext;
|
|
36
|
+
/**
|
|
37
|
+
* Returns a chain map for the given attachment state.
|
|
38
|
+
*
|
|
39
|
+
* @param {String} attachmentState - The attachment state.
|
|
40
|
+
* @return {ChainMap} The chain map.
|
|
41
|
+
*/
|
|
12
42
|
getChainMap(
|
|
13
43
|
attachmentState: string,
|
|
14
|
-
): ChainMap<
|
|
44
|
+
): ChainMap<
|
|
45
|
+
| readonly [Object3D<import("../../core/Object3D.js").Object3DEventMap>, Camera]
|
|
46
|
+
| readonly [Object3D<import("../../core/Object3D.js").Object3DEventMap>, Camera, {
|
|
47
|
+
id: "default";
|
|
48
|
+
}],
|
|
49
|
+
RenderContext
|
|
50
|
+
>;
|
|
51
|
+
/**
|
|
52
|
+
* Frees internal resources.
|
|
53
|
+
*/
|
|
15
54
|
dispose(): void;
|
|
16
55
|
}
|
|
17
56
|
export default RenderContexts;
|
|
@@ -5,6 +5,7 @@ import { Light } from "../../lights/Light.js";
|
|
|
5
5
|
import { Material } from "../../materials/Material.js";
|
|
6
6
|
import { LightsNode } from "../../nodes/Nodes.js";
|
|
7
7
|
import BundleGroup from "./BundleGroup.js";
|
|
8
|
+
import ClippingContext from "./ClippingContext.js";
|
|
8
9
|
import Lighting from "./Lighting.js";
|
|
9
10
|
export interface Bundle {
|
|
10
11
|
bundleGroup: BundleGroup;
|
|
@@ -20,7 +21,19 @@ export interface RenderItem {
|
|
|
20
21
|
renderOrder: number | null;
|
|
21
22
|
z: number | null;
|
|
22
23
|
group: GeometryGroup | null;
|
|
24
|
+
clippingContext: ClippingContext | null;
|
|
23
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* When the renderer analyzes the scene at the beginning of a render call,
|
|
28
|
+
* it stores 3D object for further processing in render lists. Depending on the
|
|
29
|
+
* properties of a 3D objects (like their transformation or material state), the
|
|
30
|
+
* objects are maintained in ordered lists for the actual rendering.
|
|
31
|
+
*
|
|
32
|
+
* Render lists are unique per scene and camera combination.
|
|
33
|
+
*
|
|
34
|
+
* @private
|
|
35
|
+
* @augments Pipeline
|
|
36
|
+
*/
|
|
24
37
|
declare class RenderList {
|
|
25
38
|
renderItems: RenderItem[];
|
|
26
39
|
renderItemsIndex: number;
|
|
@@ -33,8 +46,38 @@ declare class RenderList {
|
|
|
33
46
|
scene: Object3D;
|
|
34
47
|
camera: Camera;
|
|
35
48
|
occlusionQueryCount: number;
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a render list.
|
|
51
|
+
*
|
|
52
|
+
* @param {Lighting} lighting - The lighting management component.
|
|
53
|
+
* @param {Scene} scene - The scene.
|
|
54
|
+
* @param {Camera} camera - The camera the scene is rendered with.
|
|
55
|
+
*/
|
|
36
56
|
constructor(lighting: Lighting, scene: Object3D, camera: Camera);
|
|
57
|
+
/**
|
|
58
|
+
* This method is called right at the beginning of a render call
|
|
59
|
+
* before the scene is analyzed. It prepares the internal data
|
|
60
|
+
* structures for the upcoming render lists generation.
|
|
61
|
+
*
|
|
62
|
+
* @return {RenderList} A reference to this render list.
|
|
63
|
+
*/
|
|
37
64
|
begin(): this;
|
|
65
|
+
/**
|
|
66
|
+
* Returns a render item for the giving render item state. The state is defined
|
|
67
|
+
* by a series of object-related parameters.
|
|
68
|
+
*
|
|
69
|
+
* The method avoids object creation by holding render items and reusing them in
|
|
70
|
+
* subsequent render calls (just with different property values).
|
|
71
|
+
*
|
|
72
|
+
* @param {Object3D} object - The 3D object.
|
|
73
|
+
* @param {BufferGeometry} geometry - The 3D object's geometry.
|
|
74
|
+
* @param {Material} material - The 3D object's material.
|
|
75
|
+
* @param {Number} groupOrder - The current group order.
|
|
76
|
+
* @param {Number} z - Th 3D object's depth value (z value in clip space).
|
|
77
|
+
* @param {Number?} group - {Object?} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`.
|
|
78
|
+
* @param {ClippingContext} clippingContext - The current clipping context.
|
|
79
|
+
* @return {Object} The render item.
|
|
80
|
+
*/
|
|
38
81
|
getNextRenderItem(
|
|
39
82
|
object: Object3D,
|
|
40
83
|
geometry: BufferGeometry,
|
|
@@ -42,7 +85,20 @@ declare class RenderList {
|
|
|
42
85
|
groupOrder: number,
|
|
43
86
|
z: number,
|
|
44
87
|
group: GeometryGroup | null,
|
|
88
|
+
clippingContext: ClippingContext | null,
|
|
45
89
|
): RenderItem;
|
|
90
|
+
/**
|
|
91
|
+
* Pushes the given object as a render item to the internal render lists.
|
|
92
|
+
* The selected lists depend on the object properties.
|
|
93
|
+
*
|
|
94
|
+
* @param {Object3D} object - The 3D object.
|
|
95
|
+
* @param {BufferGeometry} geometry - The 3D object's geometry.
|
|
96
|
+
* @param {Material} material - The 3D object's material.
|
|
97
|
+
* @param {Number} groupOrder - The current group order.
|
|
98
|
+
* @param {Number} z - Th 3D object's depth value (z value in clip space).
|
|
99
|
+
* @param {Number?} group - {Object?} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`.
|
|
100
|
+
* @param {ClippingContext} clippingContext - The current clipping context.
|
|
101
|
+
*/
|
|
46
102
|
push(
|
|
47
103
|
object: Object3D,
|
|
48
104
|
geometry: BufferGeometry,
|
|
@@ -50,7 +106,20 @@ declare class RenderList {
|
|
|
50
106
|
groupOrder: number,
|
|
51
107
|
z: number,
|
|
52
108
|
group: GeometryGroup | null,
|
|
109
|
+
clippingContext: ClippingContext | null,
|
|
53
110
|
): void;
|
|
111
|
+
/**
|
|
112
|
+
* Inserts the given object as a render item at the start of the internal render lists.
|
|
113
|
+
* The selected lists depend on the object properties.
|
|
114
|
+
*
|
|
115
|
+
* @param {Object3D} object - The 3D object.
|
|
116
|
+
* @param {BufferGeometry} geometry - The 3D object's geometry.
|
|
117
|
+
* @param {Material} material - The 3D object's material.
|
|
118
|
+
* @param {Number} groupOrder - The current group order.
|
|
119
|
+
* @param {Number} z - Th 3D object's depth value (z value in clip space).
|
|
120
|
+
* @param {Number?} group - {Object?} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`.
|
|
121
|
+
* @param {ClippingContext} clippingContext - The current clipping context.
|
|
122
|
+
*/
|
|
54
123
|
unshift(
|
|
55
124
|
object: Object3D,
|
|
56
125
|
geometry: BufferGeometry,
|
|
@@ -58,13 +127,34 @@ declare class RenderList {
|
|
|
58
127
|
groupOrder: number,
|
|
59
128
|
z: number,
|
|
60
129
|
group: GeometryGroup | null,
|
|
130
|
+
clippingContext: ClippingContext | null,
|
|
61
131
|
): void;
|
|
132
|
+
/**
|
|
133
|
+
* Pushes render bundle group data into the render list.
|
|
134
|
+
*
|
|
135
|
+
* @param {Object} group - Bundle group data.
|
|
136
|
+
*/
|
|
62
137
|
pushBundle(group: Bundle): void;
|
|
138
|
+
/**
|
|
139
|
+
* Pushes a light into the render list.
|
|
140
|
+
*
|
|
141
|
+
* @param {Light} light - The light.
|
|
142
|
+
*/
|
|
63
143
|
pushLight(light: Light): void;
|
|
144
|
+
/**
|
|
145
|
+
* Sorts the internal render lists.
|
|
146
|
+
*
|
|
147
|
+
* @param {Function} customOpaqueSort - A custom sort function for opaque objects.
|
|
148
|
+
* @param {Function} customTransparentSort - A custom sort function for transparent objects.
|
|
149
|
+
*/
|
|
64
150
|
sort(
|
|
65
151
|
customOpaqueSort: ((a: RenderItem, b: RenderItem) => number) | null,
|
|
66
152
|
customTransparentSort: ((a: RenderItem, b: RenderItem) => number) | null,
|
|
67
153
|
): void;
|
|
154
|
+
/**
|
|
155
|
+
* This method performs finalizing tasks right after the render lists
|
|
156
|
+
* have been generated.
|
|
157
|
+
*/
|
|
68
158
|
finish(): void;
|
|
69
159
|
}
|
|
70
160
|
export default RenderList;
|
|
@@ -3,11 +3,32 @@ import { Object3D } from "../../core/Object3D.js";
|
|
|
3
3
|
import ChainMap from "./ChainMap.js";
|
|
4
4
|
import Lighting from "./Lighting.js";
|
|
5
5
|
import RenderList from "./RenderList.js";
|
|
6
|
+
/**
|
|
7
|
+
* This renderer module manages the render lists which are unique
|
|
8
|
+
* per scene and camera combination.
|
|
9
|
+
*
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
6
12
|
declare class RenderLists {
|
|
7
13
|
lighting: Lighting;
|
|
8
14
|
lists: ChainMap<readonly [Object3D, Camera], RenderList>;
|
|
15
|
+
/**
|
|
16
|
+
* Constructs a render lists management component.
|
|
17
|
+
*
|
|
18
|
+
* @param {Lighting} lighting - The lighting management component.
|
|
19
|
+
*/
|
|
9
20
|
constructor(lighting: Lighting);
|
|
21
|
+
/**
|
|
22
|
+
* Returns a render list for the given scene and camera.
|
|
23
|
+
*
|
|
24
|
+
* @param {Scene} scene - The scene.
|
|
25
|
+
* @param {Camera} camera - The camera.
|
|
26
|
+
* @return {RenderList} The render list.
|
|
27
|
+
*/
|
|
10
28
|
get(scene: Object3D, camera: Camera): RenderList;
|
|
29
|
+
/**
|
|
30
|
+
* Frees all internal resources.
|
|
31
|
+
*/
|
|
11
32
|
dispose(): void;
|
|
12
33
|
}
|
|
13
34
|
export default RenderLists;
|
|
@@ -17,6 +17,24 @@ import Nodes from "./nodes/Nodes.js";
|
|
|
17
17
|
import RenderContext from "./RenderContext.js";
|
|
18
18
|
import Renderer from "./Renderer.js";
|
|
19
19
|
import RenderPipeline from "./RenderPipeline.js";
|
|
20
|
+
/**
|
|
21
|
+
* A render object is the renderer's representation of single entity that gets drawn
|
|
22
|
+
* with a draw command. There is no unique mapping of render objects to 3D objects in the
|
|
23
|
+
* scene since render objects also depend from the used material, the current render context
|
|
24
|
+
* and the current scene's lighting.
|
|
25
|
+
*
|
|
26
|
+
* In general, the basic process of the renderer is:
|
|
27
|
+
*
|
|
28
|
+
* - Analyze the 3D objects in the scene and generate render lists containing render items.
|
|
29
|
+
* - Process the render lists by calling one or more render commands for each render item.
|
|
30
|
+
* - For each render command, request a render object and perform the draw.
|
|
31
|
+
*
|
|
32
|
+
* The module provides an interface to get data required for the draw command like the actual
|
|
33
|
+
* draw parameters or vertex buffers. It also holds a series of caching related methods since
|
|
34
|
+
* creating render objects should only be done when necessary.
|
|
35
|
+
*
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
20
38
|
export default class RenderObject {
|
|
21
39
|
_nodes: Nodes;
|
|
22
40
|
_geometries: Geometries;
|
|
@@ -44,8 +62,8 @@ export default class RenderObject {
|
|
|
44
62
|
firstInstance: number;
|
|
45
63
|
} | null;
|
|
46
64
|
bundle: BundleGroup | null;
|
|
47
|
-
clippingContext: ClippingContext;
|
|
48
|
-
|
|
65
|
+
clippingContext: ClippingContext | null;
|
|
66
|
+
clippingContextCacheKey: string;
|
|
49
67
|
initialNodesCacheKey: string;
|
|
50
68
|
initialCacheKey: string;
|
|
51
69
|
_nodeBuilderState: NodeBuilderState | null;
|
|
@@ -54,6 +72,20 @@ export default class RenderObject {
|
|
|
54
72
|
onDispose: (() => void) | null;
|
|
55
73
|
readonly isRenderObject: true;
|
|
56
74
|
onMaterialDispose: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Constructs a new render object.
|
|
77
|
+
*
|
|
78
|
+
* @param {Nodes} nodes - Renderer component for managing nodes related logic.
|
|
79
|
+
* @param {Geometries} geometries - Renderer component for managing geometries.
|
|
80
|
+
* @param {Renderer} renderer - The renderer.
|
|
81
|
+
* @param {Object3D} object - The 3D object.
|
|
82
|
+
* @param {Material} material - The 3D object's material.
|
|
83
|
+
* @param {Scene} scene - The scene the 3D object belongs to.
|
|
84
|
+
* @param {Camera} camera - The camera the object should be rendered with.
|
|
85
|
+
* @param {LightsNode} lightsNode - The lights node.
|
|
86
|
+
* @param {RenderContext} renderContext - The render context.
|
|
87
|
+
* @param {ClippingContext} clippingContext - The clipping context.
|
|
88
|
+
*/
|
|
57
89
|
constructor(
|
|
58
90
|
nodes: Nodes,
|
|
59
91
|
geometries: Geometries,
|
|
@@ -64,32 +96,155 @@ export default class RenderObject {
|
|
|
64
96
|
camera: Camera,
|
|
65
97
|
lightsNode: LightsNode,
|
|
66
98
|
renderContext: RenderContext,
|
|
99
|
+
clippingContext: ClippingContext | null,
|
|
67
100
|
);
|
|
68
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Updates the clipping context.
|
|
103
|
+
*
|
|
104
|
+
* @param {ClippingContext} context - The clipping context to set.
|
|
105
|
+
*/
|
|
106
|
+
updateClipping(context: ClippingContext): void;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the clipping requires an update or not.
|
|
109
|
+
*
|
|
110
|
+
* @type {Boolean}
|
|
111
|
+
* @readonly
|
|
112
|
+
*/
|
|
69
113
|
get clippingNeedsUpdate(): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* The number of clipping planes defined in context of hardware clipping.
|
|
116
|
+
*
|
|
117
|
+
* @type {Number}
|
|
118
|
+
* @readonly
|
|
119
|
+
*/
|
|
120
|
+
get hardwareClippingPlanes(): number;
|
|
121
|
+
/**
|
|
122
|
+
* Returns the node builder state of this render object.
|
|
123
|
+
*
|
|
124
|
+
* @return {NodeBuilderState} The node buider state.
|
|
125
|
+
*/
|
|
70
126
|
getNodeBuilderState(): NodeBuilderState;
|
|
127
|
+
/**
|
|
128
|
+
* Returns the node material observer of this render object.
|
|
129
|
+
*
|
|
130
|
+
* @return {NodeMaterialObserver} The node material observer.
|
|
131
|
+
*/
|
|
71
132
|
getMonitor(): NodeMaterialObserver;
|
|
133
|
+
/**
|
|
134
|
+
* Returns an array of bind groups of this render object.
|
|
135
|
+
*
|
|
136
|
+
* @return {Array<BindGroup>} The bindings.
|
|
137
|
+
*/
|
|
72
138
|
getBindings(): BindGroup[];
|
|
139
|
+
/**
|
|
140
|
+
* Returns the index of the render object's geometry.
|
|
141
|
+
*
|
|
142
|
+
* @return {BufferAttribute?} The index. Returns `null` for non-indexed geometries.
|
|
143
|
+
*/
|
|
73
144
|
getIndex(): BufferAttribute | null;
|
|
145
|
+
/**
|
|
146
|
+
* Returns the indirect buffer attribute.
|
|
147
|
+
*
|
|
148
|
+
* @return {BufferAttribute?} The indirect attribute. `null` if no indirect drawing is used.
|
|
149
|
+
*/
|
|
74
150
|
getIndirect(): import("./IndirectStorageBufferAttribute.js").default | null;
|
|
151
|
+
/**
|
|
152
|
+
* Returns an array that acts as a key for identifying the render object in a chain map.
|
|
153
|
+
*
|
|
154
|
+
* @return {Array<Object>} An array with object references.
|
|
155
|
+
*/
|
|
75
156
|
getChainArray(): readonly [
|
|
76
157
|
Object3D<import("../../core/Object3D.js").Object3DEventMap>,
|
|
77
158
|
Material,
|
|
78
159
|
RenderContext,
|
|
79
160
|
LightsNode,
|
|
80
161
|
];
|
|
81
|
-
|
|
82
|
-
|
|
162
|
+
/**
|
|
163
|
+
* This method is used when the geometry of a 3D object has been exchanged and the
|
|
164
|
+
* respective render object now requires an update.
|
|
165
|
+
*
|
|
166
|
+
* @param {BufferGeometry} geometry - The geometry to set.
|
|
167
|
+
*/
|
|
168
|
+
setGeometry(geometry: BufferGeometry): void;
|
|
169
|
+
/**
|
|
170
|
+
* Returns the buffer attributes of the render object. The returned array holds
|
|
171
|
+
* attribute definitions on geometry and node level.
|
|
172
|
+
*
|
|
173
|
+
* @return {Array<BufferAttribute>} An array with buffer attributes.
|
|
174
|
+
*/
|
|
175
|
+
getAttributes(): (BufferAttribute | InterleavedBufferAttribute)[];
|
|
176
|
+
/**
|
|
177
|
+
* Returns the vertex buffers of the render object.
|
|
178
|
+
*
|
|
179
|
+
* @return {Array<BufferAttribute|InterleavedBuffer>} An array with buffer attribute or interleaved buffers.
|
|
180
|
+
*/
|
|
181
|
+
getVertexBuffers(): (BufferAttribute | InterleavedBuffer)[] | null;
|
|
182
|
+
/**
|
|
183
|
+
* Returns the draw parameters for the render object.
|
|
184
|
+
*
|
|
185
|
+
* @return {{vertexCount: Number, firstVertex: Number, instanceCount: Number, firstInstance: Number}} The draw parameters.
|
|
186
|
+
*/
|
|
83
187
|
getDrawParameters(): {
|
|
84
188
|
vertexCount: number;
|
|
85
189
|
firstVertex: number;
|
|
86
190
|
instanceCount: number;
|
|
87
191
|
firstInstance: number;
|
|
88
192
|
} | null;
|
|
193
|
+
/**
|
|
194
|
+
* Returns the render object's geometry cache key.
|
|
195
|
+
*
|
|
196
|
+
* The geometry cache key is part of the material cache key.
|
|
197
|
+
*
|
|
198
|
+
* @return {String} The geometry cache key.
|
|
199
|
+
*/
|
|
89
200
|
getGeometryCacheKey(): string;
|
|
201
|
+
/**
|
|
202
|
+
* Returns the render object's material cache key.
|
|
203
|
+
*
|
|
204
|
+
* The material cache key is part of the render object cache key.
|
|
205
|
+
*
|
|
206
|
+
* @return {String} The material cache key.
|
|
207
|
+
*/
|
|
90
208
|
getMaterialCacheKey(): number;
|
|
209
|
+
/**
|
|
210
|
+
* Whether the geometry requires an update or not.
|
|
211
|
+
*
|
|
212
|
+
* @type {Boolean}
|
|
213
|
+
* @readonly
|
|
214
|
+
*/
|
|
215
|
+
get needsGeometryUpdate(): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Whether the render object requires an update or not.
|
|
218
|
+
*
|
|
219
|
+
* Note: There are two distinct places where render objects are checked for an update.
|
|
220
|
+
*
|
|
221
|
+
* 1. In `RenderObjects.get()` which is executed when the render object is request. This
|
|
222
|
+
* method checks the `needsUpdate` flag and recreates the render object if necessary.
|
|
223
|
+
* 2. In `Renderer._renderObjectDirect()` right after getting the render object via
|
|
224
|
+
* `RenderObjects.get()`. The render object's NodeMaterialObserver is then used to detect
|
|
225
|
+
* a need for a refresh due to material, geometry or object related value changes.
|
|
226
|
+
*
|
|
227
|
+
* TODO: Investigate if it's possible to merge boths steps so there is only a single place
|
|
228
|
+
* that performs the 'needsUpdate' check.
|
|
229
|
+
*
|
|
230
|
+
* @type {Boolean}
|
|
231
|
+
* @readonly
|
|
232
|
+
*/
|
|
91
233
|
get needsUpdate(): boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Returns the dynamic cache key which represents a key that is computed per draw command.
|
|
236
|
+
*
|
|
237
|
+
* @return {String} The cache key.
|
|
238
|
+
*/
|
|
92
239
|
getDynamicCacheKey(): string;
|
|
240
|
+
/**
|
|
241
|
+
* Returns the render object's cache key.
|
|
242
|
+
*
|
|
243
|
+
* @return {String} The cache key.
|
|
244
|
+
*/
|
|
93
245
|
getCacheKey(): string;
|
|
246
|
+
/**
|
|
247
|
+
* Frees internal resources.
|
|
248
|
+
*/
|
|
94
249
|
dispose(): void;
|
|
95
250
|
}
|
|
@@ -5,6 +5,7 @@ import LightsNode from "../../nodes/lighting/LightsNode.js";
|
|
|
5
5
|
import { Scene } from "../../scenes/Scene.js";
|
|
6
6
|
import Bindings from "./Bindings.js";
|
|
7
7
|
import ChainMap from "./ChainMap.js";
|
|
8
|
+
import ClippingContext from "./ClippingContext.js";
|
|
8
9
|
import Geometries from "./Geometries.js";
|
|
9
10
|
import Info from "./Info.js";
|
|
10
11
|
import Nodes from "./nodes/Nodes.js";
|
|
@@ -12,6 +13,11 @@ import Pipelines from "./Pipelines.js";
|
|
|
12
13
|
import RenderContext from "./RenderContext.js";
|
|
13
14
|
import Renderer from "./Renderer.js";
|
|
14
15
|
import RenderObject from "./RenderObject.js";
|
|
16
|
+
/**
|
|
17
|
+
* This module manages the render objects of the renderer.
|
|
18
|
+
*
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
15
21
|
declare class RenderObjects {
|
|
16
22
|
renderer: Renderer;
|
|
17
23
|
nodes: Nodes;
|
|
@@ -22,6 +28,16 @@ declare class RenderObjects {
|
|
|
22
28
|
chainMaps: {
|
|
23
29
|
[passId: string]: ChainMap<readonly [Object3D, Material, RenderContext, LightsNode], RenderObject>;
|
|
24
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a new render object management component.
|
|
33
|
+
*
|
|
34
|
+
* @param {Renderer} renderer - The renderer.
|
|
35
|
+
* @param {Nodes} nodes - Renderer component for managing nodes related logic.
|
|
36
|
+
* @param {Geometries} geometries - Renderer component for managing geometries.
|
|
37
|
+
* @param {Pipelines} pipelines - Renderer component for managing pipelines.
|
|
38
|
+
* @param {Bindings} bindings - Renderer component for managing bindings.
|
|
39
|
+
* @param {Info} info - Renderer component for managing metrics and monitoring data.
|
|
40
|
+
*/
|
|
25
41
|
constructor(
|
|
26
42
|
renderer: Renderer,
|
|
27
43
|
nodes: Nodes,
|
|
@@ -30,6 +46,19 @@ declare class RenderObjects {
|
|
|
30
46
|
bindings: Bindings,
|
|
31
47
|
info: Info,
|
|
32
48
|
);
|
|
49
|
+
/**
|
|
50
|
+
* Returns a render object for the given object and state data.
|
|
51
|
+
*
|
|
52
|
+
* @param {Object3D} object - The 3D object.
|
|
53
|
+
* @param {Material} material - The 3D object's material.
|
|
54
|
+
* @param {Scene} scene - The scene the 3D object belongs to.
|
|
55
|
+
* @param {Camera} camera - The camera the 3D object should be rendered with.
|
|
56
|
+
* @param {LightsNode} lightsNode - The lights node.
|
|
57
|
+
* @param {RenderContext} renderContext - The render context.
|
|
58
|
+
* @param {ClippingContext} clippingContext - The clipping context.
|
|
59
|
+
* @param {String?} passId - An optional ID for identifying the pass.
|
|
60
|
+
* @return {RenderObject} The render object.
|
|
61
|
+
*/
|
|
33
62
|
get(
|
|
34
63
|
object: Object3D,
|
|
35
64
|
material: Material,
|
|
@@ -37,15 +66,41 @@ declare class RenderObjects {
|
|
|
37
66
|
camera: Camera,
|
|
38
67
|
lightsNode: LightsNode,
|
|
39
68
|
renderContext: RenderContext,
|
|
69
|
+
clippingContext: ClippingContext | null,
|
|
40
70
|
passId?: string | undefined,
|
|
41
71
|
): RenderObject;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a chain map for the given pass ID.
|
|
74
|
+
*
|
|
75
|
+
* @param {String} [passId='default'] - The pass ID.
|
|
76
|
+
* @return {ChainMap} The chain map.
|
|
77
|
+
*/
|
|
42
78
|
getChainMap(
|
|
43
79
|
passId?: string,
|
|
44
80
|
): ChainMap<
|
|
45
81
|
readonly [Object3D<import("../../core/Object3D.js").Object3DEventMap>, Material, RenderContext, LightsNode],
|
|
46
82
|
RenderObject
|
|
47
83
|
>;
|
|
84
|
+
/**
|
|
85
|
+
* Frees internal resources.
|
|
86
|
+
*/
|
|
48
87
|
dispose(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Factory method for creating render objects with the given list of parameters.
|
|
90
|
+
*
|
|
91
|
+
* @param {Nodes} nodes - Renderer component for managing nodes related logic.
|
|
92
|
+
* @param {Geometries} geometries - Renderer component for managing geometries.
|
|
93
|
+
* @param {Renderer} renderer - The renderer.
|
|
94
|
+
* @param {Object3D} object - The 3D object.
|
|
95
|
+
* @param {Material} material - The object's material.
|
|
96
|
+
* @param {Scene} scene - The scene the 3D object belongs to.
|
|
97
|
+
* @param {Camera} camera - The camera the object should be rendered with.
|
|
98
|
+
* @param {LightsNode} lightsNode - The lights node.
|
|
99
|
+
* @param {RenderContext} renderContext - The render context.
|
|
100
|
+
* @param {ClippingContext} clippingContext - The clipping context.
|
|
101
|
+
* @param {String?} passId - An optional ID for identifying the pass.
|
|
102
|
+
* @return {RenderObject} The render object.
|
|
103
|
+
*/
|
|
49
104
|
createRenderObject(
|
|
50
105
|
nodes: Nodes,
|
|
51
106
|
geometries: Geometries,
|
|
@@ -56,6 +111,7 @@ declare class RenderObjects {
|
|
|
56
111
|
camera: Camera,
|
|
57
112
|
lightsNode: LightsNode,
|
|
58
113
|
renderContext: RenderContext,
|
|
114
|
+
clippingContext: ClippingContext | null,
|
|
59
115
|
passId: string | undefined,
|
|
60
116
|
): RenderObject;
|
|
61
117
|
}
|