@types/three 0.143.0 → 0.144.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 (206) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/controls/FirstPersonControls.d.ts +4 -1
  3. three/examples/jsm/csm/CSM.d.ts +1 -1
  4. three/examples/jsm/environments/RoomEnvironment.d.ts +1 -0
  5. three/examples/jsm/interactive/SelectionHelper.d.ts +1 -3
  6. three/examples/jsm/libs/stats.module.d.ts +1 -1
  7. three/examples/jsm/loaders/TIFFLoader.d.ts +16 -0
  8. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
  9. three/examples/jsm/math/ColorConverter.d.ts +0 -2
  10. three/examples/jsm/misc/GPUComputationRenderer.d.ts +1 -0
  11. three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -2
  12. three/examples/jsm/misc/Volume.d.ts +1 -1
  13. three/examples/jsm/modifiers/CurveModifier.d.ts +6 -6
  14. three/examples/jsm/nodes/Nodes.d.ts +216 -0
  15. three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
  16. three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
  17. three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +11 -0
  18. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
  19. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
  20. three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
  21. three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
  22. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
  23. three/examples/jsm/nodes/accessors/NormalNode.d.ts +17 -0
  24. three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
  25. three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
  26. three/examples/jsm/nodes/accessors/PositionNode.d.ts +19 -0
  27. three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
  28. three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
  29. three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
  30. three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
  31. three/examples/jsm/nodes/accessors/TextureNode.d.ts +12 -0
  32. three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
  33. three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
  34. three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
  35. three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
  36. three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
  37. three/examples/jsm/nodes/core/CodeNode.d.ts +16 -0
  38. three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
  39. three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
  40. three/examples/jsm/nodes/core/ExpressionNode.d.ts +7 -0
  41. three/examples/jsm/nodes/core/FunctionCallNode.d.ts +13 -0
  42. three/examples/jsm/nodes/core/FunctionNode.d.ts +17 -0
  43. three/examples/jsm/nodes/core/InputNode.d.ts +12 -0
  44. three/examples/jsm/nodes/core/InstanceIndexNode.d.ts +6 -0
  45. three/examples/jsm/nodes/core/Node.d.ts +31 -0
  46. three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
  47. three/examples/jsm/nodes/core/NodeBuilder.d.ts +134 -0
  48. three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
  49. three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
  50. three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
  51. three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
  52. three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
  53. three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
  54. three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
  55. three/examples/jsm/nodes/core/NodeUtils.d.ts +7 -0
  56. three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
  57. three/examples/jsm/nodes/core/NodeVary.d.ts +6 -0
  58. three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
  59. three/examples/jsm/nodes/core/TempNode.d.ts +8 -0
  60. three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
  61. three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
  62. three/examples/jsm/nodes/core/VaryNode.d.ts +8 -0
  63. three/examples/jsm/nodes/core/constants.d.ts +77 -0
  64. three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
  65. three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +15 -0
  66. three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
  67. three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
  68. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
  69. three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
  70. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
  71. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
  72. three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
  73. three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
  74. three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
  75. three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
  76. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
  77. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
  78. three/examples/jsm/nodes/functions/light/getDistanceAttenuation.d.ts +5 -0
  79. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
  80. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
  81. three/examples/jsm/nodes/geometry/RangeNode.d.ts +12 -0
  82. three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
  83. three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
  84. three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
  85. three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
  86. three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
  87. three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
  88. three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
  89. three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
  90. three/examples/jsm/nodes/lighting/PunctualLightNode.d.ts +12 -0
  91. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +21 -0
  92. three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
  93. three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +11 -0
  94. three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +16 -0
  95. three/examples/jsm/nodes/materials/Materials.d.ts +17 -0
  96. three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +19 -0
  97. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
  98. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +27 -0
  99. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +22 -0
  100. three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
  101. three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
  102. three/examples/jsm/nodes/materialx/functions/lib/mx_hsv.d.ts +4 -0
  103. three/examples/jsm/nodes/materialx/functions/lib/mx_noise.d.ts +6 -0
  104. three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
  105. three/examples/jsm/nodes/math/MathNode.d.ts +116 -0
  106. three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
  107. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
  108. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +157 -0
  109. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +285 -0
  110. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +128 -0
  111. three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
  112. three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
  113. three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
  114. three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
  115. three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +7 -0
  116. three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
  117. three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
  118. three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
  119. three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
  120. three/examples/jsm/nodes/utils/TimerNode.d.ts +14 -0
  121. three/examples/jsm/objects/ReflectorForSSRPass.d.ts +4 -4
  122. three/examples/jsm/postprocessing/SSRPass.d.ts +3 -3
  123. three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +17 -0
  124. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +56 -0
  125. three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
  126. three/examples/jsm/shaders/AfterimageShader.d.ts +4 -4
  127. three/examples/jsm/shaders/BleachBypassShader.d.ts +3 -3
  128. three/examples/jsm/shaders/BlendShader.d.ts +5 -5
  129. three/examples/jsm/shaders/BokehShader.d.ts +9 -9
  130. three/examples/jsm/shaders/BokehShader2.d.ts +26 -26
  131. three/examples/jsm/shaders/BrightnessContrastShader.d.ts +4 -4
  132. three/examples/jsm/shaders/ColorCorrectionShader.d.ts +5 -5
  133. three/examples/jsm/shaders/ColorifyShader.d.ts +3 -3
  134. three/examples/jsm/shaders/ConvolutionShader.d.ts +4 -4
  135. three/examples/jsm/shaders/CopyShader.d.ts +3 -3
  136. three/examples/jsm/shaders/DOFMipMapShader.d.ts +5 -5
  137. three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +9 -9
  138. three/examples/jsm/shaders/DigitalGlitch.d.ts +12 -12
  139. three/examples/jsm/shaders/DotScreenShader.d.ts +6 -6
  140. three/examples/jsm/shaders/FXAAShader.d.ts +3 -3
  141. three/examples/jsm/shaders/FilmShader.d.ts +7 -7
  142. three/examples/jsm/shaders/FocusShader.d.ts +6 -6
  143. three/examples/jsm/shaders/FreiChenShader.d.ts +3 -3
  144. three/examples/jsm/shaders/GammaCorrectionShader.d.ts +2 -2
  145. three/examples/jsm/shaders/GodRaysShader.d.ts +12 -12
  146. three/examples/jsm/shaders/HalftoneShader.d.ts +14 -14
  147. three/examples/jsm/shaders/HorizontalBlurShader.d.ts +3 -3
  148. three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +4 -4
  149. three/examples/jsm/shaders/HueSaturationShader.d.ts +4 -4
  150. three/examples/jsm/shaders/KaleidoShader.d.ts +4 -4
  151. three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +6 -6
  152. three/examples/jsm/shaders/LuminosityShader.d.ts +2 -2
  153. three/examples/jsm/shaders/MirrorShader.d.ts +3 -3
  154. three/examples/jsm/shaders/NormalMapShader.d.ts +5 -5
  155. three/examples/jsm/shaders/PixelShader.d.ts +4 -4
  156. three/examples/jsm/shaders/RGBShiftShader.d.ts +4 -4
  157. three/examples/jsm/shaders/SAOShader.d.ts +15 -15
  158. three/examples/jsm/shaders/SMAAShader.d.ts +10 -10
  159. three/examples/jsm/shaders/SSAOShader.d.ts +19 -19
  160. three/examples/jsm/shaders/SepiaShader.d.ts +3 -3
  161. three/examples/jsm/shaders/SobelOperatorShader.d.ts +3 -3
  162. three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +30 -30
  163. three/examples/jsm/shaders/TechnicolorShader.d.ts +2 -2
  164. three/examples/jsm/shaders/ToneMapShader.d.ts +7 -7
  165. three/examples/jsm/shaders/ToonShader.d.ts +26 -26
  166. three/examples/jsm/shaders/TriangleBlurShader.d.ts +3 -3
  167. three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +3 -3
  168. three/examples/jsm/shaders/VerticalBlurShader.d.ts +3 -3
  169. three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +4 -4
  170. three/examples/jsm/shaders/VignetteShader.d.ts +4 -4
  171. three/examples/jsm/shaders/VolumeShader.d.ts +7 -7
  172. three/examples/jsm/shaders/WaterRefractionShader.d.ts +6 -6
  173. three/examples/jsm/utils/CameraUtils.d.ts +1 -1
  174. three/index.d.ts +2 -2
  175. three/package.json +3 -3
  176. three/src/Three.d.ts +1 -1
  177. three/src/constants.d.ts +0 -5
  178. three/src/core/BufferAttribute.d.ts +0 -4
  179. three/src/core/BufferGeometry.d.ts +0 -1
  180. three/src/core/Object3D.d.ts +2 -1
  181. three/src/extras/core/ShapePath.d.ts +1 -1
  182. three/src/geometries/BoxGeometry.d.ts +0 -2
  183. three/src/geometries/CapsuleGeometry.d.ts +0 -2
  184. three/src/geometries/CircleGeometry.d.ts +0 -2
  185. three/src/geometries/ConeGeometry.d.ts +0 -2
  186. three/src/geometries/CylinderGeometry.d.ts +0 -2
  187. three/src/geometries/DodecahedronGeometry.d.ts +0 -2
  188. three/src/geometries/ExtrudeGeometry.d.ts +0 -2
  189. three/src/geometries/IcosahedronGeometry.d.ts +0 -2
  190. three/src/geometries/LatheGeometry.d.ts +0 -2
  191. three/src/geometries/OctahedronGeometry.d.ts +0 -2
  192. three/src/geometries/PlaneGeometry.d.ts +0 -2
  193. three/src/geometries/PolyhedronGeometry.d.ts +0 -2
  194. three/src/geometries/RingGeometry.d.ts +0 -2
  195. three/src/geometries/ShapeGeometry.d.ts +0 -2
  196. three/src/geometries/SphereGeometry.d.ts +0 -2
  197. three/src/geometries/TetrahedronGeometry.d.ts +0 -2
  198. three/src/geometries/TorusGeometry.d.ts +0 -2
  199. three/src/geometries/TorusKnotGeometry.d.ts +0 -2
  200. three/src/geometries/TubeGeometry.d.ts +0 -2
  201. three/src/materials/LineBasicMaterial.d.ts +7 -0
  202. three/src/materials/MeshLambertMaterial.d.ts +52 -1
  203. three/src/materials/MeshPhysicalMaterial.d.ts +5 -0
  204. three/src/materials/ShaderMaterial.d.ts +1 -1
  205. three/src/math/Quaternion.d.ts +0 -5
  206. three/src/renderers/shaders/UniformsUtils.d.ts +0 -1
@@ -0,0 +1,6 @@
1
+ import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements';
2
+ import Node from '../../core/Node';
3
+
4
+ declare const F_Schlick: ShaderNode<{ f0: Node; f90: Node; dotVH: Node }>;
5
+
6
+ export default F_Schlick;
@@ -0,0 +1,6 @@
1
+ import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements';
2
+ import Node from '../../core/Node';
3
+
4
+ declare const V_GGX_SmithCorrelated: ShaderNode<{ alpha: Node; dotNL: Node; dotNV: Node }>;
5
+
6
+ export default V_GGX_SmithCorrelated;
@@ -0,0 +1,11 @@
1
+ import { ShaderNode } from '../shadernode/ShaderNodeElements';
2
+ import Node from '../core/Node';
3
+
4
+ declare const PhysicalLightingModel: {
5
+ direct: ShaderNode<{ lightDirection: Node; lightColor: Node; reflectedLight: Node }>;
6
+ indirectDiffuse: ShaderNode<{ irradiance: Node; reflectedLight: Node }>;
7
+ indirectSpecular: ShaderNode<{ radiance: Node; iblIrradiance: Node; reflectedLight: Node }>;
8
+ ambientOcclusion: ShaderNode<{ ambientOcclusion: Node; reflectedLight: Node }>;
9
+ };
10
+
11
+ export default PhysicalLightingModel;
@@ -0,0 +1,5 @@
1
+ import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements';
2
+ import Node from '../../core/Node';
3
+ declare const getDistanceAttenuation: ShaderNode<{ lightDistance: Node; cutoffDistance: Node; decayExponent: Node }>;
4
+
5
+ export default getDistanceAttenuation;
@@ -0,0 +1,5 @@
1
+ import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements';
2
+
3
+ declare const getGeometryRoughness: ShaderNode;
4
+
5
+ export default getGeometryRoughness;
@@ -0,0 +1,6 @@
1
+ import { ShaderNode } from '../../shadernode/ShaderNodeElements';
2
+ import Node from '../../core/Node';
3
+
4
+ declare const getRoughness: ShaderNode<{ roughness: Node }>;
5
+
6
+ export default getRoughness;
@@ -0,0 +1,12 @@
1
+ import { Color, Vector2, Vector3, Vector4 } from '../../../../src/Three';
2
+ import Node from '../core/Node';
3
+
4
+ export type RangeModeBound = number | Color | Vector2 | Vector3 | Vector4;
5
+
6
+ export default class RangeNode extends Node {
7
+ min: RangeModeBound;
8
+ max: RangeModeBound;
9
+
10
+ constructor(min: RangeModeBound, max: RangeModeBound);
11
+ getVectorLength(): number;
12
+ }
@@ -0,0 +1,11 @@
1
+ import Node from '../core/Node';
2
+
3
+ export default class ComputeNode extends Node {
4
+ isComputeNode: true;
5
+
6
+ count: number;
7
+ workgroupSize: number[];
8
+ dispatchCount: number;
9
+
10
+ constructor(computeNode: Node, count: number, workgroupSize?: number[]);
11
+ }
@@ -0,0 +1,8 @@
1
+ import LightingNode from './LightingNode';
2
+ import Node from '../core/Node';
3
+
4
+ export default class AONode extends LightingNode {
5
+ aoNode: Node | null;
6
+
7
+ constructor(aoNode?: Node | null);
8
+ }
@@ -0,0 +1,10 @@
1
+ import LightingNode from './LightingNode';
2
+ import { Light } from '../../../../src/Three';
3
+ import Node from '../core/Node';
4
+
5
+ export default class AnalyticLightNode<T extends Light> extends LightingNode {
6
+ light: T | null;
7
+ colorNode: Node;
8
+
9
+ constructor(light?: T | null);
10
+ }
@@ -0,0 +1,8 @@
1
+ import LightingNode from './LightingNode';
2
+ import Node from '../core/Node';
3
+
4
+ export default class EnvironmentNode extends LightingNode {
5
+ envNode: Node | null;
6
+
7
+ constructor(envNode?: Node | null);
8
+ }
@@ -0,0 +1,13 @@
1
+ import AnalyticLightNode from './AnalyticLightNode';
2
+ import Object3DNode from '../accessors/Object3DNode';
3
+ import { HemisphereLight } from '../../../../src/Three';
4
+ import Node from '../core/Node';
5
+
6
+ export default class HemisphereLightNode extends AnalyticLightNode<HemisphereLight> {
7
+ lightPositionNode: Object3DNode;
8
+ lightDirectionNode: Node;
9
+
10
+ groundColorNode: Node;
11
+
12
+ constructor(light?: HemisphereLight | null);
13
+ }
@@ -0,0 +1,15 @@
1
+ import ContextNode from '../core/ContextNode';
2
+ import Node from '../core/Node';
3
+ import { ShaderNode } from '../Nodes';
4
+
5
+ export interface LightingModelNode {
6
+ indirectDiffuse?: ShaderNode;
7
+ indirectSpecular?: ShaderNode;
8
+ ambientOcclusion?: ShaderNode;
9
+ }
10
+
11
+ export default class LightingContextNode extends ContextNode {
12
+ lightingModelNode: LightingModelNode | null;
13
+
14
+ constructor(node: Node, lightingModelNode?: LightingModelNode | null);
15
+ }
@@ -0,0 +1,5 @@
1
+ import Node from '../core/Node';
2
+
3
+ export default abstract class LightingNode extends Node {
4
+ constructor();
5
+ }
@@ -0,0 +1,19 @@
1
+ import { Light } from '../../../../src/Three';
2
+ import Node from '../core/Node';
3
+ import LightingNode from './LightingNode';
4
+
5
+ export default class LightsNode extends Node {
6
+ lightNodes: LightingNode[];
7
+
8
+ constructor(lightNodes?: LightingNode[]);
9
+
10
+ get hasLight(): boolean;
11
+ getLightNodeByHash(hash: string): LightingNode | null;
12
+
13
+ fromLights(lights: Light[]): this;
14
+
15
+ static setReference<T extends Light>(
16
+ lightClass: { new (): T },
17
+ lightNodeClass: { new (light: T): LightingNode },
18
+ ): void;
19
+ }
@@ -0,0 +1,12 @@
1
+ import AnalyticLightNode from './AnalyticLightNode';
2
+ import Node from '../core/Node';
3
+ import { PointLight, SpotLight } from '../../../../src/Three';
4
+
5
+ export type PunctualLight = PointLight | SpotLight;
6
+
7
+ export default class PunctualLightNode extends AnalyticLightNode<PunctualLight> {
8
+ cutoffDistanceNode: Node;
9
+ decayExponentNode: Node;
10
+
11
+ constructor(light?: PunctualLight | null);
12
+ }
@@ -0,0 +1,21 @@
1
+ import { Loader, LoadingManager, Texture } from '../../../../src/Three';
2
+ import { Node, AnyJson } from '../Nodes';
3
+
4
+ export interface NodeLoaderResult {
5
+ [hash: string]: Node;
6
+ }
7
+
8
+ export default class NodeLoader extends Loader {
9
+ constructor(manager?: LoadingManager);
10
+
11
+ load(
12
+ url: string,
13
+ onLoad: (gltf: NodeLoaderResult) => void,
14
+ onProgress?: (event: ProgressEvent) => void,
15
+ onError?: (event: ErrorEvent) => void,
16
+ ): void;
17
+
18
+ parseNodes(json: AnyJson): NodeLoaderResult;
19
+ parse(json: AnyJson): Node;
20
+ setTextures(textures: { [key: string]: Texture }): this;
21
+ }
@@ -0,0 +1,8 @@
1
+ import { MaterialLoader } from '../../../../src/Three';
2
+ import { NodeLoaderResult } from './NodeLoader';
3
+
4
+ export default class NodeMaterialLoader extends MaterialLoader {
5
+ nodes: NodeLoaderResult;
6
+
7
+ setNodes(value: NodeLoaderResult): this;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { NodeLoaderResult } from './NodeLoader';
2
+ import { Material, ObjectLoader, Texture } from '../../../../src/Three';
3
+ import { AnyJson } from '../core/constants';
4
+
5
+ export default class NodeObjectLoader extends ObjectLoader {
6
+ parseNodes(json: AnyJson, textures: { [key: string]: Texture }): NodeLoaderResult;
7
+
8
+ // tslint:disable-next-line:comment-format
9
+ //@ts-expect-error
10
+ parseMaterials(json: AnyJson, textures: { [key: string]: Texture }): { [key: string]: Material };
11
+ }
@@ -0,0 +1,16 @@
1
+ import NodeMaterial from './NodeMaterial';
2
+ import { ShaderMaterialParameters } from '../../../../src/Three';
3
+ import { Node } from '../Nodes';
4
+
5
+ export default class LineBasicNodeMaterial extends NodeMaterial {
6
+ isLineBasicNodeMaterial: true;
7
+
8
+ colorNode: Node | null;
9
+ opacityNode: Node | null;
10
+ alphaTestNode: Node | null;
11
+ lightNode: Node | null;
12
+ positionNode: Node | null;
13
+
14
+ constructor(parameters?: ShaderMaterialParameters);
15
+ copy(source: LineBasicNodeMaterial): this;
16
+ }
@@ -0,0 +1,17 @@
1
+ import NodeMaterial from './NodeMaterial';
2
+ import LineBasicNodeMaterial from './LineBasicNodeMaterial';
3
+ import MeshBasicNodeMaterial from './MeshBasicNodeMaterial';
4
+ import MeshStandardNodeMaterial from './MeshStandardNodeMaterial';
5
+ import PointsNodeMaterial from './PointsNodeMaterial';
6
+ import SpriteNodeMaterial from './SpriteNodeMaterial';
7
+ import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial';
8
+
9
+ export {
10
+ NodeMaterial,
11
+ LineBasicNodeMaterial,
12
+ MeshBasicNodeMaterial,
13
+ MeshPhysicalNodeMaterial,
14
+ MeshStandardNodeMaterial,
15
+ PointsNodeMaterial,
16
+ SpriteNodeMaterial,
17
+ };
@@ -0,0 +1,19 @@
1
+ import NodeMaterial from './NodeMaterial';
2
+ import Node from '../core/Node';
3
+ import { ShaderMaterialParameters } from '../../../../src/Three';
4
+
5
+ export default class MeshBasicNodeMaterial extends NodeMaterial {
6
+ isMeshBasicNodeMaterial: true;
7
+ lights: true;
8
+
9
+ colorNode: Node | null;
10
+ opacityNode: Node | null;
11
+
12
+ alphaTestNode: Node | null;
13
+ lightNode: Node | null;
14
+
15
+ positionNode: Node | null;
16
+
17
+ constructor(paramters?: ShaderMaterialParameters);
18
+ copy(source: MeshBasicNodeMaterial): this;
19
+ }
@@ -0,0 +1,22 @@
1
+ import { ShaderMaterialParameters } from '../../../../src/Three';
2
+ import { Swizzable, CheckerNode, Node } from '../Nodes';
3
+
4
+ import MeshStandardNodeMaterial from './MeshStandardNodeMaterial';
5
+
6
+ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
7
+ iridescenceNode: null | Swizzable<CheckerNode>;
8
+ iridescenceIORNode: null | Swizzable;
9
+ iridescenceThicknessNode: null | Swizzable;
10
+
11
+ specularIntensityNode: Node | null;
12
+ specularColorNode: Node | null;
13
+
14
+ transmissionNode: Node | null;
15
+ thicknessNode: Node | null;
16
+ attenuationDistanceNode: Node | null;
17
+ attenuationColorNode: Node | null;
18
+
19
+ constructor(parameters: ShaderMaterialParameters);
20
+
21
+ copy(source: MeshPhysicalNodeMaterial): this;
22
+ }
@@ -0,0 +1,27 @@
1
+ import { ShaderMaterialParameters } from '../../../../src/Three';
2
+ import Node from '../core/Node';
3
+ import NodeMaterial from './NodeMaterial';
4
+
5
+ export default class MeshStandardNodeMaterial extends NodeMaterial {
6
+ isMeshStandardNodeMaterial: true;
7
+
8
+ colorNode: Node | null;
9
+ opacityNode: Node | null;
10
+ alphaTestNode: Node | null;
11
+ normalNode: Node | null;
12
+ emissiveNode: Node | null;
13
+
14
+ metalnessNode: Node | null;
15
+ roughnessNode: Node | null;
16
+
17
+ clearcoatNode: Node | null;
18
+ clearcoatRoughnessNode: Node | null;
19
+
20
+ envNode: Node | null;
21
+
22
+ lightsNode: Node | null;
23
+ positionNode: Node | null;
24
+
25
+ constructor(paramters?: ShaderMaterialParameters);
26
+ copy(source: MeshStandardNodeMaterial): this;
27
+ }
@@ -0,0 +1,22 @@
1
+ import { Material, ShaderMaterial } from '../../../../src/Three';
2
+ import NodeBuilder from '../core/NodeBuilder';
3
+ import Node from '../core/Node';
4
+ import { LightingModelNode } from '../lighting/LightingContextNode';
5
+
6
+ export default class NodeMaterial extends ShaderMaterial {
7
+ isNodeMaterial: true;
8
+ lights: true;
9
+ type: string;
10
+ constructor();
11
+
12
+ build(builder: NodeBuilder): void;
13
+ customProgramCacheKey(): string;
14
+ generatePosition(builder: NodeBuilder): void;
15
+ generateDiffuseColor(builder: NodeBuilder): void;
16
+ generateLight(
17
+ builder: NodeBuilder,
18
+ lights: { diffuseColorNode: Node; lightingModelNode: LightingModelNode; lightsNode?: Node },
19
+ ): void;
20
+ generateOutput(builder: NodeBuilder, lights: { diffuseColorNode: Node; outgoingLightNode: Node }): void;
21
+ static fromMaterial(m: Material): NodeMaterial;
22
+ }
@@ -0,0 +1,15 @@
1
+ import NodeMaterial from './NodeMaterial';
2
+ import { ShaderMaterialParameters } from '../../../../src/Three';
3
+ import { Node } from '../Nodes';
4
+
5
+ export default class PointsNodeMaterial extends NodeMaterial {
6
+ isPointsNodeMateria: true;
7
+ colorNode: Node | null;
8
+ opacityNode: Node | null;
9
+ alphaTestNode: Node | null;
10
+ lightNode: Node | null;
11
+ sizeNode: Node | null;
12
+ positionNode: Node | null;
13
+ constructor(parameters?: ShaderMaterialParameters);
14
+ copy(source: PointsNodeMaterial): this;
15
+ }
@@ -0,0 +1,23 @@
1
+ import NodeMaterial from './NodeMaterial';
2
+ import { ShaderMaterialParameters } from '../../../../src/Three';
3
+ import { NodeBuilder } from '../Nodes';
4
+ import Node from '../core/Node';
5
+
6
+ export default class SpriteNodeMaterial extends NodeMaterial {
7
+ isSpriteNodeMaterial: true;
8
+
9
+ colorNode: Node | null;
10
+ opacityNode: Node | null;
11
+
12
+ alphaTestNode: Node | null;
13
+
14
+ lightNode: Node | null;
15
+
16
+ positionNode: Node | null;
17
+ rotationNode: Node | null;
18
+ scaleNode: Node | null;
19
+
20
+ constructor(parameters?: ShaderMaterialParameters);
21
+ generatePosition(builder: NodeBuilder): void;
22
+ copy(source: SpriteNodeMaterial): this;
23
+ }
@@ -0,0 +1,4 @@
1
+ import { Fn, Node, Swizzable } from '../../../Nodes';
2
+
3
+ export function mx_hsvtorgb(...params: Fn<[Node]>): Swizzable;
4
+ export function mx_rgbtohsv(...params: Fn<[Node]>): Swizzable;
@@ -0,0 +1,6 @@
1
+ import { Fn, Node, Swizzable } from '../../../Nodes';
2
+
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;
@@ -0,0 +1,9 @@
1
+ import Node from '../core/Node';
2
+
3
+ export default class CondNode extends Node {
4
+ condNode: Node;
5
+ ifNode: Node;
6
+ elseNode: Node;
7
+
8
+ constructor(condNode: Node, ifNode: Node, elseNode: Node);
9
+ }
@@ -0,0 +1,116 @@
1
+ import Node from '../core/Node';
2
+ import TempNode from '../core/TempNode';
3
+
4
+ export type MathNodeMethod1 =
5
+ | typeof MathNode.RADIANS
6
+ | typeof MathNode.DEGREES
7
+ | typeof MathNode.EXP
8
+ | typeof MathNode.EXP2
9
+ | typeof MathNode.LOG
10
+ | typeof MathNode.LOG2
11
+ | typeof MathNode.SQRT
12
+ | typeof MathNode.INVERSE_SQRT
13
+ | typeof MathNode.FLOOR
14
+ | typeof MathNode.CEIL
15
+ | typeof MathNode.NORMALIZE
16
+ | typeof MathNode.FRACT
17
+ | typeof MathNode.SIN
18
+ | typeof MathNode.COS
19
+ | typeof MathNode.TAN
20
+ | typeof MathNode.ASIN
21
+ | typeof MathNode.ACOS
22
+ | typeof MathNode.ATAN
23
+ | typeof MathNode.ABS
24
+ | typeof MathNode.SIGN
25
+ | typeof MathNode.LENGTH
26
+ | typeof MathNode.NEGATE
27
+ | typeof MathNode.INVERT
28
+ | typeof MathNode.DFDX
29
+ | typeof MathNode.DFDY
30
+ | typeof MathNode.SATURATE
31
+ | typeof MathNode.ROUND;
32
+
33
+ export type MathNodeMethod2 =
34
+ | typeof MathNode.ATAN2
35
+ | typeof MathNode.MIN
36
+ | typeof MathNode.MAX
37
+ | typeof MathNode.MOD
38
+ | typeof MathNode.STEP
39
+ | typeof MathNode.REFLECT
40
+ | typeof MathNode.DISTANCE
41
+ | typeof MathNode.DOT
42
+ | typeof MathNode.CROSS
43
+ | typeof MathNode.POW
44
+ | typeof MathNode.TRANSFORM_DIRECTION;
45
+
46
+ export type MathNodeMethod3 =
47
+ | typeof MathNode.MIX
48
+ | typeof MathNode.CLAMP
49
+ | typeof MathNode.REFRACT
50
+ | typeof MathNode.SMOOTHSTEP
51
+ | typeof MathNode.FACEFORWARD;
52
+
53
+ export type MathNodeMethod = MathNodeMethod1 | MathNodeMethod2 | MathNodeMethod3;
54
+
55
+ export default class MathNode extends TempNode {
56
+ // 1 input
57
+
58
+ static RADIANS: 'radians';
59
+ static DEGREES: 'degrees';
60
+ static EXP: 'exp';
61
+ static EXP2: 'exp2';
62
+ static LOG: 'log';
63
+ static LOG2: 'log2';
64
+ static SQRT: 'sqrt';
65
+ static INVERSE_SQRT: 'inversesqrt';
66
+ static FLOOR: 'floor';
67
+ static CEIL: 'ceil';
68
+ static NORMALIZE: 'normalize';
69
+ static FRACT: 'fract';
70
+ static SIN: 'sin';
71
+ static COS: 'cos';
72
+ static TAN: 'tan';
73
+ static ASIN: 'asin';
74
+ static ACOS: 'acos';
75
+ static ATAN: 'atan';
76
+ static ABS: 'abs';
77
+ static SIGN: 'sign';
78
+ static LENGTH: 'length';
79
+ static NEGATE: 'negate';
80
+ static INVERT: 'invert';
81
+ static DFDX: 'dFdx';
82
+ static DFDY: 'dFdy';
83
+ static SATURATE: 'saturate';
84
+ static ROUND: 'round';
85
+
86
+ // 2 inputs
87
+
88
+ static ATAN2: 'atan2';
89
+ static MIN: 'min';
90
+ static MAX: 'max';
91
+ static MOD: 'mod';
92
+ static STEP: 'step';
93
+ static REFLECT: 'reflect';
94
+ static DISTANCE: 'distance';
95
+ static DOT: 'dot';
96
+ static CROSS: 'cross';
97
+ static POW: 'pow';
98
+ static TRANSFORM_DIRECTION: 'transformDirection';
99
+
100
+ // 3 inputs
101
+
102
+ static MIX: 'mix';
103
+ static CLAMP: 'clamp';
104
+ static REFRACT: 'refract';
105
+ static SMOOTHSTEP: 'smoothstep';
106
+ static FACEFORWARD: 'faceforward';
107
+
108
+ method: MathNodeMethod;
109
+ aNode: Node;
110
+ bNode: Node | null;
111
+ cNode: Node | null;
112
+
113
+ constructor(method: MathNodeMethod1, aNode: Node);
114
+ constructor(method: MathNodeMethod2, aNode: Node, bNode: Node);
115
+ constructor(method: MathNodeMethod3, aNode: Node, bNode: Node, cNode: Node);
116
+ }
@@ -0,0 +1,31 @@
1
+ import TempNode from '../core/TempNode';
2
+ import Node from '../core/Node';
3
+
4
+ export type OperatorNodeOp =
5
+ | '='
6
+ | '%'
7
+ | '&'
8
+ | '|'
9
+ | '^'
10
+ | '>>'
11
+ | '<<'
12
+ | '=='
13
+ | '&&'
14
+ | '||'
15
+ | '^^'
16
+ | '<'
17
+ | '>'
18
+ | '<='
19
+ | '>='
20
+ | '+'
21
+ | '-'
22
+ | '*'
23
+ | '/';
24
+
25
+ export default class OperatorNode extends TempNode {
26
+ aNode: Node;
27
+ bNode: Node;
28
+ op: OperatorNodeOp;
29
+
30
+ constructor(op: OperatorNodeOp, ...params: [Node, Node, ...Node[]]);
31
+ }
@@ -0,0 +1,6 @@
1
+ import TempNode from '../core/TempNode';
2
+
3
+ export default class CheckerNode extends TempNode {
4
+ uvNode: Node;
5
+ constructor(uvNode?: Node);
6
+ }