@types/three 0.179.0 → 0.181.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 +1 -1
- three/examples/jsm/controls/DragControls.d.ts +0 -30
- three/examples/jsm/controls/PointerLockControls.d.ts +0 -5
- three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
- three/examples/jsm/exporters/EXRExporter.d.ts +2 -2
- three/examples/jsm/exporters/KTX2Exporter.d.ts +2 -2
- three/examples/jsm/exporters/STLExporter.d.ts +2 -2
- three/examples/jsm/exporters/USDZExporter.d.ts +2 -2
- three/examples/jsm/geometries/TextGeometry.d.ts +2 -0
- three/examples/jsm/gpgpu/BitonicSort.d.ts +21 -0
- three/examples/jsm/inspector/Inspector.d.ts +10 -0
- three/examples/jsm/inspector/RendererInspector.d.ts +4 -0
- three/examples/jsm/inspector/tabs/Parameters.d.ts +95 -0
- three/examples/jsm/inspector/ui/Tab.d.ts +3 -0
- three/examples/jsm/inspector/ui/Values.d.ts +80 -0
- three/examples/jsm/interactive/SelectionBox.d.ts +9 -9
- three/examples/jsm/lighting/TiledLighting.d.ts +1 -2
- three/examples/jsm/loaders/FontLoader.d.ts +1 -1
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +2 -2
- three/examples/jsm/loaders/HDRLoader.d.ts +22 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +3 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +5 -1
- three/examples/jsm/loaders/RGBELoader.d.ts +9 -15
- three/examples/jsm/materials/WoodNodeMaterial.d.ts +75 -0
- three/examples/jsm/math/ColorSpaces.d.ts +4 -0
- three/examples/jsm/objects/SkyMesh.d.ts +6 -7
- three/examples/jsm/objects/WaterMesh.d.ts +2 -2
- three/examples/jsm/postprocessing/SSRPass.d.ts +6 -29
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +15 -10
- three/examples/jsm/tsl/display/AfterImageNode.d.ts +4 -5
- three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +11 -3
- three/examples/jsm/tsl/display/BleachBypass.d.ts +1 -2
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -3
- three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +15 -10
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +1 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +1 -2
- three/examples/jsm/tsl/display/FilmNode.d.ts +1 -2
- three/examples/jsm/tsl/display/GTAONode.d.ts +11 -10
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +28 -9
- three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -7
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +2 -3
- three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -7
- three/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/PixelationPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +1 -2
- three/examples/jsm/tsl/display/SMAANode.d.ts +1 -2
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/SSGINode.d.ts +30 -0
- three/examples/jsm/tsl/display/SSRNode.d.ts +18 -14
- three/examples/jsm/tsl/display/SSSNode.d.ts +18 -0
- three/examples/jsm/tsl/display/Sepia.d.ts +1 -2
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +1 -2
- three/examples/jsm/tsl/display/StereoPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/TRAANode.d.ts +1 -2
- three/examples/jsm/tsl/display/TransitionNode.d.ts +1 -2
- three/examples/jsm/tsl/display/boxBlur.d.ts +10 -0
- three/examples/jsm/tsl/display/hashBlur.d.ts +2 -3
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +3 -4
- three/examples/jsm/tsl/math/Bayer.d.ts +1 -2
- three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -3
- three/package.json +2 -2
- three/src/Three.Core.d.ts +2 -1
- three/src/Three.TSL.d.ts +36 -5
- three/src/Three.WebGPU.Nodes.d.ts +2 -0
- three/src/Three.WebGPU.d.ts +2 -0
- three/src/animation/AnimationClip.d.ts +5 -0
- three/src/animation/AnimationMixer.d.ts +3 -3
- three/src/constants.d.ts +3 -1
- three/src/lights/DirectionalLight.d.ts +0 -1
- three/src/loaders/ObjectLoader.d.ts +3 -3
- three/src/loaders/TextureLoader.d.ts +3 -3
- three/src/materials/LineBasicMaterial.d.ts +1 -0
- three/src/materials/LineDashedMaterial.d.ts +1 -0
- three/src/materials/Material.d.ts +2 -2
- three/src/materials/MeshBasicMaterial.d.ts +1 -0
- three/src/materials/MeshDepthMaterial.d.ts +1 -0
- three/src/materials/MeshDistanceMaterial.d.ts +2 -1
- three/src/materials/MeshLambertMaterial.d.ts +2 -1
- three/src/materials/MeshMatcapMaterial.d.ts +15 -0
- three/src/materials/MeshNormalMaterial.d.ts +1 -0
- three/src/materials/MeshPhongMaterial.d.ts +2 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +1 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -7
- three/src/materials/MeshToonMaterial.d.ts +1 -0
- three/src/materials/PointsMaterial.d.ts +2 -1
- three/src/materials/ShaderMaterial.d.ts +9 -8
- three/src/materials/ShadowMaterial.d.ts +1 -0
- three/src/materials/SpriteMaterial.d.ts +1 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -0
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +2 -1
- three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/NodeMaterial.d.ts +3 -3
- three/src/materials/nodes/PointsNodeMaterial.d.ts +17 -0
- three/src/materials/nodes/ShadowNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +1 -0
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +2 -2
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +1 -1
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Vector3.d.ts +2 -2
- three/src/nodes/Nodes.d.ts +4 -1
- three/src/nodes/TSL.d.ts +4 -1
- three/src/nodes/accessors/AccessorsUtils.d.ts +4 -5
- three/src/nodes/accessors/Arrays.d.ts +2 -3
- three/src/nodes/accessors/BatchNode.d.ts +1 -2
- three/src/nodes/accessors/Bitangent.d.ts +4 -5
- three/src/nodes/accessors/BufferAttributeNode.d.ts +8 -9
- three/src/nodes/accessors/BufferNode.d.ts +2 -2
- three/src/nodes/accessors/BuiltinNode.d.ts +1 -2
- three/src/nodes/accessors/Camera.d.ts +11 -10
- three/src/nodes/accessors/ClippingNode.d.ts +3 -6
- three/src/nodes/accessors/CubeTextureNode.d.ts +8 -9
- three/src/nodes/accessors/InstanceNode.d.ts +1 -2
- three/src/nodes/accessors/InstancedMeshNode.d.ts +1 -2
- three/src/nodes/accessors/Lights.d.ts +6 -7
- three/src/nodes/accessors/MaterialNode.d.ts +38 -39
- three/src/nodes/accessors/MaterialProperties.d.ts +3 -4
- three/src/nodes/accessors/MaterialReferenceNode.d.ts +2 -2
- three/src/nodes/accessors/ModelNode.d.ts +12 -13
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +1 -2
- three/src/nodes/accessors/MorphNode.d.ts +1 -2
- three/src/nodes/accessors/Normal.d.ts +13 -14
- three/src/nodes/accessors/Object3DNode.d.ts +6 -7
- three/src/nodes/accessors/PointUVNode.d.ts +1 -2
- three/src/nodes/accessors/Position.d.ts +7 -8
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +2 -3
- three/src/nodes/accessors/ReferenceNode.d.ts +2 -3
- three/src/nodes/accessors/ReflectVector.d.ts +4 -5
- three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -2
- three/src/nodes/accessors/SceneNode.d.ts +3 -4
- three/src/nodes/accessors/SkinningNode.d.ts +5 -6
- three/src/nodes/accessors/StorageBufferNode.d.ts +5 -5
- three/src/nodes/accessors/StorageTextureNode.d.ts +7 -4
- three/src/nodes/accessors/Tangent.d.ts +4 -6
- three/src/nodes/accessors/TangentUtils.d.ts +2 -3
- three/src/nodes/accessors/Texture3DNode.d.ts +3 -4
- three/src/nodes/accessors/TextureBicubic.d.ts +2 -3
- three/src/nodes/accessors/TextureNode.d.ts +31 -24
- three/src/nodes/accessors/TextureSizeNode.d.ts +1 -2
- three/src/nodes/accessors/UV.d.ts +1 -2
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -3
- three/src/nodes/accessors/UserDataNode.d.ts +1 -2
- three/src/nodes/accessors/VelocityNode.d.ts +1 -2
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -2
- three/src/nodes/code/CodeNode.d.ts +4 -5
- three/src/nodes/code/ExpressionNode.d.ts +1 -2
- three/src/nodes/code/FunctionCallNode.d.ts +6 -5
- three/src/nodes/code/FunctionNode.d.ts +4 -6
- three/src/nodes/code/ScriptableNode.d.ts +1 -2
- three/src/nodes/code/ScriptableValueNode.d.ts +1 -2
- three/src/nodes/core/ArrayNode.d.ts +6 -6
- three/src/nodes/core/AssignNode.d.ts +1 -8
- three/src/nodes/core/AttributeNode.d.ts +1 -2
- three/src/nodes/core/BypassNode.d.ts +5 -5
- three/src/nodes/core/ContextNode.d.ts +25 -9
- three/src/nodes/core/IndexNode.d.ts +10 -7
- three/src/nodes/core/InspectorNode.d.ts +16 -0
- three/src/nodes/core/IsolateNode.d.ts +36 -0
- three/src/nodes/core/MRTNode.d.ts +3 -4
- three/src/nodes/core/Node.d.ts +22 -13
- three/src/nodes/core/NodeUtils.d.ts +0 -10
- three/src/nodes/core/OutputStructNode.d.ts +1 -2
- three/src/nodes/core/ParameterNode.d.ts +1 -2
- three/src/nodes/core/PropertyNode.d.ts +30 -31
- three/src/nodes/core/StackNode.d.ts +1 -4
- three/src/nodes/core/StructNode.d.ts +3 -4
- three/src/nodes/core/SubBuildNode.d.ts +1 -2
- three/src/nodes/core/UniformNode.d.ts +5 -8
- three/src/nodes/core/VarNode.d.ts +11 -21
- three/src/nodes/core/VaryingNode.d.ts +12 -10
- three/src/nodes/display/BlendModes.d.ts +11 -12
- three/src/nodes/display/BumpMapNode.d.ts +1 -2
- three/src/nodes/display/ColorAdjustment.d.ts +7 -8
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -3
- three/src/nodes/display/ColorSpaceNode.d.ts +19 -9
- three/src/nodes/display/FrontFacingNode.d.ts +3 -4
- three/src/nodes/display/NormalMapNode.d.ts +1 -2
- three/src/nodes/display/PassNode.d.ts +20 -11
- three/src/nodes/display/PosterizeNode.d.ts +1 -2
- three/src/nodes/display/RenderOutputNode.d.ts +11 -6
- three/src/nodes/display/ScreenNode.d.ts +12 -10
- three/src/nodes/display/ToneMappingFunctions.d.ts +6 -7
- three/src/nodes/display/ToneMappingNode.d.ts +11 -10
- three/src/nodes/display/ToonOutlinePassNode.d.ts +1 -2
- three/src/nodes/display/ViewportDepthNode.d.ts +3 -4
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +4 -2
- three/src/nodes/display/ViewportSharedTextureNode.d.ts +4 -2
- three/src/nodes/display/ViewportTextureNode.d.ts +6 -3
- three/src/nodes/fog/Fog.d.ts +5 -6
- three/src/nodes/functions/BSDF/BRDF_GGX.d.ts +4 -5
- three/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts +14 -0
- three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -2
- three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +1 -2
- three/src/nodes/functions/BSDF/DFGApprox.d.ts +1 -2
- three/src/nodes/functions/BSDF/D_GGX.d.ts +1 -2
- three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +1 -2
- three/src/nodes/functions/BSDF/F_Schlick.d.ts +1 -2
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +1 -2
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -2
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -2
- three/src/nodes/functions/ShadowMaskModel.d.ts +1 -2
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +1 -2
- three/src/nodes/functions/material/getGeometryRoughness.d.ts +1 -2
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +1 -2
- three/src/nodes/functions/material/getRoughness.d.ts +1 -2
- three/src/nodes/functions/material/getShIrradianceAt.d.ts +1 -2
- three/src/nodes/geometry/RangeNode.d.ts +1 -2
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +10 -11
- three/src/nodes/gpgpu/BarrierNode.d.ts +3 -4
- three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +5 -6
- three/src/nodes/gpgpu/ComputeNode.d.ts +21 -13
- three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +99 -0
- three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +1 -2
- three/src/nodes/lighting/AnalyticLightNode.d.ts +1 -2
- three/src/nodes/lighting/LightUtils.d.ts +1 -2
- three/src/nodes/lighting/LightingContextNode.d.ts +1 -2
- three/src/nodes/lighting/LightsNode.d.ts +1 -2
- three/src/nodes/lighting/PointLightNode.d.ts +5 -6
- three/src/nodes/lighting/PointShadowNode.d.ts +4 -5
- three/src/nodes/lighting/ShadowBaseNode.d.ts +1 -2
- three/src/nodes/lighting/ShadowFilterNode.d.ts +4 -5
- three/src/nodes/lighting/ShadowNode.d.ts +1 -2
- three/src/nodes/lighting/SpotLightNode.d.ts +1 -2
- three/src/nodes/materialx/MaterialXNodes.d.ts +41 -42
- three/src/nodes/materialx/lib/mx_hsv.d.ts +2 -3
- three/src/nodes/materialx/lib/mx_noise.d.ts +73 -74
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +1 -2
- three/src/nodes/math/BitcastNode.d.ts +24 -0
- three/src/nodes/math/ConditionalNode.d.ts +11 -5
- three/src/nodes/math/Hash.d.ts +1 -2
- three/src/nodes/math/MathNode.d.ts +223 -80
- three/src/nodes/math/OperatorNode.d.ts +203 -59
- three/src/nodes/math/TriNoise3D.d.ts +3 -4
- three/src/nodes/pmrem/PMREMNode.d.ts +1 -2
- three/src/nodes/pmrem/PMREMUtils.d.ts +3 -4
- three/src/nodes/procedural/Checker.d.ts +1 -2
- three/src/nodes/shapes/Shapes.d.ts +1 -2
- three/src/nodes/tsl/TSLBase.d.ts +2 -1
- three/src/nodes/tsl/TSLCore.d.ts +235 -128
- three/src/nodes/utils/CubeMapNode.d.ts +1 -2
- three/src/nodes/utils/DebugNode.d.ts +9 -5
- three/src/nodes/utils/Discard.d.ts +6 -6
- three/src/nodes/utils/EquirectUV.d.ts +1 -2
- three/src/nodes/utils/EventNode.d.ts +8 -3
- three/src/nodes/utils/FunctionOverloadingNode.d.ts +1 -2
- three/src/nodes/utils/LoopNode.d.ts +7 -6
- three/src/nodes/utils/MatcapUV.d.ts +1 -2
- three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -2
- three/src/nodes/utils/Oscillators.d.ts +4 -5
- three/src/nodes/utils/Packing.d.ts +2 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +5 -4
- three/src/nodes/utils/RTTNode.d.ts +2 -3
- three/src/nodes/utils/ReflectorNode.d.ts +18 -4
- three/src/nodes/utils/RemapNode.d.ts +29 -7
- three/src/nodes/utils/RotateNode.d.ts +1 -2
- three/src/nodes/utils/SampleNode.d.ts +3 -3
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +1 -2
- three/src/nodes/utils/SpriteUtils.d.ts +1 -2
- three/src/nodes/utils/StorageArrayElementNode.d.ts +1 -2
- three/src/nodes/utils/Timer.d.ts +3 -19
- three/src/nodes/utils/TriplanarTextures.d.ts +2 -3
- three/src/nodes/utils/UVUtils.d.ts +2 -3
- three/src/nodes/utils/ViewportUtils.d.ts +1 -2
- three/src/objects/InstancedMesh.d.ts +2 -3
- three/src/renderers/WebGLRenderer.d.ts +0 -25
- three/src/renderers/common/Animation.d.ts +4 -1
- three/src/renderers/common/Attributes.d.ts +1 -1
- three/src/renderers/common/Bindings.d.ts +12 -0
- three/src/renderers/common/CanvasTarget.d.ts +142 -0
- three/src/renderers/common/Geometries.d.ts +1 -0
- three/src/renderers/common/InspectorBase.d.ts +105 -0
- three/src/renderers/common/PostProcessing.d.ts +3 -0
- three/src/renderers/common/QuadMesh.d.ts +3 -0
- three/src/renderers/common/RenderContexts.d.ts +3 -1
- three/src/renderers/common/Renderer.d.ts +125 -37
- three/src/renderers/common/SampledTexture.d.ts +2 -0
- three/src/renderers/common/Sampler.d.ts +2 -0
- three/src/renderers/common/Textures.d.ts +21 -1
- three/src/renderers/common/TimestampQueryPool.d.ts +26 -4
- three/src/renderers/common/XRManager.d.ts +10 -0
- three/src/renderers/common/extras/PMREMGenerator.d.ts +19 -1
- three/src/renderers/common/nodes/NodeLibrary.d.ts +8 -12
- three/src/renderers/common/nodes/Nodes.d.ts +13 -14
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +6 -1
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/CanvasTexture.d.ts +3 -3
- three/src/textures/CompressedArrayTexture.d.ts +6 -9
- three/src/textures/CompressedCubeTexture.d.ts +3 -3
- three/src/textures/CompressedTexture.d.ts +10 -12
- three/src/textures/CubeTexture.d.ts +4 -11
- three/src/textures/Data3DTexture.d.ts +7 -11
- three/src/textures/DataArrayTexture.d.ts +10 -10
- three/src/textures/DataTexture.d.ts +6 -12
- three/src/textures/DepthTexture.d.ts +7 -8
- three/src/textures/ExternalTexture.d.ts +5 -3
- three/src/textures/FramebufferTexture.d.ts +6 -1
- three/src/textures/Source.d.ts +3 -3
- three/src/textures/Texture.d.ts +9 -9
- three/src/textures/VideoFrameTexture.d.ts +1 -1
- three/src/textures/VideoTexture.d.ts +2 -2
- three/src/utils.d.ts +18 -2
- three/examples/jsm/loaders/RGBMLoader.d.ts +0 -37
- three/src/nodes/core/CacheNode.d.ts +0 -21
|
@@ -1,14 +1,13 @@
|
|
|
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 { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
4
|
|
|
6
5
|
export default class TextureNode extends UniformNode<Texture> {
|
|
7
6
|
readonly isTextureNode: true;
|
|
8
7
|
|
|
9
|
-
uvNode:
|
|
10
|
-
levelNode:
|
|
11
|
-
biasNode:
|
|
8
|
+
uvNode: Node | null;
|
|
9
|
+
levelNode: Node | null;
|
|
10
|
+
biasNode: Node | null;
|
|
12
11
|
compareNode: Node | null;
|
|
13
12
|
depthNode: Node | null;
|
|
14
13
|
gradNode: Node | null;
|
|
@@ -20,9 +19,9 @@ export default class TextureNode extends UniformNode<Texture> {
|
|
|
20
19
|
|
|
21
20
|
constructor(
|
|
22
21
|
value?: Texture,
|
|
23
|
-
uvNode?:
|
|
24
|
-
levelNode?:
|
|
25
|
-
biasNode?:
|
|
22
|
+
uvNode?: Node | null,
|
|
23
|
+
levelNode?: Node | null,
|
|
24
|
+
biasNode?: Node | null,
|
|
26
25
|
);
|
|
27
26
|
|
|
28
27
|
getDefaultUV(): Node;
|
|
@@ -34,47 +33,55 @@ export default class TextureNode extends UniformNode<Texture> {
|
|
|
34
33
|
/**
|
|
35
34
|
* @deprecated
|
|
36
35
|
*/
|
|
37
|
-
uv(uvNode: Node):
|
|
36
|
+
uv(uvNode: Node): Node;
|
|
38
37
|
|
|
39
|
-
sample(uvNode: Node):
|
|
38
|
+
sample(uvNode: Node): Node;
|
|
40
39
|
|
|
41
|
-
load(uvNode: Node):
|
|
40
|
+
load(uvNode: Node): Node;
|
|
42
41
|
|
|
43
|
-
blur(amountNode: Node):
|
|
42
|
+
blur(amountNode: Node): Node;
|
|
44
43
|
|
|
45
|
-
level(levelNode: Node):
|
|
44
|
+
level(levelNode: Node): Node;
|
|
46
45
|
|
|
47
|
-
size(levelNode: Node):
|
|
46
|
+
size(levelNode: Node): Node;
|
|
48
47
|
|
|
49
|
-
bias(biasNode: Node):
|
|
48
|
+
bias(biasNode: Node): Node;
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
getBase(): TextureNode;
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
compare(compareNode: Node): Node;
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
grad(gradeNodeX: Node, gradeNodeY: Node): Node;
|
|
55
|
+
|
|
56
|
+
depth(depthNode: Node): Node;
|
|
56
57
|
|
|
57
58
|
clone(): this;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
export const texture: (
|
|
61
|
-
value?: Texture,
|
|
62
|
+
value?: Texture | TextureNode,
|
|
62
63
|
uvNode?: Node | null,
|
|
63
64
|
levelNode?: Node | number | null,
|
|
64
65
|
biasNode?: Node | null,
|
|
65
|
-
) =>
|
|
66
|
+
) => TextureNode;
|
|
66
67
|
|
|
67
68
|
export const uniformTexture: (
|
|
68
69
|
value?: Texture,
|
|
69
|
-
) =>
|
|
70
|
+
) => TextureNode;
|
|
70
71
|
|
|
71
72
|
export const textureLoad: (
|
|
72
|
-
value?: Texture,
|
|
73
|
+
value?: Texture | TextureNode,
|
|
73
74
|
uvNode?: Node,
|
|
74
75
|
levelNode?: Node | number,
|
|
75
76
|
biasNode?: Node,
|
|
76
|
-
) =>
|
|
77
|
+
) => TextureNode;
|
|
78
|
+
|
|
79
|
+
export const textureLevel: (
|
|
80
|
+
value: Texture | TextureNode,
|
|
81
|
+
uv: Node,
|
|
82
|
+
level: Node,
|
|
83
|
+
) => TextureNode;
|
|
77
84
|
|
|
78
|
-
export const sampler: (value: Texture | TextureNode) =>
|
|
85
|
+
export const sampler: (value: Texture | TextureNode) => Node;
|
|
79
86
|
|
|
80
|
-
export const samplerComparison: (value: Texture | TextureNode) =>
|
|
87
|
+
export const samplerComparison: (value: Texture | TextureNode) => Node;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
3
|
declare class TextureSizeNode extends Node {
|
|
5
4
|
readonly isTextureSizeNode: true;
|
|
@@ -15,4 +14,4 @@ export default TextureSizeNode;
|
|
|
15
14
|
export const textureSize: (
|
|
16
15
|
textureNode: Node,
|
|
17
16
|
levelNode?: Node | null,
|
|
18
|
-
) =>
|
|
17
|
+
) => TextureSizeNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
import ArrayElementNode from "../utils/ArrayElementNode.js";
|
|
4
3
|
import BufferNode from "./BufferNode.js";
|
|
5
4
|
|
|
@@ -18,9 +17,9 @@ declare class UniformArrayNode extends BufferNode<unknown[]> {
|
|
|
18
17
|
|
|
19
18
|
getPaddedType(): string;
|
|
20
19
|
|
|
21
|
-
element(indexNode: Node)
|
|
20
|
+
element: (indexNode: Node) => UniformArrayElementNode;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export default UniformArrayNode;
|
|
25
24
|
|
|
26
|
-
export const uniformArray: (values: unknown[], nodeType?: string | null) =>
|
|
25
|
+
export const uniformArray: (values: unknown[], nodeType?: string | null) => UniformArrayNode;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
1
|
import ReferenceNode from "./ReferenceNode.js";
|
|
3
2
|
|
|
4
3
|
export type NodeUserData = Record<string, any>;
|
|
@@ -12,4 +11,4 @@ export const userData: (
|
|
|
12
11
|
name: string,
|
|
13
12
|
inputType: string,
|
|
14
13
|
userData?: NodeUserData,
|
|
15
|
-
) =>
|
|
14
|
+
) => UserDataNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Matrix4 } from "../../math/Matrix4.js";
|
|
2
2
|
import TempNode from "../core/TempNode.js";
|
|
3
3
|
import UniformNode from "../core/UniformNode.js";
|
|
4
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
4
|
|
|
6
5
|
declare class VelocityNode extends TempNode {
|
|
7
6
|
projectionMatrix: Matrix4 | null;
|
|
@@ -17,4 +16,4 @@ declare class VelocityNode extends TempNode {
|
|
|
17
16
|
|
|
18
17
|
export default VelocityNode;
|
|
19
18
|
|
|
20
|
-
export const velocity:
|
|
19
|
+
export const velocity: VelocityNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import AttributeNode from "../core/AttributeNode.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
3
|
export default class VertexColorNode extends AttributeNode {
|
|
5
4
|
readonly isVertexColorNode: true;
|
|
@@ -9,4 +8,4 @@ export default class VertexColorNode extends AttributeNode {
|
|
|
9
8
|
constructor(index: number);
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
export const vertexColor: (index?: number) =>
|
|
11
|
+
export const vertexColor: (index?: number) => VertexColorNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
|
|
5
4
|
export interface CodeNodeInclude {
|
|
6
5
|
build(builder: NodeBuilder): void;
|
|
@@ -17,7 +16,7 @@ export default class CodeNode extends Node {
|
|
|
17
16
|
getIncludes(builder: NodeBuilder): CodeNodeInclude[];
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
export const code: (code: string, includes?: CodeNodeInclude[], language?: string) =>
|
|
21
|
-
export const js: (src: string, includes?: CodeNodeInclude[]) =>
|
|
22
|
-
export const wgsl: (src: string, includes?: CodeNodeInclude[]) =>
|
|
23
|
-
export const glsl: (src: string, includes?: CodeNodeInclude[]) =>
|
|
19
|
+
export const code: (code: string, includes?: CodeNodeInclude[], language?: string) => CodeNode;
|
|
20
|
+
export const js: (src: string, includes?: CodeNodeInclude[]) => CodeNode;
|
|
21
|
+
export const wgsl: (src: string, includes?: CodeNodeInclude[]) => CodeNode;
|
|
22
|
+
export const glsl: (src: string, includes?: CodeNodeInclude[]) => CodeNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import TempNode from "../core/TempNode.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
3
|
export default class ExpressionNode extends TempNode {
|
|
5
4
|
snipped: string;
|
|
@@ -7,4 +6,4 @@ export default class ExpressionNode extends TempNode {
|
|
|
7
6
|
constructor(snipped?: string, nodeType?: string);
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
export const expression: (snipped: string, nodeType?: string) =>
|
|
9
|
+
export const expression: (snipped: string, nodeType?: string) => ExpressionNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import TempNode from "../core/TempNode.js";
|
|
3
|
-
import { ProxiedObject
|
|
3
|
+
import { ProxiedObject } from "../tsl/TSLCore.js";
|
|
4
4
|
import FunctionNode, { FunctionNodeArguments } from "./FunctionNode.js";
|
|
5
5
|
|
|
6
6
|
export default class FunctionCallNode<P extends Array<Node | number> | { [name: string]: Node | number }>
|
|
@@ -18,10 +18,11 @@ export default class FunctionCallNode<P extends Array<Node | number> | { [name:
|
|
|
18
18
|
export const call: <P extends FunctionNodeArguments>(
|
|
19
19
|
functionNode?: FunctionNode<P>,
|
|
20
20
|
parameters?: ProxiedObject<P>,
|
|
21
|
-
) =>
|
|
21
|
+
) => FunctionCallNode<P>;
|
|
22
22
|
|
|
23
|
-
declare module "../
|
|
24
|
-
interface
|
|
25
|
-
call:
|
|
23
|
+
declare module "../Nodes.js" {
|
|
24
|
+
interface FunctionNode<P extends FunctionNodeArguments> {
|
|
25
|
+
call: (parameters?: ProxiedObject<P>) => FunctionCallNode<P>;
|
|
26
|
+
callAssign: (parameters?: ProxiedObject<P>) => this;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -2,9 +2,8 @@ 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
|
|
5
|
+
import { ProxiedObject, ProxiedTuple } from "../tsl/TSLCore.js";
|
|
6
6
|
import CodeNode, { CodeNodeInclude } from "./CodeNode.js";
|
|
7
|
-
import FunctionCallNode from "./FunctionCallNode.js";
|
|
8
7
|
|
|
9
8
|
export type FunctionNodeArguments = Array<Node | number> | { [name: string]: Node | number };
|
|
10
9
|
|
|
@@ -13,7 +12,6 @@ export default class FunctionNode<P extends Array<Node | number> | { [name: stri
|
|
|
13
12
|
|
|
14
13
|
getInputs(builder: NodeBuilder): NodeFunctionInput[];
|
|
15
14
|
getNodeFunction(builder: NodeBuilder): NodeFunction;
|
|
16
|
-
call(parameters: P): FunctionCallNode<P>;
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
type FnParameters<P extends FunctionNodeArguments> = P extends readonly [...unknown[]] ? ProxiedTuple<P>
|
|
@@ -24,15 +22,15 @@ export const nativeFn: <P extends FunctionNodeArguments>(
|
|
|
24
22
|
includes?: CodeNodeInclude[],
|
|
25
23
|
language?: string,
|
|
26
24
|
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
27
|
-
) => (...params: FnParameters<P>) =>
|
|
25
|
+
) => (...params: FnParameters<P>) => Node;
|
|
28
26
|
|
|
29
27
|
export const glslFn: <P extends FunctionNodeArguments>(
|
|
30
28
|
code: string,
|
|
31
29
|
includes?: CodeNodeInclude[],
|
|
32
30
|
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
33
|
-
) => (...params: FnParameters<P>) =>
|
|
31
|
+
) => (...params: FnParameters<P>) => Node;
|
|
34
32
|
export const wgslFn: <P extends FunctionNodeArguments>(
|
|
35
33
|
code: string,
|
|
36
34
|
includes?: CodeNodeInclude[],
|
|
37
35
|
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
38
|
-
) => (...params: FnParameters<P>) =>
|
|
36
|
+
) => (...params: FnParameters<P>) => Node;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
3
|
declare class Resources extends Map<string, unknown> {
|
|
5
4
|
get<TArgs extends unknown[]>(key: string, callback?: ((...args: TArgs) => void) | null, ...params: TArgs): unknown;
|
|
@@ -19,4 +18,4 @@ export default ScriptableNode;
|
|
|
19
18
|
export const scriptable: (
|
|
20
19
|
codeNode: Node,
|
|
21
20
|
parameters?: Record<string, unknown>,
|
|
22
|
-
) =>
|
|
21
|
+
) => ScriptableNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
3
|
declare class ScriptableValueNode extends Node {
|
|
5
4
|
constructor(value: unknown);
|
|
@@ -7,4 +6,4 @@ declare class ScriptableValueNode extends Node {
|
|
|
7
6
|
|
|
8
7
|
export default ScriptableValueNode;
|
|
9
8
|
|
|
10
|
-
export const scriptableValue: (value: unknown) =>
|
|
9
|
+
export const scriptableValue: (value: unknown) => ScriptableValueNode;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
1
|
import Node from "./Node.js";
|
|
3
2
|
import TempNode from "./TempNode.js";
|
|
4
3
|
|
|
@@ -13,14 +12,15 @@ declare class ArrayNode extends TempNode {
|
|
|
13
12
|
export default ArrayNode;
|
|
14
13
|
|
|
15
14
|
interface ArrayFunction {
|
|
16
|
-
(values: Node[]):
|
|
17
|
-
(nodeType: string, count: number):
|
|
15
|
+
(values: Node[]): ArrayNode;
|
|
16
|
+
(nodeType: string, count: number): ArrayNode;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
export const array: ArrayFunction;
|
|
21
20
|
|
|
22
|
-
declare module "../
|
|
23
|
-
interface
|
|
24
|
-
toArray:
|
|
21
|
+
declare module "../Nodes.js" {
|
|
22
|
+
interface Node {
|
|
23
|
+
toArray: (count: number) => ArrayNode;
|
|
24
|
+
toArrayAssign: (count: number) => this;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
1
|
import Node from "./Node.js";
|
|
3
2
|
import NodeBuilder from "./NodeBuilder.js";
|
|
4
3
|
import TempNode from "./TempNode.js";
|
|
@@ -13,10 +12,4 @@ declare class AssignNode extends TempNode {
|
|
|
13
12
|
|
|
14
13
|
export default AssignNode;
|
|
15
14
|
|
|
16
|
-
export const assign: (targetNode: Node, sourceNode: Node | number) =>
|
|
17
|
-
|
|
18
|
-
declare module "../tsl/TSLCore.js" {
|
|
19
|
-
interface NodeElements {
|
|
20
|
-
assign: typeof assign;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
15
|
+
export const assign: (targetNode: Node, sourceNode: Node | number) => AssignNode;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
1
|
import Node from "./Node.js";
|
|
3
2
|
import NodeBuilder from "./NodeBuilder.js";
|
|
4
3
|
|
|
@@ -13,4 +12,4 @@ export default class AttributeNode extends Node {
|
|
|
13
12
|
export const attribute: (
|
|
14
13
|
name: string,
|
|
15
14
|
nodeType?: string | null,
|
|
16
|
-
) =>
|
|
15
|
+
) => AttributeNode;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
1
|
import Node from "./Node.js";
|
|
3
2
|
|
|
4
3
|
export default class BypassNode extends Node {
|
|
@@ -9,10 +8,11 @@ export default class BypassNode extends Node {
|
|
|
9
8
|
constructor(returnNode: Node, callNode: Node);
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
export const bypass: (returnNode: Node, callNode: Node) =>
|
|
11
|
+
export const bypass: (returnNode: Node, callNode: Node) => BypassNode;
|
|
13
12
|
|
|
14
|
-
declare module "../
|
|
15
|
-
interface
|
|
16
|
-
bypass:
|
|
13
|
+
declare module "../Nodes.js" {
|
|
14
|
+
interface Node {
|
|
15
|
+
bypass: (callNode: Node) => BypassNode;
|
|
16
|
+
bypassAssign: (callNode: Node) => this;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
1
|
import Node from "./Node.js";
|
|
3
2
|
import { NodeBuilderContext } from "./NodeBuilder.js";
|
|
4
3
|
|
|
@@ -13,18 +12,35 @@ declare class ContextNode extends Node {
|
|
|
13
12
|
|
|
14
13
|
export default ContextNode;
|
|
15
14
|
|
|
16
|
-
export const context: (node: Node, context?: NodeBuilderContext) =>
|
|
17
|
-
|
|
15
|
+
export const context: (node: Node, context?: NodeBuilderContext) => ContextNode;
|
|
16
|
+
|
|
17
|
+
export const uniformFlow: (node: Node) => ContextNode;
|
|
18
|
+
|
|
19
|
+
export const setName: (node: Node, label: string) => Node;
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* @deprecated "label()" has been deprecated. Use "setName()" instead.
|
|
21
23
|
*/
|
|
22
|
-
export function label(node: Node, label: string):
|
|
24
|
+
export function label(node: Node, label: string): Node;
|
|
25
|
+
|
|
26
|
+
declare module "../Nodes.js" {
|
|
27
|
+
interface Node {
|
|
28
|
+
context: (context?: NodeBuilderContext) => ContextNode;
|
|
29
|
+
contextAssign: (context?: NodeBuilderContext) => this;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated "label()" has been deprecated. Use "setName()" instead.
|
|
33
|
+
*/
|
|
34
|
+
label: (label: string) => Node;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated "label()" has been deprecated. Use "setName()" instead.
|
|
37
|
+
*/
|
|
38
|
+
labelAssign: (label: string) => this;
|
|
39
|
+
|
|
40
|
+
uniformFlow: () => ContextNode;
|
|
41
|
+
uniformFlowAssign: () => this;
|
|
23
42
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
context: typeof context;
|
|
27
|
-
label: typeof label;
|
|
28
|
-
setName: typeof setName;
|
|
43
|
+
setName: (label: string) => Node;
|
|
44
|
+
setNameAssign: (label: string) => this;
|
|
29
45
|
}
|
|
30
46
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
1
|
import Node from "./Node.js";
|
|
3
2
|
|
|
4
3
|
export type IndexNodeScope =
|
|
5
4
|
| typeof IndexNode.VERTEX
|
|
6
5
|
| typeof IndexNode.INSTANCE
|
|
6
|
+
| typeof IndexNode.SUBGROUP
|
|
7
7
|
| typeof IndexNode.INVOCATION_LOCAL
|
|
8
|
+
| typeof IndexNode.INVOCATION_SUBGROUP
|
|
8
9
|
| typeof IndexNode.DRAW;
|
|
9
10
|
|
|
10
11
|
declare class IndexNode extends Node {
|
|
@@ -16,15 +17,17 @@ declare class IndexNode extends Node {
|
|
|
16
17
|
|
|
17
18
|
static VERTEX: "vertex";
|
|
18
19
|
static INSTANCE: "instance";
|
|
20
|
+
static SUBGROUP: "subgroup";
|
|
19
21
|
static INVOCATION_LOCAL: "invocationLocal";
|
|
22
|
+
static INVOCATION_SUBGROUP: "invocationSubgroup";
|
|
20
23
|
static DRAW: "draw";
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export default IndexNode;
|
|
24
27
|
|
|
25
|
-
export const vertexIndex:
|
|
26
|
-
export const instanceIndex:
|
|
27
|
-
export const subgroupIndex:
|
|
28
|
-
export const invocationSubgroupIndex:
|
|
29
|
-
export const invocationLocalIndex:
|
|
30
|
-
export const drawIndex:
|
|
28
|
+
export const vertexIndex: IndexNode;
|
|
29
|
+
export const instanceIndex: IndexNode;
|
|
30
|
+
export const subgroupIndex: IndexNode;
|
|
31
|
+
export const invocationSubgroupIndex: IndexNode;
|
|
32
|
+
export const invocationLocalIndex: IndexNode;
|
|
33
|
+
export const drawIndex: IndexNode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Node from "./Node.js";
|
|
2
|
+
|
|
3
|
+
declare class InspectorNode extends Node {
|
|
4
|
+
constructor(node: Node, name?: string, callback?: (node: Node) => Node);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default InspectorNode;
|
|
8
|
+
|
|
9
|
+
export function inspector<T extends Node>(node: T, name?: string, callback?: (node: T) => Node): T;
|
|
10
|
+
|
|
11
|
+
declare module "../Nodes.js" {
|
|
12
|
+
interface Node {
|
|
13
|
+
toInspector: (name?: string, callback?: (node: this) => Node) => this;
|
|
14
|
+
toInspectorAssign: (name?: string, callback?: (node: this) => Node) => this;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Node from "./Node.js";
|
|
2
|
+
import NodeCache from "./NodeCache.js";
|
|
3
|
+
|
|
4
|
+
declare class IsolateNode extends Node {
|
|
5
|
+
node: Node;
|
|
6
|
+
parent: boolean;
|
|
7
|
+
|
|
8
|
+
readonly isIsolateNode: true;
|
|
9
|
+
|
|
10
|
+
constructor(node: Node, parent?: boolean);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default IsolateNode;
|
|
14
|
+
|
|
15
|
+
export const isolate: (node: Node) => IsolateNode;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated "cache()" has been deprecated. Use "isolate()" instead.
|
|
19
|
+
*/
|
|
20
|
+
export const cache: (node: Node, cache?: NodeCache) => IsolateNode;
|
|
21
|
+
|
|
22
|
+
declare module "../Nodes.js" {
|
|
23
|
+
interface Node {
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated "cache()" has been deprecated. Use "isolate()" instead.
|
|
26
|
+
*/
|
|
27
|
+
cache: (cache?: NodeCache) => IsolateNode;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated "cache()" has been deprecated. Use "isolate()" instead.
|
|
30
|
+
*/
|
|
31
|
+
cacheAssign: (cache?: NodeCache) => this;
|
|
32
|
+
|
|
33
|
+
isolate: () => IsolateNode;
|
|
34
|
+
isolateAssign: () => this;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Texture } from "../../textures/Texture.js";
|
|
2
2
|
import { Node } from "../Nodes.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
import OutputStructNode from "./OutputStructNode.js";
|
|
5
4
|
|
|
6
5
|
export function getTextureIndex(textures: ReadonlyArray<Texture>, name: string): number;
|
|
@@ -14,11 +13,11 @@ declare class MRTNode extends OutputStructNode {
|
|
|
14
13
|
|
|
15
14
|
has(name: string): boolean;
|
|
16
15
|
|
|
17
|
-
get(name: string)
|
|
16
|
+
get: (name: string) => Node;
|
|
18
17
|
|
|
19
|
-
merge(mrtNode: MRTNode):
|
|
18
|
+
merge(mrtNode: MRTNode): MRTNode;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
export default MRTNode;
|
|
23
22
|
|
|
24
|
-
export const mrt: (outputNodes: { [name: string]: Node }) =>
|
|
23
|
+
export const mrt: (outputNodes: { [name: string]: Node }) => MRTNode;
|
three/src/nodes/core/Node.d.ts
CHANGED
|
@@ -57,6 +57,11 @@ interface NodeJSONOutputData {
|
|
|
57
57
|
images?: unknown[];
|
|
58
58
|
nodes?: NodeJSONOutputData[];
|
|
59
59
|
}
|
|
60
|
+
export interface NodeChild {
|
|
61
|
+
property: string;
|
|
62
|
+
index?: number | string;
|
|
63
|
+
childNode: Node;
|
|
64
|
+
}
|
|
60
65
|
/**
|
|
61
66
|
* Base class for all nodes.
|
|
62
67
|
*
|
|
@@ -72,6 +77,7 @@ declare class Node extends EventDispatcher<{
|
|
|
72
77
|
updateAfterType: NodeUpdateType;
|
|
73
78
|
uuid: string;
|
|
74
79
|
version: number;
|
|
80
|
+
name: string | null;
|
|
75
81
|
_cacheKey: number | null;
|
|
76
82
|
_cacheKeyVersion: number;
|
|
77
83
|
global: boolean;
|
|
@@ -139,13 +145,6 @@ declare class Node extends EventDispatcher<{
|
|
|
139
145
|
* @return {Node} A reference to this node.
|
|
140
146
|
*/
|
|
141
147
|
onReference(callback: (this: this, frame: NodeBuilder | NodeFrame) => unknown): this;
|
|
142
|
-
/**
|
|
143
|
-
* The `this` reference might point to a Proxy so this method can be used
|
|
144
|
-
* to get the reference to the actual node instance.
|
|
145
|
-
*
|
|
146
|
-
* @return {Node} A reference to the node.
|
|
147
|
-
*/
|
|
148
|
-
getSelf(): this;
|
|
149
148
|
/**
|
|
150
149
|
* Nodes might refer to other objects like materials. This method allows to dynamically update the reference
|
|
151
150
|
* to such objects based on a given state (e.g. the current node frame or builder).
|
|
@@ -187,13 +186,22 @@ declare class Node extends EventDispatcher<{
|
|
|
187
186
|
* @param {traverseCallback} callback - A callback that is executed per node.
|
|
188
187
|
*/
|
|
189
188
|
traverse(callback: (node: Node) => void): void;
|
|
189
|
+
/**
|
|
190
|
+
* Returns the child nodes of this node.
|
|
191
|
+
*
|
|
192
|
+
* @private
|
|
193
|
+
* @param {Set<Node>} [ignores=new Set()] - A set of nodes to ignore during the search to avoid circular references.
|
|
194
|
+
* @returns {Array<Object>} An array of objects describing the child nodes.
|
|
195
|
+
*/
|
|
196
|
+
_getChildren(ignores?: Set<Node>): NodeChild[];
|
|
190
197
|
/**
|
|
191
198
|
* Returns the cache key for this node.
|
|
192
199
|
*
|
|
193
200
|
* @param {boolean} [force=false] - When set to `true`, a recomputation of the cache key is forced.
|
|
201
|
+
* @param {Set<Node>} [ignores=null] - A set of nodes to ignore during the computation of the cache key.
|
|
194
202
|
* @return {number} The cache key of the node.
|
|
195
203
|
*/
|
|
196
|
-
getCacheKey(force?: boolean): number;
|
|
204
|
+
getCacheKey(force?: boolean, ignores?: Set<Node> | null): number;
|
|
197
205
|
/**
|
|
198
206
|
* Generate a custom cache key for this node.
|
|
199
207
|
*
|
|
@@ -296,7 +304,7 @@ declare class Node extends EventDispatcher<{
|
|
|
296
304
|
* This state builds the output node and returns the resulting shader string.
|
|
297
305
|
*
|
|
298
306
|
* @param {NodeBuilder} builder - The current node builder.
|
|
299
|
-
* @param {?string} output - Can be used to define the output type.
|
|
307
|
+
* @param {?string} [output] - Can be used to define the output type.
|
|
300
308
|
* @return {?string} The generated shader string.
|
|
301
309
|
*/
|
|
302
310
|
generate(builder: NodeBuilder, output?: string | null): string | null | undefined;
|
|
@@ -327,6 +335,7 @@ declare class Node extends EventDispatcher<{
|
|
|
327
335
|
* @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching).
|
|
328
336
|
*/
|
|
329
337
|
update(frame: NodeFrame): void;
|
|
338
|
+
before(node: Node): this;
|
|
330
339
|
/**
|
|
331
340
|
* This method performs the build of a node. The behavior and return value depend on the current build stage:
|
|
332
341
|
* - **setup**: Prepares the node and its children for the build process. This process can also create new nodes. Returns the node itself or a variant.
|
|
@@ -334,16 +343,16 @@ declare class Node extends EventDispatcher<{
|
|
|
334
343
|
* - **generate**: Generates the shader code for the node. Returns the generated shader string.
|
|
335
344
|
*
|
|
336
345
|
* @param {NodeBuilder} builder - The current node builder.
|
|
337
|
-
* @param {string|Node
|
|
338
|
-
* @return {Node|string
|
|
346
|
+
* @param {?(string|Node)} [output=null] - Can be used to define the output type.
|
|
347
|
+
* @return {?(Node|string)} The result of the build process, depending on the build stage.
|
|
339
348
|
*/
|
|
340
349
|
build(builder: NodeBuilder, output?: string | Node | null): Node | string | null;
|
|
341
350
|
/**
|
|
342
351
|
* Returns the child nodes as a JSON object.
|
|
343
352
|
*
|
|
344
|
-
* @return {
|
|
353
|
+
* @return {Generator<Object>} An iterable list of serialized child objects as JSON.
|
|
345
354
|
*/
|
|
346
|
-
getSerializeChildren():
|
|
355
|
+
getSerializeChildren(): NodeChild[];
|
|
347
356
|
/**
|
|
348
357
|
* Serializes the node to JSON.
|
|
349
358
|
*
|
|
@@ -6,20 +6,10 @@ import { Vector3 } from "../../math/Vector3.js";
|
|
|
6
6
|
import { Vector4 } from "../../math/Vector4.js";
|
|
7
7
|
import Node from "./Node.js";
|
|
8
8
|
|
|
9
|
-
export interface NodeChild {
|
|
10
|
-
property: string;
|
|
11
|
-
index?: number | string;
|
|
12
|
-
childNode: Node;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
export const hashString: (str: string) => number;
|
|
16
10
|
export const hashArray: (array: number[]) => number;
|
|
17
11
|
export const hash: (...params: number[]) => number;
|
|
18
12
|
|
|
19
|
-
export function getCacheKey(object: Node, force?: boolean): number;
|
|
20
|
-
|
|
21
|
-
export function getNodeChildren(object: Node): Generator<NodeChild, void>;
|
|
22
|
-
|
|
23
13
|
export function getTypeFromLength(length: number): string | undefined;
|
|
24
14
|
|
|
25
15
|
export function getLengthFromType(type: string): number | undefined;
|