@types/three 0.167.1 → 0.168.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 +2 -2
- three/examples/jsm/Addons.d.ts +5 -1
- three/examples/jsm/capabilities/WebGL.d.ts +11 -3
- three/examples/jsm/controls/ArcballControls.d.ts +111 -77
- three/examples/jsm/controls/DragControls.d.ts +56 -27
- three/examples/jsm/controls/FirstPersonControls.d.ts +82 -12
- three/examples/jsm/controls/FlyControls.d.ts +35 -11
- three/examples/jsm/controls/OrbitControls.d.ts +84 -137
- three/examples/jsm/controls/PointerLockControls.d.ts +68 -9
- three/examples/jsm/controls/TrackballControls.d.ts +110 -26
- three/examples/jsm/effects/AnaglyphEffect.d.ts +11 -5
- three/examples/jsm/effects/ParallaxBarrierEffect.d.ts +7 -4
- three/examples/jsm/environments/RoomEnvironment.d.ts +2 -2
- three/examples/jsm/loaders/KTX2Loader.d.ts +4 -0
- three/examples/jsm/objects/SkyMesh.d.ts +17 -0
- three/examples/jsm/objects/Water2.d.ts +2 -2
- three/examples/jsm/objects/Water2Mesh.d.ts +42 -0
- three/examples/jsm/objects/WaterMesh.d.ts +31 -0
- three/examples/jsm/postprocessing/OutlinePass.d.ts +1 -1
- three/examples/jsm/postprocessing/SSAARenderPass.d.ts +11 -2
- three/package.json +4 -3
- three/src/Three.WebGPU.d.ts +13 -0
- three/src/Three.d.ts +38 -1
- three/src/core/EventDispatcher.d.ts +0 -3
- three/src/core/Object3D.d.ts +2 -0
- three/src/extras/Controls.d.ts +54 -0
- three/src/{nodes/loaders → loaders/nodes}/NodeLoader.d.ts +3 -3
- three/src/{nodes/loaders → loaders/nodes}/NodeMaterialLoader.d.ts +1 -1
- three/src/{nodes/loaders → loaders/nodes}/NodeObjectLoader.d.ts +1 -1
- three/src/materials/Material.d.ts +17 -13
- three/src/materials/nodes/InstancedPointsNodeMaterial.d.ts +33 -0
- three/src/{nodes/materials → materials/nodes}/Line2NodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/LineBasicNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +29 -0
- three/src/{nodes/materials → materials/nodes}/MeshBasicNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -0
- three/src/{nodes/materials → materials/nodes}/MeshMatcapNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/MeshNormalNodeMaterial.d.ts +1 -1
- three/src/{nodes/materials → materials/nodes}/MeshPhongNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/MeshPhysicalNodeMaterial.d.ts +5 -2
- three/src/{nodes/materials → materials/nodes}/MeshSSSNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/MeshStandardNodeMaterial.d.ts +3 -3
- three/src/{nodes/materials → materials/nodes}/MeshToonNodeMaterial.d.ts +2 -2
- three/src/materials/nodes/NodeMaterial.d.ts +91 -0
- three/src/{nodes/materials/Materials.d.ts → materials/nodes/NodeMaterials.d.ts} +5 -2
- three/src/{nodes/materials → materials/nodes}/PointsNodeMaterial.d.ts +1 -2
- three/src/{nodes/materials → materials/nodes}/ShadowNodeMaterial.d.ts +1 -1
- three/src/{nodes/materials → materials/nodes}/SpriteNodeMaterial.d.ts +2 -2
- three/src/{nodes/materials → materials/nodes}/VolumeNodeMaterial.d.ts +1 -1
- three/src/nodes/Nodes.d.ts +117 -362
- three/src/nodes/TSL.d.ts +269 -0
- three/src/nodes/accessors/AccessorsUtils.d.ts +1 -1
- three/src/nodes/accessors/BatchNode.d.ts +1 -2
- three/src/nodes/accessors/{BitangentNode.d.ts → Bitangent.d.ts} +1 -1
- three/src/nodes/accessors/BufferAttributeNode.d.ts +4 -4
- three/src/nodes/accessors/BufferNode.d.ts +1 -1
- three/src/nodes/accessors/{CameraNode.d.ts → Camera.d.ts} +1 -1
- three/src/nodes/accessors/ClippingNode.d.ts +1 -1
- three/src/nodes/accessors/CubeTextureNode.d.ts +1 -7
- three/src/nodes/accessors/InstanceNode.d.ts +1 -1
- three/src/nodes/accessors/MaterialNode.d.ts +3 -3
- three/src/nodes/accessors/MaterialProperties.d.ts +4 -0
- three/src/nodes/accessors/MaterialReferenceNode.d.ts +3 -1
- three/src/nodes/accessors/ModelNode.d.ts +1 -1
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +1 -1
- three/src/nodes/accessors/MorphNode.d.ts +15 -0
- three/src/nodes/accessors/{NormalNode.d.ts → Normal.d.ts} +11 -4
- three/src/nodes/accessors/Object3DNode.d.ts +1 -1
- three/src/nodes/accessors/PointUVNode.d.ts +1 -1
- three/src/nodes/accessors/{PositionNode.d.ts → Position.d.ts} +2 -1
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +27 -0
- three/src/nodes/accessors/ReferenceNode.d.ts +7 -5
- three/src/nodes/accessors/{ReflectVectorNode.d.ts → ReflectVector.d.ts} +1 -1
- three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
- three/src/nodes/accessors/SceneNode.d.ts +20 -0
- three/src/nodes/accessors/SkinningNode.d.ts +11 -1
- three/src/nodes/accessors/StorageBufferNode.d.ts +2 -2
- three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
- three/src/nodes/accessors/{TangentNode.d.ts → Tangent.d.ts} +1 -1
- three/src/nodes/accessors/Texture3DNode.d.ts +1 -1
- three/src/nodes/accessors/TextureBicubic.d.ts +4 -0
- three/src/nodes/accessors/TextureNode.d.ts +26 -7
- three/src/nodes/accessors/TextureSizeNode.d.ts +18 -0
- three/src/nodes/accessors/{UVNode.d.ts → UV.d.ts} +1 -1
- three/src/nodes/accessors/UniformArrayNode.d.ts +30 -0
- three/src/nodes/accessors/UserDataNode.d.ts +1 -1
- three/src/nodes/accessors/VelocityNode.d.ts +15 -0
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
- three/src/nodes/code/CodeNode.d.ts +1 -1
- three/src/nodes/code/ExpressionNode.d.ts +1 -1
- three/src/nodes/code/FunctionCallNode.d.ts +2 -2
- three/src/nodes/code/FunctionNode.d.ts +5 -6
- three/src/nodes/code/ScriptableNode.d.ts +22 -0
- three/src/nodes/code/ScriptableValueNode.d.ts +10 -0
- three/src/nodes/core/AssignNode.d.ts +2 -2
- three/src/nodes/core/AttributeNode.d.ts +2 -5
- three/src/nodes/core/BypassNode.d.ts +2 -2
- three/src/nodes/core/CacheNode.d.ts +2 -2
- three/src/nodes/core/ContextNode.d.ts +10 -7
- three/src/nodes/core/IndexNode.d.ts +11 -3
- three/src/nodes/core/MRTNode.d.ts +7 -2
- three/src/nodes/core/Node.d.ts +8 -2
- three/src/nodes/core/OutputStructNode.d.ts +1 -1
- three/src/nodes/core/ParameterNode.d.ts +12 -0
- three/src/nodes/core/PropertyNode.d.ts +1 -1
- three/src/nodes/core/StackNode.d.ts +12 -2
- three/src/nodes/core/UniformNode.d.ts +1 -1
- three/src/nodes/core/VarNode.d.ts +2 -10
- three/src/nodes/core/VaryingNode.d.ts +2 -2
- three/src/nodes/display/AfterImageNode.d.ts +1 -7
- three/src/nodes/display/AnaglyphPassNode.d.ts +14 -0
- three/src/nodes/display/AnamorphicNode.d.ts +1 -7
- three/src/nodes/display/BleachBypass.d.ts +4 -0
- three/src/nodes/display/BlendMode.d.ts +10 -0
- three/src/nodes/display/BloomNode.d.ts +1 -7
- three/src/nodes/display/BumpMapNode.d.ts +16 -0
- three/src/nodes/display/ColorAdjustment.d.ts +27 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +6 -0
- three/src/nodes/display/ColorSpaceNode.d.ts +23 -23
- three/src/nodes/display/DenoiseNode.d.ts +3 -9
- three/src/nodes/display/DepthOfFieldNode.d.ts +4 -8
- three/src/nodes/display/DotScreenNode.d.ts +4 -8
- three/src/nodes/display/FXAANode.d.ts +3 -9
- three/src/nodes/display/FilmNode.d.ts +3 -9
- three/src/nodes/display/FrontFacingNode.d.ts +4 -2
- three/src/nodes/display/GTAONode.d.ts +3 -9
- three/src/nodes/display/GaussianBlurNode.d.ts +4 -8
- three/src/nodes/display/Lut3DNode.d.ts +3 -9
- three/src/nodes/display/MotionBlur.d.ts +8 -0
- three/src/nodes/display/NormalMapNode.d.ts +4 -8
- three/src/nodes/display/ParallaxBarrierPassNode.d.ts +14 -0
- three/src/nodes/display/PassNode.d.ts +11 -2
- three/src/nodes/display/PixelationPassNode.d.ts +1 -37
- three/src/nodes/display/PosterizeNode.d.ts +1 -7
- three/src/nodes/display/RGBShiftNode.d.ts +1 -7
- three/src/nodes/display/RenderOutputNode.d.ts +2 -2
- three/src/nodes/display/SSAAPassNode.d.ts +26 -0
- three/src/nodes/display/Sepia.d.ts +4 -0
- three/src/nodes/display/SobelOperatorNode.d.ts +4 -8
- three/src/nodes/display/StereoCompositePassNode.d.ts +17 -0
- three/src/nodes/display/StereoPassNode.d.ts +17 -0
- three/src/nodes/display/ToneMappingFunctions.d.ts +14 -0
- three/src/nodes/display/ToneMappingNode.d.ts +5 -6
- three/src/nodes/display/TransitionNode.d.ts +3 -9
- three/src/nodes/display/ViewportDepthNode.d.ts +6 -2
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +4 -2
- three/src/nodes/display/ViewportNode.d.ts +23 -16
- three/src/nodes/display/ViewportSharedTextureNode.d.ts +4 -8
- three/src/nodes/display/ViewportTextureNode.d.ts +4 -9
- three/src/nodes/fog/FogExp2Node.d.ts +4 -8
- three/src/nodes/fog/FogNode.d.ts +4 -8
- three/src/nodes/fog/FogRangeNode.d.ts +4 -8
- three/src/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
- three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
- three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +1 -1
- three/src/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
- three/src/nodes/functions/BSDF/D_GGX.d.ts +1 -1
- three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +1 -1
- three/src/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +10 -0
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -1
- three/src/nodes/functions/ShadowMaskModel.d.ts +1 -1
- three/src/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/src/nodes/functions/material/getRoughness.d.ts +1 -1
- three/src/nodes/geometry/RangeNode.d.ts +1 -1
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
- three/src/nodes/lighting/AmbientLightNode.d.ts +8 -0
- three/src/nodes/lighting/DirectionalLightNode.d.ts +8 -0
- three/src/nodes/lighting/IESSpotLightNode.d.ts +5 -0
- three/src/nodes/lighting/LightNode.d.ts +18 -0
- three/src/nodes/lighting/LightProbeNode.d.ts +11 -0
- three/src/nodes/lighting/LightUtils.d.ts +3 -3
- three/src/nodes/lighting/LightingContextNode.d.ts +1 -7
- three/src/nodes/lighting/LightsNode.d.ts +9 -13
- three/src/nodes/materialx/MaterialXNodes.d.ts +1 -1
- three/src/nodes/materialx/lib/mx_hsv.d.ts +2 -2
- three/src/nodes/materialx/lib/mx_noise.d.ts +1 -1
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +1 -1
- three/src/nodes/math/ConditionalNode.d.ts +39 -0
- three/src/nodes/math/Hash.d.ts +4 -0
- three/src/nodes/math/MathNode.d.ts +2 -2
- three/src/nodes/math/MathUtils.d.ts +0 -10
- three/src/nodes/math/OperatorNode.d.ts +18 -4
- three/src/nodes/math/TriNoise3D.d.ts +1 -1
- three/src/nodes/parsers/GLSLNodeFunction.d.ts +9 -0
- three/src/nodes/parsers/GLSLNodeParser.d.ts +8 -0
- three/src/nodes/pmrem/PMREMNode.d.ts +4 -2
- three/src/nodes/pmrem/PMREMUtils.d.ts +28 -0
- three/src/nodes/procedural/Checker.d.ts +4 -0
- three/src/nodes/tsl/TSLBase.d.ts +21 -0
- three/src/nodes/{shadernode/ShaderNode.d.ts → tsl/TSLCore.d.ts} +23 -23
- three/src/nodes/utils/CubeMapNode.d.ts +13 -0
- three/src/nodes/utils/Discard.d.ts +11 -0
- three/src/nodes/utils/EquirectUVNode.d.ts +1 -1
- three/src/nodes/utils/FunctionOverloadingNode.d.ts +13 -0
- three/src/nodes/utils/LoopNode.d.ts +22 -0
- three/src/nodes/utils/MatcapUVNode.d.ts +1 -1
- three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
- three/src/nodes/utils/OscNode.d.ts +1 -1
- three/src/nodes/utils/Packing.d.ts +5 -0
- three/src/nodes/utils/RTTNode.d.ts +7 -7
- three/src/nodes/utils/ReflectorNode.d.ts +1 -1
- three/src/nodes/utils/RemapNode.d.ts +2 -2
- three/src/nodes/utils/RotateNode.d.ts +1 -7
- three/src/nodes/utils/SetNode.d.ts +11 -0
- three/src/nodes/utils/SplitNode.d.ts +1 -1
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +1 -1
- three/src/nodes/utils/SpriteUtils.d.ts +6 -0
- three/src/nodes/utils/{StoargeArrayElementNode.d.ts → StorageArrayElementNode.d.ts} +1 -7
- three/src/nodes/utils/TimerNode.d.ts +1 -1
- three/src/nodes/utils/TriplanarTexturesNode.d.ts +1 -7
- three/src/nodes/utils/UVUtils.d.ts +14 -0
- three/src/nodes/utils/ViewportUtils.d.ts +4 -0
- three/src/renderers/common/BindGroup.d.ts +8 -1
- three/src/renderers/common/Bindings.d.ts +2 -2
- three/src/renderers/common/ClippingContext.d.ts +1 -0
- three/src/renderers/common/QuadMesh.d.ts +2 -0
- three/src/renderers/common/RenderContext.d.ts +2 -0
- three/src/renderers/common/RenderContexts.d.ts +6 -4
- three/src/renderers/common/RenderObjects.d.ts +1 -1
- three/src/renderers/common/Renderer.d.ts +16 -4
- three/src/renderers/common/SampledTexture.d.ts +7 -1
- three/src/renderers/common/StandardRenderer.d.ts +12 -0
- three/src/renderers/common/Textures.d.ts +1 -0
- three/src/renderers/common/nodes/NodeLibrary.d.ts +56 -0
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +3 -3
- three/src/renderers/common/nodes/Nodes.d.ts +7 -9
- three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +5 -0
- three/src/renderers/webgl/WebGLProperties.d.ts +5 -4
- three/src/renderers/webgpu/WebGPUBackend.d.ts +6 -2
- three/src/renderers/webgpu/WebGPURenderer.d.ts +3 -3
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +2 -2
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +0 -7
- three/src/renderers/webxr/WebXRManager.d.ts +0 -2
- three/examples/jsm/loaders/LogLuvLoader.d.ts +0 -19
- three/src/nodes/accessors/TextureBicubicNode.d.ts +0 -18
- three/src/nodes/accessors/UniformsNode.d.ts +0 -23
- three/src/nodes/core/NodeKeywords.d.ts +0 -17
- three/src/nodes/display/BlendModeNode.d.ts +0 -47
- three/src/nodes/display/ColorAdjustmentNode.d.ts +0 -47
- three/src/nodes/materials/NodeMaterial.d.ts +0 -124
- three/src/nodes/math/CondNode.d.ts +0 -22
- three/src/nodes/math/HashNode.d.ts +0 -16
- three/src/nodes/procedural/CheckerNode.d.ts +0 -15
- three/src/nodes/utils/DiscardNode.d.ts +0 -17
- three/src/nodes/utils/PackingNode.d.ts +0 -24
- three/src/nodes/utils/RotateUVNode.d.ts +0 -19
|
@@ -2,7 +2,7 @@ import { GPUStorageTextureAccess } from "../../renderers/webgpu/utils/WebGPUCons
|
|
|
2
2
|
import { Texture } from "../../textures/Texture.js";
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
4
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
5
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
5
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
6
|
import TextureNode from "./TextureNode.js";
|
|
7
7
|
|
|
8
8
|
export default class StorageTextureNode extends TextureNode {
|
|
@@ -2,7 +2,7 @@ import AttributeNode from "../core/AttributeNode.js";
|
|
|
2
2
|
import VarNode from "../core/VarNode.js";
|
|
3
3
|
import VaryingNode from "../core/VaryingNode.js";
|
|
4
4
|
import MathNode from "../math/MathNode.js";
|
|
5
|
-
import { ShaderNodeObject } from "../
|
|
5
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
6
|
|
|
7
7
|
export const tangentGeometry: ShaderNodeObject<AttributeNode>;
|
|
8
8
|
export const tangentLocal: ShaderNodeObject<VaryingNode>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CubeTexture } from "../../textures/CubeTexture.js";
|
|
2
2
|
import { Texture } from "../../textures/Texture.js";
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
import TextureNode from "./TextureNode.js";
|
|
6
6
|
|
|
7
7
|
export default class Texture3DNode extends TextureNode {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Texture } from "../../textures/Texture.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
3
|
import UniformNode from "../core/UniformNode.js";
|
|
4
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
|
|
6
6
|
export default class TextureNode extends UniformNode<Texture> {
|
|
7
7
|
readonly isTextureNode: true;
|
|
@@ -27,8 +27,26 @@ export default class TextureNode extends UniformNode<Texture> {
|
|
|
27
27
|
|
|
28
28
|
getDefaultUV(): Node;
|
|
29
29
|
|
|
30
|
+
setSampler(value: boolean): this;
|
|
31
|
+
|
|
32
|
+
getSampler(): boolean;
|
|
33
|
+
|
|
34
|
+
uv(uvNode: NodeRepresentation): ShaderNodeObject<Node>;
|
|
35
|
+
|
|
36
|
+
blur(amountNode: NodeRepresentation): ShaderNodeObject<Node>;
|
|
37
|
+
|
|
38
|
+
level(levelNode: NodeRepresentation): ShaderNodeObject<Node>;
|
|
39
|
+
|
|
40
|
+
size(levelNode: NodeRepresentation): ShaderNodeObject<Node>;
|
|
41
|
+
|
|
42
|
+
bias(biasNode: NodeRepresentation): ShaderNodeObject<Node>;
|
|
43
|
+
|
|
44
|
+
compare(compareNode: NodeRepresentation): ShaderNodeObject<Node>;
|
|
45
|
+
|
|
30
46
|
grad(gradeNodeX: NodeRepresentation, gradeNodeY: NodeRepresentation): ShaderNodeObject<Node>;
|
|
31
47
|
|
|
48
|
+
depth(depthNode: NodeRepresentation): ShaderNodeObject<Node>;
|
|
49
|
+
|
|
32
50
|
clone(): this;
|
|
33
51
|
}
|
|
34
52
|
|
|
@@ -38,10 +56,11 @@ export const texture: (
|
|
|
38
56
|
levelNode?: NodeRepresentation,
|
|
39
57
|
biasNode?: NodeRepresentation,
|
|
40
58
|
) => ShaderNodeObject<TextureNode>;
|
|
41
|
-
export const
|
|
59
|
+
export const textureLoad: (
|
|
60
|
+
value: Texture,
|
|
61
|
+
uvNode?: NodeRepresentation,
|
|
62
|
+
levelNode?: NodeRepresentation,
|
|
63
|
+
biasNode?: NodeRepresentation,
|
|
64
|
+
) => ShaderNodeObject<TextureNode>;
|
|
42
65
|
|
|
43
|
-
|
|
44
|
-
interface NodeElements {
|
|
45
|
-
texture: typeof texture;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
66
|
+
export const sampler: (aTexture: Texture | TextureNode) => ShaderNodeObject<Node>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
|
|
4
|
+
declare class TextureSizeNode extends Node {
|
|
5
|
+
readonly isTextureSizeNode: true;
|
|
6
|
+
|
|
7
|
+
textureNode: Node;
|
|
8
|
+
levelNode: Node | null;
|
|
9
|
+
|
|
10
|
+
constructor(textureNode: Node, levelNode?: Node | null);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default TextureSizeNode;
|
|
14
|
+
|
|
15
|
+
export const textureSize: (
|
|
16
|
+
textureNode: NodeRepresentation,
|
|
17
|
+
levelNode?: NodeRepresentation | null,
|
|
18
|
+
) => ShaderNodeObject<TextureSizeNode>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
import ArrayElementNode from "../utils/ArrayElementNode.js";
|
|
4
|
+
import BufferNode from "./BufferNode.js";
|
|
5
|
+
|
|
6
|
+
declare class UniformArrayElementNode extends ArrayElementNode {
|
|
7
|
+
constructor(arrayBuffer: Node, indexNode: Node);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class UniformArrayNode extends BufferNode {
|
|
11
|
+
array: unknown[];
|
|
12
|
+
elementType: string | null;
|
|
13
|
+
|
|
14
|
+
readonly isArrayBufferNode: true;
|
|
15
|
+
|
|
16
|
+
constructor(value: unknown[], elementType?: string | null);
|
|
17
|
+
|
|
18
|
+
getElementLength(): number;
|
|
19
|
+
|
|
20
|
+
element(indexNode: number): ShaderNodeObject<UniformArrayElementNode>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default UniformArrayNode;
|
|
24
|
+
|
|
25
|
+
export const uniformArray: (values: unknown[], nodeType?: string | null) => ShaderNodeObject<UniformArrayNode>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated uniforms() has been renamed to uniformArray().
|
|
29
|
+
*/
|
|
30
|
+
export const uniforms: (values: unknown[], nodeType?: string | null) => ShaderNodeObject<UniformArrayNode>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Matrix4 } from "../../math/Matrix4.js";
|
|
2
|
+
import TempNode from "../core/TempNode.js";
|
|
3
|
+
import UniformNode from "../core/UniformNode.js";
|
|
4
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
|
+
|
|
6
|
+
declare class VelocityNode extends TempNode {
|
|
7
|
+
previousProjectionMatrix: UniformNode<Matrix4>;
|
|
8
|
+
previousModelViewMatrix: UniformNode<Matrix4>;
|
|
9
|
+
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default VelocityNode;
|
|
14
|
+
|
|
15
|
+
export const velocity: ShaderNodeObject<VelocityNode>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import AttributeNode from "../core/AttributeNode.js";
|
|
2
|
-
import { ShaderNodeObject } from "../
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
4
|
export default class VertexColorNode extends AttributeNode {
|
|
5
5
|
readonly isVertexColorNode: true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
3
|
-
import { ShaderNodeObject } from "../
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
4
|
|
|
5
5
|
export interface CodeNodeInclude {
|
|
6
6
|
build(builder: NodeBuilder): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import TempNode from "../core/TempNode.js";
|
|
3
|
-
import { ProxiedObject, ShaderNodeObject } from "../
|
|
3
|
+
import { ProxiedObject, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
4
|
import FunctionNode, { FunctionNodeArguments } from "./FunctionNode.js";
|
|
5
5
|
|
|
6
6
|
export default class FunctionCallNode<P extends Node[] | { [name: string]: Node }> extends TempNode {
|
|
@@ -18,7 +18,7 @@ export const call: <P extends FunctionNodeArguments>(
|
|
|
18
18
|
parameters?: ProxiedObject<P>,
|
|
19
19
|
) => ShaderNodeObject<FunctionCallNode<P>>;
|
|
20
20
|
|
|
21
|
-
declare module "../
|
|
21
|
+
declare module "../tsl/TSLCore.js" {
|
|
22
22
|
interface NodeElements {
|
|
23
23
|
call: typeof call;
|
|
24
24
|
}
|
|
@@ -2,14 +2,13 @@ import Node from "../core/Node.js";
|
|
|
2
2
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
3
3
|
import NodeFunction from "../core/NodeFunction.js";
|
|
4
4
|
import NodeFunctionInput from "../core/NodeFunctionInput.js";
|
|
5
|
-
import { ProxiedObject, ProxiedTuple, ShaderNodeObject } from "../
|
|
5
|
+
import { ProxiedObject, ProxiedTuple, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
6
|
import CodeNode, { CodeNodeInclude } from "./CodeNode.js";
|
|
7
7
|
import FunctionCallNode from "./FunctionCallNode.js";
|
|
8
8
|
|
|
9
9
|
export type FunctionNodeArguments = Node[] | { [name: string]: Node };
|
|
10
10
|
|
|
11
11
|
export default class FunctionNode<P extends Node[] | { [name: string]: Node }> extends CodeNode {
|
|
12
|
-
keywords: { [key: string]: Node };
|
|
13
12
|
constructor(code?: string, includes?: CodeNodeInclude[], language?: string);
|
|
14
13
|
|
|
15
14
|
getInputs(builder: NodeBuilder): NodeFunctionInput[];
|
|
@@ -17,7 +16,7 @@ export default class FunctionNode<P extends Node[] | { [name: string]: Node }> e
|
|
|
17
16
|
call(parameters: P): FunctionCallNode<P>;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
type FnParameters<P extends FunctionNodeArguments> = P extends readonly [...unknown[]] ? ProxiedTuple<P>
|
|
21
20
|
: readonly [ProxiedObject<P>];
|
|
22
21
|
|
|
23
22
|
export const nativeFn: <P extends FunctionNodeArguments>(
|
|
@@ -25,15 +24,15 @@ export const nativeFn: <P extends FunctionNodeArguments>(
|
|
|
25
24
|
includes?: CodeNodeInclude[],
|
|
26
25
|
language?: string,
|
|
27
26
|
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
28
|
-
) => (...params:
|
|
27
|
+
) => (...params: FnParameters<P>) => ShaderNodeObject<Node>;
|
|
29
28
|
|
|
30
29
|
export const glslFn: <P extends FunctionNodeArguments>(
|
|
31
30
|
code: string,
|
|
32
31
|
includes?: CodeNodeInclude[],
|
|
33
32
|
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
34
|
-
) => (...params:
|
|
33
|
+
) => (...params: FnParameters<P>) => ShaderNodeObject<Node>;
|
|
35
34
|
export const wgslFn: <P extends FunctionNodeArguments>(
|
|
36
35
|
code: string,
|
|
37
36
|
includes?: CodeNodeInclude[],
|
|
38
37
|
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
39
|
-
) => (...params:
|
|
38
|
+
) => (...params: FnParameters<P>) => ShaderNodeObject<Node>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
|
|
4
|
+
declare class Resources extends Map<string, unknown> {
|
|
5
|
+
get<TArgs extends unknown[]>(key: string, callback?: ((...args: TArgs) => void) | null, ...params: TArgs): unknown;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const global: Resources;
|
|
9
|
+
|
|
10
|
+
declare class ScriptableNode extends Node {
|
|
11
|
+
codeNode: Node | null;
|
|
12
|
+
parameters: Record<string, unknown>;
|
|
13
|
+
|
|
14
|
+
constructor(codeNode?: Node | null, parameters?: Record<string, unknown>);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default ScriptableNode;
|
|
18
|
+
|
|
19
|
+
export const scriptable: (
|
|
20
|
+
codeNode?: NodeRepresentation | null,
|
|
21
|
+
parameters?: Record<string, unknown>,
|
|
22
|
+
) => ShaderNodeObject<ScriptableNode>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
|
|
4
|
+
declare class ScriptableValueNode extends Node {
|
|
5
|
+
constructor(value: unknown);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default ScriptableValueNode;
|
|
9
|
+
|
|
10
|
+
export const scriptableValue: (value?: unknown) => ShaderNodeObject<ScriptableValueNode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
1
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
import NodeBuilder from "./NodeBuilder.js";
|
|
4
4
|
import TempNode from "./TempNode.js";
|
|
@@ -11,7 +11,7 @@ export default class AssignNode extends TempNode {
|
|
|
11
11
|
|
|
12
12
|
export const assign: (targetNode: NodeRepresentation, sourceNode: NodeRepresentation) => ShaderNodeObject<AssignNode>;
|
|
13
13
|
|
|
14
|
-
declare module "../
|
|
14
|
+
declare module "../tsl/TSLCore.js" {
|
|
15
15
|
interface NodeElements {
|
|
16
16
|
assign: typeof assign;
|
|
17
17
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
1
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
import NodeBuilder from "./NodeBuilder.js";
|
|
4
4
|
|
|
5
5
|
export default class AttributeNode extends Node {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
constructor(attributeName: string, nodeType?: string | null, defaultNode?: Node | null);
|
|
6
|
+
constructor(attributeName: string, nodeType?: string | null);
|
|
9
7
|
|
|
10
8
|
setAttributeName(attributeName: string): this;
|
|
11
9
|
|
|
@@ -15,5 +13,4 @@ export default class AttributeNode extends Node {
|
|
|
15
13
|
export const attribute: (
|
|
16
14
|
name: string,
|
|
17
15
|
nodeType?: string | null,
|
|
18
|
-
defaultNode?: NodeRepresentation,
|
|
19
16
|
) => ShaderNodeObject<AttributeNode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
1
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
|
|
4
4
|
export default class BypassNode extends Node {
|
|
@@ -11,7 +11,7 @@ export default class BypassNode extends Node {
|
|
|
11
11
|
|
|
12
12
|
export const bypass: (returnNode: NodeRepresentation, callNode: NodeRepresentation) => ShaderNodeObject<BypassNode>;
|
|
13
13
|
|
|
14
|
-
declare module "../
|
|
14
|
+
declare module "../tsl/TSLCore.js" {
|
|
15
15
|
interface NodeElements {
|
|
16
16
|
bypass: typeof bypass;
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
import NodeCache from "./NodeCache.js";
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ export default class CacheNode extends Node {
|
|
|
13
13
|
|
|
14
14
|
export const cache: (node: Node, cache?: NodeCache) => ShaderNodeObject<CacheNode>;
|
|
15
15
|
|
|
16
|
-
declare module "../
|
|
16
|
+
declare module "../tsl/TSLCore.js" {
|
|
17
17
|
interface NodeElements {
|
|
18
18
|
cache: typeof cache;
|
|
19
19
|
}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
1
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
import { NodeBuilderContext } from "./NodeBuilder.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
isContextNode: true;
|
|
5
|
+
declare class ContextNode extends Node {
|
|
6
|
+
readonly isContextNode: true;
|
|
7
|
+
|
|
7
8
|
node: Node;
|
|
8
|
-
|
|
9
|
+
value: NodeBuilderContext;
|
|
9
10
|
|
|
10
|
-
constructor(node: Node,
|
|
11
|
+
constructor(node: Node, value?: NodeBuilderContext);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export
|
|
14
|
+
export default ContextNode;
|
|
15
|
+
|
|
16
|
+
export const context: (node: NodeRepresentation, context?: NodeBuilderContext) => ShaderNodeObject<ContextNode>;
|
|
14
17
|
export const label: (node: NodeRepresentation, label: string) => ShaderNodeObject<ContextNode>;
|
|
15
18
|
|
|
16
|
-
declare module "../
|
|
19
|
+
declare module "../tsl/TSLCore.js" {
|
|
17
20
|
interface NodeElements {
|
|
18
21
|
context: typeof context;
|
|
19
22
|
label: typeof label;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
|
|
4
|
-
export type IndexNodeScope =
|
|
4
|
+
export type IndexNodeScope =
|
|
5
|
+
| typeof IndexNode.VERTEX
|
|
6
|
+
| typeof IndexNode.INSTANCE
|
|
7
|
+
| typeof IndexNode.INVOCATION_LOCAL
|
|
8
|
+
| typeof IndexNode.DRAW;
|
|
5
9
|
|
|
6
|
-
|
|
10
|
+
declare class IndexNode extends Node {
|
|
7
11
|
scope: IndexNodeScope;
|
|
8
12
|
|
|
9
13
|
readonly isInstanceNode: true;
|
|
@@ -12,9 +16,13 @@ export default class IndexNode extends Node {
|
|
|
12
16
|
|
|
13
17
|
static VERTEX: "vertex";
|
|
14
18
|
static INSTANCE: "instance";
|
|
19
|
+
static INVOCATION_LOCAL: "invocationLocal";
|
|
15
20
|
static DRAW: "draw";
|
|
16
21
|
}
|
|
17
22
|
|
|
23
|
+
export default IndexNode;
|
|
24
|
+
|
|
18
25
|
export const vertexIndex: ShaderNodeObject<IndexNode>;
|
|
19
26
|
export const instanceIndex: ShaderNodeObject<IndexNode>;
|
|
27
|
+
export const invocationLocalIndex: ShaderNodeObject<IndexNode>;
|
|
20
28
|
export const drawIndex: ShaderNodeObject<IndexNode>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { Texture } from "../../textures/Texture.js";
|
|
1
2
|
import { Node } from "../Nodes.js";
|
|
2
|
-
import { ShaderNodeObject } from "../
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
4
|
import OutputStructNode from "./OutputStructNode.js";
|
|
4
5
|
|
|
6
|
+
export function getTextureIndex(textures: ReadonlyArray<Texture>, name: string): number;
|
|
7
|
+
|
|
5
8
|
declare class MRTNode extends OutputStructNode {
|
|
6
9
|
outputNodes: { [name: string]: Node };
|
|
7
10
|
|
|
@@ -9,7 +12,9 @@ declare class MRTNode extends OutputStructNode {
|
|
|
9
12
|
|
|
10
13
|
constructor(outputNodes: { [name: string]: Node });
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
has(name: string): boolean;
|
|
16
|
+
|
|
17
|
+
get(name: string): Node;
|
|
13
18
|
|
|
14
19
|
merge(mrtNode: MRTNode): ShaderNodeObject<MRTNode>;
|
|
15
20
|
}
|
three/src/nodes/core/Node.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ declare class Node extends EventDispatcher<{
|
|
|
87
87
|
dispose(): void;
|
|
88
88
|
traverse(callback: (node: Node) => void): void;
|
|
89
89
|
getCacheKey(force?: boolean): string;
|
|
90
|
+
getScope(): this;
|
|
90
91
|
getHash(builder: NodeBuilder): string;
|
|
91
92
|
getUpdateType(): NodeUpdateType;
|
|
92
93
|
getUpdateBeforeType(): NodeUpdateType;
|
|
@@ -95,7 +96,6 @@ declare class Node extends EventDispatcher<{
|
|
|
95
96
|
getNodeType(builder: NodeBuilder): string | null;
|
|
96
97
|
getShared(builder: NodeBuilder): Node;
|
|
97
98
|
setup(builder: NodeBuilder): unknown;
|
|
98
|
-
increaseUsage(builder: NodeBuilder): number;
|
|
99
99
|
analyze(builder: NodeBuilder): void;
|
|
100
100
|
generate(builder: NodeBuilder, output?: string | null): string | null | undefined;
|
|
101
101
|
updateBefore(frame: NodeFrame): void;
|
|
@@ -108,7 +108,13 @@ declare class Node extends EventDispatcher<{
|
|
|
108
108
|
toJSON(meta?: NodeJSONMeta | string): NodeJSONOutputData;
|
|
109
109
|
}
|
|
110
110
|
export default Node;
|
|
111
|
+
export declare function registerNode(type: string, nodeClass: {
|
|
112
|
+
new(...args: any[]): Node;
|
|
113
|
+
}): string | undefined;
|
|
114
|
+
export declare function createNodeFromType(type: string): Node | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated Function addNodeClass() is deprecated. Use registerNodeClass() instead.
|
|
117
|
+
*/
|
|
111
118
|
export declare function addNodeClass(type: string, nodeClass: {
|
|
112
119
|
new(...args: any[]): Node;
|
|
113
120
|
}): void;
|
|
114
|
-
export declare function createNodeFromType(type: string): Node | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
|
+
import PropertyNode from "./PropertyNode.js";
|
|
3
|
+
|
|
4
|
+
declare class ParameterNode extends PropertyNode {
|
|
5
|
+
readonly isParameterNode: true;
|
|
6
|
+
|
|
7
|
+
constructor(nodeType: string, name?: string | null);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default ParameterNode;
|
|
11
|
+
|
|
12
|
+
export const parameter: (type: string, name?: string | null) => ShaderNodeObject<ParameterNode>;
|
|
@@ -9,9 +9,19 @@ export default class StackNode extends Node {
|
|
|
9
9
|
|
|
10
10
|
add(node: Node): this;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
If(boolNode: Node, method: () => void): this;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
ElseIf(node: Node, method: () => void): this;
|
|
15
15
|
|
|
16
|
+
Else(node: Node, method: () => void): this;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use {@link StackNode#ElseIf Else()} instead.
|
|
20
|
+
*/
|
|
21
|
+
elseif(node: Node, method: () => void): this;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use {@link StackNode#Else Else()} instead.
|
|
25
|
+
*/
|
|
16
26
|
else(node: Node, method: () => void): this;
|
|
17
27
|
}
|
|
@@ -20,4 +20,4 @@ export default UniformNode;
|
|
|
20
20
|
export declare const uniform: <TValue>(
|
|
21
21
|
arg1: InputNode<TValue> | TValue,
|
|
22
22
|
arg2?: Node | string,
|
|
23
|
-
) => import("../
|
|
23
|
+
) => import("../tsl/TSLCore.js").ShaderNodeObject<UniformNode<TValue>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
1
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
import Node from "./Node.js";
|
|
4
3
|
|
|
5
4
|
export default class VarNode extends Node {
|
|
@@ -9,18 +8,11 @@ export default class VarNode extends Node {
|
|
|
9
8
|
readonly isVarNode: true;
|
|
10
9
|
|
|
11
10
|
constructor(node: Node, name?: string | null);
|
|
12
|
-
|
|
13
|
-
op(op: OperatorNodeOp, ...params: Node[]): this;
|
|
14
|
-
assign(...params: Node[]): this;
|
|
15
|
-
add(...params: Node[]): this;
|
|
16
|
-
sub(...params: Node[]): this;
|
|
17
|
-
mul(...params: Node[]): this;
|
|
18
|
-
div(...params: Node[]): this;
|
|
19
11
|
}
|
|
20
12
|
|
|
21
13
|
export const temp: (node: NodeRepresentation, name?: string | null) => ShaderNodeObject<VarNode>;
|
|
22
14
|
|
|
23
|
-
declare module "../
|
|
15
|
+
declare module "../tsl/TSLCore.js" {
|
|
24
16
|
interface NodeElements {
|
|
25
17
|
temp: typeof temp;
|
|
26
18
|
toVar: typeof temp;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
1
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
3
|
import NodeBuilder from "./NodeBuilder.js";
|
|
4
4
|
import NodeVarying from "./NodeVarying.js";
|
|
@@ -14,7 +14,7 @@ export default class VaryingNode extends Node {
|
|
|
14
14
|
|
|
15
15
|
export const varying: (node: NodeRepresentation, name?: string) => ShaderNodeObject<VaryingNode>;
|
|
16
16
|
|
|
17
|
-
declare module "../
|
|
17
|
+
declare module "../tsl/TSLCore.js" {
|
|
18
18
|
interface NodeElements {
|
|
19
19
|
varying: typeof varying;
|
|
20
20
|
}
|
|
@@ -2,7 +2,7 @@ import TextureNode from "../accessors/TextureNode.js";
|
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
3
|
import TempNode from "../core/TempNode.js";
|
|
4
4
|
import UniformNode from "../core/UniformNode.js";
|
|
5
|
-
import { ShaderNodeObject } from "../
|
|
5
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
6
6
|
|
|
7
7
|
export default class AfterImageNode extends TempNode {
|
|
8
8
|
textureNode: TextureNode;
|
|
@@ -17,9 +17,3 @@ export default class AfterImageNode extends TempNode {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const afterImage: (node: Node, damp?: number) => ShaderNodeObject<AfterImageNode>;
|
|
20
|
-
|
|
21
|
-
declare module "../shadernode/ShaderNode.js" {
|
|
22
|
-
interface NodeElements {
|
|
23
|
-
afterImage: typeof afterImage;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Camera } from "../../cameras/Camera.js";
|
|
2
|
+
import { Scene } from "../../scenes/Scene.js";
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
|
+
import StereoCompositePassNode from "./StereoCompositePassNode.js";
|
|
5
|
+
|
|
6
|
+
declare class AnaglyphPassNode extends StereoCompositePassNode {
|
|
7
|
+
readonly isAnaglyphPassNode: true;
|
|
8
|
+
|
|
9
|
+
constructor(scene: Scene, camera: Camera);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default AnaglyphPassNode;
|
|
13
|
+
|
|
14
|
+
export const anaglyphPass: (scene: Scene, camera: Camera) => ShaderNodeObject<AnaglyphPassNode>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vector2 } from "../../math/Vector2.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
3
|
import TempNode from "../core/TempNode.js";
|
|
4
|
-
import { NodeRepresentation, ShaderNodeObject } from "../
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
|
|
6
6
|
export default class AnamorphicNode extends TempNode {
|
|
7
7
|
textureNode: Node;
|
|
@@ -23,9 +23,3 @@ export const anamorphic: (
|
|
|
23
23
|
scale?: NodeRepresentation,
|
|
24
24
|
samples?: NodeRepresentation,
|
|
25
25
|
) => ShaderNodeObject<AnamorphicNode>;
|
|
26
|
-
|
|
27
|
-
declare module "../shadernode/ShaderNode.js" {
|
|
28
|
-
interface NodeElements {
|
|
29
|
-
anamorphic: typeof anamorphic;
|
|
30
|
-
}
|
|
31
|
-
}
|