@types/three 0.158.3 → 0.160.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 -1
- three/examples/jsm/cameras/CinematicCamera.d.ts +1 -1
- three/examples/jsm/helpers/TextureHelper.d.ts +10 -0
- three/examples/jsm/lines/LineMaterial.d.ts +2 -2
- three/examples/jsm/loaders/ColladaLoader.d.ts +1 -3
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
- three/examples/jsm/loaders/KTX2Loader.d.ts +2 -8
- three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -5
- three/examples/jsm/math/Octree.d.ts +7 -3
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -1
- three/examples/jsm/misc/Timer.d.ts +80 -0
- three/examples/jsm/nodes/Nodes.d.ts +238 -60
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +9 -2
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +7 -1
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +4 -1
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +8 -1
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +10 -2
- three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +4 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +7 -1
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +1 -1
- three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +3 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +3 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
- three/examples/jsm/nodes/core/ContextNode.d.ts +3 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +6 -3
- three/examples/jsm/nodes/core/NodeUniform.d.ts +12 -8
- three/examples/jsm/nodes/core/NodeUtils.d.ts +6 -3
- three/examples/jsm/nodes/core/PropertyNode.d.ts +9 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
- three/examples/jsm/nodes/core/VarNode.d.ts +4 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +3 -0
- three/examples/jsm/nodes/core/constants.d.ts +10 -8
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +7 -2
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +18 -1
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +4 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +7 -1
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +6 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
- three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +3 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +3 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +1 -1
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +1 -1
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +3 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +7 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +6 -1
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +18 -5
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -3
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +25 -2
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +43 -34
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +5 -3
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +7 -5
- three/examples/jsm/nodes/math/CondNode.d.ts +7 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +134 -1
- three/examples/jsm/nodes/math/OperatorNode.d.ts +51 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +3 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +75 -33
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +4 -2
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +6 -3
- three/examples/jsm/nodes/utils/OscNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +4 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +3 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +5 -1
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +7 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +7 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -7
- three/examples/jsm/objects/QuadMesh.d.ts +13 -0
- three/examples/jsm/postprocessing/GTAOPass.d.ts +118 -0
- three/examples/jsm/renderers/common/Info.d.ts +7 -2
- three/examples/jsm/renderers/common/Renderer.d.ts +2 -2
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +1 -0
- three/examples/jsm/shaders/GTAOShader.d.ts +59 -0
- three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +28 -0
- three/examples/jsm/utils/SortUtils.d.ts +7 -0
- three/package.json +3 -3
- three/src/Three.d.ts +2 -0
- three/src/animation/AnimationClip.d.ts +2 -2
- three/src/animation/AnimationMixer.d.ts +1 -1
- three/src/animation/KeyframeTrack.d.ts +3 -3
- three/src/animation/tracks/BooleanKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/ColorKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/NumberKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/StringKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/VectorKeyframeTrack.d.ts +1 -1
- three/src/audio/Audio.d.ts +1 -1
- three/src/audio/AudioListener.d.ts +1 -1
- three/src/constants.d.ts +3 -1
- three/src/core/BufferAttribute.d.ts +27 -0
- three/src/core/BufferGeometry.d.ts +1 -1
- three/src/core/InterleavedBuffer.d.ts +27 -0
- three/src/core/InterleavedBufferAttribute.d.ts +2 -2
- three/src/core/Object3D.d.ts +48 -14
- three/src/core/Raycaster.d.ts +1 -0
- three/src/core/UniformsGroup.d.ts +3 -3
- three/src/extras/core/Curve.d.ts +2 -2
- three/src/extras/core/Path.d.ts +1 -1
- three/src/extras/core/Shape.d.ts +1 -1
- three/src/extras/core/ShapePath.d.ts +1 -1
- three/src/extras/curves/CatmullRomCurve3.d.ts +2 -2
- three/src/extras/curves/CubicBezierCurve.d.ts +2 -2
- three/src/extras/curves/CubicBezierCurve3.d.ts +2 -2
- three/src/extras/curves/EllipseCurve.d.ts +1 -1
- three/src/extras/curves/LineCurve.d.ts +2 -2
- three/src/extras/curves/LineCurve3.d.ts +2 -2
- three/src/extras/curves/QuadraticBezierCurve.d.ts +2 -2
- three/src/extras/curves/QuadraticBezierCurve3.d.ts +2 -2
- three/src/extras/curves/SplineCurve.d.ts +2 -2
- three/src/geometries/ExtrudeGeometry.d.ts +5 -5
- three/src/geometries/LatheGeometry.d.ts +2 -2
- three/src/geometries/PlaneGeometry.d.ts +1 -1
- three/src/geometries/PolyhedronGeometry.d.ts +1 -1
- three/src/geometries/RingGeometry.d.ts +1 -1
- three/src/geometries/ShapeGeometry.d.ts +2 -2
- three/src/geometries/SphereGeometry.d.ts +1 -1
- three/src/geometries/TorusGeometry.d.ts +1 -1
- three/src/geometries/TorusKnotGeometry.d.ts +1 -1
- three/src/geometries/TubeGeometry.d.ts +3 -3
- three/src/geometries/WireframeGeometry.d.ts +1 -1
- three/src/helpers/ArrowHelper.d.ts +4 -4
- three/src/helpers/AxesHelper.d.ts +1 -1
- three/src/helpers/Box3Helper.d.ts +3 -3
- three/src/helpers/CameraHelper.d.ts +2 -2
- three/src/helpers/DirectionalLightHelper.d.ts +6 -4
- three/src/helpers/GridHelper.d.ts +1 -1
- three/src/helpers/HemisphereLightHelper.d.ts +4 -4
- three/src/helpers/PlaneHelper.d.ts +2 -2
- three/src/helpers/PointLightHelper.d.ts +3 -3
- three/src/helpers/SkeletonHelper.d.ts +4 -4
- three/src/helpers/SpotLightHelper.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +1 -1
- three/src/lights/DirectionalLightShadow.d.ts +1 -1
- three/src/lights/HemisphereLight.d.ts +1 -1
- three/src/lights/LightProbe.d.ts +1 -1
- three/src/lights/LightShadow.d.ts +5 -5
- three/src/lights/PointLight.d.ts +7 -0
- three/src/lights/PointLightShadow.d.ts +1 -1
- three/src/lights/SpotLight.d.ts +1 -1
- three/src/lights/SpotLightShadow.d.ts +1 -1
- three/src/loaders/MaterialLoader.d.ts +6 -3
- three/src/materials/LineBasicMaterial.d.ts +7 -0
- three/src/materials/LineDashedMaterial.d.ts +7 -1
- three/src/materials/Material.d.ts +16 -16
- three/src/materials/MeshBasicMaterial.d.ts +9 -2
- three/src/materials/MeshDepthMaterial.d.ts +7 -1
- three/src/materials/MeshDistanceMaterial.d.ts +9 -2
- three/src/materials/MeshLambertMaterial.d.ts +9 -2
- three/src/materials/MeshMatcapMaterial.d.ts +10 -3
- three/src/materials/MeshNormalMaterial.d.ts +9 -2
- three/src/materials/MeshPhongMaterial.d.ts +10 -3
- three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
- three/src/materials/MeshStandardMaterial.d.ts +10 -5
- three/src/materials/MeshToonMaterial.d.ts +10 -3
- three/src/materials/PointsMaterial.d.ts +9 -2
- three/src/materials/RawShaderMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +9 -3
- three/src/materials/ShadowMaterial.d.ts +8 -1
- three/src/materials/SpriteMaterial.d.ts +9 -4
- three/src/math/Box3.d.ts +2 -2
- three/src/math/Frustum.d.ts +2 -2
- three/src/math/Matrix4.d.ts +30 -30
- three/src/math/Sphere.d.ts +5 -0
- three/src/math/Triangle.d.ts +8 -8
- three/src/math/Vector2.d.ts +1 -1
- three/src/math/Vector4.d.ts +1 -1
- three/src/objects/BatchedMesh.d.ts +169 -0
- three/src/objects/Bone.d.ts +1 -1
- three/src/objects/LOD.d.ts +2 -4
- three/src/objects/Line.d.ts +2 -4
- three/src/objects/LineLoop.d.ts +1 -1
- three/src/objects/LineSegments.d.ts +1 -1
- three/src/objects/Skeleton.d.ts +2 -8
- three/src/objects/SkinnedMesh.d.ts +1 -2
- three/src/renderers/WebGL3DRenderTarget.d.ts +7 -5
- three/src/renderers/WebGLArrayRenderTarget.d.ts +7 -5
- three/src/renderers/WebGLCubeRenderTarget.d.ts +2 -2
- three/src/renderers/WebGLRenderTarget.d.ts +1 -1
- three/src/renderers/shaders/ShaderChunk.d.ts +1 -0
- three/src/renderers/shaders/ShaderLib.d.ts +18 -18
- three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
- three/src/renderers/webgl/WebGLAttributes.d.ts +1 -0
- three/src/renderers/webgl/WebGLBindingStates.d.ts +4 -4
- three/src/renderers/webgl/WebGLBufferRenderer.d.ts +4 -3
- three/src/renderers/webgl/WebGLClipping.d.ts +2 -2
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +5 -4
- three/src/renderers/webgl/WebGLLights.d.ts +39 -37
- three/src/renderers/webgl/WebGLPrograms.d.ts +225 -10
- three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -5
- three/src/renderers/webgl/WebGLShadowMap.d.ts +2 -2
- three/src/scenes/Fog.d.ts +1 -1
- three/src/scenes/FogExp2.d.ts +1 -1
- three/src/textures/CompressedCubeTexture.d.ts +13 -0
- three/src/textures/Texture.d.ts +1 -1
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
- three/examples/jsm/objects/BatchedMesh.d.ts +0 -57
- three/examples/jsm/renderers/common/Animation.d.ts +0 -16
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import TempNode from '../core/TempNode.js';
|
|
2
|
-
import
|
|
2
|
+
import MathNode from '../math/MathNode.js';
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export type ColorAdjustmentMethod =
|
|
5
6
|
| typeof ColorAdjustmentNode.SATURATION
|
|
@@ -18,3 +19,19 @@ export default class ColorAdjustmentNode extends TempNode {
|
|
|
18
19
|
|
|
19
20
|
constructor(method: ColorAdjustmentMethod, colorNode: Node, adjustmentNode?: Node);
|
|
20
21
|
}
|
|
22
|
+
|
|
23
|
+
export const saturation: (
|
|
24
|
+
colorNode: NodeRepresentation,
|
|
25
|
+
adjustmentNode?: NodeRepresentation,
|
|
26
|
+
) => ShaderNodeObject<ColorAdjustmentNode>;
|
|
27
|
+
export const vibrance: (
|
|
28
|
+
colorNode: NodeRepresentation,
|
|
29
|
+
adjustmentNode?: NodeRepresentation,
|
|
30
|
+
) => ShaderNodeObject<ColorAdjustmentNode>;
|
|
31
|
+
export const hue: (
|
|
32
|
+
colorNode: NodeRepresentation,
|
|
33
|
+
adjustmentNode?: NodeRepresentation,
|
|
34
|
+
) => ShaderNodeObject<ColorAdjustmentNode>;
|
|
35
|
+
|
|
36
|
+
export const lumaCoeffs: ShaderNodeObject<MathNode>;
|
|
37
|
+
export const luminance: (a: NodeRepresentation, b: NodeRepresentation) => ShaderNodeObject<MathNode>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { TextureEncoding } from '../../../../src/Three.js';
|
|
1
2
|
import TempNode from '../core/TempNode.js';
|
|
2
3
|
import Node from '../core/Node.js';
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
5
|
|
|
4
6
|
export type ColorSpaceNodeMethod =
|
|
5
7
|
| typeof ColorSpaceNode.LINEAR_TO_LINEAR
|
|
@@ -16,3 +18,5 @@ export default class ColorSpaceNode extends TempNode {
|
|
|
16
18
|
|
|
17
19
|
constructor(method: ColorSpaceNodeMethod | null, node: Node);
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
export const colorSpace: (node: NodeRepresentation, encoding: TextureEncoding) => ShaderNodeObject<ColorSpaceNode>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class FrontFacingNode extends Node {
|
|
4
5
|
isFrontFacingNode: true;
|
|
5
6
|
constructor();
|
|
6
7
|
}
|
|
8
|
+
|
|
9
|
+
export const frontFacing: ShaderNodeObject<FrontFacingNode>;
|
|
10
|
+
export const faceDirection: ShaderNodeObject<Node>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import TempNode from '../core/TempNode.js';
|
|
2
1
|
import { NormalMapTypes } from '../../../../src/Three.js';
|
|
2
|
+
import TempNode from '../core/TempNode.js';
|
|
3
3
|
import Node from '../core/Node.js';
|
|
4
|
+
import MathNode from '../math/MathNode.js';
|
|
5
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
6
|
|
|
5
7
|
export default class NormalMapNode extends TempNode {
|
|
6
8
|
node: Node;
|
|
@@ -10,3 +12,7 @@ export default class NormalMapNode extends TempNode {
|
|
|
10
12
|
|
|
11
13
|
constructor(node: Node, scaleNode?: Node | null);
|
|
12
14
|
}
|
|
15
|
+
|
|
16
|
+
export const normalMap: (node: Node, scaleNode?: Node) => ShaderNodeObject<NormalMapNode>;
|
|
17
|
+
|
|
18
|
+
export const TBNViewMatrix: ShaderNodeObject<MathNode>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class PosterizeNode extends Node {
|
|
4
5
|
sourceNode: Node;
|
|
@@ -6,3 +7,8 @@ export default class PosterizeNode extends Node {
|
|
|
6
7
|
|
|
7
8
|
constructor(sourceNode: Node, stepsNode: Node);
|
|
8
9
|
}
|
|
10
|
+
|
|
11
|
+
export const posterize: (
|
|
12
|
+
sourceNode: NodeRepresentation,
|
|
13
|
+
stepsNode: NodeRepresentation,
|
|
14
|
+
) => ShaderNodeObject<PosterizeNode>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ToneMapping } from '../../../../src/Three.js';
|
|
1
2
|
import TempNode from '../core/TempNode.js';
|
|
2
3
|
import Node from '../core/Node.js';
|
|
3
|
-
import {
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
6
|
// exposure only
|
|
6
7
|
export const LinearToneMappingNode: Node;
|
|
@@ -12,3 +13,9 @@ export default class ToneMappingNode extends TempNode {
|
|
|
12
13
|
|
|
13
14
|
constructor(toneMapping: ToneMapping, exposureNode?: Node, colorNode?: Node | null);
|
|
14
15
|
}
|
|
16
|
+
|
|
17
|
+
export const toneMapping: (
|
|
18
|
+
mapping: ToneMapping,
|
|
19
|
+
exposure: NodeRepresentation,
|
|
20
|
+
color?: NodeRepresentation,
|
|
21
|
+
) => ShaderNodeObject<ToneMappingNode>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export type ViewportNodeScope =
|
|
4
5
|
| typeof ViewportNode.COORDINATE
|
|
@@ -21,3 +22,10 @@ export default class ViewportNode extends Node {
|
|
|
21
22
|
|
|
22
23
|
constructor(scope: ViewportNodeScope);
|
|
23
24
|
}
|
|
25
|
+
|
|
26
|
+
export const viewportCoordinate: ShaderNodeObject<ViewportNode>;
|
|
27
|
+
export const viewportResolution: ShaderNodeObject<ViewportNode>;
|
|
28
|
+
export const viewportTopLeft: ShaderNodeObject<ViewportNode>;
|
|
29
|
+
export const viewportBottomLeft: ShaderNodeObject<ViewportNode>;
|
|
30
|
+
export const viewportTopRight: ShaderNodeObject<ViewportNode>;
|
|
31
|
+
export const viewportBottomRight: ShaderNodeObject<ViewportNode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
2
|
import FogNode from './FogNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class FogExp2Node extends FogNode {
|
|
5
6
|
isFogExp2Node: true;
|
|
@@ -7,3 +8,5 @@ export default class FogExp2Node extends FogNode {
|
|
|
7
8
|
|
|
8
9
|
constructor(colorNode: Node, densityNode: Node);
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export const densityFog: (colorNode: Node, densityNode: Node) => ShaderNodeObject<FogExp2Node>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class FogNode extends Node {
|
|
4
5
|
isFogNode: true;
|
|
@@ -8,3 +9,5 @@ export default class FogNode extends Node {
|
|
|
8
9
|
constructor(colorNode: Node, factorNode: Node);
|
|
9
10
|
mixAssign(outputNode: Node): Node;
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
export const fog: (colorNode: NodeRepresentation, factorNode: NodeRepresentation) => ShaderNodeObject<FogNode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import FogNode from './FogNode.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class FogRangeNode extends FogNode {
|
|
5
6
|
isFogRangeNode: true;
|
|
@@ -8,3 +9,5 @@ export default class FogRangeNode extends FogNode {
|
|
|
8
9
|
|
|
9
10
|
constructor(colorNode: Node, nearNode: Node, farNode: Node);
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
export const rangeFog: (colorNode: Node, nearNode: Node, farNode: Node) => ShaderNodeObject<FogRangeNode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShaderNode } from '../../shadernode/
|
|
1
|
+
import { ShaderNode } from '../../shadernode/ShaderNode.js';
|
|
2
2
|
import Node from '../../core/Node.js';
|
|
3
3
|
|
|
4
4
|
declare const BRDF_GGX: ShaderNode<{ lightDirection: Node; f0: Node; f90: Node; roughness: Node }>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShaderNode } from '../../shadernode/
|
|
1
|
+
import { ShaderNode } from '../../shadernode/ShaderNode.js';
|
|
2
2
|
import Node from '../../core/Node.js';
|
|
3
3
|
|
|
4
4
|
declare const V_GGX_SmithCorrelated: ShaderNode<{ alpha: Node; dotNL: Node; dotNV: Node }>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Color, Vector2, Vector3, Vector4 } from '../../../../src/Three.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
3
|
import NodeBuilder from '../core/NodeBuilder.js';
|
|
4
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
6
|
export type RangeModeBound = number | Color | Vector2 | Vector3 | Vector4;
|
|
6
7
|
|
|
@@ -11,3 +12,5 @@ export default class RangeNode extends Node {
|
|
|
11
12
|
constructor(min: RangeModeBound, max: RangeModeBound);
|
|
12
13
|
getVectorLength(builder: NodeBuilder): number;
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
export const range: (min: RangeModeBound, max: RangeModeBound) => ShaderNodeObject<RangeNode>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class ComputeNode extends Node {
|
|
4
5
|
isComputeNode: true;
|
|
@@ -9,3 +10,9 @@ export default class ComputeNode extends Node {
|
|
|
9
10
|
|
|
10
11
|
constructor(computeNode: Node, count: number, workgroupSize?: number[]);
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export const compute: (
|
|
15
|
+
node: NodeRepresentation,
|
|
16
|
+
count: number,
|
|
17
|
+
workgroupSize: number[],
|
|
18
|
+
) => ShaderNodeObject<ComputeNode>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ContextNode from '../core/ContextNode.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
|
-
import { ShaderNode } from '../
|
|
3
|
+
import { ShaderNode, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
4
|
|
|
5
5
|
export interface LightingModelNode {
|
|
6
6
|
indirectDiffuse?: ShaderNode;
|
|
@@ -13,3 +13,8 @@ export default class LightingContextNode extends ContextNode {
|
|
|
13
13
|
|
|
14
14
|
constructor(node: Node, lightingModelNode?: LightingModelNode | null);
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
export const lightingContext: (
|
|
18
|
+
node: Node,
|
|
19
|
+
lightingModelNode?: LightingModelNode,
|
|
20
|
+
) => ShaderNodeObject<LightingContextNode>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Light } from '../../../../src/Three.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
3
|
import LightingNode from './LightingNode.js';
|
|
4
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
6
|
export default class LightsNode extends Node {
|
|
6
7
|
lightNodes: LightingNode[];
|
|
@@ -17,3 +18,5 @@ export default class LightsNode extends Node {
|
|
|
17
18
|
lightNodeClass: { new (light: T): LightingNode },
|
|
18
19
|
): void;
|
|
19
20
|
}
|
|
21
|
+
|
|
22
|
+
export const lights: (lights: Light[]) => ShaderNodeObject<LightsNode>;
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
2
|
-
import { Swizzable, CheckerNode, Node } from '../Nodes.js';
|
|
3
2
|
|
|
4
3
|
import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js';
|
|
4
|
+
import Node from '../core/Node.js';
|
|
5
|
+
import CheckerNode from '../procedural/CheckerNode.js';
|
|
6
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
5
7
|
|
|
6
8
|
export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
readonly isMeshPhysicalNodeMaterial: true;
|
|
10
|
+
|
|
11
|
+
clearcoatNode: Node | null;
|
|
12
|
+
clearcoatRoughnessNode: Node | null;
|
|
13
|
+
clearcoatNormalNode: Node | null;
|
|
14
|
+
|
|
15
|
+
sheenNode: Node | null;
|
|
16
|
+
sheenRoughnessNode: Node | null;
|
|
17
|
+
|
|
18
|
+
iridescenceNode: null | ShaderNodeObject<CheckerNode>;
|
|
19
|
+
iridescenceIORNode: null | ShaderNodeObject<Node>;
|
|
20
|
+
iridescenceThicknessNode: null | ShaderNodeObject<Node>;
|
|
21
|
+
|
|
22
|
+
iorNode?: Node | null;
|
|
10
23
|
|
|
11
24
|
specularIntensityNode: Node | null;
|
|
12
25
|
specularColorNode: Node | null;
|
|
@@ -16,7 +29,7 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
16
29
|
attenuationDistanceNode: Node | null;
|
|
17
30
|
attenuationColorNode: Node | null;
|
|
18
31
|
|
|
19
|
-
constructor(parameters
|
|
32
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
20
33
|
|
|
21
34
|
copy(source: MeshPhysicalNodeMaterial): this;
|
|
22
35
|
}
|
|
@@ -10,9 +10,6 @@ export default class MeshStandardNodeMaterial extends NodeMaterial {
|
|
|
10
10
|
metalnessNode: Node | null;
|
|
11
11
|
roughnessNode: Node | null;
|
|
12
12
|
|
|
13
|
-
clearcoatNode: Node | null;
|
|
14
|
-
clearcoatRoughnessNode: Node | null;
|
|
15
|
-
|
|
16
13
|
constructor(paramters?: ShaderMaterialParameters);
|
|
17
14
|
copy(source: MeshStandardNodeMaterial): this;
|
|
18
15
|
}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
LineBasicMaterial,
|
|
3
|
+
Material,
|
|
4
|
+
MeshBasicMaterial,
|
|
5
|
+
MeshPhysicalMaterial,
|
|
6
|
+
MeshStandardMaterial,
|
|
7
|
+
PointsMaterial,
|
|
8
|
+
ShaderMaterial,
|
|
9
|
+
SpriteMaterial,
|
|
10
|
+
} from '../../../../src/Three.js';
|
|
2
11
|
import NodeBuilder from '../core/NodeBuilder.js';
|
|
3
12
|
import Node from '../core/Node.js';
|
|
4
13
|
import { LightingModelNode } from '../lighting/LightingContextNode.js';
|
|
14
|
+
import LineBasicNodeMaterial from './LineBasicNodeMaterial.js';
|
|
15
|
+
import MeshBasicNodeMaterial from './MeshBasicNodeMaterial.js';
|
|
16
|
+
import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial.js';
|
|
17
|
+
import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js';
|
|
18
|
+
import PointsNodeMaterial from './PointsNodeMaterial.js';
|
|
19
|
+
import SpriteNodeMaterial from './SpriteNodeMaterial.js';
|
|
5
20
|
|
|
6
21
|
export default class NodeMaterial extends ShaderMaterial {
|
|
7
22
|
isNodeMaterial: true;
|
|
@@ -34,5 +49,13 @@ export default class NodeMaterial extends ShaderMaterial {
|
|
|
34
49
|
lights: { diffuseColorNode: Node; lightingModelNode: LightingModelNode; lightsNode?: Node },
|
|
35
50
|
): void;
|
|
36
51
|
generateOutput(builder: NodeBuilder, lights: { diffuseColorNode: Node; outgoingLightNode: Node }): void;
|
|
37
|
-
|
|
52
|
+
|
|
53
|
+
static fromMaterial(material: LineBasicMaterial): LineBasicNodeMaterial;
|
|
54
|
+
static fromMaterial(material: MeshBasicMaterial): MeshBasicNodeMaterial;
|
|
55
|
+
static fromMaterial(material: MeshPhysicalMaterial): MeshPhysicalNodeMaterial;
|
|
56
|
+
static fromMaterial(material: MeshStandardMaterial): MeshStandardNodeMaterial;
|
|
57
|
+
static fromMaterial(material: PointsMaterial): PointsNodeMaterial;
|
|
58
|
+
static fromMaterial(material: SpriteMaterial): SpriteNodeMaterial;
|
|
59
|
+
static fromMaterial(material: NodeMaterial): NodeMaterial;
|
|
60
|
+
static fromMaterial(material: Material): NodeMaterial;
|
|
38
61
|
}
|
|
@@ -1,94 +1,103 @@
|
|
|
1
1
|
import { mx_hsvtorgb, mx_rgbtohsv } from './lib/mx_hsv.js';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { NodeRepresentation } from '../shadernode/ShaderNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import MathNode from '../math/MathNode.js';
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
5
5
|
|
|
6
|
-
export function mx_aastep(threshold?: NodeRepresentation, value?: NodeRepresentation):
|
|
6
|
+
export function mx_aastep(threshold?: NodeRepresentation, value?: NodeRepresentation): ShaderNodeObject<MathNode>;
|
|
7
7
|
|
|
8
8
|
export function mx_ramplr(
|
|
9
9
|
valuel?: NodeRepresentation,
|
|
10
10
|
valuer?: NodeRepresentation,
|
|
11
|
-
texcoord?:
|
|
12
|
-
):
|
|
11
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
12
|
+
): ShaderNodeObject<MathNode>;
|
|
13
13
|
export function mx_ramptb(
|
|
14
14
|
valuet?: NodeRepresentation,
|
|
15
15
|
valueb?: NodeRepresentation,
|
|
16
|
-
texcoord?:
|
|
17
|
-
):
|
|
16
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
17
|
+
): ShaderNodeObject<MathNode>;
|
|
18
18
|
|
|
19
19
|
export function mx_splitlr(
|
|
20
20
|
valuel?: NodeRepresentation,
|
|
21
21
|
valuer?: NodeRepresentation,
|
|
22
22
|
center?: NodeRepresentation,
|
|
23
|
-
texcoord?:
|
|
24
|
-
):
|
|
23
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
24
|
+
): ShaderNodeObject<MathNode>;
|
|
25
25
|
export function mx_splittb(
|
|
26
26
|
valuet?: NodeRepresentation,
|
|
27
27
|
valueb?: NodeRepresentation,
|
|
28
28
|
center?: NodeRepresentation,
|
|
29
|
-
texcoord?:
|
|
30
|
-
):
|
|
29
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
30
|
+
): ShaderNodeObject<MathNode>;
|
|
31
31
|
|
|
32
32
|
export function mx_transform_uv(
|
|
33
33
|
uv_scale?: NodeRepresentation,
|
|
34
34
|
uv_offset?: NodeRepresentation,
|
|
35
|
-
uv_geo?:
|
|
36
|
-
):
|
|
35
|
+
uv_geo?: ShaderNodeObject<Node>,
|
|
36
|
+
): ShaderNodeObject<Node>;
|
|
37
37
|
|
|
38
38
|
export function mx_noise_float(
|
|
39
|
-
texcoord?:
|
|
39
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
40
40
|
amplitude?: NodeRepresentation,
|
|
41
41
|
pivot?: NodeRepresentation,
|
|
42
|
-
):
|
|
42
|
+
): ShaderNodeObject<Node>;
|
|
43
43
|
export function mx_noise_vec2(
|
|
44
|
-
texcoord?:
|
|
44
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
45
45
|
amplitude?: NodeRepresentation,
|
|
46
46
|
pivot?: NodeRepresentation,
|
|
47
|
-
):
|
|
47
|
+
): ShaderNodeObject<Node>;
|
|
48
48
|
export function mx_noise_vec3(
|
|
49
|
-
texcoord?:
|
|
49
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
50
50
|
amplitude?: NodeRepresentation,
|
|
51
51
|
pivot?: NodeRepresentation,
|
|
52
|
-
):
|
|
52
|
+
): ShaderNodeObject<Node>;
|
|
53
53
|
export function mx_noise_vec4(
|
|
54
|
-
texcoord?:
|
|
54
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
55
55
|
amplitude?: NodeRepresentation,
|
|
56
56
|
pivot?: NodeRepresentation,
|
|
57
|
-
):
|
|
57
|
+
): ShaderNodeObject<Node>;
|
|
58
58
|
|
|
59
|
-
export function mx_worley_noise_float(
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
export function mx_worley_noise_float(
|
|
60
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
61
|
+
jitter?: NodeRepresentation,
|
|
62
|
+
): ShaderNodeObject<Node>;
|
|
63
|
+
export function mx_worley_noise_vec2(
|
|
64
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
65
|
+
jitter?: NodeRepresentation,
|
|
66
|
+
): ShaderNodeObject<Node>;
|
|
67
|
+
export function mx_worley_noise_vec3(
|
|
68
|
+
texcoord?: ShaderNodeObject<Node>,
|
|
69
|
+
jitter?: NodeRepresentation,
|
|
70
|
+
): ShaderNodeObject<Node>;
|
|
62
71
|
|
|
63
|
-
export function mx_cell_noise_float(texcoord?:
|
|
72
|
+
export function mx_cell_noise_float(texcoord?: ShaderNodeObject<Node>): ShaderNodeObject<Node>;
|
|
64
73
|
|
|
65
74
|
export function mx_fractal_noise_float(
|
|
66
|
-
position?:
|
|
75
|
+
position?: ShaderNodeObject<Node>,
|
|
67
76
|
octaves?: NodeRepresentation,
|
|
68
77
|
lacunarity?: NodeRepresentation,
|
|
69
78
|
diminish?: NodeRepresentation,
|
|
70
79
|
amplitude?: NodeRepresentation,
|
|
71
|
-
):
|
|
80
|
+
): ShaderNodeObject<Node>;
|
|
72
81
|
export function mx_fractal_noise_vec2(
|
|
73
|
-
position?:
|
|
82
|
+
position?: ShaderNodeObject<Node>,
|
|
74
83
|
octaves?: NodeRepresentation,
|
|
75
84
|
lacunarity?: NodeRepresentation,
|
|
76
85
|
diminish?: NodeRepresentation,
|
|
77
86
|
amplitude?: NodeRepresentation,
|
|
78
|
-
):
|
|
87
|
+
): ShaderNodeObject<Node>;
|
|
79
88
|
export function mx_fractal_noise_vec3(
|
|
80
|
-
position?:
|
|
89
|
+
position?: ShaderNodeObject<Node>,
|
|
81
90
|
octaves?: NodeRepresentation,
|
|
82
91
|
lacunarity?: NodeRepresentation,
|
|
83
92
|
diminish?: NodeRepresentation,
|
|
84
93
|
amplitude?: NodeRepresentation,
|
|
85
|
-
):
|
|
94
|
+
): ShaderNodeObject<Node>;
|
|
86
95
|
export function mx_fractal_noise_vec4(
|
|
87
|
-
position?:
|
|
96
|
+
position?: ShaderNodeObject<Node>,
|
|
88
97
|
octaves?: NodeRepresentation,
|
|
89
98
|
lacunarity?: NodeRepresentation,
|
|
90
99
|
diminish?: NodeRepresentation,
|
|
91
100
|
amplitude?: NodeRepresentation,
|
|
92
|
-
):
|
|
101
|
+
): ShaderNodeObject<Node>;
|
|
93
102
|
|
|
94
103
|
export { mx_hsvtorgb, mx_rgbtohsv };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Node from '../../core/Node.js';
|
|
2
|
+
import { Fn } from '../../code/FunctionNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
4
|
|
|
3
|
-
export function mx_hsvtorgb(...params: Fn<[Node]>):
|
|
4
|
-
export function mx_rgbtohsv(...params: Fn<[Node]>):
|
|
5
|
+
export function mx_hsvtorgb(...params: Fn<[Node]>): ShaderNodeObject<Node>;
|
|
6
|
+
export function mx_rgbtohsv(...params: Fn<[Node]>): ShaderNodeObject<Node>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Node from '../../core/Node.js';
|
|
2
|
+
import { Fn } from '../../code/FunctionNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
4
|
|
|
3
|
-
export function mx_perlin_noise_float(...params: Fn<[Node]>):
|
|
4
|
-
export function mx_cell_noise_float(...params: Fn<[Node]>):
|
|
5
|
-
export function mx_worley_noise_float(...params: Fn<[Node]>):
|
|
6
|
-
export function mx_fractal_noise_float(...params: Fn<[Node, Node, Node, Node]>):
|
|
5
|
+
export function mx_perlin_noise_float(...params: Fn<[Node]>): ShaderNodeObject<Node>;
|
|
6
|
+
export function mx_cell_noise_float(...params: Fn<[Node]>): ShaderNodeObject<Node>;
|
|
7
|
+
export function mx_worley_noise_float(...params: Fn<[Node]>): ShaderNodeObject<Node>;
|
|
8
|
+
export function mx_fractal_noise_float(...params: Fn<[Node, Node, Node, Node]>): ShaderNodeObject<Node>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export default class CondNode extends Node {
|
|
4
5
|
condNode: Node;
|
|
@@ -7,3 +8,9 @@ export default class CondNode extends Node {
|
|
|
7
8
|
|
|
8
9
|
constructor(condNode: Node, ifNode: Node, elseNode: Node);
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export function cond(
|
|
13
|
+
condNode: NodeRepresentation,
|
|
14
|
+
ifNode: NodeRepresentation,
|
|
15
|
+
elseNode: NodeRepresentation,
|
|
16
|
+
): ShaderNodeObject<Node>;
|