@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.
- three/README.md +1 -1
- three/examples/jsm/Addons.d.ts +5 -1
- three/examples/jsm/capabilities/WebGPU.d.ts +2 -0
- three/examples/jsm/curves/NURBSUtils.d.ts +136 -10
- three/examples/jsm/curves/NURBSVolume.d.ts +23 -0
- three/examples/jsm/exporters/USDZExporter.d.ts +1 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +45 -11
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +29 -2
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +37 -2
- three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
- three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +13 -0
- three/examples/jsm/misc/Timer.d.ts +80 -0
- three/examples/jsm/nodes/Nodes.d.ts +304 -61
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +24 -6
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +17 -4
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -1
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/Object3DNode.d.ts +10 -6
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +8 -1
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/TextureBicubicNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +21 -5
- three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/VertexColorNode.d.ts +12 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +4 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -1
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +1 -1
- three/examples/jsm/nodes/core/AssignNode.d.ts +17 -0
- three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +11 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
- three/examples/jsm/nodes/core/ContextNode.d.ts +11 -0
- three/examples/jsm/nodes/core/IndexNode.d.ts +18 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
- three/examples/jsm/nodes/core/LightingModel.d.ts +36 -0
- three/examples/jsm/nodes/core/Node.d.ts +32 -8
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +27 -23
- three/examples/jsm/nodes/core/NodeFrame.d.ts +18 -6
- three/examples/jsm/nodes/core/NodeUniform.d.ts +12 -8
- three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -3
- three/examples/jsm/nodes/core/PropertyNode.d.ts +27 -1
- three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
- three/examples/jsm/nodes/core/VarNode.d.ts +10 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +9 -0
- three/examples/jsm/nodes/core/constants.d.ts +31 -28
- three/examples/jsm/nodes/display/AfterImageNode.d.ts +25 -0
- three/examples/jsm/nodes/display/AnamorphicNode.d.ts +32 -0
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +21 -6
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +29 -1
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +17 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
- three/examples/jsm/nodes/display/GaussianBlurNode.d.ts +28 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +13 -1
- three/examples/jsm/nodes/display/PassNode.d.ts +44 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +12 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
- three/examples/jsm/nodes/display/ViewportDepthNode.d.ts +32 -0
- three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
- three/examples/jsm/nodes/display/ViewportSharedTextureNode.d.ts +18 -0
- three/examples/jsm/nodes/display/ViewportTextureNode.d.ts +33 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +9 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +9 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +9 -2
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/BRDF_Sheen.d.ts +7 -0
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/examples/jsm/nodes/functions/PhongLightingModel.d.ts +7 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +17 -8
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +1 -1
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +3 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +13 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +20 -8
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +1 -2
- three/examples/jsm/nodes/materials/Materials.d.ts +9 -17
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +2 -4
- three/examples/jsm/nodes/materials/MeshPhongNodeMaterial.d.ts +12 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +16 -7
- three/examples/jsm/nodes/materials/MeshSSSNodeMaterial.d.ts +17 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +1 -5
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +55 -16
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +2 -8
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +0 -10
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +43 -34
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +5 -3
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +7 -5
- three/examples/jsm/nodes/math/CondNode.d.ts +13 -0
- three/examples/jsm/nodes/math/HashNode.d.ts +16 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +140 -1
- three/examples/jsm/nodes/math/MathUtils.d.ts +16 -0
- three/examples/jsm/nodes/math/OperatorNode.d.ts +53 -1
- three/examples/jsm/nodes/math/TriNoise3D.d.ts +12 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +9 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +124 -31
- three/examples/jsm/nodes/utils/DiscardNode.d.ts +16 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +4 -2
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +6 -3
- three/examples/jsm/nodes/utils/OscNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/ReflectorNode.d.ts +30 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +24 -1
- three/examples/jsm/nodes/utils/RotateNode.d.ts +21 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +5 -1
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +7 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +7 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +28 -7
- three/examples/jsm/objects/GroundedSkybox.d.ts +5 -0
- three/examples/jsm/objects/QuadMesh.d.ts +15 -0
- three/examples/jsm/postprocessing/{HBAOPass.d.ts → GTAOPass.d.ts} +25 -10
- three/examples/jsm/postprocessing/SSAOPass.d.ts +1 -1
- three/examples/jsm/renderers/common/Backend.d.ts +6 -2
- three/examples/jsm/renderers/common/Color4.d.ts +9 -0
- three/examples/jsm/renderers/common/Info.d.ts +7 -1
- three/examples/jsm/renderers/common/PostProcessing.d.ts +11 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +243 -4
- three/examples/jsm/renderers/common/StorageTexture.d.ts +5 -0
- three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +4 -2
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +2 -2
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgpu/WebGPUBackend.d.ts +15 -6
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +7 -7
- three/examples/jsm/shaders/{HBAOShader.d.ts → GTAOShader.d.ts} +23 -8
- three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +1 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +0 -10
- three/examples/jsm/webxr/XRControllerModelFactory.d.ts +6 -5
- three/examples/jsm/webxr/XRHandMeshModel.d.ts +10 -2
- three/package.json +2 -2
- three/src/Three.d.ts +1 -0
- three/src/cameras/PerspectiveCamera.d.ts +13 -0
- three/src/constants.d.ts +4 -3
- three/src/core/InterleavedBufferAttribute.d.ts +12 -2
- three/src/core/Object3D.d.ts +13 -13
- three/src/core/UniformsGroup.d.ts +3 -3
- three/src/extras/core/Curve.d.ts +9 -9
- three/src/extras/core/CurvePath.d.ts +8 -7
- three/src/geometries/RingGeometry.d.ts +1 -1
- three/src/lights/PointLight.d.ts +7 -0
- three/src/loaders/MaterialLoader.d.ts +6 -3
- three/src/materials/LineBasicMaterial.d.ts +7 -0
- three/src/materials/LineDashedMaterial.d.ts +7 -1
- three/src/materials/Material.d.ts +17 -15
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshDepthMaterial.d.ts +6 -0
- three/src/materials/MeshDistanceMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -0
- three/src/materials/MeshNormalMaterial.d.ts +7 -0
- three/src/materials/MeshPhongMaterial.d.ts +7 -0
- three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -2
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/RawShaderMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +17 -3
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -2
- three/src/math/Color.d.ts +1 -1
- three/src/math/Matrix4.d.ts +30 -30
- three/src/math/Quaternion.d.ts +27 -30
- three/src/math/Sphere.d.ts +5 -0
- three/src/math/Triangle.d.ts +8 -25
- three/src/math/Vector2.d.ts +24 -159
- three/src/math/Vector3.d.ts +46 -54
- three/src/math/Vector4.d.ts +25 -20
- three/src/objects/BatchedMesh.d.ts +2 -2
- three/src/objects/Bone.d.ts +2 -2
- three/src/objects/InstancedMesh.d.ts +2 -1
- three/src/objects/LOD.d.ts +2 -2
- three/src/objects/Line.d.ts +3 -2
- three/src/objects/LineLoop.d.ts +3 -1
- three/src/objects/LineSegments.d.ts +3 -1
- three/src/objects/Points.d.ts +3 -2
- three/src/objects/SkinnedMesh.d.ts +4 -8
- three/src/objects/Sprite.d.ts +2 -2
- three/src/renderers/shaders/ShaderLib.d.ts +18 -18
- three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
- three/src/renderers/webgl/WebGLLights.d.ts +39 -37
- three/src/renderers/webgl/WebGLProgram.d.ts +0 -1
- three/src/renderers/webgl/WebGLPrograms.d.ts +226 -9
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +27 -0
- three/src/renderers/webxr/WebXRManager.d.ts +2 -1
- three/src/textures/CompressedCubeTexture.d.ts +13 -0
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/textures/Source.d.ts +11 -1
- three/build/three.d.ts +0 -2
- three/build/three.min.d.ts +0 -2
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
- three/examples/jsm/objects/GroundProjectedSkybox.d.ts +0 -13
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export type PositionNodeScope =
|
|
4
5
|
| typeof PositionNode.GEOMETRY
|
|
@@ -19,3 +20,10 @@ export default class PositionNode extends Node {
|
|
|
19
20
|
|
|
20
21
|
constructor(scope?: PositionNodeScope);
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
export const positionGeometry: ShaderNodeObject<PositionNode>;
|
|
25
|
+
export const positionLocal: ShaderNodeObject<PositionNode>;
|
|
26
|
+
export const positionWorld: ShaderNodeObject<PositionNode>;
|
|
27
|
+
export const positionWorldDirection: ShaderNodeObject<PositionNode>;
|
|
28
|
+
export const positionView: ShaderNodeObject<PositionNode>;
|
|
29
|
+
export const positionViewDirection: ShaderNodeObject<PositionNode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
-
import { NodeTypeOption } from '../
|
|
2
|
+
import { NodeTypeOption } from '../core/constants.js';
|
|
3
|
+
import { NodeOrType, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class ReferenceNode<T> extends Node {
|
|
5
6
|
object: T;
|
|
@@ -11,3 +12,5 @@ export default class ReferenceNode<T> extends Node {
|
|
|
11
12
|
|
|
12
13
|
setNodeType(uniformType: NodeTypeOption): void;
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
export const reference: <T>(name: string, nodeOrType: NodeOrType, object: T) => ShaderNodeObject<ReferenceNode<T>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class ReflectVectorNode extends Node {
|
|
4
5
|
constructor();
|
|
@@ -6,3 +7,5 @@ export default class ReflectVectorNode extends Node {
|
|
|
6
7
|
getHash(): 'reflectVector';
|
|
7
8
|
setup(): Node;
|
|
8
9
|
}
|
|
10
|
+
|
|
11
|
+
export const reflectVector: ShaderNodeObject<ReflectVectorNode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SkinnedMesh } from '../../../../src/Three.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class SkinningNode extends Node {
|
|
5
6
|
skinIndexNode: Node;
|
|
@@ -11,3 +12,5 @@ export default class SkinningNode extends Node {
|
|
|
11
12
|
|
|
12
13
|
constructor(skinnedMesh: SkinnedMesh);
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
export function skinning(skinnedMesh: SkinnedMesh): ShaderNodeObject<SkinningNode>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { NodeTypeOption } from '../Nodes.js';
|
|
2
1
|
import BufferNode from './BufferNode.js';
|
|
2
|
+
import { NodeTypeOption } from '../core/constants.js';
|
|
3
|
+
import { NodeOrType, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class StorageBufferNode extends BufferNode {
|
|
5
6
|
constructor(value: ArrayLike<number>, bufferType: NodeTypeOption, bufferCount?: number);
|
|
6
7
|
}
|
|
8
|
+
|
|
9
|
+
export const storage: (
|
|
10
|
+
value: ArrayLike<number>,
|
|
11
|
+
nodeOrType: NodeOrType,
|
|
12
|
+
count: number,
|
|
13
|
+
) => ShaderNodeObject<StorageBufferNode>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import MathNode from '../math/MathNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
4
|
|
|
3
5
|
export type TangentNodeScope =
|
|
4
6
|
| typeof TangentNode.LOCAL
|
|
@@ -16,3 +18,10 @@ export default class TangentNode extends Node {
|
|
|
16
18
|
|
|
17
19
|
constructor(scope?: TangentNodeScope);
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
export const tangentGeometry: ShaderNodeObject<TangentNode>;
|
|
23
|
+
export const tangentLocal: ShaderNodeObject<TangentNode>;
|
|
24
|
+
export const tangentView: ShaderNodeObject<TangentNode>;
|
|
25
|
+
export const tangentWorld: ShaderNodeObject<TangentNode>;
|
|
26
|
+
export const transformedTangentView: ShaderNodeObject<MathNode>;
|
|
27
|
+
export const transformedTangentWorld: ShaderNodeObject<MathNode>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Node from '../core/Node.js';
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
|
+
import TempNode from '../core/TempNode.js';
|
|
4
|
+
|
|
5
|
+
export default class TextureBicubicNode extends TempNode {
|
|
6
|
+
textureNode: Node;
|
|
7
|
+
blurNode: Node;
|
|
8
|
+
|
|
9
|
+
constructor(textureNode: Node, blurNode?: Node);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const textureBicubic: (textureNode: Node, blurNode?: NodeRepresentation) => ShaderNodeObject<TextureBicubicNode>;
|
|
13
|
+
|
|
14
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
15
|
+
interface NodeElements {
|
|
16
|
+
bicubic: typeof textureBicubic;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import { Texture } from '../../../../src/Three.js';
|
|
2
2
|
import UniformNode from '../core/UniformNode.js';
|
|
3
|
-
import
|
|
3
|
+
import Node from '../core/Node.js';
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
|
-
export default class TextureNode extends UniformNode {
|
|
6
|
+
export default class TextureNode extends UniformNode<Texture> {
|
|
6
7
|
isTextureNode: true;
|
|
7
8
|
|
|
8
|
-
uvNode: Node | null;
|
|
9
|
-
levelNode: Node | null;
|
|
9
|
+
uvNode: ShaderNodeObject<Node> | null;
|
|
10
|
+
levelNode: ShaderNodeObject<Node> | null;
|
|
10
11
|
|
|
11
|
-
constructor(value: Texture, uvNode?: Node
|
|
12
|
+
constructor(value: Texture, uvNode?: ShaderNodeObject<Node>, levelNode?: ShaderNodeObject<Node> | null);
|
|
12
13
|
|
|
13
14
|
getDefaultUV(): Node;
|
|
15
|
+
|
|
16
|
+
clone(): this;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const texture: (
|
|
20
|
+
value: Texture,
|
|
21
|
+
uvNode?: NodeRepresentation,
|
|
22
|
+
levelNode?: NodeRepresentation,
|
|
23
|
+
) => ShaderNodeObject<TextureNode>;
|
|
24
|
+
export const sampler: (aTexture: Texture | TextureNode) => ShaderNodeObject<Node>;
|
|
25
|
+
|
|
26
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
27
|
+
interface NodeElements {
|
|
28
|
+
texture: typeof texture;
|
|
29
|
+
}
|
|
14
30
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import AttributeNode from '../core/AttributeNode.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class UVNode extends AttributeNode {
|
|
4
5
|
isUVNode: true;
|
|
@@ -6,3 +7,5 @@ export default class UVNode extends AttributeNode {
|
|
|
6
7
|
|
|
7
8
|
constructor(index?: number);
|
|
8
9
|
}
|
|
10
|
+
|
|
11
|
+
export const uv: (index?: number) => ShaderNodeObject<UVNode>;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { NodeTypeOption, NodeUserData } from '../core/constants.js';
|
|
2
2
|
import ReferenceNode from './ReferenceNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class UserDataNode extends ReferenceNode<NodeUserData> {
|
|
5
6
|
userData: NodeUserData | null;
|
|
6
7
|
constructor(property: string, inputType: NodeTypeOption, userData?: NodeUserData | null);
|
|
7
8
|
}
|
|
9
|
+
|
|
10
|
+
export const userData: (
|
|
11
|
+
name: string,
|
|
12
|
+
inputType: NodeTypeOption,
|
|
13
|
+
userData?: NodeUserData,
|
|
14
|
+
) => ShaderNodeObject<UserDataNode>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
|
+
import AttributeNode from '../core/AttributeNode.js';
|
|
3
|
+
|
|
4
|
+
export default class VertexColorNode extends AttributeNode {
|
|
5
|
+
readonly isVertexColorNode: true;
|
|
6
|
+
|
|
7
|
+
index: number;
|
|
8
|
+
|
|
9
|
+
constructor(index?: number);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const vertexColor: (index?: number) => ShaderNodeObject<VertexColorNode>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
2
|
import NodeBuilder from '../core/NodeBuilder.js';
|
|
3
|
+
import { NodeTypeOption } from '../core/constants.js';
|
|
4
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
5
|
|
|
4
6
|
export interface CodeNodeInclude {
|
|
5
7
|
build(builder: NodeBuilder): void;
|
|
@@ -13,3 +15,5 @@ export default class CodeNode extends Node {
|
|
|
13
15
|
setIncludes(includes: CodeNodeInclude[]): this;
|
|
14
16
|
getIncludes(builder: NodeBuilder): CodeNodeInclude[];
|
|
15
17
|
}
|
|
18
|
+
|
|
19
|
+
export const code: (code: string, nodeType?: NodeTypeOption) => ShaderNodeObject<CodeNode>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { NodeTypeOption } from '../core/constants.js';
|
|
2
2
|
import TempNode from '../core/TempNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class ExpressionNode extends TempNode {
|
|
5
6
|
snipped: string; /* sic */
|
|
6
7
|
constructor(snipped?: string, nodeType?: NodeTypeOption);
|
|
7
8
|
}
|
|
9
|
+
|
|
10
|
+
export const expression: (snipped?: string, nodeType?: NodeTypeOption) => ShaderNodeObject<ExpressionNode>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import FunctionNode from './FunctionNode.js';
|
|
1
|
+
import FunctionNode, { FunctionNodeArguments } from './FunctionNode.js';
|
|
2
2
|
import TempNode from '../core/TempNode.js';
|
|
3
3
|
import Node from '../core/Node.js';
|
|
4
|
+
import { ProxiedObject, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
6
|
export default class FunctionCallNode<P extends Node[] | { [name: string]: Node }> extends TempNode {
|
|
6
7
|
functionNode: FunctionNode<P>;
|
|
@@ -11,3 +12,14 @@ export default class FunctionCallNode<P extends Node[] | { [name: string]: Node
|
|
|
11
12
|
setParameters(parameters: P): this;
|
|
12
13
|
getParameters(): P;
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
export const call: <P extends FunctionNodeArguments>(
|
|
17
|
+
functionNode?: FunctionNode<P>,
|
|
18
|
+
parameters?: ProxiedObject<P>,
|
|
19
|
+
) => ShaderNodeObject<FunctionCallNode<P>>;
|
|
20
|
+
|
|
21
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
22
|
+
interface NodeElements {
|
|
23
|
+
call: typeof call;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -4,6 +4,7 @@ import NodeBuilder from '../core/NodeBuilder.js';
|
|
|
4
4
|
import NodeFunction from '../core/NodeFunction.js';
|
|
5
5
|
import NodeFunctionInput from '../core/NodeFunctionInput.js';
|
|
6
6
|
import Node from '../core/Node.js';
|
|
7
|
+
import { ProxiedObject, ProxiedTuple, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
7
8
|
|
|
8
9
|
export type FunctionNodeArguments = Node[] | { [name: string]: Node };
|
|
9
10
|
|
|
@@ -15,3 +16,19 @@ export default class FunctionNode<P extends Node[] | { [name: string]: Node }> e
|
|
|
15
16
|
getNodeFunction(builder: NodeBuilder): NodeFunction;
|
|
16
17
|
call(parameters: P): FunctionCallNode<P>;
|
|
17
18
|
}
|
|
19
|
+
|
|
20
|
+
export type Fn<P extends FunctionNodeArguments> = P extends readonly [...unknown[]]
|
|
21
|
+
? ProxiedTuple<P>
|
|
22
|
+
: readonly [ProxiedObject<P>];
|
|
23
|
+
|
|
24
|
+
export const func: <P extends FunctionNodeArguments>(
|
|
25
|
+
code: string,
|
|
26
|
+
includes?: CodeNodeInclude[],
|
|
27
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
28
|
+
) => { call: (...params: Fn<P>) => ShaderNodeObject<Node> };
|
|
29
|
+
|
|
30
|
+
export const fn: <P extends FunctionNodeArguments>(
|
|
31
|
+
code: string,
|
|
32
|
+
includes?: CodeNodeInclude[],
|
|
33
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
34
|
+
) => (...params: Fn<P>) => ShaderNodeObject<Node>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import UniformNode from './UniformNode.js';
|
|
2
2
|
import Node from './Node.js';
|
|
3
3
|
|
|
4
|
-
export default class ArrayUniformNode extends UniformNode {
|
|
4
|
+
export default class ArrayUniformNode extends UniformNode<undefined> {
|
|
5
5
|
isArrayUniformNode: true;
|
|
6
6
|
nodes: Node[];
|
|
7
7
|
constructor(nodes?: Node[]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
|
+
import Node from './Node.js';
|
|
3
|
+
import TempNode from './TempNode.js';
|
|
4
|
+
|
|
5
|
+
export default class AssignNode extends TempNode {
|
|
6
|
+
constructor(targetNode: Node, sourceNode: Node);
|
|
7
|
+
|
|
8
|
+
hasDependencies(): false;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const assign: (targetNode: NodeRepresentation, sourceNode: NodeRepresentation) => ShaderNodeObject<AssignNode>;
|
|
12
|
+
|
|
13
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
14
|
+
interface NodeElements {
|
|
15
|
+
assign: typeof assign;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { NodeTypeOption } from './constants.js';
|
|
2
2
|
import Node from './Node.js';
|
|
3
3
|
import NodeBuilder from './NodeBuilder.js';
|
|
4
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
6
|
export default class AttributeNode extends Node {
|
|
6
7
|
constructor(attributeName: string, nodeType?: NodeTypeOption | null);
|
|
7
8
|
setAttributeName(attributeName: string): this;
|
|
8
9
|
getAttributeName(builder: NodeBuilder): string;
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export const attribute: (name: string, nodeType: NodeTypeOption) => ShaderNodeObject<Node>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from './Node.js';
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class BypassNode extends Node {
|
|
4
5
|
isBypassNode: true;
|
|
@@ -7,3 +8,11 @@ export default class BypassNode extends Node {
|
|
|
7
8
|
|
|
8
9
|
constructor(returnNode: Node, callNode: Node);
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export const bypass: (returnNode: NodeRepresentation, callNode: NodeRepresentation) => ShaderNodeObject<BypassNode>;
|
|
13
|
+
|
|
14
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
15
|
+
interface NodeElements {
|
|
16
|
+
bypass: typeof bypass;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Node from './Node.js';
|
|
2
2
|
import NodeCache from './NodeCache.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class CacheNode extends Node {
|
|
5
6
|
isCacheNode: true;
|
|
@@ -8,3 +9,13 @@ export default class CacheNode extends Node {
|
|
|
8
9
|
|
|
9
10
|
constructor(node: Node, cache?: NodeCache);
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
export const cache: (node: Node, cache?: NodeCache) => ShaderNodeObject<CacheNode>;
|
|
14
|
+
export const globalCache: (node: Node) => ShaderNodeObject<CacheNode>;
|
|
15
|
+
|
|
16
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
17
|
+
interface NodeElements {
|
|
18
|
+
cache: typeof cache;
|
|
19
|
+
globalCache: typeof globalCache;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NodeTypeOption
|
|
1
|
+
import { NodeTypeOption } from './constants.js';
|
|
2
2
|
import InputNode from './InputNode.js';
|
|
3
3
|
import NodeBuilder from './NodeBuilder.js';
|
|
4
4
|
|
|
5
|
-
export default class ConstNode extends InputNode {
|
|
5
|
+
export default class ConstNode<Value> extends InputNode<Value> {
|
|
6
6
|
isConstNode: true;
|
|
7
|
-
constructor(value:
|
|
7
|
+
constructor(value: Value, nodeType?: NodeTypeOption | null);
|
|
8
8
|
|
|
9
9
|
generateConst(builder: NodeBuilder): string;
|
|
10
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Node from './Node.js';
|
|
2
2
|
import { NodeBuilderContext } from './NodeBuilder.js';
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class ContextNode extends Node {
|
|
5
6
|
isContextNode: true;
|
|
@@ -8,3 +9,13 @@ export default class ContextNode extends Node {
|
|
|
8
9
|
|
|
9
10
|
constructor(node: Node, context: NodeBuilderContext);
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
export const context: (node: NodeRepresentation, context: NodeBuilderContext) => ShaderNodeObject<ContextNode>;
|
|
14
|
+
export const label: (node: NodeRepresentation, label: string) => ShaderNodeObject<ContextNode>;
|
|
15
|
+
|
|
16
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
17
|
+
interface NodeElements {
|
|
18
|
+
context: typeof context;
|
|
19
|
+
label: typeof label;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Node from './Node.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
|
+
|
|
4
|
+
export type IndexNodeScope = typeof IndexNode.VERTEX | typeof IndexNode.INSTANCE;
|
|
5
|
+
|
|
6
|
+
export default class IndexNode extends Node {
|
|
7
|
+
scope: IndexNodeScope;
|
|
8
|
+
|
|
9
|
+
readonly isInstanceNode: true;
|
|
10
|
+
|
|
11
|
+
constructor(scope: IndexNodeScope);
|
|
12
|
+
|
|
13
|
+
static VERTEX: 'vertex';
|
|
14
|
+
static INSTANCE: 'instance';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const vertexIndex: ShaderNodeObject<IndexNode>;
|
|
18
|
+
export const instanceIndex: ShaderNodeObject<IndexNode>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { NodeTypeOption
|
|
1
|
+
import { NodeTypeOption } from './constants.js';
|
|
2
2
|
import Node from './Node.js';
|
|
3
3
|
import NodeBuilder from './NodeBuilder.js';
|
|
4
4
|
|
|
5
5
|
export type Precision = 'low' | 'medium' | 'high';
|
|
6
6
|
|
|
7
|
-
export default abstract class InputNode extends Node {
|
|
7
|
+
export default abstract class InputNode<Value> extends Node {
|
|
8
8
|
isInputNode: true;
|
|
9
|
-
value:
|
|
9
|
+
value: Value;
|
|
10
10
|
precision: Precision | null;
|
|
11
11
|
|
|
12
|
-
constructor(value:
|
|
12
|
+
constructor(value: Value, nodeType?: NodeTypeOption | null);
|
|
13
13
|
|
|
14
14
|
getInputType(builder: NodeBuilder): string | null;
|
|
15
15
|
setPrecision(precision: Precision): this;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Node from './Node.js';
|
|
2
|
+
import NodeBuilder from './NodeBuilder.js';
|
|
3
|
+
import StackNode from './StackNode.js';
|
|
4
|
+
|
|
5
|
+
export interface LightingModelReflectedLight {
|
|
6
|
+
directDiffuse: Node;
|
|
7
|
+
directSpecular: Node;
|
|
8
|
+
indirectDiffuse: Node;
|
|
9
|
+
indirectSpecular: Node;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface LightingModelDirectInput {
|
|
13
|
+
lightDirection: Node;
|
|
14
|
+
lightColor: Node;
|
|
15
|
+
reflectedLight: LightingModelReflectedLight;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface LightingModelIndirectInput {
|
|
19
|
+
radiance: Node;
|
|
20
|
+
irradiance: Node;
|
|
21
|
+
iblIrradiance: Node;
|
|
22
|
+
ambientOcclusion: Node;
|
|
23
|
+
reflectedLight: LightingModelReflectedLight;
|
|
24
|
+
backdrop: Node;
|
|
25
|
+
backdropAlpha: Node;
|
|
26
|
+
outgoingLight: Node;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default class LightingModel {
|
|
30
|
+
start(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
|
|
31
|
+
finish(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
|
|
32
|
+
direct(input: LightingModelDirectInput, stack: StackNode, builder: NodeBuilder): void;
|
|
33
|
+
indirectDiffuse(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
|
|
34
|
+
indirectSpecular(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
|
|
35
|
+
ambientOcclusion(input: LightingModelIndirectInput, stack: StackNode, builder: NodeBuilder): void;
|
|
36
|
+
}
|
|
@@ -1,31 +1,55 @@
|
|
|
1
|
-
import { AnyJson, NodeTypeOption,
|
|
1
|
+
import { AnyJson, NodeTypeOption, NodeUpdateType } from './constants.js';
|
|
2
2
|
import NodeBuilder from './NodeBuilder.js';
|
|
3
3
|
import NodeFrame from './NodeFrame.js';
|
|
4
4
|
|
|
5
5
|
export default abstract class Node {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
isNode: true;
|
|
6
|
+
readonly isNode: true;
|
|
7
|
+
|
|
9
8
|
nodeType: NodeTypeOption | null;
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
updateType: NodeUpdateType;
|
|
11
|
+
updateBeforeType: NodeUpdateType;
|
|
12
|
+
|
|
13
|
+
uuid: string;
|
|
14
|
+
|
|
15
|
+
readonly id: number;
|
|
12
16
|
|
|
13
17
|
constructor(nodeType?: NodeTypeOption | null);
|
|
14
18
|
|
|
19
|
+
get type(): number;
|
|
20
|
+
|
|
15
21
|
isGlobal(builder: NodeBuilder): boolean;
|
|
22
|
+
|
|
16
23
|
getChildren(): Node[];
|
|
24
|
+
|
|
25
|
+
getCacheKey(): string;
|
|
26
|
+
|
|
17
27
|
getHash(builder: NodeBuilder): string;
|
|
18
|
-
|
|
28
|
+
|
|
29
|
+
getUpdateType(): NodeUpdateType;
|
|
30
|
+
|
|
31
|
+
getUpdateBeforeType(): NodeUpdateType;
|
|
32
|
+
|
|
19
33
|
getNodeType(builder: NodeBuilder, output?: string | null): NodeTypeOption | null;
|
|
34
|
+
|
|
20
35
|
getReference(builder: NodeBuilder): Node;
|
|
36
|
+
|
|
21
37
|
setup(builder: NodeBuilder): Node | null;
|
|
38
|
+
|
|
22
39
|
analyze(builder: NodeBuilder): void;
|
|
40
|
+
|
|
23
41
|
generate(builder: NodeBuilder, output?: string | null): string;
|
|
42
|
+
|
|
43
|
+
updateBefore(frame: NodeFrame): void;
|
|
44
|
+
|
|
24
45
|
/** This method must be overriden when {@link updateType} !== 'none' */
|
|
25
46
|
update(frame: NodeFrame): void;
|
|
47
|
+
|
|
26
48
|
build(builder: NodeBuilder, output?: string | null): string;
|
|
49
|
+
|
|
27
50
|
serialize(json: AnyJson): void;
|
|
51
|
+
|
|
28
52
|
deserialize(json: AnyJson): void;
|
|
53
|
+
|
|
29
54
|
toJSON(meta?: string | { textures: {}; images: {}; nodes: {} }): AnyJson;
|
|
30
|
-
getCacheKey(): string;
|
|
31
55
|
}
|
|
@@ -3,15 +3,13 @@ import {
|
|
|
3
3
|
Material,
|
|
4
4
|
Object3D,
|
|
5
5
|
Renderer,
|
|
6
|
-
Scene,
|
|
7
6
|
Texture,
|
|
8
7
|
TextureEncoding,
|
|
9
8
|
WebGLRenderTarget,
|
|
10
9
|
} from '../../../../src/Three.js';
|
|
11
10
|
import FogNode from '../fog/FogNode.js';
|
|
12
11
|
import LightsNode from '../lighting/LightsNode.js';
|
|
13
|
-
import {
|
|
14
|
-
import { AnyObject, NodeShaderStageOption, NodeTypeOption } from './constants.js';
|
|
12
|
+
import { AnyObject, NodeShaderStage, NodeTypeOption } from './constants.js';
|
|
15
13
|
import Node from './Node.js';
|
|
16
14
|
import NodeAttribute from './NodeAttribute.js';
|
|
17
15
|
import NodeCache from './NodeCache.js';
|
|
@@ -19,6 +17,7 @@ import NodeParser from './NodeParser.js';
|
|
|
19
17
|
import NodeUniform from './NodeUniform.js';
|
|
20
18
|
import NodeVar from './NodeVar.js';
|
|
21
19
|
import NodeVarying from './NodeVarying.js';
|
|
20
|
+
import StackNode from './StackNode.js';
|
|
22
21
|
|
|
23
22
|
export type BuildStageOption = 'construct' | 'analyze' | 'generate';
|
|
24
23
|
|
|
@@ -60,9 +59,9 @@ export default abstract class NodeBuilder {
|
|
|
60
59
|
*/
|
|
61
60
|
flowsData: any;
|
|
62
61
|
|
|
63
|
-
shaderStage:
|
|
62
|
+
shaderStage: NodeShaderStage | null;
|
|
64
63
|
buildStage: BuildStageOption | null;
|
|
65
|
-
stack:
|
|
64
|
+
stack: StackNode;
|
|
66
65
|
|
|
67
66
|
setHashNode(node: Node, hash: string): void;
|
|
68
67
|
addNode(node: Node): void;
|
|
@@ -70,7 +69,7 @@ export default abstract class NodeBuilder {
|
|
|
70
69
|
getMethod(method: string): string;
|
|
71
70
|
getNodeFromHash(hash: string): Node;
|
|
72
71
|
|
|
73
|
-
addFlow(shaderStage:
|
|
72
|
+
addFlow(shaderStage: NodeShaderStage, node: Node): Node;
|
|
74
73
|
|
|
75
74
|
setContext(context: NodeBuilderContext): void;
|
|
76
75
|
getContext(): NodeBuilderContext;
|
|
@@ -92,47 +91,52 @@ export default abstract class NodeBuilder {
|
|
|
92
91
|
|
|
93
92
|
getAttribute(name: string, type: NodeTypeOption): NodeAttribute;
|
|
94
93
|
|
|
95
|
-
getPropertyName(node: Node, shaderStage:
|
|
94
|
+
getPropertyName(node: Node, shaderStage: NodeShaderStage): string;
|
|
96
95
|
isVector(type: NodeTypeOption): boolean;
|
|
97
96
|
|
|
98
97
|
isMatrix(type: NodeTypeOption): boolean;
|
|
99
98
|
isReference(type: NodeTypeOption): boolean;
|
|
100
|
-
isShaderStage(shaderStage:
|
|
99
|
+
isShaderStage(shaderStage: NodeShaderStage): boolean;
|
|
101
100
|
getTextureEncodingFromMap(map: Texture | WebGLRenderTarget | unknown): TextureEncoding;
|
|
102
101
|
getComponentType(type: NodeTypeOption): NodeTypeOption;
|
|
103
102
|
getVectorType(type: NodeTypeOption): NodeTypeOption;
|
|
104
103
|
getTypeFromLength(length: number): NodeTypeOption;
|
|
105
104
|
getTypeLength(type: NodeTypeOption): number;
|
|
106
105
|
getVectorFromMatrix(type: NodeTypeOption): NodeTypeOption;
|
|
107
|
-
getDataFromNode(node: Node, shaderStage?:
|
|
108
|
-
getNodeProperties(node: Node, shaderStage?:
|
|
109
|
-
getUniformFromNode(
|
|
110
|
-
|
|
106
|
+
getDataFromNode(node: Node, shaderStage?: NodeShaderStage): NodeData;
|
|
107
|
+
getNodeProperties(node: Node, shaderStage?: NodeShaderStage): AnyObject;
|
|
108
|
+
getUniformFromNode(
|
|
109
|
+
node: Node,
|
|
110
|
+
type: NodeTypeOption,
|
|
111
|
+
shaderStage?: NodeShaderStage,
|
|
112
|
+
name?: string | null,
|
|
113
|
+
): NodeUniform<string>;
|
|
114
|
+
getVarFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStage): NodeVar;
|
|
111
115
|
getVaryFromNode(node: Node, type: NodeTypeOption): NodeVarying;
|
|
112
|
-
getCodeFromNode(node: Node, type: NodeTypeOption, shaderStage?:
|
|
116
|
+
getCodeFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStage): string;
|
|
113
117
|
addFlowCode(code: string): void;
|
|
114
|
-
getFlowData(node: Node, shaderStage:
|
|
118
|
+
getFlowData(node: Node, shaderStage: NodeShaderStage): FlowData;
|
|
115
119
|
flowNode(node: Node): FlowData;
|
|
116
120
|
flowChildNode(node: Node, output?: string | null): FlowData;
|
|
117
121
|
flowNodeFromShaderStage(
|
|
118
|
-
shaderStage:
|
|
122
|
+
shaderStage: NodeShaderStage,
|
|
119
123
|
node: Node,
|
|
120
124
|
output?: string | null,
|
|
121
125
|
propertyName?: string,
|
|
122
126
|
): FlowData;
|
|
123
127
|
hasGeometryAttribute(name: string): boolean;
|
|
124
|
-
abstract getAttributes(shaderStage:
|
|
125
|
-
abstract getVarys(shaderStage:
|
|
126
|
-
getVars(shaderStage:
|
|
127
|
-
abstract getUniforms(stage:
|
|
128
|
-
getCodes(shaderStage:
|
|
128
|
+
abstract getAttributes(shaderStage: NodeShaderStage): string;
|
|
129
|
+
abstract getVarys(shaderStage: NodeShaderStage): string;
|
|
130
|
+
getVars(shaderStage: NodeShaderStage): string;
|
|
131
|
+
abstract getUniforms(stage: NodeShaderStage): string;
|
|
132
|
+
getCodes(shaderStage: NodeShaderStage): string;
|
|
129
133
|
getHash(): string;
|
|
130
|
-
setShaderStage(shaderStage:
|
|
131
|
-
getShaderStage():
|
|
134
|
+
setShaderStage(shaderStage: NodeShaderStage): void;
|
|
135
|
+
getShaderStage(): NodeShaderStage;
|
|
132
136
|
setBuildStage(buildStage: BuildStageOption): void;
|
|
133
137
|
getBuildStage(): BuildStageOption;
|
|
134
138
|
abstract buildCode(): void;
|
|
135
|
-
build(): this;
|
|
139
|
+
build(createMaterial?: boolean): this;
|
|
136
140
|
format(snippet: string, fromType: NodeTypeOption, toType: NodeTypeOption): string;
|
|
137
141
|
getSignature(): string;
|
|
138
142
|
}
|