@types/three 0.168.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 (213) hide show
  1. three/README.md +1 -1
  2. three/build/three.webgpu.nodes.d.ts +1 -0
  3. three/build/three.webgpu.nodes.min.d.ts +1 -0
  4. three/examples/jsm/Addons.d.ts +3 -10
  5. three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
  6. three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
  7. three/examples/jsm/controls/ArcballControls.d.ts +1 -1
  8. three/examples/jsm/controls/DragControls.d.ts +0 -15
  9. three/examples/jsm/controls/TransformControls.d.ts +195 -24
  10. three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
  11. three/examples/jsm/csm/CSMHelper.d.ts +2 -1
  12. three/examples/jsm/csm/CSMShadowNode.d.ts +46 -0
  13. three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
  14. three/examples/jsm/exporters/EXRExporter.d.ts +7 -2
  15. three/examples/jsm/exporters/GLTFExporter.d.ts +20 -3
  16. three/examples/jsm/exporters/KTX2Exporter.d.ts +3 -1
  17. three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
  18. three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
  19. three/examples/jsm/geometries/DecalGeometry.d.ts +9 -3
  20. three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
  21. three/examples/jsm/helpers/LightProbeHelper.d.ts +5 -3
  22. three/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
  23. three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
  24. three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
  25. three/examples/jsm/lights/LightProbeGenerator.d.ts +5 -1
  26. three/examples/jsm/lines/Line2.d.ts +15 -1
  27. three/examples/jsm/lines/LineGeometry.d.ts +18 -1
  28. three/examples/jsm/lines/LineMaterial.d.ts +65 -12
  29. three/examples/jsm/lines/LineSegments2.d.ts +25 -2
  30. three/examples/jsm/lines/LineSegmentsGeometry.d.ts +46 -9
  31. three/examples/jsm/lines/Wireframe.d.ts +5 -2
  32. three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
  33. three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
  34. three/examples/jsm/loaders/DRACOLoader.d.ts +6 -0
  35. three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
  36. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
  37. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
  38. three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
  39. three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
  40. three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
  41. three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
  42. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
  43. three/examples/jsm/math/ColorSpaces.d.ts +11 -0
  44. three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
  45. three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
  46. three/examples/jsm/modifiers/CurveModifier.d.ts +7 -3
  47. three/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
  48. three/examples/jsm/objects/Lensflare.d.ts +13 -9
  49. three/examples/jsm/objects/LensflareMesh.d.ts +21 -0
  50. three/examples/jsm/renderers/SVGRenderer.d.ts +2 -2
  51. three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +1 -5
  52. three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
  53. three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
  54. three/examples/jsm/tsl/display/BleachBypass.d.ts +3 -0
  55. three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +1 -5
  56. three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +2 -6
  57. three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +1 -5
  58. three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
  59. three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +1 -3
  60. three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +1 -3
  61. three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +2 -8
  62. three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
  63. three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
  64. three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
  65. three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +1 -2
  66. three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
  67. three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
  68. three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
  69. three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +1 -4
  70. three/examples/jsm/tsl/display/SMAANode.d.ts +17 -0
  71. three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
  72. three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
  73. three/examples/jsm/tsl/display/Sepia.d.ts +3 -0
  74. three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +1 -3
  75. three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +2 -5
  76. three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
  77. three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
  78. three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +1 -5
  79. three/examples/jsm/tsl/display/hashBlur.d.ts +7 -0
  80. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +22 -0
  81. three/examples/jsm/utils/GeometryCompressionUtils.d.ts +20 -4
  82. three/examples/jsm/utils/ShadowMapViewer.d.ts +8 -6
  83. three/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
  84. three/examples/jsm/utils/SkeletonUtils.d.ts +25 -5
  85. three/examples/jsm/utils/WebGPUTextureUtils.d.ts +3 -0
  86. three/package.json +4 -3
  87. three/src/Three.WebGPU.Nodes.d.ts +205 -0
  88. three/src/Three.WebGPU.d.ts +7 -2
  89. three/src/Three.d.ts +2 -7
  90. three/src/audio/Audio.d.ts +4 -1
  91. three/src/constants.d.ts +1 -9
  92. three/src/core/BufferAttribute.d.ts +0 -15
  93. three/src/core/BufferGeometry.d.ts +13 -2
  94. three/src/core/InterleavedBuffer.d.ts +0 -12
  95. three/src/core/Object3D.d.ts +1 -1
  96. three/src/core/Raycaster.d.ts +2 -1
  97. three/src/core/RenderTarget.d.ts +1 -2
  98. three/src/extras/Controls.d.ts +3 -3
  99. three/src/loaders/FileLoader.d.ts +3 -3
  100. three/src/loaders/MaterialLoader.d.ts +2 -0
  101. three/src/loaders/nodes/NodeLoader.d.ts +5 -0
  102. three/src/loaders/nodes/NodeMaterialLoader.d.ts +3 -0
  103. three/src/loaders/nodes/NodeObjectLoader.d.ts +12 -0
  104. three/src/materials/LineBasicMaterial.d.ts +0 -5
  105. three/src/materials/LineDashedMaterial.d.ts +0 -5
  106. three/src/materials/Material.d.ts +4 -6
  107. three/src/materials/MeshBasicMaterial.d.ts +0 -5
  108. three/src/materials/MeshDepthMaterial.d.ts +0 -5
  109. three/src/materials/MeshDistanceMaterial.d.ts +0 -5
  110. three/src/materials/MeshLambertMaterial.d.ts +0 -5
  111. three/src/materials/MeshMatcapMaterial.d.ts +0 -5
  112. three/src/materials/MeshNormalMaterial.d.ts +0 -5
  113. three/src/materials/MeshPhongMaterial.d.ts +0 -5
  114. three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
  115. three/src/materials/MeshStandardMaterial.d.ts +0 -5
  116. three/src/materials/MeshToonMaterial.d.ts +0 -5
  117. three/src/materials/PointsMaterial.d.ts +0 -5
  118. three/src/materials/RawShaderMaterial.d.ts +0 -2
  119. three/src/materials/ShaderMaterial.d.ts +0 -5
  120. three/src/materials/ShadowMaterial.d.ts +0 -5
  121. three/src/materials/SpriteMaterial.d.ts +0 -5
  122. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
  123. three/src/materials/nodes/NodeMaterial.d.ts +4 -4
  124. three/src/materials/nodes/NodeMaterials.d.ts +19 -16
  125. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +96 -0
  126. three/src/math/Color.d.ts +39 -22
  127. three/src/math/ColorManagement.d.ts +24 -24
  128. three/src/math/Quaternion.d.ts +4 -3
  129. three/src/math/Triangle.d.ts +24 -0
  130. three/src/math/Vector4.d.ts +2 -0
  131. three/src/nodes/Nodes.d.ts +3 -23
  132. three/src/nodes/TSL.d.ts +75 -187
  133. three/src/nodes/accessors/BufferAttributeNode.d.ts +1 -0
  134. three/src/nodes/accessors/Camera.d.ts +0 -1
  135. three/src/nodes/accessors/MaterialNode.d.ts +0 -1
  136. three/src/nodes/accessors/ModelNode.d.ts +7 -3
  137. three/src/nodes/accessors/Normal.d.ts +6 -0
  138. three/src/nodes/accessors/Object3DNode.d.ts +1 -5
  139. three/src/nodes/accessors/SceneNode.d.ts +2 -0
  140. three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
  141. three/src/nodes/accessors/VelocityNode.d.ts +6 -1
  142. three/src/nodes/code/ScriptableNode.d.ts +1 -1
  143. three/src/nodes/core/Node.d.ts +3 -12
  144. three/src/nodes/core/NodeUtils.d.ts +5 -1
  145. three/src/nodes/core/StackNode.d.ts +4 -4
  146. three/src/nodes/core/StructTypeNode.d.ts +1 -0
  147. three/src/nodes/core/UniformNode.d.ts +1 -0
  148. three/src/nodes/core/VarNode.d.ts +12 -1
  149. three/src/nodes/display/ColorAdjustment.d.ts +29 -0
  150. three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
  151. three/src/nodes/display/ColorSpaceNode.d.ts +33 -8
  152. three/src/nodes/display/RenderOutputNode.d.ts +4 -4
  153. three/src/nodes/display/ScreenNode.d.ts +48 -0
  154. three/src/nodes/display/ToneMappingFunctions.d.ts +6 -6
  155. three/src/nodes/display/ToonOutlinePassNode.d.ts +24 -0
  156. three/src/nodes/display/ViewportDepthNode.d.ts +2 -0
  157. three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
  158. three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -0
  159. three/src/nodes/functions/material/getShIrradianceAt.d.ts +6 -0
  160. three/src/nodes/gpgpu/ComputeNode.d.ts +5 -0
  161. three/src/nodes/lighting/LightsNode.d.ts +7 -2
  162. three/src/nodes/lighting/PointLightNode.d.ts +11 -1
  163. three/src/nodes/lighting/ShadowNode.d.ts +12 -0
  164. three/src/nodes/utils/Discard.d.ts +1 -1
  165. three/src/nodes/utils/Oscillators.d.ts +7 -0
  166. three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
  167. three/src/nodes/utils/ReflectorNode.d.ts +17 -4
  168. three/src/nodes/utils/Timer.d.ts +21 -0
  169. three/src/objects/BatchedMesh.d.ts +78 -0
  170. three/src/objects/Group.d.ts +0 -6
  171. three/src/objects/LOD.d.ts +7 -0
  172. three/src/renderers/WebGLRenderer.d.ts +24 -23
  173. three/src/renderers/common/BundleGroup.d.ts +10 -0
  174. three/src/renderers/common/ClippingContext.d.ts +1 -1
  175. three/src/renderers/common/Constants.d.ts +2 -1
  176. three/src/renderers/common/Geometries.d.ts +1 -0
  177. three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
  178. three/src/renderers/common/Lighting.d.ts +15 -0
  179. three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
  180. three/src/renderers/common/RenderBundles.d.ts +3 -3
  181. three/src/renderers/common/RenderContext.d.ts +2 -2
  182. three/src/renderers/common/RenderList.d.ts +7 -3
  183. three/src/renderers/common/RenderLists.d.ts +3 -1
  184. three/src/renderers/common/RenderObject.d.ts +20 -1
  185. three/src/renderers/common/Renderer.d.ts +43 -10
  186. three/src/renderers/common/extras/PMREMGenerator.d.ts +5 -1
  187. three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -2
  188. three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -7
  189. three/src/renderers/common/nodes/Nodes.d.ts +8 -0
  190. three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -0
  191. three/src/renderers/webgl/WebGLPrograms.d.ts +4 -10
  192. three/src/renderers/webgl/WebGLState.d.ts +13 -10
  193. three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
  194. three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
  195. three/src/renderers/webgpu/WebGPURenderer.d.ts +7 -3
  196. three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +5 -0
  197. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +5 -0
  198. three/src/textures/CompressedTexture.d.ts +1 -2
  199. three/src/textures/CubeTexture.d.ts +1 -2
  200. three/src/textures/DataTexture.d.ts +1 -2
  201. three/src/textures/Texture.d.ts +3 -4
  202. three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
  203. three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +0 -16
  204. three/examples/jsm/loaders/TiltLoader.d.ts +0 -7
  205. three/examples/jsm/utils/GPUStatsPanel.d.ts +0 -12
  206. three/examples/jsm/utils/PackedPhongMaterial.d.ts +0 -10
  207. three/src/nodes/display/BleachBypass.d.ts +0 -4
  208. three/src/nodes/display/Sepia.d.ts +0 -4
  209. three/src/nodes/display/ViewportNode.d.ts +0 -38
  210. three/src/nodes/utils/OscNode.d.ts +0 -25
  211. three/src/nodes/utils/TimerNode.d.ts +0 -25
  212. three/src/renderers/common/StandardRenderer.d.ts +0 -12
  213. /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
@@ -0,0 +1,21 @@
1
+ import { Color, Mesh, Texture } from "three";
2
+
3
+ declare class LensflareMesh extends Mesh {
4
+ readonly isLensflare: true;
5
+
6
+ constructor();
7
+
8
+ addElement: (element: LensflareElement) => void;
9
+ dispose: () => void;
10
+ }
11
+
12
+ declare class LensflareElement {
13
+ texture: Texture;
14
+ size: number;
15
+ distance: number;
16
+ color: Color;
17
+
18
+ constructor(texture: Texture, size?: number, distance?: number, color?: Color);
19
+ }
20
+
21
+ export { LensflareElement, LensflareMesh };
@@ -1,4 +1,4 @@
1
- import { Camera, Color, ColorSpace, Object3D, Scene } from "three";
1
+ import { Camera, Color, Object3D, Scene } from "three";
2
2
 
3
3
  export class SVGObject extends Object3D {
4
4
  constructor(node: SVGElement);
@@ -12,7 +12,7 @@ export class SVGRenderer {
12
12
  sortObjects: boolean;
13
13
  sortElements: boolean;
14
14
  overdraw: number;
15
- outputColorSpace: ColorSpace;
15
+ outputColorSpace: string;
16
16
  info: { render: { vertices: number; faces: number } };
17
17
 
18
18
  getSize(): { width: number; height: number };
@@ -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 { ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Node, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
6
2
 
7
3
  export default class AfterImageNode extends TempNode {
8
4
  textureNode: TextureNode;
@@ -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 AnaglyphPassNode extends StereoCompositePassNode {
@@ -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>;
@@ -1,5 +1,21 @@
1
- import { Mesh } from "three";
1
+ import { BufferGeometry, Mesh } from "three";
2
2
 
3
- export function compressNormals(mesh: Mesh, encodeMethod: string): void;
4
- export function compressPositions(mesh: Mesh): void;
5
- export function compressUvs(mesh: Mesh): void;
3
+ /**
4
+ * Make the input geometry's normal attribute encoded and compressed by 3 different methods.
5
+ */
6
+ declare function compressNormals(
7
+ geometry: BufferGeometry,
8
+ encodeMethod: "DEFAULT" | "OCT1Byte" | "OCT2Byte" | "ANGLES",
9
+ ): void;
10
+
11
+ /**
12
+ * Make the input geometry's position attribute encoded and compressed.
13
+ */
14
+ declare function compressPositions(geometry: BufferGeometry): void;
15
+
16
+ /**
17
+ * Make the input geometry's uv attribute encoded and compressed.
18
+ */
19
+ declare function compressUvs(geometry: BufferGeometry): void;
20
+
21
+ export { compressNormals, compressPositions, compressUvs };
@@ -12,13 +12,15 @@ export interface Position {
12
12
  set: (x: number, y: number) => void;
13
13
  }
14
14
 
15
- export class ShadowMapViewer {
16
- constructor(light: Light);
17
-
15
+ declare class ShadowMapViewer {
18
16
  enabled: boolean;
19
17
  size: Size;
20
18
  position: Position;
21
- render(renderer: Renderer): void;
22
- updateForWindowResize(): void;
23
- update(): void;
19
+ render: (renderer: Renderer) => void;
20
+ updateForWindowResize: () => void;
21
+ update: () => void;
22
+
23
+ constructor(light: Light);
24
24
  }
25
+
26
+ export { ShadowMapViewer };
@@ -0,0 +1,26 @@
1
+ import { Light, WebGPURenderer } from "three/webgpu";
2
+
3
+ export interface Size {
4
+ width: number;
5
+ height: number;
6
+ set: (width: number, height: number) => void;
7
+ }
8
+
9
+ export interface Position {
10
+ x: number;
11
+ y: number;
12
+ set: (x: number, y: number) => void;
13
+ }
14
+
15
+ declare class ShadowMapViewer {
16
+ enabled: boolean;
17
+ size: Size;
18
+ position: Position;
19
+ render: (renderer: WebGPURenderer) => void;
20
+ updateForWindowResize: () => void;
21
+ update: () => void;
22
+
23
+ constructor(light: Light);
24
+ }
25
+
26
+ export { ShadowMapViewer };
@@ -1,12 +1,32 @@
1
- import { AnimationClip, Object3D, Skeleton } from "three";
1
+ import { AnimationClip, Bone, Object3D, Skeleton, Vector3 } from "three";
2
2
 
3
- export function clone(source: Object3D): Object3D;
3
+ export interface RetargetOptions {
4
+ preserveBoneMatrix?: boolean | undefined;
5
+ preserveHipPosition?: boolean | undefined;
6
+ useTargetMatrix?: boolean | undefined;
7
+ hip?: string | undefined;
8
+ hipInfluence?: Vector3 | undefined;
9
+ scale?: number | undefined;
10
+ names?: { [boneName: string]: string } | undefined;
11
+ getBoneName?: ((bone: Bone) => string) | undefined;
12
+ hipPosition?: Vector3 | undefined;
13
+ }
4
14
 
5
- export function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options: {}): void;
15
+ declare function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options?: RetargetOptions): void;
6
16
 
7
- export function retargetClip(
17
+ export interface RetargetClipOptions extends RetargetOptions {
18
+ useFirstFramePosition?: boolean | undefined;
19
+ fps?: number | undefined;
20
+ trim?: [number, number] | undefined;
21
+ }
22
+
23
+ declare function retargetClip(
8
24
  target: Skeleton | Object3D,
9
25
  source: Skeleton | Object3D,
10
26
  clip: AnimationClip,
11
- options: {},
27
+ options?: RetargetClipOptions,
12
28
  ): AnimationClip;
29
+
30
+ declare function clone(source: Object3D): Object3D;
31
+
32
+ export { clone, retarget, retargetClip };
@@ -0,0 +1,3 @@
1
+ import { Texture, WebGPURenderer } from "three/webgpu";
2
+
3
+ export function decompress(blitTexture: Texture, maxTextureSize?: number, renderer?: WebGPURenderer): Promise<Texture>;
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.168.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": "246996b31ec2b1d960db45a72651460f27348c47e1babab88c4c9d74a3510060",
51
- "typeScriptVersion": "4.8"
50
+ "peerDependencies": {},
51
+ "typesPublisherContentHash": "943f8157acfa9033e8e899a7ffe93172eb51ec72456ae0060fc93bd214da1770",
52
+ "typeScriptVersion": "4.9"
52
53
  }