@types/three 0.184.1 → 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 (205) 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/Matrix3.d.ts +9 -0
  90. three/src/math/Matrix4.d.ts +329 -105
  91. three/src/math/Vector3.d.ts +2 -2
  92. three/src/math/interpolants/BezierInterpolant.d.ts +19 -3
  93. three/src/math/interpolants/CubicInterpolant.d.ts +18 -3
  94. three/src/math/interpolants/DiscreteInterpolant.d.ts +8 -3
  95. three/src/math/interpolants/LinearInterpolant.d.ts +7 -3
  96. three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +7 -3
  97. three/src/nodes/Nodes.d.ts +4 -13
  98. three/src/nodes/TSL.d.ts +7 -5
  99. three/src/nodes/accessors/Batch.d.ts +19 -0
  100. three/src/nodes/accessors/Instance.d.ts +34 -0
  101. three/src/nodes/accessors/MaterialNode.d.ts +86 -79
  102. three/src/nodes/accessors/Morph.d.ts +11 -0
  103. three/src/nodes/accessors/Skinning.d.ts +23 -0
  104. three/src/nodes/accessors/StorageBufferNode.d.ts +22 -23
  105. three/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
  106. three/src/nodes/accessors/StorageTextureNode.d.ts +6 -4
  107. three/src/nodes/accessors/TextureNode.d.ts +15 -10
  108. three/src/nodes/core/ArrayNode.d.ts +16 -8
  109. three/src/nodes/core/ContextNode.d.ts +5 -6
  110. three/src/nodes/core/LightingModel.d.ts +2 -0
  111. three/src/nodes/core/Node.d.ts +50 -51
  112. three/src/nodes/core/NodeBuilder.d.ts +1 -133
  113. three/src/nodes/core/OverrideContextNode.d.ts +92 -0
  114. three/src/nodes/core/PropertyNode.d.ts +13 -2
  115. three/src/nodes/core/StructNode.d.ts +0 -2
  116. three/src/nodes/core/StructTypeNode.d.ts +5 -4
  117. three/src/nodes/core/UniformNode.d.ts +48 -9
  118. three/src/nodes/display/BlendModes.d.ts +72 -11
  119. three/src/nodes/display/FrontFacingNode.d.ts +62 -3
  120. three/src/nodes/display/PassNode.d.ts +0 -2
  121. three/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
  122. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +53 -45
  123. three/src/nodes/lighting/LightingContextNode.d.ts +9 -2
  124. three/src/nodes/lighting/LightsNode.d.ts +4 -4
  125. three/src/nodes/math/MathNode.d.ts +358 -304
  126. three/src/nodes/math/OperatorNode.d.ts +253 -82
  127. three/src/nodes/tsl/TSLCore.d.ts +16 -9
  128. three/src/nodes/utils/ArrayElementNode.d.ts +5 -4
  129. three/src/nodes/utils/EquirectUV.d.ts +31 -1
  130. three/src/nodes/utils/Packing.d.ts +50 -3
  131. three/src/nodes/utils/RTTNode.d.ts +7 -12
  132. three/src/nodes/utils/Remap.d.ts +216 -29
  133. three/src/nodes/utils/SampleNode.d.ts +18 -8
  134. three/src/objects/BatchedMesh.d.ts +1 -1
  135. three/src/objects/InstancedMesh.d.ts +0 -8
  136. three/src/objects/Skeleton.d.ts +0 -2
  137. three/src/renderers/common/Backend.d.ts +0 -3
  138. three/src/renderers/common/CanvasTarget.d.ts +0 -49
  139. three/src/renderers/common/ClippingContext.d.ts +6 -1
  140. three/src/renderers/common/CubeRenderTarget.d.ts +2 -1
  141. three/src/renderers/common/Info.d.ts +26 -66
  142. three/src/renderers/common/InspectorBase.d.ts +0 -7
  143. three/src/renderers/common/Lighting.d.ts +49 -5
  144. three/src/renderers/common/Renderer.d.ts +34 -458
  145. three/src/renderers/common/RendererUtils.d.ts +1 -2
  146. three/src/renderers/common/TimestampQueryPool.d.ts +1 -1
  147. three/src/renderers/common/XRManager.d.ts +32 -299
  148. three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -117
  149. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
  150. three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -1
  151. three/src/renderers/webgl/WebGLState.d.ts +2 -0
  152. three/src/renderers/webgl-fallback/WebGLBackend.d.ts +1 -1
  153. three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +0 -10
  154. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +0 -1
  155. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +5 -121
  156. three/src/textures/CubeDepthTexture.d.ts +2 -3
  157. three/src/textures/DataTexture.d.ts +2 -1
  158. three/src/textures/DepthTexture.d.ts +5 -5
  159. three/examples/jsm/lighting/TiledLighting.d.ts +0 -9
  160. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +0 -31
  161. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +0 -22
  162. three/src/nodes/accessors/BatchNode.d.ts +0 -12
  163. three/src/nodes/accessors/InstanceNode.d.ts +0 -30
  164. three/src/nodes/accessors/InstancedMeshNode.d.ts +0 -10
  165. three/src/nodes/accessors/MorphNode.d.ts +0 -14
  166. three/src/nodes/accessors/SkinningNode.d.ts +0 -32
  167. three/src/renderers/common/Animation.d.ts +0 -102
  168. three/src/renderers/common/Attributes.d.ts +0 -59
  169. three/src/renderers/common/Background.d.ts +0 -47
  170. three/src/renderers/common/BindGroup.d.ts +0 -39
  171. three/src/renderers/common/Binding.d.ts +0 -50
  172. three/src/renderers/common/Bindings.d.ts +0 -132
  173. three/src/renderers/common/Buffer.d.ts +0 -90
  174. three/src/renderers/common/ChainMap.d.ts +0 -49
  175. three/src/renderers/common/Color4.d.ts +0 -55
  176. three/src/renderers/common/ComputePipeline.d.ts +0 -34
  177. three/src/renderers/common/DataMap.d.ts +0 -42
  178. three/src/renderers/common/Geometries.d.ts +0 -111
  179. three/src/renderers/common/Pipeline.d.ts +0 -29
  180. three/src/renderers/common/Pipelines.d.ts +0 -186
  181. three/src/renderers/common/ProgrammableStage.d.ts +0 -73
  182. three/src/renderers/common/RenderBundle.d.ts +0 -25
  183. three/src/renderers/common/RenderBundles.d.ts +0 -34
  184. three/src/renderers/common/RenderContext.d.ts +0 -235
  185. three/src/renderers/common/RenderContexts.d.ts +0 -47
  186. three/src/renderers/common/RenderList.d.ts +0 -226
  187. three/src/renderers/common/RenderLists.d.ts +0 -46
  188. three/src/renderers/common/RenderObject.d.ts +0 -448
  189. three/src/renderers/common/RenderObjectPipeline.d.ts +0 -33
  190. three/src/renderers/common/RenderObjects.d.ts +0 -151
  191. three/src/renderers/common/SampledTexture.d.ts +0 -28
  192. three/src/renderers/common/Sampler.d.ts +0 -19
  193. three/src/renderers/common/Textures.d.ts +0 -125
  194. three/src/renderers/common/Uniform.d.ts +0 -262
  195. three/src/renderers/common/UniformBuffer.d.ts +0 -20
  196. three/src/renderers/common/UniformsGroup.d.ts +0 -152
  197. three/src/renderers/common/XRRenderTarget.d.ts +0 -67
  198. three/src/renderers/common/nodes/NodeBuilderState.d.ts +0 -121
  199. three/src/renderers/common/nodes/NodeManager.d.ts +0 -309
  200. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +0 -29
  201. three/src/renderers/common/nodes/NodeSampler.d.ts +0 -12
  202. three/src/renderers/common/nodes/NodeUniform.d.ts +0 -250
  203. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -41
  204. three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -6
  205. three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -6
@@ -1,125 +1,9 @@
1
- import CodeNode from "../../../nodes/code/CodeNode.js";
2
- import { NodeShaderStage } from "../../../nodes/core/constants.js";
1
+ import { Object3D } from "../../../core/Object3D.js";
3
2
  import NodeBuilder from "../../../nodes/core/NodeBuilder.js";
4
- import NodeUniform from "../../../nodes/core/NodeUniform.js";
5
- import NodeVar from "../../../nodes/core/NodeVar.js";
6
- import StructTypeNode from "../../../nodes/core/StructTypeNode.js";
7
- import { ShaderNode } from "../../../nodes/tsl/TSLCore.js";
8
- import { Texture } from "../../../textures/Texture.js";
9
- import NodeUniformsGroup from "../../common/nodes/NodeUniformsGroup.js";
3
+ import Renderer from "../../common/Renderer.js";
10
4
 
11
- type BuiltinStage = NodeShaderStage | "attribute" | "output";
12
- interface BuiltinType {
13
- name: string;
14
- property: string;
15
- type: string;
5
+ declare class WGSLNodeBuilder extends NodeBuilder {
6
+ constructor(object: Object3D, renderer: Renderer);
16
7
  }
17
8
 
18
- export default class WGSLNodeBuilder extends NodeBuilder {
19
- builtins: { [key in BuiltinStage]: Map<string, BuiltinType> };
20
- uniformGroups: { [key in NodeShaderStage]: NodeUniformsGroup };
21
-
22
- _generateTextureSample(
23
- texture: Texture,
24
- textureProperty: string,
25
- uvSnippet: string,
26
- depthSnippet: string | null,
27
- shaderStage: NodeShaderStage,
28
- ): string;
29
- _generateVideoSample(textureProperty: string, uvSnippet: string, shaderStage: NodeShaderStage): string;
30
- _generateTextureSampleLevel(
31
- texture: Texture,
32
- textureProperty: string,
33
- uvSnippet: string,
34
- levelSnippet: string,
35
- depthSnippet: string | null,
36
- shaderStage: NodeShaderStage,
37
- ): string;
38
- generateTextureLod(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string): string;
39
- generateTextureLoad(
40
- texture: Texture,
41
- textureProperty: string,
42
- uvIndexSnippet: string,
43
- depthSnippet: string | null,
44
- shaderStage: NodeShaderStage,
45
- ): string;
46
- generateTextureStore(
47
- texture: Texture,
48
- textureProperty: string,
49
- uvIndexSnippet: string,
50
- depthSnippet: string | null,
51
- valueSnippet: string,
52
- ): string;
53
- isUnfilterable(texture: Texture): boolean;
54
- generateTexture(
55
- texture: Texture,
56
- textureProperty: string,
57
- uvSnippet: string,
58
- depthSnippet: string | null,
59
- shaderStage: NodeShaderStage,
60
- ): string;
61
- generateTextureGrad(
62
- texture: Texture,
63
- textureProperty: string,
64
- uvSnippet: string,
65
- gradSnippet: string[],
66
- depthSnippet: string | null,
67
- shaderStage: NodeShaderStage,
68
- ): string;
69
- generateTextureCompare(
70
- texture: Texture,
71
- textureProperty: string,
72
- uvSnippet: string,
73
- compareSnippet: String,
74
- shaderStage: NodeShaderStage,
75
- ): string;
76
- generateTextureLevel(
77
- texture: Texture,
78
- textureProperty: string,
79
- uvSnippet: string,
80
- levelSnippet: string,
81
- depthSnippet: string | null,
82
- shaderStage: NodeShaderStage,
83
- ): string;
84
-
85
- getPropertyName(node: NodeVar | NodeUniform<unknown, unknown>, shaderStage: NodeShaderStage): string;
86
-
87
- getOutputStructName(): string;
88
-
89
- _getUniformGroupCount(shaderStage: NodeShaderStage): number;
90
-
91
- getFunctionOperator(op: string): string | null;
92
- // getStorageAccess(node: StorageTextureNode | StorageBufferNode): string;
93
-
94
- getBuiltin(name: string, property: string, type: string, shaderStage: BuiltinStage): string;
95
- getVertexIndex(): string;
96
- getInstanceIndex(): string;
97
- getDrawIndex(): null;
98
-
99
- buildFunctionCode(shaderNode: ShaderNode): string;
100
-
101
- getFragDepth(): string;
102
- getFragCoord(): string;
103
- getFrontFacing(): string;
104
-
105
- getBuiltins(shaderStage: BuiltinStage): string;
106
- getAttributes(shaderStage: NodeShaderStage): string;
107
-
108
- getStructMembers(struct: StructTypeNode): string;
109
- getStructs(shaderStage: NodeShaderStage): string;
110
-
111
- getVar(type: string, name: string): string;
112
- getVars(shaderStage: NodeShaderStage): string;
113
- getVaryings(shaderStage: NodeShaderStage): string;
114
- getUniforms(shaderStage: NodeShaderStage): string;
115
- buildCode(): void;
116
- getMethod(method: string, output?: string | null): string;
117
-
118
- _getWGSLMethod(method: string): CodeNode | string;
119
- _include(name: string): CodeNode;
120
- _getWGSLVertexCode(shaderData: { [key: string]: string }): string;
121
- _getWGSLFragmentCode(shaderData: { [key: string]: string }): string;
122
- _getWGSLComputeCode(shaderData: { [key: string]: string }, workgroupSize: string): string;
123
- _getWGSLStruct(name: string, vars: string): string;
124
- _getWGSLStructBinding(name: string, vars: string, access: string, binding: number, group: number): string;
125
- }
9
+ export default WGSLNodeBuilder;
@@ -6,10 +6,9 @@ import {
6
6
  TextureDataType,
7
7
  Wrapping,
8
8
  } from "../constants.js";
9
- import { DepthTextureImageData } from "./DepthTexture.js";
10
- import { Texture } from "./Texture.js";
9
+ import { DepthTexture, DepthTextureImageData } from "./DepthTexture.js";
11
10
 
12
- declare class CubeDepthTexture extends Texture<CubeDepthTextureImageData> {
11
+ declare class CubeDepthTexture extends DepthTexture<CubeDepthTextureImageData> {
13
12
  readonly isCubeDepthTexture: true;
14
13
  readonly isCubeTexture: true;
15
14
 
@@ -1,4 +1,5 @@
1
1
  import {
2
+ ColorSpace,
2
3
  MagnificationTextureFilter,
3
4
  Mapping,
4
5
  MinificationTextureFilter,
@@ -63,7 +64,7 @@ export class DataTexture extends Texture<DataTextureImageData> {
63
64
  magFilter?: MagnificationTextureFilter,
64
65
  minFilter?: MinificationTextureFilter,
65
66
  anisotropy?: number,
66
- colorSpace?: string,
67
+ colorSpace?: ColorSpace,
67
68
  );
68
69
 
69
70
  /**
@@ -15,7 +15,7 @@ import { Texture } from "./Texture.js";
15
15
  * @see {@link https://threejs.org/docs/index.html#api/en/textures/DepthTexture | Official Documentation}
16
16
  * @see {@link https://github.com/mrdoob/three.js/blob/master/src/textures/DepthTexture.js | Source}
17
17
  */
18
- export class DepthTexture extends Texture<DepthTextureImageData> {
18
+ export class DepthTexture<TImage = DepthTextureImageData> extends Texture<TImage> {
19
19
  /**
20
20
  * Create a new instance of {@link DepthTexture}
21
21
  * @param width Width of the texture.
@@ -31,8 +31,8 @@ export class DepthTexture extends Texture<DepthTextureImageData> {
31
31
  * @param {number} [depth=1] - The depth of the texture.
32
32
  */
33
33
  constructor(
34
- width: number,
35
- height: number,
34
+ width?: number,
35
+ height?: number,
36
36
  type?: TextureDataType,
37
37
  mapping?: Mapping,
38
38
  wrapS?: Wrapping,
@@ -99,7 +99,7 @@ export class DepthTexture extends Texture<DepthTextureImageData> {
99
99
  }
100
100
 
101
101
  export interface DepthTextureImageData {
102
- width: number;
103
- height: number;
102
+ width: number | undefined;
103
+ height: number | undefined;
104
104
  depth: number;
105
105
  }
@@ -1,9 +0,0 @@
1
- import { Lighting } from "three/webgpu";
2
- import { Light } from "../../../src/lights/Light.js";
3
- import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
4
-
5
- export class TiledLighting extends Lighting {
6
- constructor();
7
-
8
- createNode(lights?: Light[]): TiledLightsNode;
9
- }
@@ -1,31 +0,0 @@
1
- import { Node, TempNode, Vector2 } from "three/webgpu";
2
-
3
- export default class AnamorphicNode extends TempNode<"vec4"> {
4
- textureNode: Node;
5
- thresholdNode: Node;
6
- scaleNode: Node;
7
- samples: number;
8
- resolutionScale: number;
9
-
10
- constructor(textureNode: Node, thresholdNode: Node, scaleNode: Node, samples: number);
11
-
12
- getTextureNode(): Node;
13
-
14
- setSize(width: number, height: number): void;
15
-
16
- /**
17
- * @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
18
- */
19
- get resolution(): Vector2;
20
- /**
21
- * @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
22
- */
23
- set resolution(value: Vector2);
24
- }
25
-
26
- export const anamorphic: (
27
- node: Node,
28
- threshold?: Node,
29
- scale?: Node,
30
- samples?: Node | number,
31
- ) => AnamorphicNode;
@@ -1,22 +0,0 @@
1
- import { LightsNode, Node } from "three/webgpu";
2
-
3
- export const circleIntersectsAABB: (
4
- circleCenter: Node,
5
- radius: Node,
6
- minBounds: Node,
7
- maxBounds: Node,
8
- ) => Node;
9
-
10
- declare class TiledLightsNode extends LightsNode {
11
- constructor(maxLights?: number, tileSize?: number);
12
-
13
- updateLightsTexture(): void;
14
-
15
- getBlock(block?: number): Node<"ivec4">;
16
-
17
- setSize(width: number, height: number): this;
18
- }
19
-
20
- export default TiledLightsNode;
21
-
22
- export const tiledLights: (maxLights?: number, tileSize?: number) => TiledLightsNode;
@@ -1,12 +0,0 @@
1
- import { BatchedMesh } from "../../objects/BatchedMesh.js";
2
- import Node from "../core/Node.js";
3
-
4
- export default class BatchNode extends Node {
5
- batchMesh: BatchedMesh;
6
-
7
- batchingIdNode: Node | null;
8
-
9
- constructor(batchMesh: BatchedMesh);
10
- }
11
-
12
- export const batch: (batchMesh: BatchedMesh) => BatchNode;
@@ -1,30 +0,0 @@
1
- import { InstancedBufferAttribute } from "../../core/InstancedBufferAttribute.js";
2
- import { InstancedInterleavedBuffer } from "../../core/InstancedInterleavedBuffer.js";
3
- import StorageInstancedBufferAttribute from "../../renderers/common/StorageInstancedBufferAttribute.js";
4
- import Node from "../core/Node.js";
5
-
6
- export default class InstanceNode extends Node {
7
- count: number;
8
- instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute;
9
- instanceColor: InstancedBufferAttribute | StorageInstancedBufferAttribute | null;
10
-
11
- instanceMatrixNode: Node | null;
12
- instanceColorNode: Node | null;
13
-
14
- buffer: InstancedInterleavedBuffer | null;
15
- bufferColor: InstancedBufferAttribute | null;
16
-
17
- previousInstancedMatrixNode: Node | null;
18
-
19
- constructor(
20
- count: number,
21
- instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute,
22
- instanceColor?: InstancedBufferAttribute | StorageInstancedBufferAttribute | null,
23
- );
24
- }
25
-
26
- export const instance: (
27
- count: number,
28
- instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute,
29
- instanceColor?: InstancedBufferAttribute | StorageInstancedBufferAttribute | null,
30
- ) => InstanceNode;
@@ -1,10 +0,0 @@
1
- import { InstancedMesh } from "../../objects/InstancedMesh.js";
2
- import InstanceNode from "./InstanceNode.js";
3
-
4
- declare class InstancedMeshNode extends InstanceNode {
5
- constructor(instanceMesh: InstancedMesh);
6
- }
7
-
8
- export default InstancedMeshNode;
9
-
10
- export const instancedMesh: (instancedMesh: InstancedMesh) => InstancedMeshNode;
@@ -1,14 +0,0 @@
1
- import { Mesh } from "../../objects/Mesh.js";
2
- import Node from "../core/Node.js";
3
- import UniformNode from "../core/UniformNode.js";
4
-
5
- declare class MorphNode extends Node {
6
- mesh: Mesh;
7
- morphBaseInfluence: UniformNode<"float", number>;
8
-
9
- constructor(mesh: Mesh);
10
- }
11
-
12
- export default MorphNode;
13
-
14
- export const morphReference: (mesh: Mesh) => MorphNode;
@@ -1,32 +0,0 @@
1
- import { SkinnedMesh } from "../../objects/SkinnedMesh.js";
2
- import Node from "../core/Node.js";
3
- import NodeBuilder from "../core/NodeBuilder.js";
4
-
5
- export default class SkinningNode extends Node {
6
- skinnedMesh: SkinnedMesh;
7
-
8
- skinIndexNode: Node;
9
- skinWeightNode: Node;
10
-
11
- bindMatrixNode: Node;
12
- bindMatrixInverseNode: Node;
13
- boneMatricesNode: Node;
14
- positionNode: Node;
15
- toPositionNode: Node;
16
- previousBoneMatricesNode: Node | null;
17
-
18
- constructor(skinnedMesh: SkinnedMesh);
19
-
20
- getSkinnedPosition(boneMatrices?: Node, position?: Node): Node;
21
-
22
- getSkinnedNormalAndTangent(
23
- boneMatrices?: Node,
24
- normal?: Node,
25
- tangent?: Node,
26
- ): { skinNormal: Node; skinTangent: Node };
27
-
28
- getPreviousSkinnedPosition(builder: NodeBuilder): Node;
29
- }
30
-
31
- export const skinning: (skinnedMesh: SkinnedMesh) => SkinningNode;
32
- export const computeSkinning: (skinnedMesh: SkinnedMesh, toPosition?: Node | null) => SkinningNode;
@@ -1,102 +0,0 @@
1
- import Info from "./Info.js";
2
- import NodeManager from "./nodes/NodeManager.js";
3
- import Renderer from "./Renderer.js";
4
-
5
- export interface AnimationContext {
6
- requestAnimationFrame(callback: FrameRequestCallback, xrFrame?: XRFrame): number;
7
- cancelAnimationFrame(handle: number): void;
8
- }
9
-
10
- /**
11
- * This module manages the internal animation loop of the renderer.
12
- *
13
- * @private
14
- */
15
- declare class Animation {
16
- /**
17
- * Constructs a new animation loop management component.
18
- *
19
- * @param {Renderer} renderer - A reference to the main renderer.
20
- * @param {NodeManager} nodes - Renderer component for managing nodes related logic.
21
- * @param {Info} info - Renderer component for managing metrics and monitoring data.
22
- */
23
- constructor(renderer: Renderer, nodes: NodeManager, info: Info);
24
- /**
25
- * A reference to the main renderer.
26
- *
27
- * @type {Renderer}
28
- */
29
- renderer: Renderer;
30
- /**
31
- * Renderer component for managing nodes related logic.
32
- *
33
- * @type {NodeManager}
34
- */
35
- nodes: NodeManager;
36
- /**
37
- * Renderer component for managing metrics and monitoring data.
38
- *
39
- * @type {Info}
40
- */
41
- info: Info;
42
- /**
43
- * A reference to the context from `requestAnimationFrame()` can
44
- * be called (usually `window`).
45
- *
46
- * @type {?(Window|XRSession)}
47
- */
48
- _context: AnimationContext | null;
49
- /**
50
- * The user-defined animation loop.
51
- *
52
- * @type {?Function}
53
- * @default null
54
- */
55
- _animationLoop: ((time: DOMHighResTimeStamp, xrFrame?: XRFrame) => void) | null;
56
- /**
57
- * The requestId which is returned from the `requestAnimationFrame()` call.
58
- * Can be used to cancel the stop the animation loop.
59
- *
60
- * @type {?number}
61
- * @default null
62
- */
63
- _requestId: number | null;
64
- /**
65
- * Starts the internal animation loop.
66
- */
67
- start(): void;
68
- /**
69
- * Stops the internal animation loop.
70
- */
71
- stop(): void;
72
- /**
73
- * Returns the user-level animation loop.
74
- *
75
- * @return {?Function} The animation loop.
76
- */
77
- getAnimationLoop(): ((time: DOMHighResTimeStamp, xrFrame?: XRFrame) => void) | null;
78
- /**
79
- * Defines the user-level animation loop.
80
- *
81
- * @param {?Function} callback - The animation loop.
82
- */
83
- setAnimationLoop(callback: ((time: DOMHighResTimeStamp, xrFrame?: XRFrame) => void) | null): void;
84
- /**
85
- * Returns the animation context.
86
- *
87
- * @return {Window|XRSession} The animation context.
88
- */
89
- getContext(): AnimationContext;
90
- /**
91
- * Defines the context in which `requestAnimationFrame()` is executed.
92
- *
93
- * @param {Window|XRSession} context - The context to set.
94
- */
95
- setContext(context: AnimationContext): void;
96
- /**
97
- * Frees all internal resources and stops the animation loop.
98
- */
99
- dispose(): void;
100
- }
101
-
102
- export default Animation;
@@ -1,59 +0,0 @@
1
- import { BufferAttribute } from "../../core/BufferAttribute.js";
2
- import { InterleavedBuffer } from "../../core/InterleavedBuffer.js";
3
- import { InterleavedBufferAttribute } from "../../core/InterleavedBufferAttribute.js";
4
- import Backend from "./Backend.js";
5
- import DataMap from "./DataMap.js";
6
- import Info from "./Info.js";
7
-
8
- /**
9
- * This renderer module manages geometry attributes.
10
- *
11
- * @private
12
- * @augments DataMap
13
- */
14
- declare class Attributes extends DataMap {
15
- /**
16
- * Constructs a new attribute management component.
17
- *
18
- * @param {Backend} backend - The renderer's backend.
19
- * @param {Info} info - Renderer component for managing metrics and monitoring data.
20
- */
21
- constructor(backend: Backend, info: Info);
22
- /**
23
- * The renderer's backend.
24
- *
25
- * @type {Backend}
26
- */
27
- backend: Backend;
28
- /**
29
- * Renderer component for managing metrics and monitoring data.
30
- *
31
- * @type {Info}
32
- */
33
- info: Info;
34
- /**
35
- * Deletes the data for the given attribute.
36
- *
37
- * @param {BufferAttribute} attribute - The attribute.
38
- * @return {?Object} The deleted attribute data.
39
- */
40
- delete(attribute: BufferAttribute | InterleavedBufferAttribute): unknown;
41
- /**
42
- * Updates the given attribute. This method creates attribute buffers
43
- * for new attributes and updates data for existing ones.
44
- *
45
- * @param {BufferAttribute} attribute - The attribute to update.
46
- * @param {number} type - The attribute type.
47
- */
48
- update(attribute: BufferAttribute | InterleavedBufferAttribute, type: number): void;
49
- /**
50
- * Utility method for handling interleaved buffer attributes correctly.
51
- * To process them, their `InterleavedBuffer` is returned.
52
- *
53
- * @param {BufferAttribute} attribute - The attribute.
54
- * @return {BufferAttribute|InterleavedBuffer}
55
- */
56
- _getBufferAttribute(attribute: BufferAttribute | InterleavedBufferAttribute): BufferAttribute | InterleavedBuffer;
57
- }
58
-
59
- export default Attributes;
@@ -1,47 +0,0 @@
1
- import { Scene } from "../../scenes/Scene.js";
2
- import DataMap from "./DataMap.js";
3
- import NodeManager from "./nodes/NodeManager.js";
4
- import RenderContext from "./RenderContext.js";
5
- import Renderer from "./Renderer.js";
6
- import RenderList from "./RenderList.js";
7
-
8
- /**
9
- * This renderer module manages the background.
10
- *
11
- * @private
12
- * @augments DataMap
13
- */
14
- declare class Background extends DataMap {
15
- /**
16
- * Constructs a new background management component.
17
- *
18
- * @param {Renderer} renderer - The renderer.
19
- * @param {NodeManager} nodes - Renderer component for managing nodes related logic.
20
- */
21
- constructor(renderer: Renderer, nodes: NodeManager);
22
- /**
23
- * The renderer.
24
- *
25
- * @type {Renderer}
26
- */
27
- renderer: Renderer;
28
- /**
29
- * Renderer component for managing nodes related logic.
30
- *
31
- * @type {NodeManager}
32
- */
33
- nodes: NodeManager;
34
- /**
35
- * Updates the background for the given scene. Depending on how `Scene.background`
36
- * or `Scene.backgroundNode` are configured, this method might configure a simple clear
37
- * or add a mesh to the render list for rendering the background as a textured plane
38
- * or skybox.
39
- *
40
- * @param {Scene} scene - The scene.
41
- * @param {RenderList} renderList - The current render list.
42
- * @param {RenderContext} renderContext - The current render context.
43
- */
44
- update(scene: Scene, renderList: RenderList, renderContext: RenderContext): void;
45
- }
46
-
47
- export default Background;
@@ -1,39 +0,0 @@
1
- import Binding from "./Binding.js";
2
-
3
- /**
4
- * A bind group represents a collection of bindings and thus a collection
5
- * or resources. Bind groups are assigned to pipelines to provide them
6
- * with the required resources (like uniform buffers or textures).
7
- *
8
- * @private
9
- */
10
- declare class BindGroup {
11
- /**
12
- * Constructs a new bind group.
13
- *
14
- * @param {string} name - The bind group's name.
15
- * @param {Array<Binding>} bindings - An array of bindings.
16
- * @param {number} index - The group index.
17
- */
18
- constructor(name?: string, bindings?: Binding[], index?: number);
19
- /**
20
- * The bind group's name.
21
- *
22
- * @type {string}
23
- */
24
- name: string;
25
- /**
26
- * An array of bindings.
27
- *
28
- * @type {Array<Binding>}
29
- */
30
- bindings: Binding[];
31
- /**
32
- * The group's ID.
33
- *
34
- * @type {number}
35
- */
36
- id: number;
37
- }
38
-
39
- export default BindGroup;
@@ -1,50 +0,0 @@
1
- /**
2
- * A binding represents the connection between a resource (like a texture, sampler
3
- * or uniform buffer) and the resource definition in a shader stage.
4
- *
5
- * This module is an abstract base class for all concrete bindings types.
6
- *
7
- * @abstract
8
- * @private
9
- */
10
- declare class Binding {
11
- /**
12
- * Constructs a new binding.
13
- *
14
- * @param {string} [name=''] - The binding's name.
15
- */
16
- constructor(name?: string);
17
- /**
18
- * The binding's name.
19
- *
20
- * @type {string}
21
- */
22
- name: string;
23
- /**
24
- * A bitmask that defines in what shader stages the
25
- * binding's resource is accessible.
26
- *
27
- * @type {number}
28
- */
29
- visibility: number;
30
- /**
31
- * Makes sure binding's resource is visible for the given shader stage.
32
- *
33
- * @param {number} visibility - The shader stage.
34
- */
35
- setVisibility(visibility: number): void;
36
- /**
37
- * The shader stages in which the binding's resource is visible.
38
- *
39
- * @return {number} The visibility bitmask.
40
- */
41
- getVisibility(): number;
42
- /**
43
- * Clones the binding.
44
- *
45
- * @return {Binding} The cloned binding.
46
- */
47
- clone(): Binding;
48
- }
49
-
50
- export default Binding;