@types/three 0.159.0 → 0.161.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 +5 -1
- three/examples/jsm/capabilities/WebGPU.d.ts +2 -0
- three/examples/jsm/curves/NURBSUtils.d.ts +136 -10
- three/examples/jsm/curves/NURBSVolume.d.ts +23 -0
- three/examples/jsm/exporters/USDZExporter.d.ts +1 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +45 -11
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +29 -2
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +37 -2
- three/examples/jsm/loaders/MaterialXLoader.d.ts +6 -0
- three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +13 -0
- three/examples/jsm/misc/Timer.d.ts +80 -0
- three/examples/jsm/nodes/Nodes.d.ts +304 -61
- 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 +24 -6
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +17 -4
- 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 +9 -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/Object3DNode.d.ts +10 -6
- 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/TextureBicubicNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +21 -5
- three/examples/jsm/nodes/accessors/UVNode.d.ts +3 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/VertexColorNode.d.ts +12 -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 +13 -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/AssignNode.d.ts +17 -0
- three/examples/jsm/nodes/core/AttributeNode.d.ts +3 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +11 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
- three/examples/jsm/nodes/core/ContextNode.d.ts +11 -0
- three/examples/jsm/nodes/core/IndexNode.d.ts +18 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
- three/examples/jsm/nodes/core/LightingModel.d.ts +36 -0
- three/examples/jsm/nodes/core/Node.d.ts +32 -8
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +27 -23
- three/examples/jsm/nodes/core/NodeFrame.d.ts +18 -6
- 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 +27 -1
- three/examples/jsm/nodes/core/UniformNode.d.ts +12 -4
- three/examples/jsm/nodes/core/VarNode.d.ts +10 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +9 -0
- three/examples/jsm/nodes/core/constants.d.ts +31 -28
- three/examples/jsm/nodes/display/AfterImageNode.d.ts +25 -0
- three/examples/jsm/nodes/display/AnamorphicNode.d.ts +32 -0
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +21 -6
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +29 -1
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +17 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +4 -0
- three/examples/jsm/nodes/display/GaussianBlurNode.d.ts +28 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +13 -1
- three/examples/jsm/nodes/display/PassNode.d.ts +44 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +12 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +8 -1
- three/examples/jsm/nodes/display/ViewportDepthNode.d.ts +32 -0
- three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -0
- three/examples/jsm/nodes/display/ViewportSharedTextureNode.d.ts +18 -0
- three/examples/jsm/nodes/display/ViewportTextureNode.d.ts +33 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +9 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +9 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +9 -2
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/BRDF_Sheen.d.ts +7 -0
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +3 -2
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -1
- three/examples/jsm/nodes/functions/PhongLightingModel.d.ts +7 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +17 -8
- 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 +13 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +20 -8
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +3 -0
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +1 -2
- three/examples/jsm/nodes/materials/Materials.d.ts +9 -17
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +2 -4
- three/examples/jsm/nodes/materials/MeshPhongNodeMaterial.d.ts +12 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +16 -7
- three/examples/jsm/nodes/materials/MeshSSSNodeMaterial.d.ts +17 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +1 -5
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +55 -16
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +2 -8
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +0 -10
- 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 +13 -0
- three/examples/jsm/nodes/math/HashNode.d.ts +16 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +140 -1
- three/examples/jsm/nodes/math/MathUtils.d.ts +16 -0
- three/examples/jsm/nodes/math/OperatorNode.d.ts +53 -1
- three/examples/jsm/nodes/math/TriNoise3D.d.ts +12 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +9 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +124 -31
- three/examples/jsm/nodes/utils/DiscardNode.d.ts +16 -0
- 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/ReflectorNode.d.ts +30 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +24 -1
- three/examples/jsm/nodes/utils/RotateNode.d.ts +21 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +9 -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 +28 -7
- three/examples/jsm/objects/GroundedSkybox.d.ts +5 -0
- three/examples/jsm/objects/QuadMesh.d.ts +15 -0
- three/examples/jsm/postprocessing/{HBAOPass.d.ts → GTAOPass.d.ts} +25 -10
- three/examples/jsm/postprocessing/SSAOPass.d.ts +1 -1
- three/examples/jsm/renderers/common/Backend.d.ts +6 -2
- three/examples/jsm/renderers/common/Color4.d.ts +9 -0
- three/examples/jsm/renderers/common/Info.d.ts +7 -1
- three/examples/jsm/renderers/common/PostProcessing.d.ts +11 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +243 -4
- three/examples/jsm/renderers/common/StorageTexture.d.ts +5 -0
- three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +4 -2
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +2 -2
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgpu/WebGPUBackend.d.ts +15 -6
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +7 -7
- three/examples/jsm/shaders/{HBAOShader.d.ts → GTAOShader.d.ts} +23 -8
- three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +1 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +0 -10
- three/examples/jsm/webxr/XRControllerModelFactory.d.ts +6 -5
- three/examples/jsm/webxr/XRHandMeshModel.d.ts +10 -2
- three/package.json +2 -2
- three/src/Three.d.ts +1 -0
- three/src/cameras/PerspectiveCamera.d.ts +13 -0
- three/src/constants.d.ts +4 -3
- three/src/core/InterleavedBufferAttribute.d.ts +12 -2
- three/src/core/Object3D.d.ts +13 -13
- three/src/core/UniformsGroup.d.ts +3 -3
- three/src/extras/core/Curve.d.ts +9 -9
- three/src/extras/core/CurvePath.d.ts +8 -7
- three/src/geometries/RingGeometry.d.ts +1 -1
- three/src/lights/PointLight.d.ts +7 -0
- 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 +17 -15
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshDepthMaterial.d.ts +6 -0
- three/src/materials/MeshDistanceMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -0
- three/src/materials/MeshNormalMaterial.d.ts +7 -0
- three/src/materials/MeshPhongMaterial.d.ts +7 -0
- three/src/materials/MeshPhysicalMaterial.d.ts +6 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -2
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/RawShaderMaterial.d.ts +9 -0
- three/src/materials/ShaderMaterial.d.ts +17 -3
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -2
- three/src/math/Color.d.ts +1 -1
- three/src/math/Matrix4.d.ts +30 -30
- three/src/math/Quaternion.d.ts +27 -30
- three/src/math/Sphere.d.ts +5 -0
- three/src/math/Triangle.d.ts +8 -25
- three/src/math/Vector2.d.ts +24 -159
- three/src/math/Vector3.d.ts +46 -54
- three/src/math/Vector4.d.ts +25 -20
- three/src/objects/BatchedMesh.d.ts +2 -2
- three/src/objects/Bone.d.ts +2 -2
- three/src/objects/InstancedMesh.d.ts +2 -1
- three/src/objects/LOD.d.ts +2 -2
- three/src/objects/Line.d.ts +3 -2
- three/src/objects/LineLoop.d.ts +3 -1
- three/src/objects/LineSegments.d.ts +3 -1
- three/src/objects/Points.d.ts +3 -2
- three/src/objects/SkinnedMesh.d.ts +4 -8
- three/src/objects/Sprite.d.ts +2 -2
- three/src/renderers/shaders/ShaderLib.d.ts +18 -18
- three/src/renderers/shaders/UniformsUtils.d.ts +3 -2
- three/src/renderers/webgl/WebGLLights.d.ts +39 -37
- three/src/renderers/webgl/WebGLProgram.d.ts +0 -1
- three/src/renderers/webgl/WebGLPrograms.d.ts +226 -9
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +27 -0
- three/src/renderers/webxr/WebXRManager.d.ts +2 -1
- three/src/textures/CompressedCubeTexture.d.ts +13 -0
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/textures/Source.d.ts +11 -1
- three/build/three.d.ts +0 -2
- three/build/three.min.d.ts +0 -2
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +0 -310
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -166
- three/examples/jsm/objects/GroundProjectedSkybox.d.ts +0 -13
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FramebufferTexture } from '../../../../src/Three.js';
|
|
2
|
+
import TextureNode from '../accessors/TextureNode.js';
|
|
3
|
+
import Node from '../core/Node.js';
|
|
4
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
5
|
+
import { NodeUpdateType } from '../core/constants.js';
|
|
6
|
+
|
|
7
|
+
export default class ViewportTextureNode extends TextureNode {
|
|
8
|
+
generateMipmaps: boolean;
|
|
9
|
+
|
|
10
|
+
readonly isOutputTextureNode: true;
|
|
11
|
+
|
|
12
|
+
updateBeforeType: NodeUpdateType;
|
|
13
|
+
|
|
14
|
+
constructor(uvNode?: Node, levelNode?: Node | null, framebufferTexture?: FramebufferTexture | null);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const viewportTexture: (
|
|
18
|
+
uvNode?: Node,
|
|
19
|
+
levelNode?: Node | null,
|
|
20
|
+
framebufferTexture?: FramebufferTexture | null,
|
|
21
|
+
) => ShaderNodeObject<ViewportTextureNode>;
|
|
22
|
+
export const viewportMipTexture: (
|
|
23
|
+
uvNode?: Node,
|
|
24
|
+
levelNode?: Node | null,
|
|
25
|
+
framebufferTexture?: FramebufferTexture | null,
|
|
26
|
+
) => ShaderNodeObject<Node>;
|
|
27
|
+
|
|
28
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
29
|
+
interface NodeElements {
|
|
30
|
+
viewportTexture: typeof viewportTexture;
|
|
31
|
+
viewportMipTexture: typeof viewportMipTexture;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -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,11 @@ 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>;
|
|
13
|
+
|
|
14
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
15
|
+
interface NodeElements {
|
|
16
|
+
densityFog: typeof densityFog;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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,11 @@ 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>;
|
|
14
|
+
|
|
15
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
16
|
+
interface NodeElements {
|
|
17
|
+
fog: typeof fog;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -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,11 @@ 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>;
|
|
14
|
+
|
|
15
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
16
|
+
interface NodeElements {
|
|
17
|
+
rangeFog: typeof rangeFog;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
2
|
import Node from '../../core/Node.js';
|
|
3
|
+
import OperatorNode from '../../math/OperatorNode.js';
|
|
3
4
|
|
|
4
|
-
declare const BRDF_GGX:
|
|
5
|
+
declare const BRDF_GGX: (args: {
|
|
6
|
+
lightDirection: Node;
|
|
7
|
+
f0: Node;
|
|
8
|
+
f90: Node;
|
|
9
|
+
roughness: Node;
|
|
10
|
+
iridescenceFresnel?: Node;
|
|
11
|
+
}) => ShaderNodeObject<OperatorNode>;
|
|
5
12
|
|
|
6
13
|
export default BRDF_GGX;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
2
|
import Node from '../../core/Node.js';
|
|
3
|
+
import OperatorNode from '../../math/OperatorNode.js';
|
|
3
4
|
|
|
4
|
-
declare const BRDF_Lambert:
|
|
5
|
+
declare const BRDF_Lambert: (args: { diffuseColor: Node }) => ShaderNodeObject<OperatorNode>;
|
|
5
6
|
|
|
6
7
|
export default BRDF_Lambert;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
|
+
import Node from '../../core/Node.js';
|
|
3
|
+
import OperatorNode from '../../math/OperatorNode.js';
|
|
4
|
+
|
|
5
|
+
declare const BRDF_Sheen: (args: { lightDirection: Node }) => ShaderNodeObject<OperatorNode>;
|
|
6
|
+
|
|
7
|
+
export default BRDF_Sheen;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
2
|
import Node from '../../core/Node.js';
|
|
3
|
+
import OperatorNode from '../../math/OperatorNode.js';
|
|
3
4
|
|
|
4
5
|
// Analytical approximation of the DFG LUT, one half of the
|
|
5
6
|
// split-sum approximation used in indirect specular lighting.
|
|
6
7
|
// via 'environmentBRDF' from "Physically Based Shading on Mobile"
|
|
7
8
|
// https://www.unrealengine.com/blog/physically-based-shading-on-mobile
|
|
8
|
-
declare const DFGApprox:
|
|
9
|
+
declare const DFGApprox: (args: { roughness: Node; dotNV: Node }) => ShaderNodeObject<OperatorNode>;
|
|
9
10
|
|
|
10
11
|
export default DFGApprox;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
2
|
import Node from '../../core/Node.js';
|
|
3
|
+
import OperatorNode from '../../math/OperatorNode.js';
|
|
3
4
|
|
|
4
5
|
// Microfacet Models for Refraction through Rough Surfaces - equation (33)
|
|
5
6
|
// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
|
|
6
7
|
// alpha is "roughness squared" in Disney’s reparameterization
|
|
7
|
-
declare const D_GGX:
|
|
8
|
+
declare const D_GGX: (args: { alpha: Node; dotNH: Node }) => ShaderNodeObject<OperatorNode>;
|
|
8
9
|
|
|
9
10
|
export default D_GGX;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from '../../shadernode/ShaderNode.js';
|
|
2
2
|
import Node from '../../core/Node.js';
|
|
3
|
+
import OperatorNode from '../../math/OperatorNode.js';
|
|
3
4
|
|
|
4
|
-
declare const F_Schlick:
|
|
5
|
+
declare const F_Schlick: (args: { f0: Node; f90: Node; dotVH: Node }) => ShaderNodeObject<OperatorNode>;
|
|
5
6
|
|
|
6
7
|
export default F_Schlick;
|
|
@@ -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,11 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import LightingModel from '../core/LightingModel.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ambientOcclusion: ShaderNode<{ ambientOcclusion: Node; reflectedLight: Node }>;
|
|
9
|
-
};
|
|
4
|
+
export default class PhysicalLightingModel extends LightingModel {
|
|
5
|
+
clearcoat: boolean;
|
|
6
|
+
sheen: boolean;
|
|
7
|
+
iridescence: boolean;
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
clearcoatRadiance: Node | null;
|
|
10
|
+
clearcoatSpecularDirect: Node | null;
|
|
11
|
+
clearcoatSpecularIndirect: Node | null;
|
|
12
|
+
sheenSpecularDirect: Node | null;
|
|
13
|
+
sheenSpecularIndirect: Node | null;
|
|
14
|
+
iridescenceFresnel: Node | null;
|
|
15
|
+
iridescenceF0: Node | null;
|
|
16
|
+
|
|
17
|
+
constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean);
|
|
18
|
+
|
|
19
|
+
computeMultiscattering(singleScatter: Node, multiScatter: Node, specularF90?: Node): void;
|
|
20
|
+
}
|
|
@@ -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,15 @@ 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>;
|
|
19
|
+
|
|
20
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
21
|
+
interface NodeElements {
|
|
22
|
+
compute: typeof compute;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import ContextNode from '../core/ContextNode.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
|
+
import LightingModel, { LightingModelIndirectInput } from '../core/LightingModel.js';
|
|
4
5
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export default class LightingContextNode extends ContextNode {
|
|
7
|
+
lightingModelNode: LightingModel | null;
|
|
8
|
+
backdropNode: Node | null;
|
|
9
|
+
backdropAlphaNode: Node | null;
|
|
10
|
+
|
|
11
|
+
constructor(
|
|
12
|
+
node: Node,
|
|
13
|
+
lightingModel?: LightingModel | null,
|
|
14
|
+
backdropNode?: Node | null,
|
|
15
|
+
backdropAlphaNode?: Node | null,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
getContext(): LightingModelIndirectInput;
|
|
9
19
|
}
|
|
10
20
|
|
|
11
|
-
export
|
|
12
|
-
lightingModelNode: LightingModelNode | null;
|
|
21
|
+
export const lightingContext: (node: Node, lightingModelNode?: LightingModel) => ShaderNodeObject<LightingContextNode>;
|
|
13
22
|
|
|
14
|
-
|
|
23
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
24
|
+
interface NodeElements {
|
|
25
|
+
lightingContext: typeof lightingContext;
|
|
26
|
+
}
|
|
15
27
|
}
|
|
@@ -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>;
|
|
@@ -2,8 +2,7 @@ import NodeMaterial from './NodeMaterial.js';
|
|
|
2
2
|
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
3
3
|
|
|
4
4
|
export default class LineBasicNodeMaterial extends NodeMaterial {
|
|
5
|
-
isLineBasicNodeMaterial: true;
|
|
5
|
+
readonly isLineBasicNodeMaterial: true;
|
|
6
6
|
|
|
7
7
|
constructor(parameters?: ShaderMaterialParameters);
|
|
8
|
-
copy(source: LineBasicNodeMaterial): this;
|
|
9
8
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
NodeMaterial,
|
|
11
|
-
LineBasicNodeMaterial,
|
|
12
|
-
MeshBasicNodeMaterial,
|
|
13
|
-
MeshPhysicalNodeMaterial,
|
|
14
|
-
MeshStandardNodeMaterial,
|
|
15
|
-
PointsNodeMaterial,
|
|
16
|
-
SpriteNodeMaterial,
|
|
17
|
-
};
|
|
1
|
+
export { default as NodeMaterial } from './NodeMaterial.js';
|
|
2
|
+
export { default as LineBasicNodeMaterial } from './LineBasicNodeMaterial.js';
|
|
3
|
+
export { default as MeshBasicNodeMaterial } from './MeshBasicNodeMaterial.js';
|
|
4
|
+
export { default as MeshPhongNodeMaterial } from './MeshPhongNodeMaterial.js';
|
|
5
|
+
export { default as MeshStandardNodeMaterial } from './MeshStandardNodeMaterial.js';
|
|
6
|
+
export { default as MeshPhysicalNodeMaterial } from './MeshPhysicalNodeMaterial.js';
|
|
7
|
+
export { default as MeshSSSPhysicalNodeMaterial } from './MeshSSSNodeMaterial.js';
|
|
8
|
+
export { default as PointsNodeMaterial } from './PointsNodeMaterial.js';
|
|
9
|
+
export { default as SpriteNodeMaterial } from './SpriteNodeMaterial.js';
|
|
@@ -2,9 +2,7 @@ import NodeMaterial from './NodeMaterial.js';
|
|
|
2
2
|
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
3
3
|
|
|
4
4
|
export default class MeshBasicNodeMaterial extends NodeMaterial {
|
|
5
|
-
isMeshBasicNodeMaterial: true;
|
|
6
|
-
lights: true;
|
|
5
|
+
readonly isMeshBasicNodeMaterial: true;
|
|
7
6
|
|
|
8
|
-
constructor(
|
|
9
|
-
copy(source: MeshBasicNodeMaterial): this;
|
|
7
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
10
8
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
2
|
+
import NodeMaterial from './NodeMaterial.js';
|
|
3
|
+
import Node from '../core/Node.js';
|
|
4
|
+
|
|
5
|
+
export default class MeshPhongNodeMaterial extends NodeMaterial {
|
|
6
|
+
readonly isMeshPhongNodeMaterial: true;
|
|
7
|
+
|
|
8
|
+
shininessNode: Node | null;
|
|
9
|
+
specularNode: Node | null;
|
|
10
|
+
|
|
11
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
12
|
+
}
|
|
@@ -1,12 +1,23 @@
|
|
|
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
5
|
|
|
6
6
|
export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
readonly isMeshPhysicalNodeMaterial: true;
|
|
8
|
+
|
|
9
|
+
clearcoatNode: Node | null;
|
|
10
|
+
clearcoatRoughnessNode: Node | null;
|
|
11
|
+
clearcoatNormalNode: Node | null;
|
|
12
|
+
|
|
13
|
+
sheenNode: Node | null;
|
|
14
|
+
sheenRoughnessNode: Node | null;
|
|
15
|
+
|
|
16
|
+
iridescenceNode: Node | null;
|
|
17
|
+
iridescenceIORNode: Node | null;
|
|
18
|
+
iridescenceThicknessNode: Node | null;
|
|
19
|
+
|
|
20
|
+
iorNode?: Node | null;
|
|
10
21
|
|
|
11
22
|
specularIntensityNode: Node | null;
|
|
12
23
|
specularColorNode: Node | null;
|
|
@@ -16,7 +27,5 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
|
16
27
|
attenuationDistanceNode: Node | null;
|
|
17
28
|
attenuationColorNode: Node | null;
|
|
18
29
|
|
|
19
|
-
constructor(parameters
|
|
20
|
-
|
|
21
|
-
copy(source: MeshPhysicalNodeMaterial): this;
|
|
30
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
22
31
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import ConstNode from '../core/ConstNode.js';
|
|
4
|
+
import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial.js';
|
|
5
|
+
|
|
6
|
+
export default class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
|
|
7
|
+
thicknessColorNode: Node | null;
|
|
8
|
+
thicknessDistortionNode: ConstNode<number>;
|
|
9
|
+
thicknessAmbientNode: ConstNode<number>;
|
|
10
|
+
thicknessAttenuationNode: ConstNode<number>;
|
|
11
|
+
thicknessPowerNode: ConstNode<number>;
|
|
12
|
+
thicknessScaleNode: ConstNode<number>;
|
|
13
|
+
|
|
14
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
15
|
+
|
|
16
|
+
get useSSS(): boolean;
|
|
17
|
+
}
|
|
@@ -3,16 +3,12 @@ import Node from '../core/Node.js';
|
|
|
3
3
|
import NodeMaterial from './NodeMaterial.js';
|
|
4
4
|
|
|
5
5
|
export default class MeshStandardNodeMaterial extends NodeMaterial {
|
|
6
|
-
isMeshStandardNodeMaterial: true;
|
|
6
|
+
readonly isMeshStandardNodeMaterial: true;
|
|
7
7
|
|
|
8
8
|
emissiveNode: Node | null;
|
|
9
9
|
|
|
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
|
-
copy(source: MeshStandardNodeMaterial): this;
|
|
18
14
|
}
|
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
LineBasicMaterial,
|
|
3
|
+
Material,
|
|
4
|
+
MeshBasicMaterial,
|
|
5
|
+
MeshPhongMaterial,
|
|
6
|
+
MeshPhysicalMaterial,
|
|
7
|
+
MeshStandardMaterial,
|
|
8
|
+
PointsMaterial,
|
|
9
|
+
ShaderMaterial,
|
|
10
|
+
SpriteMaterial,
|
|
11
|
+
} from '../../../../src/Three.js';
|
|
2
12
|
import NodeBuilder from '../core/NodeBuilder.js';
|
|
3
13
|
import Node from '../core/Node.js';
|
|
4
|
-
import
|
|
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';
|
|
20
|
+
import LightsNode from '../lighting/LightsNode.js';
|
|
21
|
+
import LightingModel from '../core/LightingModel.js';
|
|
22
|
+
import MeshPhongNodeMaterial from './MeshPhongNodeMaterial.js';
|
|
5
23
|
|
|
6
24
|
export default class NodeMaterial extends ShaderMaterial {
|
|
7
|
-
isNodeMaterial: true;
|
|
25
|
+
readonly isNodeMaterial: true;
|
|
8
26
|
|
|
9
|
-
|
|
27
|
+
normals: boolean;
|
|
10
28
|
|
|
11
|
-
|
|
12
|
-
normals: true;
|
|
29
|
+
colorSpaced: boolean;
|
|
13
30
|
|
|
14
|
-
lightsNode:
|
|
31
|
+
lightsNode: LightsNode | null;
|
|
15
32
|
envNode: Node | null;
|
|
16
33
|
|
|
17
34
|
colorNode: Node | null;
|
|
@@ -23,16 +40,38 @@ export default class NodeMaterial extends ShaderMaterial {
|
|
|
23
40
|
|
|
24
41
|
positionNode: Node | null;
|
|
25
42
|
|
|
43
|
+
depthNode: Node | null;
|
|
44
|
+
shadowNode: Node | null;
|
|
45
|
+
|
|
46
|
+
outputNode: Node | null;
|
|
47
|
+
|
|
48
|
+
fragmentNode: Node | null;
|
|
49
|
+
vertexNode: Node | null;
|
|
50
|
+
|
|
26
51
|
constructor();
|
|
27
52
|
|
|
28
53
|
build(builder: NodeBuilder): void;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
):
|
|
36
|
-
|
|
37
|
-
|
|
54
|
+
setup(builder: NodeBuilder): void;
|
|
55
|
+
setupDepth(builder: NodeBuilder): void;
|
|
56
|
+
setupPosition(builder: NodeBuilder): Node;
|
|
57
|
+
setupDiffuseColor(builder: NodeBuilder): void;
|
|
58
|
+
setupVariants(builder: NodeBuilder): void;
|
|
59
|
+
setupNormal(builder: NodeBuilder): void;
|
|
60
|
+
getEnvNode(builder: NodeBuilder): Node | null;
|
|
61
|
+
setupLights(builder: NodeBuilder): LightsNode;
|
|
62
|
+
setupLightingModel(builder: NodeBuilder): LightingModel;
|
|
63
|
+
setupLighting(builder: NodeBuilder): Node;
|
|
64
|
+
setupOutput(builder: NodeBuilder, outputNode: Node): Node;
|
|
65
|
+
|
|
66
|
+
setDefaultValues(material: Material): void;
|
|
67
|
+
|
|
68
|
+
static fromMaterial(material: LineBasicMaterial): LineBasicNodeMaterial;
|
|
69
|
+
static fromMaterial(material: MeshBasicMaterial): MeshBasicNodeMaterial;
|
|
70
|
+
static fromMaterial(material: MeshPhongMaterial): MeshPhongNodeMaterial;
|
|
71
|
+
static fromMaterial(material: MeshPhysicalMaterial): MeshPhysicalNodeMaterial;
|
|
72
|
+
static fromMaterial(material: MeshStandardMaterial): MeshStandardNodeMaterial;
|
|
73
|
+
static fromMaterial(material: PointsMaterial): PointsNodeMaterial;
|
|
74
|
+
static fromMaterial(material: SpriteMaterial): SpriteNodeMaterial;
|
|
75
|
+
static fromMaterial(material: NodeMaterial): NodeMaterial;
|
|
76
|
+
static fromMaterial(material: Material): NodeMaterial;
|
|
38
77
|
}
|
|
@@ -3,13 +3,7 @@ import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
|
3
3
|
import { Node } from '../Nodes.js';
|
|
4
4
|
|
|
5
5
|
export default class PointsNodeMaterial extends NodeMaterial {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
opacityNode: Node | null;
|
|
9
|
-
alphaTestNode: Node | null;
|
|
10
|
-
lightNode: Node | null;
|
|
11
|
-
sizeNode: Node | null;
|
|
12
|
-
positionNode: Node | null;
|
|
6
|
+
readonly isPointsNodeMaterial: true;
|
|
7
|
+
|
|
13
8
|
constructor(parameters?: ShaderMaterialParameters);
|
|
14
|
-
copy(source: PointsNodeMaterial): this;
|
|
15
9
|
}
|
|
@@ -6,18 +6,8 @@ import Node from '../core/Node.js';
|
|
|
6
6
|
export default class SpriteNodeMaterial extends NodeMaterial {
|
|
7
7
|
isSpriteNodeMaterial: true;
|
|
8
8
|
|
|
9
|
-
colorNode: Node | null;
|
|
10
|
-
opacityNode: Node | null;
|
|
11
|
-
|
|
12
|
-
alphaTestNode: Node | null;
|
|
13
|
-
|
|
14
|
-
lightNode: Node | null;
|
|
15
|
-
|
|
16
|
-
positionNode: Node | null;
|
|
17
9
|
rotationNode: Node | null;
|
|
18
10
|
scaleNode: Node | null;
|
|
19
11
|
|
|
20
12
|
constructor(parameters?: ShaderMaterialParameters);
|
|
21
|
-
generatePosition(builder: NodeBuilder): void;
|
|
22
|
-
copy(source: SpriteNodeMaterial): this;
|
|
23
13
|
}
|