@types/three 0.136.1 → 0.139.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 (143) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/{WebGL.d.ts → capabilities/WebGL.d.ts} +3 -1
  3. three/examples/jsm/controls/OrbitControls.d.ts +4 -1
  4. three/examples/jsm/curves/CurveExtras.d.ts +52 -54
  5. three/examples/jsm/exporters/EXRExporter.d.ts +21 -0
  6. three/examples/jsm/geometries/ConvexGeometry.d.ts +1 -1
  7. three/examples/jsm/helpers/OctreeHelper.d.ts +14 -0
  8. three/examples/jsm/interactive/HTMLMesh.d.ts +1 -0
  9. three/examples/jsm/loaders/GLTFLoader.d.ts +2 -9
  10. three/examples/jsm/loaders/LDrawLoader.d.ts +6 -0
  11. three/examples/jsm/loaders/LUT3dlLoader.d.ts +2 -2
  12. three/examples/jsm/loaders/LUTCubeLoader.d.ts +2 -2
  13. three/examples/jsm/loaders/VOXLoader.d.ts +2 -2
  14. three/examples/jsm/objects/Reflector.d.ts +1 -0
  15. three/examples/jsm/objects/Refractor.d.ts +1 -0
  16. three/examples/jsm/postprocessing/LUTPass.d.ts +3 -3
  17. three/examples/jsm/postprocessing/SSAARenderPass.d.ts +1 -1
  18. three/examples/jsm/utils/BufferGeometryUtils.d.ts +2 -0
  19. three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
  20. three/examples/jsm/utils/PackedPhongMaterial.d.ts +10 -0
  21. three/examples/jsm/utils/SceneUtils.d.ts +13 -13
  22. three/index.d.ts +1 -1
  23. three/package.json +3 -3
  24. three/src/Three.d.ts +6 -0
  25. three/src/animation/AnimationUtils.d.ts +1 -1
  26. three/src/constants.d.ts +9 -19
  27. three/src/core/BufferGeometry.d.ts +0 -2
  28. three/src/core/InstancedBufferGeometry.d.ts +0 -4
  29. three/src/core/Raycaster.d.ts +3 -2
  30. three/src/core/Uniform.d.ts +0 -1
  31. three/src/extras/DataUtils.d.ts +1 -0
  32. three/src/extras/ImageUtils.d.ts +2 -0
  33. three/src/extras/PMREMGenerator.d.ts +2 -2
  34. three/src/geometries/CapsuleGeometry.d.ts +27 -0
  35. three/src/geometries/Geometries.d.ts +1 -0
  36. three/src/materials/Material.d.ts +0 -6
  37. three/src/materials/MeshStandardMaterial.d.ts +0 -6
  38. three/src/math/Box3.d.ts +2 -2
  39. three/src/math/Color.d.ts +21 -9
  40. three/src/math/ColorManagement.d.ts +18 -0
  41. three/src/math/Euler.d.ts +0 -1
  42. three/src/math/Plane.d.ts +0 -1
  43. three/src/math/Vector3.d.ts +5 -0
  44. three/src/renderers/WebGL3DRenderTarget.d.ts +28 -0
  45. three/src/renderers/WebGLArrayRenderTarget.d.ts +28 -0
  46. three/src/renderers/WebGLMultipleRenderTargets.d.ts +9 -1
  47. three/src/renderers/WebGLMultisampleRenderTarget.d.ts +5 -12
  48. three/src/renderers/WebGLRenderTarget.d.ts +7 -2
  49. three/src/renderers/WebGLRenderer.d.ts +4 -5
  50. three/src/renderers/webgl/WebGLUtils.d.ts +3 -1
  51. three/src/renderers/webxr/WebXRManager.d.ts +1 -1
  52. three/src/scenes/Scene.d.ts +0 -15
  53. three/src/textures/CompressedTexture.d.ts +2 -1
  54. three/src/textures/CubeTexture.d.ts +1 -1
  55. three/src/textures/Data3DTexture.d.ts +33 -0
  56. three/src/textures/DataArrayTexture.d.ts +33 -0
  57. three/src/textures/DataTexture.d.ts +2 -1
  58. three/src/textures/DataTexture2DArray.d.ts +5 -32
  59. three/src/textures/DataTexture3D.d.ts +5 -32
  60. three/src/textures/DepthTexture.d.ts +2 -1
  61. three/src/textures/Source.d.ts +39 -0
  62. three/src/textures/Texture.d.ts +30 -3
  63. three/src/textures/VideoTexture.d.ts +1 -1
  64. three/examples/jsm/loaders/VRMLoader.d.ts +0 -19
  65. three/examples/jsm/nodes/Nodes.d.ts +0 -106
  66. three/examples/jsm/nodes/accessors/CameraNode.d.ts +0 -29
  67. three/examples/jsm/nodes/accessors/ColorsNode.d.ts +0 -10
  68. three/examples/jsm/nodes/accessors/LightNode.d.ts +0 -12
  69. three/examples/jsm/nodes/accessors/NormalNode.d.ts +0 -13
  70. three/examples/jsm/nodes/accessors/PositionNode.d.ts +0 -15
  71. three/examples/jsm/nodes/accessors/ReflectNode.d.ts +0 -12
  72. three/examples/jsm/nodes/accessors/ResolutionNode.d.ts +0 -14
  73. three/examples/jsm/nodes/accessors/ScreenUVNode.d.ts +0 -11
  74. three/examples/jsm/nodes/accessors/UVNode.d.ts +0 -10
  75. three/examples/jsm/nodes/core/AttributeNode.d.ts +0 -13
  76. three/examples/jsm/nodes/core/ConstNode.d.ts +0 -22
  77. three/examples/jsm/nodes/core/ExpressionNode.d.ts +0 -5
  78. three/examples/jsm/nodes/core/FunctionCallNode.d.ts +0 -17
  79. three/examples/jsm/nodes/core/FunctionNode.d.ts +0 -28
  80. three/examples/jsm/nodes/core/InputNode.d.ts +0 -12
  81. three/examples/jsm/nodes/core/Node.d.ts +0 -34
  82. three/examples/jsm/nodes/core/NodeBuilder.d.ts +0 -149
  83. three/examples/jsm/nodes/core/NodeFrame.d.ts +0 -17
  84. three/examples/jsm/nodes/core/NodeLib.d.ts +0 -22
  85. three/examples/jsm/nodes/core/NodeUniform.d.ts +0 -17
  86. three/examples/jsm/nodes/core/NodeUtils.d.ts +0 -7
  87. three/examples/jsm/nodes/core/StructNode.d.ts +0 -19
  88. three/examples/jsm/nodes/core/TempNode.d.ts +0 -23
  89. three/examples/jsm/nodes/core/VarNode.d.ts +0 -12
  90. three/examples/jsm/nodes/effects/BlurNode.d.ts +0 -31
  91. three/examples/jsm/nodes/effects/ColorAdjustmentNode.d.ts +0 -27
  92. three/examples/jsm/nodes/effects/LuminanceNode.d.ts +0 -18
  93. three/examples/jsm/nodes/inputs/BoolNode.d.ts +0 -19
  94. three/examples/jsm/nodes/inputs/ColorNode.d.ts +0 -21
  95. three/examples/jsm/nodes/inputs/CubeTextureNode.d.ts +0 -17
  96. three/examples/jsm/nodes/inputs/FloatNode.d.ts +0 -19
  97. three/examples/jsm/nodes/inputs/IntNode.d.ts +0 -19
  98. three/examples/jsm/nodes/inputs/Matrix3Node.d.ts +0 -22
  99. three/examples/jsm/nodes/inputs/Matrix4Node.d.ts +0 -22
  100. three/examples/jsm/nodes/inputs/PropertyNode.d.ts +0 -10
  101. three/examples/jsm/nodes/inputs/RTTNode.d.ts +0 -27
  102. three/examples/jsm/nodes/inputs/ReflectorNode.d.ts +0 -21
  103. three/examples/jsm/nodes/inputs/ScreenNode.d.ts +0 -11
  104. three/examples/jsm/nodes/inputs/TextureNode.d.ts +0 -20
  105. three/examples/jsm/nodes/inputs/Vector2Node.d.ts +0 -21
  106. three/examples/jsm/nodes/inputs/Vector3Node.d.ts +0 -21
  107. three/examples/jsm/nodes/inputs/Vector4Node.d.ts +0 -21
  108. three/examples/jsm/nodes/materials/BasicNodeMaterial.d.ts +0 -11
  109. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -21
  110. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +0 -28
  111. three/examples/jsm/nodes/materials/PhongNodeMaterial.d.ts +0 -21
  112. three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +0 -12
  113. three/examples/jsm/nodes/materials/StandardNodeMaterial.d.ts +0 -25
  114. three/examples/jsm/nodes/materials/nodes/BasicNode.d.ts +0 -15
  115. three/examples/jsm/nodes/materials/nodes/MeshStandardNode.d.ts +0 -25
  116. three/examples/jsm/nodes/materials/nodes/PhongNode.d.ts +0 -14
  117. three/examples/jsm/nodes/materials/nodes/RawNode.d.ts +0 -10
  118. three/examples/jsm/nodes/materials/nodes/SpriteNode.d.ts +0 -13
  119. three/examples/jsm/nodes/materials/nodes/StandardNode.d.ts +0 -15
  120. three/examples/jsm/nodes/math/CondNode.d.ts +0 -26
  121. three/examples/jsm/nodes/math/MathNode.d.ts +0 -57
  122. three/examples/jsm/nodes/math/OperatorNode.d.ts +0 -17
  123. three/examples/jsm/nodes/misc/BumpMapNode.d.ts +0 -21
  124. three/examples/jsm/nodes/misc/NormalMapNode.d.ts +0 -19
  125. three/examples/jsm/nodes/misc/TextureCubeNode.d.ts +0 -21
  126. three/examples/jsm/nodes/misc/TextureCubeUVNode.d.ts +0 -18
  127. three/examples/jsm/nodes/postprocessing/NodePass.d.ts +0 -15
  128. three/examples/jsm/nodes/postprocessing/NodePostProcessing.d.ts +0 -26
  129. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +0 -17
  130. three/examples/jsm/nodes/procedural/NoiseNode.d.ts +0 -17
  131. three/examples/jsm/nodes/utils/BypassNode.d.ts +0 -11
  132. three/examples/jsm/nodes/utils/ColorSpaceNode.d.ts +0 -55
  133. three/examples/jsm/nodes/utils/JoinNode.d.ts +0 -15
  134. three/examples/jsm/nodes/utils/MaxMIPLevelNode.d.ts +0 -11
  135. three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +0 -17
  136. three/examples/jsm/nodes/utils/SubSlot.d.ts +0 -9
  137. three/examples/jsm/nodes/utils/SwitchNode.d.ts +0 -11
  138. three/examples/jsm/nodes/utils/TimerNode.d.ts +0 -19
  139. three/examples/jsm/nodes/utils/UVTransformNode.d.ts +0 -15
  140. three/examples/jsm/nodes/utils/VelocityNode.d.ts +0 -28
  141. three/examples/jsm/objects/ReflectorRTT.d.ts +0 -6
  142. three/examples/jsm/postprocessing/SSRrPass.d.ts +0 -121
  143. three/examples/jsm/utils/RoughnessMipmapper.d.ts +0 -7
@@ -1,5 +1,6 @@
1
1
  import { Vector2 } from './../math/Vector2';
2
2
  import { Matrix3 } from './../math/Matrix3';
3
+ import { Source } from './Source';
3
4
  import { EventDispatcher } from './../core/EventDispatcher';
4
5
  import {
5
6
  Mapping,
@@ -47,9 +48,30 @@ export class Texture extends EventDispatcher {
47
48
  sourceFile: string;
48
49
 
49
50
  /**
50
- * @default THREE.Texture.DEFAULT_IMAGE
51
+ * The data definition of a texture. A reference to the data source can be shared across textures.
52
+ * This is often useful in context of spritesheets where multiple textures render the same data but with different texture transformations.
51
53
  */
52
- image: any; // HTMLImageElement or ImageData or { width: number, height: number } in some children;
54
+ source: Source;
55
+
56
+ /**
57
+ * An image object, typically created using the {@link TextureLoader.load} method.
58
+ * This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g., MP4, OGG/OGV) type supported by three.js.
59
+ *
60
+ * To use video as a texture you need to have a playing HTML5
61
+ * video element as a source for your texture image and continuously update this texture
62
+ * as long as video is playing - the {@link VideoTexture} class handles this automatically.
63
+ */
64
+ get image(): any;
65
+
66
+ /**
67
+ * An image object, typically created using the {@link TextureLoader.load} method.
68
+ * This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g., MP4, OGG/OGV) type supported by three.js.
69
+ *
70
+ * To use video as a texture you need to have a playing HTML5
71
+ * video element as a source for your texture image and continuously update this texture
72
+ * as long as video is playing - the {@link VideoTexture} class handles this automatically.
73
+ */
74
+ set image(data: any);
53
75
 
54
76
  /**
55
77
  * @default []
@@ -158,6 +180,11 @@ export class Texture extends EventDispatcher {
158
180
  */
159
181
  isRenderTargetTexture: boolean;
160
182
 
183
+ /**
184
+ * @default false
185
+ */
186
+ needsPMREMUpdate: boolean;
187
+
161
188
  /**
162
189
  * An object that can be used to store custom data about the Material. It should not hold references to functions as these will not be cloned.
163
190
  * @default {}
@@ -168,7 +195,7 @@ export class Texture extends EventDispatcher {
168
195
  * @default 0
169
196
  */
170
197
  version: number;
171
- needsUpdate: boolean;
198
+ set needsUpdate(value: boolean);
172
199
  readonly isTexture: true;
173
200
 
174
201
  onUpdate: () => void;
@@ -9,7 +9,7 @@ export class VideoTexture extends Texture {
9
9
  * @param [wrapT=THREE.ClampToEdgeWrapping]
10
10
  * @param [magFilter=THREE.LinearFilter]
11
11
  * @param [minFilter=THREE.LinearFilter]
12
- * @param [format=THREE.RGBFormat]
12
+ * @param [format=THREE.RGBAFormat]
13
13
  * @param [type=THREE.UnsignedByteType]
14
14
  * @param [anisotropy=1]
15
15
  */
@@ -1,19 +0,0 @@
1
- import { Loader, LoadingManager } from '../../../src/Three';
2
-
3
- import { GLTFLoader, GLTF } from './GLTFLoader';
4
- import { DRACOLoader } from './DRACOLoader';
5
-
6
- export class VRMLoader extends Loader {
7
- constructor(manager?: LoadingManager);
8
- gltfLoader: GLTFLoader;
9
-
10
- load(
11
- url: string,
12
- onLoad: (scene: GLTF) => void,
13
- onProgress?: (event: ProgressEvent) => void,
14
- onError?: (event: ErrorEvent) => void,
15
- ): void;
16
- loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<GLTF>;
17
- parse(gltf: GLTF, onLoad: (scene: GLTF) => void): void;
18
- setDRACOLoader(dracoLoader: DRACOLoader): this;
19
- }
@@ -1,106 +0,0 @@
1
- // core
2
-
3
- export * from './core/Node';
4
- export * from './core/TempNode';
5
- export * from './core/InputNode';
6
- export * from './core/ConstNode';
7
- export * from './core/VarNode';
8
- export * from './core/StructNode';
9
- export * from './core/AttributeNode';
10
- export * from './core/FunctionNode';
11
- export * from './core/ExpressionNode';
12
- export * from './core/FunctionCallNode';
13
- export * from './core/NodeLib';
14
- export * from './core/NodeUtils';
15
- export * from './core/NodeFrame';
16
- export * from './core/NodeUniform';
17
- export * from './core/NodeBuilder';
18
-
19
- // inputs
20
-
21
- export * from './inputs/BoolNode';
22
- export * from './inputs/IntNode';
23
- export * from './inputs/FloatNode';
24
- export * from './inputs/Vector2Node';
25
- export * from './inputs/Vector3Node';
26
- export * from './inputs/Vector4Node';
27
- export * from './inputs/ColorNode';
28
- export * from './inputs/Matrix3Node';
29
- export * from './inputs/Matrix4Node';
30
- export * from './inputs/TextureNode';
31
- export * from './inputs/CubeTextureNode';
32
- export * from './inputs/ScreenNode';
33
- export * from './inputs/ReflectorNode';
34
- export * from './inputs/PropertyNode';
35
- export * from './inputs/RTTNode';
36
-
37
- // accessors
38
-
39
- export * from './accessors/UVNode';
40
- export * from './accessors/ColorsNode';
41
- export * from './accessors/PositionNode';
42
- export * from './accessors/NormalNode';
43
- export * from './accessors/CameraNode';
44
- export * from './accessors/LightNode';
45
- export * from './accessors/ReflectNode';
46
- export * from './accessors/ScreenUVNode';
47
- export * from './accessors/ResolutionNode';
48
-
49
- // math
50
-
51
- export * from './math/MathNode';
52
- export * from './math/OperatorNode';
53
- export * from './math/CondNode';
54
-
55
- // procedural
56
-
57
- export * from './procedural/NoiseNode';
58
- export * from './procedural/CheckerNode';
59
-
60
- // misc
61
-
62
- export * from './misc/TextureCubeUVNode';
63
- export * from './misc/TextureCubeNode';
64
- export * from './misc/NormalMapNode';
65
- export * from './misc/BumpMapNode';
66
-
67
- // utils
68
-
69
- export * from './utils/BypassNode';
70
- export * from './utils/JoinNode';
71
- export * from './utils/SwitchNode';
72
- export * from './utils/TimerNode';
73
- export * from './utils/VelocityNode';
74
- export * from './utils/UVTransformNode';
75
- export * from './utils/MaxMIPLevelNode';
76
- export * from './utils/SpecularMIPLevelNode';
77
- export * from './utils/ColorSpaceNode';
78
-
79
- // effects
80
-
81
- export * from './effects/BlurNode';
82
- export * from './effects/ColorAdjustmentNode';
83
- export * from './effects/LuminanceNode';
84
-
85
- // material nodes
86
-
87
- export * from './materials/nodes/RawNode';
88
- export * from './materials/nodes/BasicNode';
89
- export * from './materials/nodes/SpriteNode';
90
- export * from './materials/nodes/PhongNode';
91
- export * from './materials/nodes/StandardNode';
92
- export * from './materials/nodes/MeshStandardNode';
93
-
94
- // materials
95
-
96
- export * from './materials/NodeMaterial';
97
- export * from './materials/BasicNodeMaterial';
98
- export * from './materials/SpriteNodeMaterial';
99
- export * from './materials/PhongNodeMaterial';
100
- export * from './materials/StandardNodeMaterial';
101
- export * from './materials/MeshStandardNodeMaterial';
102
-
103
- // postprocessing
104
-
105
- export * from './postprocessing/NodePostProcessing';
106
- // export * from './postprocessing/NodePass';
@@ -1,29 +0,0 @@
1
- import { Camera } from '../../../../src/Three';
2
-
3
- import { NodeFrame } from '../core/NodeFrame';
4
- import { TempNode } from '../core/TempNode';
5
- import { FunctionNode } from '../core/FunctionNode';
6
- import { FloatNode } from '../inputs/FloatNode';
7
-
8
- export class CameraNode extends TempNode {
9
- constructor(scope?: string, camera?: Camera);
10
-
11
- scope: string;
12
- near: FloatNode | undefined;
13
- far: FloatNode | undefined;
14
- camera: Camera | undefined;
15
- updateFrame: boolean | undefined;
16
- nodeType: string;
17
-
18
- setCamera(camera: Camera): void;
19
- setScope(scope: string): void;
20
- onUpdateFrame(frame: NodeFrame): void;
21
- copy(source: CameraNode): this;
22
-
23
- static Nodes: {
24
- depthColor: FunctionNode;
25
- };
26
- static POSITION: string;
27
- static DEPTH: string;
28
- static TO_VERTEX: string;
29
- }
@@ -1,10 +0,0 @@
1
- import { TempNode } from '../core/TempNode';
2
-
3
- export class ColorsNode extends TempNode {
4
- constructor(index?: number);
5
-
6
- index: number;
7
- nodeType: string;
8
-
9
- copy(source: ColorsNode): this;
10
- }
@@ -1,12 +0,0 @@
1
- import { TempNode } from '../core/TempNode';
2
-
3
- export class LightNode extends TempNode {
4
- constructor(scope?: string);
5
-
6
- scope: string;
7
- nodeType: string;
8
-
9
- copy(source: LightNode): this;
10
-
11
- static TOTAL: string;
12
- }
@@ -1,13 +0,0 @@
1
- import { TempNode } from '../core/TempNode';
2
-
3
- export class NormalNode extends TempNode {
4
- constructor(scope?: string);
5
-
6
- scope: string;
7
- nodeType: string;
8
-
9
- copy(source: NormalNode): this;
10
-
11
- static LOCAL: string;
12
- static WORLD: string;
13
- }
@@ -1,15 +0,0 @@
1
- import { TempNode } from '../core/TempNode';
2
-
3
- export class PositionNode extends TempNode {
4
- constructor(scope?: string);
5
-
6
- scope: string;
7
- nodeType: string;
8
-
9
- copy(source: PositionNode): this;
10
-
11
- static LOCAL: string;
12
- static WORLD: string;
13
- static VIEW: string;
14
- static PROJECTION: string;
15
- }
@@ -1,12 +0,0 @@
1
- import { TempNode } from '../core/TempNode';
2
-
3
- export class ReflectNode extends TempNode {
4
- constructor(scope?: string);
5
-
6
- scope: string;
7
- nodeType: string;
8
-
9
- static CUBE: string;
10
- static SPHERE: string;
11
- static VECTOR: string;
12
- }
@@ -1,14 +0,0 @@
1
- import { Vector2 } from '../../../../src/Three';
2
-
3
- import { NodeFrame } from '../core/NodeFrame';
4
- import { Vector2Node } from '../inputs/Vector2Node';
5
-
6
- export class ResolutionNode extends Vector2Node {
7
- constructor();
8
-
9
- size: Vector2;
10
- nodeType: string;
11
-
12
- updateFrame(frame: NodeFrame): void;
13
- copy(source: ResolutionNode): this;
14
- }
@@ -1,11 +0,0 @@
1
- import { TempNode } from '../core/TempNode';
2
- import { ResolutionNode } from './ResolutionNode';
3
-
4
- export class ScreenUVNode extends TempNode {
5
- constructor(resolution?: ResolutionNode);
6
-
7
- resolution: ResolutionNode;
8
- nodeType: string;
9
-
10
- copy(source: ScreenUVNode): this;
11
- }
@@ -1,10 +0,0 @@
1
- import { TempNode } from '../core/TempNode';
2
-
3
- export class UVNode extends TempNode {
4
- constructor(index?: number);
5
-
6
- index: number;
7
- nodeType: string;
8
-
9
- copy(source: UVNode): this;
10
- }
@@ -1,13 +0,0 @@
1
- import { TempNode } from './TempNode';
2
- import { NodeBuilder } from './NodeBuilder';
3
-
4
- export class AttributeNode extends TempNode {
5
- constructor(name: string, type?: string);
6
-
7
- name: string;
8
- nodeType: string;
9
-
10
- getAttributeType(builder: NodeBuilder): string;
11
- getType(builder: NodeBuilder): string;
12
- copy(source: AttributeNode): this;
13
- }
@@ -1,22 +0,0 @@
1
- import { TempNode } from './TempNode';
2
- import { NodeBuilder } from './NodeBuilder';
3
-
4
- export class ConstNode extends TempNode {
5
- constructor(src: string, useDefine?: boolean);
6
-
7
- src: string;
8
- useDefine: boolean;
9
- nodeType: string;
10
-
11
- getType(builder: NodeBuilder): string;
12
- parse(src: string, useDefine?: boolean): void;
13
- build(builder: NodeBuilder, output: string): string;
14
- copy(source: ConstNode): this;
15
-
16
- static PI: string;
17
- static PI2: string;
18
- static RECIPROCAL_PI: string;
19
- static RECIPROCAL_PI2: string;
20
- static LOG2: string;
21
- static EPSILON: string;
22
- }
@@ -1,5 +0,0 @@
1
- import { FunctionNode } from './FunctionNode';
2
-
3
- export class ExpressionNode extends FunctionNode {
4
- constructor(src: string, type?: string, keywords?: object, extensions?: object, includes?: object[]);
5
- }
@@ -1,17 +0,0 @@
1
- import { Node } from './Node';
2
- import { FunctionNode } from './FunctionNode';
3
- import { TempNode } from './TempNode';
4
-
5
- export class FunctionCallNode extends TempNode {
6
- constructor(func: FunctionNode, inputs?: Node[]);
7
-
8
- nodeType: string;
9
-
10
- value: FunctionNode;
11
- inputs: Node[];
12
-
13
- setFunction(func: FunctionNode, inputs?: Node[]): void;
14
- getFunction(): FunctionNode;
15
- getType(): string;
16
- copy(source: FunctionCallNode): this;
17
- }
@@ -1,28 +0,0 @@
1
- import { TempNode } from './TempNode';
2
- import { NodeBuilder } from './NodeBuilder';
3
-
4
- export interface FunctionNodeInput {
5
- name: string;
6
- type: string;
7
- qualifier: string;
8
- }
9
-
10
- export class FunctionNode extends TempNode {
11
- constructor(src: string, includes?: object[], extensions?: object, keywords?: object, type?: string);
12
-
13
- isMethod: boolean;
14
- nodeType: string;
15
- useKeywords: boolean;
16
-
17
- inputs: FunctionNodeInput[] | undefined;
18
- includes: object[] | undefined;
19
- extensions: object | undefined;
20
- keywords: object | undefined;
21
-
22
- getShared(builder: NodeBuilder, output: string): boolean;
23
- getType(builder: NodeBuilder): string;
24
- getInputByName(name: string): FunctionNodeInput | undefined;
25
- getIncludeByName(name: string): object | undefined;
26
- parse(src: string, includes?: object[], extensions?: object, keywords?: object): void;
27
- copy(source: FunctionNode): this;
28
- }
@@ -1,12 +0,0 @@
1
- import { TempNode, TempNodeParams } from './TempNode';
2
- import { NodeBuilder } from './NodeBuilder';
3
-
4
- export class InputNode extends TempNode {
5
- constructor(type: string, params?: TempNodeParams);
6
-
7
- readonly: boolean;
8
-
9
- setReadonly(value: boolean): this;
10
- getReadonly(builder: NodeBuilder): boolean;
11
- copy(source: InputNode): this;
12
- }
@@ -1,34 +0,0 @@
1
- import { NodeBuilder } from './NodeBuilder';
2
-
3
- export interface Flow {
4
- result: string;
5
- code: string;
6
- extra: object;
7
- }
8
-
9
- export class Node {
10
- constructor(type?: string);
11
-
12
- uuid: string;
13
- name: string;
14
- type: string | undefined;
15
- userData: object;
16
- readonly isNode: true;
17
- frameId: number | undefined;
18
- hashProperties: string[] | undefined;
19
-
20
- analyze(builder: NodeBuilder, settings?: object): void;
21
- analyzeAndFlow(builder: NodeBuilder, output: string, settings?: object): Flow;
22
- flow(builder: NodeBuilder, output: string, settings?: object): Flow;
23
- build(builder: NodeBuilder, output: string, uuid?: string): string;
24
- generate(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string): string;
25
- appendDepsNode(builder: NodeBuilder, data: object, output: string): void;
26
- setName(name: string): this;
27
- getName(builder: NodeBuilder): string;
28
- getType(builder: NodeBuilder, output?: string): string;
29
- getJSONNode(meta?: object | string): object | undefined;
30
- getHash(): string;
31
- copy(source: Node): this;
32
- createJSONNode(meta?: object | string): object;
33
- toJSON(meta?: object | string): object;
34
- }
@@ -1,149 +0,0 @@
1
- import { Material, Texture, TextureEncoding, WebGLRenderer } from '../../../../src/Three';
2
-
3
- import { Node } from './Node';
4
- import { NodeUniform } from './NodeUniform';
5
-
6
- export class NodeBuilder {
7
- constructor();
8
-
9
- slots: string[];
10
- caches: string[];
11
- contexts: object[];
12
-
13
- keywords: object;
14
- nodeData: object;
15
-
16
- requires: {
17
- uv: boolean[];
18
- color: boolean[];
19
- lights: boolean;
20
- fog: boolean;
21
- transparent: boolean;
22
- irradiance: boolean;
23
- };
24
-
25
- includes: {
26
- consts: object[];
27
- functions: object[];
28
- structs: object[];
29
- };
30
-
31
- attributes: object;
32
- prefixCode: string;
33
-
34
- parsCode: {
35
- vertex: string;
36
- fragment: string;
37
- };
38
-
39
- code: {
40
- vertex: string;
41
- fragment: string;
42
- };
43
-
44
- nodeCode: {
45
- vertex: string;
46
- fragment: string;
47
- };
48
-
49
- resultCode: {
50
- vertex: string;
51
- fragment: string;
52
- };
53
-
54
- finalCode: {
55
- vertex: string;
56
- fragment: string;
57
- };
58
-
59
- inputs: {
60
- uniforms: {
61
- list: object[];
62
- vertex: object[];
63
- fragment: object[];
64
- };
65
- vars: {
66
- varying: object[];
67
- vertex: object[];
68
- fragment: object[];
69
- };
70
- };
71
-
72
- defines: object;
73
- uniforms: object;
74
- extensions: object;
75
- updaters: object[];
76
- nodes: object[];
77
-
78
- analyzing: boolean;
79
-
80
- build(vertex: Node, fragment: Node): this;
81
- buildShader(shader: string, node: Node): void;
82
- setMaterial(material: Material, renderer: WebGLRenderer): this;
83
- addFlow(slot: string, cache?: string, context?: object): this;
84
- removeFlow(): this;
85
- addCache(name: string): this;
86
- removeCache(): this;
87
- addContext(context: object): this;
88
- removeContext(): this;
89
- addSlot(name: string): this;
90
- removeSlot(): this;
91
- addVertexCode(code: string): void;
92
- addFragmentCode(code: string): void;
93
- addCode(code: string, shader?: string): void;
94
- addVertexNodeCode(code: string): void;
95
- addFragmentNodeCode(code: string): void;
96
- addNodeCode(code: string, shader?: string): void;
97
- clearNodeCode(shader: string): string;
98
- clearVertexNodeCode(): string;
99
- clearFragmentNodeCode(): string;
100
- addVertexFinalCode(code: string): void;
101
- addFragmentFinalCode(code: string): void;
102
- addFinalCode(code: string, shader?: string): void;
103
- addVertexParsCode(code: string): void;
104
- addFragmentParsCode(code: string): void;
105
- addParsCode(code: string, shader?: string): void;
106
- addVaryCode(code: string): void;
107
- isCache(name: string): boolean;
108
- isSlot(name: string): boolean;
109
- define(name: string, value: any): void;
110
- isDefined(name: string): boolean;
111
- getVar(uuid: string, type: string, ns: string, labelOrShader?: string, prefix?: string, label?: string): object;
112
- getAttribute(name: string, type: string): any;
113
- getCode(shader: string): string;
114
- getVarListCode(vars: object[], prefix?: string): string;
115
- getVars(shader: string): object[];
116
- getNodeData(node: Node): object;
117
- createUniform(
118
- shader: string,
119
- type: string,
120
- node: Node,
121
- ns?: string,
122
- needsUpdate?: boolean,
123
- label?: string,
124
- ): NodeUniform;
125
- createVertexUniform(type: string, node: Node, ns?: string, needsUpdate?: boolean, label?: string): NodeUniform;
126
- createFragmentUniform(type: string, node: Node, ns?: string, needsUpdate?: boolean, label?: string): NodeUniform;
127
- include(node: Node, parent?: boolean, source?: string): void;
128
- colorToVectorProperties(color: string): string;
129
- colorToVector(color: string): string;
130
- getIncludes(type: string, shader: string): object[];
131
- getIncludesCode(type: string, shader: string): string;
132
- getConstructorFromLength(len: number): string;
133
- isTypeMatrix(format: string): boolean;
134
- getTypeLength(type: string): number;
135
- getTypeFromLength(len: number): string;
136
- findNode(): Node;
137
- resolve(): void;
138
- format(code: string, from: string, to: string): string;
139
- getTypeByFormat(format: string): string;
140
- getFormatByType(type: string): string;
141
- getUuid(uuid: string, useCache?: boolean): string;
142
- getElementByIndex(index: number): string;
143
- getIndexByElement(elm: string): number;
144
- isShader(shader: string): boolean;
145
- setShader(shader: string): this;
146
- mergeDefines(defines: object): object;
147
- mergeUniform(uniforms: object): object;
148
- getTextureEncodingFromMap(map: Texture): TextureEncoding;
149
- }
@@ -1,17 +0,0 @@
1
- import { Texture, WebGLRenderer } from '../../../../src/Three';
2
-
3
- import { Node } from './Node';
4
-
5
- export class NodeFrame {
6
- constructor(time: number);
7
- time: number;
8
- id: number;
9
- delta: number | undefined;
10
- renderer: WebGLRenderer | undefined;
11
- renderTexture: Texture | undefined;
12
-
13
- update(delta: number): this;
14
- setRenderer(renderer: WebGLRenderer): this;
15
- setRenderTexture(renderTexture: Texture): this;
16
- updateNode(node: Node): this;
17
- }
@@ -1,22 +0,0 @@
1
- import { Node } from './Node';
2
- import { NodeBuilder } from './NodeBuilder';
3
-
4
- export interface NodeLibKeyword {
5
- callback: (builder: NodeBuilder) => void;
6
- cache?: object;
7
- }
8
-
9
- export namespace NodeLib {
10
- const nodes: object;
11
- const keywords: object;
12
-
13
- function add(node: Node): void;
14
- function addKeyword(name: string, callback: (builder: NodeBuilder) => void, cache?: object): void;
15
- function remove(node: Node): void;
16
- function removeKeyword(name: string): void;
17
- function get(name: string): Node;
18
- function getKeyword(name: string, builder: NodeBuilder): any;
19
- function getKeywordData(name: string): NodeLibKeyword;
20
- function contains(name: string): boolean;
21
- function containsKeyword(name: string): boolean;
22
- }