@types/three 0.184.0 → 0.185.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 (208) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +2 -0
  3. three/examples/jsm/controls/FirstPersonControls.d.ts +9 -0
  4. three/examples/jsm/controls/OrbitControls.d.ts +2 -2
  5. three/examples/jsm/controls/TransformControls.d.ts +32 -1
  6. three/examples/jsm/csm/CSMFrustum.d.ts +73 -13
  7. three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
  8. three/examples/jsm/exporters/GLTFExporter.d.ts +2 -2
  9. three/examples/jsm/exporters/PLYExporter.d.ts +5 -4
  10. three/examples/jsm/exporters/USDZExporter.d.ts +5 -1
  11. three/examples/jsm/generators/CityGenerator.d.ts +75 -0
  12. three/examples/jsm/generators/ForestGenerator.d.ts +79 -0
  13. three/examples/jsm/generators/TerrainGenerator.d.ts +67 -0
  14. three/examples/jsm/generators/TreeGenerator.d.ts +97 -0
  15. three/examples/jsm/generators/city/SidewalkGenerator.d.ts +40 -0
  16. three/examples/jsm/generators/city/SkyscraperGenerator.d.ts +83 -0
  17. three/examples/jsm/geometries/LoftGeometry.d.ts +83 -0
  18. three/examples/jsm/inspector/tabs/Parameters.d.ts +5 -2
  19. three/examples/jsm/lighting/ClusteredLighting.d.ts +45 -0
  20. three/examples/jsm/lighting/LightProbeGrid.d.ts +131 -13
  21. three/examples/jsm/loaders/DRACOLoader.d.ts +20 -6
  22. three/examples/jsm/loaders/EXRLoader.d.ts +2 -12
  23. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
  24. three/examples/jsm/loaders/HDRLoader.d.ts +2 -12
  25. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -1
  26. three/examples/jsm/loaders/LWOLoader.d.ts +6 -0
  27. three/examples/jsm/loaders/RGBELoader.d.ts +1 -7
  28. three/examples/jsm/loaders/SVGLoader.d.ts +9 -6
  29. three/examples/jsm/loaders/TGALoader.d.ts +2 -2
  30. three/examples/jsm/loaders/TIFFLoader.d.ts +2 -11
  31. three/examples/jsm/loaders/USDLoader.d.ts +6 -1
  32. three/examples/jsm/misc/TileCreasedNormalsPlugin.d.ts +49 -0
  33. three/examples/jsm/objects/MarchingCubes.d.ts +2 -2
  34. three/examples/jsm/objects/Reflector.d.ts +38 -5
  35. three/examples/jsm/objects/SkyMesh.d.ts +1 -1
  36. three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
  37. three/examples/jsm/tsl/display/BloomNode.d.ts +23 -6
  38. three/examples/jsm/tsl/display/ImportanceSampledEnvironment.d.ts +84 -0
  39. three/examples/jsm/tsl/display/RecurrentDenoiseNode.d.ts +89 -0
  40. three/examples/jsm/tsl/display/SSAAPassNode.d.ts +0 -2
  41. three/examples/jsm/tsl/display/SSGINode.d.ts +4 -1
  42. three/examples/jsm/tsl/display/SSRNode.d.ts +303 -30
  43. three/examples/jsm/tsl/display/TRAANode.d.ts +1 -1
  44. three/examples/jsm/tsl/display/TemporalReprojectNode.d.ts +64 -0
  45. three/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +54 -0
  46. three/examples/jsm/tsl/math/curlNoise.d.ts +38 -0
  47. three/examples/jsm/tsl/utils/GroundedSkybox.d.ts +17 -0
  48. three/examples/jsm/tsl/utils/RNoise.d.ts +12 -0
  49. three/examples/jsm/tsl/utils/SpecularHelpers.d.ts +20 -0
  50. three/examples/jsm/webxr/WebGLXRFallback.d.ts +14 -0
  51. three/package.json +3 -3
  52. three/src/Three.TSL.d.ts +10 -3
  53. three/src/Three.WebGPU.Nodes.d.ts +2 -2
  54. three/src/Three.WebGPU.d.ts +5 -3
  55. three/src/animation/AnimationClip.d.ts +0 -10
  56. three/src/cameras/Camera.d.ts +1 -1
  57. three/src/core/InterleavedBuffer.d.ts +1 -1
  58. three/src/core/Object3D.d.ts +8 -4
  59. three/src/core/RenderTarget.d.ts +11 -0
  60. three/src/core/Timer.d.ts +1 -1
  61. three/src/core/UniformsGroup.d.ts +1 -1
  62. three/src/extras/Controls.d.ts +6 -5
  63. three/src/extras/core/ShapePath.d.ts +61 -65
  64. three/src/loaders/DataTextureLoader.d.ts +37 -3
  65. three/src/loaders/MaterialLoader.d.ts +8 -0
  66. three/src/materials/LineBasicMaterial.d.ts +5 -0
  67. three/src/materials/Material.d.ts +9 -1
  68. three/src/materials/MeshBasicMaterial.d.ts +30 -0
  69. three/src/materials/MeshDepthMaterial.d.ts +13 -0
  70. three/src/materials/MeshDistanceMaterial.d.ts +13 -0
  71. three/src/materials/MeshLambertMaterial.d.ts +50 -1
  72. three/src/materials/MeshMatcapMaterial.d.ts +31 -1
  73. three/src/materials/MeshNormalMaterial.d.ts +11 -1
  74. three/src/materials/MeshPhongMaterial.d.ts +50 -1
  75. three/src/materials/MeshPhysicalMaterial.d.ts +50 -0
  76. three/src/materials/MeshStandardMaterial.d.ts +53 -1
  77. three/src/materials/MeshToonMaterial.d.ts +43 -1
  78. three/src/materials/PointsMaterial.d.ts +9 -0
  79. three/src/materials/ShaderMaterial.d.ts +2 -0
  80. three/src/materials/SpriteMaterial.d.ts +9 -0
  81. three/src/materials/nodes/Line2NodeMaterial.d.ts +18 -13
  82. three/src/materials/nodes/NodeMaterial.d.ts +33 -13
  83. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +0 -84
  84. three/src/math/Box2.d.ts +3 -3
  85. three/src/math/Box3.d.ts +255 -19
  86. three/src/math/Color.d.ts +10 -10
  87. three/src/math/FrustumArray.d.ts +75 -16
  88. three/src/math/Interpolant.d.ts +111 -8
  89. three/src/math/Matrix2.d.ts +1 -1
  90. three/src/math/Matrix3.d.ts +10 -1
  91. three/src/math/Matrix4.d.ts +329 -105
  92. three/src/math/Vector2.d.ts +1 -2
  93. three/src/math/Vector3.d.ts +3 -4
  94. three/src/math/Vector4.d.ts +1 -2
  95. three/src/math/interpolants/BezierInterpolant.d.ts +19 -3
  96. three/src/math/interpolants/CubicInterpolant.d.ts +18 -3
  97. three/src/math/interpolants/DiscreteInterpolant.d.ts +8 -3
  98. three/src/math/interpolants/LinearInterpolant.d.ts +7 -3
  99. three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +7 -3
  100. three/src/nodes/Nodes.d.ts +4 -13
  101. three/src/nodes/TSL.d.ts +7 -5
  102. three/src/nodes/accessors/Batch.d.ts +19 -0
  103. three/src/nodes/accessors/Instance.d.ts +34 -0
  104. three/src/nodes/accessors/MaterialNode.d.ts +86 -79
  105. three/src/nodes/accessors/Morph.d.ts +11 -0
  106. three/src/nodes/accessors/Skinning.d.ts +23 -0
  107. three/src/nodes/accessors/StorageBufferNode.d.ts +22 -23
  108. three/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
  109. three/src/nodes/accessors/StorageTextureNode.d.ts +6 -4
  110. three/src/nodes/accessors/TextureNode.d.ts +15 -10
  111. three/src/nodes/core/ArrayNode.d.ts +16 -8
  112. three/src/nodes/core/ContextNode.d.ts +5 -6
  113. three/src/nodes/core/LightingModel.d.ts +2 -0
  114. three/src/nodes/core/Node.d.ts +50 -51
  115. three/src/nodes/core/NodeBuilder.d.ts +1 -133
  116. three/src/nodes/core/OverrideContextNode.d.ts +92 -0
  117. three/src/nodes/core/PropertyNode.d.ts +13 -2
  118. three/src/nodes/core/StructNode.d.ts +0 -2
  119. three/src/nodes/core/StructTypeNode.d.ts +5 -4
  120. three/src/nodes/core/UniformNode.d.ts +48 -9
  121. three/src/nodes/display/BlendModes.d.ts +72 -11
  122. three/src/nodes/display/FrontFacingNode.d.ts +62 -3
  123. three/src/nodes/display/PassNode.d.ts +0 -2
  124. three/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
  125. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +53 -45
  126. three/src/nodes/lighting/LightingContextNode.d.ts +9 -2
  127. three/src/nodes/lighting/LightsNode.d.ts +4 -4
  128. three/src/nodes/math/MathNode.d.ts +358 -304
  129. three/src/nodes/math/OperatorNode.d.ts +253 -82
  130. three/src/nodes/tsl/TSLCore.d.ts +16 -9
  131. three/src/nodes/utils/ArrayElementNode.d.ts +5 -4
  132. three/src/nodes/utils/EquirectUV.d.ts +31 -1
  133. three/src/nodes/utils/Packing.d.ts +50 -3
  134. three/src/nodes/utils/RTTNode.d.ts +7 -12
  135. three/src/nodes/utils/Remap.d.ts +216 -29
  136. three/src/nodes/utils/SampleNode.d.ts +18 -8
  137. three/src/objects/BatchedMesh.d.ts +1 -1
  138. three/src/objects/InstancedMesh.d.ts +0 -8
  139. three/src/objects/Skeleton.d.ts +0 -2
  140. three/src/renderers/common/Backend.d.ts +0 -3
  141. three/src/renderers/common/CanvasTarget.d.ts +0 -49
  142. three/src/renderers/common/ClippingContext.d.ts +6 -1
  143. three/src/renderers/common/CubeRenderTarget.d.ts +2 -1
  144. three/src/renderers/common/Info.d.ts +26 -66
  145. three/src/renderers/common/InspectorBase.d.ts +0 -7
  146. three/src/renderers/common/Lighting.d.ts +49 -5
  147. three/src/renderers/common/Renderer.d.ts +34 -458
  148. three/src/renderers/common/RendererUtils.d.ts +1 -2
  149. three/src/renderers/common/TimestampQueryPool.d.ts +1 -1
  150. three/src/renderers/common/XRManager.d.ts +32 -299
  151. three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -117
  152. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
  153. three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -1
  154. three/src/renderers/webgl/WebGLState.d.ts +2 -0
  155. three/src/renderers/webgl-fallback/WebGLBackend.d.ts +1 -1
  156. three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +0 -10
  157. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +0 -1
  158. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +5 -121
  159. three/src/textures/CubeDepthTexture.d.ts +2 -3
  160. three/src/textures/DataTexture.d.ts +2 -1
  161. three/src/textures/DepthTexture.d.ts +5 -5
  162. three/examples/jsm/lighting/TiledLighting.d.ts +0 -9
  163. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +0 -31
  164. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +0 -22
  165. three/src/nodes/accessors/BatchNode.d.ts +0 -12
  166. three/src/nodes/accessors/InstanceNode.d.ts +0 -30
  167. three/src/nodes/accessors/InstancedMeshNode.d.ts +0 -10
  168. three/src/nodes/accessors/MorphNode.d.ts +0 -14
  169. three/src/nodes/accessors/SkinningNode.d.ts +0 -32
  170. three/src/renderers/common/Animation.d.ts +0 -102
  171. three/src/renderers/common/Attributes.d.ts +0 -59
  172. three/src/renderers/common/Background.d.ts +0 -47
  173. three/src/renderers/common/BindGroup.d.ts +0 -39
  174. three/src/renderers/common/Binding.d.ts +0 -50
  175. three/src/renderers/common/Bindings.d.ts +0 -132
  176. three/src/renderers/common/Buffer.d.ts +0 -90
  177. three/src/renderers/common/ChainMap.d.ts +0 -49
  178. three/src/renderers/common/Color4.d.ts +0 -55
  179. three/src/renderers/common/ComputePipeline.d.ts +0 -34
  180. three/src/renderers/common/DataMap.d.ts +0 -42
  181. three/src/renderers/common/Geometries.d.ts +0 -111
  182. three/src/renderers/common/Pipeline.d.ts +0 -29
  183. three/src/renderers/common/Pipelines.d.ts +0 -186
  184. three/src/renderers/common/ProgrammableStage.d.ts +0 -73
  185. three/src/renderers/common/RenderBundle.d.ts +0 -25
  186. three/src/renderers/common/RenderBundles.d.ts +0 -34
  187. three/src/renderers/common/RenderContext.d.ts +0 -235
  188. three/src/renderers/common/RenderContexts.d.ts +0 -47
  189. three/src/renderers/common/RenderList.d.ts +0 -226
  190. three/src/renderers/common/RenderLists.d.ts +0 -46
  191. three/src/renderers/common/RenderObject.d.ts +0 -448
  192. three/src/renderers/common/RenderObjectPipeline.d.ts +0 -33
  193. three/src/renderers/common/RenderObjects.d.ts +0 -151
  194. three/src/renderers/common/SampledTexture.d.ts +0 -28
  195. three/src/renderers/common/Sampler.d.ts +0 -19
  196. three/src/renderers/common/Textures.d.ts +0 -125
  197. three/src/renderers/common/Uniform.d.ts +0 -262
  198. three/src/renderers/common/UniformBuffer.d.ts +0 -20
  199. three/src/renderers/common/UniformsGroup.d.ts +0 -152
  200. three/src/renderers/common/XRRenderTarget.d.ts +0 -67
  201. three/src/renderers/common/nodes/NodeBuilderState.d.ts +0 -121
  202. three/src/renderers/common/nodes/NodeManager.d.ts +0 -309
  203. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +0 -29
  204. three/src/renderers/common/nodes/NodeSampler.d.ts +0 -12
  205. three/src/renderers/common/nodes/NodeUniform.d.ts +0 -250
  206. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -41
  207. three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -6
  208. three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -6
@@ -1,7 +1,22 @@
1
+ import { InterpolationEndingModes } from "../../constants.js";
2
+ import { TypedArray } from "../../core/BufferAttribute.js";
1
3
  import { Interpolant } from "../Interpolant.js";
2
4
 
3
- export class CubicInterpolant extends Interpolant {
4
- constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any);
5
+ export interface CubicInterpolantSettings {
6
+ endingStart: InterpolationEndingModes;
7
+ endingEnd: InterpolationEndingModes;
8
+ }
5
9
 
6
- interpolate_(i1: number, t0: number, t: number, t1: number): any;
10
+ /**
11
+ * Fast and simple cubic spline interpolant.
12
+ *
13
+ * It was derived from a Hermitian construction setting the first derivative
14
+ * at each sample position to the linear slope between neighboring positions
15
+ * over their parameter interval.
16
+ *
17
+ * @augments Interpolant
18
+ */
19
+ export class CubicInterpolant extends Interpolant<CubicInterpolantSettings> {
20
+ intervalChanged_(i1: number, t0: number, t1: number): void;
21
+ interpolate_(i1: number, t0: number, t: number, t1: number): TypedArray;
7
22
  }
@@ -1,7 +1,12 @@
1
+ import { TypedArray } from "../../core/BufferAttribute.js";
1
2
  import { Interpolant } from "../Interpolant.js";
2
3
 
4
+ /**
5
+ * Interpolant that evaluates to the sample value at the position preceding
6
+ * the parameter.
7
+ *
8
+ * @augments Interpolant
9
+ */
3
10
  export class DiscreteInterpolant extends Interpolant {
4
- constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any);
5
-
6
- interpolate_(i1: number, t0: number, t: number, t1: number): any;
11
+ interpolate_(i1: number): TypedArray;
7
12
  }
@@ -1,7 +1,11 @@
1
+ import { TypedArray } from "../../core/BufferAttribute.js";
1
2
  import { Interpolant } from "../Interpolant.js";
2
3
 
4
+ /**
5
+ * A basic linear interpolant.
6
+ *
7
+ * @augments Interpolant
8
+ */
3
9
  export class LinearInterpolant extends Interpolant {
4
- constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any);
5
-
6
- interpolate_(i1: number, t0: number, t: number, t1: number): any;
10
+ interpolate_(i1: number, t0: number, t: number, t1: number): TypedArray;
7
11
  }
@@ -1,7 +1,11 @@
1
+ import { TypedArray } from "../../core/BufferAttribute.js";
1
2
  import { Interpolant } from "../Interpolant.js";
2
3
 
4
+ /**
5
+ * Spherical linear unit quaternion interpolant.
6
+ *
7
+ * @augments Interpolant
8
+ */
3
9
  export class QuaternionLinearInterpolant extends Interpolant {
4
- constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any);
5
-
6
- interpolate_(i1: number, t0: number, t: number, t1: number): any;
10
+ interpolate_(i1: number, t0: number, t: number, t1: number): TypedArray;
7
11
  }
@@ -21,13 +21,7 @@ export {
21
21
  export { default as MRTNode } from "./core/MRTNode.js";
22
22
  export { default as Node, NodeJSONInputData, NodeJSONIntermediateOutputData } from "./core/Node.js";
23
23
  export { default as NodeAttribute } from "./core/NodeAttribute.js";
24
- export {
25
- BuildStageOption,
26
- default as NodeBuilder,
27
- FlowData,
28
- NodeBuilderContext,
29
- NodeData,
30
- } from "./core/NodeBuilder.js";
24
+ export { default as NodeBuilder } from "./core/NodeBuilder.js";
31
25
  export { default as NodeCache } from "./core/NodeCache.js";
32
26
  export { default as NodeCode } from "./core/NodeCode.js";
33
27
  export { default as NodeError } from "./core/NodeError.js";
@@ -37,6 +31,7 @@ export { default as NodeUniform } from "./core/NodeUniform.js";
37
31
  export { default as NodeVar } from "./core/NodeVar.js";
38
32
  export { default as NodeVarying } from "./core/NodeVarying.js";
39
33
  export { default as OutputStructNode } from "./core/OutputStructNode.js";
34
+ export { default as OverrideContextNode } from "./core/OverrideContextNode.js";
40
35
  export { default as ParameterNode } from "./core/ParameterNode.js";
41
36
  export { default as PropertyNode } from "./core/PropertyNode.js";
42
37
  export { default as StackNode } from "./core/StackNode.js";
@@ -54,25 +49,21 @@ import * as NodeUtils from "./core/NodeUtils.js";
54
49
  export { NodeUtils };
55
50
 
56
51
  // accessors
57
- export { default as BatchNode } from "./accessors/BatchNode.js";
58
52
  export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js";
59
53
  export { default as BufferNode } from "./accessors/BufferNode.js";
60
54
  export { default as BuiltinNode } from "./accessors/BuiltinNode.js";
61
55
  export { default as ClippingNode } from "./accessors/ClippingNode.js";
62
56
  export { default as CubeTextureNode } from "./accessors/CubeTextureNode.js";
63
- export { default as InstancedMeshNode } from "./accessors/InstancedMeshNode.js";
64
- export { default as InstanceNode } from "./accessors/InstanceNode.js";
65
57
  export { default as MaterialNode, MaterialNodeScope } from "./accessors/MaterialNode.js";
66
58
  export { default as MaterialReferenceNode } from "./accessors/MaterialReferenceNode.js";
67
59
  export { default as ModelNode } from "./accessors/ModelNode.js";
68
- export { default as MorphNode } from "./accessors/MorphNode.js";
69
60
  export { default as Object3DNode } from "./accessors/Object3DNode.js";
70
61
  export { default as PointUVNode } from "./accessors/PointUVNode.js";
71
62
  export { default as ReferenceBaseNode } from "./accessors/ReferenceBaseNode.js";
72
63
  export { default as ReferenceNode } from "./accessors/ReferenceNode.js";
73
64
  export { default as RendererReferenceNode } from "./accessors/RendererReferenceNode.js";
74
- export { default as SkinningNode } from "./accessors/SkinningNode.js";
75
65
  export { default as StorageBufferNode } from "./accessors/StorageBufferNode.js";
66
+ export { default as StorageTexture3DNode } from "./accessors/StorageTexture3DNode.js";
76
67
  export { default as StorageTextureNode } from "./accessors/StorageTextureNode.js";
77
68
  export { default as Texture3DNode } from "./accessors/Texture3DNode.js";
78
69
  export { default as TextureNode } from "./accessors/TextureNode.js";
@@ -166,7 +157,7 @@ export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js";
166
157
  export { default as MemberNode } from "./utils/MemberNode.js";
167
158
  export { default as ReflectorNode, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
168
159
  export { default as RotateNode } from "./utils/RotateNode.js";
169
- export { default as RTTNode, RTTNodeOptions } from "./utils/RTTNode.js";
160
+ export { default as RTTNode } from "./utils/RTTNode.js";
170
161
  export { default as SampleNode } from "./utils/SampleNode.js";
171
162
  export { default as SetNode } from "./utils/SetNode.js";
172
163
  export { default as SplitNode } from "./utils/SplitNode.js";
three/src/nodes/TSL.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./core/IndexNode.js";
10
10
  export * from "./core/IsolateNode.js";
11
11
  export * from "./core/MRTNode.js";
12
12
  export * from "./core/OutputStructNode.js";
13
+ export * from "./core/OverrideContextNode.js";
13
14
  export * from "./core/ParameterNode.js";
14
15
  export * from "./core/PropertyNode.js";
15
16
  export * from "./core/StackNode.js";
@@ -55,21 +56,20 @@ export * from "./tsl/TSLBase.js";
55
56
  // accessors
56
57
  export * from "./accessors/AccessorsUtils.js";
57
58
  export * from "./accessors/Arrays.js";
58
- export * from "./accessors/BatchNode.js";
59
+ export * from "./accessors/Batch.js";
59
60
  export * from "./accessors/Bitangent.js";
60
61
  export * from "./accessors/BufferAttributeNode.js";
61
62
  export * from "./accessors/BufferNode.js";
62
63
  export * from "./accessors/BuiltinNode.js";
63
64
  export * from "./accessors/Camera.js";
64
65
  export * from "./accessors/CubeTextureNode.js";
65
- export * from "./accessors/InstancedMeshNode.js";
66
- export * from "./accessors/InstanceNode.js";
66
+ export * from "./accessors/Instance.js";
67
67
  export * from "./accessors/MaterialNode.js";
68
68
  export * from "./accessors/MaterialProperties.js";
69
69
  export * from "./accessors/MaterialReferenceNode.js";
70
70
  export * from "./accessors/ModelNode.js";
71
71
  export * from "./accessors/ModelViewProjectionNode.js";
72
- export * from "./accessors/MorphNode.js";
72
+ export * from "./accessors/Morph.js";
73
73
  export * from "./accessors/Normal.js";
74
74
  export * from "./accessors/Object3DNode.js";
75
75
  export * from "./accessors/PointUVNode.js";
@@ -78,8 +78,9 @@ export * from "./accessors/ReferenceNode.js";
78
78
  export * from "./accessors/ReflectVector.js";
79
79
  export * from "./accessors/RendererReferenceNode.js";
80
80
  export * from "./accessors/SceneProperties.js";
81
- export * from "./accessors/SkinningNode.js";
81
+ export * from "./accessors/Skinning.js";
82
82
  export * from "./accessors/StorageBufferNode.js";
83
+ export * from "./accessors/StorageTexture3DNode.js";
83
84
  export * from "./accessors/StorageTextureNode.js";
84
85
  export * from "./accessors/Tangent.js";
85
86
  export * from "./accessors/Texture3DNode.js";
@@ -99,6 +100,7 @@ export * from "./display/ColorAdjustment.js";
99
100
  export * from "./display/ColorSpaceNode.js";
100
101
  export * from "./display/FrontFacingNode.js";
101
102
  export * from "./display/NormalMapNode.js";
103
+ export * from "./display/PremultiplyAlphaFunctions.js";
102
104
  export * from "./display/RenderOutputNode.js";
103
105
  export * from "./display/ScreenNode.js";
104
106
  export * from "./display/ToneMappingNode.js";
@@ -0,0 +1,19 @@
1
+ import { BatchedMesh } from "../../objects/BatchedMesh.js";
2
+ import VaryingNode from "../core/VaryingNode.js";
3
+
4
+ /**
5
+ * TSL object representing a varying property for the batching color vector.
6
+ *
7
+ * @type {VaryingNode<vec4>}
8
+ */
9
+ export const batchColor: VaryingNode<"vec4">;
10
+ /**
11
+ * TSL function representing the vertex shader batching setup.
12
+ * Applies the batch transformation matrix to positionLocal, normalLocal, and tangentLocal.
13
+ * Also assigns the batch color if a color texture is present.
14
+ *
15
+ * @tsl
16
+ * @function
17
+ * @param {BatchedMesh} batchMesh - The batched mesh.
18
+ */
19
+ export const batch: (batchMesh: BatchedMesh) => void;
@@ -0,0 +1,34 @@
1
+ import { InstancedBufferAttribute } from "../../core/InstancedBufferAttribute.js";
2
+ import { InstancedMesh } from "../../objects/InstancedMesh.js";
3
+ import StorageInstancedBufferAttribute from "../../renderers/common/StorageInstancedBufferAttribute.js";
4
+ import VaryingNode from "../core/VaryingNode.js";
5
+
6
+ /**
7
+ * TSL object representing a varying property for the instanced color vector.
8
+ *
9
+ * @type {VaryingNode<vec3>}
10
+ */
11
+ export const instanceColor: VaryingNode<"vec3">;
12
+ /**
13
+ * TSL function representing the standard instancing vertex shader setup.
14
+ * Transforms positionLocal and normalLocal, and assigns varying color in-place.
15
+ *
16
+ * @tsl
17
+ * @function
18
+ * @param {number} count - The instance count.
19
+ * @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} matrices - The instanced transformation matrices.
20
+ * @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} [colors=null] - The optional instanced colors.
21
+ */
22
+ export const instance: (
23
+ count: number,
24
+ matrices: InstancedBufferAttribute | StorageInstancedBufferAttribute,
25
+ colors?: InstancedBufferAttribute | StorageInstancedBufferAttribute | null,
26
+ ) => void;
27
+ /**
28
+ * TSL wrapper for applying instanced mesh rendering setup.
29
+ *
30
+ * @tsl
31
+ * @function
32
+ * @param {InstancedMesh} instancedMesh - The instanced mesh.
33
+ */
34
+ export const instancedMesh: (instancedMesh: InstancedMesh) => void;
@@ -40,87 +40,94 @@ export type MaterialNodeScope =
40
40
  | typeof MaterialNode.AO
41
41
  | typeof MaterialNode.REFRACTION_RATIO;
42
42
 
43
- export default class MaterialNode extends Node {
44
- static ALPHA_TEST: "alphaTest";
45
- static COLOR: "color";
46
- static OPACITY: "opacity";
47
- static SHININESS: "shininess";
48
- static SPECULAR: "specular";
49
- static SPECULAR_STRENGTH: "specularStrength";
50
- static SPECULAR_INTENSITY: "specularIntensity";
51
- static SPECULAR_COLOR: "specularColor";
52
- static REFLECTIVITY: "reflectivity";
53
- static ROUGHNESS: "roughness";
54
- static METALNESS: "metalness";
55
- static NORMAL: "normal";
56
- static CLEARCOAT: "clearcoat";
57
- static CLEARCOAT_ROUGHNESS: "clearcoatRoughness";
58
- static CLEARCOAT_NORMAL: "clearcoatNormal";
59
- static EMISSIVE: "emissive";
60
- static ROTATION: "rotation";
61
- static SHEEN: "sheen";
62
- static SHEEN_ROUGHNESS: "sheenRoughness";
63
- static ANISOTROPY: "anisotropy";
64
- static IRIDESCENCE: "iridescence";
65
- static IRIDESCENCE_IOR: "iridescenceIOR";
66
- static IRIDESCENCE_THICKNESS: "iridescenceThickness";
67
- static IOR: "ior";
68
- static TRANSMISSION: "transmission";
69
- static THICKNESS: "thickness";
70
- static ATTENUATION_DISTANCE: "attenuationDistance";
71
- static ATTENUATION_COLOR: "attenuationColor";
72
- static LINE_SCALE: "scale";
73
- static LINE_DASH_SIZE: "dashSize";
74
- static LINE_GAP_SIZE: "gapSize";
75
- static LINE_WIDTH: "linewidth";
76
- static LINE_DASH_OFFSET: "dashOffset";
77
- static POINT_SIZE: "size";
78
- static DISPERSION: "dispersion";
79
- static LIGHT_MAP: "light";
80
- static AO: "ao";
81
- static REFRACTION_RATIO: "refractionRatio";
82
-
43
+ interface MaterialNodeInterface {
83
44
  scope: MaterialNodeScope;
84
- constructor(scope?: MaterialNodeScope);
85
45
  }
86
46
 
87
- export const materialAlphaTest: MaterialNode;
88
- export const materialColor: MaterialNode;
89
- export const materialShininess: MaterialNode;
90
- export const materialEmissive: MaterialNode;
91
- export const materialOpacity: MaterialNode;
92
- export const materialSpecular: MaterialNode;
47
+ declare const MaterialNode: {
48
+ new<TNodeType>(scope: MaterialNodeScope): MaterialNode<TNodeType>;
49
+
50
+ ALPHA_TEST: "alphaTest";
51
+ COLOR: "color";
52
+ OPACITY: "opacity";
53
+ SHININESS: "shininess";
54
+ SPECULAR: "specular";
55
+ SPECULAR_STRENGTH: "specularStrength";
56
+ SPECULAR_INTENSITY: "specularIntensity";
57
+ SPECULAR_COLOR: "specularColor";
58
+ REFLECTIVITY: "reflectivity";
59
+ ROUGHNESS: "roughness";
60
+ METALNESS: "metalness";
61
+ NORMAL: "normal";
62
+ CLEARCOAT: "clearcoat";
63
+ CLEARCOAT_ROUGHNESS: "clearcoatRoughness";
64
+ CLEARCOAT_NORMAL: "clearcoatNormal";
65
+ EMISSIVE: "emissive";
66
+ ROTATION: "rotation";
67
+ SHEEN: "sheen";
68
+ SHEEN_ROUGHNESS: "sheenRoughness";
69
+ ANISOTROPY: "anisotropy";
70
+ IRIDESCENCE: "iridescence";
71
+ IRIDESCENCE_IOR: "iridescenceIOR";
72
+ IRIDESCENCE_THICKNESS: "iridescenceThickness";
73
+ IOR: "ior";
74
+ TRANSMISSION: "transmission";
75
+ THICKNESS: "thickness";
76
+ ATTENUATION_DISTANCE: "attenuationDistance";
77
+ ATTENUATION_COLOR: "attenuationColor";
78
+ LINE_SCALE: "scale";
79
+ LINE_DASH_SIZE: "dashSize";
80
+ LINE_GAP_SIZE: "gapSize";
81
+ LINE_WIDTH: "linewidth";
82
+ LINE_DASH_OFFSET: "dashOffset";
83
+ POINT_SIZE: "size";
84
+ DISPERSION: "dispersion";
85
+ LIGHT_MAP: "light";
86
+ AO: "ao";
87
+ REFRACTION_RATIO: "refractionRatio";
88
+ };
89
+
90
+ type MaterialNode<TNodeType> = MaterialNodeInterface & Node<TNodeType>;
91
+
92
+ export default MaterialNode;
93
+
94
+ export const materialAlphaTest: MaterialNode<"float">;
95
+ export const materialColor: MaterialNode<"vec3">;
96
+ export const materialShininess: MaterialNode<"float">;
97
+ export const materialEmissive: MaterialNode<"vec3">;
98
+ export const materialOpacity: MaterialNode<"float">;
99
+ export const materialSpecular: MaterialNode<"vec3">;
93
100
 
94
- export const materialSpecularIntensity: MaterialNode;
95
- export const materialSpecularColor: MaterialNode;
101
+ export const materialSpecularIntensity: MaterialNode<"float">;
102
+ export const materialSpecularColor: MaterialNode<"vec3">;
96
103
 
97
- export const materialSpecularStrength: MaterialNode;
98
- export const materialReflectivity: MaterialNode;
99
- export const materialRoughness: MaterialNode;
100
- export const materialMetalness: MaterialNode;
101
- export const materialNormal: Node;
102
- export const materialClearcoat: MaterialNode;
103
- export const materialClearcoatRoughness: MaterialNode;
104
- export const materialClearcoatNormal: Node;
105
- export const materialRotation: MaterialNode;
106
- export const materialSheen: MaterialNode;
107
- export const materialSheenRoughness: MaterialNode;
108
- export const materialAnisotropy: MaterialNode;
109
- export const materialIridescence: MaterialNode;
110
- export const materialIridescenceIOR: MaterialNode;
111
- export const materialIridescenceThickness: MaterialNode;
112
- export const materialTransmission: MaterialNode;
113
- export const materialThickness: MaterialNode;
114
- export const materialIOR: MaterialNode;
115
- export const materialAttenuationDistance: MaterialNode;
116
- export const materialAttenuationColor: MaterialNode;
117
- export const materialLineScale: MaterialNode;
118
- export const materialLineDashSize: MaterialNode;
119
- export const materialLineGapSize: MaterialNode;
120
- export const materialLineWidth: MaterialNode;
121
- export const materialLineDashOffset: MaterialNode;
122
- export const materialPointSize: MaterialNode;
123
- export const materialDispersion: MaterialNode;
124
- export const materialLightMap: MaterialNode;
125
- export const materialAO: MaterialNode;
126
- export const materialAnisotropyVector: MaterialNode;
104
+ export const materialSpecularStrength: MaterialNode<"float">;
105
+ export const materialReflectivity: MaterialNode<"float">;
106
+ export const materialRoughness: MaterialNode<"float">;
107
+ export const materialMetalness: MaterialNode<"float">;
108
+ export const materialNormal: MaterialNode<"vec3">;
109
+ export const materialClearcoat: MaterialNode<"float">;
110
+ export const materialClearcoatRoughness: MaterialNode<"float">;
111
+ export const materialClearcoatNormal: MaterialNode<"vec3">;
112
+ export const materialRotation: MaterialNode<"float">;
113
+ export const materialSheen: MaterialNode<"vec3">;
114
+ export const materialSheenRoughness: MaterialNode<"float">;
115
+ export const materialAnisotropy: MaterialNode<"vec2">;
116
+ export const materialIridescence: MaterialNode<"float">;
117
+ export const materialIridescenceIOR: MaterialNode<"float">;
118
+ export const materialIridescenceThickness: MaterialNode<"float">;
119
+ export const materialTransmission: MaterialNode<"float">;
120
+ export const materialThickness: MaterialNode<"float">;
121
+ export const materialIOR: MaterialNode<"float">;
122
+ export const materialAttenuationDistance: MaterialNode<"float">;
123
+ export const materialAttenuationColor: MaterialNode<"vec3">;
124
+ export const materialLineScale: MaterialNode<"float">;
125
+ export const materialLineDashSize: MaterialNode<"float">;
126
+ export const materialLineGapSize: MaterialNode<"float">;
127
+ export const materialLineWidth: MaterialNode<"float">;
128
+ export const materialLineDashOffset: MaterialNode<"float">;
129
+ export const materialPointSize: MaterialNode<"float">;
130
+ export const materialDispersion: MaterialNode<"float">;
131
+ export const materialLightMap: MaterialNode<"vec3">;
132
+ export const materialAO: MaterialNode<"float">;
133
+ export const materialAnisotropyVector: Node<"vec2">;
@@ -0,0 +1,11 @@
1
+ import { Mesh } from "../../objects/Mesh.js";
2
+
3
+ /**
4
+ * TSL function representing the vertex shader morph targets blend setup.
5
+ * Dynamically computes morph targets weights and updates positionLocal and normalLocal in-place.
6
+ *
7
+ * @tsl
8
+ * @function
9
+ * @param {Mesh} mesh - The mesh.
10
+ */
11
+ export const morphReference: (mesh: Mesh) => void;
@@ -0,0 +1,23 @@
1
+ import { Vector3 } from "../../math/Vector3.js";
2
+ import { SkinnedMesh } from "../../objects/SkinnedMesh.js";
3
+ import Node from "../core/Node.js";
4
+
5
+ /**
6
+ * TSL function representing the standard skeletal animation vertex shader setup.
7
+ * Transforms positionLocal, normalLocal, and tangentLocal in-place.
8
+ *
9
+ * @tsl
10
+ * @function
11
+ * @param {SkinnedMesh} skinnedMesh - The skinned mesh.
12
+ */
13
+ export const skinning: (skinnedMesh: SkinnedMesh) => void;
14
+ /**
15
+ * TSL function that computes skeletal animation for custom compute passes.
16
+ *
17
+ * @tsl
18
+ * @function
19
+ * @param {SkinnedMesh} skinnedMesh - The skinned mesh.
20
+ * @param {Node<vec3>} [toPosition=null] - The target position node to assign.
21
+ * @returns {Node<vec3>} The computed skinned position node.
22
+ */
23
+ export const computeSkinning: (skinnedMesh: SkinnedMesh, toPosition?: Node<"vec3"> | Vector3 | null) => void;
@@ -47,32 +47,29 @@ type StorageBufferNode<TNodeType> =
47
47
 
48
48
  export default StorageBufferNode;
49
49
 
50
+ type StorageNodeType =
51
+ | "float"
52
+ | "uint"
53
+ | "int"
54
+ | "vec2"
55
+ | "uvec2"
56
+ | "ivec2"
57
+ | "vec3"
58
+ | "uvec3"
59
+ | "ivec3"
60
+ | "vec4"
61
+ | "uvec4"
62
+ | "ivec4"
63
+ | "mat2"
64
+ | "mat3"
65
+ | "mat4";
66
+
50
67
  interface Storage {
51
- (
52
- value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
53
- type: "float",
54
- count: number,
55
- ): StorageBufferNode<"float">;
56
- (
57
- value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
58
- type: "uint",
59
- count: number,
60
- ): StorageBufferNode<"uint">;
61
- (
68
+ <const TNodeType extends StorageNodeType>(
62
69
  value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
63
- type: "vec2",
70
+ type: TNodeType,
64
71
  count: number,
65
- ): StorageBufferNode<"vec2">;
66
- (
67
- value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
68
- type: "vec3",
69
- count: number,
70
- ): StorageBufferNode<"vec3">;
71
- (
72
- value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
73
- type: "vec4",
74
- count: number,
75
- ): StorageBufferNode<"vec4">;
72
+ ): StorageBufferNode<TNodeType>;
76
73
  (
77
74
  value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
78
75
  type: Struct,
@@ -81,3 +78,5 @@ interface Storage {
81
78
  }
82
79
 
83
80
  export const storage: Storage;
81
+
82
+ export {};
@@ -0,0 +1,17 @@
1
+ import Storage3DTexture from "../../renderers/common/Storage3DTexture.js";
2
+ import Node from "../core/Node.js";
3
+ import StorageTextureNode from "./StorageTextureNode.js";
4
+
5
+ declare class StorageTexture3DNode extends StorageTextureNode {
6
+ readonly isStorageTexture3DNode: boolean;
7
+
8
+ constructor(value: Storage3DTexture, uvNode?: Node<"vec3"> | null, storeNode?: Node | null);
9
+ }
10
+
11
+ export default StorageTexture3DNode;
12
+
13
+ export const storageTexture3D: (
14
+ value: Storage3DTexture,
15
+ uvNode?: Node<"vec3"> | null,
16
+ storeNode?: Node | null,
17
+ ) => StorageTexture3DNode;
@@ -1,4 +1,4 @@
1
- import { Texture } from "../../textures/Texture.js";
1
+ import StorageTexture from "../../renderers/common/StorageTexture.js";
2
2
  import { NodeAccess } from "../core/constants.js";
3
3
  import Node from "../core/Node.js";
4
4
  import NodeBuilder from "../core/NodeBuilder.js";
@@ -14,7 +14,7 @@ export default class StorageTextureNode extends TextureNode {
14
14
  access: NodeAccess;
15
15
 
16
16
  constructor(
17
- value: Texture,
17
+ value: StorageTexture,
18
18
  uvNode?: Node | null,
19
19
  storeNode?: Node | null,
20
20
  );
@@ -29,17 +29,19 @@ export default class StorageTextureNode extends TextureNode {
29
29
 
30
30
  toWriteOnly(): this;
31
31
 
32
+ store(uvNode: Node, storeNode?: Node | null): StorageTextureNode;
33
+
32
34
  generateStore(builder: NodeBuilder): void;
33
35
  }
34
36
 
35
37
  export const storageTexture: (
36
- value: Texture,
38
+ value: StorageTexture,
37
39
  uvNode?: Node | null,
38
40
  storeNode?: Node,
39
41
  ) => StorageTextureNode;
40
42
 
41
43
  export const textureStore: (
42
- value: Texture | StorageTextureNode,
44
+ value: StorageTexture | StorageTextureNode,
43
45
  uvNode?: Node | null,
44
46
  storeNode?: Node,
45
47
  ) => StorageTextureNode;
@@ -2,7 +2,7 @@ import { Texture } from "../../textures/Texture.js";
2
2
  import Node from "../core/Node.js";
3
3
  import UniformNode from "../core/UniformNode.js";
4
4
 
5
- interface TextureNodeInterface<TNodeType> {
5
+ interface TextureNodeInterface {
6
6
  readonly isTextureNode: true;
7
7
 
8
8
  uvNode: Node<"vec2"> | Node<"vec3"> | null;
@@ -11,6 +11,7 @@ interface TextureNodeInterface<TNodeType> {
11
11
  compareNode: Node | null;
12
12
  depthNode: Node | null;
13
13
  gradNode: Node | null;
14
+ gatherNode: Node<"int"> | null;
14
15
 
15
16
  sampler: boolean;
16
17
  updateMatrix: boolean;
@@ -23,25 +24,29 @@ interface TextureNodeInterface<TNodeType> {
23
24
 
24
25
  getSampler(): boolean;
25
26
 
26
- sample(uvNode: Node): Node<TNodeType>;
27
+ sample(uvNode: Node): this;
27
28
 
28
- load(uvNode: Node): Node<TNodeType>;
29
+ load(uvNode: Node): this;
29
30
 
30
- blur(amountNode: Node): Node;
31
+ blur(amountNode: Node): this;
31
32
 
32
- level(levelNode: Node): Node;
33
+ level(levelNode: Node): this;
33
34
 
34
35
  size(levelNode: Node): Node;
35
36
 
36
- bias(biasNode: Node): Node;
37
+ bias(biasNode: Node): this;
37
38
 
38
39
  getBase(): TextureNode;
39
40
 
40
- compare(compareNode: Node): Node;
41
+ compare(compareNode: Node<"float"> | number): this;
41
42
 
42
- grad(gradeNodeX: Node, gradeNodeY: Node): TextureNode;
43
+ grad(gradeNodeX: Node, gradeNodeY: Node): this;
43
44
 
44
- depth(depthNode: Node): TextureNode;
45
+ gather(gatherNode?: Node<"int"> | number): this;
46
+
47
+ depth(depthNode: Node): this;
48
+
49
+ offset(offsetNode: Node<"ivec2">): this;
45
50
 
46
51
  clone(): this;
47
52
  }
@@ -55,7 +60,7 @@ declare const TextureNode: {
55
60
  ): TextureNode;
56
61
  };
57
62
 
58
- type TextureNode<TNodeType = "vec4"> = TextureNodeInterface<TNodeType> & UniformNode<TNodeType, Texture>;
63
+ type TextureNode<TNodeType = "vec4"> = TextureNodeInterface & UniformNode<TNodeType, Texture>;
59
64
 
60
65
  export default TextureNode;
61
66