@types/three 0.184.0 → 0.185.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +1 -1
- three/examples/jsm/Addons.d.ts +2 -0
- three/examples/jsm/controls/FirstPersonControls.d.ts +9 -0
- three/examples/jsm/controls/OrbitControls.d.ts +2 -2
- three/examples/jsm/controls/TransformControls.d.ts +32 -1
- three/examples/jsm/csm/CSMFrustum.d.ts +73 -13
- three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +2 -2
- three/examples/jsm/exporters/PLYExporter.d.ts +5 -4
- three/examples/jsm/exporters/USDZExporter.d.ts +5 -1
- three/examples/jsm/generators/CityGenerator.d.ts +75 -0
- three/examples/jsm/generators/ForestGenerator.d.ts +79 -0
- three/examples/jsm/generators/TerrainGenerator.d.ts +67 -0
- three/examples/jsm/generators/TreeGenerator.d.ts +97 -0
- three/examples/jsm/generators/city/SidewalkGenerator.d.ts +40 -0
- three/examples/jsm/generators/city/SkyscraperGenerator.d.ts +83 -0
- three/examples/jsm/geometries/LoftGeometry.d.ts +83 -0
- three/examples/jsm/inspector/tabs/Parameters.d.ts +5 -2
- three/examples/jsm/lighting/ClusteredLighting.d.ts +45 -0
- three/examples/jsm/lighting/LightProbeGrid.d.ts +131 -13
- three/examples/jsm/loaders/DRACOLoader.d.ts +20 -6
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -12
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
- three/examples/jsm/loaders/HDRLoader.d.ts +2 -12
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -1
- three/examples/jsm/loaders/LWOLoader.d.ts +6 -0
- three/examples/jsm/loaders/RGBELoader.d.ts +1 -7
- three/examples/jsm/loaders/SVGLoader.d.ts +9 -6
- three/examples/jsm/loaders/TGALoader.d.ts +2 -2
- three/examples/jsm/loaders/TIFFLoader.d.ts +2 -11
- three/examples/jsm/loaders/USDLoader.d.ts +6 -1
- three/examples/jsm/misc/TileCreasedNormalsPlugin.d.ts +49 -0
- three/examples/jsm/objects/MarchingCubes.d.ts +2 -2
- three/examples/jsm/objects/Reflector.d.ts +38 -5
- three/examples/jsm/objects/SkyMesh.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/tsl/display/BloomNode.d.ts +23 -6
- three/examples/jsm/tsl/display/ImportanceSampledEnvironment.d.ts +84 -0
- three/examples/jsm/tsl/display/RecurrentDenoiseNode.d.ts +89 -0
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +0 -2
- three/examples/jsm/tsl/display/SSGINode.d.ts +4 -1
- three/examples/jsm/tsl/display/SSRNode.d.ts +303 -30
- three/examples/jsm/tsl/display/TRAANode.d.ts +1 -1
- three/examples/jsm/tsl/display/TemporalReprojectNode.d.ts +64 -0
- three/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +54 -0
- three/examples/jsm/tsl/math/curlNoise.d.ts +38 -0
- three/examples/jsm/tsl/utils/GroundedSkybox.d.ts +17 -0
- three/examples/jsm/tsl/utils/RNoise.d.ts +12 -0
- three/examples/jsm/tsl/utils/SpecularHelpers.d.ts +20 -0
- three/examples/jsm/webxr/WebGLXRFallback.d.ts +14 -0
- three/package.json +3 -3
- three/src/Three.TSL.d.ts +10 -3
- three/src/Three.WebGPU.Nodes.d.ts +2 -2
- three/src/Three.WebGPU.d.ts +5 -3
- three/src/animation/AnimationClip.d.ts +0 -10
- three/src/cameras/Camera.d.ts +1 -1
- three/src/core/InterleavedBuffer.d.ts +1 -1
- three/src/core/Object3D.d.ts +8 -4
- three/src/core/RenderTarget.d.ts +11 -0
- three/src/core/Timer.d.ts +1 -1
- three/src/core/UniformsGroup.d.ts +1 -1
- three/src/extras/Controls.d.ts +6 -5
- three/src/extras/core/ShapePath.d.ts +61 -65
- three/src/loaders/DataTextureLoader.d.ts +37 -3
- three/src/loaders/MaterialLoader.d.ts +8 -0
- three/src/materials/LineBasicMaterial.d.ts +5 -0
- three/src/materials/Material.d.ts +9 -1
- three/src/materials/MeshBasicMaterial.d.ts +30 -0
- three/src/materials/MeshDepthMaterial.d.ts +13 -0
- three/src/materials/MeshDistanceMaterial.d.ts +13 -0
- three/src/materials/MeshLambertMaterial.d.ts +50 -1
- three/src/materials/MeshMatcapMaterial.d.ts +31 -1
- three/src/materials/MeshNormalMaterial.d.ts +11 -1
- three/src/materials/MeshPhongMaterial.d.ts +50 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +50 -0
- three/src/materials/MeshStandardMaterial.d.ts +53 -1
- three/src/materials/MeshToonMaterial.d.ts +43 -1
- three/src/materials/PointsMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +2 -0
- three/src/materials/SpriteMaterial.d.ts +9 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +18 -13
- three/src/materials/nodes/NodeMaterial.d.ts +33 -13
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +0 -84
- three/src/math/Box2.d.ts +3 -3
- three/src/math/Box3.d.ts +255 -19
- three/src/math/Color.d.ts +10 -10
- three/src/math/FrustumArray.d.ts +75 -16
- three/src/math/Interpolant.d.ts +111 -8
- three/src/math/Matrix2.d.ts +1 -1
- three/src/math/Matrix3.d.ts +10 -1
- three/src/math/Matrix4.d.ts +329 -105
- three/src/math/Vector2.d.ts +1 -2
- three/src/math/Vector3.d.ts +3 -4
- three/src/math/Vector4.d.ts +1 -2
- three/src/math/interpolants/BezierInterpolant.d.ts +19 -3
- three/src/math/interpolants/CubicInterpolant.d.ts +18 -3
- three/src/math/interpolants/DiscreteInterpolant.d.ts +8 -3
- three/src/math/interpolants/LinearInterpolant.d.ts +7 -3
- three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +7 -3
- three/src/nodes/Nodes.d.ts +4 -13
- three/src/nodes/TSL.d.ts +7 -5
- three/src/nodes/accessors/Batch.d.ts +19 -0
- three/src/nodes/accessors/Instance.d.ts +34 -0
- three/src/nodes/accessors/MaterialNode.d.ts +86 -79
- three/src/nodes/accessors/Morph.d.ts +11 -0
- three/src/nodes/accessors/Skinning.d.ts +23 -0
- three/src/nodes/accessors/StorageBufferNode.d.ts +22 -23
- three/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
- three/src/nodes/accessors/StorageTextureNode.d.ts +6 -4
- three/src/nodes/accessors/TextureNode.d.ts +15 -10
- three/src/nodes/core/ArrayNode.d.ts +16 -8
- three/src/nodes/core/ContextNode.d.ts +5 -6
- three/src/nodes/core/LightingModel.d.ts +2 -0
- three/src/nodes/core/Node.d.ts +50 -51
- three/src/nodes/core/NodeBuilder.d.ts +1 -133
- three/src/nodes/core/OverrideContextNode.d.ts +92 -0
- three/src/nodes/core/PropertyNode.d.ts +13 -2
- three/src/nodes/core/StructNode.d.ts +0 -2
- three/src/nodes/core/StructTypeNode.d.ts +5 -4
- three/src/nodes/core/UniformNode.d.ts +48 -9
- three/src/nodes/display/BlendModes.d.ts +72 -11
- three/src/nodes/display/FrontFacingNode.d.ts +62 -3
- three/src/nodes/display/PassNode.d.ts +0 -2
- three/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +53 -45
- three/src/nodes/lighting/LightingContextNode.d.ts +9 -2
- three/src/nodes/lighting/LightsNode.d.ts +4 -4
- three/src/nodes/math/MathNode.d.ts +358 -304
- three/src/nodes/math/OperatorNode.d.ts +253 -82
- three/src/nodes/tsl/TSLCore.d.ts +16 -9
- three/src/nodes/utils/ArrayElementNode.d.ts +5 -4
- three/src/nodes/utils/EquirectUV.d.ts +31 -1
- three/src/nodes/utils/Packing.d.ts +50 -3
- three/src/nodes/utils/RTTNode.d.ts +7 -12
- three/src/nodes/utils/Remap.d.ts +216 -29
- three/src/nodes/utils/SampleNode.d.ts +18 -8
- three/src/objects/BatchedMesh.d.ts +1 -1
- three/src/objects/InstancedMesh.d.ts +0 -8
- three/src/objects/Skeleton.d.ts +0 -2
- three/src/renderers/common/Backend.d.ts +0 -3
- three/src/renderers/common/CanvasTarget.d.ts +0 -49
- three/src/renderers/common/ClippingContext.d.ts +6 -1
- three/src/renderers/common/CubeRenderTarget.d.ts +2 -1
- three/src/renderers/common/Info.d.ts +26 -66
- three/src/renderers/common/InspectorBase.d.ts +0 -7
- three/src/renderers/common/Lighting.d.ts +49 -5
- three/src/renderers/common/Renderer.d.ts +34 -458
- three/src/renderers/common/RendererUtils.d.ts +1 -2
- three/src/renderers/common/TimestampQueryPool.d.ts +1 -1
- three/src/renderers/common/XRManager.d.ts +32 -299
- three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -117
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
- three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -1
- three/src/renderers/webgl/WebGLState.d.ts +2 -0
- three/src/renderers/webgl-fallback/WebGLBackend.d.ts +1 -1
- three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +0 -10
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +0 -1
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +5 -121
- three/src/textures/CubeDepthTexture.d.ts +2 -3
- three/src/textures/DataTexture.d.ts +2 -1
- three/src/textures/DepthTexture.d.ts +5 -5
- three/examples/jsm/lighting/TiledLighting.d.ts +0 -9
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +0 -31
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +0 -22
- three/src/nodes/accessors/BatchNode.d.ts +0 -12
- three/src/nodes/accessors/InstanceNode.d.ts +0 -30
- three/src/nodes/accessors/InstancedMeshNode.d.ts +0 -10
- three/src/nodes/accessors/MorphNode.d.ts +0 -14
- three/src/nodes/accessors/SkinningNode.d.ts +0 -32
- three/src/renderers/common/Animation.d.ts +0 -102
- three/src/renderers/common/Attributes.d.ts +0 -59
- three/src/renderers/common/Background.d.ts +0 -47
- three/src/renderers/common/BindGroup.d.ts +0 -39
- three/src/renderers/common/Binding.d.ts +0 -50
- three/src/renderers/common/Bindings.d.ts +0 -132
- three/src/renderers/common/Buffer.d.ts +0 -90
- three/src/renderers/common/ChainMap.d.ts +0 -49
- three/src/renderers/common/Color4.d.ts +0 -55
- three/src/renderers/common/ComputePipeline.d.ts +0 -34
- three/src/renderers/common/DataMap.d.ts +0 -42
- three/src/renderers/common/Geometries.d.ts +0 -111
- three/src/renderers/common/Pipeline.d.ts +0 -29
- three/src/renderers/common/Pipelines.d.ts +0 -186
- three/src/renderers/common/ProgrammableStage.d.ts +0 -73
- three/src/renderers/common/RenderBundle.d.ts +0 -25
- three/src/renderers/common/RenderBundles.d.ts +0 -34
- three/src/renderers/common/RenderContext.d.ts +0 -235
- three/src/renderers/common/RenderContexts.d.ts +0 -47
- three/src/renderers/common/RenderList.d.ts +0 -226
- three/src/renderers/common/RenderLists.d.ts +0 -46
- three/src/renderers/common/RenderObject.d.ts +0 -448
- three/src/renderers/common/RenderObjectPipeline.d.ts +0 -33
- three/src/renderers/common/RenderObjects.d.ts +0 -151
- three/src/renderers/common/SampledTexture.d.ts +0 -28
- three/src/renderers/common/Sampler.d.ts +0 -19
- three/src/renderers/common/Textures.d.ts +0 -125
- three/src/renderers/common/Uniform.d.ts +0 -262
- three/src/renderers/common/UniformBuffer.d.ts +0 -20
- three/src/renderers/common/UniformsGroup.d.ts +0 -152
- three/src/renderers/common/XRRenderTarget.d.ts +0 -67
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +0 -121
- three/src/renderers/common/nodes/NodeManager.d.ts +0 -309
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +0 -29
- three/src/renderers/common/nodes/NodeSampler.d.ts +0 -12
- three/src/renderers/common/nodes/NodeUniform.d.ts +0 -250
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -41
- three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -6
- three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -6
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
-
import { BufferAttribute } from "../../core/BufferAttribute.js";
|
|
3
|
-
import { BufferGeometry } from "../../core/BufferGeometry.js";
|
|
4
|
-
import { InterleavedBuffer } from "../../core/InterleavedBuffer.js";
|
|
5
|
-
import { Object3D } from "../../core/Object3D.js";
|
|
6
|
-
import { Material } from "../../materials/Material.js";
|
|
7
|
-
import NodeMaterialObserver from "../../materials/nodes/manager/NodeMaterialObserver.js";
|
|
8
|
-
import LightsNode from "../../nodes/lighting/LightsNode.js";
|
|
9
|
-
import { Scene } from "../../scenes/Scene.js";
|
|
10
|
-
import BindGroup from "./BindGroup.js";
|
|
11
|
-
import BundleGroup from "./BundleGroup.js";
|
|
12
|
-
import ClippingContext from "./ClippingContext.js";
|
|
13
|
-
import Geometries from "./Geometries.js";
|
|
14
|
-
import NodeBuilderState from "./nodes/NodeBuilderState.js";
|
|
15
|
-
import NodeManager from "./nodes/NodeManager.js";
|
|
16
|
-
import RenderContext from "./RenderContext.js";
|
|
17
|
-
import Renderer from "./Renderer.js";
|
|
18
|
-
import RenderPipeline from "./RenderPipeline.js";
|
|
19
|
-
|
|
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
|
-
*/
|
|
38
|
-
declare class RenderObject {
|
|
39
|
-
/**
|
|
40
|
-
* Constructs a new render object.
|
|
41
|
-
*
|
|
42
|
-
* @param {NodeManager} nodes - Renderer component for managing nodes related logic.
|
|
43
|
-
* @param {Geometries} geometries - Renderer component for managing geometries.
|
|
44
|
-
* @param {Renderer} renderer - The renderer.
|
|
45
|
-
* @param {Object3D} object - The 3D object.
|
|
46
|
-
* @param {Material} material - The 3D object's material.
|
|
47
|
-
* @param {Scene} scene - The scene the 3D object belongs to.
|
|
48
|
-
* @param {Camera} camera - The camera the object should be rendered with.
|
|
49
|
-
* @param {LightsNode} lightsNode - The lights node.
|
|
50
|
-
* @param {RenderContext} renderContext - The render context.
|
|
51
|
-
* @param {ClippingContext} clippingContext - The clipping context.
|
|
52
|
-
*/
|
|
53
|
-
constructor(
|
|
54
|
-
nodes: NodeManager,
|
|
55
|
-
geometries: Geometries,
|
|
56
|
-
renderer: Renderer,
|
|
57
|
-
object: Object3D,
|
|
58
|
-
material: Material,
|
|
59
|
-
scene: Scene,
|
|
60
|
-
camera: Camera,
|
|
61
|
-
lightsNode: LightsNode,
|
|
62
|
-
renderContext: RenderContext,
|
|
63
|
-
clippingContext: ClippingContext,
|
|
64
|
-
);
|
|
65
|
-
id: number;
|
|
66
|
-
/**
|
|
67
|
-
* Renderer component for managing nodes related logic.
|
|
68
|
-
*
|
|
69
|
-
* @type {NodeManager}
|
|
70
|
-
* @private
|
|
71
|
-
*/
|
|
72
|
-
private _nodes;
|
|
73
|
-
/**
|
|
74
|
-
* Renderer component for managing geometries.
|
|
75
|
-
*
|
|
76
|
-
* @type {Geometries}
|
|
77
|
-
* @private
|
|
78
|
-
*/
|
|
79
|
-
private _geometries;
|
|
80
|
-
/**
|
|
81
|
-
* The renderer.
|
|
82
|
-
*
|
|
83
|
-
* @type {Renderer}
|
|
84
|
-
*/
|
|
85
|
-
renderer: Renderer;
|
|
86
|
-
/**
|
|
87
|
-
* The 3D object.
|
|
88
|
-
*
|
|
89
|
-
* @type {Object3D}
|
|
90
|
-
*/
|
|
91
|
-
object: Object3D;
|
|
92
|
-
/**
|
|
93
|
-
* The 3D object's material.
|
|
94
|
-
*
|
|
95
|
-
* @type {Material}
|
|
96
|
-
*/
|
|
97
|
-
material: Material;
|
|
98
|
-
/**
|
|
99
|
-
* The scene the 3D object belongs to.
|
|
100
|
-
*
|
|
101
|
-
* @type {Scene}
|
|
102
|
-
*/
|
|
103
|
-
scene: Scene;
|
|
104
|
-
/**
|
|
105
|
-
* The camera the 3D object should be rendered with.
|
|
106
|
-
*
|
|
107
|
-
* @type {Camera}
|
|
108
|
-
*/
|
|
109
|
-
camera: Camera;
|
|
110
|
-
/**
|
|
111
|
-
* The lights node.
|
|
112
|
-
*
|
|
113
|
-
* @type {LightsNode}
|
|
114
|
-
*/
|
|
115
|
-
lightsNode: LightsNode;
|
|
116
|
-
/**
|
|
117
|
-
* The render context.
|
|
118
|
-
*
|
|
119
|
-
* @type {RenderContext}
|
|
120
|
-
*/
|
|
121
|
-
context: RenderContext;
|
|
122
|
-
/**
|
|
123
|
-
* The 3D object's geometry.
|
|
124
|
-
*
|
|
125
|
-
* @type {BufferGeometry}
|
|
126
|
-
*/
|
|
127
|
-
geometry: BufferGeometry;
|
|
128
|
-
/**
|
|
129
|
-
* The render object's version.
|
|
130
|
-
*
|
|
131
|
-
* @type {number}
|
|
132
|
-
*/
|
|
133
|
-
version: number;
|
|
134
|
-
/**
|
|
135
|
-
* The draw range of the geometry.
|
|
136
|
-
*
|
|
137
|
-
* @type {?Object}
|
|
138
|
-
* @default null
|
|
139
|
-
*/
|
|
140
|
-
drawRange: {
|
|
141
|
-
start: number;
|
|
142
|
-
count: number;
|
|
143
|
-
} | null;
|
|
144
|
-
/**
|
|
145
|
-
* An array holding the buffer attributes
|
|
146
|
-
* of the render object. This entails attribute
|
|
147
|
-
* definitions on geometry and node level.
|
|
148
|
-
*
|
|
149
|
-
* @type {?Array<BufferAttribute>}
|
|
150
|
-
* @default null
|
|
151
|
-
*/
|
|
152
|
-
attributes: BufferAttribute[] | null;
|
|
153
|
-
/**
|
|
154
|
-
* An object holding the version of the
|
|
155
|
-
* attributes. The keys are the attribute names
|
|
156
|
-
* and the values are the attribute versions.
|
|
157
|
-
*
|
|
158
|
-
* @type {?Object<string, number>}
|
|
159
|
-
* @default null
|
|
160
|
-
*/
|
|
161
|
-
attributesId: {
|
|
162
|
-
[x: string]: number;
|
|
163
|
-
} | null;
|
|
164
|
-
/**
|
|
165
|
-
* A reference to a render pipeline the render
|
|
166
|
-
* object is processed with.
|
|
167
|
-
*
|
|
168
|
-
* @type {RenderPipeline}
|
|
169
|
-
* @default null
|
|
170
|
-
*/
|
|
171
|
-
pipeline: RenderPipeline;
|
|
172
|
-
/**
|
|
173
|
-
* Only relevant for objects using
|
|
174
|
-
* multiple materials. This represents a group entry
|
|
175
|
-
* from the respective `BufferGeometry`.
|
|
176
|
-
*
|
|
177
|
-
* @type {?{start: number, count: number}}
|
|
178
|
-
* @default null
|
|
179
|
-
*/
|
|
180
|
-
group: {
|
|
181
|
-
start: number;
|
|
182
|
-
count: number;
|
|
183
|
-
} | null;
|
|
184
|
-
/**
|
|
185
|
-
* An array holding the vertex buffers which can
|
|
186
|
-
* be buffer attributes but also interleaved buffers.
|
|
187
|
-
*
|
|
188
|
-
* @type {?Array<BufferAttribute|InterleavedBuffer>}
|
|
189
|
-
* @default null
|
|
190
|
-
*/
|
|
191
|
-
vertexBuffers: Array<BufferAttribute | InterleavedBuffer> | null;
|
|
192
|
-
/**
|
|
193
|
-
* The parameters for the draw command.
|
|
194
|
-
*
|
|
195
|
-
* @type {?Object}
|
|
196
|
-
* @default null
|
|
197
|
-
*/
|
|
198
|
-
drawParams: {
|
|
199
|
-
vertexCount: number;
|
|
200
|
-
firstVertex: number;
|
|
201
|
-
instanceCount: number;
|
|
202
|
-
firstInstance: number;
|
|
203
|
-
} | null;
|
|
204
|
-
/**
|
|
205
|
-
* If this render object is used inside a render bundle,
|
|
206
|
-
* this property points to the respective bundle group.
|
|
207
|
-
*
|
|
208
|
-
* @type {?BundleGroup}
|
|
209
|
-
* @default null
|
|
210
|
-
*/
|
|
211
|
-
bundle: BundleGroup | null;
|
|
212
|
-
/**
|
|
213
|
-
* The clipping context.
|
|
214
|
-
*
|
|
215
|
-
* @type {ClippingContext}
|
|
216
|
-
*/
|
|
217
|
-
clippingContext: ClippingContext;
|
|
218
|
-
/**
|
|
219
|
-
* The clipping context's cache key.
|
|
220
|
-
*
|
|
221
|
-
* @type {string}
|
|
222
|
-
*/
|
|
223
|
-
clippingContextCacheKey: string;
|
|
224
|
-
/**
|
|
225
|
-
* The initial node cache key.
|
|
226
|
-
*
|
|
227
|
-
* @type {number}
|
|
228
|
-
*/
|
|
229
|
-
initialNodesCacheKey: number;
|
|
230
|
-
/**
|
|
231
|
-
* The initial cache key.
|
|
232
|
-
*
|
|
233
|
-
* @type {number}
|
|
234
|
-
*/
|
|
235
|
-
initialCacheKey: number;
|
|
236
|
-
/**
|
|
237
|
-
* The node builder state.
|
|
238
|
-
*
|
|
239
|
-
* @type {?NodeBuilderState}
|
|
240
|
-
* @private
|
|
241
|
-
* @default null
|
|
242
|
-
*/
|
|
243
|
-
private _nodeBuilderState;
|
|
244
|
-
/**
|
|
245
|
-
* An array of bindings.
|
|
246
|
-
*
|
|
247
|
-
* @type {?Array<BindGroup>}
|
|
248
|
-
* @private
|
|
249
|
-
* @default null
|
|
250
|
-
*/
|
|
251
|
-
private _bindings;
|
|
252
|
-
/**
|
|
253
|
-
* Reference to the node material observer.
|
|
254
|
-
*
|
|
255
|
-
* @type {?NodeMaterialObserver}
|
|
256
|
-
* @private
|
|
257
|
-
* @default null
|
|
258
|
-
*/
|
|
259
|
-
private _monitor;
|
|
260
|
-
/**
|
|
261
|
-
* An event listener which is defined by `RenderObjects`. It performs
|
|
262
|
-
* clean up tasks when `dispose()` on this render object.
|
|
263
|
-
*
|
|
264
|
-
* @method
|
|
265
|
-
*/
|
|
266
|
-
onDispose: (() => void) | null;
|
|
267
|
-
/**
|
|
268
|
-
* This flag can be used for type testing.
|
|
269
|
-
*
|
|
270
|
-
* @type {boolean}
|
|
271
|
-
* @readonly
|
|
272
|
-
* @default true
|
|
273
|
-
*/
|
|
274
|
-
readonly isRenderObject: boolean;
|
|
275
|
-
/**
|
|
276
|
-
* An event listener which is executed when `dispose()` is called on
|
|
277
|
-
* the material of this render object.
|
|
278
|
-
*
|
|
279
|
-
* @method
|
|
280
|
-
*/
|
|
281
|
-
onMaterialDispose: () => void;
|
|
282
|
-
/**
|
|
283
|
-
* An event listener which is executed when `dispose()` is called on
|
|
284
|
-
* the geometry of this render object.
|
|
285
|
-
*
|
|
286
|
-
* @method
|
|
287
|
-
*/
|
|
288
|
-
onGeometryDispose: () => void;
|
|
289
|
-
/**
|
|
290
|
-
* Updates the clipping context.
|
|
291
|
-
*
|
|
292
|
-
* @param {ClippingContext} context - The clipping context to set.
|
|
293
|
-
*/
|
|
294
|
-
updateClipping(context: ClippingContext): void;
|
|
295
|
-
/**
|
|
296
|
-
* Whether the clipping requires an update or not.
|
|
297
|
-
*
|
|
298
|
-
* @type {boolean}
|
|
299
|
-
* @readonly
|
|
300
|
-
*/
|
|
301
|
-
get clippingNeedsUpdate(): boolean;
|
|
302
|
-
/**
|
|
303
|
-
* The number of clipping planes defined in context of hardware clipping.
|
|
304
|
-
*
|
|
305
|
-
* @type {number}
|
|
306
|
-
* @readonly
|
|
307
|
-
*/
|
|
308
|
-
get hardwareClippingPlanes(): number;
|
|
309
|
-
/**
|
|
310
|
-
* Returns the node builder state of this render object.
|
|
311
|
-
*
|
|
312
|
-
* @return {NodeBuilderState} The node builder state.
|
|
313
|
-
*/
|
|
314
|
-
getNodeBuilderState(): NodeBuilderState;
|
|
315
|
-
/**
|
|
316
|
-
* Returns the node material observer of this render object.
|
|
317
|
-
*
|
|
318
|
-
* @return {NodeMaterialObserver} The node material observer.
|
|
319
|
-
*/
|
|
320
|
-
getMonitor(): NodeMaterialObserver;
|
|
321
|
-
/**
|
|
322
|
-
* Returns an array of bind groups of this render object.
|
|
323
|
-
*
|
|
324
|
-
* @return {Array<BindGroup>} The bindings.
|
|
325
|
-
*/
|
|
326
|
-
getBindings(): BindGroup[];
|
|
327
|
-
/**
|
|
328
|
-
* Returns a binding group by group name of this render object.
|
|
329
|
-
*
|
|
330
|
-
* @param {string} name - The name of the binding group.
|
|
331
|
-
* @return {?BindGroup} The bindings.
|
|
332
|
-
*/
|
|
333
|
-
getBindingGroup(name: string): BindGroup | null;
|
|
334
|
-
/**
|
|
335
|
-
* Returns the index of the render object's geometry.
|
|
336
|
-
*
|
|
337
|
-
* @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries.
|
|
338
|
-
*/
|
|
339
|
-
getIndex(): BufferAttribute | null;
|
|
340
|
-
/**
|
|
341
|
-
* Returns the indirect buffer attribute.
|
|
342
|
-
*
|
|
343
|
-
* @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used.
|
|
344
|
-
*/
|
|
345
|
-
getIndirect(): BufferAttribute | null;
|
|
346
|
-
/**
|
|
347
|
-
* Returns the byte offset into the indirect attribute buffer.
|
|
348
|
-
*
|
|
349
|
-
* @return {number|Array<number>} The byte offset into the indirect attribute buffer.
|
|
350
|
-
*/
|
|
351
|
-
getIndirectOffset(): number | number[];
|
|
352
|
-
/**
|
|
353
|
-
* Returns an array that acts as a key for identifying the render object in a chain map.
|
|
354
|
-
*
|
|
355
|
-
* @return {Array<Object>} An array with object references.
|
|
356
|
-
*/
|
|
357
|
-
getChainArray(): unknown[];
|
|
358
|
-
/**
|
|
359
|
-
* This method is used when the geometry of a 3D object has been exchanged and the
|
|
360
|
-
* respective render object now requires an update.
|
|
361
|
-
*
|
|
362
|
-
* @param {BufferGeometry} geometry - The geometry to set.
|
|
363
|
-
*/
|
|
364
|
-
setGeometry(geometry: BufferGeometry): void;
|
|
365
|
-
/**
|
|
366
|
-
* Returns the buffer attributes of the render object. The returned array holds
|
|
367
|
-
* attribute definitions on geometry and node level.
|
|
368
|
-
*
|
|
369
|
-
* @return {Array<BufferAttribute>} An array with buffer attributes.
|
|
370
|
-
*/
|
|
371
|
-
getAttributes(): BufferAttribute[];
|
|
372
|
-
/**
|
|
373
|
-
* Returns the vertex buffers of the render object.
|
|
374
|
-
*
|
|
375
|
-
* @return {Array<BufferAttribute|InterleavedBuffer>} An array with buffer attribute or interleaved buffers.
|
|
376
|
-
*/
|
|
377
|
-
getVertexBuffers(): Array<BufferAttribute | InterleavedBuffer>;
|
|
378
|
-
/**
|
|
379
|
-
* Returns the draw parameters for the render object.
|
|
380
|
-
*
|
|
381
|
-
* @return {?{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} The draw parameters.
|
|
382
|
-
*/
|
|
383
|
-
getDrawParameters(): {
|
|
384
|
-
vertexCount: number;
|
|
385
|
-
firstVertex: number;
|
|
386
|
-
instanceCount: number;
|
|
387
|
-
firstInstance: number;
|
|
388
|
-
} | null;
|
|
389
|
-
/**
|
|
390
|
-
* Returns the render object's geometry cache key.
|
|
391
|
-
*
|
|
392
|
-
* The geometry cache key is part of the material cache key.
|
|
393
|
-
*
|
|
394
|
-
* @return {string} The geometry cache key.
|
|
395
|
-
*/
|
|
396
|
-
getGeometryCacheKey(): string;
|
|
397
|
-
/**
|
|
398
|
-
* Returns the render object's material cache key.
|
|
399
|
-
*
|
|
400
|
-
* The material cache key is part of the render object cache key.
|
|
401
|
-
*
|
|
402
|
-
* @return {number} The material cache key.
|
|
403
|
-
*/
|
|
404
|
-
getMaterialCacheKey(): number;
|
|
405
|
-
/**
|
|
406
|
-
* Whether the geometry requires an update or not.
|
|
407
|
-
*
|
|
408
|
-
* @type {boolean}
|
|
409
|
-
* @readonly
|
|
410
|
-
*/
|
|
411
|
-
get needsGeometryUpdate(): boolean;
|
|
412
|
-
/**
|
|
413
|
-
* Whether the render object requires an update or not.
|
|
414
|
-
*
|
|
415
|
-
* Note: There are two distinct places where render objects are checked for an update.
|
|
416
|
-
*
|
|
417
|
-
* 1. In `RenderObjects.get()` which is executed when the render object is request. This
|
|
418
|
-
* method checks the `needsUpdate` flag and recreates the render object if necessary.
|
|
419
|
-
* 2. In `Renderer._renderObjectDirect()` right after getting the render object via
|
|
420
|
-
* `RenderObjects.get()`. The render object's NodeMaterialObserver is then used to detect
|
|
421
|
-
* a need for a refresh due to material, geometry or object related value changes.
|
|
422
|
-
*
|
|
423
|
-
* TODO: Investigate if it's possible to merge both steps so there is only a single place
|
|
424
|
-
* that performs the 'needsUpdate' check.
|
|
425
|
-
*
|
|
426
|
-
* @type {boolean}
|
|
427
|
-
* @readonly
|
|
428
|
-
*/
|
|
429
|
-
get needsUpdate(): boolean;
|
|
430
|
-
/**
|
|
431
|
-
* Returns the dynamic cache key which represents a key that is computed per draw command.
|
|
432
|
-
*
|
|
433
|
-
* @return {number} The cache key.
|
|
434
|
-
*/
|
|
435
|
-
getDynamicCacheKey(): number;
|
|
436
|
-
/**
|
|
437
|
-
* Returns the render object's cache key.
|
|
438
|
-
*
|
|
439
|
-
* @return {number} The cache key.
|
|
440
|
-
*/
|
|
441
|
-
getCacheKey(): number;
|
|
442
|
-
/**
|
|
443
|
-
* Frees internal resources.
|
|
444
|
-
*/
|
|
445
|
-
dispose(): void;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
export default RenderObject;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import Pipeline from "./Pipeline.js";
|
|
2
|
-
import ProgrammableStage from "./ProgrammableStage.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Class for representing render pipelines.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
* @augments Pipeline
|
|
9
|
-
*/
|
|
10
|
-
declare class RenderObjectPipeline extends Pipeline {
|
|
11
|
-
/**
|
|
12
|
-
* Constructs a new render object pipeline.
|
|
13
|
-
*
|
|
14
|
-
* @param {string} cacheKey - The pipeline's cache key.
|
|
15
|
-
* @param {ProgrammableStage} vertexProgram - The pipeline's vertex shader.
|
|
16
|
-
* @param {ProgrammableStage} fragmentProgram - The pipeline's fragment shader.
|
|
17
|
-
*/
|
|
18
|
-
constructor(cacheKey: string, vertexProgram: ProgrammableStage, fragmentProgram: ProgrammableStage);
|
|
19
|
-
/**
|
|
20
|
-
* The pipeline's vertex shader.
|
|
21
|
-
*
|
|
22
|
-
* @type {ProgrammableStage}
|
|
23
|
-
*/
|
|
24
|
-
vertexProgram: ProgrammableStage;
|
|
25
|
-
/**
|
|
26
|
-
* The pipeline's fragment shader.
|
|
27
|
-
*
|
|
28
|
-
* @type {ProgrammableStage}
|
|
29
|
-
*/
|
|
30
|
-
fragmentProgram: ProgrammableStage;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default RenderObjectPipeline;
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
-
import { Object3D } from "../../core/Object3D.js";
|
|
3
|
-
import { Material } from "../../materials/Material.js";
|
|
4
|
-
import LightsNode from "../../nodes/lighting/LightsNode.js";
|
|
5
|
-
import { Scene } from "../../scenes/Scene.js";
|
|
6
|
-
import Bindings from "./Bindings.js";
|
|
7
|
-
import ChainMap from "./ChainMap.js";
|
|
8
|
-
import ClippingContext from "./ClippingContext.js";
|
|
9
|
-
import Geometries from "./Geometries.js";
|
|
10
|
-
import Info from "./Info.js";
|
|
11
|
-
import NodeManager from "./nodes/NodeManager.js";
|
|
12
|
-
import Pipelines from "./Pipelines.js";
|
|
13
|
-
import RenderContext from "./RenderContext.js";
|
|
14
|
-
import Renderer from "./Renderer.js";
|
|
15
|
-
import RenderObject from "./RenderObject.js";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* This module manages the render objects of the renderer.
|
|
19
|
-
*
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
declare class RenderObjects {
|
|
23
|
-
/**
|
|
24
|
-
* Constructs a new render object management component.
|
|
25
|
-
*
|
|
26
|
-
* @param {Renderer} renderer - The renderer.
|
|
27
|
-
* @param {NodeManager} nodes - Renderer component for managing nodes related logic.
|
|
28
|
-
* @param {Geometries} geometries - Renderer component for managing geometries.
|
|
29
|
-
* @param {Pipelines} pipelines - Renderer component for managing pipelines.
|
|
30
|
-
* @param {Bindings} bindings - Renderer component for managing bindings.
|
|
31
|
-
* @param {Info} info - Renderer component for managing metrics and monitoring data.
|
|
32
|
-
*/
|
|
33
|
-
constructor(
|
|
34
|
-
renderer: Renderer,
|
|
35
|
-
nodes: NodeManager,
|
|
36
|
-
geometries: Geometries,
|
|
37
|
-
pipelines: Pipelines,
|
|
38
|
-
bindings: Bindings,
|
|
39
|
-
info: Info,
|
|
40
|
-
);
|
|
41
|
-
/**
|
|
42
|
-
* The renderer.
|
|
43
|
-
*
|
|
44
|
-
* @type {Renderer}
|
|
45
|
-
*/
|
|
46
|
-
renderer: Renderer;
|
|
47
|
-
/**
|
|
48
|
-
* Renderer component for managing nodes related logic.
|
|
49
|
-
*
|
|
50
|
-
* @type {NodeManager}
|
|
51
|
-
*/
|
|
52
|
-
nodes: NodeManager;
|
|
53
|
-
/**
|
|
54
|
-
* Renderer component for managing geometries.
|
|
55
|
-
*
|
|
56
|
-
* @type {Geometries}
|
|
57
|
-
*/
|
|
58
|
-
geometries: Geometries;
|
|
59
|
-
/**
|
|
60
|
-
* Renderer component for managing pipelines.
|
|
61
|
-
*
|
|
62
|
-
* @type {Pipelines}
|
|
63
|
-
*/
|
|
64
|
-
pipelines: Pipelines;
|
|
65
|
-
/**
|
|
66
|
-
* Renderer component for managing bindings.
|
|
67
|
-
*
|
|
68
|
-
* @type {Bindings}
|
|
69
|
-
*/
|
|
70
|
-
bindings: Bindings;
|
|
71
|
-
/**
|
|
72
|
-
* Renderer component for managing metrics and monitoring data.
|
|
73
|
-
*
|
|
74
|
-
* @type {Info}
|
|
75
|
-
*/
|
|
76
|
-
info: Info;
|
|
77
|
-
/**
|
|
78
|
-
* A dictionary that manages render contexts in chain maps
|
|
79
|
-
* for each pass ID.
|
|
80
|
-
*
|
|
81
|
-
* @type {Object<string,ChainMap>}
|
|
82
|
-
*/
|
|
83
|
-
chainMaps: {
|
|
84
|
-
[x: string]: ChainMap;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Returns a render object for the given object and state data.
|
|
88
|
-
*
|
|
89
|
-
* @param {Object3D} object - The 3D object.
|
|
90
|
-
* @param {Material} material - The 3D object's material.
|
|
91
|
-
* @param {Scene} scene - The scene the 3D object belongs to.
|
|
92
|
-
* @param {Camera} camera - The camera the 3D object should be rendered with.
|
|
93
|
-
* @param {LightsNode} lightsNode - The lights node.
|
|
94
|
-
* @param {RenderContext} renderContext - The render context.
|
|
95
|
-
* @param {ClippingContext} clippingContext - The clipping context.
|
|
96
|
-
* @param {string} [passId] - An optional ID for identifying the pass.
|
|
97
|
-
* @return {RenderObject} The render object.
|
|
98
|
-
*/
|
|
99
|
-
get(
|
|
100
|
-
object: Object3D,
|
|
101
|
-
material: Material,
|
|
102
|
-
scene: Scene,
|
|
103
|
-
camera: Camera,
|
|
104
|
-
lightsNode: LightsNode,
|
|
105
|
-
renderContext: RenderContext,
|
|
106
|
-
clippingContext: ClippingContext,
|
|
107
|
-
passId?: string,
|
|
108
|
-
): RenderObject;
|
|
109
|
-
/**
|
|
110
|
-
* Returns a chain map for the given pass ID.
|
|
111
|
-
*
|
|
112
|
-
* @param {string} [passId='default'] - The pass ID.
|
|
113
|
-
* @return {ChainMap} The chain map.
|
|
114
|
-
*/
|
|
115
|
-
getChainMap(passId?: string): ChainMap;
|
|
116
|
-
/**
|
|
117
|
-
* Frees internal resources.
|
|
118
|
-
*/
|
|
119
|
-
dispose(): void;
|
|
120
|
-
/**
|
|
121
|
-
* Factory method for creating render objects with the given list of parameters.
|
|
122
|
-
*
|
|
123
|
-
* @param {NodeManager} nodes - Renderer component for managing nodes related logic.
|
|
124
|
-
* @param {Geometries} geometries - Renderer component for managing geometries.
|
|
125
|
-
* @param {Renderer} renderer - The renderer.
|
|
126
|
-
* @param {Object3D} object - The 3D object.
|
|
127
|
-
* @param {Material} material - The object's material.
|
|
128
|
-
* @param {Scene} scene - The scene the 3D object belongs to.
|
|
129
|
-
* @param {Camera} camera - The camera the object should be rendered with.
|
|
130
|
-
* @param {LightsNode} lightsNode - The lights node.
|
|
131
|
-
* @param {RenderContext} renderContext - The render context.
|
|
132
|
-
* @param {ClippingContext} clippingContext - The clipping context.
|
|
133
|
-
* @param {string} [passId] - An optional ID for identifying the pass.
|
|
134
|
-
* @return {RenderObject} The render object.
|
|
135
|
-
*/
|
|
136
|
-
createRenderObject(
|
|
137
|
-
nodes: NodeManager,
|
|
138
|
-
geometries: Geometries,
|
|
139
|
-
renderer: Renderer,
|
|
140
|
-
object: Object3D,
|
|
141
|
-
material: Material,
|
|
142
|
-
scene: Scene,
|
|
143
|
-
camera: Camera,
|
|
144
|
-
lightsNode: LightsNode,
|
|
145
|
-
renderContext: RenderContext,
|
|
146
|
-
clippingContext: ClippingContext,
|
|
147
|
-
passId?: string,
|
|
148
|
-
): RenderObject;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export default RenderObjects;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Texture } from "../../textures/Texture.js";
|
|
2
|
-
import Sampler from "./Sampler.js";
|
|
3
|
-
|
|
4
|
-
declare class SampledTexture extends Sampler {
|
|
5
|
-
id: number;
|
|
6
|
-
|
|
7
|
-
store: boolean;
|
|
8
|
-
|
|
9
|
-
mipLevel: number;
|
|
10
|
-
|
|
11
|
-
readonly isSampledTexture: true;
|
|
12
|
-
|
|
13
|
-
constructor(name: string, texture: Texture | null);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare class SampledArrayTexture extends SampledTexture {
|
|
17
|
-
readonly isSampledArrayTexture: true;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare class Sampled3DTexture extends SampledTexture {
|
|
21
|
-
readonly isSampled3DTexture: true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare class SampledCubeTexture extends SampledTexture {
|
|
25
|
-
readonly isSampledCubeTexture: true;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { Sampled3DTexture, SampledArrayTexture, SampledCubeTexture, SampledTexture };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Texture } from "../../textures/Texture.js";
|
|
2
|
-
import Binding from "./Binding.js";
|
|
3
|
-
|
|
4
|
-
declare class Sampler extends Binding {
|
|
5
|
-
version: number;
|
|
6
|
-
|
|
7
|
-
generation: number | null;
|
|
8
|
-
|
|
9
|
-
samplerKey: string;
|
|
10
|
-
|
|
11
|
-
readonly isSampler: true;
|
|
12
|
-
|
|
13
|
-
constructor(name: string, texture: Texture | null);
|
|
14
|
-
|
|
15
|
-
set texture(value: Texture | null);
|
|
16
|
-
get texture(): Texture | null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default Sampler;
|