@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,132 +0,0 @@
|
|
|
1
|
-
import ComputeNode from "../../nodes/gpgpu/ComputeNode.js";
|
|
2
|
-
import Attributes from "./Attributes.js";
|
|
3
|
-
import Backend from "./Backend.js";
|
|
4
|
-
import BindGroup from "./BindGroup.js";
|
|
5
|
-
import DataMap from "./DataMap.js";
|
|
6
|
-
import Info from "./Info.js";
|
|
7
|
-
import NodeManager from "./nodes/NodeManager.js";
|
|
8
|
-
import Pipelines from "./Pipelines.js";
|
|
9
|
-
import RenderObject from "./RenderObject.js";
|
|
10
|
-
import Textures from "./Textures.js";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* This renderer module manages the bindings of the renderer.
|
|
14
|
-
*
|
|
15
|
-
* @private
|
|
16
|
-
* @augments DataMap
|
|
17
|
-
*/
|
|
18
|
-
declare class Bindings extends DataMap {
|
|
19
|
-
/**
|
|
20
|
-
* Constructs a new bindings management component.
|
|
21
|
-
*
|
|
22
|
-
* @param {Backend} backend - The renderer's backend.
|
|
23
|
-
* @param {NodeManager} nodes - Renderer component for managing nodes related logic.
|
|
24
|
-
* @param {Textures} textures - Renderer component for managing textures.
|
|
25
|
-
* @param {Attributes} attributes - Renderer component for managing attributes.
|
|
26
|
-
* @param {Pipelines} pipelines - Renderer component for managing pipelines.
|
|
27
|
-
* @param {Info} info - Renderer component for managing metrics and monitoring data.
|
|
28
|
-
*/
|
|
29
|
-
constructor(
|
|
30
|
-
backend: Backend,
|
|
31
|
-
nodes: NodeManager,
|
|
32
|
-
textures: Textures,
|
|
33
|
-
attributes: Attributes,
|
|
34
|
-
pipelines: Pipelines,
|
|
35
|
-
info: Info,
|
|
36
|
-
);
|
|
37
|
-
/**
|
|
38
|
-
* The renderer's backend.
|
|
39
|
-
*
|
|
40
|
-
* @type {Backend}
|
|
41
|
-
*/
|
|
42
|
-
backend: Backend;
|
|
43
|
-
/**
|
|
44
|
-
* Renderer component for managing textures.
|
|
45
|
-
*
|
|
46
|
-
* @type {Textures}
|
|
47
|
-
*/
|
|
48
|
-
textures: Textures;
|
|
49
|
-
/**
|
|
50
|
-
* Renderer component for managing pipelines.
|
|
51
|
-
*
|
|
52
|
-
* @type {Pipelines}
|
|
53
|
-
*/
|
|
54
|
-
pipelines: Pipelines;
|
|
55
|
-
/**
|
|
56
|
-
* Renderer component for managing attributes.
|
|
57
|
-
*
|
|
58
|
-
* @type {Attributes}
|
|
59
|
-
*/
|
|
60
|
-
attributes: Attributes;
|
|
61
|
-
/**
|
|
62
|
-
* Renderer component for managing nodes related logic.
|
|
63
|
-
*
|
|
64
|
-
* @type {NodeManager}
|
|
65
|
-
*/
|
|
66
|
-
nodes: NodeManager;
|
|
67
|
-
/**
|
|
68
|
-
* Renderer component for managing metrics and monitoring data.
|
|
69
|
-
*
|
|
70
|
-
* @type {Info}
|
|
71
|
-
*/
|
|
72
|
-
info: Info;
|
|
73
|
-
/**
|
|
74
|
-
* Returns the bind groups for the given render object.
|
|
75
|
-
*
|
|
76
|
-
* @param {RenderObject} renderObject - The render object.
|
|
77
|
-
* @return {Array<BindGroup>} The bind groups.
|
|
78
|
-
*/
|
|
79
|
-
getForRender(renderObject: RenderObject): BindGroup[];
|
|
80
|
-
/**
|
|
81
|
-
* Returns the bind groups for the given compute node.
|
|
82
|
-
*
|
|
83
|
-
* @param {Node} computeNode - The compute node.
|
|
84
|
-
* @return {Array<BindGroup>} The bind groups.
|
|
85
|
-
*/
|
|
86
|
-
getForCompute(computeNode: ComputeNode): BindGroup[];
|
|
87
|
-
/**
|
|
88
|
-
* Updates the bindings for the given compute node.
|
|
89
|
-
*
|
|
90
|
-
* @param {Node} computeNode - The compute node.
|
|
91
|
-
*/
|
|
92
|
-
updateForCompute(computeNode: ComputeNode): void;
|
|
93
|
-
/**
|
|
94
|
-
* Updates the bindings for the given render object.
|
|
95
|
-
*
|
|
96
|
-
* @param {RenderObject} renderObject - The render object.
|
|
97
|
-
*/
|
|
98
|
-
updateForRender(renderObject: RenderObject): void;
|
|
99
|
-
/**
|
|
100
|
-
* Deletes the bindings for the given compute node.
|
|
101
|
-
*
|
|
102
|
-
* @param {Node} computeNode - The compute node.
|
|
103
|
-
*/
|
|
104
|
-
deleteForCompute(computeNode: ComputeNode): void;
|
|
105
|
-
/**
|
|
106
|
-
* Deletes the bindings for the given renderObject node.
|
|
107
|
-
*
|
|
108
|
-
* @param {RenderObject} renderObject - The renderObject.
|
|
109
|
-
*/
|
|
110
|
-
deleteForRender(renderObject: RenderObject): void;
|
|
111
|
-
/**
|
|
112
|
-
* Updates the given array of bindings.
|
|
113
|
-
*
|
|
114
|
-
* @param {Array<BindGroup>} bindings - The bind groups.
|
|
115
|
-
*/
|
|
116
|
-
_updateBindings(bindings: BindGroup[]): void;
|
|
117
|
-
/**
|
|
118
|
-
* Initializes the given bind group.
|
|
119
|
-
*
|
|
120
|
-
* @param {BindGroup} bindGroup - The bind group to initialize.
|
|
121
|
-
*/
|
|
122
|
-
_init(bindGroup: BindGroup): void;
|
|
123
|
-
/**
|
|
124
|
-
* Updates the given bind group.
|
|
125
|
-
*
|
|
126
|
-
* @param {BindGroup} bindGroup - The bind group to update.
|
|
127
|
-
* @param {Array<BindGroup>} bindings - The bind groups.
|
|
128
|
-
*/
|
|
129
|
-
_update(bindGroup: BindGroup, bindings: BindGroup[]): void;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export default Bindings;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { TypedArray } from "../../core/BufferAttribute.js";
|
|
2
|
-
import Binding from "./Binding.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Represents a buffer binding type.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
* @abstract
|
|
9
|
-
* @augments Binding
|
|
10
|
-
*/
|
|
11
|
-
declare class Buffer extends Binding {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a new buffer.
|
|
14
|
-
*
|
|
15
|
-
* @param {string} name - The buffer's name.
|
|
16
|
-
* @param {TypedArray} [buffer=null] - The buffer.
|
|
17
|
-
*/
|
|
18
|
-
constructor(name: string, buffer?: TypedArray);
|
|
19
|
-
/**
|
|
20
|
-
* This flag can be used for type testing.
|
|
21
|
-
*
|
|
22
|
-
* @type {boolean}
|
|
23
|
-
* @readonly
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
readonly isBuffer: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* The bytes per element.
|
|
29
|
-
*
|
|
30
|
-
* @type {number}
|
|
31
|
-
*/
|
|
32
|
-
bytesPerElement: number;
|
|
33
|
-
/**
|
|
34
|
-
* A reference to the internal buffer.
|
|
35
|
-
*
|
|
36
|
-
* @private
|
|
37
|
-
* @type {TypedArray}
|
|
38
|
-
*/
|
|
39
|
-
private _buffer;
|
|
40
|
-
/**
|
|
41
|
-
* An array of update ranges.
|
|
42
|
-
*
|
|
43
|
-
* @private
|
|
44
|
-
* @type {Array<{start: number, count: number}>}
|
|
45
|
-
*/
|
|
46
|
-
private _updateRanges;
|
|
47
|
-
/**
|
|
48
|
-
* The array of update ranges.
|
|
49
|
-
*
|
|
50
|
-
* @type {Array<{start: number, count: number}>}
|
|
51
|
-
*/
|
|
52
|
-
get updateRanges(): Array<{
|
|
53
|
-
start: number;
|
|
54
|
-
count: number;
|
|
55
|
-
}>;
|
|
56
|
-
/**
|
|
57
|
-
* Adds an update range.
|
|
58
|
-
*
|
|
59
|
-
* @param {number} start - The start index.
|
|
60
|
-
* @param {number} count - The number of elements.
|
|
61
|
-
*/
|
|
62
|
-
addUpdateRange(start: number, count: number): void;
|
|
63
|
-
/**
|
|
64
|
-
* Clears all update ranges.
|
|
65
|
-
*/
|
|
66
|
-
clearUpdateRanges(): void;
|
|
67
|
-
/**
|
|
68
|
-
* The buffer's byte length.
|
|
69
|
-
*
|
|
70
|
-
* @type {number}
|
|
71
|
-
* @readonly
|
|
72
|
-
*/
|
|
73
|
-
get byteLength(): number;
|
|
74
|
-
/**
|
|
75
|
-
* A reference to the internal buffer.
|
|
76
|
-
*
|
|
77
|
-
* @type {Float32Array}
|
|
78
|
-
* @readonly
|
|
79
|
-
*/
|
|
80
|
-
get buffer(): TypedArray;
|
|
81
|
-
/**
|
|
82
|
-
* Updates the binding.
|
|
83
|
-
*
|
|
84
|
-
* @return {boolean} Whether the buffer has been updated and must be
|
|
85
|
-
* uploaded to the GPU.
|
|
86
|
-
*/
|
|
87
|
-
update(): boolean;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export default Buffer;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data structure for the renderer. It allows defining values
|
|
3
|
-
* with chained, hierarchical keys. Keys are meant to be
|
|
4
|
-
* objects since the module internally works with Weak Maps
|
|
5
|
-
* for performance reasons.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
declare class ChainMap {
|
|
10
|
-
/**
|
|
11
|
-
* A map of Weak Maps by their key length.
|
|
12
|
-
*
|
|
13
|
-
* @type {Object<number, WeakMap>}
|
|
14
|
-
*/
|
|
15
|
-
weakMaps: {
|
|
16
|
-
[x: number]: WeakMap<object, unknown>;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Returns the Weak Map for the given keys.
|
|
20
|
-
*
|
|
21
|
-
* @param {Array<Object>} keys - List of keys.
|
|
22
|
-
* @return {WeakMap} The weak map.
|
|
23
|
-
*/
|
|
24
|
-
_getWeakMap(keys: object[]): WeakMap<object, unknown>;
|
|
25
|
-
/**
|
|
26
|
-
* Returns the value for the given array of keys.
|
|
27
|
-
*
|
|
28
|
-
* @param {Array<Object>} keys - List of keys.
|
|
29
|
-
* @return {any} The value. Returns `undefined` if no value was found.
|
|
30
|
-
*/
|
|
31
|
-
get(keys: object[]): unknown;
|
|
32
|
-
/**
|
|
33
|
-
* Sets the value for the given keys.
|
|
34
|
-
*
|
|
35
|
-
* @param {Array<Object>} keys - List of keys.
|
|
36
|
-
* @param {any} value - The value to set.
|
|
37
|
-
* @return {ChainMap} A reference to this Chain Map.
|
|
38
|
-
*/
|
|
39
|
-
set(keys: object[], value: unknown): ChainMap;
|
|
40
|
-
/**
|
|
41
|
-
* Deletes a value for the given keys.
|
|
42
|
-
*
|
|
43
|
-
* @param {Array<Object>} keys - The keys.
|
|
44
|
-
* @return {boolean} Returns `true` if the value has been removed successfully and `false` if the value has not be found.
|
|
45
|
-
*/
|
|
46
|
-
delete(keys: object[]): boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default ChainMap;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Color, ColorRepresentation } from "../../math/Color.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A four-component version of {@link Color} which is internally
|
|
5
|
-
* used by the renderer to represents clear color with alpha as
|
|
6
|
-
* one object.
|
|
7
|
-
*
|
|
8
|
-
* @private
|
|
9
|
-
* @augments Color
|
|
10
|
-
*/
|
|
11
|
-
declare class Color4 extends Color {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a new four-component color.
|
|
14
|
-
* You can pass a single THREE.Color, hex or
|
|
15
|
-
* string argument to this constructor.
|
|
16
|
-
*/
|
|
17
|
-
constructor(color?: ColorRepresentation);
|
|
18
|
-
/**
|
|
19
|
-
* Constructs a new four-component color.
|
|
20
|
-
*
|
|
21
|
-
* @param {number} [r=1] - The red value.
|
|
22
|
-
* @param {number} [g=1] - The green value.
|
|
23
|
-
* @param {number} [b=1] - The blue value.
|
|
24
|
-
* @param {number} [a=1] - The alpha value.
|
|
25
|
-
*/
|
|
26
|
-
constructor(r: number, g: number, b: number, a?: number);
|
|
27
|
-
a: number;
|
|
28
|
-
/**
|
|
29
|
-
* Overwrites the default to honor alpha.
|
|
30
|
-
* You can also pass a single THREE.Color, hex or
|
|
31
|
-
* string argument to this method.
|
|
32
|
-
*
|
|
33
|
-
* @param {number|string|Color} r - The red value.
|
|
34
|
-
* @param {number} [g] - The green value.
|
|
35
|
-
* @param {number} [b] - The blue value.
|
|
36
|
-
* @param {number} [a=1] - The alpha value.
|
|
37
|
-
* @return {Color4} A reference to this object.
|
|
38
|
-
*/
|
|
39
|
-
set(...args: [color: ColorRepresentation] | [r: number, g: number, b: number, a?: number]): this;
|
|
40
|
-
/**
|
|
41
|
-
* Overwrites the default to honor alpha.
|
|
42
|
-
*
|
|
43
|
-
* @param {Color4} color - The color to copy.
|
|
44
|
-
* @return {Color4} A reference to this object.
|
|
45
|
-
*/
|
|
46
|
-
copy(color: Color4): this;
|
|
47
|
-
/**
|
|
48
|
-
* Overwrites the default to honor alpha.
|
|
49
|
-
*
|
|
50
|
-
* @return {Color4} The cloned color.
|
|
51
|
-
*/
|
|
52
|
-
clone(): this;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export default Color4;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import Pipeline from "./Pipeline.js";
|
|
2
|
-
import ProgrammableStage from "./ProgrammableStage.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Class for representing compute pipelines.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
* @augments Pipeline
|
|
9
|
-
*/
|
|
10
|
-
declare class ComputePipeline extends Pipeline {
|
|
11
|
-
/**
|
|
12
|
-
* Constructs a new compute pipeline.
|
|
13
|
-
*
|
|
14
|
-
* @param {string} cacheKey - The pipeline's cache key.
|
|
15
|
-
* @param {ProgrammableStage} computeProgram - The pipeline's compute shader.
|
|
16
|
-
*/
|
|
17
|
-
constructor(cacheKey: string, computeProgram: ProgrammableStage);
|
|
18
|
-
/**
|
|
19
|
-
* The pipeline's compute shader.
|
|
20
|
-
*
|
|
21
|
-
* @type {ProgrammableStage}
|
|
22
|
-
*/
|
|
23
|
-
computeProgram: ProgrammableStage;
|
|
24
|
-
/**
|
|
25
|
-
* This flag can be used for type testing.
|
|
26
|
-
*
|
|
27
|
-
* @type {boolean}
|
|
28
|
-
* @readonly
|
|
29
|
-
* @default true
|
|
30
|
-
*/
|
|
31
|
-
readonly isComputePipeline: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default ComputePipeline;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Data structure for the renderer. It is intended to manage
|
|
3
|
-
* data of objects in dictionaries.
|
|
4
|
-
*
|
|
5
|
-
* @private
|
|
6
|
-
*/
|
|
7
|
-
declare class DataMap {
|
|
8
|
-
/**
|
|
9
|
-
* `DataMap` internally uses a weak map
|
|
10
|
-
* to manage its data.
|
|
11
|
-
*
|
|
12
|
-
* @type {WeakMap<Object, Object>}
|
|
13
|
-
*/
|
|
14
|
-
data: WeakMap<object, unknown>;
|
|
15
|
-
/**
|
|
16
|
-
* Returns the dictionary for the given object.
|
|
17
|
-
*
|
|
18
|
-
* @param {Object} object - The object.
|
|
19
|
-
* @return {Object} The dictionary.
|
|
20
|
-
*/
|
|
21
|
-
get(object: object): unknown;
|
|
22
|
-
/**
|
|
23
|
-
* Deletes the dictionary for the given object.
|
|
24
|
-
*
|
|
25
|
-
* @param {Object} object - The object.
|
|
26
|
-
* @return {?Object} The deleted dictionary.
|
|
27
|
-
*/
|
|
28
|
-
delete(object: object): unknown | null;
|
|
29
|
-
/**
|
|
30
|
-
* Returns `true` if the given object has a dictionary defined.
|
|
31
|
-
*
|
|
32
|
-
* @param {Object} object - The object to test.
|
|
33
|
-
* @return {boolean} Whether a dictionary is defined or not.
|
|
34
|
-
*/
|
|
35
|
-
has(object: object): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Frees internal resources.
|
|
38
|
-
*/
|
|
39
|
-
dispose(): void;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default DataMap;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { BufferAttribute } from "../../core/BufferAttribute.js";
|
|
2
|
-
import { BufferGeometry } from "../../core/BufferGeometry.js";
|
|
3
|
-
import Attributes from "./Attributes.js";
|
|
4
|
-
import { AttributeType } from "./Constants.js";
|
|
5
|
-
import DataMap from "./DataMap.js";
|
|
6
|
-
import Info from "./Info.js";
|
|
7
|
-
import RenderObject from "./RenderObject.js";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* This renderer module manages geometries.
|
|
11
|
-
*
|
|
12
|
-
* @private
|
|
13
|
-
* @augments DataMap
|
|
14
|
-
*/
|
|
15
|
-
declare class Geometries extends DataMap {
|
|
16
|
-
/**
|
|
17
|
-
* Constructs a new geometry management component.
|
|
18
|
-
*
|
|
19
|
-
* @param {Attributes} attributes - Renderer component for managing attributes.
|
|
20
|
-
* @param {Info} info - Renderer component for managing metrics and monitoring data.
|
|
21
|
-
*/
|
|
22
|
-
constructor(attributes: Attributes, info: Info);
|
|
23
|
-
/**
|
|
24
|
-
* Renderer component for managing attributes.
|
|
25
|
-
*
|
|
26
|
-
* @type {Attributes}
|
|
27
|
-
*/
|
|
28
|
-
attributes: Attributes;
|
|
29
|
-
/**
|
|
30
|
-
* Renderer component for managing metrics and monitoring data.
|
|
31
|
-
*
|
|
32
|
-
* @type {Info}
|
|
33
|
-
*/
|
|
34
|
-
info: Info;
|
|
35
|
-
/**
|
|
36
|
-
* Weak Map for managing attributes for wireframe rendering.
|
|
37
|
-
*
|
|
38
|
-
* @type {WeakMap<BufferGeometry,BufferAttribute>}
|
|
39
|
-
*/
|
|
40
|
-
wireframes: WeakMap<BufferGeometry, BufferAttribute>;
|
|
41
|
-
/**
|
|
42
|
-
* This Weak Map is used to make sure buffer attributes are
|
|
43
|
-
* updated only once per render call.
|
|
44
|
-
*
|
|
45
|
-
* @type {WeakMap<BufferAttribute,number>}
|
|
46
|
-
*/
|
|
47
|
-
attributeCall: WeakMap<BufferAttribute, number>;
|
|
48
|
-
/**
|
|
49
|
-
* Stores the event listeners attached to geometries.
|
|
50
|
-
*
|
|
51
|
-
* @private
|
|
52
|
-
* @type {Map<BufferGeometry,Function>}
|
|
53
|
-
*/
|
|
54
|
-
private _geometryDisposeListeners;
|
|
55
|
-
/**
|
|
56
|
-
* Returns `true` if the given render object has an initialized geometry.
|
|
57
|
-
*
|
|
58
|
-
* @param {RenderObject} renderObject - The render object.
|
|
59
|
-
* @return {boolean} Whether if the given render object has an initialized geometry or not.
|
|
60
|
-
*/
|
|
61
|
-
has(renderObject: RenderObject): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Prepares the geometry of the given render object for rendering.
|
|
64
|
-
*
|
|
65
|
-
* @param {RenderObject} renderObject - The render object.
|
|
66
|
-
*/
|
|
67
|
-
updateForRender(renderObject: RenderObject): void;
|
|
68
|
-
/**
|
|
69
|
-
* Initializes the geometry of the given render object.
|
|
70
|
-
*
|
|
71
|
-
* @param {RenderObject} renderObject - The render object.
|
|
72
|
-
*/
|
|
73
|
-
initGeometry(renderObject: RenderObject): void;
|
|
74
|
-
/**
|
|
75
|
-
* Updates the geometry attributes of the given render object.
|
|
76
|
-
*
|
|
77
|
-
* @param {RenderObject} renderObject - The render object.
|
|
78
|
-
*/
|
|
79
|
-
updateAttributes(renderObject: RenderObject): void;
|
|
80
|
-
/**
|
|
81
|
-
* Updates the given attribute.
|
|
82
|
-
*
|
|
83
|
-
* @param {BufferAttribute} attribute - The attribute to update.
|
|
84
|
-
* @param {number} type - The attribute type.
|
|
85
|
-
*/
|
|
86
|
-
updateAttribute(attribute: BufferAttribute, type: AttributeType): void;
|
|
87
|
-
/**
|
|
88
|
-
* Returns the indirect buffer attribute of the given render object.
|
|
89
|
-
*
|
|
90
|
-
* @param {RenderObject} renderObject - The render object.
|
|
91
|
-
* @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used.
|
|
92
|
-
*/
|
|
93
|
-
getIndirect(renderObject: RenderObject): BufferAttribute | null;
|
|
94
|
-
/**
|
|
95
|
-
* Returns the byte offset into the indirect attribute buffer of the given render object.
|
|
96
|
-
*
|
|
97
|
-
* @param {RenderObject} renderObject - The render object.
|
|
98
|
-
* @return {number} The byte offset into the indirect attribute buffer.
|
|
99
|
-
*/
|
|
100
|
-
getIndirectOffset(renderObject: RenderObject): number;
|
|
101
|
-
/**
|
|
102
|
-
* Returns the index of the given render object's geometry. This is implemented
|
|
103
|
-
* in a method to return a wireframe index if necessary.
|
|
104
|
-
*
|
|
105
|
-
* @param {RenderObject} renderObject - The render object.
|
|
106
|
-
* @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries.
|
|
107
|
-
*/
|
|
108
|
-
getIndex(renderObject: RenderObject): BufferAttribute | null;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export default Geometries;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abstract class for representing pipelines.
|
|
3
|
-
*
|
|
4
|
-
* @private
|
|
5
|
-
* @abstract
|
|
6
|
-
*/
|
|
7
|
-
declare class Pipeline {
|
|
8
|
-
/**
|
|
9
|
-
* Constructs a new pipeline.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} cacheKey - The pipeline's cache key.
|
|
12
|
-
*/
|
|
13
|
-
constructor(cacheKey: string);
|
|
14
|
-
/**
|
|
15
|
-
* The pipeline's cache key.
|
|
16
|
-
*
|
|
17
|
-
* @type {string}
|
|
18
|
-
*/
|
|
19
|
-
cacheKey: string;
|
|
20
|
-
/**
|
|
21
|
-
* How often the pipeline is currently in use.
|
|
22
|
-
*
|
|
23
|
-
* @type {number}
|
|
24
|
-
* @default 0
|
|
25
|
-
*/
|
|
26
|
-
usedTimes: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default Pipeline;
|