@types/three 0.177.0 → 0.178.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 (178) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/capabilities/WebGL.d.ts +0 -11
  3. three/examples/jsm/controls/TransformControls.d.ts +16 -1
  4. three/examples/jsm/helpers/TextureHelper.d.ts +2 -2
  5. three/examples/jsm/helpers/TextureHelperGPU.d.ts +2 -2
  6. three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
  7. three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
  8. three/examples/jsm/transpiler/AST.d.ts +77 -26
  9. three/examples/jsm/transpiler/TSLEncoder.d.ts +9 -3
  10. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +4 -4
  11. three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -2
  12. three/examples/jsm/tsl/display/BloomNode.d.ts +2 -2
  13. three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +20 -0
  14. three/examples/jsm/tsl/display/DenoiseNode.d.ts +4 -4
  15. three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +6 -6
  16. three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
  17. three/examples/jsm/tsl/display/FXAANode.d.ts +3 -3
  18. three/examples/jsm/tsl/display/FilmNode.d.ts +4 -4
  19. three/examples/jsm/tsl/display/GTAONode.d.ts +3 -3
  20. three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +5 -5
  21. three/examples/jsm/tsl/display/LensflareNode.d.ts +8 -8
  22. three/examples/jsm/tsl/display/Lut3DNode.d.ts +4 -4
  23. three/examples/jsm/tsl/display/MotionBlur.d.ts +4 -4
  24. three/examples/jsm/tsl/display/OutlineNode.d.ts +3 -3
  25. three/examples/jsm/tsl/display/RGBShiftNode.d.ts +3 -3
  26. three/examples/jsm/tsl/display/SMAANode.d.ts +3 -3
  27. three/examples/jsm/tsl/display/SSRNode.d.ts +5 -5
  28. three/examples/jsm/tsl/display/Sepia.d.ts +2 -2
  29. three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +3 -3
  30. three/examples/jsm/tsl/display/TransitionNode.d.ts +4 -4
  31. three/examples/jsm/tsl/display/hashBlur.d.ts +5 -5
  32. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +5 -5
  33. three/package.json +2 -2
  34. three/src/Three.TSL.d.ts +9 -16
  35. three/src/Three.WebGPU.d.ts +2 -0
  36. three/src/constants.d.ts +13 -5
  37. three/src/core/BufferGeometry.d.ts +6 -1
  38. three/src/core/GLBufferAttribute.d.ts +18 -1
  39. three/src/helpers/AxesHelper.d.ts +3 -1
  40. three/src/materials/LineBasicMaterial.d.ts +66 -34
  41. three/src/materials/LineDashedMaterial.d.ts +41 -21
  42. three/src/materials/Material.d.ts +408 -398
  43. three/src/materials/MeshBasicMaterial.d.ts +101 -62
  44. three/src/materials/MeshDepthMaterial.d.ts +71 -32
  45. three/src/materials/MeshDistanceMaterial.d.ts +65 -29
  46. three/src/materials/MeshLambertMaterial.d.ts +179 -103
  47. three/src/materials/MeshMatcapMaterial.d.ts +97 -55
  48. three/src/materials/MeshNormalMaterial.d.ts +76 -41
  49. three/src/materials/MeshPhongMaterial.d.ts +164 -100
  50. three/src/materials/MeshPhysicalMaterial.d.ts +164 -116
  51. three/src/materials/MeshStandardMaterial.d.ts +178 -91
  52. three/src/materials/MeshToonMaterial.d.ts +130 -81
  53. three/src/materials/PointsMaterial.d.ts +77 -30
  54. three/src/materials/RawShaderMaterial.d.ts +12 -7
  55. three/src/materials/ShaderMaterial.d.ts +186 -98
  56. three/src/materials/ShadowMaterial.d.ts +49 -23
  57. three/src/materials/SpriteMaterial.d.ts +62 -33
  58. three/src/materials/nodes/Line2NodeMaterial.d.ts +87 -40
  59. three/src/materials/nodes/LineBasicNodeMaterial.d.ts +35 -16
  60. three/src/materials/nodes/LineDashedNodeMaterial.d.ts +75 -20
  61. three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +49 -30
  62. three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -42
  63. three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +38 -26
  64. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +36 -22
  65. three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +68 -48
  66. three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +240 -65
  67. three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +99 -3
  68. three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +83 -47
  69. three/src/materials/nodes/MeshToonNodeMaterial.d.ts +42 -36
  70. three/src/materials/nodes/NodeMaterial.d.ts +417 -56
  71. three/src/materials/nodes/NodeMaterials.d.ts +3 -2
  72. three/src/materials/nodes/PointsNodeMaterial.d.ts +31 -7
  73. three/src/materials/nodes/ShadowNodeMaterial.d.ts +38 -11
  74. three/src/materials/nodes/SpriteNodeMaterial.d.ts +68 -20
  75. three/src/materials/nodes/VolumeNodeMaterial.d.ts +50 -14
  76. three/src/math/Color.d.ts +1 -1
  77. three/src/nodes/Nodes.d.ts +1 -3
  78. three/src/nodes/TSL.d.ts +4 -3
  79. three/src/nodes/accessors/AccessorsUtils.d.ts +3 -3
  80. three/src/nodes/accessors/Bitangent.d.ts +0 -2
  81. three/src/nodes/accessors/CubeTextureNode.d.ts +7 -7
  82. three/src/nodes/accessors/Normal.d.ts +19 -5
  83. three/src/nodes/accessors/ReferenceBaseNode.d.ts +1 -1
  84. three/src/nodes/accessors/StorageBufferNode.d.ts +3 -2
  85. three/src/nodes/accessors/StorageTextureNode.d.ts +5 -5
  86. three/src/nodes/accessors/Tangent.d.ts +0 -2
  87. three/src/nodes/accessors/TangentUtils.d.ts +22 -0
  88. three/src/nodes/accessors/Texture3DNode.d.ts +5 -4
  89. three/src/nodes/accessors/TextureBicubic.d.ts +4 -2
  90. three/src/nodes/accessors/TextureNode.d.ts +16 -16
  91. three/src/nodes/accessors/TextureSizeNode.d.ts +3 -3
  92. three/src/nodes/accessors/UniformArrayNode.d.ts +2 -7
  93. three/src/nodes/code/FunctionCallNode.d.ts +3 -1
  94. three/src/nodes/code/FunctionNode.d.ts +2 -2
  95. three/src/nodes/code/ScriptableNode.d.ts +2 -2
  96. three/src/nodes/core/AssignNode.d.ts +2 -2
  97. three/src/nodes/core/AttributeNode.d.ts +1 -1
  98. three/src/nodes/core/BypassNode.d.ts +2 -2
  99. three/src/nodes/core/CacheNode.d.ts +0 -2
  100. three/src/nodes/core/ContextNode.d.ts +3 -3
  101. three/src/nodes/core/StackNode.d.ts +3 -13
  102. three/src/nodes/core/SubBuildNode.d.ts +15 -0
  103. three/src/nodes/core/VarNode.d.ts +4 -4
  104. three/src/nodes/core/VaryingNode.d.ts +3 -3
  105. three/src/nodes/display/BlendModes.d.ts +12 -12
  106. three/src/nodes/display/BumpMapNode.d.ts +4 -3
  107. three/src/nodes/display/ColorAdjustment.d.ts +17 -17
  108. three/src/nodes/display/ColorSpaceFunctions.d.ts +3 -3
  109. three/src/nodes/display/ColorSpaceNode.d.ts +4 -4
  110. three/src/nodes/display/FrontFacingNode.d.ts +1 -0
  111. three/src/nodes/display/PosterizeNode.d.ts +3 -3
  112. three/src/nodes/display/RenderOutputNode.d.ts +2 -2
  113. three/src/nodes/display/ScreenNode.d.ts +0 -10
  114. three/src/nodes/display/ToneMappingFunctions.d.ts +7 -7
  115. three/src/nodes/display/ToneMappingNode.d.ts +6 -6
  116. three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -3
  117. three/src/nodes/fog/Fog.d.ts +10 -10
  118. three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +4 -4
  119. three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +2 -2
  120. three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +4 -4
  121. three/src/nodes/geometry/RangeNode.d.ts +9 -2
  122. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +20 -20
  123. three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
  124. three/src/nodes/lighting/PointShadowNode.d.ts +11 -11
  125. three/src/nodes/lighting/ShadowFilterNode.d.ts +11 -11
  126. three/src/nodes/materialx/MaterialXNodes.d.ts +59 -59
  127. three/src/nodes/materialx/lib/mx_hsv.d.ts +3 -3
  128. three/src/nodes/materialx/lib/mx_noise.d.ts +206 -206
  129. three/src/nodes/materialx/lib/mx_transform_color.d.ts +2 -2
  130. three/src/nodes/math/ConditionalNode.d.ts +4 -19
  131. three/src/nodes/math/Hash.d.ts +2 -2
  132. three/src/nodes/math/MathNode.d.ts +21 -17
  133. three/src/nodes/math/OperatorNode.d.ts +41 -52
  134. three/src/nodes/math/TriNoise3D.d.ts +6 -6
  135. three/src/nodes/pmrem/PMREMNode.d.ts +3 -3
  136. three/src/nodes/pmrem/PMREMUtils.d.ts +20 -20
  137. three/src/nodes/procedural/Checker.d.ts +2 -2
  138. three/src/nodes/shapes/Shapes.d.ts +2 -2
  139. three/src/nodes/tsl/TSLBase.d.ts +1 -0
  140. three/src/nodes/tsl/TSLCore.d.ts +176 -76
  141. three/src/nodes/utils/CubeMapNode.d.ts +2 -2
  142. three/src/nodes/utils/DebugNode.d.ts +2 -2
  143. three/src/nodes/utils/Discard.d.ts +2 -2
  144. three/src/nodes/utils/EquirectUV.d.ts +4 -0
  145. three/src/nodes/utils/LoopNode.d.ts +2 -7
  146. three/src/nodes/utils/MatcapUV.d.ts +4 -0
  147. three/src/nodes/utils/Oscillators.d.ts +5 -5
  148. three/src/nodes/utils/Packing.d.ts +3 -3
  149. three/src/nodes/utils/PostProcessingUtils.d.ts +9 -9
  150. three/src/nodes/utils/RTTNode.d.ts +3 -3
  151. three/src/nodes/utils/RemapNode.d.ts +9 -9
  152. three/src/nodes/utils/RotateNode.d.ts +3 -3
  153. three/src/nodes/utils/SampleNode.d.ts +16 -0
  154. three/src/nodes/utils/SpriteSheetUVNode.d.ts +4 -4
  155. three/src/nodes/utils/SpriteUtils.d.ts +2 -2
  156. three/src/nodes/utils/StorageArrayElementNode.d.ts +4 -3
  157. three/src/nodes/utils/TriplanarTextures.d.ts +20 -0
  158. three/src/nodes/utils/UVUtils.d.ts +8 -7
  159. three/src/nodes/utils/ViewportUtils.d.ts +2 -2
  160. three/src/objects/LOD.d.ts +1 -1
  161. three/src/renderers/WebGLRenderer.d.ts +1 -1
  162. three/src/renderers/common/Backend.d.ts +3 -3
  163. three/src/renderers/common/RenderObject.d.ts +10 -2
  164. three/src/renderers/common/Renderer.d.ts +5 -5
  165. three/src/renderers/common/Storage3DTexture.d.ts +40 -0
  166. three/src/renderers/common/StorageArrayTexture.d.ts +29 -0
  167. three/src/renderers/common/Textures.d.ts +2 -2
  168. three/src/renderers/common/XRRenderTarget.d.ts +3 -2
  169. three/src/renderers/common/nodes/NodeLibrary.d.ts +4 -9
  170. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +1 -1
  171. three/src/renderers/common/nodes/Nodes.d.ts +1 -1
  172. three/src/renderers/webgpu/WebGPURenderer.d.ts +3 -0
  173. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +65 -0
  174. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +9 -0
  175. three/src/nodes/utils/EquirectUVNode.d.ts +0 -8
  176. three/src/nodes/utils/MatcapUVNode.d.ts +0 -8
  177. three/src/nodes/utils/TriplanarTexturesNode.d.ts +0 -36
  178. three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +0 -5
@@ -1,28 +1,28 @@
1
1
  import { Light } from "../../lights/Light.js";
2
2
  import NodeMaterial from "../../materials/nodes/NodeMaterial.js";
3
3
  import Node from "../core/Node.js";
4
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
4
+ import { ShaderNodeObject } from "../tsl/TSLCore.js";
5
5
 
6
6
  export const BasicShadowFilter: (
7
- depthTexture: NodeRepresentation,
8
- shadowCoord: NodeRepresentation,
7
+ depthTexture: Node,
8
+ shadowCoord: Node,
9
9
  ) => ShaderNodeObject<Node>;
10
10
 
11
11
  export const PCFShadowFilter: (
12
- depthTexture: NodeRepresentation,
13
- shadowCoord: NodeRepresentation,
14
- shadow: NodeRepresentation,
12
+ depthTexture: Node,
13
+ shadowCoord: Node,
14
+ shadow: Node,
15
15
  ) => ShaderNodeObject<Node>;
16
16
 
17
17
  export const PCFSoftShadowFilter: (
18
- depthTexture: NodeRepresentation,
19
- shadowCoord: NodeRepresentation,
20
- shadow: NodeRepresentation,
18
+ depthTexture: Node,
19
+ shadowCoord: Node,
20
+ shadow: Node,
21
21
  ) => ShaderNodeObject<Node>;
22
22
 
23
23
  export const VSMShadowFilter: (
24
- depthTexture: NodeRepresentation,
25
- shadowCoord: NodeRepresentation,
24
+ depthTexture: Node,
25
+ shadowCoord: Node,
26
26
  ) => ShaderNodeObject<Node>;
27
27
 
28
28
  export const getShadowMaterial: (light: Light) => NodeMaterial;
@@ -1,107 +1,107 @@
1
1
  import Node from "../core/Node.js";
2
2
  import MathNode from "../math/MathNode.js";
3
- import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
3
+ import { ShaderNodeObject } from "../tsl/TSLCore.js";
4
4
  import { mx_hsvtorgb, mx_rgbtohsv } from "./lib/mx_hsv.js";
5
5
  import { mx_srgb_texture_to_lin_rec709 } from "./lib/mx_transform_color.js";
6
6
 
7
- export function mx_aastep(threshold: NodeRepresentation, value: NodeRepresentation): ShaderNodeObject<MathNode>;
7
+ export function mx_aastep(threshold: Node | number, value: Node | number): ShaderNodeObject<MathNode>;
8
8
 
9
9
  export function mx_ramplr(
10
- valuel: NodeRepresentation,
11
- valuer: NodeRepresentation,
12
- texcoord?: NodeRepresentation,
10
+ valuel: Node | number,
11
+ valuer: Node | number,
12
+ texcoord?: Node,
13
13
  ): ShaderNodeObject<MathNode>;
14
14
  export function mx_ramptb(
15
- valuet: NodeRepresentation,
16
- valueb: NodeRepresentation,
17
- texcoord?: NodeRepresentation,
15
+ valuet: Node | number,
16
+ valueb: Node | number,
17
+ texcoord?: Node,
18
18
  ): ShaderNodeObject<MathNode>;
19
19
 
20
20
  export function mx_splitlr(
21
- valuel: NodeRepresentation,
22
- valuer: NodeRepresentation,
23
- center: NodeRepresentation,
24
- texcoord?: NodeRepresentation,
21
+ valuel: Node | number,
22
+ valuer: Node | number,
23
+ center: Node | number,
24
+ texcoord?: Node,
25
25
  ): ShaderNodeObject<MathNode>;
26
26
  export function mx_splittb(
27
- valuet: NodeRepresentation,
28
- valueb: NodeRepresentation,
29
- center: NodeRepresentation,
30
- texcoord?: NodeRepresentation,
27
+ valuet: Node | number,
28
+ valueb: Node | number,
29
+ center: Node | number,
30
+ texcoord?: Node,
31
31
  ): ShaderNodeObject<MathNode>;
32
32
 
33
33
  export function mx_transform_uv(
34
- uv_scale?: NodeRepresentation,
35
- uv_offset?: NodeRepresentation,
36
- uv_geo?: NodeRepresentation,
34
+ uv_scale?: Node | number,
35
+ uv_offset?: Node | number,
36
+ uv_geo?: Node,
37
37
  ): ShaderNodeObject<Node>;
38
38
 
39
- export function mx_safepower(in1: NodeRepresentation, in2?: NodeRepresentation): ShaderNodeObject<Node>;
39
+ export function mx_safepower(in1: Node | number, in2?: Node | number): ShaderNodeObject<Node>;
40
40
 
41
41
  export function mx_contrast(
42
- input: NodeRepresentation,
43
- amount?: NodeRepresentation,
44
- pivot?: NodeRepresentation,
42
+ input: Node | number,
43
+ amount?: Node | number,
44
+ pivot?: Node | number,
45
45
  ): ShaderNodeObject<Node>;
46
46
 
47
47
  export function mx_noise_float(
48
- texcoord?: NodeRepresentation,
49
- amplitude?: NodeRepresentation,
50
- pivot?: NodeRepresentation,
48
+ texcoord?: Node,
49
+ amplitude?: Node | number,
50
+ pivot?: Node | number,
51
51
  ): ShaderNodeObject<Node>;
52
52
  export function mx_noise_vec3(
53
- texcoord?: NodeRepresentation,
54
- amplitude?: NodeRepresentation,
55
- pivot?: NodeRepresentation,
53
+ texcoord?: Node,
54
+ amplitude?: Node | number,
55
+ pivot?: Node | number,
56
56
  ): ShaderNodeObject<Node>;
57
57
  export function mx_noise_vec4(
58
- texcoord?: NodeRepresentation,
59
- amplitude?: NodeRepresentation,
60
- pivot?: NodeRepresentation,
58
+ texcoord?: Node,
59
+ amplitude?: Node | number,
60
+ pivot?: Node | number,
61
61
  ): ShaderNodeObject<Node>;
62
62
 
63
63
  export function mx_worley_noise_float(
64
- texcoord?: NodeRepresentation,
65
- jitter?: NodeRepresentation,
64
+ texcoord?: Node,
65
+ jitter?: Node | number,
66
66
  ): ShaderNodeObject<Node>;
67
67
  export function mx_worley_noise_vec2(
68
- texcoord?: NodeRepresentation,
69
- jitter?: NodeRepresentation,
68
+ texcoord?: Node,
69
+ jitter?: Node | number,
70
70
  ): ShaderNodeObject<Node>;
71
71
  export function mx_worley_noise_vec3(
72
- texcoord?: NodeRepresentation,
73
- jitter?: NodeRepresentation,
72
+ texcoord?: Node,
73
+ jitter?: Node | number,
74
74
  ): ShaderNodeObject<Node>;
75
75
 
76
- export function mx_cell_noise_float(texcoord?: NodeRepresentation): ShaderNodeObject<Node>;
76
+ export function mx_cell_noise_float(texcoord?: Node): ShaderNodeObject<Node>;
77
77
 
78
78
  export function mx_fractal_noise_float(
79
- position?: NodeRepresentation,
80
- octaves?: NodeRepresentation,
81
- lacunarity?: NodeRepresentation,
82
- diminish?: NodeRepresentation,
83
- amplitude?: NodeRepresentation,
79
+ position?: Node,
80
+ octaves?: Node | number,
81
+ lacunarity?: Node | number,
82
+ diminish?: Node | number,
83
+ amplitude?: Node | number,
84
84
  ): ShaderNodeObject<Node>;
85
85
  export function mx_fractal_noise_vec2(
86
- position?: NodeRepresentation,
87
- octaves?: NodeRepresentation,
88
- lacunarity?: NodeRepresentation,
89
- diminish?: NodeRepresentation,
90
- amplitude?: NodeRepresentation,
86
+ position?: Node,
87
+ octaves?: Node | number,
88
+ lacunarity?: Node | number,
89
+ diminish?: Node | number,
90
+ amplitude?: Node | number,
91
91
  ): ShaderNodeObject<Node>;
92
92
  export function mx_fractal_noise_vec3(
93
- position?: NodeRepresentation,
94
- octaves?: NodeRepresentation,
95
- lacunarity?: NodeRepresentation,
96
- diminish?: NodeRepresentation,
97
- amplitude?: NodeRepresentation,
93
+ position?: Node,
94
+ octaves?: Node | number,
95
+ lacunarity?: Node | number,
96
+ diminish?: Node | number,
97
+ amplitude?: Node | number,
98
98
  ): ShaderNodeObject<Node>;
99
99
  export function mx_fractal_noise_vec4(
100
- position?: NodeRepresentation,
101
- octaves?: NodeRepresentation,
102
- lacunarity?: NodeRepresentation,
103
- diminish?: NodeRepresentation,
104
- amplitude?: NodeRepresentation,
100
+ position?: Node,
101
+ octaves?: Node | number,
102
+ lacunarity?: Node | number,
103
+ diminish?: Node | number,
104
+ amplitude?: Node | number,
105
105
  ): ShaderNodeObject<Node>;
106
106
 
107
107
  export { mx_hsvtorgb, mx_rgbtohsv, mx_srgb_texture_to_lin_rec709 };
@@ -1,6 +1,6 @@
1
1
  import Node from "../../core/Node.js";
2
- import { NodeRepresentation, ShaderNodeObject } from "../../tsl/TSLCore.js";
2
+ import { ShaderNodeObject } from "../../tsl/TSLCore.js";
3
3
 
4
- export const mx_hsvtorgb: (hsv: NodeRepresentation) => ShaderNodeObject<Node>;
4
+ export const mx_hsvtorgb: (hsv: Node) => ShaderNodeObject<Node>;
5
5
 
6
- export const mx_rgbtohsv: (c_immutable: NodeRepresentation) => ShaderNodeObject<Node>;
6
+ export const mx_rgbtohsv: (c_immutable: Node) => ShaderNodeObject<Node>;