@types/three 0.178.1 → 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 (129) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +2 -3
  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 +3 -2
  10. three/examples/jsm/loaders/EXRLoader.d.ts +18 -5
  11. three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +2 -2
  12. three/examples/jsm/loaders/HDRLoader.d.ts +22 -0
  13. three/examples/jsm/loaders/LDrawLoader.d.ts +5 -1
  14. three/examples/jsm/loaders/RGBELoader.d.ts +9 -15
  15. three/examples/jsm/loaders/USDLoader.d.ts +9 -0
  16. three/examples/jsm/loaders/USDZLoader.d.ts +11 -8
  17. three/examples/jsm/materials/WoodNodeMaterial.d.ts +75 -0
  18. three/examples/jsm/math/ColorSpaces.d.ts +4 -0
  19. three/examples/jsm/postprocessing/SSRPass.d.ts +6 -29
  20. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +10 -1
  21. three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +14 -8
  22. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +26 -6
  23. three/examples/jsm/tsl/display/SSRNode.d.ts +8 -3
  24. three/examples/jsm/tsl/display/TRAANode.d.ts +22 -0
  25. three/examples/jsm/tsl/display/boxBlur.d.ts +11 -0
  26. three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
  27. three/package.json +4 -4
  28. three/src/Three.Core.d.ts +2 -0
  29. three/src/Three.TSL.d.ts +84 -17
  30. three/src/animation/AnimationClip.d.ts +5 -0
  31. three/src/animation/KeyframeTrack.d.ts +7 -2
  32. three/src/animation/tracks/BooleanKeyframeTrack.d.ts +2 -2
  33. three/src/animation/tracks/StringKeyframeTrack.d.ts +2 -2
  34. three/src/cameras/Camera.d.ts +15 -8
  35. three/src/constants.d.ts +6 -2
  36. three/{examples/jsm/misc → src/core}/Timer.d.ts +3 -17
  37. three/src/helpers/SkeletonHelper.d.ts +7 -12
  38. three/src/loaders/FileLoader.d.ts +2 -2
  39. three/src/loaders/ImageBitmapLoader.d.ts +9 -9
  40. three/src/loaders/Loader.d.ts +1 -0
  41. three/src/loaders/LoadingManager.d.ts +23 -19
  42. three/src/materials/LineBasicMaterial.d.ts +1 -0
  43. three/src/materials/LineDashedMaterial.d.ts +1 -0
  44. three/src/materials/MeshBasicMaterial.d.ts +1 -0
  45. three/src/materials/MeshDepthMaterial.d.ts +1 -0
  46. three/src/materials/MeshDistanceMaterial.d.ts +2 -1
  47. three/src/materials/MeshLambertMaterial.d.ts +1 -0
  48. three/src/materials/MeshMatcapMaterial.d.ts +1 -0
  49. three/src/materials/MeshNormalMaterial.d.ts +1 -0
  50. three/src/materials/MeshPhongMaterial.d.ts +1 -0
  51. three/src/materials/MeshToonMaterial.d.ts +1 -0
  52. three/src/materials/PointsMaterial.d.ts +1 -0
  53. three/src/materials/ShaderMaterial.d.ts +1 -0
  54. three/src/materials/ShadowMaterial.d.ts +1 -0
  55. three/src/materials/SpriteMaterial.d.ts +1 -0
  56. three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -6
  57. three/src/materials/nodes/LineBasicNodeMaterial.d.ts +1 -0
  58. three/src/materials/nodes/LineDashedNodeMaterial.d.ts +1 -0
  59. three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -0
  60. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +1 -0
  61. three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +1 -0
  62. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +1 -0
  63. three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +1 -0
  64. three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +1 -0
  65. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -0
  66. three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +1 -0
  67. three/src/materials/nodes/MeshToonNodeMaterial.d.ts +1 -0
  68. three/src/materials/nodes/NodeMaterial.d.ts +1 -0
  69. three/src/materials/nodes/PointsNodeMaterial.d.ts +22 -0
  70. three/src/materials/nodes/ShadowNodeMaterial.d.ts +1 -0
  71. three/src/materials/nodes/SpriteNodeMaterial.d.ts +1 -0
  72. three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -0
  73. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +22 -1
  74. three/src/math/ColorManagement.d.ts +1 -1
  75. three/src/math/Frustum.d.ts +1 -1
  76. three/src/math/Line3.d.ts +1 -0
  77. three/src/math/Matrix4.d.ts +2 -0
  78. three/src/nodes/Nodes.d.ts +4 -0
  79. three/src/nodes/TSL.d.ts +4 -0
  80. three/src/nodes/accessors/Camera.d.ts +2 -0
  81. three/src/nodes/accessors/TextureNode.d.ts +4 -0
  82. three/src/nodes/core/ContextNode.d.ts +11 -1
  83. three/src/nodes/core/Node.d.ts +13 -13
  84. three/src/nodes/core/UniformNode.d.ts +13 -4
  85. three/src/nodes/core/VarNode.d.ts +11 -15
  86. three/src/nodes/display/PassNode.d.ts +10 -0
  87. three/src/nodes/display/ScreenNode.d.ts +4 -1
  88. three/src/nodes/display/ToneMappingNode.d.ts +2 -2
  89. three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -0
  90. three/src/nodes/display/ViewportSharedTextureNode.d.ts +3 -0
  91. three/src/nodes/display/ViewportTextureNode.d.ts +4 -0
  92. three/src/nodes/gpgpu/ComputeNode.d.ts +15 -6
  93. three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +100 -0
  94. three/src/nodes/materialx/MaterialXNodes.d.ts +85 -20
  95. three/src/nodes/materialx/lib/mx_noise.d.ts +28 -0
  96. three/src/nodes/math/BitcastNode.d.ts +25 -0
  97. three/src/nodes/math/MathNode.d.ts +10 -5
  98. three/src/nodes/tsl/TSLCore.d.ts +16 -0
  99. three/src/nodes/utils/EventNode.d.ts +21 -0
  100. three/src/nodes/utils/RTTNode.d.ts +2 -0
  101. three/src/nodes/utils/ReflectorNode.d.ts +16 -1
  102. three/src/nodes/utils/SampleNode.d.ts +3 -2
  103. three/src/nodes/utils/Timer.d.ts +0 -15
  104. three/src/objects/InstancedMesh.d.ts +2 -3
  105. three/src/renderers/WebGLRenderer.d.ts +0 -25
  106. three/src/renderers/common/Attributes.d.ts +1 -1
  107. three/src/renderers/common/Color4.d.ts +2 -2
  108. three/src/renderers/common/Renderer.d.ts +17 -9
  109. three/src/renderers/common/SampledTexture.d.ts +2 -9
  110. three/src/renderers/common/Sampler.d.ts +9 -3
  111. three/src/renderers/common/Storage3DTexture.d.ts +2 -0
  112. three/src/renderers/common/StorageArrayTexture.d.ts +2 -0
  113. three/src/renderers/common/StorageTexture.d.ts +2 -0
  114. three/src/renderers/common/Textures.d.ts +1 -1
  115. three/src/renderers/common/TimestampQueryPool.d.ts +3 -4
  116. three/src/renderers/common/XRManager.d.ts +11 -0
  117. three/src/renderers/common/nodes/NodeLibrary.d.ts +5 -5
  118. three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
  119. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +0 -1
  120. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
  121. three/src/renderers/webxr/WebXRDepthSensing.d.ts +4 -5
  122. three/src/renderers/webxr/WebXRManager.d.ts +4 -2
  123. three/src/textures/CompressedTexture.d.ts +4 -4
  124. three/src/textures/Data3DTexture.d.ts +2 -1
  125. three/src/textures/DataTexture.d.ts +3 -2
  126. three/src/textures/ExternalTexture.d.ts +11 -0
  127. three/src/textures/Texture.d.ts +1 -1
  128. three/examples/jsm/loaders/RGBMLoader.d.ts +0 -37
  129. three/examples/jsm/tsl/display/TRAAPassNode.d.ts +0 -15
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: Wed, 09 Jul 2025 18:02:54 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";
@@ -116,7 +116,7 @@ export * from "./loaders/TGALoader.js";
116
116
  export * from "./loaders/TIFFLoader.js";
117
117
  export * from "./loaders/TTFLoader.js";
118
118
  export * from "./loaders/UltraHDRLoader.js";
119
- export * from "./loaders/USDZLoader.js";
119
+ export * from "./loaders/USDLoader.js";
120
120
  export * from "./loaders/VOXLoader.js";
121
121
  export * from "./loaders/VRMLLoader.js";
122
122
  export * from "./loaders/VTKLoader.js";
@@ -145,7 +145,6 @@ export * from "./misc/MorphAnimMesh.js";
145
145
  export * from "./misc/MorphBlendMesh.js";
146
146
  export * from "./misc/ProgressiveLightMap.js";
147
147
  export * from "./misc/RollerCoaster.js";
148
- export * from "./misc/Timer.js";
149
148
  export * from "./misc/TubePainter.js";
150
149
  export * from "./misc/Volume.js";
151
150
  export * from "./misc/VolumeSlice.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
  }
@@ -5,6 +5,7 @@ import * as WebGPUTextureUtils from "../utils/WebGPUTextureUtils.js";
5
5
  export interface USDZExporterOptions {
6
6
  ar?: { anchoring: { type: "plane" }; planeAnchoring: { alignment: "horizontal" | "vertical" | "any" } } | undefined;
7
7
  includeAnchoringProperties?: boolean | undefined;
8
+ onlyVisible?: boolean | undefined;
8
9
  quickLookCompatible?: boolean | undefined;
9
10
  maxTextureSize?: number | undefined;
10
11
  }
@@ -16,10 +17,10 @@ export class USDZExporter {
16
17
 
17
18
  parse(
18
19
  scene: Object3D,
19
- onDone: (result: Uint8Array) => void,
20
+ onDone: (result: Uint8Array<ArrayBuffer>) => void,
20
21
  onError: (error: unknown) => void,
21
22
  options?: USDZExporterOptions,
22
23
  ): void;
23
24
 
24
- parseAsync(scene: Object3D, options?: USDZExporterOptions): Promise<Uint8Array>;
25
+ parseAsync(scene: Object3D, options?: USDZExporterOptions): Promise<Uint8Array<ArrayBuffer>>;
25
26
  }
@@ -1,4 +1,14 @@
1
- import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
1
+ import {
2
+ DataTextureLoader,
3
+ FloatType,
4
+ HalfFloatType,
5
+ LoadingManager,
6
+ PixelFormat,
7
+ RedFormat,
8
+ RGBAFormat,
9
+ RGFormat,
10
+ TextureDataType,
11
+ } from "three";
2
12
 
3
13
  export interface EXR {
4
14
  header: object;
@@ -7,13 +17,16 @@ export interface EXR {
7
17
  data: Float32Array | Uint16Array;
8
18
  format: PixelFormat;
9
19
  colorSpace: string;
10
- type: TextureDataType;
20
+ type: typeof HalfFloatType | typeof FloatType;
11
21
  }
12
22
 
13
- export class EXRLoader extends DataTextureLoader {
14
- constructor(manager?: LoadingManager);
23
+ declare class EXRLoader extends DataTextureLoader {
15
24
  type: TextureDataType;
25
+ outputFormat: typeof RGBAFormat | typeof RGFormat | typeof RedFormat;
26
+
27
+ constructor(manager?: LoadingManager);
16
28
 
17
29
  parse(buffer: ArrayBuffer): EXR;
18
- setDataType(type: TextureDataType): this;
30
+ setDataType(type: typeof HalfFloatType | typeof FloatType): this;
31
+ setOutputFormat(value: typeof RGBAFormat | typeof RGFormat | typeof RedFormat): this;
19
32
  }
@@ -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,9 @@
1
+ import { Group, Loader, LoadingManager } from "three";
2
+
3
+ declare class USDLoader extends Loader<Group> {
4
+ constructor(manager?: LoadingManager);
5
+
6
+ parse(buffer: ArrayBuffer | string): Group;
7
+ }
8
+
9
+ export { USDLoader };
@@ -1,11 +1,14 @@
1
- import { Group, Loader, LoadingManager, Mesh } from "three";
1
+ import { LoadingManager } from "three";
2
+ import { USDLoader } from "./USDLoader.js";
2
3
 
3
- export class USDAParser {
4
- parse(text: string): object;
5
- }
6
-
7
- export class USDZLoader extends Loader<Mesh> {
4
+ /**
5
+ * @deprecated USDZLoader has been deprecated. Please use USDLoader instead.
6
+ */
7
+ declare class USDZLoader extends USDLoader {
8
+ /**
9
+ * @deprecated USDZLoader has been deprecated. Please use USDLoader instead.
10
+ */
8
11
  constructor(manager?: LoadingManager);
9
-
10
- parse(buffer: ArrayBuffer | string): Group;
11
12
  }
13
+
14
+ export { USDZLoader };
@@ -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,22 @@
1
+ import { ShaderNodeObject } from "three/tsl";
2
+ import { Camera, Node, TempNode, TextureNode } from "three/webgpu";
3
+
4
+ declare class TRAANode extends TempNode {
5
+ readonly isTRAANode: true;
6
+
7
+ beautyNode: TextureNode;
8
+ depthNode: TextureNode;
9
+ velocityNode: TextureNode;
10
+ camera: Camera;
11
+
12
+ constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera);
13
+ }
14
+
15
+ export default TRAANode;
16
+
17
+ export const traa: (
18
+ beautyNode: Node,
19
+ depthNode: TextureNode,
20
+ velocityNode: TextureNode,
21
+ camera: Camera,
22
+ ) => ShaderNodeObject<TRAANode>;
@@ -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
  }