@types/three 0.169.0 → 0.170.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 (147) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +3 -3
  3. three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
  4. three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
  5. three/examples/jsm/controls/ArcballControls.d.ts +1 -1
  6. three/examples/jsm/controls/TransformControls.d.ts +44 -0
  7. three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
  8. three/examples/jsm/csm/CSMHelper.d.ts +2 -1
  9. three/examples/jsm/csm/CSMShadowNode.d.ts +46 -0
  10. three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
  11. three/examples/jsm/exporters/GLTFExporter.d.ts +20 -3
  12. three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
  13. three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
  14. three/examples/jsm/geometries/DecalGeometry.d.ts +9 -3
  15. three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
  16. three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
  17. three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
  18. three/examples/jsm/lines/Wireframe.d.ts +5 -2
  19. three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
  20. three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
  21. three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
  22. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
  23. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
  24. three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
  25. three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
  26. three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
  27. three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
  28. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
  29. three/examples/jsm/math/ColorSpaces.d.ts +11 -0
  30. three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
  31. three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
  32. three/examples/jsm/renderers/SVGRenderer.d.ts +2 -2
  33. three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +1 -5
  34. three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
  35. three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
  36. three/examples/jsm/tsl/display/BleachBypass.d.ts +3 -0
  37. three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +1 -5
  38. three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +2 -6
  39. three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +1 -5
  40. three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
  41. three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +1 -3
  42. three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +1 -3
  43. three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +2 -8
  44. three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
  45. three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
  46. three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
  47. three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +1 -2
  48. three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
  49. three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
  50. three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
  51. three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +1 -4
  52. three/examples/jsm/tsl/display/SMAANode.d.ts +17 -0
  53. three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
  54. three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
  55. three/examples/jsm/tsl/display/Sepia.d.ts +3 -0
  56. three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +1 -3
  57. three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +2 -5
  58. three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
  59. three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
  60. three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +1 -5
  61. three/examples/jsm/tsl/display/hashBlur.d.ts +7 -0
  62. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +22 -0
  63. three/package.json +4 -3
  64. three/src/Three.WebGPU.Nodes.d.ts +5 -1
  65. three/src/Three.WebGPU.d.ts +5 -1
  66. three/src/Three.d.ts +2 -7
  67. three/src/constants.d.ts +1 -9
  68. three/src/core/BufferGeometry.d.ts +13 -2
  69. three/src/core/RenderTarget.d.ts +1 -2
  70. three/src/loaders/FileLoader.d.ts +3 -3
  71. three/src/materials/LineBasicMaterial.d.ts +0 -5
  72. three/src/materials/LineDashedMaterial.d.ts +0 -5
  73. three/src/materials/Material.d.ts +4 -6
  74. three/src/materials/MeshBasicMaterial.d.ts +0 -5
  75. three/src/materials/MeshDepthMaterial.d.ts +0 -5
  76. three/src/materials/MeshDistanceMaterial.d.ts +0 -5
  77. three/src/materials/MeshLambertMaterial.d.ts +0 -5
  78. three/src/materials/MeshMatcapMaterial.d.ts +0 -5
  79. three/src/materials/MeshNormalMaterial.d.ts +0 -5
  80. three/src/materials/MeshPhongMaterial.d.ts +0 -5
  81. three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
  82. three/src/materials/MeshStandardMaterial.d.ts +0 -5
  83. three/src/materials/MeshToonMaterial.d.ts +0 -5
  84. three/src/materials/PointsMaterial.d.ts +0 -5
  85. three/src/materials/RawShaderMaterial.d.ts +0 -2
  86. three/src/materials/ShaderMaterial.d.ts +0 -5
  87. three/src/materials/ShadowMaterial.d.ts +0 -5
  88. three/src/materials/SpriteMaterial.d.ts +0 -5
  89. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
  90. three/src/materials/nodes/NodeMaterial.d.ts +2 -0
  91. three/src/materials/nodes/NodeMaterials.d.ts +19 -16
  92. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +15 -0
  93. three/src/math/Color.d.ts +39 -22
  94. three/src/math/ColorManagement.d.ts +24 -24
  95. three/src/math/Vector4.d.ts +2 -0
  96. three/src/nodes/Nodes.d.ts +1 -21
  97. three/src/nodes/TSL.d.ts +6 -24
  98. three/src/nodes/accessors/Camera.d.ts +0 -1
  99. three/src/nodes/accessors/SceneNode.d.ts +2 -0
  100. three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
  101. three/src/nodes/accessors/VelocityNode.d.ts +4 -0
  102. three/src/nodes/code/ScriptableNode.d.ts +1 -1
  103. three/src/nodes/core/StackNode.d.ts +4 -4
  104. three/src/nodes/core/VarNode.d.ts +12 -1
  105. three/src/nodes/display/ColorAdjustment.d.ts +29 -0
  106. three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
  107. three/src/nodes/display/ColorSpaceNode.d.ts +14 -8
  108. three/src/nodes/display/RenderOutputNode.d.ts +4 -4
  109. three/src/nodes/display/ViewportDepthNode.d.ts +2 -0
  110. three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
  111. three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -0
  112. three/src/nodes/gpgpu/ComputeNode.d.ts +5 -0
  113. three/src/nodes/lighting/LightsNode.d.ts +7 -2
  114. three/src/nodes/lighting/PointLightNode.d.ts +11 -1
  115. three/src/nodes/lighting/ShadowNode.d.ts +12 -0
  116. three/src/nodes/utils/Discard.d.ts +1 -1
  117. three/src/nodes/utils/Oscillators.d.ts +7 -0
  118. three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
  119. three/src/nodes/utils/ReflectorNode.d.ts +17 -4
  120. three/src/nodes/utils/Timer.d.ts +21 -0
  121. three/src/objects/BatchedMesh.d.ts +47 -2
  122. three/src/renderers/WebGLRenderer.d.ts +22 -11
  123. three/src/renderers/common/Constants.d.ts +2 -1
  124. three/src/renderers/common/Geometries.d.ts +1 -0
  125. three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
  126. three/src/renderers/common/Lighting.d.ts +15 -0
  127. three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
  128. three/src/renderers/common/RenderList.d.ts +5 -2
  129. three/src/renderers/common/RenderLists.d.ts +3 -1
  130. three/src/renderers/common/RenderObject.d.ts +1 -0
  131. three/src/renderers/common/Renderer.d.ts +35 -9
  132. three/src/renderers/common/extras/PMREMGenerator.d.ts +5 -1
  133. three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -7
  134. three/src/renderers/webgl/WebGLPrograms.d.ts +3 -10
  135. three/src/renderers/webgl/WebGLState.d.ts +13 -10
  136. three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
  137. three/src/textures/CompressedTexture.d.ts +1 -2
  138. three/src/textures/CubeTexture.d.ts +1 -2
  139. three/src/textures/DataTexture.d.ts +1 -2
  140. three/src/textures/Texture.d.ts +3 -4
  141. three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
  142. three/src/nodes/display/BleachBypass.d.ts +0 -4
  143. three/src/nodes/display/Sepia.d.ts +0 -4
  144. three/src/nodes/utils/OscNode.d.ts +0 -25
  145. three/src/nodes/utils/TimerNode.d.ts +0 -25
  146. /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
  147. /three/examples/jsm/utils/{TextureUtilsGPU.d.ts → WebGPUTextureUtils.d.ts} +0 -0
@@ -1,7 +1,5 @@
1
- import { Vector2 } from "../../math/Vector2.js";
2
- import Node from "../core/Node.js";
3
- import TempNode from "../core/TempNode.js";
4
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Vector2 } from "three";
2
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode } from "three/tsl";
5
3
 
6
4
  export default class AnamorphicNode extends TempNode {
7
5
  textureNode: Node;
@@ -0,0 +1,3 @@
1
+ import { Node, NodeRepresentation, ShaderNodeObject } from "three/tsl";
2
+
3
+ export const bleach: (color: NodeRepresentation, opacity?: number) => ShaderNodeObject<Node>;
@@ -1,8 +1,4 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import Node from "../core/Node.js";
3
- import TempNode from "../core/TempNode.js";
4
- import UniformNode from "../core/UniformNode.js";
5
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
6
2
 
7
3
  declare class BloomNode extends TempNode {
8
4
  inputNode: Node;
@@ -1,9 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { Matrix4 } from "../../math/Matrix4.js";
3
- import Node from "../core/Node.js";
4
- import TempNode from "../core/TempNode.js";
5
- import UniformNode from "../core/UniformNode.js";
6
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Camera, Matrix4 } from "three";
2
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, UniformNode } from "three/tsl";
7
3
 
8
4
  declare class DenoiseNode extends TempNode {
9
5
  textureNode: Node;
@@ -1,8 +1,4 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import Node from "../core/Node.js";
3
- import TempNode from "../core/TempNode.js";
4
- import UniformNode from "../core/UniformNode.js";
5
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
6
2
 
7
3
  declare class DepthOfFieldNode extends TempNode {
8
4
  textureNode: TextureNode;
@@ -1,8 +1,5 @@
1
- import { Vector2 } from "../../math/Vector2.js";
2
- import Node from "../core/Node.js";
3
- import TempNode from "../core/TempNode.js";
4
- import UniformNode from "../core/UniformNode.js";
5
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Vector2 } from "three";
2
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, UniformNode } from "three/tsl";
6
3
 
7
4
  declare class DotScreenNode extends TempNode {
8
5
  inputNode: Node;
@@ -1,6 +1,4 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import TempNode from "../core/TempNode.js";
3
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { NodeRepresentation, ShaderNodeObject, TempNode, TextureNode } from "three/tsl";
4
2
 
5
3
  declare class FXAANode extends TempNode {
6
4
  textureNode: TextureNode;
@@ -1,6 +1,4 @@
1
- import Node from "../core/Node.js";
2
- import TempNode from "../core/TempNode.js";
3
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode } from "three/tsl";
4
2
 
5
3
  declare class FilmNode extends TempNode {
6
4
  inputNode: Node;
@@ -1,11 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { Matrix4 } from "../../math/Matrix4.js";
3
- import { Vector2 } from "../../math/Vector2.js";
4
- import TextureNode from "../accessors/TextureNode.js";
5
- import Node from "../core/Node.js";
6
- import TempNode from "../core/TempNode.js";
7
- import UniformNode from "../core/UniformNode.js";
8
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Camera, Matrix4, Vector2 } from "three";
2
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
9
3
 
10
4
  declare class GTAONode extends TempNode {
11
5
  depthNode: Node;
@@ -1,8 +1,5 @@
1
- import { Vector2 } from "../../math/Vector2.js";
2
- import TextureNode from "../accessors/TextureNode.js";
3
- import Node from "../core/Node.js";
4
- import TempNode from "../core/TempNode.js";
5
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Vector2 } from "three";
2
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, TextureNode } from "three/tsl";
6
3
 
7
4
  declare class GaussianBlurNode extends TempNode {
8
5
  textureNode: TextureNode;
@@ -11,8 +8,14 @@ declare class GaussianBlurNode extends TempNode {
11
8
 
12
9
  resolution: Vector2;
13
10
 
11
+ premultipliedAlpha: boolean;
12
+
14
13
  constructor(textureNode: TextureNode, directionNode?: Node | null, sigma?: number);
15
14
 
15
+ setPremultipliedAlpha(value: boolean): this;
16
+
17
+ getPremultipliedAlpha(): boolean;
18
+
16
19
  setSize(width: number, height: number): void;
17
20
 
18
21
  getTextureNode(): TextureNode;
@@ -25,3 +28,8 @@ export const gaussianBlur: (
25
28
  directionNode?: NodeRepresentation | null,
26
29
  sigma?: number,
27
30
  ) => ShaderNodeObject<GaussianBlurNode>;
31
+ export const premultipliedGaussianBlur: (
32
+ node: NodeRepresentation,
33
+ directionNode?: NodeRepresentation | null,
34
+ sigma?: number,
35
+ ) => ShaderNodeObject<GaussianBlurNode>;
@@ -0,0 +1,35 @@
1
+ import { Vector3 } from "three";
2
+ import { NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
3
+
4
+ interface LensflareNodeParams {
5
+ ghostTint?: NodeRepresentation | undefined;
6
+ threshold?: NodeRepresentation | undefined;
7
+ ghostSamples?: NodeRepresentation | undefined;
8
+ ghostSpacing?: NodeRepresentation | undefined;
9
+ ghostAttenuationFactor?: NodeRepresentation | undefined;
10
+ downSampleRatio?: number | undefined;
11
+ }
12
+
13
+ declare class LensflareNode extends TempNode {
14
+ textureNode: TextureNode;
15
+
16
+ ghostTintNode: ShaderNodeObject<UniformNode<Vector3>>;
17
+ thresholdNode: ShaderNodeObject<UniformNode<number>>;
18
+ ghostSamplesNode: ShaderNodeObject<UniformNode<number>>;
19
+ ghostSpacingNode: ShaderNodeObject<UniformNode<number>>;
20
+ ghostAttenuationFactorNode: ShaderNodeObject<UniformNode<number>>;
21
+ downSampleRatio: number;
22
+
23
+ constructor(textureNode: TextureNode, params?: LensflareNodeParams);
24
+
25
+ getTextureNode(): TextureNode;
26
+
27
+ setSize(width: number, height: number): void;
28
+ }
29
+
30
+ export default LensflareNode;
31
+
32
+ export const lensflare: (
33
+ inputNode: NodeRepresentation,
34
+ params?: LensflareNodeParams,
35
+ ) => ShaderNodeObject<LensflareNode>;
@@ -1,9 +1,5 @@
1
- import { Data3DTexture } from "../../textures/Data3DTexture.js";
2
- import Texture3DNode from "../accessors/Texture3DNode.js";
3
- import Node from "../core/Node.js";
4
- import TempNode from "../core/TempNode.js";
5
- import UniformNode from "../core/UniformNode.js";
6
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Data3DTexture } from "three";
2
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, Texture3DNode, UniformNode } from "three/tsl";
7
3
 
8
4
  declare class Lut3DNode extends TempNode {
9
5
  inputNode: Node;
@@ -1,5 +1,4 @@
1
- import Node from "../core/Node.js";
2
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Node, NodeRepresentation, ShaderNodeObject } from "three/tsl";
3
2
 
4
3
  export const motionBlur: (
5
4
  inputNode: NodeRepresentation,
@@ -0,0 +1,32 @@
1
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
2
+ import { Camera, Object3D, Scene } from "three/webgpu";
3
+
4
+ export interface OutlineNodeParams {
5
+ selectedObjects?: Object3D[] | undefined;
6
+ edgeThickness?: NodeRepresentation | undefined;
7
+ edgeGlow?: NodeRepresentation | undefined;
8
+ downSampleRatio?: number | undefined;
9
+ }
10
+
11
+ declare class OutlineNode extends TempNode {
12
+ scene: Scene;
13
+ camera: Camera;
14
+ selectedObjects: Object3D[];
15
+ edgeThicknessNode: ShaderNodeObject<UniformNode<number>>;
16
+ edgeGlowNode: ShaderNodeObject<UniformNode<number>>;
17
+ downSampleRatio: number;
18
+
19
+ constructor(scene: Scene, camera: Camera, params?: OutlineNodeParams);
20
+
21
+ get visibleEdge(): ShaderNodeObject<Node>;
22
+
23
+ get hiddenEdge(): ShaderNodeObject<Node>;
24
+
25
+ getTextureNode(): ShaderNodeObject<TextureNode>;
26
+
27
+ setSize(width: number, height: number): void;
28
+ }
29
+
30
+ export default OutlineNode;
31
+
32
+ export const outline: (scene: Scene, camera: Camera, params?: OutlineNodeParams) => ShaderNodeObject<OutlineNode>;
@@ -1,6 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { Scene } from "../../scenes/Scene.js";
3
- import { ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Camera, Scene } from "three";
2
+ import { ShaderNodeObject } from "three/tsl";
4
3
  import StereoCompositePassNode from "./StereoCompositePassNode.js";
5
4
 
6
5
  declare class ParallaxBarrierPassNode extends StereoCompositePassNode {
@@ -1,8 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { Scene } from "../../scenes/Scene.js";
3
- import UniformNode from "../core/UniformNode.js";
4
- import { ShaderNodeObject } from "../tsl/TSLCore.js";
5
- import PassNode from "./PassNode.js";
1
+ import { Camera, Scene } from "three";
2
+ import { PassNode, ShaderNodeObject, UniformNode } from "three/tsl";
6
3
 
7
4
  declare class PixelationPassNode extends PassNode {
8
5
  pixelSize: UniformNode<number>;
@@ -1,7 +1,4 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import TempNode from "../core/TempNode.js";
3
- import UniformNode from "../core/UniformNode.js";
4
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
5
2
 
6
3
  export default class RGBShiftNode extends TempNode {
7
4
  textureNode: TextureNode;
@@ -0,0 +1,17 @@
1
+ import { NodeRepresentation, ShaderNodeObject, TempNode, TextureNode } from "three/tsl";
2
+
3
+ declare class SMAANode extends TempNode {
4
+ textureNode: TextureNode;
5
+
6
+ constructor(textureNode: TextureNode);
7
+
8
+ getTextureNode(): TextureNode;
9
+
10
+ setSize(width: number, height: number): void;
11
+
12
+ getAreaTexture(): string;
13
+
14
+ getSearchTexture(): string;
15
+ }
16
+
17
+ export const smaa: (node: NodeRepresentation) => ShaderNodeObject<SMAANode>;
@@ -1,10 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { RenderTarget } from "../../core/RenderTarget.js";
3
- import { Color } from "../../math/Color.js";
4
- import { Scene } from "../../scenes/Scene.js";
5
- import UniformNode from "../core/UniformNode.js";
6
- import { ShaderNodeObject } from "../tsl/TSLCore.js";
7
- import PassNode from "./PassNode.js";
1
+ import { Camera, Color, RenderTarget, Scene } from "three";
2
+ import { PassNode, ShaderNodeObject, UniformNode } from "three/tsl";
8
3
 
9
4
  declare class SSAAPassNode extends PassNode {
10
5
  readonly isSSAAPassNode: boolean;
@@ -0,0 +1,38 @@
1
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
2
+ import { Camera } from "three/webgpu";
3
+
4
+ declare class SSRNode extends TempNode {
5
+ colorNode: ShaderNodeObject<Node>;
6
+ depthNode: ShaderNodeObject<Node>;
7
+ normalNode: ShaderNodeObject<Node>;
8
+ metalnessNode: ShaderNodeObject<Node>;
9
+ camera: Camera;
10
+
11
+ resolutionScale: number;
12
+
13
+ maxDistance: UniformNode<number>;
14
+ thickness: UniformNode<number>;
15
+ opacity: UniformNode<number>;
16
+
17
+ constructor(
18
+ colorNode: ShaderNodeObject<Node>,
19
+ depthNode: ShaderNodeObject<Node>,
20
+ normalNode: ShaderNodeObject<Node>,
21
+ metalnessNode: ShaderNodeObject<Node>,
22
+ camera: Camera,
23
+ );
24
+
25
+ getTextureNode(): ShaderNodeObject<TextureNode>;
26
+
27
+ setSize(width: number, height: number): void;
28
+ }
29
+
30
+ export default SSRNode;
31
+
32
+ export const ssr: (
33
+ colorNode: NodeRepresentation,
34
+ depthNode: NodeRepresentation,
35
+ normalNode: NodeRepresentation,
36
+ metalnessNode: NodeRepresentation,
37
+ camera: Camera,
38
+ ) => ShaderNodeObject<SSRNode>;
@@ -0,0 +1,3 @@
1
+ import { Node, NodeRepresentation, ShaderNodeObject } from "three/tsl";
2
+
3
+ export const sepia: (color: NodeRepresentation) => ShaderNodeObject<Node>;
@@ -1,6 +1,4 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import TempNode from "../core/TempNode.js";
3
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { NodeRepresentation, ShaderNodeObject, TempNode, TextureNode } from "three/tsl";
4
2
 
5
3
  declare class SobelOperatorNode extends TempNode {
6
4
  textureNode: TextureNode;
@@ -1,8 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { StereoCamera } from "../../cameras/StereoCamera.js";
3
- import { CoordinateSystem } from "../../constants.js";
4
- import { Scene } from "../../scenes/Scene.js";
5
- import PassNode from "./PassNode.js";
1
+ import { Camera, CoordinateSystem, Scene, StereoCamera } from "three";
2
+ import { PassNode } from "three/tsl";
6
3
 
7
4
  declare class StereoCompositePassNode extends PassNode {
8
5
  readonly isStereoCompositePassNode: true;
@@ -1,8 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { StereoCamera } from "../../cameras/StereoCamera.js";
3
- import { Scene } from "../../scenes/Scene.js";
4
- import { ShaderNodeObject } from "../tsl/TSLCore.js";
5
- import PassNode from "./PassNode.js";
1
+ import { Camera, Scene, StereoCamera } from "three";
2
+ import { PassNode, ShaderNodeObject } from "three/tsl";
6
3
 
7
4
  declare class StereoPassNode extends PassNode {
8
5
  readonly isStereoPassNode: true;
@@ -0,0 +1,15 @@
1
+ import { Camera, ColorRepresentation, Scene } from "three";
2
+ import { PassNode, ShaderNodeObject } from "three/tsl";
3
+
4
+ declare class TRAAPassNode extends PassNode {
5
+ readonly isTRAAPassNode: true;
6
+
7
+ clearColor: ColorRepresentation;
8
+ clearAlpha: number;
9
+
10
+ constructor(scene: Scene, camera: Camera);
11
+ }
12
+
13
+ export default TRAAPassNode;
14
+
15
+ export const traaPass: (scene: Scene, camera: Camera) => ShaderNodeObject<TRAAPassNode>;
@@ -1,8 +1,4 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import Node from "../core/Node.js";
3
- import TempNode from "../core/TempNode.js";
4
- import UniformNode from "../core/UniformNode.js";
5
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Node, NodeRepresentation, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
6
2
 
7
3
  declare class TransitionNode extends TempNode {
8
4
  textureNodeA: TextureNode;
@@ -0,0 +1,7 @@
1
+ import { Node, NodeRepresentation, ShaderNodeObject } from "three/tsl";
2
+
3
+ export const hashBlur: (
4
+ textureNode: NodeRepresentation,
5
+ bluramount?: NodeRepresentation,
6
+ repeats?: NodeRepresentation,
7
+ ) => ShaderNodeObject<Node>;
@@ -0,0 +1,22 @@
1
+ import { LightsNode, Node, NodeRepresentation, ShaderNodeObject } from "three/tsl";
2
+
3
+ export const circleIntersectsAABB: (
4
+ circleCenter: NodeRepresentation,
5
+ radius: NodeRepresentation,
6
+ minBounds: NodeRepresentation,
7
+ maxBounds: NodeRepresentation,
8
+ ) => ShaderNodeObject<Node>;
9
+
10
+ declare class TiledLightsNode extends LightsNode {
11
+ constructor(maxLights?: number, tileSize?: number);
12
+
13
+ updateLightsTexture(): void;
14
+
15
+ getBlock(block?: number): ShaderNodeObject<Node>;
16
+
17
+ setSize(width: number, height: number): this;
18
+ }
19
+
20
+ export default TiledLightsNode;
21
+
22
+ export const tiledLights: (maxLights?: number, tileSize?: number) => ShaderNodeObject<TiledLightsNode>;
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.169.0",
3
+ "version": "0.170.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -47,6 +47,7 @@
47
47
  "fflate": "~0.8.2",
48
48
  "meshoptimizer": "~0.18.1"
49
49
  },
50
- "typesPublisherContentHash": "94410dccd4fa1115f439c3b57ebda48f8f1b4340eff2f774bab751513d3d3ac8",
51
- "typeScriptVersion": "4.8"
50
+ "peerDependencies": {},
51
+ "typesPublisherContentHash": "943f8157acfa9033e8e899a7ffe93172eb51ec72456ae0060fc93bd214da1770",
52
+ "typeScriptVersion": "4.9"
52
53
  }
@@ -99,7 +99,7 @@ export * from "./materials/nodes/NodeMaterials.js";
99
99
  export * from "./math/Box2.js";
100
100
  export * from "./math/Box3.js";
101
101
  export * from "./math/Color.js";
102
- export { ColorManagement, DefinedColorSpace, WorkingColorSpace } from "./math/ColorManagement.js";
102
+ export { ColorManagement, ColorSpaceDefinition } from "./math/ColorManagement.js";
103
103
  export * from "./math/Cylindrical.js";
104
104
  export * from "./math/Euler.js";
105
105
  export * from "./math/Frustum.js";
@@ -193,6 +193,10 @@ export * from "./nodes/Nodes.js";
193
193
  export * from "./nodes/TSL.js";
194
194
  export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js";
195
195
  export { default as PostProcessing } from "./renderers/common/PostProcessing.js";
196
+ import * as PostProcessingUtils from "./renderers/common/PostProcessingUtils.js";
197
+ export { PostProcessingUtils };
198
+ export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js";
199
+ export { default as Lighting } from "./renderers/common/Lighting.js";
196
200
  export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
197
201
  export type { default as Renderer } from "./renderers/common/Renderer.js";
198
202
  export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js";
@@ -98,7 +98,7 @@ export * from "./materials/Materials.js";
98
98
  export * from "./math/Box2.js";
99
99
  export * from "./math/Box3.js";
100
100
  export * from "./math/Color.js";
101
- export { ColorManagement, DefinedColorSpace, WorkingColorSpace } from "./math/ColorManagement.js";
101
+ export { ColorManagement, ColorSpaceDefinition } from "./math/ColorManagement.js";
102
102
  export * from "./math/Cylindrical.js";
103
103
  export * from "./math/Euler.js";
104
104
  export * from "./math/Frustum.js";
@@ -194,6 +194,10 @@ export * from "./nodes/TSL.js";
194
194
  export { default as BundleGroup } from "./renderers/common/BundleGroup.js";
195
195
  export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js";
196
196
  export { default as PostProcessing } from "./renderers/common/PostProcessing.js";
197
+ import * as PostProcessingUtils from "./renderers/common/PostProcessingUtils.js";
198
+ export { PostProcessingUtils };
199
+ export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js";
200
+ export { default as Lighting } from "./renderers/common/Lighting.js";
197
201
  export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
198
202
  export type { default as Renderer } from "./renderers/common/Renderer.js";
199
203
  export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js";
three/src/Three.d.ts CHANGED
@@ -98,7 +98,7 @@ export * from "./materials/Materials.js";
98
98
  export * from "./math/Box2.js";
99
99
  export * from "./math/Box3.js";
100
100
  export * from "./math/Color.js";
101
- export { ColorManagement, DefinedColorSpace, WorkingColorSpace } from "./math/ColorManagement.js";
101
+ export { ColorManagement, ColorSpaceDefinition } from "./math/ColorManagement.js";
102
102
  export * from "./math/Cylindrical.js";
103
103
  export * from "./math/Euler.js";
104
104
  export * from "./math/Frustum.js";
@@ -162,12 +162,7 @@ export type { WebGLProperties } from "./renderers/webgl/WebGLProperties.js";
162
162
  export type { RenderItem, WebGLRenderList, WebGLRenderLists } from "./renderers/webgl/WebGLRenderLists.js";
163
163
  export type { WebGLShader } from "./renderers/webgl/WebGLShader.js";
164
164
  export type { WebGLShadowMap } from "./renderers/webgl/WebGLShadowMap.js";
165
- export type {
166
- WebGLColorBuffer,
167
- WebGLDepthBuffer,
168
- WebGLState,
169
- WebGLStencilBuffer,
170
- } from "./renderers/webgl/WebGLState.js";
165
+ export type { WebGLState } from "./renderers/webgl/WebGLState.js";
171
166
  export type { WebGLTextures } from "./renderers/webgl/WebGLTextures.js";
172
167
  export type { WebGLUniforms } from "./renderers/webgl/WebGLUniforms.js";
173
168
  export * from "./renderers/webgl/WebGLUtils.js";
three/src/constants.d.ts CHANGED
@@ -697,23 +697,15 @@ export type NormalMapTypes = typeof TangentSpaceNormalMap | typeof ObjectSpaceNo
697
697
  export const NoColorSpace: "";
698
698
  export const SRGBColorSpace: "srgb";
699
699
  export const LinearSRGBColorSpace: "srgb-linear";
700
- export const DisplayP3ColorSpace: "display-p3";
701
- export const LinearDisplayP3ColorSpace = "display-p3-linear";
702
700
  export type ColorSpace =
703
701
  | typeof NoColorSpace
704
702
  | typeof SRGBColorSpace
705
- | typeof LinearSRGBColorSpace
706
- | typeof DisplayP3ColorSpace
707
- | typeof LinearDisplayP3ColorSpace;
703
+ | typeof LinearSRGBColorSpace;
708
704
 
709
705
  export const LinearTransfer: "linear";
710
706
  export const SRGBTransfer: "srgb";
711
707
  export type ColorSpaceTransfer = typeof LinearTransfer | typeof SRGBTransfer;
712
708
 
713
- export const Rec709Primaries: "rec709";
714
- export const P3Primaries: "p3";
715
- export type ColorSpacePrimaries = typeof Rec709Primaries | typeof P3Primaries;
716
-
717
709
  // Stencil Op types
718
710
  export const ZeroStencilOp: 0;
719
711
  export const KeepStencilOp: 7680;
@@ -4,6 +4,7 @@ import { Quaternion } from "../math/Quaternion.js";
4
4
  import { Sphere } from "../math/Sphere.js";
5
5
  import { Vector2 } from "../math/Vector2.js";
6
6
  import { Vector3, Vector3Tuple } from "../math/Vector3.js";
7
+ import IndirectStorageBufferAttribute from "../renderers/common/IndirectStorageBufferAttribute.js";
7
8
  import { BufferAttribute, BufferAttributeJSON } from "./BufferAttribute.js";
8
9
  import { EventDispatcher } from "./EventDispatcher.js";
9
10
  import { GLBufferAttribute } from "./GLBufferAttribute.js";
@@ -155,6 +156,8 @@ export class BufferGeometry<
155
156
  */
156
157
  index: BufferAttribute | null;
157
158
 
159
+ indirect: IndirectStorageBufferAttribute | null;
160
+
158
161
  /**
159
162
  * This hashmap has as id the name of the attribute to be set and as value the {@link THREE.BufferAttribute | buffer} to set it to. Rather than accessing this property directly,
160
163
  * use {@link setAttribute | .setAttribute} and {@link getAttribute | .getAttribute} to access attributes of this geometry.
@@ -233,6 +236,10 @@ export class BufferGeometry<
233
236
  */
234
237
  setIndex(index: BufferAttribute | number[] | null): this;
235
238
 
239
+ setIndirect(indirect: IndirectStorageBufferAttribute | null): this;
240
+
241
+ getIndirect(): IndirectStorageBufferAttribute | null;
242
+
236
243
  /**
237
244
  * Sets an {@link attributes | attribute} to this geometry with the specified name.
238
245
  * @remarks
@@ -352,8 +359,12 @@ export class BufferGeometry<
352
359
  center(): this;
353
360
 
354
361
  /**
355
- * Sets the attributes for this BufferGeometry from an array of points.
356
- * @param points
362
+ * Defines a geometry by creating a `position` attribute based on the given array of points. The array can hold
363
+ * instances of {@link Vector2} or {@link Vector3}. When using two-dimensional data, the `z` coordinate for all
364
+ * vertices is set to `0`.
365
+ *
366
+ * If the method is used with an existing `position` attribute, the vertex data are overwritten with the data from
367
+ * the array. The length of the array must match the vertex count.
357
368
  */
358
369
  setFromPoints(points: Vector3[] | Vector2[]): this;
359
370
 
@@ -1,5 +1,4 @@
1
1
  import {
2
- ColorSpace,
3
2
  MagnificationTextureFilter,
4
3
  MinificationTextureFilter,
5
4
  PixelFormatGPU,
@@ -20,7 +19,7 @@ export interface RenderTargetOptions {
20
19
  format?: number | undefined; // RGBAFormat
21
20
  type?: TextureDataType | undefined; // UnsignedByteType
22
21
  anisotropy?: number | undefined; // 1
23
- colorSpace?: ColorSpace | undefined;
22
+ colorSpace?: string | undefined;
24
23
  internalFormat?: PixelFormatGPU | null | undefined; // null
25
24
  depthBuffer?: boolean | undefined; // true
26
25
  stencilBuffer?: boolean | undefined; // false
@@ -11,9 +11,9 @@ export class FileLoader extends Loader<string | ArrayBuffer> {
11
11
  onError?: (err: unknown) => void,
12
12
  ): void;
13
13
 
14
- mimeType: undefined | MimeType;
15
- responseType: undefined | string;
14
+ mimeType: string | undefined;
15
+ responseType: string | undefined;
16
16
 
17
- setMimeType(mimeType: MimeType): FileLoader;
17
+ setMimeType(mimeType: string): FileLoader;
18
18
  setResponseType(responseType: string): FileLoader;
19
19
  }
@@ -20,11 +20,6 @@ export class LineBasicMaterial extends Material {
20
20
  */
21
21
  readonly isLineBasicMaterial: true;
22
22
 
23
- /**
24
- * @default 'LineBasicMaterial'
25
- */
26
- type: string;
27
-
28
23
  /**
29
24
  * @default 0xffffff
30
25
  */
@@ -16,11 +16,6 @@ export class LineDashedMaterial extends LineBasicMaterial {
16
16
  */
17
17
  readonly isLineDashedMaterial: true;
18
18
 
19
- /**
20
- * @default 'LineDashedMaterial'
21
- */
22
- type: string;
23
-
24
19
  /**
25
20
  * @default 1
26
21
  */