@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.
Files changed (208) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +2 -0
  3. three/examples/jsm/controls/FirstPersonControls.d.ts +9 -0
  4. three/examples/jsm/controls/OrbitControls.d.ts +2 -2
  5. three/examples/jsm/controls/TransformControls.d.ts +32 -1
  6. three/examples/jsm/csm/CSMFrustum.d.ts +73 -13
  7. three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
  8. three/examples/jsm/exporters/GLTFExporter.d.ts +2 -2
  9. three/examples/jsm/exporters/PLYExporter.d.ts +5 -4
  10. three/examples/jsm/exporters/USDZExporter.d.ts +5 -1
  11. three/examples/jsm/generators/CityGenerator.d.ts +75 -0
  12. three/examples/jsm/generators/ForestGenerator.d.ts +79 -0
  13. three/examples/jsm/generators/TerrainGenerator.d.ts +67 -0
  14. three/examples/jsm/generators/TreeGenerator.d.ts +97 -0
  15. three/examples/jsm/generators/city/SidewalkGenerator.d.ts +40 -0
  16. three/examples/jsm/generators/city/SkyscraperGenerator.d.ts +83 -0
  17. three/examples/jsm/geometries/LoftGeometry.d.ts +83 -0
  18. three/examples/jsm/inspector/tabs/Parameters.d.ts +5 -2
  19. three/examples/jsm/lighting/ClusteredLighting.d.ts +45 -0
  20. three/examples/jsm/lighting/LightProbeGrid.d.ts +131 -13
  21. three/examples/jsm/loaders/DRACOLoader.d.ts +20 -6
  22. three/examples/jsm/loaders/EXRLoader.d.ts +2 -12
  23. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
  24. three/examples/jsm/loaders/HDRLoader.d.ts +2 -12
  25. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -1
  26. three/examples/jsm/loaders/LWOLoader.d.ts +6 -0
  27. three/examples/jsm/loaders/RGBELoader.d.ts +1 -7
  28. three/examples/jsm/loaders/SVGLoader.d.ts +9 -6
  29. three/examples/jsm/loaders/TGALoader.d.ts +2 -2
  30. three/examples/jsm/loaders/TIFFLoader.d.ts +2 -11
  31. three/examples/jsm/loaders/USDLoader.d.ts +6 -1
  32. three/examples/jsm/misc/TileCreasedNormalsPlugin.d.ts +49 -0
  33. three/examples/jsm/objects/MarchingCubes.d.ts +2 -2
  34. three/examples/jsm/objects/Reflector.d.ts +38 -5
  35. three/examples/jsm/objects/SkyMesh.d.ts +1 -1
  36. three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
  37. three/examples/jsm/tsl/display/BloomNode.d.ts +23 -6
  38. three/examples/jsm/tsl/display/ImportanceSampledEnvironment.d.ts +84 -0
  39. three/examples/jsm/tsl/display/RecurrentDenoiseNode.d.ts +89 -0
  40. three/examples/jsm/tsl/display/SSAAPassNode.d.ts +0 -2
  41. three/examples/jsm/tsl/display/SSGINode.d.ts +4 -1
  42. three/examples/jsm/tsl/display/SSRNode.d.ts +303 -30
  43. three/examples/jsm/tsl/display/TRAANode.d.ts +1 -1
  44. three/examples/jsm/tsl/display/TemporalReprojectNode.d.ts +64 -0
  45. three/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +54 -0
  46. three/examples/jsm/tsl/math/curlNoise.d.ts +38 -0
  47. three/examples/jsm/tsl/utils/GroundedSkybox.d.ts +17 -0
  48. three/examples/jsm/tsl/utils/RNoise.d.ts +12 -0
  49. three/examples/jsm/tsl/utils/SpecularHelpers.d.ts +20 -0
  50. three/examples/jsm/webxr/WebGLXRFallback.d.ts +14 -0
  51. three/package.json +3 -3
  52. three/src/Three.TSL.d.ts +10 -3
  53. three/src/Three.WebGPU.Nodes.d.ts +2 -2
  54. three/src/Three.WebGPU.d.ts +5 -3
  55. three/src/animation/AnimationClip.d.ts +0 -10
  56. three/src/cameras/Camera.d.ts +1 -1
  57. three/src/core/InterleavedBuffer.d.ts +1 -1
  58. three/src/core/Object3D.d.ts +8 -4
  59. three/src/core/RenderTarget.d.ts +11 -0
  60. three/src/core/Timer.d.ts +1 -1
  61. three/src/core/UniformsGroup.d.ts +1 -1
  62. three/src/extras/Controls.d.ts +6 -5
  63. three/src/extras/core/ShapePath.d.ts +61 -65
  64. three/src/loaders/DataTextureLoader.d.ts +37 -3
  65. three/src/loaders/MaterialLoader.d.ts +8 -0
  66. three/src/materials/LineBasicMaterial.d.ts +5 -0
  67. three/src/materials/Material.d.ts +9 -1
  68. three/src/materials/MeshBasicMaterial.d.ts +30 -0
  69. three/src/materials/MeshDepthMaterial.d.ts +13 -0
  70. three/src/materials/MeshDistanceMaterial.d.ts +13 -0
  71. three/src/materials/MeshLambertMaterial.d.ts +50 -1
  72. three/src/materials/MeshMatcapMaterial.d.ts +31 -1
  73. three/src/materials/MeshNormalMaterial.d.ts +11 -1
  74. three/src/materials/MeshPhongMaterial.d.ts +50 -1
  75. three/src/materials/MeshPhysicalMaterial.d.ts +50 -0
  76. three/src/materials/MeshStandardMaterial.d.ts +53 -1
  77. three/src/materials/MeshToonMaterial.d.ts +43 -1
  78. three/src/materials/PointsMaterial.d.ts +9 -0
  79. three/src/materials/ShaderMaterial.d.ts +2 -0
  80. three/src/materials/SpriteMaterial.d.ts +9 -0
  81. three/src/materials/nodes/Line2NodeMaterial.d.ts +18 -13
  82. three/src/materials/nodes/NodeMaterial.d.ts +33 -13
  83. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +0 -84
  84. three/src/math/Box2.d.ts +3 -3
  85. three/src/math/Box3.d.ts +255 -19
  86. three/src/math/Color.d.ts +10 -10
  87. three/src/math/FrustumArray.d.ts +75 -16
  88. three/src/math/Interpolant.d.ts +111 -8
  89. three/src/math/Matrix2.d.ts +1 -1
  90. three/src/math/Matrix3.d.ts +10 -1
  91. three/src/math/Matrix4.d.ts +329 -105
  92. three/src/math/Vector2.d.ts +1 -2
  93. three/src/math/Vector3.d.ts +3 -4
  94. three/src/math/Vector4.d.ts +1 -2
  95. three/src/math/interpolants/BezierInterpolant.d.ts +19 -3
  96. three/src/math/interpolants/CubicInterpolant.d.ts +18 -3
  97. three/src/math/interpolants/DiscreteInterpolant.d.ts +8 -3
  98. three/src/math/interpolants/LinearInterpolant.d.ts +7 -3
  99. three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +7 -3
  100. three/src/nodes/Nodes.d.ts +4 -13
  101. three/src/nodes/TSL.d.ts +7 -5
  102. three/src/nodes/accessors/Batch.d.ts +19 -0
  103. three/src/nodes/accessors/Instance.d.ts +34 -0
  104. three/src/nodes/accessors/MaterialNode.d.ts +86 -79
  105. three/src/nodes/accessors/Morph.d.ts +11 -0
  106. three/src/nodes/accessors/Skinning.d.ts +23 -0
  107. three/src/nodes/accessors/StorageBufferNode.d.ts +22 -23
  108. three/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
  109. three/src/nodes/accessors/StorageTextureNode.d.ts +6 -4
  110. three/src/nodes/accessors/TextureNode.d.ts +15 -10
  111. three/src/nodes/core/ArrayNode.d.ts +16 -8
  112. three/src/nodes/core/ContextNode.d.ts +5 -6
  113. three/src/nodes/core/LightingModel.d.ts +2 -0
  114. three/src/nodes/core/Node.d.ts +50 -51
  115. three/src/nodes/core/NodeBuilder.d.ts +1 -133
  116. three/src/nodes/core/OverrideContextNode.d.ts +92 -0
  117. three/src/nodes/core/PropertyNode.d.ts +13 -2
  118. three/src/nodes/core/StructNode.d.ts +0 -2
  119. three/src/nodes/core/StructTypeNode.d.ts +5 -4
  120. three/src/nodes/core/UniformNode.d.ts +48 -9
  121. three/src/nodes/display/BlendModes.d.ts +72 -11
  122. three/src/nodes/display/FrontFacingNode.d.ts +62 -3
  123. three/src/nodes/display/PassNode.d.ts +0 -2
  124. three/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
  125. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +53 -45
  126. three/src/nodes/lighting/LightingContextNode.d.ts +9 -2
  127. three/src/nodes/lighting/LightsNode.d.ts +4 -4
  128. three/src/nodes/math/MathNode.d.ts +358 -304
  129. three/src/nodes/math/OperatorNode.d.ts +253 -82
  130. three/src/nodes/tsl/TSLCore.d.ts +16 -9
  131. three/src/nodes/utils/ArrayElementNode.d.ts +5 -4
  132. three/src/nodes/utils/EquirectUV.d.ts +31 -1
  133. three/src/nodes/utils/Packing.d.ts +50 -3
  134. three/src/nodes/utils/RTTNode.d.ts +7 -12
  135. three/src/nodes/utils/Remap.d.ts +216 -29
  136. three/src/nodes/utils/SampleNode.d.ts +18 -8
  137. three/src/objects/BatchedMesh.d.ts +1 -1
  138. three/src/objects/InstancedMesh.d.ts +0 -8
  139. three/src/objects/Skeleton.d.ts +0 -2
  140. three/src/renderers/common/Backend.d.ts +0 -3
  141. three/src/renderers/common/CanvasTarget.d.ts +0 -49
  142. three/src/renderers/common/ClippingContext.d.ts +6 -1
  143. three/src/renderers/common/CubeRenderTarget.d.ts +2 -1
  144. three/src/renderers/common/Info.d.ts +26 -66
  145. three/src/renderers/common/InspectorBase.d.ts +0 -7
  146. three/src/renderers/common/Lighting.d.ts +49 -5
  147. three/src/renderers/common/Renderer.d.ts +34 -458
  148. three/src/renderers/common/RendererUtils.d.ts +1 -2
  149. three/src/renderers/common/TimestampQueryPool.d.ts +1 -1
  150. three/src/renderers/common/XRManager.d.ts +32 -299
  151. three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -117
  152. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
  153. three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -1
  154. three/src/renderers/webgl/WebGLState.d.ts +2 -0
  155. three/src/renderers/webgl-fallback/WebGLBackend.d.ts +1 -1
  156. three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +0 -10
  157. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +0 -1
  158. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +5 -121
  159. three/src/textures/CubeDepthTexture.d.ts +2 -3
  160. three/src/textures/DataTexture.d.ts +2 -1
  161. three/src/textures/DepthTexture.d.ts +5 -5
  162. three/examples/jsm/lighting/TiledLighting.d.ts +0 -9
  163. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +0 -31
  164. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +0 -22
  165. three/src/nodes/accessors/BatchNode.d.ts +0 -12
  166. three/src/nodes/accessors/InstanceNode.d.ts +0 -30
  167. three/src/nodes/accessors/InstancedMeshNode.d.ts +0 -10
  168. three/src/nodes/accessors/MorphNode.d.ts +0 -14
  169. three/src/nodes/accessors/SkinningNode.d.ts +0 -32
  170. three/src/renderers/common/Animation.d.ts +0 -102
  171. three/src/renderers/common/Attributes.d.ts +0 -59
  172. three/src/renderers/common/Background.d.ts +0 -47
  173. three/src/renderers/common/BindGroup.d.ts +0 -39
  174. three/src/renderers/common/Binding.d.ts +0 -50
  175. three/src/renderers/common/Bindings.d.ts +0 -132
  176. three/src/renderers/common/Buffer.d.ts +0 -90
  177. three/src/renderers/common/ChainMap.d.ts +0 -49
  178. three/src/renderers/common/Color4.d.ts +0 -55
  179. three/src/renderers/common/ComputePipeline.d.ts +0 -34
  180. three/src/renderers/common/DataMap.d.ts +0 -42
  181. three/src/renderers/common/Geometries.d.ts +0 -111
  182. three/src/renderers/common/Pipeline.d.ts +0 -29
  183. three/src/renderers/common/Pipelines.d.ts +0 -186
  184. three/src/renderers/common/ProgrammableStage.d.ts +0 -73
  185. three/src/renderers/common/RenderBundle.d.ts +0 -25
  186. three/src/renderers/common/RenderBundles.d.ts +0 -34
  187. three/src/renderers/common/RenderContext.d.ts +0 -235
  188. three/src/renderers/common/RenderContexts.d.ts +0 -47
  189. three/src/renderers/common/RenderList.d.ts +0 -226
  190. three/src/renderers/common/RenderLists.d.ts +0 -46
  191. three/src/renderers/common/RenderObject.d.ts +0 -448
  192. three/src/renderers/common/RenderObjectPipeline.d.ts +0 -33
  193. three/src/renderers/common/RenderObjects.d.ts +0 -151
  194. three/src/renderers/common/SampledTexture.d.ts +0 -28
  195. three/src/renderers/common/Sampler.d.ts +0 -19
  196. three/src/renderers/common/Textures.d.ts +0 -125
  197. three/src/renderers/common/Uniform.d.ts +0 -262
  198. three/src/renderers/common/UniformBuffer.d.ts +0 -20
  199. three/src/renderers/common/UniformsGroup.d.ts +0 -152
  200. three/src/renderers/common/XRRenderTarget.d.ts +0 -67
  201. three/src/renderers/common/nodes/NodeBuilderState.d.ts +0 -121
  202. three/src/renderers/common/nodes/NodeManager.d.ts +0 -309
  203. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +0 -29
  204. three/src/renderers/common/nodes/NodeSampler.d.ts +0 -12
  205. three/src/renderers/common/nodes/NodeUniform.d.ts +0 -250
  206. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -41
  207. three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -6
  208. three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -6
@@ -1,121 +0,0 @@
1
- import NodeMaterialObserver from "../../../materials/nodes/manager/NodeMaterialObserver.js";
2
- import Node from "../../../nodes/core/Node.js";
3
- import NodeAttribute from "../../../nodes/core/NodeAttribute.js";
4
- import BindGroup from "../BindGroup.js";
5
-
6
- /**
7
- * This module represents the state of a node builder after it was
8
- * used to build the nodes for a render object. The state holds the
9
- * results of the build for further processing in the renderer.
10
- *
11
- * Render objects with identical cache keys share the same node builder state.
12
- *
13
- * @private
14
- */
15
- declare class NodeBuilderState {
16
- /**
17
- * Constructs a new node builder state.
18
- *
19
- * @param {string} vertexShader - The native vertex shader code.
20
- * @param {string} fragmentShader - The native fragment shader code.
21
- * @param {string} computeShader - The native compute shader code.
22
- * @param {Array<NodeAttribute>} nodeAttributes - An array of node attributes.
23
- * @param {Array<BindGroup>} bindings - An array of bind groups.
24
- * @param {Array<Node>} updateNodes - An array of nodes that implement their `update()` method.
25
- * @param {Array<Node>} updateBeforeNodes - An array of nodes that implement their `updateBefore()` method.
26
- * @param {Array<Node>} updateAfterNodes - An array of nodes that implement their `updateAfter()` method.
27
- * @param {NodeMaterialObserver} observer - A node material observer.
28
- * @param {Array<Object>} transforms - An array with transform attribute objects. Only relevant when using compute shaders with WebGL 2.
29
- */
30
- constructor(
31
- vertexShader: string,
32
- fragmentShader: string,
33
- computeShader: string,
34
- nodeAttributes: NodeAttribute[],
35
- bindings: BindGroup[],
36
- updateNodes: Node[],
37
- updateBeforeNodes: Node[],
38
- updateAfterNodes: Node[],
39
- observer: NodeMaterialObserver,
40
- transforms?: unknown[],
41
- );
42
- /**
43
- * The native vertex shader code.
44
- *
45
- * @type {string}
46
- */
47
- vertexShader: string;
48
- /**
49
- * The native fragment shader code.
50
- *
51
- * @type {string}
52
- */
53
- fragmentShader: string;
54
- /**
55
- * The native compute shader code.
56
- *
57
- * @type {string}
58
- */
59
- computeShader: string;
60
- /**
61
- * An array with transform attribute objects.
62
- * Only relevant when using compute shaders with WebGL 2.
63
- *
64
- * @type {Array<Object>}
65
- */
66
- transforms: unknown[];
67
- /**
68
- * An array of node attributes representing
69
- * the attributes of the shaders.
70
- *
71
- * @type {Array<NodeAttribute>}
72
- */
73
- nodeAttributes: NodeAttribute[];
74
- /**
75
- * An array of bind groups representing the uniform or storage
76
- * buffers, texture or samplers of the shader.
77
- *
78
- * @type {Array<BindGroup>}
79
- */
80
- bindings: BindGroup[];
81
- /**
82
- * An array of nodes that implement their `update()` method.
83
- *
84
- * @type {Array<Node>}
85
- */
86
- updateNodes: Node[];
87
- /**
88
- * An array of nodes that implement their `updateBefore()` method.
89
- *
90
- * @type {Array<Node>}
91
- */
92
- updateBeforeNodes: Node[];
93
- /**
94
- * An array of nodes that implement their `updateAfter()` method.
95
- *
96
- * @type {Array<Node>}
97
- */
98
- updateAfterNodes: Node[];
99
- /**
100
- * A node material observer.
101
- *
102
- * @type {NodeMaterialObserver}
103
- */
104
- observer: NodeMaterialObserver;
105
- /**
106
- * How often this state is used by render objects.
107
- *
108
- * @type {number}
109
- */
110
- usedTimes: number;
111
- /**
112
- * This method is used to create a array of bind groups based
113
- * on the existing bind groups of this state. Shared groups are
114
- * not cloned.
115
- *
116
- * @return {Array<BindGroup>} A array of bind groups.
117
- */
118
- createBindings(): BindGroup[];
119
- }
120
-
121
- export default NodeBuilderState;
@@ -1,309 +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 Node from "../../../nodes/core/Node.js";
5
- import NodeFrame from "../../../nodes/core/NodeFrame.js";
6
- import ComputeNode from "../../../nodes/gpgpu/ComputeNode.js";
7
- import LightsNode from "../../../nodes/lighting/LightsNode.js";
8
- import { Scene } from "../../../scenes/Scene.js";
9
- import { Texture } from "../../../textures/Texture.js";
10
- import Backend from "../Backend.js";
11
- import ChainMap from "../ChainMap.js";
12
- import DataMap from "../DataMap.js";
13
- import Renderer from "../Renderer.js";
14
- import RenderObject from "../RenderObject.js";
15
- import NodeBuilderState from "./NodeBuilderState.js";
16
- import NodeUniformsGroup from "./NodeUniformsGroup.js";
17
-
18
- declare module "../../../scenes/Scene.js" {
19
- interface Scene {
20
- environmentNode?: Node<"vec3"> | null | undefined;
21
- backgroundNode?: Node | null | undefined;
22
- fogNode?: Node | null | undefined;
23
- }
24
- }
25
-
26
- /**
27
- * This renderer module manages node-related objects and is the
28
- * primary interface between the renderer and the node system.
29
- *
30
- * @private
31
- * @augments DataMap
32
- */
33
- declare class NodeManager extends DataMap {
34
- /**
35
- * Constructs a new nodes management component.
36
- *
37
- * @param {Renderer} renderer - The renderer.
38
- * @param {Backend} backend - The renderer's backend.
39
- */
40
- constructor(renderer: Renderer, backend: Backend);
41
- /**
42
- * The renderer.
43
- *
44
- * @type {Renderer}
45
- */
46
- renderer: Renderer;
47
- /**
48
- * The renderer's backend.
49
- *
50
- * @type {Backend}
51
- */
52
- backend: Backend;
53
- /**
54
- * The node frame.
55
- *
56
- * @type {Renderer}
57
- */
58
- nodeFrame: NodeFrame;
59
- /**
60
- * A cache for managing node builder states.
61
- *
62
- * @type {Map<number,NodeBuilderState>}
63
- */
64
- nodeBuilderCache: Map<number, NodeBuilderState>;
65
- /**
66
- * A cache for managing data cache key data.
67
- *
68
- * @type {ChainMap}
69
- */
70
- callHashCache: ChainMap;
71
- /**
72
- * A cache for managing node uniforms group data.
73
- *
74
- * @type {ChainMap}
75
- */
76
- groupsData: ChainMap;
77
- /**
78
- * Queue for pending async builds to limit concurrent compilation.
79
- *
80
- * @private
81
- * @type {Array<Function>}
82
- */
83
- private _buildQueue;
84
- /**
85
- * Whether an async build is currently in progress.
86
- *
87
- * @private
88
- * @type {boolean}
89
- */
90
- private _buildInProgress;
91
- /**
92
- * A cache for managing node objects of
93
- * scene properties like fog or environments.
94
- *
95
- * @type {Object<string,WeakMap>}
96
- */
97
- cacheLib: {
98
- [x: string]: WeakMap<object, Node | undefined>;
99
- };
100
- /**
101
- * Returns `true` if the given node uniforms group must be updated or not.
102
- *
103
- * @param {NodeUniformsGroup} nodeUniformsGroup - The node uniforms group.
104
- * @return {boolean} Whether the node uniforms group requires an update or not.
105
- */
106
- updateGroup(nodeUniformsGroup: NodeUniformsGroup): boolean;
107
- /**
108
- * Returns the cache key for the given render object.
109
- *
110
- * @param {RenderObject} renderObject - The render object.
111
- * @return {number} The cache key.
112
- */
113
- getForRenderCacheKey(renderObject: RenderObject): number;
114
- /**
115
- * Creates a node builder configured for the given render object and material.
116
- *
117
- * @private
118
- * @param {RenderObject} renderObject - The render object.
119
- * @param {Material} material - The material to use.
120
- * @return {NodeBuilder} The configured node builder.
121
- */
122
- private _createNodeBuilder;
123
- /**
124
- * Returns a node builder state for the given render object.
125
- *
126
- * @param {RenderObject} renderObject - The render object.
127
- * @param {boolean} [useAsync=false] - Whether to use async build with yielding.
128
- * @return {NodeBuilderState|Promise<NodeBuilderState>} The node builder state (or Promise if async).
129
- */
130
- getForRender(renderObject: RenderObject, useAsync?: boolean): NodeBuilderState | Promise<NodeBuilderState>;
131
- /**
132
- * Async version of getForRender() that yields to main thread during build.
133
- * Use this in compileAsync() to prevent blocking the main thread.
134
- *
135
- * @param {RenderObject} renderObject - The render object.
136
- * @return {Promise<NodeBuilderState>} A promise that resolves to the node builder state.
137
- */
138
- getForRenderAsync(renderObject: RenderObject): Promise<NodeBuilderState>;
139
- /**
140
- * Returns nodeBuilderState if ready, null if pending async build.
141
- * Queues async build on first call for cache miss.
142
- * Use this in render() path to enable non-blocking compilation.
143
- *
144
- * @param {RenderObject} renderObject - The render object.
145
- * @return {?NodeBuilderState} The node builder state, or null if still building.
146
- */
147
- getForRenderDeferred(renderObject: RenderObject): NodeBuilderState | null;
148
- /**
149
- * Processes the build queue one item at a time.
150
- * This ensures builds don't all run simultaneously and freeze the main thread.
151
- *
152
- * @private
153
- */
154
- private _processBuildQueue;
155
- /**
156
- * Deletes the given object from the internal data map
157
- *
158
- * @param {any} object - The object to delete.
159
- * @return {?Object} The deleted dictionary.
160
- */
161
- delete(object: unknown): unknown | null;
162
- /**
163
- * Returns a node builder state for the given compute node.
164
- *
165
- * @param {Node} computeNode - The compute node.
166
- * @return {NodeBuilderState} The node builder state.
167
- */
168
- getForCompute(computeNode: ComputeNode): NodeBuilderState;
169
- /**
170
- * Creates a node builder state for the given node builder.
171
- *
172
- * @private
173
- * @param {NodeBuilder} nodeBuilder - The node builder.
174
- * @return {NodeBuilderState} The node builder state.
175
- */
176
- private _createNodeBuilderState;
177
- /**
178
- * Returns an environment node for the current configured
179
- * scene environment.
180
- *
181
- * @param {Scene} scene - The scene.
182
- * @return {Node} A node representing the current scene environment.
183
- */
184
- getEnvironmentNode(scene: Scene): Node;
185
- /**
186
- * Returns a background node for the current configured
187
- * scene background.
188
- *
189
- * @param {Scene} scene - The scene.
190
- * @return {Node} A node representing the current scene background.
191
- */
192
- getBackgroundNode(scene: Scene): Node;
193
- /**
194
- * Returns a fog node for the current configured scene fog.
195
- *
196
- * @param {Scene} scene - The scene.
197
- * @return {Node} A node representing the current scene fog.
198
- */
199
- getFogNode(scene: Scene): Node;
200
- /**
201
- * Returns a cache key for the given scene and lights node.
202
- * This key is used by `RenderObject` as a part of the dynamic
203
- * cache key (a key that must be checked every time the render
204
- * objects is drawn).
205
- *
206
- * @param {Scene} scene - The scene.
207
- * @param {LightsNode} lightsNode - The lights node.
208
- * @return {number} The cache key.
209
- */
210
- getCacheKey(scene: Scene, lightsNode: LightsNode): number;
211
- /**
212
- * A boolean that indicates whether tone mapping should be enabled
213
- * or not.
214
- *
215
- * @type {boolean}
216
- */
217
- get isToneMappingState(): boolean;
218
- /**
219
- * If a scene background is configured, this method makes sure to
220
- * represent the background with a corresponding node-based implementation.
221
- *
222
- * @param {Scene} scene - The scene.
223
- */
224
- updateBackground(scene: Scene): void;
225
- /**
226
- * This method is part of the caching of nodes which are used to represents the
227
- * scene's background, fog or environment.
228
- *
229
- * @param {string} type - The type of object to cache.
230
- * @param {Object} object - The object.
231
- * @param {Function} callback - A callback that produces a node representation for the given object.
232
- * @param {boolean} [forceUpdate=false] - Whether an update should be enforced or not.
233
- * @return {Node} The node representation.
234
- */
235
- getCacheNode(type: string, object: object, callback: () => Node | undefined, forceUpdate?: boolean): Node;
236
- /**
237
- * If a scene fog is configured, this method makes sure to
238
- * represent the fog with a corresponding node-based implementation.
239
- *
240
- * @param {Scene} scene - The scene.
241
- */
242
- updateFog(scene: Scene): void;
243
- /**
244
- * If a scene environment is configured, this method makes sure to
245
- * represent the environment with a corresponding node-based implementation.
246
- *
247
- * @param {Scene} scene - The scene.
248
- */
249
- updateEnvironment(scene: Scene): void;
250
- getNodeFrame(
251
- renderer?: Renderer,
252
- scene?: Scene | null,
253
- object?: Object3D | null,
254
- camera?: Camera | null,
255
- material?: Material | null,
256
- ): NodeFrame;
257
- getNodeFrameForRender(renderObject: RenderObject): NodeFrame;
258
- /**
259
- * Returns the current output cache key.
260
- *
261
- * @return {string} The output cache key.
262
- */
263
- getOutputCacheKey(): string;
264
- /**
265
- * Returns a node that represents the output configuration (tone mapping and
266
- * color space) for the current target.
267
- *
268
- * @param {Texture} outputTarget - The output target.
269
- * @return {Node} The output node.
270
- */
271
- getOutputNode(outputTarget: Texture): Node;
272
- /**
273
- * Triggers the call of `updateBefore()` methods
274
- * for all nodes of the given render object.
275
- *
276
- * @param {RenderObject} renderObject - The render object.
277
- */
278
- updateBefore(renderObject: RenderObject): void;
279
- /**
280
- * Triggers the call of `updateAfter()` methods
281
- * for all nodes of the given render object.
282
- *
283
- * @param {RenderObject} renderObject - The render object.
284
- */
285
- updateAfter(renderObject: RenderObject): void;
286
- /**
287
- * Triggers the call of `update()` methods
288
- * for all nodes of the given compute node.
289
- *
290
- * @param {Node} computeNode - The compute node.
291
- */
292
- updateForCompute(computeNode: ComputeNode): void;
293
- /**
294
- * Triggers the call of `update()` methods
295
- * for all nodes of the given render object.
296
- *
297
- * @param {RenderObject} renderObject - The render object.
298
- */
299
- updateForRender(renderObject: RenderObject): void;
300
- /**
301
- * Returns `true` if the given render object requires a refresh.
302
- *
303
- * @param {RenderObject} renderObject - The render object.
304
- * @return {boolean} Whether the given render object requires a refresh or not.
305
- */
306
- needsRefresh(renderObject: RenderObject): boolean;
307
- }
308
-
309
- export default NodeManager;
@@ -1,29 +0,0 @@
1
- import TextureNode from "../../../nodes/accessors/TextureNode.js";
2
- import UniformGroupNode from "../../../nodes/core/UniformGroupNode.js";
3
- import { SampledTexture } from "../SampledTexture.js";
4
-
5
- type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only";
6
-
7
- declare class NodeSampledTexture extends SampledTexture {
8
- textureNode: TextureNode | undefined;
9
- groupNode: UniformGroupNode;
10
-
11
- access: "read-write" | "read-only" | "write-only";
12
-
13
- constructor(
14
- name: string,
15
- textureNode: TextureNode | undefined,
16
- groupNode: UniformGroupNode,
17
- access?: GPUStorageTextureAccess | null,
18
- );
19
- }
20
-
21
- declare class NodeSampledCubeTexture extends NodeSampledTexture {
22
- readonly isSampledCubeTexture: true;
23
- }
24
-
25
- declare class NodeSampledTexture3D extends NodeSampledTexture {
26
- readonly isSampledTexture3D: true;
27
- }
28
-
29
- export { NodeSampledCubeTexture, NodeSampledTexture, NodeSampledTexture3D };
@@ -1,12 +0,0 @@
1
- import TextureNode from "../../../nodes/accessors/TextureNode.js";
2
- import UniformGroupNode from "../../../nodes/core/UniformGroupNode.js";
3
- import Sampler from "../Sampler.js";
4
-
5
- declare class NodeSampler extends Sampler {
6
- textureNode: TextureNode | undefined;
7
- groupNode: UniformGroupNode;
8
- constructor(name: string, textureNode: TextureNode | undefined, groupNode: UniformGroupNode);
9
- update(): void;
10
- }
11
-
12
- export default NodeSampler;