@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
three/src/nodes/tsl/TSLCore.d.ts
CHANGED
|
@@ -11,38 +11,15 @@ import NodeBuilder from "../core/NodeBuilder.js";
|
|
|
11
11
|
import StackNode from "../core/StackNode.js";
|
|
12
12
|
import JoinNode from "../utils/JoinNode.js";
|
|
13
13
|
|
|
14
|
-
export interface NodeElements {
|
|
15
|
-
toStack: typeof Stack;
|
|
16
|
-
|
|
17
|
-
toColor: (node: Node) => ShaderNodeObject<Node>;
|
|
18
|
-
toFloat: (node: Node) => ShaderNodeObject<Node>;
|
|
19
|
-
toInt: (node: Node) => ShaderNodeObject<Node>;
|
|
20
|
-
toUint: (node: Node) => ShaderNodeObject<Node>;
|
|
21
|
-
toBool: (node: Node) => ShaderNodeObject<Node>;
|
|
22
|
-
toVec2: (node: Node) => ShaderNodeObject<Node>;
|
|
23
|
-
toIvec2: (node: Node) => ShaderNodeObject<Node>;
|
|
24
|
-
toUvec2: (node: Node) => ShaderNodeObject<Node>;
|
|
25
|
-
toBvec2: (node: Node) => ShaderNodeObject<Node>;
|
|
26
|
-
toVec3: (node: Node) => ShaderNodeObject<Node>;
|
|
27
|
-
toIvec3: (node: Node) => ShaderNodeObject<Node>;
|
|
28
|
-
toUvec3: (node: Node) => ShaderNodeObject<Node>;
|
|
29
|
-
toBvec3: (node: Node) => ShaderNodeObject<Node>;
|
|
30
|
-
toVec4: (node: Node) => ShaderNodeObject<Node>;
|
|
31
|
-
toIvec4: (node: Node) => ShaderNodeObject<Node>;
|
|
32
|
-
toUvec4: (node: Node) => ShaderNodeObject<Node>;
|
|
33
|
-
toBvec4: (node: Node) => ShaderNodeObject<Node>;
|
|
34
|
-
toMat2: (node: Node) => ShaderNodeObject<Node>;
|
|
35
|
-
toMat3: (node: Node) => ShaderNodeObject<Node>;
|
|
36
|
-
toMat4: (node: Node) => ShaderNodeObject<Node>;
|
|
37
|
-
|
|
38
|
-
element: typeof element;
|
|
39
|
-
convert: typeof convert;
|
|
40
|
-
|
|
41
|
-
append: typeof append;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
14
|
export function addMethodChaining(name: string, nodeElement: unknown): void;
|
|
45
15
|
|
|
16
|
+
declare module "../Nodes.js" {
|
|
17
|
+
interface Node {
|
|
18
|
+
assign: (sourceNode: Node | number) => this;
|
|
19
|
+
get: (value: string) => Node;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
46
23
|
type XYZWCharacter = "x" | "y" | "z" | "w";
|
|
47
24
|
type RGBACharacter = "r" | "g" | "b" | "a";
|
|
48
25
|
type STPQCharacter = "s" | "t" | "p" | "q";
|
|
@@ -67,42 +44,65 @@ type STPQSwizzle =
|
|
|
67
44
|
|
|
68
45
|
export type SwizzleOption = XYZWSwizzle | RGBASwizzle | STPQSwizzle;
|
|
69
46
|
|
|
70
|
-
export type
|
|
71
|
-
|
|
47
|
+
export type ArrayElementIndex =
|
|
48
|
+
| 0
|
|
49
|
+
| 1
|
|
50
|
+
| 2
|
|
51
|
+
| 3
|
|
52
|
+
| 4
|
|
53
|
+
| 5
|
|
54
|
+
| 6
|
|
55
|
+
| 7
|
|
56
|
+
| 8
|
|
57
|
+
| 9
|
|
58
|
+
| 10
|
|
59
|
+
| 11
|
|
60
|
+
| 12
|
|
61
|
+
| 13
|
|
62
|
+
| 14
|
|
63
|
+
| 15
|
|
64
|
+
| 16
|
|
65
|
+
| 17
|
|
66
|
+
| 18
|
|
67
|
+
| 19
|
|
68
|
+
| 20
|
|
69
|
+
| 21
|
|
70
|
+
| 22
|
|
71
|
+
| 23
|
|
72
|
+
| 24
|
|
73
|
+
| 25
|
|
74
|
+
| 26
|
|
75
|
+
| 27
|
|
76
|
+
| 28
|
|
77
|
+
| 29
|
|
78
|
+
| 30
|
|
79
|
+
| 31;
|
|
80
|
+
|
|
81
|
+
export type Swizzable =
|
|
72
82
|
& {
|
|
73
|
-
[Key in SwizzleOption |
|
|
83
|
+
[Key in SwizzleOption | ArrayElementIndex]: Node;
|
|
74
84
|
}
|
|
75
85
|
& {
|
|
76
|
-
[Key in SwizzleOption as `set${Uppercase<Key>}`]: (value: Node) =>
|
|
86
|
+
[Key in SwizzleOption as `set${Uppercase<Key>}`]: (value: Node) => Node;
|
|
77
87
|
}
|
|
78
88
|
& {
|
|
79
|
-
[Key in SwizzleOption as `flip${Uppercase<Key>}`]: () =>
|
|
89
|
+
[Key in SwizzleOption as `flip${Uppercase<Key>}`]: () => Node;
|
|
80
90
|
};
|
|
81
91
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
& {
|
|
85
|
-
[Key in keyof NodeElements]: T extends { [K in Key]: infer M } ? M
|
|
86
|
-
: NodeElements[Key] extends (node: T, ...args: infer Args) => infer R ? (...args: Args) => R
|
|
87
|
-
: never;
|
|
92
|
+
declare module "../Nodes.js" {
|
|
93
|
+
interface Node extends Swizzable {
|
|
88
94
|
}
|
|
89
|
-
|
|
90
|
-
[Key in keyof NodeElements as `${Key}Assign`]: T extends { [K in Key]: infer M } ? M
|
|
91
|
-
: NodeElements[Key] extends (node: T, ...args: infer Args) => unknown
|
|
92
|
-
? (...args: Args) => ShaderNodeObject<T>
|
|
93
|
-
: never;
|
|
94
|
-
}
|
|
95
|
-
& Swizzable<T>;
|
|
95
|
+
}
|
|
96
96
|
|
|
97
97
|
/** anything that can be passed to {@link nodeObject} */
|
|
98
98
|
export type NodeObjectOption = Node | number | string;
|
|
99
99
|
|
|
100
|
-
// same logic as in ShaderNodeObject: number,boolean,node->
|
|
101
|
-
export type NodeObject<T> = T extends Node ?
|
|
102
|
-
: T extends number | boolean ?
|
|
100
|
+
// same logic as in ShaderNodeObject: number,boolean,node->node, otherwise do nothing
|
|
101
|
+
export type NodeObject<T> = T extends Node ? T
|
|
102
|
+
: T extends number | boolean ? ConstNode<number | boolean>
|
|
103
103
|
: T;
|
|
104
104
|
|
|
105
|
-
// opposite of NodeObject: node -> node|
|
|
105
|
+
// opposite of NodeObject: node -> node|boolean|number, otherwise do nothing
|
|
106
106
|
type Proxied<T> = T extends Node | number ? Node | number : T;
|
|
107
107
|
// https://github.com/microsoft/TypeScript/issues/42435#issuecomment-765557874
|
|
108
108
|
export type ProxiedTuple<T extends readonly [...unknown[]]> = [...{ [index in keyof T]: Proxied<T[index]> }];
|
|
@@ -204,9 +204,9 @@ export const getConstNodeType: (value: NodeOrType) => string | null;
|
|
|
204
204
|
export class ShaderNode<T = {}, R extends Node = Node> {
|
|
205
205
|
constructor(jsFunc: (inputs: NodeObjects<T>, builder: NodeBuilder) => Node);
|
|
206
206
|
call: (
|
|
207
|
-
inputs: { [key in keyof T]: T[key] extends Node ?
|
|
207
|
+
inputs: { [key in keyof T]: T[key] extends Node ? Node : T[key] },
|
|
208
208
|
builder?: NodeBuilder,
|
|
209
|
-
) =>
|
|
209
|
+
) => R;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
export function nodeObject<T extends NodeObjectOption>(obj: T): NodeObject<T>;
|
|
@@ -217,38 +217,38 @@ export function nodeArray<T extends NodeObjectOption[]>(obj: readonly [...T]): N
|
|
|
217
217
|
|
|
218
218
|
export function nodeProxy<T>(
|
|
219
219
|
nodeClass: T,
|
|
220
|
-
): (...params: ProxiedTuple<GetConstructors<T>>) =>
|
|
220
|
+
): (...params: ProxiedTuple<GetConstructors<T>>) => ConstructedNode<T>;
|
|
221
221
|
|
|
222
222
|
export function nodeProxy<T, S extends GetPossibleScopes<T>>(
|
|
223
223
|
nodeClass: T,
|
|
224
224
|
scope: S,
|
|
225
|
-
): (...params: ProxiedTuple<RemoveTail<GetConstructorsByScope<T, S>>>) =>
|
|
225
|
+
): (...params: ProxiedTuple<RemoveTail<GetConstructorsByScope<T, S>>>) => ConstructedNode<T>;
|
|
226
226
|
|
|
227
227
|
export function nodeProxy<T, S extends GetPossibleScopes<T>>(
|
|
228
228
|
nodeClass: T,
|
|
229
229
|
scope: S,
|
|
230
230
|
factor: NodeObjectOption,
|
|
231
|
-
): (...params: ProxiedTuple<RemoveHeadAndTail<GetConstructorsByScope<T, S>>>) =>
|
|
231
|
+
): (...params: ProxiedTuple<RemoveHeadAndTail<GetConstructorsByScope<T, S>>>) => ConstructedNode<T>;
|
|
232
232
|
|
|
233
233
|
export function nodeImmutable<T>(
|
|
234
234
|
nodeClass: T,
|
|
235
235
|
...params: ProxiedTuple<GetConstructors<T>>
|
|
236
|
-
):
|
|
236
|
+
): ConstructedNode<T>;
|
|
237
237
|
|
|
238
238
|
export function nodeProxyIntent<T>(
|
|
239
239
|
nodeClass: T,
|
|
240
|
-
): (...params: ProxiedTuple<GetConstructors<T>>) =>
|
|
240
|
+
): (...params: ProxiedTuple<GetConstructors<T>>) => ConstructedNode<T>;
|
|
241
241
|
|
|
242
242
|
export function nodeProxyIntent<T, S extends GetPossibleScopes<T>>(
|
|
243
243
|
nodeClass: T,
|
|
244
244
|
scope: S,
|
|
245
|
-
): (...params: ProxiedTuple<RemoveTail<GetConstructorsByScope<T, S>>>) =>
|
|
245
|
+
): (...params: ProxiedTuple<RemoveTail<GetConstructorsByScope<T, S>>>) => ConstructedNode<T>;
|
|
246
246
|
|
|
247
247
|
export function nodeProxyIntent<T, S extends GetPossibleScopes<T>>(
|
|
248
248
|
nodeClass: T,
|
|
249
249
|
scope: S,
|
|
250
250
|
factor: NodeObjectOption,
|
|
251
|
-
): (...params: ProxiedTuple<RemoveHeadAndTail<GetConstructorsByScope<T, S>>>) =>
|
|
251
|
+
): (...params: ProxiedTuple<RemoveHeadAndTail<GetConstructorsByScope<T, S>>>) => ConstructedNode<T>;
|
|
252
252
|
|
|
253
253
|
interface Layout {
|
|
254
254
|
name: string;
|
|
@@ -260,10 +260,10 @@ interface Layout {
|
|
|
260
260
|
}[];
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
interface ShaderNodeFn<Args extends readonly unknown[]> {
|
|
264
|
-
(...args: Args):
|
|
263
|
+
export interface ShaderNodeFn<Args extends readonly unknown[]> {
|
|
264
|
+
(...args: Args): ShaderCallNodeInternal;
|
|
265
265
|
|
|
266
|
-
shaderNode:
|
|
266
|
+
shaderNode: ShaderNodeInternal;
|
|
267
267
|
id: number;
|
|
268
268
|
|
|
269
269
|
getNodeType: (builder: NodeBuilder) => string | null;
|
|
@@ -274,12 +274,14 @@ interface ShaderNodeFn<Args extends readonly unknown[]> {
|
|
|
274
274
|
once: (subBuilds?: string[] | null) => this;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
export function Fn(jsFunc: (builder: NodeBuilder) => void): ShaderNodeFn<[]>;
|
|
277
|
+
export function Fn(jsFunc: (builder: NodeBuilder) => void, layout?: string | Record<string, string>): ShaderNodeFn<[]>;
|
|
278
278
|
export function Fn<T extends readonly unknown[]>(
|
|
279
279
|
jsFunc: (args: T, builder: NodeBuilder) => void,
|
|
280
|
+
layout?: string | Record<string, string>,
|
|
280
281
|
): ShaderNodeFn<ProxiedTuple<T>>;
|
|
281
282
|
export function Fn<T extends { readonly [key: string]: unknown }>(
|
|
282
283
|
jsFunc: (args: T, builder: NodeBuilder) => void,
|
|
284
|
+
layout?: string | Record<string, string>,
|
|
283
285
|
): ShaderNodeFn<[ProxiedObject<T>]>;
|
|
284
286
|
|
|
285
287
|
export const setCurrentStack: (stack: StackNode | null) => void;
|
|
@@ -291,17 +293,24 @@ export const Switch: (expression: Node) => StackNode;
|
|
|
291
293
|
|
|
292
294
|
export function Stack(node: Node): Node;
|
|
293
295
|
|
|
296
|
+
declare module "../Nodes.js" {
|
|
297
|
+
interface Node {
|
|
298
|
+
toStack: () => Node;
|
|
299
|
+
toStackAssign: () => this;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
294
303
|
interface ColorFunction {
|
|
295
304
|
// The first branch in `ConvertType` will forward the parameters to the `Color` constructor if there are no
|
|
296
305
|
// parameters or all the parameters are non-objects
|
|
297
|
-
(color?: string | number):
|
|
298
|
-
(r: number, g: number, b: number):
|
|
306
|
+
(color?: string | number): ConstNode<Color>;
|
|
307
|
+
(r: number, g: number, b: number): ConstNode<Color>;
|
|
299
308
|
|
|
300
309
|
// The second branch does not apply because `cacheMap` is `null`
|
|
301
310
|
|
|
302
311
|
// The third branch will be triggered if there is a single parameter.
|
|
303
|
-
(color: Color):
|
|
304
|
-
(node: Node):
|
|
312
|
+
(color: Color): ConstNode<Color>;
|
|
313
|
+
(node: Node): Node;
|
|
305
314
|
|
|
306
315
|
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
307
316
|
// object. Not sure which cases are worth considering here.
|
|
@@ -310,8 +319,8 @@ interface ColorFunction {
|
|
|
310
319
|
export const color: ColorFunction;
|
|
311
320
|
|
|
312
321
|
interface NumberFunction {
|
|
313
|
-
(value?: number):
|
|
314
|
-
(node: Node):
|
|
322
|
+
(value?: number): ConstNode<number>;
|
|
323
|
+
(node: Node): Node;
|
|
315
324
|
}
|
|
316
325
|
|
|
317
326
|
export const float: NumberFunction;
|
|
@@ -319,8 +328,8 @@ export const int: NumberFunction;
|
|
|
319
328
|
export const uint: NumberFunction;
|
|
320
329
|
|
|
321
330
|
interface BooleanFunction {
|
|
322
|
-
(value?: boolean):
|
|
323
|
-
(node: Node):
|
|
331
|
+
(value?: boolean): ConstNode<boolean>;
|
|
332
|
+
(node: Node): Node;
|
|
324
333
|
}
|
|
325
334
|
|
|
326
335
|
export const bool: BooleanFunction;
|
|
@@ -328,126 +337,224 @@ export const bool: BooleanFunction;
|
|
|
328
337
|
interface Vector2Function {
|
|
329
338
|
// The first branch in `ConvertType` will forward the parameters to the `Vector2` constructor if there are no
|
|
330
339
|
// parameters or all the parameters are non-objects
|
|
331
|
-
(x?: number, y?: number):
|
|
340
|
+
(x?: number, y?: number): ConstNode<Vector2>;
|
|
332
341
|
|
|
333
342
|
// The second branch does not apply because `cacheMap` is `null`
|
|
334
343
|
|
|
335
344
|
// The third branch will be triggered if there is a single parameter.
|
|
336
|
-
(value: Vector2):
|
|
337
|
-
(node: Node):
|
|
345
|
+
(value: Vector2): ConstNode<Vector2>;
|
|
346
|
+
(node: Node): Node;
|
|
338
347
|
|
|
339
348
|
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
340
349
|
// object.
|
|
341
|
-
(x: Node | number, y: Node | number):
|
|
350
|
+
(x: Node | number, y: Node | number): JoinNode;
|
|
342
351
|
}
|
|
343
352
|
|
|
344
353
|
export const vec2: Vector2Function;
|
|
345
354
|
export const ivec2: Vector2Function;
|
|
346
355
|
export const uvec2: Vector2Function;
|
|
347
|
-
export const bvec2: (node: Node) =>
|
|
356
|
+
export const bvec2: (node: Node) => Node;
|
|
348
357
|
|
|
349
358
|
interface Vector3Function {
|
|
350
359
|
// The first branch in `ConvertType` will forward the parameters to the `Vector3` constructor if there are no
|
|
351
360
|
// parameters or all the parameters are non-objects
|
|
352
|
-
(x?: number, y?: number, z?: number):
|
|
361
|
+
(x?: number, y?: number, z?: number): ConstNode<Vector3>;
|
|
353
362
|
|
|
354
363
|
// The second branch does not apply because `cacheMap` is `null`
|
|
355
364
|
|
|
356
365
|
// The third branch will be triggered if there is a single parameter.
|
|
357
|
-
(value: Vector3):
|
|
358
|
-
(node: Node):
|
|
366
|
+
(value: Vector3): ConstNode<Vector3>;
|
|
367
|
+
(node: Node): Node;
|
|
359
368
|
|
|
360
369
|
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
361
370
|
// object.
|
|
362
|
-
(x: Node | number, y: Node | number, z?: Node | number):
|
|
371
|
+
(x: Node | number, y: Node | number, z?: Node | number): JoinNode;
|
|
363
372
|
}
|
|
364
373
|
|
|
365
374
|
export const vec3: Vector3Function;
|
|
366
375
|
export const ivec3: Vector3Function;
|
|
367
376
|
export const uvec3: Vector3Function;
|
|
368
|
-
export const bvec3: (node: Node) =>
|
|
377
|
+
export const bvec3: (node: Node) => Node;
|
|
369
378
|
|
|
370
379
|
interface Vector4Function {
|
|
371
380
|
// The first branch in `ConvertType` will forward the parameters to the `Vector4` constructor if there are no
|
|
372
381
|
// parameters or all the parameters are non-objects
|
|
373
|
-
(x?: number, y?: number, z?: number, w?: number):
|
|
382
|
+
(x?: number, y?: number, z?: number, w?: number): ConstNode<Vector4>;
|
|
374
383
|
|
|
375
384
|
// The second branch does not apply because `cacheMap` is `null`
|
|
376
385
|
|
|
377
386
|
// The third branch will be triggered if there is a single parameter.
|
|
378
|
-
(value: Vector4):
|
|
379
|
-
(node: Node):
|
|
387
|
+
(value: Vector4): ConstNode<Vector4>;
|
|
388
|
+
(node: Node): Node;
|
|
380
389
|
|
|
381
390
|
// The fall-through branch will be triggered if there is more than one parameter, or one of the parameters is an
|
|
382
391
|
// object.
|
|
383
|
-
(x: Node | number, y: Node | number, z?: Node | number, w?: Node | number):
|
|
392
|
+
(x: Node | number, y: Node | number, z?: Node | number, w?: Node | number): JoinNode;
|
|
384
393
|
}
|
|
385
394
|
|
|
386
395
|
export const vec4: Vector4Function;
|
|
387
396
|
export const ivec4: Vector4Function;
|
|
388
397
|
export const uvec4: Vector4Function;
|
|
389
|
-
export const bvec4: (node: Node) =>
|
|
398
|
+
export const bvec4: (node: Node) => Node;
|
|
390
399
|
|
|
391
400
|
interface Matrix2Function {
|
|
392
|
-
(value: Matrix2):
|
|
393
|
-
(node: Node):
|
|
401
|
+
(value: Matrix2): ConstNode<Matrix2>;
|
|
402
|
+
(node: Node): Node;
|
|
394
403
|
}
|
|
395
404
|
|
|
396
405
|
export const mat2: Matrix2Function;
|
|
397
406
|
|
|
398
407
|
interface Matrix3Function {
|
|
399
|
-
(value: Matrix3):
|
|
408
|
+
(value: Matrix3): ConstNode<Matrix3>;
|
|
409
|
+
(
|
|
410
|
+
n11: number | Node,
|
|
411
|
+
n12: number | Node,
|
|
412
|
+
n13: number | Node,
|
|
413
|
+
n21: number | Node,
|
|
414
|
+
n22: number | Node,
|
|
415
|
+
n23: number | Node,
|
|
416
|
+
n31: number | Node,
|
|
417
|
+
n32: number | Node,
|
|
418
|
+
n33: number | Node,
|
|
419
|
+
): Node;
|
|
420
|
+
(): ConstNode<Matrix3>;
|
|
400
421
|
(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
n23: number,
|
|
407
|
-
n31: number,
|
|
408
|
-
n32: number,
|
|
409
|
-
n33: number,
|
|
410
|
-
): ShaderNodeObject<ConstNode<Matrix3>>;
|
|
411
|
-
(): ShaderNodeObject<ConstNode<Matrix3>>;
|
|
412
|
-
(node: Node): ShaderNodeObject<Node>;
|
|
422
|
+
p1: Node,
|
|
423
|
+
p2: Node,
|
|
424
|
+
p3: Node,
|
|
425
|
+
): Node;
|
|
426
|
+
(node: Node): Node;
|
|
413
427
|
}
|
|
414
428
|
|
|
415
429
|
export const mat3: Matrix3Function;
|
|
416
430
|
|
|
417
431
|
interface Matrix4Function {
|
|
418
|
-
(value: Matrix4):
|
|
432
|
+
(value: Matrix4): ConstNode<Matrix4>;
|
|
433
|
+
(
|
|
434
|
+
n11: number | Node,
|
|
435
|
+
n12: number | Node,
|
|
436
|
+
n13: number | Node,
|
|
437
|
+
n14: number | Node,
|
|
438
|
+
n21: number | Node,
|
|
439
|
+
n22: number | Node,
|
|
440
|
+
n23: number | Node,
|
|
441
|
+
n24: number | Node,
|
|
442
|
+
n31: number | Node,
|
|
443
|
+
n32: number | Node,
|
|
444
|
+
n33: number | Node,
|
|
445
|
+
n34: number | Node,
|
|
446
|
+
n41: number | Node,
|
|
447
|
+
n42: number | Node,
|
|
448
|
+
n43: number | Node,
|
|
449
|
+
n44: number | Node,
|
|
450
|
+
): Node;
|
|
451
|
+
(): ConstNode<Matrix4>;
|
|
419
452
|
(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
n23: number,
|
|
427
|
-
n24: number,
|
|
428
|
-
n31: number,
|
|
429
|
-
n32: number,
|
|
430
|
-
n33: number,
|
|
431
|
-
n34: number,
|
|
432
|
-
n41: number,
|
|
433
|
-
n42: number,
|
|
434
|
-
n43: number,
|
|
435
|
-
n44: number,
|
|
436
|
-
): ShaderNodeObject<ConstNode<Matrix4>>;
|
|
437
|
-
(): ShaderNodeObject<ConstNode<Matrix4>>;
|
|
438
|
-
(node: Node): ShaderNodeObject<Node>;
|
|
453
|
+
p1: Node,
|
|
454
|
+
p2: Node,
|
|
455
|
+
p3: Node,
|
|
456
|
+
p4: Node,
|
|
457
|
+
): Node;
|
|
458
|
+
(node: Node): Node;
|
|
439
459
|
}
|
|
440
460
|
|
|
441
461
|
export const mat4: Matrix4Function;
|
|
442
462
|
|
|
443
|
-
export const string: (value?: string) =>
|
|
444
|
-
export const arrayBuffer: (value: ArrayBuffer) =>
|
|
463
|
+
export const string: (value?: string) => ConstNode<string>;
|
|
464
|
+
export const arrayBuffer: (value: ArrayBuffer) => ConstNode<ArrayBuffer>;
|
|
465
|
+
|
|
466
|
+
declare module "../Nodes.js" {
|
|
467
|
+
interface Node {
|
|
468
|
+
toColor: () => Node;
|
|
469
|
+
toColorAssign: () => this;
|
|
470
|
+
|
|
471
|
+
toFloat: () => Node;
|
|
472
|
+
toFloatAssign: () => this;
|
|
473
|
+
|
|
474
|
+
toInt: () => Node;
|
|
475
|
+
toIntAssign: () => this;
|
|
476
|
+
|
|
477
|
+
toUint: () => Node;
|
|
478
|
+
toUintAssign: () => this;
|
|
479
|
+
|
|
480
|
+
toBool: () => Node;
|
|
481
|
+
toBoolAssign: () => this;
|
|
482
|
+
|
|
483
|
+
toVec2: () => Node;
|
|
484
|
+
toVec2Assign: () => this;
|
|
485
|
+
|
|
486
|
+
toIvec2: () => Node;
|
|
487
|
+
toIvec2Assign: () => this;
|
|
488
|
+
|
|
489
|
+
toUvec2: () => Node;
|
|
490
|
+
toUvec2Assign: () => this;
|
|
445
491
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
492
|
+
toBvec2: () => Node;
|
|
493
|
+
toBvec2Assign: () => this;
|
|
494
|
+
|
|
495
|
+
toVec3: () => Node;
|
|
496
|
+
toVec3Assign: () => this;
|
|
497
|
+
|
|
498
|
+
toIvec3: () => Node;
|
|
499
|
+
toIvec3Assign: () => this;
|
|
500
|
+
|
|
501
|
+
toUvec3: () => Node;
|
|
502
|
+
toUvec3Assign: () => this;
|
|
503
|
+
|
|
504
|
+
toBvec3: () => Node;
|
|
505
|
+
ttoBvec3Assign: () => this;
|
|
506
|
+
|
|
507
|
+
toVec4: () => Node;
|
|
508
|
+
toVec4Assign: () => this;
|
|
509
|
+
|
|
510
|
+
toIvec4: () => Node;
|
|
511
|
+
toIvec4Assign: () => this;
|
|
512
|
+
|
|
513
|
+
toUvec4: () => Node;
|
|
514
|
+
toUvec4Assign: () => this;
|
|
515
|
+
|
|
516
|
+
toBvec4: () => Node;
|
|
517
|
+
toBvec4Assign: () => this;
|
|
518
|
+
|
|
519
|
+
toMat2: () => Node;
|
|
520
|
+
toMat2Assign: () => this;
|
|
521
|
+
|
|
522
|
+
toMat3: () => Node;
|
|
523
|
+
toMat3Assign: () => this;
|
|
524
|
+
|
|
525
|
+
toMat4: () => Node;
|
|
526
|
+
toMat4Assign: () => this;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export const element: (node: Node, indexNode: Node) => Node;
|
|
531
|
+
export const convert: (node: Node, types: string) => Node;
|
|
532
|
+
export const split: (node: Node, channels?: string) => Node;
|
|
533
|
+
|
|
534
|
+
declare module "../Nodes.js" {
|
|
535
|
+
interface Node {
|
|
536
|
+
element: (indexNode: Node) => Node;
|
|
537
|
+
elementAssign: (indexNode: Node) => this;
|
|
538
|
+
|
|
539
|
+
convert: (types: string) => Node;
|
|
540
|
+
convertAssign: (types: string) => this;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
449
543
|
|
|
450
544
|
/**
|
|
451
545
|
* @deprecated append() has been renamed to Stack().
|
|
452
546
|
*/
|
|
453
547
|
export const append: (node: Node) => Node;
|
|
548
|
+
|
|
549
|
+
declare module "../Nodes.js" {
|
|
550
|
+
interface Node {
|
|
551
|
+
/**
|
|
552
|
+
* @deprecated append() has been renamed to Stack().
|
|
553
|
+
*/
|
|
554
|
+
append: () => Node;
|
|
555
|
+
/**
|
|
556
|
+
* @deprecated append() has been renamed to Stack().
|
|
557
|
+
*/
|
|
558
|
+
appendAssign: () => this;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import TempNode from "../core/TempNode.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
|
|
5
4
|
declare class CubeMapNode extends TempNode {
|
|
6
5
|
envNode: Node;
|
|
@@ -10,4 +9,4 @@ declare class CubeMapNode extends TempNode {
|
|
|
10
9
|
|
|
11
10
|
export default CubeMapNode;
|
|
12
11
|
|
|
13
|
-
export const cubeMapNode: (envNode: Node) =>
|
|
12
|
+
export const cubeMapNode: (envNode: Node) => CubeMapNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
3
3
|
import TempNode from "../core/TempNode.js";
|
|
4
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
4
|
|
|
6
5
|
declare class DebugNode extends TempNode {
|
|
7
6
|
constructor(node: Node, callback?: ((code: string) => void) | null);
|
|
@@ -12,10 +11,15 @@ export default DebugNode;
|
|
|
12
11
|
export const debug: (
|
|
13
12
|
node: Node,
|
|
14
13
|
callback?: ((node: NodeBuilder, code: string) => void) | null,
|
|
15
|
-
) =>
|
|
14
|
+
) => DebugNode;
|
|
16
15
|
|
|
17
|
-
declare module "../
|
|
18
|
-
interface
|
|
19
|
-
debug:
|
|
16
|
+
declare module "../Nodes.js" {
|
|
17
|
+
interface Node {
|
|
18
|
+
debug: (
|
|
19
|
+
callback?: ((node: NodeBuilder, code: string) => void) | null,
|
|
20
|
+
) => DebugNode;
|
|
21
|
+
debugAssign: (
|
|
22
|
+
callback?: ((node: NodeBuilder, code: string) => void) | null,
|
|
23
|
+
) => this;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
|
-
export const Discard: (conditional?: Node) =>
|
|
5
|
-
export const Return: () =>
|
|
3
|
+
export const Discard: (conditional?: Node) => Node;
|
|
4
|
+
export const Return: () => Node;
|
|
6
5
|
|
|
7
|
-
declare module "../
|
|
8
|
-
interface
|
|
9
|
-
discard:
|
|
6
|
+
declare module "../Nodes.js" {
|
|
7
|
+
interface Node {
|
|
8
|
+
discard: () => Node;
|
|
9
|
+
discardAssign: () => this;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
2
|
import NodeFrame from "../core/NodeFrame.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
|
|
5
4
|
export type EventNodeType = typeof EventNode.OBJECT | typeof EventNode.MATERIAL;
|
|
6
5
|
|
|
@@ -12,10 +11,16 @@ declare class EventNode extends Node {
|
|
|
12
11
|
|
|
13
12
|
static OBJECT: "object";
|
|
14
13
|
static MATERIAL: "material";
|
|
14
|
+
static BEFORE_OBJECT: "beforeObject";
|
|
15
|
+
static BEFORE_MATERIAL: "beforeMaterial";
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export default EventNode;
|
|
18
19
|
|
|
19
|
-
export const OnObjectUpdate: (callback: (frame: NodeFrame) => void) =>
|
|
20
|
+
export const OnObjectUpdate: (callback: (frame: NodeFrame) => void) => Node;
|
|
20
21
|
|
|
21
|
-
export const OnMaterialUpdate: (callback: (frame: NodeFrame) => void) =>
|
|
22
|
+
export const OnMaterialUpdate: (callback: (frame: NodeFrame) => void) => Node;
|
|
23
|
+
|
|
24
|
+
export const OnBeforeObjectUpdate: (callback: (frame: NodeFrame) => void) => Node;
|
|
25
|
+
|
|
26
|
+
export const OnBeforeMaterialUpdate: (callback: (frame: NodeFrame) => void) => 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 FunctionOverloadingNode extends Node {
|
|
5
4
|
functionNodes: Node[];
|
|
@@ -10,4 +9,4 @@ declare class FunctionOverloadingNode extends Node {
|
|
|
10
9
|
|
|
11
10
|
export default FunctionOverloadingNode;
|
|
12
11
|
|
|
13
|
-
export const overloadingFn: (functionNodes: Node[]) => (...params: Node[]) =>
|
|
12
|
+
export const overloadingFn: (functionNodes: Node[]) => (...params: Node[]) => FunctionOverloadingNode;
|