@types/three 0.184.1 → 0.185.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 +2 -0
- three/examples/jsm/controls/FirstPersonControls.d.ts +9 -0
- three/examples/jsm/controls/OrbitControls.d.ts +2 -2
- three/examples/jsm/controls/TransformControls.d.ts +32 -1
- three/examples/jsm/csm/CSMFrustum.d.ts +73 -13
- three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +2 -2
- three/examples/jsm/exporters/PLYExporter.d.ts +5 -4
- three/examples/jsm/exporters/USDZExporter.d.ts +5 -1
- three/examples/jsm/generators/CityGenerator.d.ts +75 -0
- three/examples/jsm/generators/ForestGenerator.d.ts +79 -0
- three/examples/jsm/generators/TerrainGenerator.d.ts +67 -0
- three/examples/jsm/generators/TreeGenerator.d.ts +97 -0
- three/examples/jsm/generators/city/SidewalkGenerator.d.ts +40 -0
- three/examples/jsm/generators/city/SkyscraperGenerator.d.ts +83 -0
- three/examples/jsm/geometries/LoftGeometry.d.ts +83 -0
- three/examples/jsm/inspector/tabs/Parameters.d.ts +5 -2
- three/examples/jsm/lighting/ClusteredLighting.d.ts +45 -0
- three/examples/jsm/lighting/LightProbeGrid.d.ts +131 -13
- three/examples/jsm/loaders/DRACOLoader.d.ts +20 -6
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -12
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
- three/examples/jsm/loaders/HDRLoader.d.ts +2 -12
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -1
- three/examples/jsm/loaders/LWOLoader.d.ts +6 -0
- three/examples/jsm/loaders/RGBELoader.d.ts +1 -7
- three/examples/jsm/loaders/SVGLoader.d.ts +9 -6
- three/examples/jsm/loaders/TGALoader.d.ts +2 -2
- three/examples/jsm/loaders/TIFFLoader.d.ts +2 -11
- three/examples/jsm/loaders/USDLoader.d.ts +6 -1
- three/examples/jsm/misc/TileCreasedNormalsPlugin.d.ts +49 -0
- three/examples/jsm/objects/MarchingCubes.d.ts +2 -2
- three/examples/jsm/objects/Reflector.d.ts +38 -5
- three/examples/jsm/objects/SkyMesh.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/tsl/display/BloomNode.d.ts +23 -6
- three/examples/jsm/tsl/display/ImportanceSampledEnvironment.d.ts +84 -0
- three/examples/jsm/tsl/display/RecurrentDenoiseNode.d.ts +89 -0
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +0 -2
- three/examples/jsm/tsl/display/SSGINode.d.ts +4 -1
- three/examples/jsm/tsl/display/SSRNode.d.ts +303 -30
- three/examples/jsm/tsl/display/TRAANode.d.ts +1 -1
- three/examples/jsm/tsl/display/TemporalReprojectNode.d.ts +64 -0
- three/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +54 -0
- three/examples/jsm/tsl/math/curlNoise.d.ts +38 -0
- three/examples/jsm/tsl/utils/GroundedSkybox.d.ts +17 -0
- three/examples/jsm/tsl/utils/RNoise.d.ts +12 -0
- three/examples/jsm/tsl/utils/SpecularHelpers.d.ts +20 -0
- three/examples/jsm/webxr/WebGLXRFallback.d.ts +14 -0
- three/package.json +3 -3
- three/src/Three.TSL.d.ts +10 -3
- three/src/Three.WebGPU.Nodes.d.ts +2 -2
- three/src/Three.WebGPU.d.ts +5 -3
- three/src/animation/AnimationClip.d.ts +0 -10
- three/src/cameras/Camera.d.ts +1 -1
- three/src/core/InterleavedBuffer.d.ts +1 -1
- three/src/core/Object3D.d.ts +8 -4
- three/src/core/RenderTarget.d.ts +11 -0
- three/src/core/Timer.d.ts +1 -1
- three/src/core/UniformsGroup.d.ts +1 -1
- three/src/extras/Controls.d.ts +6 -5
- three/src/extras/core/ShapePath.d.ts +61 -65
- three/src/loaders/DataTextureLoader.d.ts +37 -3
- three/src/loaders/MaterialLoader.d.ts +8 -0
- three/src/materials/LineBasicMaterial.d.ts +5 -0
- three/src/materials/Material.d.ts +9 -1
- three/src/materials/MeshBasicMaterial.d.ts +30 -0
- three/src/materials/MeshDepthMaterial.d.ts +13 -0
- three/src/materials/MeshDistanceMaterial.d.ts +13 -0
- three/src/materials/MeshLambertMaterial.d.ts +50 -1
- three/src/materials/MeshMatcapMaterial.d.ts +31 -1
- three/src/materials/MeshNormalMaterial.d.ts +11 -1
- three/src/materials/MeshPhongMaterial.d.ts +50 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +50 -0
- three/src/materials/MeshStandardMaterial.d.ts +53 -1
- three/src/materials/MeshToonMaterial.d.ts +43 -1
- three/src/materials/PointsMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +2 -0
- three/src/materials/SpriteMaterial.d.ts +9 -0
- three/src/materials/nodes/Line2NodeMaterial.d.ts +18 -13
- three/src/materials/nodes/NodeMaterial.d.ts +33 -13
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +0 -84
- three/src/math/Box2.d.ts +3 -3
- three/src/math/Box3.d.ts +255 -19
- three/src/math/Color.d.ts +10 -10
- three/src/math/FrustumArray.d.ts +75 -16
- three/src/math/Interpolant.d.ts +111 -8
- three/src/math/Matrix3.d.ts +9 -0
- three/src/math/Matrix4.d.ts +329 -105
- three/src/math/Vector3.d.ts +2 -2
- three/src/math/interpolants/BezierInterpolant.d.ts +19 -3
- three/src/math/interpolants/CubicInterpolant.d.ts +18 -3
- three/src/math/interpolants/DiscreteInterpolant.d.ts +8 -3
- three/src/math/interpolants/LinearInterpolant.d.ts +7 -3
- three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +7 -3
- three/src/nodes/Nodes.d.ts +4 -13
- three/src/nodes/TSL.d.ts +7 -5
- three/src/nodes/accessors/Batch.d.ts +19 -0
- three/src/nodes/accessors/Instance.d.ts +34 -0
- three/src/nodes/accessors/MaterialNode.d.ts +86 -79
- three/src/nodes/accessors/Morph.d.ts +11 -0
- three/src/nodes/accessors/Skinning.d.ts +23 -0
- three/src/nodes/accessors/StorageBufferNode.d.ts +22 -23
- three/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
- three/src/nodes/accessors/StorageTextureNode.d.ts +6 -4
- three/src/nodes/accessors/TextureNode.d.ts +15 -10
- three/src/nodes/core/ArrayNode.d.ts +16 -8
- three/src/nodes/core/ContextNode.d.ts +5 -6
- three/src/nodes/core/LightingModel.d.ts +2 -0
- three/src/nodes/core/Node.d.ts +50 -51
- three/src/nodes/core/NodeBuilder.d.ts +1 -133
- three/src/nodes/core/OverrideContextNode.d.ts +92 -0
- three/src/nodes/core/PropertyNode.d.ts +13 -2
- three/src/nodes/core/StructNode.d.ts +0 -2
- three/src/nodes/core/StructTypeNode.d.ts +5 -4
- three/src/nodes/core/UniformNode.d.ts +48 -9
- three/src/nodes/display/BlendModes.d.ts +72 -11
- three/src/nodes/display/FrontFacingNode.d.ts +62 -3
- three/src/nodes/display/PassNode.d.ts +0 -2
- three/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +53 -45
- three/src/nodes/lighting/LightingContextNode.d.ts +9 -2
- three/src/nodes/lighting/LightsNode.d.ts +4 -4
- three/src/nodes/math/MathNode.d.ts +358 -304
- three/src/nodes/math/OperatorNode.d.ts +253 -82
- three/src/nodes/tsl/TSLCore.d.ts +16 -9
- three/src/nodes/utils/ArrayElementNode.d.ts +5 -4
- three/src/nodes/utils/EquirectUV.d.ts +31 -1
- three/src/nodes/utils/Packing.d.ts +50 -3
- three/src/nodes/utils/RTTNode.d.ts +7 -12
- three/src/nodes/utils/Remap.d.ts +216 -29
- three/src/nodes/utils/SampleNode.d.ts +18 -8
- three/src/objects/BatchedMesh.d.ts +1 -1
- three/src/objects/InstancedMesh.d.ts +0 -8
- three/src/objects/Skeleton.d.ts +0 -2
- three/src/renderers/common/Backend.d.ts +0 -3
- three/src/renderers/common/CanvasTarget.d.ts +0 -49
- three/src/renderers/common/ClippingContext.d.ts +6 -1
- three/src/renderers/common/CubeRenderTarget.d.ts +2 -1
- three/src/renderers/common/Info.d.ts +26 -66
- three/src/renderers/common/InspectorBase.d.ts +0 -7
- three/src/renderers/common/Lighting.d.ts +49 -5
- three/src/renderers/common/Renderer.d.ts +34 -458
- three/src/renderers/common/RendererUtils.d.ts +1 -2
- three/src/renderers/common/TimestampQueryPool.d.ts +1 -1
- three/src/renderers/common/XRManager.d.ts +32 -299
- three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -117
- three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
- three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -1
- three/src/renderers/webgl/WebGLState.d.ts +2 -0
- three/src/renderers/webgl-fallback/WebGLBackend.d.ts +1 -1
- three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +0 -10
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +0 -1
- three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +5 -121
- three/src/textures/CubeDepthTexture.d.ts +2 -3
- three/src/textures/DataTexture.d.ts +2 -1
- three/src/textures/DepthTexture.d.ts +5 -5
- three/examples/jsm/lighting/TiledLighting.d.ts +0 -9
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +0 -31
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +0 -22
- three/src/nodes/accessors/BatchNode.d.ts +0 -12
- three/src/nodes/accessors/InstanceNode.d.ts +0 -30
- three/src/nodes/accessors/InstancedMeshNode.d.ts +0 -10
- three/src/nodes/accessors/MorphNode.d.ts +0 -14
- three/src/nodes/accessors/SkinningNode.d.ts +0 -32
- three/src/renderers/common/Animation.d.ts +0 -102
- three/src/renderers/common/Attributes.d.ts +0 -59
- three/src/renderers/common/Background.d.ts +0 -47
- three/src/renderers/common/BindGroup.d.ts +0 -39
- three/src/renderers/common/Binding.d.ts +0 -50
- three/src/renderers/common/Bindings.d.ts +0 -132
- three/src/renderers/common/Buffer.d.ts +0 -90
- three/src/renderers/common/ChainMap.d.ts +0 -49
- three/src/renderers/common/Color4.d.ts +0 -55
- three/src/renderers/common/ComputePipeline.d.ts +0 -34
- three/src/renderers/common/DataMap.d.ts +0 -42
- three/src/renderers/common/Geometries.d.ts +0 -111
- three/src/renderers/common/Pipeline.d.ts +0 -29
- three/src/renderers/common/Pipelines.d.ts +0 -186
- three/src/renderers/common/ProgrammableStage.d.ts +0 -73
- three/src/renderers/common/RenderBundle.d.ts +0 -25
- three/src/renderers/common/RenderBundles.d.ts +0 -34
- three/src/renderers/common/RenderContext.d.ts +0 -235
- three/src/renderers/common/RenderContexts.d.ts +0 -47
- three/src/renderers/common/RenderList.d.ts +0 -226
- three/src/renderers/common/RenderLists.d.ts +0 -46
- three/src/renderers/common/RenderObject.d.ts +0 -448
- three/src/renderers/common/RenderObjectPipeline.d.ts +0 -33
- three/src/renderers/common/RenderObjects.d.ts +0 -151
- three/src/renderers/common/SampledTexture.d.ts +0 -28
- three/src/renderers/common/Sampler.d.ts +0 -19
- three/src/renderers/common/Textures.d.ts +0 -125
- three/src/renderers/common/Uniform.d.ts +0 -262
- three/src/renderers/common/UniformBuffer.d.ts +0 -20
- three/src/renderers/common/UniformsGroup.d.ts +0 -152
- three/src/renderers/common/XRRenderTarget.d.ts +0 -67
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +0 -121
- three/src/renderers/common/nodes/NodeManager.d.ts +0 -309
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +0 -29
- three/src/renderers/common/nodes/NodeSampler.d.ts +0 -12
- three/src/renderers/common/nodes/NodeUniform.d.ts +0 -250
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -41
- three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -6
- three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -6
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { TypedArray } from "../../core/BufferAttribute.js";
|
|
1
2
|
import { Interpolant } from "../Interpolant.js";
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Spherical linear unit quaternion interpolant.
|
|
6
|
+
*
|
|
7
|
+
* @augments Interpolant
|
|
8
|
+
*/
|
|
3
9
|
export class QuaternionLinearInterpolant extends Interpolant {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interpolate_(i1: number, t0: number, t: number, t1: number): any;
|
|
10
|
+
interpolate_(i1: number, t0: number, t: number, t1: number): TypedArray;
|
|
7
11
|
}
|
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -21,13 +21,7 @@ export {
|
|
|
21
21
|
export { default as MRTNode } from "./core/MRTNode.js";
|
|
22
22
|
export { default as Node, NodeJSONInputData, NodeJSONIntermediateOutputData } from "./core/Node.js";
|
|
23
23
|
export { default as NodeAttribute } from "./core/NodeAttribute.js";
|
|
24
|
-
export {
|
|
25
|
-
BuildStageOption,
|
|
26
|
-
default as NodeBuilder,
|
|
27
|
-
FlowData,
|
|
28
|
-
NodeBuilderContext,
|
|
29
|
-
NodeData,
|
|
30
|
-
} from "./core/NodeBuilder.js";
|
|
24
|
+
export { default as NodeBuilder } from "./core/NodeBuilder.js";
|
|
31
25
|
export { default as NodeCache } from "./core/NodeCache.js";
|
|
32
26
|
export { default as NodeCode } from "./core/NodeCode.js";
|
|
33
27
|
export { default as NodeError } from "./core/NodeError.js";
|
|
@@ -37,6 +31,7 @@ export { default as NodeUniform } from "./core/NodeUniform.js";
|
|
|
37
31
|
export { default as NodeVar } from "./core/NodeVar.js";
|
|
38
32
|
export { default as NodeVarying } from "./core/NodeVarying.js";
|
|
39
33
|
export { default as OutputStructNode } from "./core/OutputStructNode.js";
|
|
34
|
+
export { default as OverrideContextNode } from "./core/OverrideContextNode.js";
|
|
40
35
|
export { default as ParameterNode } from "./core/ParameterNode.js";
|
|
41
36
|
export { default as PropertyNode } from "./core/PropertyNode.js";
|
|
42
37
|
export { default as StackNode } from "./core/StackNode.js";
|
|
@@ -54,25 +49,21 @@ import * as NodeUtils from "./core/NodeUtils.js";
|
|
|
54
49
|
export { NodeUtils };
|
|
55
50
|
|
|
56
51
|
// accessors
|
|
57
|
-
export { default as BatchNode } from "./accessors/BatchNode.js";
|
|
58
52
|
export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js";
|
|
59
53
|
export { default as BufferNode } from "./accessors/BufferNode.js";
|
|
60
54
|
export { default as BuiltinNode } from "./accessors/BuiltinNode.js";
|
|
61
55
|
export { default as ClippingNode } from "./accessors/ClippingNode.js";
|
|
62
56
|
export { default as CubeTextureNode } from "./accessors/CubeTextureNode.js";
|
|
63
|
-
export { default as InstancedMeshNode } from "./accessors/InstancedMeshNode.js";
|
|
64
|
-
export { default as InstanceNode } from "./accessors/InstanceNode.js";
|
|
65
57
|
export { default as MaterialNode, MaterialNodeScope } from "./accessors/MaterialNode.js";
|
|
66
58
|
export { default as MaterialReferenceNode } from "./accessors/MaterialReferenceNode.js";
|
|
67
59
|
export { default as ModelNode } from "./accessors/ModelNode.js";
|
|
68
|
-
export { default as MorphNode } from "./accessors/MorphNode.js";
|
|
69
60
|
export { default as Object3DNode } from "./accessors/Object3DNode.js";
|
|
70
61
|
export { default as PointUVNode } from "./accessors/PointUVNode.js";
|
|
71
62
|
export { default as ReferenceBaseNode } from "./accessors/ReferenceBaseNode.js";
|
|
72
63
|
export { default as ReferenceNode } from "./accessors/ReferenceNode.js";
|
|
73
64
|
export { default as RendererReferenceNode } from "./accessors/RendererReferenceNode.js";
|
|
74
|
-
export { default as SkinningNode } from "./accessors/SkinningNode.js";
|
|
75
65
|
export { default as StorageBufferNode } from "./accessors/StorageBufferNode.js";
|
|
66
|
+
export { default as StorageTexture3DNode } from "./accessors/StorageTexture3DNode.js";
|
|
76
67
|
export { default as StorageTextureNode } from "./accessors/StorageTextureNode.js";
|
|
77
68
|
export { default as Texture3DNode } from "./accessors/Texture3DNode.js";
|
|
78
69
|
export { default as TextureNode } from "./accessors/TextureNode.js";
|
|
@@ -166,7 +157,7 @@ export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js";
|
|
|
166
157
|
export { default as MemberNode } from "./utils/MemberNode.js";
|
|
167
158
|
export { default as ReflectorNode, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
|
|
168
159
|
export { default as RotateNode } from "./utils/RotateNode.js";
|
|
169
|
-
export { default as RTTNode
|
|
160
|
+
export { default as RTTNode } from "./utils/RTTNode.js";
|
|
170
161
|
export { default as SampleNode } from "./utils/SampleNode.js";
|
|
171
162
|
export { default as SetNode } from "./utils/SetNode.js";
|
|
172
163
|
export { default as SplitNode } from "./utils/SplitNode.js";
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./core/IndexNode.js";
|
|
|
10
10
|
export * from "./core/IsolateNode.js";
|
|
11
11
|
export * from "./core/MRTNode.js";
|
|
12
12
|
export * from "./core/OutputStructNode.js";
|
|
13
|
+
export * from "./core/OverrideContextNode.js";
|
|
13
14
|
export * from "./core/ParameterNode.js";
|
|
14
15
|
export * from "./core/PropertyNode.js";
|
|
15
16
|
export * from "./core/StackNode.js";
|
|
@@ -55,21 +56,20 @@ export * from "./tsl/TSLBase.js";
|
|
|
55
56
|
// accessors
|
|
56
57
|
export * from "./accessors/AccessorsUtils.js";
|
|
57
58
|
export * from "./accessors/Arrays.js";
|
|
58
|
-
export * from "./accessors/
|
|
59
|
+
export * from "./accessors/Batch.js";
|
|
59
60
|
export * from "./accessors/Bitangent.js";
|
|
60
61
|
export * from "./accessors/BufferAttributeNode.js";
|
|
61
62
|
export * from "./accessors/BufferNode.js";
|
|
62
63
|
export * from "./accessors/BuiltinNode.js";
|
|
63
64
|
export * from "./accessors/Camera.js";
|
|
64
65
|
export * from "./accessors/CubeTextureNode.js";
|
|
65
|
-
export * from "./accessors/
|
|
66
|
-
export * from "./accessors/InstanceNode.js";
|
|
66
|
+
export * from "./accessors/Instance.js";
|
|
67
67
|
export * from "./accessors/MaterialNode.js";
|
|
68
68
|
export * from "./accessors/MaterialProperties.js";
|
|
69
69
|
export * from "./accessors/MaterialReferenceNode.js";
|
|
70
70
|
export * from "./accessors/ModelNode.js";
|
|
71
71
|
export * from "./accessors/ModelViewProjectionNode.js";
|
|
72
|
-
export * from "./accessors/
|
|
72
|
+
export * from "./accessors/Morph.js";
|
|
73
73
|
export * from "./accessors/Normal.js";
|
|
74
74
|
export * from "./accessors/Object3DNode.js";
|
|
75
75
|
export * from "./accessors/PointUVNode.js";
|
|
@@ -78,8 +78,9 @@ export * from "./accessors/ReferenceNode.js";
|
|
|
78
78
|
export * from "./accessors/ReflectVector.js";
|
|
79
79
|
export * from "./accessors/RendererReferenceNode.js";
|
|
80
80
|
export * from "./accessors/SceneProperties.js";
|
|
81
|
-
export * from "./accessors/
|
|
81
|
+
export * from "./accessors/Skinning.js";
|
|
82
82
|
export * from "./accessors/StorageBufferNode.js";
|
|
83
|
+
export * from "./accessors/StorageTexture3DNode.js";
|
|
83
84
|
export * from "./accessors/StorageTextureNode.js";
|
|
84
85
|
export * from "./accessors/Tangent.js";
|
|
85
86
|
export * from "./accessors/Texture3DNode.js";
|
|
@@ -99,6 +100,7 @@ export * from "./display/ColorAdjustment.js";
|
|
|
99
100
|
export * from "./display/ColorSpaceNode.js";
|
|
100
101
|
export * from "./display/FrontFacingNode.js";
|
|
101
102
|
export * from "./display/NormalMapNode.js";
|
|
103
|
+
export * from "./display/PremultiplyAlphaFunctions.js";
|
|
102
104
|
export * from "./display/RenderOutputNode.js";
|
|
103
105
|
export * from "./display/ScreenNode.js";
|
|
104
106
|
export * from "./display/ToneMappingNode.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BatchedMesh } from "../../objects/BatchedMesh.js";
|
|
2
|
+
import VaryingNode from "../core/VaryingNode.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TSL object representing a varying property for the batching color vector.
|
|
6
|
+
*
|
|
7
|
+
* @type {VaryingNode<vec4>}
|
|
8
|
+
*/
|
|
9
|
+
export const batchColor: VaryingNode<"vec4">;
|
|
10
|
+
/**
|
|
11
|
+
* TSL function representing the vertex shader batching setup.
|
|
12
|
+
* Applies the batch transformation matrix to positionLocal, normalLocal, and tangentLocal.
|
|
13
|
+
* Also assigns the batch color if a color texture is present.
|
|
14
|
+
*
|
|
15
|
+
* @tsl
|
|
16
|
+
* @function
|
|
17
|
+
* @param {BatchedMesh} batchMesh - The batched mesh.
|
|
18
|
+
*/
|
|
19
|
+
export const batch: (batchMesh: BatchedMesh) => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InstancedBufferAttribute } from "../../core/InstancedBufferAttribute.js";
|
|
2
|
+
import { InstancedMesh } from "../../objects/InstancedMesh.js";
|
|
3
|
+
import StorageInstancedBufferAttribute from "../../renderers/common/StorageInstancedBufferAttribute.js";
|
|
4
|
+
import VaryingNode from "../core/VaryingNode.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* TSL object representing a varying property for the instanced color vector.
|
|
8
|
+
*
|
|
9
|
+
* @type {VaryingNode<vec3>}
|
|
10
|
+
*/
|
|
11
|
+
export const instanceColor: VaryingNode<"vec3">;
|
|
12
|
+
/**
|
|
13
|
+
* TSL function representing the standard instancing vertex shader setup.
|
|
14
|
+
* Transforms positionLocal and normalLocal, and assigns varying color in-place.
|
|
15
|
+
*
|
|
16
|
+
* @tsl
|
|
17
|
+
* @function
|
|
18
|
+
* @param {number} count - The instance count.
|
|
19
|
+
* @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} matrices - The instanced transformation matrices.
|
|
20
|
+
* @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} [colors=null] - The optional instanced colors.
|
|
21
|
+
*/
|
|
22
|
+
export const instance: (
|
|
23
|
+
count: number,
|
|
24
|
+
matrices: InstancedBufferAttribute | StorageInstancedBufferAttribute,
|
|
25
|
+
colors?: InstancedBufferAttribute | StorageInstancedBufferAttribute | null,
|
|
26
|
+
) => void;
|
|
27
|
+
/**
|
|
28
|
+
* TSL wrapper for applying instanced mesh rendering setup.
|
|
29
|
+
*
|
|
30
|
+
* @tsl
|
|
31
|
+
* @function
|
|
32
|
+
* @param {InstancedMesh} instancedMesh - The instanced mesh.
|
|
33
|
+
*/
|
|
34
|
+
export const instancedMesh: (instancedMesh: InstancedMesh) => void;
|
|
@@ -40,87 +40,94 @@ export type MaterialNodeScope =
|
|
|
40
40
|
| typeof MaterialNode.AO
|
|
41
41
|
| typeof MaterialNode.REFRACTION_RATIO;
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
static ALPHA_TEST: "alphaTest";
|
|
45
|
-
static COLOR: "color";
|
|
46
|
-
static OPACITY: "opacity";
|
|
47
|
-
static SHININESS: "shininess";
|
|
48
|
-
static SPECULAR: "specular";
|
|
49
|
-
static SPECULAR_STRENGTH: "specularStrength";
|
|
50
|
-
static SPECULAR_INTENSITY: "specularIntensity";
|
|
51
|
-
static SPECULAR_COLOR: "specularColor";
|
|
52
|
-
static REFLECTIVITY: "reflectivity";
|
|
53
|
-
static ROUGHNESS: "roughness";
|
|
54
|
-
static METALNESS: "metalness";
|
|
55
|
-
static NORMAL: "normal";
|
|
56
|
-
static CLEARCOAT: "clearcoat";
|
|
57
|
-
static CLEARCOAT_ROUGHNESS: "clearcoatRoughness";
|
|
58
|
-
static CLEARCOAT_NORMAL: "clearcoatNormal";
|
|
59
|
-
static EMISSIVE: "emissive";
|
|
60
|
-
static ROTATION: "rotation";
|
|
61
|
-
static SHEEN: "sheen";
|
|
62
|
-
static SHEEN_ROUGHNESS: "sheenRoughness";
|
|
63
|
-
static ANISOTROPY: "anisotropy";
|
|
64
|
-
static IRIDESCENCE: "iridescence";
|
|
65
|
-
static IRIDESCENCE_IOR: "iridescenceIOR";
|
|
66
|
-
static IRIDESCENCE_THICKNESS: "iridescenceThickness";
|
|
67
|
-
static IOR: "ior";
|
|
68
|
-
static TRANSMISSION: "transmission";
|
|
69
|
-
static THICKNESS: "thickness";
|
|
70
|
-
static ATTENUATION_DISTANCE: "attenuationDistance";
|
|
71
|
-
static ATTENUATION_COLOR: "attenuationColor";
|
|
72
|
-
static LINE_SCALE: "scale";
|
|
73
|
-
static LINE_DASH_SIZE: "dashSize";
|
|
74
|
-
static LINE_GAP_SIZE: "gapSize";
|
|
75
|
-
static LINE_WIDTH: "linewidth";
|
|
76
|
-
static LINE_DASH_OFFSET: "dashOffset";
|
|
77
|
-
static POINT_SIZE: "size";
|
|
78
|
-
static DISPERSION: "dispersion";
|
|
79
|
-
static LIGHT_MAP: "light";
|
|
80
|
-
static AO: "ao";
|
|
81
|
-
static REFRACTION_RATIO: "refractionRatio";
|
|
82
|
-
|
|
43
|
+
interface MaterialNodeInterface {
|
|
83
44
|
scope: MaterialNodeScope;
|
|
84
|
-
constructor(scope?: MaterialNodeScope);
|
|
85
45
|
}
|
|
86
46
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
47
|
+
declare const MaterialNode: {
|
|
48
|
+
new<TNodeType>(scope: MaterialNodeScope): MaterialNode<TNodeType>;
|
|
49
|
+
|
|
50
|
+
ALPHA_TEST: "alphaTest";
|
|
51
|
+
COLOR: "color";
|
|
52
|
+
OPACITY: "opacity";
|
|
53
|
+
SHININESS: "shininess";
|
|
54
|
+
SPECULAR: "specular";
|
|
55
|
+
SPECULAR_STRENGTH: "specularStrength";
|
|
56
|
+
SPECULAR_INTENSITY: "specularIntensity";
|
|
57
|
+
SPECULAR_COLOR: "specularColor";
|
|
58
|
+
REFLECTIVITY: "reflectivity";
|
|
59
|
+
ROUGHNESS: "roughness";
|
|
60
|
+
METALNESS: "metalness";
|
|
61
|
+
NORMAL: "normal";
|
|
62
|
+
CLEARCOAT: "clearcoat";
|
|
63
|
+
CLEARCOAT_ROUGHNESS: "clearcoatRoughness";
|
|
64
|
+
CLEARCOAT_NORMAL: "clearcoatNormal";
|
|
65
|
+
EMISSIVE: "emissive";
|
|
66
|
+
ROTATION: "rotation";
|
|
67
|
+
SHEEN: "sheen";
|
|
68
|
+
SHEEN_ROUGHNESS: "sheenRoughness";
|
|
69
|
+
ANISOTROPY: "anisotropy";
|
|
70
|
+
IRIDESCENCE: "iridescence";
|
|
71
|
+
IRIDESCENCE_IOR: "iridescenceIOR";
|
|
72
|
+
IRIDESCENCE_THICKNESS: "iridescenceThickness";
|
|
73
|
+
IOR: "ior";
|
|
74
|
+
TRANSMISSION: "transmission";
|
|
75
|
+
THICKNESS: "thickness";
|
|
76
|
+
ATTENUATION_DISTANCE: "attenuationDistance";
|
|
77
|
+
ATTENUATION_COLOR: "attenuationColor";
|
|
78
|
+
LINE_SCALE: "scale";
|
|
79
|
+
LINE_DASH_SIZE: "dashSize";
|
|
80
|
+
LINE_GAP_SIZE: "gapSize";
|
|
81
|
+
LINE_WIDTH: "linewidth";
|
|
82
|
+
LINE_DASH_OFFSET: "dashOffset";
|
|
83
|
+
POINT_SIZE: "size";
|
|
84
|
+
DISPERSION: "dispersion";
|
|
85
|
+
LIGHT_MAP: "light";
|
|
86
|
+
AO: "ao";
|
|
87
|
+
REFRACTION_RATIO: "refractionRatio";
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
type MaterialNode<TNodeType> = MaterialNodeInterface & Node<TNodeType>;
|
|
91
|
+
|
|
92
|
+
export default MaterialNode;
|
|
93
|
+
|
|
94
|
+
export const materialAlphaTest: MaterialNode<"float">;
|
|
95
|
+
export const materialColor: MaterialNode<"vec3">;
|
|
96
|
+
export const materialShininess: MaterialNode<"float">;
|
|
97
|
+
export const materialEmissive: MaterialNode<"vec3">;
|
|
98
|
+
export const materialOpacity: MaterialNode<"float">;
|
|
99
|
+
export const materialSpecular: MaterialNode<"vec3">;
|
|
93
100
|
|
|
94
|
-
export const materialSpecularIntensity: MaterialNode
|
|
95
|
-
export const materialSpecularColor: MaterialNode
|
|
101
|
+
export const materialSpecularIntensity: MaterialNode<"float">;
|
|
102
|
+
export const materialSpecularColor: MaterialNode<"vec3">;
|
|
96
103
|
|
|
97
|
-
export const materialSpecularStrength: MaterialNode
|
|
98
|
-
export const materialReflectivity: MaterialNode
|
|
99
|
-
export const materialRoughness: MaterialNode
|
|
100
|
-
export const materialMetalness: MaterialNode
|
|
101
|
-
export const materialNormal:
|
|
102
|
-
export const materialClearcoat: MaterialNode
|
|
103
|
-
export const materialClearcoatRoughness: MaterialNode
|
|
104
|
-
export const materialClearcoatNormal:
|
|
105
|
-
export const materialRotation: MaterialNode
|
|
106
|
-
export const materialSheen: MaterialNode
|
|
107
|
-
export const materialSheenRoughness: MaterialNode
|
|
108
|
-
export const materialAnisotropy: MaterialNode
|
|
109
|
-
export const materialIridescence: MaterialNode
|
|
110
|
-
export const materialIridescenceIOR: MaterialNode
|
|
111
|
-
export const materialIridescenceThickness: MaterialNode
|
|
112
|
-
export const materialTransmission: MaterialNode
|
|
113
|
-
export const materialThickness: MaterialNode
|
|
114
|
-
export const materialIOR: MaterialNode
|
|
115
|
-
export const materialAttenuationDistance: MaterialNode
|
|
116
|
-
export const materialAttenuationColor: MaterialNode
|
|
117
|
-
export const materialLineScale: MaterialNode
|
|
118
|
-
export const materialLineDashSize: MaterialNode
|
|
119
|
-
export const materialLineGapSize: MaterialNode
|
|
120
|
-
export const materialLineWidth: MaterialNode
|
|
121
|
-
export const materialLineDashOffset: MaterialNode
|
|
122
|
-
export const materialPointSize: MaterialNode
|
|
123
|
-
export const materialDispersion: MaterialNode
|
|
124
|
-
export const materialLightMap: MaterialNode
|
|
125
|
-
export const materialAO: MaterialNode
|
|
126
|
-
export const materialAnisotropyVector:
|
|
104
|
+
export const materialSpecularStrength: MaterialNode<"float">;
|
|
105
|
+
export const materialReflectivity: MaterialNode<"float">;
|
|
106
|
+
export const materialRoughness: MaterialNode<"float">;
|
|
107
|
+
export const materialMetalness: MaterialNode<"float">;
|
|
108
|
+
export const materialNormal: MaterialNode<"vec3">;
|
|
109
|
+
export const materialClearcoat: MaterialNode<"float">;
|
|
110
|
+
export const materialClearcoatRoughness: MaterialNode<"float">;
|
|
111
|
+
export const materialClearcoatNormal: MaterialNode<"vec3">;
|
|
112
|
+
export const materialRotation: MaterialNode<"float">;
|
|
113
|
+
export const materialSheen: MaterialNode<"vec3">;
|
|
114
|
+
export const materialSheenRoughness: MaterialNode<"float">;
|
|
115
|
+
export const materialAnisotropy: MaterialNode<"vec2">;
|
|
116
|
+
export const materialIridescence: MaterialNode<"float">;
|
|
117
|
+
export const materialIridescenceIOR: MaterialNode<"float">;
|
|
118
|
+
export const materialIridescenceThickness: MaterialNode<"float">;
|
|
119
|
+
export const materialTransmission: MaterialNode<"float">;
|
|
120
|
+
export const materialThickness: MaterialNode<"float">;
|
|
121
|
+
export const materialIOR: MaterialNode<"float">;
|
|
122
|
+
export const materialAttenuationDistance: MaterialNode<"float">;
|
|
123
|
+
export const materialAttenuationColor: MaterialNode<"vec3">;
|
|
124
|
+
export const materialLineScale: MaterialNode<"float">;
|
|
125
|
+
export const materialLineDashSize: MaterialNode<"float">;
|
|
126
|
+
export const materialLineGapSize: MaterialNode<"float">;
|
|
127
|
+
export const materialLineWidth: MaterialNode<"float">;
|
|
128
|
+
export const materialLineDashOffset: MaterialNode<"float">;
|
|
129
|
+
export const materialPointSize: MaterialNode<"float">;
|
|
130
|
+
export const materialDispersion: MaterialNode<"float">;
|
|
131
|
+
export const materialLightMap: MaterialNode<"vec3">;
|
|
132
|
+
export const materialAO: MaterialNode<"float">;
|
|
133
|
+
export const materialAnisotropyVector: Node<"vec2">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Mesh } from "../../objects/Mesh.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TSL function representing the vertex shader morph targets blend setup.
|
|
5
|
+
* Dynamically computes morph targets weights and updates positionLocal and normalLocal in-place.
|
|
6
|
+
*
|
|
7
|
+
* @tsl
|
|
8
|
+
* @function
|
|
9
|
+
* @param {Mesh} mesh - The mesh.
|
|
10
|
+
*/
|
|
11
|
+
export const morphReference: (mesh: Mesh) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Vector3 } from "../../math/Vector3.js";
|
|
2
|
+
import { SkinnedMesh } from "../../objects/SkinnedMesh.js";
|
|
3
|
+
import Node from "../core/Node.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* TSL function representing the standard skeletal animation vertex shader setup.
|
|
7
|
+
* Transforms positionLocal, normalLocal, and tangentLocal in-place.
|
|
8
|
+
*
|
|
9
|
+
* @tsl
|
|
10
|
+
* @function
|
|
11
|
+
* @param {SkinnedMesh} skinnedMesh - The skinned mesh.
|
|
12
|
+
*/
|
|
13
|
+
export const skinning: (skinnedMesh: SkinnedMesh) => void;
|
|
14
|
+
/**
|
|
15
|
+
* TSL function that computes skeletal animation for custom compute passes.
|
|
16
|
+
*
|
|
17
|
+
* @tsl
|
|
18
|
+
* @function
|
|
19
|
+
* @param {SkinnedMesh} skinnedMesh - The skinned mesh.
|
|
20
|
+
* @param {Node<vec3>} [toPosition=null] - The target position node to assign.
|
|
21
|
+
* @returns {Node<vec3>} The computed skinned position node.
|
|
22
|
+
*/
|
|
23
|
+
export const computeSkinning: (skinnedMesh: SkinnedMesh, toPosition?: Node<"vec3"> | Vector3 | null) => void;
|
|
@@ -47,32 +47,29 @@ type StorageBufferNode<TNodeType> =
|
|
|
47
47
|
|
|
48
48
|
export default StorageBufferNode;
|
|
49
49
|
|
|
50
|
+
type StorageNodeType =
|
|
51
|
+
| "float"
|
|
52
|
+
| "uint"
|
|
53
|
+
| "int"
|
|
54
|
+
| "vec2"
|
|
55
|
+
| "uvec2"
|
|
56
|
+
| "ivec2"
|
|
57
|
+
| "vec3"
|
|
58
|
+
| "uvec3"
|
|
59
|
+
| "ivec3"
|
|
60
|
+
| "vec4"
|
|
61
|
+
| "uvec4"
|
|
62
|
+
| "ivec4"
|
|
63
|
+
| "mat2"
|
|
64
|
+
| "mat3"
|
|
65
|
+
| "mat4";
|
|
66
|
+
|
|
50
67
|
interface Storage {
|
|
51
|
-
(
|
|
52
|
-
value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
|
|
53
|
-
type: "float",
|
|
54
|
-
count: number,
|
|
55
|
-
): StorageBufferNode<"float">;
|
|
56
|
-
(
|
|
57
|
-
value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
|
|
58
|
-
type: "uint",
|
|
59
|
-
count: number,
|
|
60
|
-
): StorageBufferNode<"uint">;
|
|
61
|
-
(
|
|
68
|
+
<const TNodeType extends StorageNodeType>(
|
|
62
69
|
value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
|
|
63
|
-
type:
|
|
70
|
+
type: TNodeType,
|
|
64
71
|
count: number,
|
|
65
|
-
): StorageBufferNode<
|
|
66
|
-
(
|
|
67
|
-
value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
|
|
68
|
-
type: "vec3",
|
|
69
|
-
count: number,
|
|
70
|
-
): StorageBufferNode<"vec3">;
|
|
71
|
-
(
|
|
72
|
-
value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
|
|
73
|
-
type: "vec4",
|
|
74
|
-
count: number,
|
|
75
|
-
): StorageBufferNode<"vec4">;
|
|
72
|
+
): StorageBufferNode<TNodeType>;
|
|
76
73
|
(
|
|
77
74
|
value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute,
|
|
78
75
|
type: Struct,
|
|
@@ -81,3 +78,5 @@ interface Storage {
|
|
|
81
78
|
}
|
|
82
79
|
|
|
83
80
|
export const storage: Storage;
|
|
81
|
+
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Storage3DTexture from "../../renderers/common/Storage3DTexture.js";
|
|
2
|
+
import Node from "../core/Node.js";
|
|
3
|
+
import StorageTextureNode from "./StorageTextureNode.js";
|
|
4
|
+
|
|
5
|
+
declare class StorageTexture3DNode extends StorageTextureNode {
|
|
6
|
+
readonly isStorageTexture3DNode: boolean;
|
|
7
|
+
|
|
8
|
+
constructor(value: Storage3DTexture, uvNode?: Node<"vec3"> | null, storeNode?: Node | null);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default StorageTexture3DNode;
|
|
12
|
+
|
|
13
|
+
export const storageTexture3D: (
|
|
14
|
+
value: Storage3DTexture,
|
|
15
|
+
uvNode?: Node<"vec3"> | null,
|
|
16
|
+
storeNode?: Node | null,
|
|
17
|
+
) => StorageTexture3DNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import StorageTexture from "../../renderers/common/StorageTexture.js";
|
|
2
2
|
import { NodeAccess } from "../core/constants.js";
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
4
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
@@ -14,7 +14,7 @@ export default class StorageTextureNode extends TextureNode {
|
|
|
14
14
|
access: NodeAccess;
|
|
15
15
|
|
|
16
16
|
constructor(
|
|
17
|
-
value:
|
|
17
|
+
value: StorageTexture,
|
|
18
18
|
uvNode?: Node | null,
|
|
19
19
|
storeNode?: Node | null,
|
|
20
20
|
);
|
|
@@ -29,17 +29,19 @@ export default class StorageTextureNode extends TextureNode {
|
|
|
29
29
|
|
|
30
30
|
toWriteOnly(): this;
|
|
31
31
|
|
|
32
|
+
store(uvNode: Node, storeNode?: Node | null): StorageTextureNode;
|
|
33
|
+
|
|
32
34
|
generateStore(builder: NodeBuilder): void;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
export const storageTexture: (
|
|
36
|
-
value:
|
|
38
|
+
value: StorageTexture,
|
|
37
39
|
uvNode?: Node | null,
|
|
38
40
|
storeNode?: Node,
|
|
39
41
|
) => StorageTextureNode;
|
|
40
42
|
|
|
41
43
|
export const textureStore: (
|
|
42
|
-
value:
|
|
44
|
+
value: StorageTexture | StorageTextureNode,
|
|
43
45
|
uvNode?: Node | null,
|
|
44
46
|
storeNode?: Node,
|
|
45
47
|
) => StorageTextureNode;
|
|
@@ -2,7 +2,7 @@ import { Texture } from "../../textures/Texture.js";
|
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
3
|
import UniformNode from "../core/UniformNode.js";
|
|
4
4
|
|
|
5
|
-
interface TextureNodeInterface
|
|
5
|
+
interface TextureNodeInterface {
|
|
6
6
|
readonly isTextureNode: true;
|
|
7
7
|
|
|
8
8
|
uvNode: Node<"vec2"> | Node<"vec3"> | null;
|
|
@@ -11,6 +11,7 @@ interface TextureNodeInterface<TNodeType> {
|
|
|
11
11
|
compareNode: Node | null;
|
|
12
12
|
depthNode: Node | null;
|
|
13
13
|
gradNode: Node | null;
|
|
14
|
+
gatherNode: Node<"int"> | null;
|
|
14
15
|
|
|
15
16
|
sampler: boolean;
|
|
16
17
|
updateMatrix: boolean;
|
|
@@ -23,25 +24,29 @@ interface TextureNodeInterface<TNodeType> {
|
|
|
23
24
|
|
|
24
25
|
getSampler(): boolean;
|
|
25
26
|
|
|
26
|
-
sample(uvNode: Node):
|
|
27
|
+
sample(uvNode: Node): this;
|
|
27
28
|
|
|
28
|
-
load(uvNode: Node):
|
|
29
|
+
load(uvNode: Node): this;
|
|
29
30
|
|
|
30
|
-
blur(amountNode: Node):
|
|
31
|
+
blur(amountNode: Node): this;
|
|
31
32
|
|
|
32
|
-
level(levelNode: Node):
|
|
33
|
+
level(levelNode: Node): this;
|
|
33
34
|
|
|
34
35
|
size(levelNode: Node): Node;
|
|
35
36
|
|
|
36
|
-
bias(biasNode: Node):
|
|
37
|
+
bias(biasNode: Node): this;
|
|
37
38
|
|
|
38
39
|
getBase(): TextureNode;
|
|
39
40
|
|
|
40
|
-
compare(compareNode: Node):
|
|
41
|
+
compare(compareNode: Node<"float"> | number): this;
|
|
41
42
|
|
|
42
|
-
grad(gradeNodeX: Node, gradeNodeY: Node):
|
|
43
|
+
grad(gradeNodeX: Node, gradeNodeY: Node): this;
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
gather(gatherNode?: Node<"int"> | number): this;
|
|
46
|
+
|
|
47
|
+
depth(depthNode: Node): this;
|
|
48
|
+
|
|
49
|
+
offset(offsetNode: Node<"ivec2">): this;
|
|
45
50
|
|
|
46
51
|
clone(): this;
|
|
47
52
|
}
|
|
@@ -55,7 +60,7 @@ declare const TextureNode: {
|
|
|
55
60
|
): TextureNode;
|
|
56
61
|
};
|
|
57
62
|
|
|
58
|
-
type TextureNode<TNodeType = "vec4"> = TextureNodeInterface
|
|
63
|
+
type TextureNode<TNodeType = "vec4"> = TextureNodeInterface & UniformNode<TNodeType, Texture>;
|
|
59
64
|
|
|
60
65
|
export default TextureNode;
|
|
61
66
|
|
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
import Node from "./Node.js";
|
|
2
2
|
import TempNode from "./TempNode.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export interface ArrayNodeInterface<TNodeType> {
|
|
5
5
|
count: number;
|
|
6
|
-
values: Node[];
|
|
6
|
+
values: Node<TNodeType>[] | null;
|
|
7
7
|
readonly isArrayNode: true;
|
|
8
|
-
|
|
9
|
-
constructor(nodeType: string, count: number, values: Node[]);
|
|
10
8
|
}
|
|
11
9
|
|
|
10
|
+
declare const ArrayNode: {
|
|
11
|
+
new<TNodeType>(
|
|
12
|
+
nodeType: TNodeType | null,
|
|
13
|
+
count: number,
|
|
14
|
+
values?: Node<TNodeType>[] | null,
|
|
15
|
+
): ArrayNode<TNodeType>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type ArrayNode<TNodeType> = TempNode<TNodeType> & ArrayNodeInterface<TNodeType>;
|
|
19
|
+
|
|
12
20
|
export default ArrayNode;
|
|
13
21
|
|
|
14
22
|
interface ArrayFunction {
|
|
15
|
-
(values: Node[]): ArrayNode
|
|
16
|
-
(nodeType:
|
|
23
|
+
<TNodeType>(values: Node<TNodeType>[]): ArrayNode<TNodeType>;
|
|
24
|
+
<TNodeType extends string>(nodeType: TNodeType, count: number): ArrayNode<TNodeType>;
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
export const array: ArrayFunction;
|
|
20
28
|
|
|
21
29
|
declare module "./Node.js" {
|
|
22
|
-
interface
|
|
23
|
-
toArray: (count: number) => ArrayNode
|
|
30
|
+
interface NodeExtensions<TNodeType> {
|
|
31
|
+
toArray: (count: number) => ArrayNode<TNodeType>;
|
|
24
32
|
}
|
|
25
33
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { Light } from "../../lights/Light.js";
|
|
2
2
|
import Node from "./Node.js";
|
|
3
|
-
import { NodeBuilderContext } from "./NodeBuilder.js";
|
|
4
3
|
|
|
5
4
|
declare class ContextNodeInterface<TNodeType> extends Node {
|
|
6
5
|
readonly isContextNode: true;
|
|
7
6
|
|
|
8
7
|
node: Node<TNodeType> | null;
|
|
9
|
-
value:
|
|
8
|
+
value: unknown;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
declare const ContextNode: {
|
|
13
|
-
new<TNodeType>(node?: Node<TNodeType> | null, value?:
|
|
12
|
+
new<TNodeType>(node?: Node<TNodeType> | null, value?: unknown): ContextNode<TNodeType>;
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
type ContextNode<TNodeType> = ContextNodeInterface<TNodeType> & Node<TNodeType>;
|
|
@@ -18,8 +17,8 @@ type ContextNode<TNodeType> = ContextNodeInterface<TNodeType> & Node<TNodeType>;
|
|
|
18
17
|
export default ContextNode;
|
|
19
18
|
|
|
20
19
|
interface ContextFunction {
|
|
21
|
-
(value?:
|
|
22
|
-
<TNodeType>(node: Node<TNodeType>, value?:
|
|
20
|
+
(value?: unknown): ContextNode<unknown>;
|
|
21
|
+
<TNodeType>(node: Node<TNodeType>, value?: unknown): ContextNode<TNodeType>;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export const context: ContextFunction;
|
|
@@ -39,7 +38,7 @@ export function label<TNodeType>(node: Node<TNodeType>, label: string): Node<TNo
|
|
|
39
38
|
|
|
40
39
|
declare module "./Node.js" {
|
|
41
40
|
interface NodeExtensions<TNodeType> {
|
|
42
|
-
context: (context?:
|
|
41
|
+
context: (context?: unknown) => ContextNode<TNodeType>;
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* @deprecated "label()" has been deprecated. Use "setName()" instead.
|
|
@@ -25,6 +25,8 @@ declare class LightingModel {
|
|
|
25
25
|
direct(lightData: LightingModelDirectInput, builder: NodeBuilder): void;
|
|
26
26
|
directRectArea(lightData: LightingModelDirectRectAreaInput, builder: NodeBuilder): void;
|
|
27
27
|
indirect(builder: NodeBuilder): void;
|
|
28
|
+
indirectDiffuse(builder: NodeBuilder): void;
|
|
29
|
+
indirectSpecular(builder: NodeBuilder): void;
|
|
28
30
|
ambientOcclusion(builder: NodeBuilder): void;
|
|
29
31
|
}
|
|
30
32
|
|