@types/three 0.182.0 → 0.183.1
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 +0 -3
- three/examples/jsm/controls/OrbitControls.d.ts +39 -0
- three/examples/jsm/effects/AnaglyphEffect.d.ts +4 -0
- three/examples/jsm/environments/ColorEnvironment.d.ts +9 -0
- three/examples/jsm/gpgpu/BitonicSort.d.ts +5 -5
- three/examples/jsm/helpers/AnimationPathHelper.d.ts +38 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +4 -1
- three/examples/jsm/inspector/tabs/Parameters.d.ts +3 -0
- three/examples/jsm/inspector/ui/Item.d.ts +5 -0
- three/examples/jsm/libs/meshopt_decoder.module.d.ts +1 -1
- three/examples/jsm/lights/LightProbeGenerator.d.ts +11 -5
- three/examples/jsm/loaders/ColladaLoader.d.ts +27 -4
- three/examples/jsm/objects/SkyMesh.d.ts +11 -6
- three/examples/jsm/objects/Water2Mesh.d.ts +7 -7
- three/examples/jsm/objects/WaterMesh.d.ts +6 -6
- three/examples/jsm/postprocessing/EffectComposer.d.ts +9 -10
- three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +4 -9
- three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +30 -0
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -1
- three/examples/jsm/tsl/display/BilateralBlurNode.d.ts +27 -0
- three/examples/jsm/tsl/display/BloomNode.d.ts +5 -5
- three/examples/jsm/tsl/display/CRT.d.ts +22 -0
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +5 -5
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +4 -6
- three/examples/jsm/tsl/display/GTAONode.d.ts +8 -8
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +4 -2
- three/examples/jsm/tsl/display/GodraysNode.d.ts +20 -0
- three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -6
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +5 -5
- three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -1
- three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -6
- three/examples/jsm/tsl/display/PixelationPassNode.d.ts +10 -10
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +2 -2
- three/examples/jsm/tsl/display/RetroPassNode.d.ts +17 -0
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -1
- three/examples/jsm/tsl/display/SSGINode.d.ts +11 -11
- three/examples/jsm/tsl/display/SSRNode.d.ts +6 -6
- three/examples/jsm/tsl/display/SSSNode.d.ts +5 -5
- three/examples/jsm/tsl/display/Shape.d.ts +3 -0
- three/examples/jsm/tsl/display/TransitionNode.d.ts +3 -3
- three/examples/jsm/tsl/display/boxBlur.d.ts +1 -1
- three/examples/jsm/tsl/display/depthAwareBlend.d.ts +15 -0
- three/examples/jsm/tsl/display/hashBlur.d.ts +1 -1
- three/examples/jsm/tsl/math/Bayer.d.ts +2 -0
- three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -2
- three/package.json +3 -3
- three/src/Three.Core.d.ts +1 -1
- three/src/Three.TSL.d.ts +6 -11
- three/src/Three.WebGPU.Nodes.d.ts +2 -0
- three/src/Three.WebGPU.d.ts +3 -0
- three/src/Three.d.ts +2 -2
- three/src/animation/AnimationClip.d.ts +1 -1
- three/src/animation/KeyframeTrack.d.ts +19 -5
- three/src/animation/PropertyMixer.d.ts +5 -4
- three/src/audio/Audio.d.ts +224 -157
- three/src/audio/AudioAnalyser.d.ts +32 -27
- three/src/audio/AudioContext.d.ts +12 -12
- three/src/audio/AudioListener.d.ts +44 -65
- three/src/audio/PositionalAudio.d.ts +69 -62
- three/src/cameras/ArrayCamera.d.ts +21 -24
- three/src/cameras/Camera.d.ts +14 -53
- three/src/cameras/CubeCamera.d.ts +32 -28
- three/src/cameras/OrthographicCamera.d.ts +70 -100
- three/src/cameras/PerspectiveCamera.d.ts +133 -146
- three/src/cameras/StereoCamera.d.ts +24 -30
- three/src/constants.d.ts +14 -2
- three/src/core/Clock.d.ts +3 -0
- three/src/core/Object3D.d.ts +31 -7
- three/src/geometries/TorusGeometry.d.ts +22 -3
- three/src/helpers/ArrowHelper.d.ts +34 -50
- three/src/helpers/AxesHelper.d.ts +22 -36
- three/src/helpers/Box3Helper.d.ts +14 -25
- three/src/helpers/BoxHelper.d.ts +28 -39
- three/src/helpers/CameraHelper.d.ts +31 -52
- three/src/helpers/DirectionalLightHelper.d.ts +32 -53
- three/src/helpers/GridHelper.d.ts +15 -29
- three/src/helpers/HemisphereLightHelper.d.ts +26 -49
- three/src/helpers/PlaneHelper.d.ts +21 -33
- three/src/helpers/PointLightHelper.d.ts +25 -50
- three/src/helpers/PolarGridHelper.d.ts +19 -32
- three/src/helpers/SkeletonHelper.d.ts +26 -50
- three/src/helpers/SpotLightHelper.d.ts +28 -55
- three/src/lights/AmbientLight.d.ts +15 -23
- three/src/lights/DirectionalLight.d.ts +40 -82
- three/src/lights/DirectionalLightShadow.d.ts +6 -61
- three/src/lights/HemisphereLight.d.ts +20 -47
- three/src/lights/Light.d.ts +18 -48
- three/src/lights/LightProbe.d.ts +24 -29
- three/src/lights/LightShadow.d.ts +107 -91
- three/src/lights/PointLight.d.ts +36 -77
- three/src/lights/PointLightShadow.d.ts +9 -6
- three/src/lights/RectAreaLight.d.ts +39 -59
- three/src/lights/SpotLight.d.ts +62 -116
- three/src/lights/SpotLightShadow.d.ts +17 -59
- three/src/lights/webgpu/IESSpotLight.d.ts +13 -1
- three/src/lights/webgpu/ProjectorLight.d.ts +9 -10
- three/src/materials/MeshLambertMaterial.d.ts +6 -0
- three/src/materials/MeshPhongMaterial.d.ts +6 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +0 -6
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +0 -4
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +1 -2
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +0 -2
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +0 -2
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +5 -8
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +0 -4
- three/src/materials/nodes/NodeMaterial.d.ts +9 -3
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +0 -3
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +0 -2
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +39 -93
- three/src/math/Color.d.ts +1 -0
- three/src/math/Vector3.d.ts +2 -2
- three/src/math/interpolants/BezierInterpolant.d.ts +7 -0
- three/src/nodes/Nodes.d.ts +55 -35
- three/src/nodes/TSL.d.ts +2 -5
- three/src/nodes/accessors/Arrays.d.ts +19 -10
- three/src/nodes/accessors/BufferAttributeNode.d.ts +99 -33
- three/src/nodes/accessors/BufferNode.d.ts +21 -7
- three/src/nodes/accessors/Camera.d.ts +10 -10
- three/src/nodes/accessors/CubeTextureNode.d.ts +1 -1
- three/src/nodes/accessors/InstanceNode.d.ts +6 -0
- three/src/nodes/accessors/Lights.d.ts +9 -6
- three/src/nodes/accessors/MaterialNode.d.ts +1 -3
- three/src/nodes/accessors/MaterialProperties.d.ts +4 -4
- three/src/nodes/accessors/MaterialReferenceNode.d.ts +1 -1
- three/src/nodes/accessors/ModelNode.d.ts +34 -17
- three/src/nodes/accessors/MorphNode.d.ts +1 -1
- three/src/nodes/accessors/Normal.d.ts +13 -15
- three/src/nodes/accessors/Object3DNode.d.ts +35 -16
- three/src/nodes/accessors/Position.d.ts +9 -7
- three/src/nodes/accessors/ReferenceNode.d.ts +16 -7
- three/src/nodes/accessors/ReflectVector.d.ts +4 -5
- three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -1
- three/src/nodes/accessors/SceneProperties.d.ts +5 -0
- three/src/nodes/accessors/SkinningNode.d.ts +5 -3
- three/src/nodes/accessors/StorageBufferNode.d.ts +49 -22
- three/src/nodes/accessors/StorageTextureNode.d.ts +1 -1
- three/src/nodes/accessors/Tangent.d.ts +5 -7
- three/src/nodes/accessors/Texture3DNode.d.ts +1 -1
- three/src/nodes/accessors/TextureBicubic.d.ts +3 -2
- three/src/nodes/accessors/TextureNode.d.ts +19 -18
- three/src/nodes/accessors/UV.d.ts +1 -1
- three/src/nodes/accessors/UniformArrayNode.d.ts +10 -8
- three/src/nodes/accessors/UserDataNode.d.ts +1 -1
- three/src/nodes/accessors/VelocityNode.d.ts +3 -3
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
- three/src/nodes/code/FunctionCallNode.d.ts +0 -1
- three/src/nodes/code/FunctionNode.d.ts +7 -3
- three/src/nodes/core/ArrayNode.d.ts +2 -3
- three/src/nodes/core/AttributeNode.d.ts +12 -6
- three/src/nodes/core/BypassNode.d.ts +2 -3
- three/src/nodes/core/ConstNode.d.ts +10 -3
- three/src/nodes/core/ContextNode.d.ts +23 -28
- three/src/nodes/core/IndexNode.d.ts +1 -1
- three/src/nodes/core/InputNode.d.ts +12 -4
- three/src/nodes/core/InspectorNode.d.ts +2 -3
- three/src/nodes/core/IsolateNode.d.ts +2 -7
- three/src/nodes/core/MRTNode.d.ts +7 -0
- three/src/nodes/core/Node.d.ts +258 -39
- three/src/nodes/core/NodeAttribute.d.ts +30 -5
- three/src/nodes/core/NodeBuilder.d.ts +5 -3
- three/src/nodes/core/NodeCache.d.ts +24 -48
- three/src/nodes/core/NodeError.d.ts +9 -0
- three/src/nodes/core/NodeParser.d.ts +2 -0
- three/src/nodes/core/NodeUniform.d.ts +33 -9
- three/src/nodes/core/NodeVar.d.ts +33 -5
- three/src/nodes/core/NodeVarying.d.ts +32 -4
- three/src/nodes/core/ParameterNode.d.ts +11 -4
- three/src/nodes/core/PropertyNode.d.ts +45 -35
- three/src/nodes/core/StackTrace.d.ts +9 -0
- three/src/nodes/core/StructType.d.ts +3 -1
- three/src/nodes/core/StructTypeNode.d.ts +19 -5
- three/src/nodes/core/TempNode.d.ts +9 -3
- three/src/nodes/core/UniformNode.d.ts +53 -15
- three/src/nodes/core/VarNode.d.ts +15 -14
- three/src/nodes/core/VaryingNode.d.ts +14 -19
- three/src/nodes/core/constants.d.ts +9 -4
- three/src/nodes/display/BlendModes.d.ts +7 -27
- three/src/nodes/display/ColorAdjustment.d.ts +8 -9
- three/src/nodes/display/ColorSpaceNode.d.ts +2 -8
- three/src/nodes/display/FrontFacingNode.d.ts +1 -1
- three/src/nodes/display/PassNode.d.ts +9 -5
- three/src/nodes/display/RenderOutputNode.d.ts +3 -7
- three/src/nodes/display/ScreenNode.d.ts +25 -17
- three/src/nodes/display/ToneMappingNode.d.ts +3 -7
- three/src/nodes/display/ViewportDepthNode.d.ts +11 -7
- three/src/nodes/display/ViewportTextureNode.d.ts +2 -0
- three/src/nodes/fog/Fog.d.ts +5 -3
- three/src/nodes/geometry/RangeNode.d.ts +51 -9
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +2 -0
- three/src/nodes/gpgpu/BarrierNode.d.ts +2 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -7
- three/src/nodes/lighting/AnalyticLightNode.d.ts +1 -1
- three/src/nodes/lighting/HemisphereLightNode.d.ts +3 -2
- three/src/nodes/lighting/LightProbeNode.d.ts +1 -1
- three/src/nodes/lighting/LightUtils.d.ts +1 -1
- three/src/nodes/lighting/LightingContextNode.d.ts +1 -1
- three/src/nodes/lighting/SpotLightNode.d.ts +0 -6
- three/src/nodes/materialx/MaterialXNodes.d.ts +11 -11
- three/src/nodes/math/BitcountNode.d.ts +2 -0
- three/src/nodes/math/ConditionalNode.d.ts +43 -22
- three/src/nodes/math/Hash.d.ts +1 -1
- three/src/nodes/math/MathNode.d.ts +603 -267
- three/src/nodes/math/MathUtils.d.ts +9 -5
- three/src/nodes/math/OperatorNode.d.ts +490 -227
- three/src/nodes/math/TriNoise3D.d.ts +3 -3
- three/src/nodes/pmrem/PMREMNode.d.ts +1 -1
- three/src/nodes/procedural/Checker.d.ts +1 -1
- three/src/nodes/tsl/TSLCore.d.ts +1683 -224
- three/src/nodes/utils/ArrayElementNode.d.ts +9 -4
- three/src/nodes/utils/DebugNode.d.ts +2 -5
- three/src/nodes/utils/Discard.d.ts +2 -3
- three/src/nodes/utils/FlipNode.d.ts +11 -0
- three/src/nodes/utils/LoopNode.d.ts +17 -13
- three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -1
- three/src/nodes/utils/Oscillators.d.ts +4 -4
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +5 -5
- three/src/nodes/utils/RemapNode.d.ts +33 -39
- three/src/nodes/utils/RotateNode.d.ts +17 -8
- three/src/nodes/utils/SplitNode.d.ts +1 -2
- three/src/nodes/utils/SpriteSheetUV.d.ts +7 -0
- three/src/nodes/utils/StorageArrayElementNode.d.ts +18 -9
- three/src/nodes/utils/Timer.d.ts +4 -4
- three/src/nodes/utils/TriplanarTextures.d.ts +2 -2
- three/src/nodes/utils/UVUtils.d.ts +6 -4
- three/src/objects/BatchedMesh.d.ts +6 -4
- three/src/objects/InstancedMesh.d.ts +32 -24
- three/src/renderers/WebGLRenderer.d.ts +4 -93
- three/src/renderers/common/Animation.d.ts +46 -9
- three/src/renderers/common/Attributes.d.ts +11 -13
- three/src/renderers/common/Backend.d.ts +0 -2
- three/src/renderers/common/Background.d.ts +17 -15
- three/src/renderers/common/BindGroup.d.ts +27 -13
- three/src/renderers/common/Binding.d.ts +15 -3
- three/src/renderers/common/Bindings.d.ts +41 -17
- three/src/renderers/common/BlendMode.d.ts +22 -0
- three/src/renderers/common/Buffer.d.ts +35 -11
- three/src/renderers/common/BufferUtils.d.ts +3 -4
- three/src/renderers/common/BundleGroup.d.ts +16 -6
- three/src/renderers/common/CanvasTarget.d.ts +76 -13
- three/src/renderers/common/ChainMap.d.ts +12 -9
- three/src/renderers/common/ClippingContext.d.ts +61 -10
- three/src/renderers/common/Color4.d.ts +10 -5
- three/src/renderers/common/ComputePipeline.d.ts +16 -2
- three/src/renderers/common/Constants.d.ts +5 -3
- three/src/renderers/common/CubeRenderTarget.d.ts +24 -7
- three/src/renderers/common/DataMap.d.ts +10 -18
- three/src/renderers/common/Geometries.d.ts +39 -20
- three/src/renderers/common/Info.d.ts +62 -9
- three/src/renderers/common/InspectorBase.d.ts +19 -7
- three/src/renderers/common/Lighting.d.ts +2 -6
- three/src/renderers/common/Pipeline.d.ts +14 -2
- three/src/renderers/common/Pipelines.d.ts +58 -60
- three/src/renderers/common/PostProcessing.d.ts +14 -17
- three/src/renderers/common/ProgrammableStage.d.ts +48 -8
- three/src/renderers/common/RenderBundle.d.ts +4 -2
- three/src/renderers/common/RenderBundles.d.ts +6 -3
- three/src/renderers/common/RenderContext.d.ts +175 -7
- three/src/renderers/common/RenderContexts.d.ts +20 -25
- three/src/renderers/common/RenderList.d.ts +77 -11
- three/src/renderers/common/RenderLists.d.ts +16 -4
- three/src/renderers/common/RenderObject.d.ts +223 -47
- three/src/renderers/common/RenderObjectPipeline.d.ts +33 -0
- three/src/renderers/common/RenderObjects.d.ts +55 -22
- three/src/renderers/common/RenderPipeline.d.ts +20 -17
- three/src/renderers/common/Renderer.d.ts +625 -207
- three/src/renderers/common/Textures.d.ts +24 -46
- three/src/renderers/common/TimestampQueryPool.d.ts +62 -8
- three/src/renderers/common/Uniform.d.ts +143 -58
- three/src/renderers/common/UniformBuffer.d.ts +7 -5
- three/src/renderers/common/UniformsGroup.d.ts +50 -35
- three/src/renderers/common/XRManager.d.ts +321 -83
- three/src/renderers/common/XRRenderTarget.d.ts +49 -6
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +75 -15
- three/src/renderers/common/nodes/NodeLibrary.d.ts +25 -5
- three/src/renderers/common/nodes/{Nodes.d.ts → NodeManager.d.ts} +54 -73
- three/src/renderers/common/nodes/NodeUniform.d.ts +60 -70
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +23 -4
- three/src/renderers/shaders/UniformsLib.d.ts +0 -3
- three/src/renderers/webgl/WebGLAttributes.d.ts +9 -7
- three/src/renderers/webgl/WebGLEnvironments.d.ts +8 -0
- three/src/renderers/webgl/WebGLExtensions.d.ts +1 -1
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +9 -5
- three/src/renderers/webgl/WebGLLights.d.ts +19 -18
- three/src/renderers/webgl/WebGLObjects.d.ts +15 -2
- three/src/renderers/webgl/WebGLProgram.d.ts +2 -10
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -2
- three/src/renderers/webgl/WebGLRenderLists.d.ts +1 -3
- three/src/renderers/webgl/WebGLShadowMap.d.ts +0 -5
- three/src/renderers/webgl/WebGLState.d.ts +305 -28
- three/src/renderers/webgl/WebGLTextures.d.ts +10 -9
- three/src/renderers/webgl/WebGLUniforms.d.ts +0 -7
- three/src/renderers/webgpu/WebGPUBackend.d.ts +0 -1
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +2 -4
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +15 -4
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +1 -1
- three/src/scenes/Fog.d.ts +31 -37
- three/src/scenes/FogExp2.d.ts +26 -31
- three/src/scenes/Scene.d.ts +51 -65
- three/src/textures/CompressedArrayTexture.d.ts +1 -1
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/utils.d.ts +5 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -18
- three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +0 -13
- three/examples/jsm/shaders/GodRaysShader.d.ts +0 -44
- three/src/nodes/accessors/SceneNode.d.ts +0 -21
- three/src/nodes/code/ScriptableNode.d.ts +0 -21
- three/src/nodes/code/ScriptableValueNode.d.ts +0 -9
- three/src/nodes/display/PosterizeNode.d.ts +0 -13
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +0 -15
- three/src/renderers/webgl/WebGLCubeMaps.d.ts +0 -8
- three/src/renderers/webgl/WebGLCubeUVMaps.d.ts +0 -9
|
@@ -1,16 +1,13 @@
|
|
|
1
|
+
import UniformGroupNode from "./UniformGroupNode.js";
|
|
1
2
|
import UniformNode from "./UniformNode.js";
|
|
3
|
+
|
|
2
4
|
/**
|
|
3
5
|
* {@link NodeBuilder} is going to create instances of this class during the build process
|
|
4
6
|
* of nodes. They represent the final shader uniforms that are going to be generated
|
|
5
7
|
* by the builder. A dictionary of node uniforms is maintained in {@link NodeBuilder#uniforms}
|
|
6
8
|
* for this purpose.
|
|
7
9
|
*/
|
|
8
|
-
declare class NodeUniform<TValue> {
|
|
9
|
-
readonly isNodeUniform: true;
|
|
10
|
-
name: string;
|
|
11
|
-
type: string | null;
|
|
12
|
-
node: UniformNode<TValue>;
|
|
13
|
-
needsUpdate: boolean | undefined;
|
|
10
|
+
declare class NodeUniform<TNodeType, TValue> {
|
|
14
11
|
/**
|
|
15
12
|
* Constructs a new node uniform.
|
|
16
13
|
*
|
|
@@ -18,14 +15,40 @@ declare class NodeUniform<TValue> {
|
|
|
18
15
|
* @param {string} type - The type of the uniform.
|
|
19
16
|
* @param {UniformNode} node - An reference to the node.
|
|
20
17
|
*/
|
|
21
|
-
constructor(name: string, type: string
|
|
18
|
+
constructor(name: string, type: string, node: UniformNode<TNodeType, TValue>);
|
|
19
|
+
/**
|
|
20
|
+
* This flag can be used for type testing.
|
|
21
|
+
*
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
* @readonly
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
readonly isNodeUniform: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The name of the uniform.
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* The type of the uniform.
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
38
|
+
type: string;
|
|
39
|
+
/**
|
|
40
|
+
* An reference to the node.
|
|
41
|
+
*
|
|
42
|
+
* @type {UniformNode}
|
|
43
|
+
*/
|
|
44
|
+
node: UniformNode<TNodeType, TValue>;
|
|
45
|
+
set value(val: TValue);
|
|
22
46
|
/**
|
|
23
47
|
* The value of the uniform node.
|
|
24
48
|
*
|
|
25
49
|
* @type {any}
|
|
26
50
|
*/
|
|
27
51
|
get value(): TValue;
|
|
28
|
-
set value(val: TValue);
|
|
29
52
|
/**
|
|
30
53
|
* The id of the uniform node.
|
|
31
54
|
*
|
|
@@ -37,6 +60,7 @@ declare class NodeUniform<TValue> {
|
|
|
37
60
|
*
|
|
38
61
|
* @type {UniformGroupNode}
|
|
39
62
|
*/
|
|
40
|
-
get groupNode():
|
|
63
|
+
get groupNode(): UniformGroupNode;
|
|
41
64
|
}
|
|
65
|
+
|
|
42
66
|
export default NodeUniform;
|
|
@@ -5,11 +5,6 @@
|
|
|
5
5
|
* this purpose.
|
|
6
6
|
*/
|
|
7
7
|
declare class NodeVar {
|
|
8
|
-
readonly isNodeVar: true;
|
|
9
|
-
name: string;
|
|
10
|
-
type: string;
|
|
11
|
-
readOnly: boolean;
|
|
12
|
-
count: number | null;
|
|
13
8
|
/**
|
|
14
9
|
* Constructs a new node variable.
|
|
15
10
|
*
|
|
@@ -19,5 +14,38 @@ declare class NodeVar {
|
|
|
19
14
|
* @param {?number} [count=null] - The size.
|
|
20
15
|
*/
|
|
21
16
|
constructor(name: string, type: string, readOnly?: boolean, count?: number | null);
|
|
17
|
+
/**
|
|
18
|
+
* This flag can be used for type testing.
|
|
19
|
+
*
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @readonly
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
readonly isNodeVar: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The name of the variable.
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* The type of the variable.
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
*/
|
|
36
|
+
type: string;
|
|
37
|
+
/**
|
|
38
|
+
* The read-only flag.
|
|
39
|
+
*
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
*/
|
|
42
|
+
readOnly: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The size.
|
|
45
|
+
*
|
|
46
|
+
* @type {?number}
|
|
47
|
+
*/
|
|
48
|
+
count: number | null;
|
|
22
49
|
}
|
|
50
|
+
|
|
23
51
|
export default NodeVar;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InterpolationSamplingMode, InterpolationSamplingType } from "../../constants.js";
|
|
2
2
|
import NodeVar from "./NodeVar.js";
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* {@link NodeBuilder} is going to create instances of this class during the build process
|
|
5
6
|
* of nodes. They represent the final shader varyings that are going to be generated
|
|
@@ -9,10 +10,6 @@ import NodeVar from "./NodeVar.js";
|
|
|
9
10
|
* @augments NodeVar
|
|
10
11
|
*/
|
|
11
12
|
declare class NodeVarying extends NodeVar {
|
|
12
|
-
needsInterpolation: boolean;
|
|
13
|
-
readonly isNodeVarying: true;
|
|
14
|
-
interpolationType: InterpolationSamplingType | null;
|
|
15
|
-
interpolationSampling: InterpolationSamplingMode | null;
|
|
16
13
|
/**
|
|
17
14
|
* Constructs a new node varying.
|
|
18
15
|
*
|
|
@@ -27,5 +24,36 @@ declare class NodeVarying extends NodeVar {
|
|
|
27
24
|
interpolationType?: InterpolationSamplingType | null,
|
|
28
25
|
interpolationSampling?: InterpolationSamplingMode | null,
|
|
29
26
|
);
|
|
27
|
+
/**
|
|
28
|
+
* Whether this varying requires interpolation or not. This property can be used
|
|
29
|
+
* to check if the varying can be optimized for a variable.
|
|
30
|
+
*
|
|
31
|
+
* @type {boolean}
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
needsInterpolation: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* This flag can be used for type testing.
|
|
37
|
+
*
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @readonly
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
readonly isNodeVarying: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The interpolation type of the varying data.
|
|
45
|
+
*
|
|
46
|
+
* @type {?string}
|
|
47
|
+
* @default null
|
|
48
|
+
*/
|
|
49
|
+
interpolationType: InterpolationSamplingType | null;
|
|
50
|
+
/**
|
|
51
|
+
* The interpolation sampling type of varying data.
|
|
52
|
+
*
|
|
53
|
+
* @type {?string}
|
|
54
|
+
* @default null
|
|
55
|
+
*/
|
|
56
|
+
interpolationSampling: InterpolationSamplingMode | null;
|
|
30
57
|
}
|
|
58
|
+
|
|
31
59
|
export default NodeVarying;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import PropertyNode from "./PropertyNode.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface ParameterNodeInterface {
|
|
4
4
|
readonly isParameterNode: true;
|
|
5
|
-
|
|
6
|
-
constructor(nodeType: string, name?: string | null);
|
|
7
5
|
}
|
|
8
6
|
|
|
7
|
+
declare const ParameterNode: {
|
|
8
|
+
new<TNodeType>(
|
|
9
|
+
nodeType: TNodeType,
|
|
10
|
+
name?: string | null,
|
|
11
|
+
): ParameterNode<TNodeType>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type ParameterNode<TNodeType> = PropertyNode<TNodeType> & ParameterNodeInterface;
|
|
15
|
+
|
|
9
16
|
export default ParameterNode;
|
|
10
17
|
|
|
11
|
-
export const parameter: (type:
|
|
18
|
+
export const parameter: <TNodeType>(type: TNodeType, name?: string | null) => ParameterNode<TNodeType>;
|
|
@@ -1,44 +1,54 @@
|
|
|
1
1
|
import Node from "./Node.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface PropertyNodeInterface {
|
|
4
4
|
name: string | null;
|
|
5
5
|
varying: boolean;
|
|
6
6
|
|
|
7
7
|
readonly isPropertyNode: true;
|
|
8
|
-
|
|
9
|
-
constructor(nodeType?: string | null, name?: string | null, varying?: boolean);
|
|
10
8
|
}
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
declare const PropertyNode: {
|
|
11
|
+
new<TNodeType>(
|
|
12
|
+
nodeType: TNodeType,
|
|
13
|
+
name?: string | null,
|
|
14
|
+
varying?: boolean,
|
|
15
|
+
): PropertyNode<TNodeType>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type PropertyNode<TNodeType> = Node<TNodeType> & PropertyNodeInterface;
|
|
19
|
+
|
|
20
|
+
export default PropertyNode;
|
|
21
|
+
|
|
22
|
+
export const property: <const TNodeType>(type: TNodeType, name?: string | null) => PropertyNode<TNodeType>;
|
|
23
|
+
export const varyingProperty: <const TNodeType>(type: TNodeType, name?: string | null) => PropertyNode<TNodeType>;
|
|
14
24
|
|
|
15
|
-
export const diffuseColor: PropertyNode
|
|
16
|
-
export const diffuseContribution: PropertyNode
|
|
17
|
-
export const emissive: PropertyNode
|
|
18
|
-
export const roughness: PropertyNode
|
|
19
|
-
export const metalness: PropertyNode
|
|
20
|
-
export const clearcoat: PropertyNode
|
|
21
|
-
export const clearcoatRoughness: PropertyNode
|
|
22
|
-
export const sheen: PropertyNode
|
|
23
|
-
export const sheenRoughness: PropertyNode
|
|
24
|
-
export const iridescence: PropertyNode
|
|
25
|
-
export const iridescenceIOR: PropertyNode
|
|
26
|
-
export const iridescenceThickness: PropertyNode
|
|
27
|
-
export const alphaT: PropertyNode
|
|
28
|
-
export const anisotropy: PropertyNode
|
|
29
|
-
export const anisotropyT: PropertyNode
|
|
30
|
-
export const anisotropyB: PropertyNode
|
|
31
|
-
export const specularColor: PropertyNode
|
|
32
|
-
export const specularColorBlended: PropertyNode
|
|
33
|
-
export const specularF90: PropertyNode
|
|
34
|
-
export const shininess: PropertyNode
|
|
35
|
-
export const output: PropertyNode
|
|
36
|
-
export const dashSize: PropertyNode
|
|
37
|
-
export const gapSize: PropertyNode
|
|
38
|
-
export const pointWidth: PropertyNode
|
|
39
|
-
export const ior: PropertyNode
|
|
40
|
-
export const transmission: PropertyNode
|
|
41
|
-
export const thickness: PropertyNode
|
|
42
|
-
export const attenuationDistance: PropertyNode
|
|
43
|
-
export const attenuationColor: PropertyNode
|
|
44
|
-
export const dispersion: PropertyNode
|
|
25
|
+
export const diffuseColor: PropertyNode<"vec4">;
|
|
26
|
+
export const diffuseContribution: PropertyNode<"vec3">;
|
|
27
|
+
export const emissive: PropertyNode<"vec3">;
|
|
28
|
+
export const roughness: PropertyNode<"float">;
|
|
29
|
+
export const metalness: PropertyNode<"float">;
|
|
30
|
+
export const clearcoat: PropertyNode<"float">;
|
|
31
|
+
export const clearcoatRoughness: PropertyNode<"float">;
|
|
32
|
+
export const sheen: PropertyNode<"vec3">;
|
|
33
|
+
export const sheenRoughness: PropertyNode<"float">;
|
|
34
|
+
export const iridescence: PropertyNode<"float">;
|
|
35
|
+
export const iridescenceIOR: PropertyNode<"float">;
|
|
36
|
+
export const iridescenceThickness: PropertyNode<"float">;
|
|
37
|
+
export const alphaT: PropertyNode<"float">;
|
|
38
|
+
export const anisotropy: PropertyNode<"float">;
|
|
39
|
+
export const anisotropyT: PropertyNode<"vec3">;
|
|
40
|
+
export const anisotropyB: PropertyNode<"vec3">;
|
|
41
|
+
export const specularColor: PropertyNode<"color">;
|
|
42
|
+
export const specularColorBlended: PropertyNode<"color">;
|
|
43
|
+
export const specularF90: PropertyNode<"float">;
|
|
44
|
+
export const shininess: PropertyNode<"float">;
|
|
45
|
+
export const output: PropertyNode<"vec4">;
|
|
46
|
+
export const dashSize: PropertyNode<"float">;
|
|
47
|
+
export const gapSize: PropertyNode<"float">;
|
|
48
|
+
export const pointWidth: PropertyNode<"float">;
|
|
49
|
+
export const ior: PropertyNode<"float">;
|
|
50
|
+
export const transmission: PropertyNode<"float">;
|
|
51
|
+
export const thickness: PropertyNode<"float">;
|
|
52
|
+
export const attenuationDistance: PropertyNode<"float">;
|
|
53
|
+
export const attenuationColor: PropertyNode<"color">;
|
|
54
|
+
export const dispersion: PropertyNode<"float">;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { MemberLayout } from "./StructTypeNode.js";
|
|
2
|
+
|
|
2
3
|
declare class StructType {
|
|
4
|
+
constructor(name: string, members: MemberLayout[]);
|
|
3
5
|
name: string;
|
|
4
6
|
members: MemberLayout[];
|
|
5
7
|
output: boolean;
|
|
6
|
-
constructor(name: string, members: MemberLayout[]);
|
|
7
8
|
}
|
|
9
|
+
|
|
8
10
|
export default StructType;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import Node from "./Node.js";
|
|
2
2
|
import NodeBuilder from "./NodeBuilder.js";
|
|
3
|
+
|
|
3
4
|
export interface MembersLayout {
|
|
4
5
|
[name: string]: string | {
|
|
5
6
|
type: string;
|
|
6
7
|
atomic?: boolean;
|
|
7
8
|
};
|
|
8
9
|
}
|
|
10
|
+
|
|
9
11
|
export interface MemberLayout {
|
|
10
12
|
name: string;
|
|
11
13
|
type: string;
|
|
12
14
|
atomic: boolean;
|
|
13
15
|
}
|
|
16
|
+
|
|
14
17
|
/**
|
|
15
18
|
* Represents a struct type node in the node-based system.
|
|
16
19
|
* This class is used to define and manage the layout and types of struct members.
|
|
@@ -20,10 +23,6 @@ export interface MemberLayout {
|
|
|
20
23
|
* @augments Node
|
|
21
24
|
*/
|
|
22
25
|
declare class StructTypeNode extends Node {
|
|
23
|
-
static get type(): string;
|
|
24
|
-
membersLayout: MemberLayout[];
|
|
25
|
-
name: string | null;
|
|
26
|
-
readonly isStructLayoutNode: true;
|
|
27
26
|
/**
|
|
28
27
|
* Creates an instance of StructTypeNode.
|
|
29
28
|
*
|
|
@@ -31,6 +30,20 @@ declare class StructTypeNode extends Node {
|
|
|
31
30
|
* @param {?string} [name=null] - The optional name of the struct.
|
|
32
31
|
*/
|
|
33
32
|
constructor(membersLayout: MembersLayout, name?: string | null);
|
|
33
|
+
/**
|
|
34
|
+
* The layout of the members for the struct
|
|
35
|
+
*
|
|
36
|
+
* @type {Array.<{name: string, type: string, atomic: boolean}>}
|
|
37
|
+
*/
|
|
38
|
+
membersLayout: Array<MemberLayout>;
|
|
39
|
+
/**
|
|
40
|
+
* This flag can be used for type testing.
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @readonly
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
readonly isStructLayoutNode: boolean;
|
|
34
47
|
/**
|
|
35
48
|
* Returns the length of the struct.
|
|
36
49
|
* The length is calculated by summing the lengths of the struct's members.
|
|
@@ -40,7 +53,8 @@ declare class StructTypeNode extends Node {
|
|
|
40
53
|
getLength(): number;
|
|
41
54
|
getMemberType(builder: NodeBuilder, name: string): string;
|
|
42
55
|
getNodeType(builder: NodeBuilder): string;
|
|
43
|
-
setup(builder: NodeBuilder):
|
|
56
|
+
setup(builder: NodeBuilder): undefined;
|
|
44
57
|
generate(builder: NodeBuilder): string;
|
|
45
58
|
}
|
|
59
|
+
|
|
46
60
|
export default StructTypeNode;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import Node from "./Node.js";
|
|
2
2
|
import NodeBuilder from "./NodeBuilder.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface TempNodeInterface {
|
|
5
5
|
isTempNode: true;
|
|
6
6
|
|
|
7
|
-
constructor(type: string | null);
|
|
8
|
-
|
|
9
7
|
hasDependencies(builder: NodeBuilder): boolean;
|
|
10
8
|
}
|
|
9
|
+
|
|
10
|
+
declare const TempNode: {
|
|
11
|
+
new<TNodeType = unknown>(type?: TNodeType | null): TempNode<TNodeType>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type TempNode<TNodeType> = Node<TNodeType> & TempNodeInterface;
|
|
15
|
+
|
|
16
|
+
export default TempNode;
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
+
import { Color } from "../../math/Color.js";
|
|
2
|
+
import { Matrix2 } from "../../math/Matrix2.js";
|
|
3
|
+
import { Matrix3 } from "../../math/Matrix3.js";
|
|
4
|
+
import { Matrix4 } from "../../math/Matrix4.js";
|
|
5
|
+
import { Vector2 } from "../../math/Vector2.js";
|
|
6
|
+
import { Vector3 } from "../../math/Vector3.js";
|
|
7
|
+
import { Vector4 } from "../../math/Vector4.js";
|
|
1
8
|
import { NodeUpdateType } from "./constants.js";
|
|
2
9
|
import InputNode from "./InputNode.js";
|
|
3
|
-
import Node from "./Node.js";
|
|
4
10
|
import NodeBuilder from "./NodeBuilder.js";
|
|
5
11
|
import NodeFrame from "./NodeFrame.js";
|
|
6
12
|
import UniformGroupNode from "./UniformGroupNode.js";
|
|
13
|
+
|
|
7
14
|
/**
|
|
8
15
|
* Class for representing a uniform.
|
|
9
16
|
*
|
|
10
17
|
* @augments InputNode
|
|
11
18
|
*/
|
|
12
|
-
declare class
|
|
13
|
-
static get type(): string;
|
|
14
|
-
readonly isUniformNode: true;
|
|
15
|
-
name: string;
|
|
16
|
-
groupNode: UniformGroupNode;
|
|
19
|
+
declare class UniformNodeClass<TValue> extends InputNode<unknown, TValue> {
|
|
17
20
|
/**
|
|
18
|
-
*
|
|
21
|
+
* This flag can be used for type testing.
|
|
19
22
|
*
|
|
20
|
-
* @
|
|
21
|
-
* @
|
|
23
|
+
* @type {boolean}
|
|
24
|
+
* @readonly
|
|
25
|
+
* @default true
|
|
22
26
|
*/
|
|
23
|
-
|
|
27
|
+
readonly isUniformNode: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The uniform group of this uniform. By default, uniforms are
|
|
30
|
+
* managed per object but they might belong to a shared group
|
|
31
|
+
* which is updated per frame or render call.
|
|
32
|
+
*
|
|
33
|
+
* @type {UniformGroupNode}
|
|
34
|
+
*/
|
|
35
|
+
groupNode: UniformGroupNode;
|
|
24
36
|
/**
|
|
25
37
|
* Sets the {@link UniformNode#name} property.
|
|
26
38
|
*
|
|
27
39
|
* @param {string} name - The name of the uniform.
|
|
28
40
|
* @return {UniformNode} A reference to this node.
|
|
29
41
|
*/
|
|
30
|
-
setName
|
|
42
|
+
setName(name: string): this;
|
|
31
43
|
/**
|
|
32
44
|
* Sets the {@link UniformNode#name} property.
|
|
33
45
|
*
|
|
@@ -35,7 +47,7 @@ declare class UniformNode<TValue> extends InputNode<TValue> {
|
|
|
35
47
|
* @param {string} name - The name of the uniform.
|
|
36
48
|
* @return {UniformNode} A reference to this node.
|
|
37
49
|
*/
|
|
38
|
-
label
|
|
50
|
+
label(name: string): this;
|
|
39
51
|
/**
|
|
40
52
|
* Sets the {@link UniformNode#groupNode} property.
|
|
41
53
|
*
|
|
@@ -58,17 +70,43 @@ declare class UniformNode<TValue> extends InputNode<TValue> {
|
|
|
58
70
|
*/
|
|
59
71
|
getUniformHash(builder: NodeBuilder): string;
|
|
60
72
|
onUpdate(callback: (frame: NodeFrame, self: this) => TValue | undefined, updateType: NodeUpdateType): this;
|
|
61
|
-
getInputType(builder: NodeBuilder): string
|
|
73
|
+
getInputType(builder: NodeBuilder): string;
|
|
62
74
|
generate(builder: NodeBuilder, output: string | null): string;
|
|
63
75
|
}
|
|
76
|
+
|
|
77
|
+
declare const UniformNode: {
|
|
78
|
+
/**
|
|
79
|
+
* Constructs a new uniform node.
|
|
80
|
+
*
|
|
81
|
+
* @param {any} value - The value of this node. Usually a JS primitive or three.js object (vector, matrix, color, texture).
|
|
82
|
+
* @param {?string} nodeType - The node type. If no explicit type is defined, the node tries to derive the type from its value.
|
|
83
|
+
*/
|
|
84
|
+
new<TNodeType, TValue>(value: TValue, nodeType?: string | null): UniformNode<TNodeType, TValue>;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
type UniformNode<TNodeType, TValue> = UniformNodeClass<TValue> & InputNode<TNodeType, TValue>;
|
|
88
|
+
|
|
64
89
|
export default UniformNode;
|
|
90
|
+
|
|
91
|
+
interface Uniform {
|
|
92
|
+
(value: number, type?: "float"): UniformNode<"float", number>;
|
|
93
|
+
(value: boolean): UniformNode<"bool", boolean>;
|
|
94
|
+
(value: Vector2): UniformNode<"vec2", Vector2>;
|
|
95
|
+
(value: Vector3): UniformNode<"vec3", Vector3>;
|
|
96
|
+
(value: Vector4): UniformNode<"vec4", Vector4>;
|
|
97
|
+
(value: Matrix2): UniformNode<"mat2", Matrix2>;
|
|
98
|
+
(value: Matrix3): UniformNode<"mat3", Matrix3>;
|
|
99
|
+
(value: Matrix4): UniformNode<"mat4", Matrix4>;
|
|
100
|
+
(value: Color): UniformNode<"color", Color>;
|
|
101
|
+
<TNodeType, TValue>(value: InputNode<TNodeType, TValue>): UniformNode<TNodeType, TValue>;
|
|
102
|
+
}
|
|
103
|
+
|
|
65
104
|
/**
|
|
66
105
|
* TSL function for creating a uniform node.
|
|
67
106
|
*
|
|
68
|
-
* @tsl
|
|
69
107
|
* @function
|
|
70
108
|
* @param {any|string} value - The value of this uniform or your type. Usually a JS primitive or three.js object (vector, matrix, color, texture).
|
|
71
109
|
* @param {string} [type] - The node type. If no explicit type is defined, the node tries to derive the type from its value.
|
|
72
110
|
* @returns {UniformNode}
|
|
73
111
|
*/
|
|
74
|
-
export declare const uniform:
|
|
112
|
+
export declare const uniform: Uniform;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Node from "./Node.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface VarNodeInterface {
|
|
4
4
|
node: Node;
|
|
5
5
|
name: string | null;
|
|
6
6
|
|
|
@@ -10,29 +10,30 @@ declare class VarNode extends Node {
|
|
|
10
10
|
|
|
11
11
|
intent: boolean;
|
|
12
12
|
|
|
13
|
-
constructor(node: Node, name?: string | null, readOnly?: boolean);
|
|
14
|
-
|
|
15
13
|
setIntent(value: boolean): this;
|
|
16
14
|
getIntent(): boolean;
|
|
17
15
|
}
|
|
18
16
|
|
|
17
|
+
declare const VarNode: {
|
|
18
|
+
new<TNodeType>(node: Node<TNodeType>, name?: string | null, readOnly?: boolean): VarNode<TNodeType>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type VarNode<TNodeType = unknown> = Node<TNodeType> & VarNodeInterface;
|
|
22
|
+
|
|
19
23
|
export default VarNode;
|
|
20
24
|
|
|
21
|
-
export const Var: (node: Node
|
|
25
|
+
export const Var: <TNodeType>(node: Node<TNodeType>, name?: string | null) => VarNode<TNodeType>;
|
|
22
26
|
|
|
23
|
-
export const Const: (node: Node
|
|
27
|
+
export const Const: <TNodeType>(node: Node<TNodeType>, name?: string | null) => VarNode<TNodeType>;
|
|
24
28
|
|
|
25
|
-
export const VarIntent: (node: Node) => Node
|
|
29
|
+
export const VarIntent: <TNodeType>(node: Node<TNodeType>) => Node<TNodeType>;
|
|
26
30
|
|
|
27
|
-
declare module "
|
|
28
|
-
interface
|
|
29
|
-
toVar: (name?: string | null) => VarNode
|
|
30
|
-
toVarAssign: (name?: string | null) => this;
|
|
31
|
+
declare module "./Node.js" {
|
|
32
|
+
interface NodeExtensions<TNodeType> {
|
|
33
|
+
toVar: (name?: string | null) => VarNode<TNodeType>;
|
|
31
34
|
|
|
32
|
-
toConst: (name?: string | null) => VarNode
|
|
33
|
-
toConstAssign: (name?: string | null) => this;
|
|
35
|
+
toConst: (name?: string | null) => VarNode<TNodeType>;
|
|
34
36
|
|
|
35
|
-
toVarIntent: () => Node
|
|
36
|
-
toVarIntentAssign: () => this;
|
|
37
|
+
toVarIntent: () => Node<TNodeType>;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -3,39 +3,34 @@ import Node from "./Node.js";
|
|
|
3
3
|
import NodeBuilder from "./NodeBuilder.js";
|
|
4
4
|
import NodeVarying from "./NodeVarying.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface VaryingNodeInterface {
|
|
7
7
|
node: Node;
|
|
8
8
|
name: string | null;
|
|
9
9
|
readonly isVaryingNode: true;
|
|
10
10
|
interpolationType: InterpolationSamplingType | null;
|
|
11
11
|
interpolationSampling: InterpolationSamplingMode | null;
|
|
12
12
|
|
|
13
|
-
constructor(node: Node, name?: string | null);
|
|
14
|
-
|
|
15
13
|
setInterpolation(type: InterpolationSamplingType | null, sampling?: InterpolationSamplingMode | null): this;
|
|
16
14
|
|
|
17
15
|
setupVarying(builder: NodeBuilder): NodeVarying;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
declare const VaryingNode: {
|
|
19
|
+
new<TNodeType>(node: Node<TNodeType>, name?: string | null): VaryingNode<TNodeType>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type VaryingNode<TNodeType> = VaryingNodeInterface & Node<TNodeType>;
|
|
23
|
+
|
|
24
|
+
export default VaryingNode;
|
|
21
25
|
|
|
22
|
-
export const
|
|
26
|
+
export const varying: <TNodeType>(node: Node<TNodeType>, name?: string) => VaryingNode<TNodeType>;
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
interface Node {
|
|
26
|
-
toVarying: (name?: string) => VaryingNode;
|
|
27
|
-
toVaryingAssign: (name?: string) => this;
|
|
28
|
+
export const vertexStage: <TNodeType>(node: Node<TNodeType>) => VaryingNode<TNodeType>;
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
declare module "./Node.js" {
|
|
31
|
+
interface NodeExtensions<TNodeType> {
|
|
32
|
+
toVarying: (name?: string) => VaryingNode<TNodeType>;
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
* @deprecated .vertexStage() has been renamed to .toVertexStage().
|
|
34
|
-
*/
|
|
35
|
-
vertexStage: () => VaryingNode;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated .vertexStage() has been renamed to .toVertexStage().
|
|
38
|
-
*/
|
|
39
|
-
vertexStageAssign: () => this;
|
|
34
|
+
toVertexStage: () => VaryingNode<TNodeType>;
|
|
40
35
|
}
|
|
41
36
|
}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* @property {string} VERTEX The vertex shader stage.
|
|
5
5
|
* @property {string} FRAGMENT The fragment shader stage.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export const NodeShaderStage: {
|
|
8
8
|
readonly VERTEX: "vertex";
|
|
9
9
|
readonly FRAGMENT: "fragment";
|
|
10
10
|
};
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* Update types of a node.
|
|
13
14
|
*
|
|
@@ -16,12 +17,13 @@ export declare const NodeShaderStage: {
|
|
|
16
17
|
* @property {string} RENDER The update method is executed per render. A frame might be produced by multiple render calls so this value allows more detailed updates than FRAME.
|
|
17
18
|
* @property {string} OBJECT The update method is executed per {@link Object3D} that uses the node for rendering.
|
|
18
19
|
*/
|
|
19
|
-
export
|
|
20
|
+
export const NodeUpdateType: {
|
|
20
21
|
readonly NONE: "none";
|
|
21
22
|
readonly FRAME: "frame";
|
|
22
23
|
readonly RENDER: "render";
|
|
23
24
|
readonly OBJECT: "object";
|
|
24
25
|
};
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
* Data types of a node.
|
|
27
29
|
*
|
|
@@ -35,7 +37,7 @@ export declare const NodeUpdateType: {
|
|
|
35
37
|
* @property {string} MATRIX3 3x3 matrix type.
|
|
36
38
|
* @property {string} MATRIX4 4x4 matrix type.
|
|
37
39
|
*/
|
|
38
|
-
export
|
|
40
|
+
export const NodeType: {
|
|
39
41
|
readonly BOOLEAN: "bool";
|
|
40
42
|
readonly INTEGER: "int";
|
|
41
43
|
readonly FLOAT: "float";
|
|
@@ -46,6 +48,7 @@ export declare const NodeType: {
|
|
|
46
48
|
readonly MATRIX3: "mat3";
|
|
47
49
|
readonly MATRIX4: "mat4";
|
|
48
50
|
};
|
|
51
|
+
|
|
49
52
|
/**
|
|
50
53
|
* Access types of a node. These are relevant for compute and storage usage.
|
|
51
54
|
*
|
|
@@ -53,14 +56,16 @@ export declare const NodeType: {
|
|
|
53
56
|
* @property {string} WRITE_ONLY Write-only access.
|
|
54
57
|
* @property {string} READ_WRITE Read and write access.
|
|
55
58
|
*/
|
|
56
|
-
export
|
|
59
|
+
export const NodeAccess: {
|
|
57
60
|
readonly READ_ONLY: "readOnly";
|
|
58
61
|
readonly WRITE_ONLY: "writeOnly";
|
|
59
62
|
readonly READ_WRITE: "readWrite";
|
|
60
63
|
};
|
|
64
|
+
|
|
61
65
|
export type NodeShaderStage = "vertex" | "fragment" | "compute";
|
|
62
66
|
export type NodeUpdateType = "none" | "frame" | "render" | "object";
|
|
63
67
|
export type NodeAccess = "readOnly" | "writeOnly" | "readWrite";
|
|
68
|
+
|
|
64
69
|
export declare const defaultShaderStages: NodeShaderStage[];
|
|
65
70
|
export declare const defaultBuildStages: string[];
|
|
66
71
|
export declare const shaderStages: NodeShaderStage[];
|