@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,16 @@
|
|
|
1
|
+
import CondNode from '../math/CondNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
|
+
|
|
5
|
+
export default class DiscardNode extends CondNode {
|
|
6
|
+
constructor(condNode: Node);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const inlineDiscard: (condNode: NodeRepresentation) => ShaderNodeObject<DiscardNode>;
|
|
10
|
+
export const discard: (condNode: NodeRepresentation) => ShaderNodeObject<Node>;
|
|
11
|
+
|
|
12
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
13
|
+
interface NodeElements {
|
|
14
|
+
discard: typeof discard;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { PositionNode, TempNode } from '../Nodes.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
3
|
|
|
4
4
|
export default class EquirectUVNode extends TempNode {
|
|
5
|
-
constructor(dirNode?:
|
|
5
|
+
constructor(dirNode?: ShaderNodeObject<PositionNode>);
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
export const equirectUV: ShaderNodeObject<EquirectUVNode>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import UniformNode from '../core/UniformNode.js';
|
|
2
1
|
import { Texture } from '../../../../src/Three.js';
|
|
3
|
-
import
|
|
2
|
+
import UniformNode from '../core/UniformNode.js';
|
|
3
|
+
import TextureNode from '../accessors/TextureNode.js';
|
|
4
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
5
|
|
|
5
|
-
export default class MaxMipLevelNode extends UniformNode {
|
|
6
|
+
export default class MaxMipLevelNode extends UniformNode<0> {
|
|
6
7
|
textureNode: TextureNode;
|
|
7
8
|
|
|
8
9
|
constructor(textureNode: TextureNode);
|
|
9
10
|
|
|
10
11
|
get texture(): Texture;
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export const maxMipLevel: (texture: Texture) => ShaderNodeObject<MaxMipLevelNode>;
|
|
@@ -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 type OscNodeMethod =
|
|
4
5
|
| typeof OscNode.SINE
|
|
@@ -17,3 +18,8 @@ export default class OscNode extends Node {
|
|
|
17
18
|
|
|
18
19
|
constructor(method: OscNodeMethod, timeNode?: Node);
|
|
19
20
|
}
|
|
21
|
+
|
|
22
|
+
export const oscSine: (timeNode?: NodeRepresentation) => ShaderNodeObject<OscNode>;
|
|
23
|
+
export const oscSquare: (timeNode?: NodeRepresentation) => ShaderNodeObject<OscNode>;
|
|
24
|
+
export const oscTriangle: (timeNode?: NodeRepresentation) => ShaderNodeObject<OscNode>;
|
|
25
|
+
export const oscSawtooth: (timeNode?: NodeRepresentation) => ShaderNodeObject<OscNode>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Camera, Object3D, RenderTarget } from '../../../../src/Three.js';
|
|
2
|
+
import TextureNode from '../accessors/TextureNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
|
+
|
|
5
|
+
export interface ReflectorNodeParameters {
|
|
6
|
+
target?: Object3D | undefined;
|
|
7
|
+
resolution?: number | undefined;
|
|
8
|
+
generateMipmaps?: boolean | undefined;
|
|
9
|
+
bounces?: boolean | undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default class ReflectorNode extends TextureNode {
|
|
13
|
+
target: Object3D;
|
|
14
|
+
resolution: number;
|
|
15
|
+
generateMipmaps: boolean;
|
|
16
|
+
bounces: boolean;
|
|
17
|
+
|
|
18
|
+
virtualCameras: WeakMap<Camera, Camera>;
|
|
19
|
+
renderTargets: WeakMap<Camera, RenderTarget>;
|
|
20
|
+
|
|
21
|
+
constructor(parameters?: ReflectorNodeParameters);
|
|
22
|
+
|
|
23
|
+
getTextureNode(): TextureNode;
|
|
24
|
+
|
|
25
|
+
getVirtualCamera(camera: Camera): Camera;
|
|
26
|
+
|
|
27
|
+
getRenderTarget(camera: Camera): RenderTarget;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const reflector: (parameters?: ReflectorNodeParameters) => ShaderNodeObject<ReflectorNode>;
|
|
@@ -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 RemapNode extends Node {
|
|
4
5
|
node: Node;
|
|
@@ -9,5 +10,27 @@ export default class RemapNode extends Node {
|
|
|
9
10
|
|
|
10
11
|
doClamp: boolean;
|
|
11
12
|
|
|
12
|
-
constructor(node: Node, inLowNode: Node, inHighNode: Node, outLowNode
|
|
13
|
+
constructor(node: Node, inLowNode: Node, inHighNode: Node, outLowNode?: Node, outHighNode?: Node);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const remap: (
|
|
17
|
+
node: Node,
|
|
18
|
+
inLowNode: NodeRepresentation,
|
|
19
|
+
inHighNode: NodeRepresentation,
|
|
20
|
+
outLowNode?: NodeRepresentation,
|
|
21
|
+
outHighNode?: NodeRepresentation,
|
|
22
|
+
) => ShaderNodeObject<RemapNode>;
|
|
23
|
+
export const remapClamp: (
|
|
24
|
+
node: Node,
|
|
25
|
+
inLowNode: NodeRepresentation,
|
|
26
|
+
inHighNode: NodeRepresentation,
|
|
27
|
+
outLowNode?: NodeRepresentation,
|
|
28
|
+
outHighNode?: NodeRepresentation,
|
|
29
|
+
) => ShaderNodeObject<RemapNode>;
|
|
30
|
+
|
|
31
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
32
|
+
interface NodeElements {
|
|
33
|
+
remap: typeof remap;
|
|
34
|
+
remapClamp: typeof remapClamp;
|
|
35
|
+
}
|
|
13
36
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import TempNode from '../core/TempNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
4
|
+
|
|
5
|
+
export default class RotateNode extends TempNode {
|
|
6
|
+
positionNode: Node;
|
|
7
|
+
rotationNode: Node;
|
|
8
|
+
|
|
9
|
+
constructor(positionNode: Node, rotationNode: Node);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const rotate: (
|
|
13
|
+
positionNode: NodeRepresentation,
|
|
14
|
+
rotationNode: NodeRepresentation,
|
|
15
|
+
) => ShaderNodeObject<RotateNode>;
|
|
16
|
+
|
|
17
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
18
|
+
interface NodeElements {
|
|
19
|
+
rotate: typeof rotate;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import TempNode from '../core/TempNode.js';
|
|
2
2
|
import Node from '../core/Node.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
4
|
|
|
4
5
|
export default class RotateUVNode extends TempNode {
|
|
5
6
|
uvNode: Node;
|
|
@@ -8,3 +9,11 @@ export default class RotateUVNode extends TempNode {
|
|
|
8
9
|
|
|
9
10
|
constructor(uvNode: Node, rotationNode: Node, centerNode?: Node);
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
export const rotateUV: (uvNode: Node, rotationNode: Node, centerNode?: Node) => ShaderNodeObject<RotateUVNode>;
|
|
14
|
+
|
|
15
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
16
|
+
interface NodeElements {
|
|
17
|
+
rotateUV: typeof rotateUV;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Node from '../core/Node.js';
|
|
2
|
+
import TextureNode from '../accessors/TextureNode.js';
|
|
3
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
4
|
|
|
3
5
|
export default class SpecularMIPLevelNode extends Node {
|
|
4
6
|
textureNode: TextureNode;
|
|
@@ -6,3 +8,5 @@ export default class SpecularMIPLevelNode extends Node {
|
|
|
6
8
|
|
|
7
9
|
constructor(textureNode: TextureNode, roughnessNode?: Node | null);
|
|
8
10
|
}
|
|
11
|
+
|
|
12
|
+
export const specularMIPLevel: () => ShaderNodeObject<SpecularMIPLevelNode>;
|
|
@@ -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 SpriteSheetUVNode extends Node {
|
|
4
5
|
countNode: Node;
|
|
@@ -7,3 +8,9 @@ export default class SpriteSheetUVNode extends Node {
|
|
|
7
8
|
|
|
8
9
|
constructor(countNode: Node, uvNode?: Node, frameNode?: Node);
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export const spritesheetUV: (
|
|
13
|
+
countNode: NodeRepresentation,
|
|
14
|
+
uvNode?: NodeRepresentation,
|
|
15
|
+
frameNode?: NodeRepresentation,
|
|
16
|
+
) => ShaderNodeObject<SpriteSheetUVNode>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import UniformNode from '../core/UniformNode.js';
|
|
2
|
+
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
2
3
|
|
|
3
4
|
export type TimerNodeScope =
|
|
4
5
|
| typeof TimerNode.LOCAL
|
|
@@ -6,7 +7,7 @@ export type TimerNodeScope =
|
|
|
6
7
|
| typeof TimerNode.DELTA
|
|
7
8
|
| typeof TimerNode.FRAME;
|
|
8
9
|
|
|
9
|
-
export default class TimerNode extends UniformNode {
|
|
10
|
+
export default class TimerNode extends UniformNode<number> {
|
|
10
11
|
static LOCAL: 'local';
|
|
11
12
|
static GLOBAL: 'global';
|
|
12
13
|
static DELTA: 'delta';
|
|
@@ -17,3 +18,8 @@ export default class TimerNode extends UniformNode {
|
|
|
17
18
|
|
|
18
19
|
constructor(scope?: TimerNodeScope, scale?: number, value?: number);
|
|
19
20
|
}
|
|
21
|
+
|
|
22
|
+
export const timerLocal: (timeScale?: number, value?: number) => ShaderNodeObject<TimerNode>;
|
|
23
|
+
export const timerGlobal: (timeScale?: number, value?: number) => ShaderNodeObject<TimerNode>;
|
|
24
|
+
export const timerDelta: (timeScale?: number, value?: number) => ShaderNodeObject<TimerNode>;
|
|
25
|
+
export const frameId: ShaderNodeObject<TimerNode>;
|
|
@@ -1,22 +1,43 @@
|
|
|
1
1
|
import Node from '../core/Node.js';
|
|
2
|
-
import
|
|
2
|
+
import PositionNode from '../accessors/PositionNode.js';
|
|
3
|
+
import TextureNode from '../accessors/TextureNode.js';
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';
|
|
3
5
|
|
|
4
6
|
export default class TriplanarTexturesNode extends Node {
|
|
5
7
|
textureXNode: TextureNode;
|
|
6
8
|
textureYNode: TextureNode | null;
|
|
7
9
|
textureZNode: TextureNode | null;
|
|
8
10
|
|
|
9
|
-
scaleNode:
|
|
11
|
+
scaleNode: ShaderNodeObject<Node>;
|
|
10
12
|
|
|
11
|
-
positionNode:
|
|
12
|
-
normalNode:
|
|
13
|
+
positionNode: ShaderNodeObject<PositionNode>;
|
|
14
|
+
normalNode: ShaderNodeObject<PositionNode>;
|
|
13
15
|
|
|
14
16
|
constructor(
|
|
15
17
|
textureXNode: Node,
|
|
16
18
|
textureYNode?: TextureNode | null,
|
|
17
19
|
textureZNode?: TextureNode | null,
|
|
18
|
-
scaleNode?:
|
|
19
|
-
positionNode?:
|
|
20
|
-
normalNode?:
|
|
20
|
+
scaleNode?: ShaderNodeObject<Node>,
|
|
21
|
+
positionNode?: ShaderNodeObject<PositionNode>,
|
|
22
|
+
normalNode?: ShaderNodeObject<PositionNode>,
|
|
21
23
|
);
|
|
22
24
|
}
|
|
25
|
+
|
|
26
|
+
export const triplanarTextures: (
|
|
27
|
+
textureXNode: NodeRepresentation,
|
|
28
|
+
textureYNode?: NodeRepresentation,
|
|
29
|
+
textureZNode?: NodeRepresentation,
|
|
30
|
+
scaleNode?: NodeRepresentation,
|
|
31
|
+
positionNode?: NodeRepresentation,
|
|
32
|
+
normalNode?: NodeRepresentation,
|
|
33
|
+
) => ShaderNodeObject<TriplanarTexturesNode>;
|
|
34
|
+
export const triplanarTexture: (
|
|
35
|
+
texture: NodeRepresentation,
|
|
36
|
+
...params: NodeRepresentation[]
|
|
37
|
+
) => ShaderNodeObject<TriplanarTexturesNode>;
|
|
38
|
+
|
|
39
|
+
declare module '../shadernode/ShaderNode.js' {
|
|
40
|
+
interface NodeElements {
|
|
41
|
+
triplanarTexture: typeof triplanarTexture;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Material } from '../../../src/Three.js';
|
|
2
|
+
import Renderer from '../renderers/common/Renderer.js';
|
|
3
|
+
|
|
4
|
+
export default class QuadMesh {
|
|
5
|
+
constructor(material?: Material | null);
|
|
6
|
+
|
|
7
|
+
dispose(): void;
|
|
8
|
+
|
|
9
|
+
renderAsync(renderer: Renderer): Promise<void>;
|
|
10
|
+
|
|
11
|
+
get material(): Material;
|
|
12
|
+
set material(value: Material);
|
|
13
|
+
|
|
14
|
+
get render(): (renderer: Renderer) => Promise<void>;
|
|
15
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Box3,
|
|
2
3
|
Camera,
|
|
3
4
|
Color,
|
|
4
5
|
ColorRepresentation,
|
|
@@ -14,23 +15,26 @@ import {
|
|
|
14
15
|
|
|
15
16
|
import { FullScreenQuad, Pass } from './Pass.js';
|
|
16
17
|
|
|
17
|
-
export class
|
|
18
|
+
export class GTAOPass extends Pass {
|
|
18
19
|
width: number;
|
|
19
20
|
height: number;
|
|
20
21
|
clear: boolean;
|
|
21
22
|
camera: Camera;
|
|
22
23
|
scene: Scene;
|
|
23
24
|
output: number;
|
|
25
|
+
blendIntensity: number;
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
pdRings: number;
|
|
28
|
+
pdRadiusExponent: number;
|
|
29
|
+
pdSamples: number;
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
gtaoNoiseTexture: DataTexture;
|
|
32
|
+
pdNoiseTexture: DataTexture;
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
gtaoRenderTarget: WebGLRenderTarget;
|
|
31
35
|
pdRenderTarget: WebGLRenderTarget;
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
gtaoMaterial: ShaderMaterial;
|
|
34
38
|
|
|
35
39
|
normalMaterial: MeshNormalMaterial;
|
|
36
40
|
|
|
@@ -40,6 +44,8 @@ export class HBAOPass extends Pass {
|
|
|
40
44
|
|
|
41
45
|
copyMaterial: ShaderMaterial;
|
|
42
46
|
|
|
47
|
+
blendMaterial: ShaderMaterial;
|
|
48
|
+
|
|
43
49
|
fsQuad: FullScreenQuad;
|
|
44
50
|
|
|
45
51
|
originalClearColor: Color;
|
|
@@ -55,13 +61,20 @@ export class HBAOPass extends Pass {
|
|
|
55
61
|
parameters?: { depthTexture?: DepthTexture | undefined; normalTexture?: Texture | undefined } | undefined,
|
|
56
62
|
);
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
get gtaoMap(): Texture;
|
|
65
|
+
|
|
66
|
+
setGBuffer(depthTexture?: DepthTexture | undefined, normalTexture?: Texture | undefined): void;
|
|
67
|
+
|
|
68
|
+
setSceneClipBox(box: Box3): void;
|
|
59
69
|
|
|
60
|
-
|
|
70
|
+
updateGtaoMaterial(parameters: {
|
|
61
71
|
radius?: number | undefined;
|
|
62
72
|
distanceExponent?: number | undefined;
|
|
63
|
-
|
|
73
|
+
thickness?: number | undefined;
|
|
74
|
+
distanceFallOff?: number | undefined;
|
|
75
|
+
scale?: number | undefined;
|
|
64
76
|
samples?: number | undefined;
|
|
77
|
+
screenSpaceRadius?: boolean | undefined;
|
|
65
78
|
}): void;
|
|
66
79
|
|
|
67
80
|
updatePdMaterial(parameters: {
|
|
@@ -69,6 +82,7 @@ export class HBAOPass extends Pass {
|
|
|
69
82
|
depthPhi?: number | undefined;
|
|
70
83
|
normalPhi?: number | undefined;
|
|
71
84
|
radius?: number | undefined;
|
|
85
|
+
radiusExponent?: number | undefined;
|
|
72
86
|
rings?: number | undefined;
|
|
73
87
|
samples?: number | undefined;
|
|
74
88
|
}): void;
|
|
@@ -96,11 +110,12 @@ export class HBAOPass extends Pass {
|
|
|
96
110
|
generateNoise(size?: number): DataTexture;
|
|
97
111
|
|
|
98
112
|
static OUTPUT: {
|
|
113
|
+
Off: -1;
|
|
99
114
|
Default: 0;
|
|
100
115
|
Diffuse: 1;
|
|
101
116
|
Depth: 2;
|
|
102
117
|
Normal: 3;
|
|
103
|
-
|
|
118
|
+
AO: 4;
|
|
104
119
|
Denoise: 5;
|
|
105
120
|
};
|
|
106
121
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { CoordinateSystem } from '../../../../src/Three.js';
|
|
2
2
|
import Renderer from './Renderer.js';
|
|
3
3
|
|
|
4
|
+
export interface BackendParameters {
|
|
5
|
+
canvas?: HTMLCanvasElement | undefined;
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
export default abstract class Backend {
|
|
5
9
|
renderer: Renderer | null;
|
|
6
10
|
domElement: HTMLCanvasElement | null;
|
|
7
11
|
|
|
8
|
-
constructor(parameters?:
|
|
12
|
+
constructor(parameters?: BackendParameters);
|
|
9
13
|
|
|
10
|
-
init(renderer: Renderer):
|
|
14
|
+
init(renderer: Renderer): void;
|
|
11
15
|
|
|
12
16
|
abstract get coordinateSystem(): CoordinateSystem;
|
|
13
17
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Color, ColorRepresentation } from '../../../../src/math/Color.ts';
|
|
2
|
+
|
|
3
|
+
export default class Color4 extends Color {
|
|
4
|
+
constructor(r: number, g: number, b: number, a?: number);
|
|
5
|
+
|
|
6
|
+
set(...args: [color: ColorRepresentation] | [r: number, g: number, b: number, a?: number]): this;
|
|
7
|
+
|
|
8
|
+
clone(): this;
|
|
9
|
+
}
|
|
@@ -8,12 +8,18 @@ export default class Info {
|
|
|
8
8
|
|
|
9
9
|
render: { calls: number; drawCalls: number; triangles: number; points: number; lines: number };
|
|
10
10
|
|
|
11
|
-
compute: { calls: number };
|
|
11
|
+
compute: { calls: number; computeCalls: number };
|
|
12
12
|
|
|
13
13
|
memory: { geometries: number; textures: number };
|
|
14
14
|
|
|
15
|
+
timestamp: { compute: number; render: number };
|
|
16
|
+
|
|
15
17
|
update(object: Object3D, count: number, instanceCount: number): void;
|
|
16
18
|
|
|
19
|
+
updateTimestamp(type: keyof typeof this.timestamp, time: number): void;
|
|
20
|
+
|
|
21
|
+
resetCompute(): void;
|
|
22
|
+
|
|
17
23
|
reset(): void;
|
|
18
24
|
|
|
19
25
|
dispose(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Renderer from './Renderer.js';
|
|
2
|
+
import { Node } from '../../nodes/Nodes.js';
|
|
3
|
+
|
|
4
|
+
export default class PostProcessing {
|
|
5
|
+
renderer: Renderer;
|
|
6
|
+
outputNode: Node;
|
|
7
|
+
|
|
8
|
+
constructor(renderer: Renderer, outputNode?: Node);
|
|
9
|
+
|
|
10
|
+
render(): Promise<void>;
|
|
11
|
+
}
|