@types/three 0.162.0 → 0.164.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 (98) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/animation/CCDIKSolver.d.ts +19 -6
  3. three/examples/jsm/controls/OrbitControls.d.ts +1 -1
  4. three/examples/jsm/exporters/USDZExporter.d.ts +8 -1
  5. three/examples/jsm/geometries/TextGeometry.d.ts +8 -0
  6. three/examples/jsm/interactive/SelectionBox.d.ts +1 -0
  7. three/examples/jsm/loaders/FontLoader.d.ts +18 -4
  8. three/examples/jsm/loaders/LUT3dlLoader.d.ts +1 -2
  9. three/examples/jsm/loaders/LUTCubeLoader.d.ts +1 -2
  10. three/examples/jsm/loaders/RGBMLoader.d.ts +5 -0
  11. three/examples/jsm/loaders/TTFLoader.d.ts +5 -3
  12. three/examples/jsm/math/Octree.d.ts +2 -1
  13. three/examples/jsm/nodes/Nodes.d.ts +33 -5
  14. three/examples/jsm/nodes/accessors/AccessorsUtils.d.ts +2 -0
  15. three/examples/jsm/nodes/accessors/BatchNode.d.ts +14 -0
  16. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +2 -1
  17. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +84 -1
  18. three/examples/jsm/nodes/accessors/RendererReferenceNode.d.ts +16 -0
  19. three/examples/jsm/nodes/accessors/TextureNode.d.ts +11 -1
  20. three/examples/jsm/nodes/code/CodeNode.d.ts +7 -2
  21. three/examples/jsm/nodes/code/FunctionNode.d.ts +10 -4
  22. three/examples/jsm/nodes/core/LightingModel.d.ts +1 -0
  23. three/examples/jsm/nodes/core/Node.d.ts +7 -3
  24. three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -1
  25. three/examples/jsm/nodes/core/NodeUtils.d.ts +1 -1
  26. three/examples/jsm/nodes/core/OutputStructNode.d.ts +12 -0
  27. three/examples/jsm/nodes/core/PropertyNode.d.ts +10 -0
  28. three/examples/jsm/nodes/display/PassNode.d.ts +2 -0
  29. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +12 -0
  30. three/examples/jsm/nodes/fog/FogNode.d.ts +10 -5
  31. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +9 -5
  32. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +3 -1
  33. three/examples/jsm/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +10 -0
  34. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +7 -2
  35. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +16 -0
  36. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +10 -2
  37. three/examples/jsm/nodes/functions/ShadowMaskModel.d.ts +9 -0
  38. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +3 -2
  39. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +3 -2
  40. three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +0 -2
  41. three/examples/jsm/nodes/lighting/IrradianceNode.d.ts +8 -0
  42. three/examples/jsm/nodes/lighting/LightUtils.d.ts +7 -2
  43. three/examples/jsm/nodes/materials/Materials.d.ts +2 -0
  44. three/examples/jsm/nodes/materials/MeshNormalNodeMaterial.d.ts +23 -0
  45. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +24 -14
  46. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +9 -2
  47. three/examples/jsm/nodes/materials/ShadowNodeMaterial.d.ts +15 -0
  48. three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +36 -32
  49. three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +3 -4
  50. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +127 -6
  51. three/examples/jsm/nodes/materialx/lib/mx_transform_color.d.ts +4 -0
  52. three/examples/jsm/nodes/pmrem/PMREMNode.d.ts +20 -0
  53. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +6 -3
  54. three/examples/jsm/objects/QuadMesh.d.ts +5 -8
  55. three/examples/jsm/physics/JoltPhysics.d.ts +10 -0
  56. three/examples/jsm/postprocessing/RenderTransitionPass.d.ts +33 -0
  57. three/examples/jsm/renderers/common/Info.d.ts +3 -7
  58. three/examples/jsm/renderers/common/PostProcessing.d.ts +3 -1
  59. three/examples/jsm/renderers/common/Renderer.d.ts +11 -5
  60. three/examples/jsm/renderers/common/extras/PMREMGenerator.d.ts +8 -0
  61. three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +4 -0
  62. three/examples/jsm/utils/SceneUtils.d.ts +18 -0
  63. three/examples/jsm/webxr/OculusHandModel.d.ts +5 -2
  64. three/examples/jsm/webxr/XRHandModelFactory.d.ts +8 -2
  65. three/index.d.ts +1 -1
  66. three/package.json +4 -4
  67. three/src/Three.d.ts +0 -1
  68. three/src/cameras/Camera.d.ts +3 -0
  69. three/src/constants.d.ts +10 -40
  70. three/src/core/Object3D.d.ts +6 -5
  71. three/src/core/RenderTarget.d.ts +25 -10
  72. three/src/materials/Material.d.ts +46 -23
  73. three/src/materials/MeshPhysicalMaterial.d.ts +65 -51
  74. three/src/materials/ShaderMaterial.d.ts +2 -17
  75. three/src/objects/BatchedMesh.d.ts +11 -1
  76. three/src/objects/InstancedMesh.d.ts +1 -1
  77. three/src/objects/SkinnedMesh.d.ts +0 -2
  78. three/src/renderers/WebGLRenderer.d.ts +2 -2
  79. three/src/renderers/shaders/ShaderChunk.d.ts +0 -1
  80. three/src/renderers/webgl/WebGLAttributes.d.ts +1 -2
  81. three/src/renderers/webgl/WebGLBindingStates.d.ts +1 -8
  82. three/src/renderers/webgl/WebGLBufferRenderer.d.ts +6 -3
  83. three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -6
  84. three/src/renderers/webgl/WebGLExtensions.d.ts +1 -3
  85. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +7 -1
  86. three/src/renderers/webgl/WebGLLights.d.ts +1 -2
  87. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -9
  88. three/src/renderers/webgl/WebGLState.d.ts +1 -3
  89. three/src/renderers/webgl/WebGLUtils.d.ts +0 -2
  90. three/src/scenes/Scene.d.ts +6 -0
  91. three/src/textures/Data3DTexture.d.ts +0 -1
  92. three/src/textures/DataArrayTexture.d.ts +0 -1
  93. three/src/textures/DepthTexture.d.ts +0 -3
  94. three/src/textures/Texture.d.ts +13 -7
  95. three/src/textures/types.d.ts +4 -4
  96. three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +0 -12
  97. three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +0 -3
  98. three/src/renderers/WebGL1Renderer.d.ts +0 -6
@@ -22,8 +22,6 @@ import { WebGLLightsState } from "./WebGLLights.js";
22
22
  import { WebGLProgram } from "./WebGLProgram.js";
23
23
 
24
24
  export interface WebGLProgramParameters {
25
- isWebGL2: boolean;
26
-
27
25
  shaderID: string;
28
26
  shaderType: string;
29
27
  shaderName: string;
@@ -75,6 +73,8 @@ export interface WebGLProgramParameters {
75
73
  clearcoatNormalMap: boolean;
76
74
  clearcoatRoughnessMap: boolean;
77
75
 
76
+ dispersion: boolean;
77
+
78
78
  iridescence: boolean;
79
79
  iridescenceMap: boolean;
80
80
  iridescenceThicknessMap: boolean;
@@ -200,16 +200,9 @@ export interface WebGLProgramParameters {
200
200
 
201
201
  index0AttributeName: string | undefined;
202
202
 
203
- extensionDerivatives: boolean;
204
- extensionFragDepth: boolean;
205
- extensionDrawBuffers: boolean;
206
- extensionShaderTextureLOD: boolean;
207
203
  extensionClipCullDistance: boolean;
208
204
  extensionMultiDraw: boolean;
209
205
 
210
- rendererExtensionFragDepth: boolean;
211
- rendererExtensionDrawBuffers: boolean;
212
- rendererExtensionShaderTextureLod: boolean;
213
206
  rendererExtensionParallelShaderCompile: boolean;
214
207
 
215
208
  customProgramCacheKey: string;
@@ -9,8 +9,6 @@ import {
9
9
  import { Material } from "../../materials/Material.js";
10
10
  import { Vector4 } from "../../math/Vector4.js";
11
11
  import { WebGLRenderTarget } from "../WebGLRenderTarget.js";
12
- import { WebGLCapabilities } from "./WebGLCapabilities.js";
13
- import { WebGLExtensions } from "./WebGLExtensions.js";
14
12
 
15
13
  export class WebGLColorBuffer {
16
14
  constructor();
@@ -45,7 +43,7 @@ export class WebGLStencilBuffer {
45
43
  }
46
44
 
47
45
  export class WebGLState {
48
- constructor(gl: WebGLRenderingContext, extensions: WebGLExtensions, capabilities: WebGLCapabilities);
46
+ constructor(gl: WebGLRenderingContext);
49
47
 
50
48
  buffers: {
51
49
  color: WebGLColorBuffer;
@@ -1,12 +1,10 @@
1
1
  import { ColorSpace, CompressedPixelFormat, PixelFormat, TextureDataType } from "../../constants.js";
2
- import { WebGLCapabilities } from "./WebGLCapabilities.js";
3
2
  import { WebGLExtensions } from "./WebGLExtensions.js";
4
3
 
5
4
  export class WebGLUtils {
6
5
  constructor(
7
6
  gl: WebGLRenderingContext | WebGL2RenderingContext,
8
7
  extensions: WebGLExtensions,
9
- capabilities: WebGLCapabilities,
10
8
  );
11
9
 
12
10
  convert(p: PixelFormat | CompressedPixelFormat | TextureDataType, colorSpace?: ColorSpace): number | null;
@@ -82,6 +82,12 @@ export class Scene extends Object3D {
82
82
  */
83
83
  environment: Texture | null;
84
84
 
85
+ /**
86
+ * Attenuates the color of the environment. Only influences environment maps assigned to {@link Scene.environment}.
87
+ * @default 1
88
+ */
89
+ environmentIntensity: number;
90
+
85
91
  /**
86
92
  * The rotation of the environment map in radians. Only influences physical materials in the scene when
87
93
  * {@link .environment} is used. Default is `(0,0,0)`.
@@ -4,7 +4,6 @@ import { Texture3DImageData } from "./types.js";
4
4
 
5
5
  /**
6
6
  * Creates a three-dimensional texture from raw data, with parameters to divide it into width, height, and depth
7
- * @remarks Compatible only with {@link WebGL2RenderingContext | WebGL 2 Rendering Context}.
8
7
  * @example
9
8
  * ```typescript
10
9
  * This creates a[name] with repeating data, 0 to 255
@@ -4,7 +4,6 @@ import { Texture3DImageData } from "./types.js";
4
4
 
5
5
  /**
6
6
  * Creates an array of textures directly from raw data, width and height and depth
7
- * @remarks Compatible only with {@link WebGL2RenderingContext | WebGL 2 Rendering Context}.
8
7
  * @example
9
8
  * ```typescript
10
9
  * This creates a[name] where each texture has a different color.
@@ -11,9 +11,6 @@ import { Texture } from "./Texture.js";
11
11
 
12
12
  /**
13
13
  * This class can be used to automatically save the depth information of a rendering into a texture
14
- * @remarks
15
- * When using a **WebGL1** rendering context, {@link DepthTexture} requires support for the
16
- * {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ | WEBGL_depth_texture} extension.
17
14
  * @see Example: {@link https://threejs.org/examples/#webgl_depth_texture | depth / texture}
18
15
  * @see {@link https://threejs.org/docs/index.html#api/en/textures/DepthTexture | Official Documentation}
19
16
  * @see {@link https://github.com/mrdoob/three.js/blob/master/src/textures/DepthTexture.js | Source}
@@ -339,13 +339,6 @@ export class Texture extends EventDispatcher<{ dispose: {} }> {
339
339
  */
340
340
  isRenderTargetTexture: boolean;
341
341
 
342
- /**
343
- * Indicates whether this texture should be processed by {@link THREE.PMREMGenerator} or not.
344
- * @remarks Only relevant for render target textures.
345
- * @defaultValue `false`
346
- */
347
- needsPMREMUpdate: boolean;
348
-
349
342
  /**
350
343
  * An object that can be used to store custom data about the texture.
351
344
  * @remarks It should not hold references to functions as these will not be cloned.
@@ -360,11 +353,24 @@ export class Texture extends EventDispatcher<{ dispose: {} }> {
360
353
  */
361
354
  version: number;
362
355
 
356
+ /**
357
+ * Indicates whether this texture should be processed by PMREMGenerator or not (only relevant for render target
358
+ * textures)
359
+ */
360
+ pmremVersion: number;
361
+
363
362
  /**
364
363
  * Set this to `true` to trigger an update next time the texture is used. Particularly important for setting the wrap mode.
365
364
  */
366
365
  set needsUpdate(value: boolean);
367
366
 
367
+ /**
368
+ * Indicates whether this texture should be processed by {@link THREE.PMREMGenerator} or not.
369
+ * @remarks Only relevant for render target textures.
370
+ * @defaultValue `false`
371
+ */
372
+ set needsPMREMUpdate(value: boolean);
373
+
368
374
  /**
369
375
  * The Global default value for {@link anisotropy | .anisotropy}.
370
376
  * @defaultValue `1`.
@@ -1,9 +1,9 @@
1
1
  export interface TextureImageData {
2
- readonly data: Uint8ClampedArray;
3
- readonly height: number;
4
- readonly width: number;
2
+ data: Uint8Array | Uint8ClampedArray;
3
+ height: number;
4
+ width: number;
5
5
  }
6
6
 
7
7
  export interface Texture3DImageData extends TextureImageData {
8
- readonly depth: number;
8
+ depth: number;
9
9
  }
@@ -1,12 +0,0 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import Node from "../core/Node.js";
3
- import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
4
-
5
- export default class SpecularMIPLevelNode extends Node {
6
- textureNode: TextureNode;
7
- roughnessNode: Node | null;
8
-
9
- constructor(textureNode: TextureNode, roughnessNode?: Node | null);
10
- }
11
-
12
- export const specularMIPLevel: () => ShaderNodeObject<SpecularMIPLevelNode>;
@@ -1,3 +0,0 @@
1
- import { NodeFrame } from "../../../nodes/Nodes.js";
2
-
3
- export const nodeFrame: NodeFrame;
@@ -1,6 +0,0 @@
1
- import { WebGLRenderer, WebGLRendererParameters } from "./WebGLRenderer.js";
2
-
3
- export class WebGL1Renderer extends WebGLRenderer {
4
- constructor(parameters?: WebGLRendererParameters);
5
- readonly isWebGL1Renderer: true;
6
- }