@types/three 0.159.0 → 0.161.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 (211) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +5 -1
  3. three/examples/jsm/capabilities/WebGPU.d.ts +2 -0
  4. three/examples/jsm/curves/NURBSUtils.d.ts +136 -10
  5. three/examples/jsm/curves/NURBSVolume.d.ts +23 -0
  6. three/examples/jsm/exporters/USDZExporter.d.ts +1 -0
  7. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -0
  8. three/examples/jsm/loaders/KTX2Loader.d.ts +45 -11
  9. three/examples/jsm/loaders/LUT3dlLoader.d.ts +29 -2
  10. three/examples/jsm/loaders/LUTCubeLoader.d.ts +37 -2
  11. three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
  12. three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +13 -0
  13. three/examples/jsm/misc/Timer.d.ts +80 -0
  14. three/examples/jsm/nodes/Nodes.d.ts +304 -61
  15. three/examples/jsm/nodes/accessors/BitangentNode.d.ts +9 -0
  16. three/examples/jsm/nodes/accessors/BufferNode.d.ts +4 -1
  17. three/examples/jsm/nodes/accessors/CameraNode.d.ts +24 -6
  18. three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +17 -4
  19. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -0
  20. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +12 -0
  21. three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +7 -0
  22. three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -1
  23. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
  24. three/examples/jsm/nodes/accessors/NormalNode.d.ts +8 -0
  25. three/examples/jsm/nodes/accessors/Object3DNode.d.ts +10 -6
  26. three/examples/jsm/nodes/accessors/PointUVNode.d.ts +3 -0
  27. three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -0
  28. three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +4 -1
  29. three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -0
  30. three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -0
  31. three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +8 -1
  32. three/examples/jsm/nodes/accessors/TangentNode.d.ts +9 -0
  33. three/examples/jsm/nodes/accessors/TextureBicubicNode.d.ts +18 -0
  34. three/examples/jsm/nodes/accessors/TextureNode.d.ts +21 -5
  35. three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
  36. three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
  37. three/examples/jsm/nodes/accessors/VertexColorNode.d.ts +12 -0
  38. three/examples/jsm/nodes/code/CodeNode.d.ts +4 -0
  39. three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -0
  40. three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -1
  41. three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
  42. three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +1 -1
  43. three/examples/jsm/nodes/core/AssignNode.d.ts +17 -0
  44. three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
  45. three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
  46. three/examples/jsm/nodes/core/CacheNode.d.ts +11 -0
  47. three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
  48. three/examples/jsm/nodes/core/ContextNode.d.ts +11 -0
  49. three/examples/jsm/nodes/core/IndexNode.d.ts +18 -0
  50. three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
  51. three/examples/jsm/nodes/core/LightingModel.d.ts +36 -0
  52. three/examples/jsm/nodes/core/Node.d.ts +32 -8
  53. three/examples/jsm/nodes/core/NodeBuilder.d.ts +27 -23
  54. three/examples/jsm/nodes/core/NodeFrame.d.ts +18 -6
  55. three/examples/jsm/nodes/core/NodeUniform.d.ts +12 -8
  56. three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -3
  57. three/examples/jsm/nodes/core/PropertyNode.d.ts +27 -1
  58. three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
  59. three/examples/jsm/nodes/core/VarNode.d.ts +10 -0
  60. three/examples/jsm/nodes/core/VaryingNode.d.ts +9 -0
  61. three/examples/jsm/nodes/core/constants.d.ts +31 -28
  62. three/examples/jsm/nodes/display/AfterImageNode.d.ts +25 -0
  63. three/examples/jsm/nodes/display/AnamorphicNode.d.ts +32 -0
  64. three/examples/jsm/nodes/display/BlendModeNode.d.ts +21 -6
  65. three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +29 -1
  66. three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +17 -0
  67. three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
  68. three/examples/jsm/nodes/display/GaussianBlurNode.d.ts +28 -0
  69. three/examples/jsm/nodes/display/NormalMapNode.d.ts +13 -1
  70. three/examples/jsm/nodes/display/PassNode.d.ts +44 -0
  71. three/examples/jsm/nodes/display/PosterizeNode.d.ts +12 -0
  72. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
  73. three/examples/jsm/nodes/display/ViewportDepthNode.d.ts +32 -0
  74. three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
  75. three/examples/jsm/nodes/display/ViewportSharedTextureNode.d.ts +18 -0
  76. three/examples/jsm/nodes/display/ViewportTextureNode.d.ts +33 -0
  77. three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
  78. three/examples/jsm/nodes/fog/FogNode.d.ts +9 -0
  79. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +9 -0
  80. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +9 -2
  81. three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +3 -2
  82. three/examples/jsm/nodes/functions/BSDF/BRDF_Sheen.d.ts +7 -0
  83. three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +3 -2
  84. three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +3 -2
  85. three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +3 -2
  86. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
  87. three/examples/jsm/nodes/functions/PhongLightingModel.d.ts +7 -0
  88. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +17 -8
  89. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
  90. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +1 -1
  91. three/examples/jsm/nodes/geometry/RangeNode.d.ts +3 -0
  92. three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +13 -0
  93. three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +20 -8
  94. three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
  95. three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +1 -2
  96. three/examples/jsm/nodes/materials/Materials.d.ts +9 -17
  97. three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +2 -4
  98. three/examples/jsm/nodes/materials/MeshPhongNodeMaterial.d.ts +12 -0
  99. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +16 -7
  100. three/examples/jsm/nodes/materials/MeshSSSNodeMaterial.d.ts +17 -0
  101. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +1 -5
  102. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +55 -16
  103. three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +2 -8
  104. three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +0 -10
  105. three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +43 -34
  106. three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +5 -3
  107. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +7 -5
  108. three/examples/jsm/nodes/math/CondNode.d.ts +13 -0
  109. three/examples/jsm/nodes/math/HashNode.d.ts +16 -0
  110. three/examples/jsm/nodes/math/MathNode.d.ts +140 -1
  111. three/examples/jsm/nodes/math/MathUtils.d.ts +16 -0
  112. three/examples/jsm/nodes/math/OperatorNode.d.ts +53 -1
  113. three/examples/jsm/nodes/math/TriNoise3D.d.ts +12 -0
  114. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +9 -0
  115. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +124 -31
  116. three/examples/jsm/nodes/utils/DiscardNode.d.ts +16 -0
  117. three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +4 -2
  118. three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +3 -0
  119. three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +6 -3
  120. three/examples/jsm/nodes/utils/OscNode.d.ts +6 -0
  121. three/examples/jsm/nodes/utils/ReflectorNode.d.ts +30 -0
  122. three/examples/jsm/nodes/utils/RemapNode.d.ts +24 -1
  123. three/examples/jsm/nodes/utils/RotateNode.d.ts +21 -0
  124. three/examples/jsm/nodes/utils/RotateUVNode.d.ts +9 -0
  125. three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +5 -1
  126. three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +7 -0
  127. three/examples/jsm/nodes/utils/TimerNode.d.ts +7 -1
  128. three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +28 -7
  129. three/examples/jsm/objects/GroundedSkybox.d.ts +5 -0
  130. three/examples/jsm/objects/QuadMesh.d.ts +15 -0
  131. three/examples/jsm/postprocessing/{HBAOPass.d.ts → GTAOPass.d.ts} +25 -10
  132. three/examples/jsm/postprocessing/SSAOPass.d.ts +1 -1
  133. three/examples/jsm/renderers/common/Backend.d.ts +6 -2
  134. three/examples/jsm/renderers/common/Color4.d.ts +9 -0
  135. three/examples/jsm/renderers/common/Info.d.ts +7 -1
  136. three/examples/jsm/renderers/common/PostProcessing.d.ts +11 -0
  137. three/examples/jsm/renderers/common/Renderer.d.ts +243 -4
  138. three/examples/jsm/renderers/common/StorageTexture.d.ts +5 -0
  139. three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +4 -2
  140. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +2 -2
  141. three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
  142. three/examples/jsm/renderers/webgpu/WebGPUBackend.d.ts +15 -6
  143. three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +7 -7
  144. three/examples/jsm/shaders/{HBAOShader.d.ts → GTAOShader.d.ts} +23 -8
  145. three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +1 -1
  146. three/examples/jsm/utils/BufferGeometryUtils.d.ts +0 -10
  147. three/examples/jsm/webxr/XRControllerModelFactory.d.ts +6 -5
  148. three/examples/jsm/webxr/XRHandMeshModel.d.ts +10 -2
  149. three/package.json +2 -2
  150. three/src/Three.d.ts +1 -0
  151. three/src/cameras/PerspectiveCamera.d.ts +13 -0
  152. three/src/constants.d.ts +4 -3
  153. three/src/core/InterleavedBufferAttribute.d.ts +12 -2
  154. three/src/core/Object3D.d.ts +13 -13
  155. three/src/core/UniformsGroup.d.ts +3 -3
  156. three/src/extras/core/Curve.d.ts +9 -9
  157. three/src/extras/core/CurvePath.d.ts +8 -7
  158. three/src/geometries/RingGeometry.d.ts +1 -1
  159. three/src/lights/PointLight.d.ts +7 -0
  160. three/src/loaders/MaterialLoader.d.ts +6 -3
  161. three/src/materials/LineBasicMaterial.d.ts +7 -0
  162. three/src/materials/LineDashedMaterial.d.ts +7 -1
  163. three/src/materials/Material.d.ts +17 -15
  164. three/src/materials/MeshBasicMaterial.d.ts +7 -0
  165. three/src/materials/MeshDepthMaterial.d.ts +6 -0
  166. three/src/materials/MeshDistanceMaterial.d.ts +7 -0
  167. three/src/materials/MeshLambertMaterial.d.ts +7 -0
  168. three/src/materials/MeshMatcapMaterial.d.ts +7 -0
  169. three/src/materials/MeshNormalMaterial.d.ts +7 -0
  170. three/src/materials/MeshPhongMaterial.d.ts +7 -0
  171. three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
  172. three/src/materials/MeshStandardMaterial.d.ts +7 -2
  173. three/src/materials/MeshToonMaterial.d.ts +7 -0
  174. three/src/materials/PointsMaterial.d.ts +7 -0
  175. three/src/materials/RawShaderMaterial.d.ts +9 -0
  176. three/src/materials/ShaderMaterial.d.ts +17 -3
  177. three/src/materials/ShadowMaterial.d.ts +7 -0
  178. three/src/materials/SpriteMaterial.d.ts +7 -2
  179. three/src/math/Color.d.ts +1 -1
  180. three/src/math/Matrix4.d.ts +30 -30
  181. three/src/math/Quaternion.d.ts +27 -30
  182. three/src/math/Sphere.d.ts +5 -0
  183. three/src/math/Triangle.d.ts +8 -25
  184. three/src/math/Vector2.d.ts +24 -159
  185. three/src/math/Vector3.d.ts +46 -54
  186. three/src/math/Vector4.d.ts +25 -20
  187. three/src/objects/BatchedMesh.d.ts +2 -2
  188. three/src/objects/Bone.d.ts +2 -2
  189. three/src/objects/InstancedMesh.d.ts +2 -1
  190. three/src/objects/LOD.d.ts +2 -2
  191. three/src/objects/Line.d.ts +3 -2
  192. three/src/objects/LineLoop.d.ts +3 -1
  193. three/src/objects/LineSegments.d.ts +3 -1
  194. three/src/objects/Points.d.ts +3 -2
  195. three/src/objects/SkinnedMesh.d.ts +4 -8
  196. three/src/objects/Sprite.d.ts +2 -2
  197. three/src/renderers/shaders/ShaderLib.d.ts +18 -18
  198. three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
  199. three/src/renderers/webgl/WebGLLights.d.ts +39 -37
  200. three/src/renderers/webgl/WebGLProgram.d.ts +0 -1
  201. three/src/renderers/webgl/WebGLPrograms.d.ts +226 -9
  202. three/src/renderers/webxr/WebXRDepthSensing.d.ts +27 -0
  203. three/src/renderers/webxr/WebXRManager.d.ts +2 -1
  204. three/src/textures/CompressedCubeTexture.d.ts +13 -0
  205. three/src/textures/DataArrayTexture.d.ts +1 -1
  206. three/src/textures/Source.d.ts +11 -1
  207. three/build/three.d.ts +0 -2
  208. three/build/three.min.d.ts +0 -2
  209. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
  210. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
  211. three/examples/jsm/objects/GroundProjectedSkybox.d.ts +0 -13
@@ -1,94 +1,103 @@
1
1
  import { mx_hsvtorgb, mx_rgbtohsv } from './lib/mx_hsv.js';
2
- import { Swizzable } from '../shadernode/ShaderNodeElements.js';
3
- import { UVNode, MathNode } from '../Nodes.js';
4
- import { NodeRepresentation } from '../shadernode/ShaderNode.js';
2
+ import Node from '../core/Node.js';
3
+ import MathNode from '../math/MathNode.js';
4
+ import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
5
5
 
6
- export function mx_aastep(threshold?: NodeRepresentation, value?: NodeRepresentation): Swizzable<MathNode>;
6
+ export function mx_aastep(threshold?: NodeRepresentation, value?: NodeRepresentation): ShaderNodeObject<MathNode>;
7
7
 
8
8
  export function mx_ramplr(
9
9
  valuel?: NodeRepresentation,
10
10
  valuer?: NodeRepresentation,
11
- texcoord?: Swizzable<UVNode>,
12
- ): Swizzable<MathNode>;
11
+ texcoord?: ShaderNodeObject<Node>,
12
+ ): ShaderNodeObject<MathNode>;
13
13
  export function mx_ramptb(
14
14
  valuet?: NodeRepresentation,
15
15
  valueb?: NodeRepresentation,
16
- texcoord?: Swizzable<UVNode>,
17
- ): Swizzable<MathNode>;
16
+ texcoord?: ShaderNodeObject<Node>,
17
+ ): ShaderNodeObject<MathNode>;
18
18
 
19
19
  export function mx_splitlr(
20
20
  valuel?: NodeRepresentation,
21
21
  valuer?: NodeRepresentation,
22
22
  center?: NodeRepresentation,
23
- texcoord?: Swizzable<UVNode>,
24
- ): Swizzable<MathNode>;
23
+ texcoord?: ShaderNodeObject<Node>,
24
+ ): ShaderNodeObject<MathNode>;
25
25
  export function mx_splittb(
26
26
  valuet?: NodeRepresentation,
27
27
  valueb?: NodeRepresentation,
28
28
  center?: NodeRepresentation,
29
- texcoord?: Swizzable<UVNode>,
30
- ): Swizzable<MathNode>;
29
+ texcoord?: ShaderNodeObject<Node>,
30
+ ): ShaderNodeObject<MathNode>;
31
31
 
32
32
  export function mx_transform_uv(
33
33
  uv_scale?: NodeRepresentation,
34
34
  uv_offset?: NodeRepresentation,
35
- uv_geo?: Swizzable<UVNode>,
36
- ): Swizzable;
35
+ uv_geo?: ShaderNodeObject<Node>,
36
+ ): ShaderNodeObject<Node>;
37
37
 
38
38
  export function mx_noise_float(
39
- texcoord?: Swizzable<UVNode>,
39
+ texcoord?: ShaderNodeObject<Node>,
40
40
  amplitude?: NodeRepresentation,
41
41
  pivot?: NodeRepresentation,
42
- ): Swizzable;
42
+ ): ShaderNodeObject<Node>;
43
43
  export function mx_noise_vec2(
44
- texcoord?: Swizzable<UVNode>,
44
+ texcoord?: ShaderNodeObject<Node>,
45
45
  amplitude?: NodeRepresentation,
46
46
  pivot?: NodeRepresentation,
47
- ): Swizzable;
47
+ ): ShaderNodeObject<Node>;
48
48
  export function mx_noise_vec3(
49
- texcoord?: Swizzable<UVNode>,
49
+ texcoord?: ShaderNodeObject<Node>,
50
50
  amplitude?: NodeRepresentation,
51
51
  pivot?: NodeRepresentation,
52
- ): Swizzable;
52
+ ): ShaderNodeObject<Node>;
53
53
  export function mx_noise_vec4(
54
- texcoord?: Swizzable<UVNode>,
54
+ texcoord?: ShaderNodeObject<Node>,
55
55
  amplitude?: NodeRepresentation,
56
56
  pivot?: NodeRepresentation,
57
- ): Swizzable;
57
+ ): ShaderNodeObject<Node>;
58
58
 
59
- export function mx_worley_noise_float(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
60
- export function mx_worley_noise_vec2(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
61
- export function mx_worley_noise_vec3(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
59
+ export function mx_worley_noise_float(
60
+ texcoord?: ShaderNodeObject<Node>,
61
+ jitter?: NodeRepresentation,
62
+ ): ShaderNodeObject<Node>;
63
+ export function mx_worley_noise_vec2(
64
+ texcoord?: ShaderNodeObject<Node>,
65
+ jitter?: NodeRepresentation,
66
+ ): ShaderNodeObject<Node>;
67
+ export function mx_worley_noise_vec3(
68
+ texcoord?: ShaderNodeObject<Node>,
69
+ jitter?: NodeRepresentation,
70
+ ): ShaderNodeObject<Node>;
62
71
 
63
- export function mx_cell_noise_float(texcoord?: Swizzable<UVNode>): Swizzable;
72
+ export function mx_cell_noise_float(texcoord?: ShaderNodeObject<Node>): ShaderNodeObject<Node>;
64
73
 
65
74
  export function mx_fractal_noise_float(
66
- position?: Swizzable<UVNode>,
75
+ position?: ShaderNodeObject<Node>,
67
76
  octaves?: NodeRepresentation,
68
77
  lacunarity?: NodeRepresentation,
69
78
  diminish?: NodeRepresentation,
70
79
  amplitude?: NodeRepresentation,
71
- ): Swizzable;
80
+ ): ShaderNodeObject<Node>;
72
81
  export function mx_fractal_noise_vec2(
73
- position?: Swizzable<UVNode>,
82
+ position?: ShaderNodeObject<Node>,
74
83
  octaves?: NodeRepresentation,
75
84
  lacunarity?: NodeRepresentation,
76
85
  diminish?: NodeRepresentation,
77
86
  amplitude?: NodeRepresentation,
78
- ): Swizzable;
87
+ ): ShaderNodeObject<Node>;
79
88
  export function mx_fractal_noise_vec3(
80
- position?: Swizzable<UVNode>,
89
+ position?: ShaderNodeObject<Node>,
81
90
  octaves?: NodeRepresentation,
82
91
  lacunarity?: NodeRepresentation,
83
92
  diminish?: NodeRepresentation,
84
93
  amplitude?: NodeRepresentation,
85
- ): Swizzable;
94
+ ): ShaderNodeObject<Node>;
86
95
  export function mx_fractal_noise_vec4(
87
- position?: Swizzable<UVNode>,
96
+ position?: ShaderNodeObject<Node>,
88
97
  octaves?: NodeRepresentation,
89
98
  lacunarity?: NodeRepresentation,
90
99
  diminish?: NodeRepresentation,
91
100
  amplitude?: NodeRepresentation,
92
- ): Swizzable;
101
+ ): ShaderNodeObject<Node>;
93
102
 
94
103
  export { mx_hsvtorgb, mx_rgbtohsv };
@@ -1,4 +1,6 @@
1
- import { Fn, Node, Swizzable } from '../../Nodes.js';
1
+ import Node from '../../core/Node.js';
2
+ import { Fn } from '../../code/FunctionNode.js';
3
+ import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
2
4
 
3
- export function mx_hsvtorgb(...params: Fn<[Node]>): Swizzable;
4
- export function mx_rgbtohsv(...params: Fn<[Node]>): Swizzable;
5
+ export function mx_hsvtorgb(...params: Fn<[Node]>): ShaderNodeObject<Node>;
6
+ export function mx_rgbtohsv(...params: Fn<[Node]>): ShaderNodeObject<Node>;
@@ -1,6 +1,8 @@
1
- import { Fn, Node, Swizzable } from '../../Nodes.js';
1
+ import Node from '../../core/Node.js';
2
+ import { Fn } from '../../code/FunctionNode.js';
3
+ import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
2
4
 
3
- export function mx_perlin_noise_float(...params: Fn<[Node]>): Swizzable;
4
- export function mx_cell_noise_float(...params: Fn<[Node]>): Swizzable;
5
- export function mx_worley_noise_float(...params: Fn<[Node]>): Swizzable;
6
- export function mx_fractal_noise_float(...params: Fn<[Node, Node, Node, Node]>): Swizzable;
5
+ export function mx_perlin_noise_float(...params: Fn<[Node]>): ShaderNodeObject<Node>;
6
+ export function mx_cell_noise_float(...params: Fn<[Node]>): ShaderNodeObject<Node>;
7
+ export function mx_worley_noise_float(...params: Fn<[Node]>): ShaderNodeObject<Node>;
8
+ export function mx_fractal_noise_float(...params: Fn<[Node, Node, Node, Node]>): ShaderNodeObject<Node>;
@@ -1,4 +1,5 @@
1
1
  import Node from '../core/Node.js';
2
+ import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
2
3
 
3
4
  export default class CondNode extends Node {
4
5
  condNode: Node;
@@ -7,3 +8,15 @@ export default class CondNode extends Node {
7
8
 
8
9
  constructor(condNode: Node, ifNode: Node, elseNode: Node);
9
10
  }
11
+
12
+ export function cond(
13
+ condNode: NodeRepresentation,
14
+ ifNode: NodeRepresentation,
15
+ elseNode: NodeRepresentation,
16
+ ): ShaderNodeObject<Node>;
17
+
18
+ declare module '../shadernode/ShaderNode.js' {
19
+ interface NodeElements {
20
+ cond: typeof cond;
21
+ }
22
+ }
@@ -0,0 +1,16 @@
1
+ import Node from '../core/Node.js';
2
+ import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
3
+
4
+ export default class HashNode extends Node {
5
+ seedNode: Node;
6
+
7
+ constructor(seedNode: Node);
8
+ }
9
+
10
+ export const hash: (seedNode: NodeRepresentation) => ShaderNodeObject<HashNode>;
11
+
12
+ declare module '../shadernode/ShaderNode.js' {
13
+ interface NodeElements {
14
+ hash: typeof hash;
15
+ }
16
+ }
@@ -1,5 +1,6 @@
1
1
  import Node from '../core/Node.js';
2
2
  import TempNode from '../core/TempNode.js';
3
+ import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
3
4
 
4
5
  export type MathNodeMethod1 =
5
6
  | typeof MathNode.RADIANS
@@ -27,7 +28,11 @@ export type MathNodeMethod1 =
27
28
  | typeof MathNode.ONE_MINUS
28
29
  | typeof MathNode.DFDX
29
30
  | typeof MathNode.DFDY
30
- | typeof MathNode.ROUND;
31
+ | typeof MathNode.ROUND
32
+ | typeof MathNode.RECIPROCAL
33
+ | typeof MathNode.TRUNC
34
+ | typeof MathNode.FWIDTH
35
+ | typeof MathNode.BITCAST;
31
36
 
32
37
  export type MathNodeMethod2 =
33
38
  | typeof MathNode.ATAN2
@@ -81,6 +86,9 @@ export default class MathNode extends TempNode {
81
86
  static DFDY: 'dFdy';
82
87
  static ROUND: 'round';
83
88
  static RECIPROCAL: 'reciprocal';
89
+ static TRUNC: 'trunc';
90
+ static FWIDTH: 'fwidth';
91
+ static BITCAST: 'bitcast';
84
92
 
85
93
  // 2 inputs
86
94
 
@@ -113,3 +121,134 @@ export default class MathNode extends TempNode {
113
121
  constructor(method: MathNodeMethod2, aNode: Node, bNode: Node);
114
122
  constructor(method: MathNodeMethod3, aNode: Node, bNode: Node, cNode: Node);
115
123
  }
124
+
125
+ export const EPSILON: ShaderNodeObject<Node>;
126
+ export const INFINITY: ShaderNodeObject<Node>;
127
+ export const PI: ShaderNodeObject<Node>;
128
+ export const PI2: ShaderNodeObject<Node>;
129
+
130
+ type Unary = (a: NodeRepresentation) => ShaderNodeObject<MathNode>;
131
+
132
+ export const radians: Unary;
133
+ export const degrees: Unary;
134
+ export const exp: Unary;
135
+ export const exp2: Unary;
136
+ export const log: Unary;
137
+ export const log2: Unary;
138
+ export const sqrt: Unary;
139
+ export const inverseSqrt: Unary;
140
+ export const floor: Unary;
141
+ export const ceil: Unary;
142
+ export const normalize: Unary;
143
+ export const fract: Unary;
144
+ export const sin: Unary;
145
+ export const cos: Unary;
146
+ export const tan: Unary;
147
+ export const asin: Unary;
148
+ export const acos: Unary;
149
+ export const atan: Unary;
150
+ export const abs: Unary;
151
+ export const sign: Unary;
152
+ export const length: Unary;
153
+ export const negate: Unary;
154
+ export const oneMinus: Unary;
155
+ export const dFdx: Unary;
156
+ export const dFdy: Unary;
157
+ export const round: Unary;
158
+ export const reciprocal: Unary;
159
+ export const trunc: Unary;
160
+ export const fwidth: Unary;
161
+ export const bitcast: Unary;
162
+
163
+ type Binary = (a: NodeRepresentation, b: NodeRepresentation) => ShaderNodeObject<MathNode>;
164
+
165
+ export const atan2: Binary;
166
+ export const min: Binary;
167
+ export const max: Binary;
168
+ export const mod: Binary;
169
+ export const step: Binary;
170
+ export const reflect: Binary;
171
+ export const distance: Binary;
172
+ export const difference: Binary;
173
+ export const dot: Binary;
174
+ export const cross: Binary;
175
+ export const pow: Binary;
176
+ export const pow2: Binary;
177
+ export const pow3: Binary;
178
+ export const pow4: Binary;
179
+ export const transformDirection: Binary;
180
+
181
+ type Ternary = (a: NodeRepresentation, b: NodeRepresentation, c: NodeRepresentation) => ShaderNodeObject<MathNode>;
182
+
183
+ export const cbrt: Unary;
184
+ export const lengthSq: Unary;
185
+ export const mix: Ternary;
186
+ export const clamp: (
187
+ a: NodeRepresentation,
188
+ b?: NodeRepresentation,
189
+ c?: NodeRepresentation,
190
+ ) => ShaderNodeObject<MathNode>;
191
+ export const saturate: Unary;
192
+ export const refract: Ternary;
193
+ export const smoothstep: Ternary;
194
+ export const faceForward: Ternary;
195
+
196
+ export const mixElement: Ternary;
197
+ export const smoothstepElement: Ternary;
198
+
199
+ declare module '../shadernode/ShaderNode.js' {
200
+ interface NodeElements {
201
+ radians: typeof radians;
202
+ degrees: typeof degrees;
203
+ exp: typeof exp;
204
+ exp2: typeof exp2;
205
+ log: typeof log;
206
+ log2: typeof log2;
207
+ sqrt: typeof sqrt;
208
+ inverseSqrt: typeof inverseSqrt;
209
+ floor: typeof floor;
210
+ ceil: typeof ceil;
211
+ normalize: typeof normalize;
212
+ fract: typeof fract;
213
+ sin: typeof sin;
214
+ cos: typeof cos;
215
+ tan: typeof tan;
216
+ asin: typeof asin;
217
+ acos: typeof acos;
218
+ atan: typeof atan;
219
+ abs: typeof abs;
220
+ sign: typeof sign;
221
+ length: typeof length;
222
+ lengthSq: typeof lengthSq;
223
+ negate: typeof negate;
224
+ oneMinus: typeof oneMinus;
225
+ dFdx: typeof dFdx;
226
+ dFdy: typeof dFdy;
227
+ round: typeof round;
228
+ reciprocal: typeof reciprocal;
229
+ trunc: typeof trunc;
230
+ fwidth: typeof fwidth;
231
+ atan2: typeof atan2;
232
+ min: typeof min;
233
+ max: typeof max;
234
+ mod: typeof mod;
235
+ step: typeof step;
236
+ reflect: typeof reflect;
237
+ distance: typeof distance;
238
+ dot: typeof dot;
239
+ cross: typeof cross;
240
+ pow: typeof pow;
241
+ pow2: typeof pow2;
242
+ pow3: typeof pow3;
243
+ pow4: typeof pow4;
244
+ transformDirection: typeof transformDirection;
245
+ mix: typeof mixElement;
246
+ clamp: typeof clamp;
247
+ refract: typeof refract;
248
+ smoothstep: typeof smoothstepElement;
249
+ faceForward: typeof faceForward;
250
+ difference: typeof difference;
251
+ saturate: typeof saturate;
252
+ cbrt: typeof cbrt;
253
+ }
254
+ }
@@ -0,0 +1,16 @@
1
+ import { Binary, Ternary } from './MathNode.js';
2
+
3
+ // remapping functions
4
+ export const parabola: Binary;
5
+ export const gain: Binary;
6
+ export const pcurve: Ternary;
7
+ export const sinc: Binary;
8
+
9
+ declare module '../shadernode/ShaderNode.js' {
10
+ interface NodeElements {
11
+ parabola: typeof parabola;
12
+ gain: typeof gain;
13
+ pcurve: typeof pcurve;
14
+ sinc: typeof sinc;
15
+ }
16
+ }
@@ -1,8 +1,8 @@
1
1
  import TempNode from '../core/TempNode.js';
2
2
  import Node from '../core/Node.js';
3
+ import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
3
4
 
4
5
  export type OperatorNodeOp =
5
- | '='
6
6
  | '%'
7
7
  | '&'
8
8
  | '|'
@@ -29,3 +29,55 @@ export default class OperatorNode extends TempNode {
29
29
 
30
30
  constructor(op: OperatorNodeOp, ...params: [Node, Node, ...Node[]]);
31
31
  }
32
+
33
+ type Operator = (
34
+ a: NodeRepresentation,
35
+ b: NodeRepresentation,
36
+ ...others: NodeRepresentation[]
37
+ ) => ShaderNodeObject<OperatorNode>;
38
+
39
+ export const add: Operator;
40
+ export const sub: Operator;
41
+ export const mul: Operator;
42
+ export const div: Operator;
43
+ export const remainder: Operator;
44
+ export const equal: Operator;
45
+ export const lessThan: Operator;
46
+ export const greaterThan: Operator;
47
+ export const lessThanEqual: Operator;
48
+ export const greaterThanEqual: Operator;
49
+ export const and: Operator;
50
+ export const or: Operator;
51
+ export const not: (a: NodeRepresentation) => ShaderNodeObject<OperatorNode>;
52
+ export const xor: Operator;
53
+ export const bitAnd: Operator;
54
+ export const bitNot: (a: NodeRepresentation) => ShaderNodeObject<OperatorNode>;
55
+ export const bitOr: Operator;
56
+ export const bitXor: Operator;
57
+ export const shiftLeft: Operator;
58
+ export const shiftRight: Operator;
59
+
60
+ declare module '../shadernode/ShaderNode.js' {
61
+ interface NodeElements {
62
+ add: typeof add;
63
+ sub: typeof sub;
64
+ mul: typeof mul;
65
+ div: typeof div;
66
+ remainder: typeof remainder;
67
+ equal: typeof equal;
68
+ lessThan: typeof lessThan;
69
+ greaterThan: typeof greaterThan;
70
+ lessThanEqual: typeof lessThanEqual;
71
+ greaterThanEqual: typeof greaterThanEqual;
72
+ and: typeof and;
73
+ or: typeof or;
74
+ not: typeof not;
75
+ xor: typeof xor;
76
+ bitAnd: typeof bitAnd;
77
+ bitNot: typeof bitNot;
78
+ bitOr: typeof bitOr;
79
+ bitXor: typeof bitXor;
80
+ shiftLeft: typeof shiftLeft;
81
+ shiftRight: typeof shiftRight;
82
+ }
83
+ }
@@ -0,0 +1,12 @@
1
+ import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
2
+ import Node from '../core/Node.js';
3
+
4
+ export const tri: (x: NodeRepresentation) => ShaderNodeObject<Node>;
5
+
6
+ export const tri3: (p: NodeRepresentation) => ShaderNodeObject<Node>;
7
+
8
+ export const triNoise3D: (
9
+ p_immutable: NodeRepresentation,
10
+ spd: NodeRepresentation,
11
+ time: NodeRepresentation,
12
+ ) => ShaderNodeObject<Node>;
@@ -1,6 +1,15 @@
1
1
  import TempNode from '../core/TempNode.js';
2
+ import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
2
3
 
3
4
  export default class CheckerNode extends TempNode {
4
5
  uvNode: Node;
5
6
  constructor(uvNode?: Node);
6
7
  }
8
+
9
+ export const checker: (uvNode?: NodeRepresentation) => ShaderNodeObject<CheckerNode>;
10
+
11
+ declare module '../shadernode/ShaderNode.js' {
12
+ interface NodeElements {
13
+ checker: typeof checker;
14
+ }
15
+ }
@@ -1,20 +1,73 @@
1
- import { ConstNode, Node, NodeBuilder, NodeTypeOption, SwizzleOption } from '../Nodes.js';
2
- // lot of private typescript magic here
3
- export {};
1
+ import Node from '../core/Node.js';
2
+ import { AnyObject, NodeTypeOption, SwizzleOption } from '../core/constants.js';
3
+ import ConstNode from '../core/ConstNode.js';
4
+ import NodeBuilder from '../core/NodeBuilder.js';
5
+
6
+ export interface NodeElements {
7
+ append: typeof append;
8
+
9
+ color: typeof color;
10
+ float: typeof float;
11
+ int: typeof int;
12
+ uint: typeof uint;
13
+ bool: typeof bool;
14
+ vec2: typeof vec2;
15
+ ivec2: typeof ivec2;
16
+ uvec2: typeof uvec2;
17
+ bvec2: typeof bvec2;
18
+ vec3: typeof vec3;
19
+ ivec3: typeof ivec3;
20
+ uvec3: typeof uvec3;
21
+ bvec3: typeof bvec3;
22
+ vec4: typeof vec4;
23
+ ivec4: typeof ivec4;
24
+ uvec4: typeof uvec4;
25
+ bvec4: typeof bvec4;
26
+ mat2: typeof mat2;
27
+ imat2: typeof imat2;
28
+ umat2: typeof umat2;
29
+ bmat2: typeof bmat2;
30
+ mat3: typeof mat3;
31
+ imat3: typeof imat3;
32
+ umat3: typeof umat3;
33
+ bmat3: typeof bmat3;
34
+ mat4: typeof mat4;
35
+ imat4: typeof imat4;
36
+ umat4: typeof umat4;
37
+ bmat4: typeof bmat4;
38
+ string: typeof string;
39
+ arrayBuffer: typeof arrayBuffer;
40
+
41
+ element: typeof element;
42
+ convert: typeof convert;
43
+ }
44
+
45
+ export function addNodeElement(name: string, nodeElement: unknown): void;
46
+
4
47
  export type Swizzable<T extends Node = Node> = T & {
5
- [key in SwizzleOption | number]: Swizzable;
48
+ [key in SwizzleOption | number]: ShaderNodeObject<Node>;
6
49
  };
7
50
 
51
+ export type ShaderNodeObject<T extends Node> = T & {
52
+ [Key in keyof NodeElements]: NodeElements[Key] extends (node: T, ...args: infer Args) => infer R
53
+ ? (...args: Args) => R
54
+ : never;
55
+ } & Swizzable<T>;
56
+
8
57
  /** anything that can be passed to {@link nodeObject} and returns a proxy */
9
- export type NodeRepresentation<T extends Node = Node> = number | boolean | Node | Swizzable<T>;
58
+ export type NodeRepresentation<T extends Node = Node> = number | boolean | Node | ShaderNodeObject<T>;
10
59
 
11
60
  /** anything that can be passed to {@link nodeObject} */
12
61
  export type NodeObjectOption = NodeRepresentation | string;
13
62
 
14
- // same logic as in ShaderNodeObject: number,boolean,node->swizzable, otherwise do nothing
15
- export type NodeObject<T> = T extends Node ? Swizzable<T> : T extends number | boolean ? Swizzable<ConstNode> : T;
63
+ // same logic as in ShaderNodeObject: number,boolean,node->ShaderNodeObject, otherwise do nothing
64
+ export type NodeObject<T> = T extends Node
65
+ ? ShaderNodeObject<T>
66
+ : T extends number | boolean
67
+ ? ShaderNodeObject<ConstNode<number | boolean>>
68
+ : T;
16
69
 
17
- // opposite of NodeObject: node -> node|swizzable|boolean|number, otherwise do nothing
70
+ // opposite of NodeObject: node -> node|ShaderNodeObject|boolean|number, otherwise do nothing
18
71
  type Proxied<T> = T extends Node ? NodeRepresentation<T> : T;
19
72
  // https://github.com/microsoft/TypeScript/issues/42435#issuecomment-765557874
20
73
  export type ProxiedTuple<T extends readonly [...unknown[]]> = [...{ [index in keyof T]: Proxied<T[index]> }];
@@ -102,11 +155,7 @@ type GetConstructorsByScope<T, S> = ConstructorUnion<FilterConstructorsByScope<O
102
155
  type GetConstructors<T> = ConstructorUnion<OverloadedConstructorsOf<T>>;
103
156
  type GetPossibleScopes<T> = ExtractScopes<OverloadedConstructorsOf<T>>;
104
157
 
105
- export type ConvertType = (...params: unknown[]) => Swizzable;
106
-
107
- export const ConvertType: {
108
- new (type: NodeTypeOption, cacheMap?: Map<unknown, ConstNode>): ConvertType;
109
- };
158
+ export type ConvertType = (...params: unknown[]) => ShaderNodeObject<Node>;
110
159
 
111
160
  type NodeArray<T extends NodeObjectOption[]> = { [index in keyof T]: NodeObject<T[index]> };
112
161
  type NodeObjects<T> = { [key in keyof T]: T[key] extends NodeObjectOption ? NodeObject<T[key]> : T[key] };
@@ -114,7 +163,16 @@ type ConstructedNode<T> = T extends new (...args: any[]) => infer R ? (R extends
114
163
 
115
164
  export type NodeOrType = Node | NodeTypeOption;
116
165
 
117
- export function getConstNodeType(value: NodeOrType): NodeTypeOption | null;
166
+ export const getConstNodeType: (value: NodeOrType) => NodeTypeOption | null;
167
+
168
+ export class ShaderNode<T = {}, R extends Node = Node> {
169
+ constructor(jsFunc: (inputs: NodeObjects<T>, builder: NodeBuilder) => NodeRepresentation);
170
+ call: (
171
+ inputs: { [key in keyof T]: T[key] extends NodeRepresentation ? ShaderNodeObject<Node> | Node : T[key] },
172
+ builder?: NodeBuilder,
173
+ ) => ShaderNodeObject<R>;
174
+ }
175
+
118
176
  export function nodeObject<T extends NodeObjectOption>(obj: T): NodeObject<T>;
119
177
  export function nodeObjects<T>(obj: T): NodeObjects<T>;
120
178
 
@@ -122,35 +180,70 @@ export function nodeArray<T extends NodeObjectOption[]>(obj: readonly [...T]): N
122
180
 
123
181
  export function nodeProxy<T>(
124
182
  nodeClass: T,
125
- ): (...params: ProxiedTuple<GetConstructors<T>>) => Swizzable<ConstructedNode<T>>;
183
+ ): (...params: ProxiedTuple<GetConstructors<T>>) => ShaderNodeObject<ConstructedNode<T>>;
126
184
 
127
185
  export function nodeProxy<T, S extends GetPossibleScopes<T>>(
128
186
  nodeClass: T,
129
187
  scope: S,
130
- ): (...params: ProxiedTuple<RemoveTail<GetConstructorsByScope<T, S>>>) => Swizzable<ConstructedNode<T>>;
188
+ ): (...params: ProxiedTuple<RemoveTail<GetConstructorsByScope<T, S>>>) => ShaderNodeObject<ConstructedNode<T>>;
131
189
 
132
190
  export function nodeProxy<T, S extends GetPossibleScopes<T>>(
133
191
  nodeClass: T,
134
192
  scope: S,
135
193
  factor: NodeObjectOption,
136
- ): (...params: ProxiedTuple<RemoveHeadAndTail<GetConstructorsByScope<T, S>>>) => Swizzable<ConstructedNode<T>>;
194
+ ): (...params: ProxiedTuple<RemoveHeadAndTail<GetConstructorsByScope<T, S>>>) => ShaderNodeObject<ConstructedNode<T>>;
137
195
 
138
196
  export function nodeImmutable<T>(
139
197
  nodeClass: T,
140
198
  ...params: ProxiedTuple<GetConstructors<T>>
141
- ): Swizzable<ConstructedNode<T>>;
199
+ ): ShaderNodeObject<ConstructedNode<T>>;
142
200
 
143
- export class ShaderNode<T = {}, R extends Node = Node> {
144
- constructor(jsFunc: (inputs: NodeObjects<T>, builder: NodeBuilder) => NodeRepresentation);
145
- call: (
146
- inputs: { [key in keyof T]: T[key] extends NodeRepresentation ? Swizzable | Node : T[key] },
147
- builder?: NodeBuilder,
148
- ) => Swizzable<R>;
149
- }
201
+ export function tslFn<R extends Node = ShaderNodeObject<Node>>(jsFunc: () => R): () => R;
202
+ export function tslFn<T extends AnyObject, R extends Node = ShaderNodeObject<Node>>(
203
+ jsFunc: (args: T) => R,
204
+ ): (args: T) => R;
150
205
 
151
- export const cacheMaps: {
152
- bool: Map<boolean, ConstNode>;
153
- uint: Map<number, ConstNode>;
154
- int: Map<number, ConstNode>;
155
- float: Map<number, ConstNode>;
156
- };
206
+ export function append(node: Node): Node;
207
+
208
+ export const color: ConvertType;
209
+
210
+ export const float: ConvertType;
211
+ export const int: ConvertType;
212
+ export const uint: ConvertType;
213
+ export const bool: ConvertType;
214
+
215
+ export const vec2: ConvertType;
216
+ export const ivec2: ConvertType;
217
+ export const uvec2: ConvertType;
218
+ export const bvec2: ConvertType;
219
+
220
+ export const vec3: ConvertType;
221
+ export const ivec3: ConvertType;
222
+ export const uvec3: ConvertType;
223
+ export const bvec3: ConvertType;
224
+
225
+ export const vec4: ConvertType;
226
+ export const ivec4: ConvertType;
227
+ export const uvec4: ConvertType;
228
+ export const bvec4: ConvertType;
229
+
230
+ export const mat2: ConvertType;
231
+ export const imat2: ConvertType;
232
+ export const umat2: ConvertType;
233
+ export const bmat2: ConvertType;
234
+
235
+ export const mat3: ConvertType;
236
+ export const imat3: ConvertType;
237
+ export const umat3: ConvertType;
238
+ export const bmat3: ConvertType;
239
+
240
+ export const mat4: ConvertType;
241
+ export const imat4: ConvertType;
242
+ export const umat4: ConvertType;
243
+ export const bmat4: ConvertType;
244
+
245
+ export const string: (value?: string) => ShaderNodeObject<ConstNode<string>>;
246
+ export const arrayBuffer: (value: ArrayBuffer) => ShaderNodeObject<ConstNode<ArrayBuffer>>;
247
+
248
+ export const element: (node: NodeRepresentation, indexNode: NodeRepresentation) => ShaderNodeObject<Node>;
249
+ export const convert: (node: NodeRepresentation, types: NodeTypeOption) => ShaderNodeObject<Node>;