@types/three 0.179.0 → 0.180.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 (94) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +1 -1
  3. three/examples/jsm/controls/DragControls.d.ts +0 -30
  4. three/examples/jsm/controls/PointerLockControls.d.ts +0 -5
  5. three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
  6. three/examples/jsm/exporters/EXRExporter.d.ts +2 -2
  7. three/examples/jsm/exporters/KTX2Exporter.d.ts +2 -2
  8. three/examples/jsm/exporters/STLExporter.d.ts +2 -2
  9. three/examples/jsm/exporters/USDZExporter.d.ts +2 -2
  10. three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +2 -2
  11. three/examples/jsm/loaders/HDRLoader.d.ts +22 -0
  12. three/examples/jsm/loaders/LDrawLoader.d.ts +5 -1
  13. three/examples/jsm/loaders/RGBELoader.d.ts +9 -15
  14. three/examples/jsm/materials/WoodNodeMaterial.d.ts +75 -0
  15. three/examples/jsm/math/ColorSpaces.d.ts +4 -0
  16. three/examples/jsm/postprocessing/SSRPass.d.ts +6 -29
  17. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +10 -1
  18. three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +14 -8
  19. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +26 -6
  20. three/examples/jsm/tsl/display/SSRNode.d.ts +8 -3
  21. three/examples/jsm/tsl/display/boxBlur.d.ts +11 -0
  22. three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
  23. three/package.json +2 -2
  24. three/src/Three.Core.d.ts +1 -0
  25. three/src/Three.TSL.d.ts +29 -4
  26. three/src/animation/AnimationClip.d.ts +5 -0
  27. three/src/constants.d.ts +3 -1
  28. three/src/materials/LineBasicMaterial.d.ts +1 -0
  29. three/src/materials/LineDashedMaterial.d.ts +1 -0
  30. three/src/materials/MeshBasicMaterial.d.ts +1 -0
  31. three/src/materials/MeshDepthMaterial.d.ts +1 -0
  32. three/src/materials/MeshDistanceMaterial.d.ts +2 -1
  33. three/src/materials/MeshLambertMaterial.d.ts +1 -0
  34. three/src/materials/MeshMatcapMaterial.d.ts +1 -0
  35. three/src/materials/MeshNormalMaterial.d.ts +1 -0
  36. three/src/materials/MeshPhongMaterial.d.ts +1 -0
  37. three/src/materials/MeshToonMaterial.d.ts +1 -0
  38. three/src/materials/PointsMaterial.d.ts +1 -0
  39. three/src/materials/ShaderMaterial.d.ts +1 -0
  40. three/src/materials/ShadowMaterial.d.ts +1 -0
  41. three/src/materials/SpriteMaterial.d.ts +1 -0
  42. three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -0
  43. three/src/materials/nodes/LineBasicNodeMaterial.d.ts +1 -0
  44. three/src/materials/nodes/LineDashedNodeMaterial.d.ts +1 -0
  45. three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -0
  46. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +1 -0
  47. three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +1 -0
  48. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +1 -0
  49. three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +1 -0
  50. three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +1 -0
  51. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -0
  52. three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +1 -0
  53. three/src/materials/nodes/MeshToonNodeMaterial.d.ts +1 -0
  54. three/src/materials/nodes/NodeMaterial.d.ts +1 -0
  55. three/src/materials/nodes/PointsNodeMaterial.d.ts +17 -0
  56. three/src/materials/nodes/ShadowNodeMaterial.d.ts +1 -0
  57. three/src/materials/nodes/SpriteNodeMaterial.d.ts +1 -0
  58. three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -0
  59. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +1 -1
  60. three/src/math/ColorManagement.d.ts +1 -1
  61. three/src/nodes/Nodes.d.ts +3 -0
  62. three/src/nodes/TSL.d.ts +3 -0
  63. three/src/nodes/accessors/Camera.d.ts +2 -0
  64. three/src/nodes/accessors/TextureNode.d.ts +2 -0
  65. three/src/nodes/core/ContextNode.d.ts +4 -0
  66. three/src/nodes/core/Node.d.ts +4 -11
  67. three/src/nodes/core/UniformNode.d.ts +4 -4
  68. three/src/nodes/core/VarNode.d.ts +0 -14
  69. three/src/nodes/display/ScreenNode.d.ts +4 -1
  70. three/src/nodes/display/ToneMappingNode.d.ts +2 -2
  71. three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -0
  72. three/src/nodes/display/ViewportSharedTextureNode.d.ts +3 -0
  73. three/src/nodes/display/ViewportTextureNode.d.ts +4 -0
  74. three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +100 -0
  75. three/src/nodes/math/BitcastNode.d.ts +25 -0
  76. three/src/nodes/math/MathNode.d.ts +0 -3
  77. three/src/nodes/utils/ReflectorNode.d.ts +16 -1
  78. three/src/nodes/utils/SampleNode.d.ts +3 -2
  79. three/src/nodes/utils/Timer.d.ts +0 -15
  80. three/src/objects/InstancedMesh.d.ts +2 -3
  81. three/src/renderers/WebGLRenderer.d.ts +0 -25
  82. three/src/renderers/common/Attributes.d.ts +1 -1
  83. three/src/renderers/common/Renderer.d.ts +3 -3
  84. three/src/renderers/common/Textures.d.ts +1 -1
  85. three/src/renderers/common/TimestampQueryPool.d.ts +3 -4
  86. three/src/renderers/common/XRManager.d.ts +10 -0
  87. three/src/renderers/common/nodes/NodeLibrary.d.ts +5 -5
  88. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
  89. three/src/textures/CompressedTexture.d.ts +4 -4
  90. three/src/textures/Data3DTexture.d.ts +2 -1
  91. three/src/textures/DataTexture.d.ts +3 -2
  92. three/src/textures/ExternalTexture.d.ts +2 -2
  93. three/src/textures/Texture.d.ts +1 -1
  94. three/examples/jsm/loaders/RGBMLoader.d.ts +0 -37
three/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 04 Aug 2025 15:38:34 GMT
11
+ * Last updated: Wed, 03 Sep 2025 18:38:35 GMT
12
12
  * Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
13
13
 
14
14
  # Credits
@@ -89,6 +89,7 @@ export * from "./loaders/FontLoader.js";
89
89
  export * from "./loaders/GCodeLoader.js";
90
90
  export * from "./loaders/GLTFLoader.js";
91
91
  export * from "./loaders/HDRCubeTextureLoader.js";
92
+ export * from "./loaders/HDRLoader.js";
92
93
  export * from "./loaders/IESLoader.js";
93
94
  export * from "./loaders/KMZLoader.js";
94
95
  export * from "./loaders/KTX2Loader.js";
@@ -108,7 +109,6 @@ export * from "./loaders/PDBLoader.js";
108
109
  export * from "./loaders/PLYLoader.js";
109
110
  export * from "./loaders/PVRLoader.js";
110
111
  export * from "./loaders/RGBELoader.js";
111
- export * from "./loaders/RGBMLoader.js";
112
112
  export * from "./loaders/STLLoader.js";
113
113
  export * from "./loaders/SVGLoader.js";
114
114
  export * from "./loaders/TDSLoader.js";
@@ -76,36 +76,6 @@ declare class DragControls extends Controls<DragControlsEventMap> {
76
76
  * @param domElement The HTML element used for event listeners. (optional)
77
77
  */
78
78
  constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | null);
79
-
80
- /**
81
- * Returns the internal {@link Raycaster} instance that is used for intersection tests.
82
- * @deprecated getRaycaster() has been deprecated. Use controls.raycaster instead.
83
- */
84
- getRaycaster(): Raycaster;
85
-
86
- /**
87
- * Sets an array of draggable objects by overwriting the existing one.
88
- * @deprecated setObjects() has been deprecated. Use controls.objects instead.
89
- */
90
- setObjects(objects: readonly Object3D[]): void;
91
-
92
- /**
93
- * Returns the array of draggable objects.
94
- * @deprecated getObjects() has been deprecated. Use controls.objects instead.
95
- */
96
- getObjects(): Object3D[];
97
-
98
- /**
99
- * Adds the event listeners of the controls.
100
- * @deprecated activate() has been renamed to connect().
101
- */
102
- activate(): void;
103
-
104
- /**
105
- * Removes the event listeners of the controls.
106
- * @deprecated deactivate() has been renamed to disconnect().
107
- */
108
- deactivate(): void;
109
79
  }
110
80
 
111
81
  export { DragControls };
@@ -49,11 +49,6 @@ declare class PointerLockControls extends Controls<PointerLockControlsEventMap>
49
49
  */
50
50
  constructor(camera: Camera, domElement?: HTMLElement | null);
51
51
 
52
- /**
53
- * @deprecated getObject() has been deprecated. Use controls.object instead.
54
- */
55
- getObject(): Camera;
56
-
57
52
  /**
58
53
  * Returns the look direction of the camera.
59
54
  * @param v The target vector.
@@ -13,5 +13,5 @@ export interface DRACOExporterOptions {
13
13
  export class DRACOExporter {
14
14
  constructor();
15
15
 
16
- parse(object: Mesh | Points, options?: DRACOExporterOptions): Int8Array;
16
+ parse(object: Mesh | Points, options?: DRACOExporterOptions): Int8Array<ArrayBuffer>;
17
17
  }
@@ -22,6 +22,6 @@ export class EXRExporter {
22
22
  renderer: WebGLRenderer | WebGPURenderer,
23
23
  renderTarget: WebGLRenderTarget,
24
24
  options?: EXRExporterParseOptions,
25
- ): Promise<Uint8Array>;
26
- parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array>;
25
+ ): Promise<Uint8Array<ArrayBuffer>>;
26
+ parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array<ArrayBuffer>>;
27
27
  }
@@ -2,6 +2,6 @@ import { Data3DTexture, DataTexture, WebGLRenderer, WebGLRenderTarget } from "th
2
2
  import { WebGPURenderer } from "three/webgpu";
3
3
 
4
4
  export class KTX2Exporter {
5
- parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise<Uint8Array>;
6
- parse(texture: Data3DTexture | DataTexture): Promise<Uint8Array>;
5
+ parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise<Uint8Array<ArrayBuffer>>;
6
+ parse(texture: Data3DTexture | DataTexture): Promise<Uint8Array<ArrayBuffer>>;
7
7
  }
@@ -15,7 +15,7 @@ export interface STLExporterOptions {
15
15
  export class STLExporter {
16
16
  constructor();
17
17
 
18
- parse(scene: Object3D, options: STLExporterOptionsBinary): DataView;
18
+ parse(scene: Object3D, options: STLExporterOptionsBinary): DataView<ArrayBuffer>;
19
19
  parse(scene: Object3D, options?: STLExporterOptionsString): string;
20
- parse(scene: Object3D, options?: STLExporterOptions): string | DataView;
20
+ parse(scene: Object3D, options?: STLExporterOptions): string | DataView<ArrayBuffer>;
21
21
  }
@@ -17,10 +17,10 @@ export class USDZExporter {
17
17
 
18
18
  parse(
19
19
  scene: Object3D,
20
- onDone: (result: Uint8Array) => void,
20
+ onDone: (result: Uint8Array<ArrayBuffer>) => void,
21
21
  onError: (error: unknown) => void,
22
22
  options?: USDZExporterOptions,
23
23
  ): void;
24
24
 
25
- parseAsync(scene: Object3D, options?: USDZExporterOptions): Promise<Uint8Array>;
25
+ parseAsync(scene: Object3D, options?: USDZExporterOptions): Promise<Uint8Array<ArrayBuffer>>;
26
26
  }
@@ -1,10 +1,10 @@
1
1
  import { CubeTexture, Loader, LoadingManager, TextureDataType } from "three";
2
2
 
3
- import { RGBELoader } from "./RGBELoader.js";
3
+ import { HDRLoader } from "./HDRLoader.js";
4
4
 
5
5
  export class HDRCubeTextureLoader extends Loader<CubeTexture, readonly string[]> {
6
6
  constructor(manager?: LoadingManager);
7
- hdrLoader: RGBELoader;
7
+ hdrLoader: HDRLoader;
8
8
  type: TextureDataType;
9
9
 
10
10
  load(
@@ -0,0 +1,22 @@
1
+ import { DataTextureLoader, LoadingManager, TextureDataType } from "three";
2
+
3
+ export interface HDR {
4
+ width: number;
5
+ height: number;
6
+ data: Float32Array | Uint8Array;
7
+ header: string;
8
+ gamma: number;
9
+ exposure: number;
10
+ type: TextureDataType;
11
+ }
12
+
13
+ declare class HDRLoader extends DataTextureLoader {
14
+ type: TextureDataType;
15
+
16
+ constructor(manager?: LoadingManager);
17
+
18
+ parse(buffer: ArrayBuffer): HDR;
19
+ setDataType(type: TextureDataType): this;
20
+ }
21
+
22
+ export { HDRLoader };
@@ -10,17 +10,21 @@ export class LDrawLoader extends Loader<Group> {
10
10
 
11
11
  smoothNormals: boolean;
12
12
 
13
+ partsLibraryPath: string;
14
+
13
15
  ConditionalLineMaterial: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial | null;
14
16
 
15
17
  constructor(manager?: LoadingManager);
16
18
 
19
+ setPartsLibraryPath(path: string): this;
20
+
17
21
  setConditionalLineMaterial(
18
22
  type: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial,
19
23
  ): this;
20
24
 
21
25
  preloadMaterials(url: string): Promise<void>;
22
26
 
23
- parse(text: string, path: string, onLoad: (data: Group) => void, onError?: (error: unknown) => void): void;
27
+ parse(text: string, onLoad: (data: Group) => void, onError?: (error: unknown) => void): void;
24
28
 
25
29
  setMaterials(materials: Material[]): this;
26
30
  clearMaterials(): this;
@@ -1,19 +1,13 @@
1
- import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
1
+ import { HDR, HDRLoader } from "./HDRLoader.js";
2
2
 
3
- export interface RGBE {
4
- width: number;
5
- height: number;
6
- data: Float32Array | Uint8Array;
7
- header: string;
8
- gamma: number;
9
- exposure: number;
10
- type: TextureDataType;
3
+ /**
4
+ * @deprecated RGBELoader has been deprecated. Please use HDRLoader instead.
5
+ */
6
+ export interface RGBE extends HDR {
11
7
  }
12
8
 
13
- export class RGBELoader extends DataTextureLoader {
14
- constructor(manager?: LoadingManager);
15
- type: TextureDataType;
16
-
17
- parse(buffer: ArrayBuffer): RGBE;
18
- setDataType(type: TextureDataType): this;
9
+ /**
10
+ * @deprecated RGBELoader has been deprecated. Please use HDRLoader instead.
11
+ */
12
+ export class RGBELoader extends HDRLoader {
19
13
  }
@@ -0,0 +1,75 @@
1
+ import * as THREE from "three";
2
+
3
+ export type WoodGenus =
4
+ | "teak"
5
+ | "walnut"
6
+ | "white_oak"
7
+ | "pine"
8
+ | "poplar"
9
+ | "maple"
10
+ | "red_oak"
11
+ | "cherry"
12
+ | "cedar"
13
+ | "mahogany";
14
+ export type WoodFinish = "raw" | "matte" | "semigloss" | "gloss";
15
+
16
+ export const WoodGenuses: WoodGenus[];
17
+ export const Finishes: WoodFinish[];
18
+
19
+ export interface WoodParameters {
20
+ transformationMatrix: THREE.Matrix4;
21
+ centerSize: number;
22
+ largeWarpScale: number;
23
+ largeGrainStretch: number;
24
+ smallWarpStrength: number;
25
+ smallWarpScale: number;
26
+ fineWarpStrength: number;
27
+ fineWarpScale: number;
28
+ ringThickness: number;
29
+ ringBias: number;
30
+ ringSizeVariance: number;
31
+ ringVarianceScale: number;
32
+ barkThickness: number;
33
+ splotchScale: number;
34
+ splotchIntensity: number;
35
+ cellScale: number;
36
+ cellSize: number;
37
+ darkGrainColor: string | THREE.Color;
38
+ lightGrainColor: string | THREE.Color;
39
+ genus: WoodGenus;
40
+ finish: WoodFinish;
41
+ clearcoat: number;
42
+ clearcoatRoughness: number;
43
+ clearcoatDarken: number;
44
+ }
45
+
46
+ export function GetWoodPreset(genus: WoodGenus, finish: WoodFinish): WoodParameters;
47
+
48
+ export class WoodNodeMaterial extends THREE.MeshPhysicalMaterial {
49
+ readonly isWoodNodeMaterial: true;
50
+
51
+ transformationMatrix: THREE.Matrix4;
52
+ centerSize: number;
53
+ largeWarpScale: number;
54
+ largeGrainStretch: number;
55
+ smallWarpStrength: number;
56
+ smallWarpScale: number;
57
+ fineWarpStrength: number;
58
+ fineWarpScale: number;
59
+ ringThickness: number;
60
+ ringBias: number;
61
+ ringSizeVariance: number;
62
+ ringVarianceScale: number;
63
+ barkThickness: number;
64
+ splotchScale: number;
65
+ splotchIntensity: number;
66
+ cellScale: number;
67
+ cellSize: number;
68
+ darkGrainColor: THREE.Color;
69
+ lightGrainColor: THREE.Color;
70
+ clearcoatDarken: number;
71
+
72
+ constructor(params?: Partial<WoodParameters>);
73
+
74
+ static fromPreset(genus?: WoodGenus, finish?: WoodFinish): WoodNodeMaterial;
75
+ }
@@ -9,3 +9,7 @@ export const LinearDisplayP3ColorSpaceImpl: ColorSpaceDefinition;
9
9
  export const LinearRec2020ColorSpace: "rec2020-linear";
10
10
 
11
11
  export const LinearRec2020ColorSpaceImpl: ColorSpaceDefinition;
12
+
13
+ export const ExtendedSRGBColorSpace: "extended-srgb";
14
+
15
+ export const ExtendedSRGBColorSpaceImpl: ColorSpaceDefinition;
@@ -1,8 +1,6 @@
1
1
  import {
2
2
  Camera,
3
3
  Color,
4
- ColorRepresentation,
5
- Material,
6
4
  Mesh,
7
5
  MeshBasicMaterial,
8
6
  MeshNormalMaterial,
@@ -12,7 +10,7 @@ import {
12
10
  WebGLRenderTarget,
13
11
  } from "three";
14
12
  import { ReflectorForSSRPass } from "../objects/ReflectorForSSRPass.js";
15
- import { FullScreenQuad, Pass } from "../postprocessing/Pass.js";
13
+ import { FullScreenQuad, Pass } from "./Pass.js";
16
14
 
17
15
  export interface SSRPassParams {
18
16
  renderer: WebGLRenderer;
@@ -26,7 +24,7 @@ export interface SSRPassParams {
26
24
  groundReflector: ReflectorForSSRPass | null;
27
25
  }
28
26
 
29
- export class SSRPass extends Pass {
27
+ declare class SSRPass extends Pass {
30
28
  width: number;
31
29
  height: number;
32
30
  clear: boolean;
@@ -94,29 +92,8 @@ export class SSRPass extends Pass {
94
92
 
95
93
  constructor(params: SSRPassParams);
96
94
 
97
- dispose: () => void;
98
-
99
- renderPass: (
100
- renderer: WebGLRenderer,
101
- passMaterial: Material,
102
- renderTarget: WebGLRenderTarget,
103
- clearColor: ColorRepresentation,
104
- clearAlpha: ColorRepresentation,
105
- ) => void;
106
-
107
- renderOverride: (
108
- renderer: WebGLRenderer,
109
- passMaterial: Material,
110
- renderTarget: WebGLRenderTarget,
111
- clearColor: ColorRepresentation,
112
- clearAlpha: ColorRepresentation,
113
- ) => void;
114
-
115
- renderMetalness: (
116
- renderer: WebGLRenderer,
117
- passMaterial: Material,
118
- renderTarget: WebGLRenderTarget,
119
- clearColor: ColorRepresentation,
120
- clearAlpha: ColorRepresentation,
121
- ) => void;
95
+ get resolutionScale(): number;
96
+ set resolutionScale(value: number);
122
97
  }
98
+
99
+ export { SSRPass };
@@ -6,13 +6,22 @@ export default class AnamorphicNode extends TempNode {
6
6
  thresholdNode: Node;
7
7
  scaleNode: Node;
8
8
  samples: number;
9
- resolution: Vector2;
9
+ resolutionScale: number;
10
10
 
11
11
  constructor(textureNode: Node, thresholdNode: Node, scaleNode: Node, samples: number);
12
12
 
13
13
  getTextureNode(): Node;
14
14
 
15
15
  setSize(width: number, height: number): void;
16
+
17
+ /**
18
+ * @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
19
+ */
20
+ get resolution(): Vector2;
21
+ /**
22
+ * @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
23
+ */
24
+ set resolution(value: Vector2);
16
25
  }
17
26
 
18
27
  export const anamorphic: (
@@ -1,15 +1,21 @@
1
1
  import { ShaderNodeObject } from "three/tsl";
2
- import { Node, TempNode, TextureNode, UniformNode } from "three/webgpu";
2
+ import { Node, TempNode, TextureNode } from "three/webgpu";
3
3
 
4
4
  declare class DepthOfFieldNode extends TempNode {
5
5
  textureNode: TextureNode;
6
6
  viewZNode: Node;
7
7
 
8
- focus: UniformNode<number>;
9
- aperture: UniformNode<number>;
10
- maxblur: UniformNode<number>;
8
+ focusDistanceNode: Node;
9
+ focalLengthNode: Node;
10
+ bokehScaleNode: Node;
11
11
 
12
- constructor(textureNode: TextureNode, viewZNode: Node, focusNode: Node, apertureNode: Node, maxblurNode: Node);
12
+ constructor(
13
+ textureNode: TextureNode,
14
+ viewZNode: Node,
15
+ focusDistanceNode: Node,
16
+ focalLengthNode: Node,
17
+ bokehScaleNode: Node,
18
+ );
13
19
  }
14
20
 
15
21
  export default DepthOfFieldNode;
@@ -17,7 +23,7 @@ export default DepthOfFieldNode;
17
23
  export const dof: (
18
24
  node: Node,
19
25
  viewZNode: Node,
20
- focus?: Node,
21
- aperture?: Node,
22
- maxblur?: Node,
26
+ focusDistance?: Node | number,
27
+ focalLength?: Node | number,
28
+ bokehScale?: Node | number,
23
29
  ) => ShaderNodeObject<DepthOfFieldNode>;
@@ -1,24 +1,39 @@
1
1
  import { ShaderNodeObject } from "three/tsl";
2
2
  import { Node, TempNode, TextureNode, Vector2 } from "three/webgpu";
3
3
 
4
+ export interface GaussianBlurNodeOptions {
5
+ premultipliedAlpha?: boolean | undefined;
6
+ resolution?: Vector2 | undefined;
7
+ }
8
+
4
9
  declare class GaussianBlurNode extends TempNode {
5
10
  textureNode: TextureNode;
6
11
  directionNode: Node | null;
7
12
  sigma: number;
8
13
 
9
- resolution: Vector2;
14
+ resolutionScale: number;
10
15
 
11
16
  premultipliedAlpha: boolean;
12
17
 
13
- constructor(textureNode: TextureNode, directionNode?: Node | null, sigma?: number);
14
-
15
- setPremultipliedAlpha(value: boolean): this;
16
-
17
- getPremultipliedAlpha(): boolean;
18
+ constructor(
19
+ textureNode: TextureNode,
20
+ directionNode?: Node | null,
21
+ sigma?: number,
22
+ options?: GaussianBlurNodeOptions,
23
+ );
18
24
 
19
25
  setSize(width: number, height: number): void;
20
26
 
21
27
  getTextureNode(): TextureNode;
28
+
29
+ /**
30
+ * @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
31
+ */
32
+ get resolution(): Vector2;
33
+ /**
34
+ * @deprecated The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.
35
+ */
36
+ set resolution(value: Vector2);
22
37
  }
23
38
 
24
39
  export default GaussianBlurNode;
@@ -27,7 +42,12 @@ export const gaussianBlur: (
27
42
  node: Node,
28
43
  directionNode?: Node | number | null,
29
44
  sigma?: number,
45
+ options?: GaussianBlurNodeOptions,
30
46
  ) => ShaderNodeObject<GaussianBlurNode>;
47
+
48
+ /**
49
+ * @deprecated "premultipliedGaussianBlur()" is deprecated. Use "gaussianBlur()" with "premultipliedAlpha: true" option instead.
50
+ */
31
51
  export const premultipliedGaussianBlur: (
32
52
  node: Node,
33
53
  directionNode?: Node | number | null,
@@ -6,20 +6,24 @@ declare class SSRNode extends TempNode {
6
6
  depthNode: ShaderNodeObject<Node>;
7
7
  normalNode: ShaderNodeObject<Node>;
8
8
  metalnessNode: ShaderNodeObject<Node>;
9
- camera: Camera;
9
+ roughnessNode: ShaderNodeObject<Node> | null;
10
+ camera: Camera | null;
10
11
 
11
12
  resolutionScale: number;
12
13
 
13
14
  maxDistance: UniformNode<number>;
14
15
  thickness: UniformNode<number>;
15
16
  opacity: UniformNode<number>;
17
+ quality: UniformNode<number>;
18
+ blurQuality: UniformNode<number>;
16
19
 
17
20
  constructor(
18
21
  colorNode: ShaderNodeObject<Node>,
19
22
  depthNode: ShaderNodeObject<Node>,
20
23
  normalNode: ShaderNodeObject<Node>,
21
24
  metalnessNode: ShaderNodeObject<Node>,
22
- camera: Camera,
25
+ roughnessNode?: ShaderNodeObject<Node> | null,
26
+ camera?: Camera | null,
23
27
  );
24
28
 
25
29
  getTextureNode(): ShaderNodeObject<TextureNode>;
@@ -34,5 +38,6 @@ export const ssr: (
34
38
  depthNode: Node,
35
39
  normalNode: Node,
36
40
  metalnessNode: Node,
37
- camera: Camera,
41
+ roughnessNode?: Node | null,
42
+ camera?: Camera | null,
38
43
  ) => ShaderNodeObject<SSRNode>;
@@ -0,0 +1,11 @@
1
+ import { ShaderNodeObject } from "three/tsl";
2
+ import { Node } from "three/webgpu";
3
+
4
+ export interface BoxBlurOptions {
5
+ size?: Node | undefined;
6
+ separation?: Node | undefined;
7
+ mask?: Node | null | undefined;
8
+ premultipliedAlpha?: boolean | undefined;
9
+ }
10
+
11
+ export const boxBlur: (textureNode: Node, options?: BoxBlurOptions) => ShaderNodeObject<Node>;
@@ -2,7 +2,7 @@ import { ShaderNodeObject } from "three/tsl";
2
2
  import { Node } from "three/webgpu";
3
3
 
4
4
  interface HashBlurOptions {
5
- repeats?: Node | undefined;
5
+ size?: Node | undefined;
6
6
  mask?: Node | null | undefined;
7
7
  premultipliedAlpha?: boolean | undefined;
8
8
  }
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.179.0",
3
+ "version": "0.180.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -49,6 +49,6 @@
49
49
  "meshoptimizer": "~0.22.0"
50
50
  },
51
51
  "peerDependencies": {},
52
- "typesPublisherContentHash": "184261baf6703d118d65b2d005bcc72af9877981f78da02aa9756329a95df8a8",
52
+ "typesPublisherContentHash": "b06ef6e25296a342a8cb4449c825b5786ae345270e744fa27908d1cb8d51f547",
53
53
  "typeScriptVersion": "5.2"
54
54
  }
three/src/Three.Core.d.ts CHANGED
@@ -154,6 +154,7 @@ export * from "./textures/Data3DTexture.js";
154
154
  export * from "./textures/DataArrayTexture.js";
155
155
  export * from "./textures/DataTexture.js";
156
156
  export * from "./textures/DepthTexture.js";
157
+ export * from "./textures/ExternalTexture.js";
157
158
  export * from "./textures/FramebufferTexture.js";
158
159
  export * from "./textures/Source.js";
159
160
  export * from "./textures/Texture.js";