@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,186 +0,0 @@
|
|
|
1
|
-
import ComputeNode from "../../nodes/gpgpu/ComputeNode.js";
|
|
2
|
-
import Backend from "./Backend.js";
|
|
3
|
-
import BindGroup from "./BindGroup.js";
|
|
4
|
-
import Bindings from "./Bindings.js";
|
|
5
|
-
import ComputePipeline from "./ComputePipeline.js";
|
|
6
|
-
import DataMap from "./DataMap.js";
|
|
7
|
-
import Info from "./Info.js";
|
|
8
|
-
import NodeManager from "./nodes/NodeManager.js";
|
|
9
|
-
import Pipeline from "./Pipeline.js";
|
|
10
|
-
import ProgrammableStage from "./ProgrammableStage.js";
|
|
11
|
-
import RenderObject from "./RenderObject.js";
|
|
12
|
-
import RenderObjectPipeline from "./RenderObjectPipeline.js";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* This renderer module manages the pipelines of the renderer.
|
|
16
|
-
*
|
|
17
|
-
* @private
|
|
18
|
-
* @augments DataMap
|
|
19
|
-
*/
|
|
20
|
-
declare class Pipelines extends DataMap {
|
|
21
|
-
/**
|
|
22
|
-
* Constructs a new pipeline management component.
|
|
23
|
-
*
|
|
24
|
-
* @param {Backend} backend - The renderer's backend.
|
|
25
|
-
* @param {NodeManager} nodes - Renderer component for managing nodes related logic.
|
|
26
|
-
* @param {Info} info - Renderer component for managing metrics and monitoring data.
|
|
27
|
-
*/
|
|
28
|
-
constructor(backend: Backend, nodes: NodeManager, info: Info);
|
|
29
|
-
/**
|
|
30
|
-
* The renderer's backend.
|
|
31
|
-
*
|
|
32
|
-
* @type {Backend}
|
|
33
|
-
*/
|
|
34
|
-
backend: Backend;
|
|
35
|
-
/**
|
|
36
|
-
* Renderer component for managing nodes related logic.
|
|
37
|
-
*
|
|
38
|
-
* @type {NodeManager}
|
|
39
|
-
*/
|
|
40
|
-
nodes: NodeManager;
|
|
41
|
-
/**
|
|
42
|
-
* Renderer component for managing metrics and monitoring data.
|
|
43
|
-
*
|
|
44
|
-
* @type {Info}
|
|
45
|
-
*/
|
|
46
|
-
info: Info;
|
|
47
|
-
/**
|
|
48
|
-
* A references to the bindings management component.
|
|
49
|
-
* This reference will be set inside the `Bindings`
|
|
50
|
-
* constructor.
|
|
51
|
-
*
|
|
52
|
-
* @type {?Bindings}
|
|
53
|
-
* @default null
|
|
54
|
-
*/
|
|
55
|
-
bindings: Bindings | null;
|
|
56
|
-
/**
|
|
57
|
-
* Internal cache for maintaining pipelines.
|
|
58
|
-
* The key of the map is a cache key, the value the pipeline.
|
|
59
|
-
*
|
|
60
|
-
* @type {Map<string,Pipeline>}
|
|
61
|
-
*/
|
|
62
|
-
caches: Map<string, Pipeline>;
|
|
63
|
-
/**
|
|
64
|
-
* This dictionary maintains for each shader stage type (vertex,
|
|
65
|
-
* fragment and compute) the programmable stage objects which
|
|
66
|
-
* represent the actual shader code.
|
|
67
|
-
*
|
|
68
|
-
* @type {Object<string,Map<string, ProgrammableStage>>}
|
|
69
|
-
*/
|
|
70
|
-
programs: {
|
|
71
|
-
vertex: Map<string, ProgrammableStage>;
|
|
72
|
-
fragment: Map<string, ProgrammableStage>;
|
|
73
|
-
compute: Map<string, ProgrammableStage>;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Returns a compute pipeline for the given compute node.
|
|
77
|
-
*
|
|
78
|
-
* @param {Node} computeNode - The compute node.
|
|
79
|
-
* @param {Array<BindGroup>} bindings - The bindings.
|
|
80
|
-
* @return {ComputePipeline} The compute pipeline.
|
|
81
|
-
*/
|
|
82
|
-
getForCompute(computeNode: ComputeNode, bindings: BindGroup[]): ComputePipeline;
|
|
83
|
-
/**
|
|
84
|
-
* Returns a render pipeline for the given render object.
|
|
85
|
-
*
|
|
86
|
-
* @param {RenderObject} renderObject - The render object.
|
|
87
|
-
* @param {?Array<Promise>} [promises=null] - An array of compilation promises which is only relevant in context of `Renderer.compileAsync()`.
|
|
88
|
-
* @return {RenderObjectPipeline} The render pipeline.
|
|
89
|
-
*/
|
|
90
|
-
getForRender(renderObject: RenderObject, promises?: Promise<void>[] | null): RenderObjectPipeline;
|
|
91
|
-
/**
|
|
92
|
-
* Checks if the render pipeline for the given render object is ready for drawing.
|
|
93
|
-
* Returns false if the GPU pipeline is still being compiled asynchronously.
|
|
94
|
-
*
|
|
95
|
-
* @param {RenderObject} renderObject - The render object.
|
|
96
|
-
* @return {boolean} True if the pipeline is ready for drawing.
|
|
97
|
-
*/
|
|
98
|
-
isReady(renderObject: RenderObject): boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Deletes the pipeline for the given render object.
|
|
101
|
-
*
|
|
102
|
-
* @param {RenderObject} object - The render object.
|
|
103
|
-
* @return {?Object} The deleted dictionary.
|
|
104
|
-
*/
|
|
105
|
-
delete(object: RenderObject): unknown;
|
|
106
|
-
/**
|
|
107
|
-
* Updates the pipeline for the given render object.
|
|
108
|
-
*
|
|
109
|
-
* @param {RenderObject} renderObject - The render object.
|
|
110
|
-
*/
|
|
111
|
-
updateForRender(renderObject: RenderObject): void;
|
|
112
|
-
/**
|
|
113
|
-
* Returns a compute pipeline for the given parameters.
|
|
114
|
-
*
|
|
115
|
-
* @private
|
|
116
|
-
* @param {Node} computeNode - The compute node.
|
|
117
|
-
* @param {ProgrammableStage} stageCompute - The programmable stage representing the compute shader.
|
|
118
|
-
* @param {string} cacheKey - The cache key.
|
|
119
|
-
* @param {Array<BindGroup>} bindings - The bindings.
|
|
120
|
-
* @return {ComputePipeline} The compute pipeline.
|
|
121
|
-
*/
|
|
122
|
-
private _getComputePipeline;
|
|
123
|
-
/**
|
|
124
|
-
* Returns a render pipeline for the given parameters.
|
|
125
|
-
*
|
|
126
|
-
* @private
|
|
127
|
-
* @param {RenderObject} renderObject - The render object.
|
|
128
|
-
* @param {ProgrammableStage} stageVertex - The programmable stage representing the vertex shader.
|
|
129
|
-
* @param {ProgrammableStage} stageFragment - The programmable stage representing the fragment shader.
|
|
130
|
-
* @param {string} cacheKey - The cache key.
|
|
131
|
-
* @param {?Array<Promise>} promises - An array of compilation promises which is only relevant in context of `Renderer.compileAsync()`.
|
|
132
|
-
* @return {RenderObjectPipeline} The render pipeline.
|
|
133
|
-
*/
|
|
134
|
-
private _getRenderPipeline;
|
|
135
|
-
/**
|
|
136
|
-
* Computes a cache key representing a compute pipeline.
|
|
137
|
-
*
|
|
138
|
-
* @private
|
|
139
|
-
* @param {Node} computeNode - The compute node.
|
|
140
|
-
* @param {ProgrammableStage} stageCompute - The programmable stage representing the compute shader.
|
|
141
|
-
* @return {string} The cache key.
|
|
142
|
-
*/
|
|
143
|
-
private _getComputeCacheKey;
|
|
144
|
-
/**
|
|
145
|
-
* Computes a cache key representing a render pipeline.
|
|
146
|
-
*
|
|
147
|
-
* @private
|
|
148
|
-
* @param {RenderObject} renderObject - The render object.
|
|
149
|
-
* @param {ProgrammableStage} stageVertex - The programmable stage representing the vertex shader.
|
|
150
|
-
* @param {ProgrammableStage} stageFragment - The programmable stage representing the fragment shader.
|
|
151
|
-
* @return {string} The cache key.
|
|
152
|
-
*/
|
|
153
|
-
private _getRenderCacheKey;
|
|
154
|
-
/**
|
|
155
|
-
* Releases the given pipeline.
|
|
156
|
-
*
|
|
157
|
-
* @private
|
|
158
|
-
* @param {Pipeline} pipeline - The pipeline to release.
|
|
159
|
-
*/
|
|
160
|
-
private _releasePipeline;
|
|
161
|
-
/**
|
|
162
|
-
* Releases the shader program.
|
|
163
|
-
*
|
|
164
|
-
* @private
|
|
165
|
-
* @param {Object} program - The shader program to release.
|
|
166
|
-
*/
|
|
167
|
-
private _releaseProgram;
|
|
168
|
-
/**
|
|
169
|
-
* Returns `true` if the compute pipeline for the given compute node requires an update.
|
|
170
|
-
*
|
|
171
|
-
* @private
|
|
172
|
-
* @param {Node} computeNode - The compute node.
|
|
173
|
-
* @return {boolean} Whether the compute pipeline for the given compute node requires an update or not.
|
|
174
|
-
*/
|
|
175
|
-
private _needsComputeUpdate;
|
|
176
|
-
/**
|
|
177
|
-
* Returns `true` if the render pipeline for the given render object requires an update.
|
|
178
|
-
*
|
|
179
|
-
* @private
|
|
180
|
-
* @param {RenderObject} renderObject - The render object.
|
|
181
|
-
* @return {boolean} Whether the render object for the given render object requires an update or not.
|
|
182
|
-
*/
|
|
183
|
-
private _needsRenderUpdate;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export default Pipelines;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import NodeAttribute from "../../nodes/core/NodeAttribute.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Class for representing programmable stages which are vertex,
|
|
5
|
-
* fragment or compute shaders. Unlike fixed-function states (like blending),
|
|
6
|
-
* they represent the programmable part of a pipeline.
|
|
7
|
-
*
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
declare class ProgrammableStage {
|
|
11
|
-
/**
|
|
12
|
-
* Constructs a new programmable stage.
|
|
13
|
-
*
|
|
14
|
-
* @param {string} code - The shader code.
|
|
15
|
-
* @param {('vertex'|'fragment'|'compute')} stage - The type of stage.
|
|
16
|
-
* @param {string} name - The name of the shader.
|
|
17
|
-
* @param {?Array<Object>} [transforms=null] - The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback).
|
|
18
|
-
* @param {?Array<Object>} [attributes=null] - The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback).
|
|
19
|
-
*/
|
|
20
|
-
constructor(
|
|
21
|
-
code: string,
|
|
22
|
-
stage: "vertex" | "fragment" | "compute",
|
|
23
|
-
name: string,
|
|
24
|
-
transforms?: unknown[] | null,
|
|
25
|
-
attributes?: NodeAttribute[] | null,
|
|
26
|
-
);
|
|
27
|
-
/**
|
|
28
|
-
* The id of the programmable stage.
|
|
29
|
-
*
|
|
30
|
-
* @type {number}
|
|
31
|
-
*/
|
|
32
|
-
id: number;
|
|
33
|
-
/**
|
|
34
|
-
* The shader code.
|
|
35
|
-
*
|
|
36
|
-
* @type {string}
|
|
37
|
-
*/
|
|
38
|
-
code: string;
|
|
39
|
-
/**
|
|
40
|
-
* The type of stage.
|
|
41
|
-
*
|
|
42
|
-
* @type {string}
|
|
43
|
-
*/
|
|
44
|
-
stage: "vertex" | "fragment" | "compute";
|
|
45
|
-
/**
|
|
46
|
-
* The name of the stage.
|
|
47
|
-
* This is used for debugging purposes.
|
|
48
|
-
*
|
|
49
|
-
* @type {string}
|
|
50
|
-
*/
|
|
51
|
-
name: string;
|
|
52
|
-
/**
|
|
53
|
-
* The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback).
|
|
54
|
-
*
|
|
55
|
-
* @type {?Array<Object>}
|
|
56
|
-
*/
|
|
57
|
-
transforms: unknown[] | null;
|
|
58
|
-
/**
|
|
59
|
-
* The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback).
|
|
60
|
-
*
|
|
61
|
-
* @type {?Array<Object>}
|
|
62
|
-
*/
|
|
63
|
-
attributes: NodeAttribute[] | null;
|
|
64
|
-
/**
|
|
65
|
-
* How often the programmable stage is currently in use.
|
|
66
|
-
*
|
|
67
|
-
* @type {number}
|
|
68
|
-
* @default 0
|
|
69
|
-
*/
|
|
70
|
-
usedTimes: number;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export default ProgrammableStage;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
-
import BundleGroup from "./BundleGroup.js";
|
|
3
|
-
import RenderContext from "./RenderContext.js";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This module is used to represent render bundles inside the renderer
|
|
7
|
-
* for further processing.
|
|
8
|
-
*
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
declare class RenderBundle {
|
|
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
|
-
* @param {RenderContext} renderContext - The render context the bundle is rendered with.
|
|
18
|
-
*/
|
|
19
|
-
constructor(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext);
|
|
20
|
-
bundleGroup: BundleGroup;
|
|
21
|
-
camera: Camera;
|
|
22
|
-
renderContext: RenderContext;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default RenderBundle;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
-
import BundleGroup from "./BundleGroup.js";
|
|
3
|
-
import ChainMap from "./ChainMap.js";
|
|
4
|
-
import RenderBundle from "./RenderBundle.js";
|
|
5
|
-
import RenderContext from "./RenderContext.js";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* This renderer module manages render bundles.
|
|
9
|
-
*
|
|
10
|
-
* @private
|
|
11
|
-
*/
|
|
12
|
-
declare class RenderBundles {
|
|
13
|
-
/**
|
|
14
|
-
* A chain map for maintaining the render bundles.
|
|
15
|
-
*
|
|
16
|
-
* @type {ChainMap}
|
|
17
|
-
*/
|
|
18
|
-
bundles: ChainMap;
|
|
19
|
-
/**
|
|
20
|
-
* Returns a render bundle for the given bundle group and camera.
|
|
21
|
-
*
|
|
22
|
-
* @param {BundleGroup} bundleGroup - The bundle group.
|
|
23
|
-
* @param {Camera} camera - The camera the bundle group is rendered with.
|
|
24
|
-
* @param {RenderContext} renderContext - The render context the bundle is rendered with.
|
|
25
|
-
* @return {RenderBundle} The render bundle.
|
|
26
|
-
*/
|
|
27
|
-
get(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext): RenderBundle;
|
|
28
|
-
/**
|
|
29
|
-
* Frees all internal resources.
|
|
30
|
-
*/
|
|
31
|
-
dispose(): void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default RenderBundles;
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
-
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
3
|
-
import { Vector4 } from "../../math/Vector4.js";
|
|
4
|
-
import MRTNode from "../../nodes/core/MRTNode.js";
|
|
5
|
-
import { DepthTexture } from "../../textures/DepthTexture.js";
|
|
6
|
-
import { Texture } from "../../textures/Texture.js";
|
|
7
|
-
import ClippingContext from "./ClippingContext.js";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Any render or compute command is executed in a specific context that defines
|
|
11
|
-
* the state of the renderer and its backend. Typical examples for such context
|
|
12
|
-
* data are the current clear values or data from the active framebuffer. This
|
|
13
|
-
* module is used to represent these contexts as objects.
|
|
14
|
-
*
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
declare class RenderContext {
|
|
18
|
-
/**
|
|
19
|
-
* The context's ID.
|
|
20
|
-
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
*/
|
|
23
|
-
id: number;
|
|
24
|
-
/**
|
|
25
|
-
* The MRT configuration.
|
|
26
|
-
*
|
|
27
|
-
* @type {?MRTNode}
|
|
28
|
-
* @default null
|
|
29
|
-
*/
|
|
30
|
-
mrt: MRTNode | null;
|
|
31
|
-
/**
|
|
32
|
-
* Whether the current active framebuffer has a color attachment.
|
|
33
|
-
*
|
|
34
|
-
* @type {boolean}
|
|
35
|
-
* @default true
|
|
36
|
-
*/
|
|
37
|
-
color: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the color attachment should be cleared or not.
|
|
40
|
-
*
|
|
41
|
-
* @type {boolean}
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
|
-
clearColor: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* The clear color value.
|
|
47
|
-
*
|
|
48
|
-
* @type {Object}
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
|
-
clearColorValue: {
|
|
52
|
-
r: number;
|
|
53
|
-
g: number;
|
|
54
|
-
b: number;
|
|
55
|
-
a: number;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Whether the current active framebuffer has a depth attachment.
|
|
59
|
-
*
|
|
60
|
-
* @type {boolean}
|
|
61
|
-
* @default true
|
|
62
|
-
*/
|
|
63
|
-
depth: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Whether the depth attachment should be cleared or not.
|
|
66
|
-
*
|
|
67
|
-
* @type {boolean}
|
|
68
|
-
* @default true
|
|
69
|
-
*/
|
|
70
|
-
clearDepth: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* The clear depth value.
|
|
73
|
-
*
|
|
74
|
-
* @type {number}
|
|
75
|
-
* @default 1
|
|
76
|
-
*/
|
|
77
|
-
clearDepthValue: number;
|
|
78
|
-
/**
|
|
79
|
-
* Whether the current active framebuffer has a stencil attachment.
|
|
80
|
-
*
|
|
81
|
-
* @type {boolean}
|
|
82
|
-
* @default false
|
|
83
|
-
*/
|
|
84
|
-
stencil: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Whether the stencil attachment should be cleared or not.
|
|
87
|
-
*
|
|
88
|
-
* @type {boolean}
|
|
89
|
-
* @default true
|
|
90
|
-
*/
|
|
91
|
-
clearStencil: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* The clear stencil value.
|
|
94
|
-
*
|
|
95
|
-
* @type {number}
|
|
96
|
-
* @default 1
|
|
97
|
-
*/
|
|
98
|
-
clearStencilValue: number;
|
|
99
|
-
/**
|
|
100
|
-
* By default the viewport encloses the entire framebuffer If a smaller
|
|
101
|
-
* viewport is manually defined, this property is to `true` by the renderer.
|
|
102
|
-
*
|
|
103
|
-
* @type {boolean}
|
|
104
|
-
* @default false
|
|
105
|
-
*/
|
|
106
|
-
viewport: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* The viewport value. This value is in physical pixels meaning it incorporates
|
|
109
|
-
* the renderer's pixel ratio. The viewport property of render targets or
|
|
110
|
-
* the renderer is in logical pixels.
|
|
111
|
-
*
|
|
112
|
-
* @type {Vector4}
|
|
113
|
-
*/
|
|
114
|
-
viewportValue: Vector4;
|
|
115
|
-
/**
|
|
116
|
-
* When the scissor test is active and scissor rectangle smaller than the
|
|
117
|
-
* framebuffers dimensions, this property is to `true` by the renderer.
|
|
118
|
-
*
|
|
119
|
-
* @type {boolean}
|
|
120
|
-
* @default false
|
|
121
|
-
*/
|
|
122
|
-
scissor: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* The scissor rectangle.
|
|
125
|
-
*
|
|
126
|
-
* @type {Vector4}
|
|
127
|
-
*/
|
|
128
|
-
scissorValue: Vector4;
|
|
129
|
-
/**
|
|
130
|
-
* The active render target.
|
|
131
|
-
*
|
|
132
|
-
* @type {?RenderTarget}
|
|
133
|
-
* @default null
|
|
134
|
-
*/
|
|
135
|
-
renderTarget: RenderTarget | null;
|
|
136
|
-
/**
|
|
137
|
-
* The textures of the active render target.
|
|
138
|
-
* `null` when no render target is set.
|
|
139
|
-
*
|
|
140
|
-
* @type {?Array<Texture>}
|
|
141
|
-
* @default null
|
|
142
|
-
*/
|
|
143
|
-
textures: Texture[] | null;
|
|
144
|
-
/**
|
|
145
|
-
* The depth texture of the active render target.
|
|
146
|
-
* `null` when no render target is set.
|
|
147
|
-
*
|
|
148
|
-
* @type {?DepthTexture}
|
|
149
|
-
* @default null
|
|
150
|
-
*/
|
|
151
|
-
depthTexture: DepthTexture | null;
|
|
152
|
-
/**
|
|
153
|
-
* The active cube face.
|
|
154
|
-
*
|
|
155
|
-
* @type {number}
|
|
156
|
-
* @default 0
|
|
157
|
-
*/
|
|
158
|
-
activeCubeFace: number;
|
|
159
|
-
/**
|
|
160
|
-
* The active mipmap level.
|
|
161
|
-
*
|
|
162
|
-
* @type {number}
|
|
163
|
-
* @default 0
|
|
164
|
-
*/
|
|
165
|
-
activeMipmapLevel: number;
|
|
166
|
-
/**
|
|
167
|
-
* The number of MSAA samples. This value is always `1` when
|
|
168
|
-
* MSAA isn't used.
|
|
169
|
-
*
|
|
170
|
-
* @type {number}
|
|
171
|
-
* @default 1
|
|
172
|
-
*/
|
|
173
|
-
sampleCount: number;
|
|
174
|
-
/**
|
|
175
|
-
* The active render target's width in physical pixels.
|
|
176
|
-
*
|
|
177
|
-
* @type {number}
|
|
178
|
-
* @default 0
|
|
179
|
-
*/
|
|
180
|
-
width: number;
|
|
181
|
-
/**
|
|
182
|
-
* The active render target's height in physical pixels.
|
|
183
|
-
*
|
|
184
|
-
* @type {number}
|
|
185
|
-
* @default 0
|
|
186
|
-
*/
|
|
187
|
-
height: number;
|
|
188
|
-
/**
|
|
189
|
-
* The occlusion query count.
|
|
190
|
-
*
|
|
191
|
-
* @type {number}
|
|
192
|
-
* @default 0
|
|
193
|
-
*/
|
|
194
|
-
occlusionQueryCount: number;
|
|
195
|
-
/**
|
|
196
|
-
* The current clipping context.
|
|
197
|
-
*
|
|
198
|
-
* @type {?ClippingContext}
|
|
199
|
-
* @default null
|
|
200
|
-
*/
|
|
201
|
-
clippingContext: ClippingContext | null;
|
|
202
|
-
/**
|
|
203
|
-
* The current camera.
|
|
204
|
-
*
|
|
205
|
-
* @type {?Camera}
|
|
206
|
-
* @default null
|
|
207
|
-
*/
|
|
208
|
-
camera: Camera | null;
|
|
209
|
-
/**
|
|
210
|
-
* This flag can be used for type testing.
|
|
211
|
-
*
|
|
212
|
-
* @type {boolean}
|
|
213
|
-
* @readonly
|
|
214
|
-
* @default true
|
|
215
|
-
*/
|
|
216
|
-
readonly isRenderContext: boolean;
|
|
217
|
-
/**
|
|
218
|
-
* Returns the cache key of this render context.
|
|
219
|
-
*
|
|
220
|
-
* @return {number} The cache key.
|
|
221
|
-
*/
|
|
222
|
-
getCacheKey(): number;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Computes a cache key for the given render context. This key
|
|
227
|
-
* should identify the render target state so it is possible to
|
|
228
|
-
* configure the correct attachments in the respective backend.
|
|
229
|
-
*
|
|
230
|
-
* @param {RenderContext} renderContext - The render context.
|
|
231
|
-
* @return {number} The cache key.
|
|
232
|
-
*/
|
|
233
|
-
export function getCacheKey(renderContext: RenderContext): number;
|
|
234
|
-
|
|
235
|
-
export default RenderContext;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { RenderTarget } from "../../core/RenderTarget.js";
|
|
2
|
-
import MRTNode from "../../nodes/core/MRTNode.js";
|
|
3
|
-
import RenderContext from "./RenderContext.js";
|
|
4
|
-
import Renderer from "./Renderer.js";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This module manages the render contexts of the renderer.
|
|
8
|
-
*
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
declare class RenderContexts {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a new render context management component.
|
|
14
|
-
*
|
|
15
|
-
* @param {Renderer} renderer - The renderer.
|
|
16
|
-
*/
|
|
17
|
-
constructor(renderer: Renderer);
|
|
18
|
-
/**
|
|
19
|
-
* The renderer.
|
|
20
|
-
*
|
|
21
|
-
* @type {Renderer}
|
|
22
|
-
*/
|
|
23
|
-
renderer: Renderer;
|
|
24
|
-
/**
|
|
25
|
-
* A dictionary that manages render contexts.
|
|
26
|
-
*
|
|
27
|
-
* @type {Object<string,RenderContext>}
|
|
28
|
-
*/
|
|
29
|
-
_renderContexts: {
|
|
30
|
-
[x: string]: RenderContext;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Returns a render context for the given scene, camera and render target.
|
|
34
|
-
*
|
|
35
|
-
* @param {?RenderTarget} [renderTarget=null] - The active render target.
|
|
36
|
-
* @param {?MRTNode} [mrt=null] - The MRT configuration
|
|
37
|
-
* @param {?number} [callDepth=0] - The call depth of the renderer.
|
|
38
|
-
* @return {RenderContext} The render context.
|
|
39
|
-
*/
|
|
40
|
-
get(renderTarget?: RenderTarget | null, mrt?: MRTNode | null, callDepth?: number | null): RenderContext;
|
|
41
|
-
/**
|
|
42
|
-
* Frees internal resources.
|
|
43
|
-
*/
|
|
44
|
-
dispose(): void;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default RenderContexts;
|