@types/three 0.177.0 → 0.178.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/capabilities/WebGL.d.ts +0 -11
- three/examples/jsm/controls/TransformControls.d.ts +16 -1
- three/examples/jsm/helpers/TextureHelper.d.ts +2 -2
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +2 -2
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
- three/examples/jsm/transpiler/AST.d.ts +77 -26
- three/examples/jsm/transpiler/TSLEncoder.d.ts +9 -3
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +4 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -2
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -2
- three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +20 -0
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +4 -4
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +6 -6
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/FilmNode.d.ts +4 -4
- three/examples/jsm/tsl/display/GTAONode.d.ts +3 -3
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +5 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +8 -8
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +4 -4
- three/examples/jsm/tsl/display/MotionBlur.d.ts +4 -4
- three/examples/jsm/tsl/display/OutlineNode.d.ts +3 -3
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +3 -3
- three/examples/jsm/tsl/display/SMAANode.d.ts +3 -3
- three/examples/jsm/tsl/display/SSRNode.d.ts +5 -5
- three/examples/jsm/tsl/display/Sepia.d.ts +2 -2
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +3 -3
- three/examples/jsm/tsl/display/TransitionNode.d.ts +4 -4
- three/examples/jsm/tsl/display/hashBlur.d.ts +5 -5
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +5 -5
- three/package.json +2 -2
- three/src/Three.TSL.d.ts +9 -16
- three/src/Three.WebGPU.d.ts +2 -0
- three/src/constants.d.ts +13 -5
- three/src/core/BufferGeometry.d.ts +6 -1
- three/src/core/GLBufferAttribute.d.ts +18 -1
- three/src/helpers/AxesHelper.d.ts +3 -1
- three/src/materials/LineBasicMaterial.d.ts +66 -34
- three/src/materials/LineDashedMaterial.d.ts +41 -21
- three/src/materials/Material.d.ts +408 -398
- three/src/materials/MeshBasicMaterial.d.ts +101 -62
- three/src/materials/MeshDepthMaterial.d.ts +71 -32
- three/src/materials/MeshDistanceMaterial.d.ts +65 -29
- three/src/materials/MeshLambertMaterial.d.ts +179 -103
- three/src/materials/MeshMatcapMaterial.d.ts +97 -55
- three/src/materials/MeshNormalMaterial.d.ts +76 -41
- three/src/materials/MeshPhongMaterial.d.ts +164 -100
- three/src/materials/MeshPhysicalMaterial.d.ts +164 -116
- three/src/materials/MeshStandardMaterial.d.ts +178 -91
- three/src/materials/MeshToonMaterial.d.ts +130 -81
- three/src/materials/PointsMaterial.d.ts +77 -30
- three/src/materials/RawShaderMaterial.d.ts +12 -7
- three/src/materials/ShaderMaterial.d.ts +186 -98
- three/src/materials/ShadowMaterial.d.ts +49 -23
- three/src/materials/SpriteMaterial.d.ts +62 -33
- three/src/materials/nodes/Line2NodeMaterial.d.ts +87 -40
- three/src/materials/nodes/LineBasicNodeMaterial.d.ts +35 -16
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +75 -20
- three/src/materials/nodes/MeshBasicNodeMaterial.d.ts +49 -30
- three/src/materials/nodes/MeshLambertNodeMaterial.d.ts +49 -42
- three/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +38 -26
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +36 -22
- three/src/materials/nodes/MeshPhongNodeMaterial.d.ts +68 -48
- three/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +240 -65
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +99 -3
- three/src/materials/nodes/MeshStandardNodeMaterial.d.ts +83 -47
- three/src/materials/nodes/MeshToonNodeMaterial.d.ts +42 -36
- three/src/materials/nodes/NodeMaterial.d.ts +417 -56
- three/src/materials/nodes/NodeMaterials.d.ts +3 -2
- three/src/materials/nodes/PointsNodeMaterial.d.ts +31 -7
- three/src/materials/nodes/ShadowNodeMaterial.d.ts +38 -11
- three/src/materials/nodes/SpriteNodeMaterial.d.ts +68 -20
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +50 -14
- three/src/math/Color.d.ts +1 -1
- three/src/nodes/Nodes.d.ts +1 -3
- three/src/nodes/TSL.d.ts +4 -3
- three/src/nodes/accessors/AccessorsUtils.d.ts +3 -3
- three/src/nodes/accessors/Bitangent.d.ts +0 -2
- three/src/nodes/accessors/CubeTextureNode.d.ts +7 -7
- three/src/nodes/accessors/Normal.d.ts +19 -5
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +1 -1
- three/src/nodes/accessors/StorageBufferNode.d.ts +3 -2
- three/src/nodes/accessors/StorageTextureNode.d.ts +5 -5
- three/src/nodes/accessors/Tangent.d.ts +0 -2
- three/src/nodes/accessors/TangentUtils.d.ts +22 -0
- three/src/nodes/accessors/Texture3DNode.d.ts +5 -4
- three/src/nodes/accessors/TextureBicubic.d.ts +4 -2
- three/src/nodes/accessors/TextureNode.d.ts +16 -16
- three/src/nodes/accessors/TextureSizeNode.d.ts +3 -3
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -7
- three/src/nodes/code/FunctionCallNode.d.ts +3 -1
- three/src/nodes/code/FunctionNode.d.ts +2 -2
- three/src/nodes/code/ScriptableNode.d.ts +2 -2
- three/src/nodes/core/AssignNode.d.ts +2 -2
- three/src/nodes/core/AttributeNode.d.ts +1 -1
- three/src/nodes/core/BypassNode.d.ts +2 -2
- three/src/nodes/core/CacheNode.d.ts +0 -2
- three/src/nodes/core/ContextNode.d.ts +3 -3
- three/src/nodes/core/StackNode.d.ts +3 -13
- three/src/nodes/core/SubBuildNode.d.ts +15 -0
- three/src/nodes/core/VarNode.d.ts +4 -4
- three/src/nodes/core/VaryingNode.d.ts +3 -3
- three/src/nodes/display/BlendModes.d.ts +12 -12
- three/src/nodes/display/BumpMapNode.d.ts +4 -3
- three/src/nodes/display/ColorAdjustment.d.ts +17 -17
- three/src/nodes/display/ColorSpaceFunctions.d.ts +3 -3
- three/src/nodes/display/ColorSpaceNode.d.ts +4 -4
- three/src/nodes/display/FrontFacingNode.d.ts +1 -0
- three/src/nodes/display/PosterizeNode.d.ts +3 -3
- three/src/nodes/display/RenderOutputNode.d.ts +2 -2
- three/src/nodes/display/ScreenNode.d.ts +0 -10
- three/src/nodes/display/ToneMappingFunctions.d.ts +7 -7
- three/src/nodes/display/ToneMappingNode.d.ts +6 -6
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +3 -3
- three/src/nodes/fog/Fog.d.ts +10 -10
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +4 -4
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +2 -2
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +4 -4
- three/src/nodes/geometry/RangeNode.d.ts +9 -2
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +20 -20
- three/src/nodes/gpgpu/ComputeNode.d.ts +2 -2
- three/src/nodes/lighting/PointShadowNode.d.ts +11 -11
- three/src/nodes/lighting/ShadowFilterNode.d.ts +11 -11
- three/src/nodes/materialx/MaterialXNodes.d.ts +59 -59
- three/src/nodes/materialx/lib/mx_hsv.d.ts +3 -3
- three/src/nodes/materialx/lib/mx_noise.d.ts +206 -206
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +2 -2
- three/src/nodes/math/ConditionalNode.d.ts +4 -19
- three/src/nodes/math/Hash.d.ts +2 -2
- three/src/nodes/math/MathNode.d.ts +21 -17
- three/src/nodes/math/OperatorNode.d.ts +41 -52
- three/src/nodes/math/TriNoise3D.d.ts +6 -6
- three/src/nodes/pmrem/PMREMNode.d.ts +3 -3
- three/src/nodes/pmrem/PMREMUtils.d.ts +20 -20
- three/src/nodes/procedural/Checker.d.ts +2 -2
- three/src/nodes/shapes/Shapes.d.ts +2 -2
- three/src/nodes/tsl/TSLBase.d.ts +1 -0
- three/src/nodes/tsl/TSLCore.d.ts +176 -76
- three/src/nodes/utils/CubeMapNode.d.ts +2 -2
- three/src/nodes/utils/DebugNode.d.ts +2 -2
- three/src/nodes/utils/Discard.d.ts +2 -2
- three/src/nodes/utils/EquirectUV.d.ts +4 -0
- three/src/nodes/utils/LoopNode.d.ts +2 -7
- three/src/nodes/utils/MatcapUV.d.ts +4 -0
- three/src/nodes/utils/Oscillators.d.ts +5 -5
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +9 -9
- three/src/nodes/utils/RTTNode.d.ts +3 -3
- three/src/nodes/utils/RemapNode.d.ts +9 -9
- three/src/nodes/utils/RotateNode.d.ts +3 -3
- three/src/nodes/utils/SampleNode.d.ts +16 -0
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +4 -4
- three/src/nodes/utils/SpriteUtils.d.ts +2 -2
- three/src/nodes/utils/StorageArrayElementNode.d.ts +4 -3
- three/src/nodes/utils/TriplanarTextures.d.ts +20 -0
- three/src/nodes/utils/UVUtils.d.ts +8 -7
- three/src/nodes/utils/ViewportUtils.d.ts +2 -2
- three/src/objects/LOD.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +1 -1
- three/src/renderers/common/Backend.d.ts +3 -3
- three/src/renderers/common/RenderObject.d.ts +10 -2
- three/src/renderers/common/Renderer.d.ts +5 -5
- three/src/renderers/common/Storage3DTexture.d.ts +40 -0
- three/src/renderers/common/StorageArrayTexture.d.ts +29 -0
- three/src/renderers/common/Textures.d.ts +2 -2
- three/src/renderers/common/XRRenderTarget.d.ts +3 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +4 -9
- three/src/renderers/common/nodes/NodeSampledTexture.d.ts +1 -1
- three/src/renderers/common/nodes/Nodes.d.ts +1 -1
- three/src/renderers/webgpu/WebGPURenderer.d.ts +3 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +65 -0
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +9 -0
- three/src/nodes/utils/EquirectUVNode.d.ts +0 -8
- three/src/nodes/utils/MatcapUVNode.d.ts +0 -8
- three/src/nodes/utils/TriplanarTexturesNode.d.ts +0 -36
- three/src/renderers/common/nodes/StandardNodeLibrary.d.ts +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TempNode, TextureNode, UniformNode } from "three/webgpu";
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
+
import { Node, TempNode, TextureNode, UniformNode } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
export default class RGBShiftNode extends TempNode {
|
|
5
5
|
textureNode: TextureNode;
|
|
@@ -13,4 +13,4 @@ export default class RGBShiftNode extends TempNode {
|
|
|
13
13
|
setSize(width: number, height: number): void;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export const rgbShift: (node:
|
|
16
|
+
export const rgbShift: (node: Node, amount?: number, angle?: number) => ShaderNodeObject<RGBShiftNode>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TempNode, TextureNode } from "three/webgpu";
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
+
import { Node, TempNode, TextureNode } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
declare class SMAANode extends TempNode {
|
|
5
5
|
textureNode: TextureNode;
|
|
@@ -15,4 +15,4 @@ declare class SMAANode extends TempNode {
|
|
|
15
15
|
getSearchTexture(): string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export const smaa: (node:
|
|
18
|
+
export const smaa: (node: Node) => ShaderNodeObject<SMAANode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
2
|
import { Camera, Node, TempNode, TextureNode, UniformNode } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
declare class SSRNode extends TempNode {
|
|
@@ -30,9 +30,9 @@ declare class SSRNode extends TempNode {
|
|
|
30
30
|
export default SSRNode;
|
|
31
31
|
|
|
32
32
|
export const ssr: (
|
|
33
|
-
colorNode:
|
|
34
|
-
depthNode:
|
|
35
|
-
normalNode:
|
|
36
|
-
metalnessNode:
|
|
33
|
+
colorNode: Node,
|
|
34
|
+
depthNode: Node,
|
|
35
|
+
normalNode: Node,
|
|
36
|
+
metalnessNode: Node,
|
|
37
37
|
camera: Camera,
|
|
38
38
|
) => ShaderNodeObject<SSRNode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
2
|
import { Node } from "three/webgpu";
|
|
3
3
|
|
|
4
|
-
export const sepia: (color:
|
|
4
|
+
export const sepia: (color: Node) => ShaderNodeObject<Node>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TempNode, TextureNode } from "three/webgpu";
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
|
+
import { Node, TempNode, TextureNode } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
declare class SobelOperatorNode extends TempNode {
|
|
5
5
|
textureNode: TextureNode;
|
|
@@ -9,4 +9,4 @@ declare class SobelOperatorNode extends TempNode {
|
|
|
9
9
|
|
|
10
10
|
export default SobelOperatorNode;
|
|
11
11
|
|
|
12
|
-
export const sobel: (node:
|
|
12
|
+
export const sobel: (node: Node) => ShaderNodeObject<SobelOperatorNode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
2
|
import { Node, TempNode, TextureNode, UniformNode } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
declare class TransitionNode extends TempNode {
|
|
@@ -23,9 +23,9 @@ declare class TransitionNode extends TempNode {
|
|
|
23
23
|
export default TransitionNode;
|
|
24
24
|
|
|
25
25
|
export const transition: (
|
|
26
|
-
node:
|
|
27
|
-
nodeB:
|
|
28
|
-
mixTexture:
|
|
26
|
+
node: Node,
|
|
27
|
+
nodeB: Node,
|
|
28
|
+
mixTexture: Node,
|
|
29
29
|
mixRatio: UniformNode<number>,
|
|
30
30
|
threshold: UniformNode<number>,
|
|
31
31
|
useTexture: UniformNode<number>,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
2
|
import { Node } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
interface HashBlurOptions {
|
|
5
|
-
repeats?:
|
|
6
|
-
mask?:
|
|
5
|
+
repeats?: Node | undefined;
|
|
6
|
+
mask?: Node | null | undefined;
|
|
7
7
|
premultipliedAlpha?: boolean | undefined;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export const hashBlur: (
|
|
11
|
-
textureNode:
|
|
12
|
-
bluramount?:
|
|
11
|
+
textureNode: Node,
|
|
12
|
+
bluramount?: Node | number,
|
|
13
13
|
options?: HashBlurOptions,
|
|
14
14
|
) => ShaderNodeObject<Node>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderNodeObject } from "three/tsl";
|
|
2
2
|
import { LightsNode, Node } from "three/webgpu";
|
|
3
3
|
|
|
4
4
|
export const circleIntersectsAABB: (
|
|
5
|
-
circleCenter:
|
|
6
|
-
radius:
|
|
7
|
-
minBounds:
|
|
8
|
-
maxBounds:
|
|
5
|
+
circleCenter: Node,
|
|
6
|
+
radius: Node,
|
|
7
|
+
minBounds: Node,
|
|
8
|
+
maxBounds: Node,
|
|
9
9
|
) => ShaderNodeObject<Node>;
|
|
10
10
|
|
|
11
11
|
declare class TiledLightsNode extends LightsNode {
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.178.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
"meshoptimizer": "~0.18.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {},
|
|
52
|
-
"typesPublisherContentHash": "
|
|
52
|
+
"typesPublisherContentHash": "820feeea012736cf714d3dce62c769821b2d466044ede81f0fd6cd7021221e7a",
|
|
53
53
|
"typeScriptVersion": "5.1"
|
|
54
54
|
}
|
three/src/Three.TSL.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export const backgroundBlurriness: typeof TSL.backgroundBlurriness;
|
|
|
68
68
|
export const backgroundIntensity: typeof TSL.backgroundIntensity;
|
|
69
69
|
export const backgroundRotation: typeof TSL.backgroundRotation;
|
|
70
70
|
export const batch: typeof TSL.batch;
|
|
71
|
+
export const bentNormalView: typeof TSL.bentNormalView;
|
|
71
72
|
export const billboarding: typeof TSL.billboarding;
|
|
72
73
|
export const bitAnd: typeof TSL.bitAnd;
|
|
73
74
|
export const bitNot: typeof TSL.bitNot;
|
|
@@ -118,7 +119,6 @@ export const colorSpaceToWorking: typeof TSL.colorSpaceToWorking;
|
|
|
118
119
|
export const colorToDirection: typeof TSL.colorToDirection;
|
|
119
120
|
export const compute: typeof TSL.compute;
|
|
120
121
|
export const computeSkinning: typeof TSL.computeSkinning;
|
|
121
|
-
export const cond: typeof TSL.cond;
|
|
122
122
|
export const Const: typeof TSL.Const;
|
|
123
123
|
export const context: typeof TSL.context;
|
|
124
124
|
export const convert: typeof TSL.convert;
|
|
@@ -237,7 +237,6 @@ export const globalId: typeof TSL.globalId;
|
|
|
237
237
|
export const log: typeof TSL.log;
|
|
238
238
|
export const log2: typeof TSL.log2;
|
|
239
239
|
export const logarithmicDepthToViewZ: typeof TSL.logarithmicDepthToViewZ;
|
|
240
|
-
export const loop: typeof TSL.loop;
|
|
241
240
|
export const luminance: typeof TSL.luminance;
|
|
242
241
|
export const mediumpModelViewMatrix: typeof TSL.mediumpModelViewMatrix;
|
|
243
242
|
export const mat2: typeof TSL.mat2;
|
|
@@ -327,7 +326,6 @@ export const mx_transform_uv: typeof TSL.mx_transform_uv;
|
|
|
327
326
|
export const mx_worley_noise_float: typeof TSL.mx_worley_noise_float;
|
|
328
327
|
export const mx_worley_noise_vec2: typeof TSL.mx_worley_noise_vec2;
|
|
329
328
|
export const mx_worley_noise_vec3: typeof TSL.mx_worley_noise_vec3;
|
|
330
|
-
export const namespace: typeof TSL.namespace;
|
|
331
329
|
export const negate: typeof TSL.negate;
|
|
332
330
|
export const neutralToneMapping: typeof TSL.neutralToneMapping;
|
|
333
331
|
export const nodeArray: typeof TSL.nodeArray;
|
|
@@ -340,7 +338,9 @@ export const normalGeometry: typeof TSL.normalGeometry;
|
|
|
340
338
|
export const normalLocal: typeof TSL.normalLocal;
|
|
341
339
|
export const normalMap: typeof TSL.normalMap;
|
|
342
340
|
export const normalView: typeof TSL.normalView;
|
|
341
|
+
export const normalViewGeometry: typeof TSL.normalViewGeometry;
|
|
343
342
|
export const normalWorld: typeof TSL.normalWorld;
|
|
343
|
+
export const normalWorldGeometry: typeof TSL.normalWorldGeometry;
|
|
344
344
|
export const normalize: typeof TSL.normalize;
|
|
345
345
|
export const not: typeof TSL.not;
|
|
346
346
|
export const notEqual: typeof TSL.notEqual;
|
|
@@ -386,7 +386,7 @@ export const pow: typeof TSL.pow;
|
|
|
386
386
|
export const pow2: typeof TSL.pow2;
|
|
387
387
|
export const pow3: typeof TSL.pow3;
|
|
388
388
|
export const pow4: typeof TSL.pow4;
|
|
389
|
-
export const
|
|
389
|
+
export const premultiplyAlpha: typeof TSL.premultiplyAlpha;
|
|
390
390
|
export const property: typeof TSL.property;
|
|
391
391
|
export const radians: typeof TSL.radians;
|
|
392
392
|
export const rand: typeof TSL.rand;
|
|
@@ -405,7 +405,6 @@ export const refract: typeof TSL.refract;
|
|
|
405
405
|
export const refractVector: typeof TSL.refractVector;
|
|
406
406
|
export const refractView: typeof TSL.refractView;
|
|
407
407
|
export const reinhardToneMapping: typeof TSL.reinhardToneMapping;
|
|
408
|
-
export const remainder: typeof TSL.remainder;
|
|
409
408
|
export const remap: typeof TSL.remap;
|
|
410
409
|
export const remapClamp: typeof TSL.remapClamp;
|
|
411
410
|
export const renderGroup: typeof TSL.renderGroup;
|
|
@@ -418,6 +417,7 @@ export const round: typeof TSL.round;
|
|
|
418
417
|
export const rtt: typeof TSL.rtt;
|
|
419
418
|
export const sRGBTransferEOTF: typeof TSL.sRGBTransferEOTF;
|
|
420
419
|
export const sRGBTransferOETF: typeof TSL.sRGBTransferOETF;
|
|
420
|
+
export const sample: typeof TSL.sample;
|
|
421
421
|
export const sampler: typeof TSL.sampler;
|
|
422
422
|
export const samplerComparison: typeof TSL.samplerComparison;
|
|
423
423
|
export const saturate: typeof TSL.saturate;
|
|
@@ -462,6 +462,7 @@ export const storageTexture: typeof TSL.storageTexture;
|
|
|
462
462
|
export const string: typeof TSL.string;
|
|
463
463
|
export const struct: typeof TSL.struct;
|
|
464
464
|
export const sub: typeof TSL.sub;
|
|
465
|
+
export const subBuild: typeof TSL.subBuild;
|
|
465
466
|
export const subgroupIndex: typeof TSL.subgroupIndex;
|
|
466
467
|
export const subgroupSize: typeof TSL.subgroupSize;
|
|
467
468
|
export const tan: typeof TSL.tan;
|
|
@@ -474,6 +475,7 @@ export const texture: typeof TSL.texture;
|
|
|
474
475
|
export const texture3D: typeof TSL.texture3D;
|
|
475
476
|
export const textureBarrier: typeof TSL.textureBarrier;
|
|
476
477
|
export const textureBicubic: typeof TSL.textureBicubic;
|
|
478
|
+
export const textureBicubicLevel: typeof TSL.textureBicubicLevel;
|
|
477
479
|
export const textureCubeUV: typeof TSL.textureCubeUV;
|
|
478
480
|
export const textureLoad: typeof TSL.textureLoad;
|
|
479
481
|
export const textureSize: typeof TSL.textureSize;
|
|
@@ -489,29 +491,22 @@ export const toonOutlinePass: typeof TSL.toonOutlinePass;
|
|
|
489
491
|
export const transformDirection: typeof TSL.transformDirection;
|
|
490
492
|
export const transformNormal: typeof TSL.transformNormal;
|
|
491
493
|
export const transformNormalToView: typeof TSL.transformNormalToView;
|
|
492
|
-
export const transformedBentNormalView: typeof TSL.transformedBentNormalView;
|
|
493
|
-
export const transformedBitangentView: typeof TSL.transformedBitangentView;
|
|
494
|
-
export const transformedBitangentWorld: typeof TSL.transformedBitangentWorld;
|
|
495
494
|
export const transformedClearcoatNormalView: typeof TSL.transformedClearcoatNormalView;
|
|
496
495
|
export const transformedNormalView: typeof TSL.transformedNormalView;
|
|
497
496
|
export const transformedNormalWorld: typeof TSL.transformedNormalWorld;
|
|
498
|
-
export const transformedTangentView: typeof TSL.transformedTangentView;
|
|
499
|
-
export const transformedTangentWorld: typeof TSL.transformedTangentWorld;
|
|
500
497
|
export const transmission: typeof TSL.transmission;
|
|
501
498
|
export const transpose: typeof TSL.transpose;
|
|
502
499
|
export const triNoise3D: typeof TSL.triNoise3D;
|
|
503
500
|
export const triplanarTexture: typeof TSL.triplanarTexture;
|
|
504
501
|
export const triplanarTextures: typeof TSL.triplanarTextures;
|
|
505
502
|
export const trunc: typeof TSL.trunc;
|
|
506
|
-
export const tslFn: typeof TSL.tslFn;
|
|
507
503
|
export const uint: typeof TSL.uint;
|
|
508
504
|
export const uniform: typeof TSL.uniform;
|
|
509
505
|
export const uniformCubeTexture: typeof TSL.uniformCubeTexture;
|
|
510
506
|
export const uniformArray: typeof TSL.uniformArray;
|
|
511
507
|
export const uniformGroup: typeof TSL.uniformGroup;
|
|
512
508
|
export const uniformTexture: typeof TSL.uniformTexture;
|
|
513
|
-
export const
|
|
514
|
-
export const unpremult: typeof TSL.unpremult;
|
|
509
|
+
export const unpremultiplyAlpha: typeof TSL.unpremultiplyAlpha;
|
|
515
510
|
export const userData: typeof TSL.userData;
|
|
516
511
|
export const uv: typeof TSL.uv;
|
|
517
512
|
export const uvec2: typeof TSL.uvec2;
|
|
@@ -532,7 +527,6 @@ export const viewZToLogarithmicDepth: typeof TSL.viewZToLogarithmicDepth;
|
|
|
532
527
|
export const viewZToOrthographicDepth: typeof TSL.viewZToOrthographicDepth;
|
|
533
528
|
export const viewZToPerspectiveDepth: typeof TSL.viewZToPerspectiveDepth;
|
|
534
529
|
export const viewport: typeof TSL.viewport;
|
|
535
|
-
export const viewportBottomLeft: typeof TSL.viewportBottomLeft;
|
|
536
530
|
export const viewportCoordinate: typeof TSL.viewportCoordinate;
|
|
537
531
|
export const viewportDepthTexture: typeof TSL.viewportDepthTexture;
|
|
538
532
|
export const viewportLinearDepth: typeof TSL.viewportLinearDepth;
|
|
@@ -542,7 +536,6 @@ export const viewportSafeUV: typeof TSL.viewportSafeUV;
|
|
|
542
536
|
export const viewportSharedTexture: typeof TSL.viewportSharedTexture;
|
|
543
537
|
export const viewportSize: typeof TSL.viewportSize;
|
|
544
538
|
export const viewportTexture: typeof TSL.viewportTexture;
|
|
545
|
-
export const viewportTopLeft: typeof TSL.viewportTopLeft;
|
|
546
539
|
export const viewportUV: typeof TSL.viewportUV;
|
|
547
540
|
export const wgsl: typeof TSL.wgsl;
|
|
548
541
|
export const wgslFn: typeof TSL.wgslFn;
|
|
@@ -552,4 +545,4 @@ export const workgroupId: typeof TSL.workgroupId;
|
|
|
552
545
|
export const workingToColorSpace: typeof TSL.workingToColorSpace;
|
|
553
546
|
export const xor: typeof TSL.xor;
|
|
554
547
|
|
|
555
|
-
export type {
|
|
548
|
+
export type { ProxiedObject, ShaderNodeObject, Swizzable } from "./nodes/TSL.js";
|
three/src/Three.WebGPU.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ import * as TSL from "./nodes/TSL.js";
|
|
|
20
20
|
export { TSL };
|
|
21
21
|
export { ClippingGroup } from "./objects/ClippingGroup.js";
|
|
22
22
|
export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js";
|
|
23
|
+
export { default as Storage3DTexture } from "./renderers/common/Storage3DTexture.js";
|
|
24
|
+
export { default as StorageArrayTexture } from "./renderers/common/StorageArrayTexture.js";
|
|
23
25
|
export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js";
|
|
24
26
|
export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js";
|
|
25
27
|
export { default as StorageTexture } from "./renderers/common/StorageTexture.js";
|
three/src/constants.d.ts
CHANGED
|
@@ -780,23 +780,31 @@ export const TimestampQuery: {
|
|
|
780
780
|
COMPUTE: "compute";
|
|
781
781
|
RENDER: "render";
|
|
782
782
|
};
|
|
783
|
-
export type TimestampQuery =
|
|
783
|
+
export type TimestampQuery = typeof TimestampQuery.COMPUTE | typeof TimestampQuery.RENDER;
|
|
784
784
|
|
|
785
785
|
export const InterpolationSamplingType: {
|
|
786
786
|
PERSPECTIVE: "perspective";
|
|
787
787
|
LINEAR: "linear";
|
|
788
788
|
FLAT: "flat";
|
|
789
789
|
};
|
|
790
|
-
export type InterpolationSamplingType =
|
|
790
|
+
export type InterpolationSamplingType =
|
|
791
|
+
| typeof InterpolationSamplingType.PERSPECTIVE
|
|
792
|
+
| typeof InterpolationSamplingType.LINEAR
|
|
793
|
+
| typeof InterpolationSamplingType.FLAT;
|
|
791
794
|
|
|
792
795
|
export const InterpolationSamplingMode: {
|
|
793
796
|
NORMAL: "normal";
|
|
794
797
|
CENTROID: "centroid";
|
|
795
798
|
SAMPLE: "sample";
|
|
796
|
-
|
|
797
|
-
|
|
799
|
+
FIRST: "first";
|
|
800
|
+
EITHER: "either";
|
|
798
801
|
};
|
|
799
|
-
export type InterpolationSamplingMode =
|
|
802
|
+
export type InterpolationSamplingMode =
|
|
803
|
+
| typeof InterpolationSamplingMode.NORMAL
|
|
804
|
+
| typeof InterpolationSamplingMode.CENTROID
|
|
805
|
+
| typeof InterpolationSamplingMode.SAMPLE
|
|
806
|
+
| typeof InterpolationSamplingMode.FIRST
|
|
807
|
+
| typeof InterpolationSamplingMode.EITHER;
|
|
800
808
|
|
|
801
809
|
///////////////////////////////////////////////////////////////////////////////
|
|
802
810
|
// Texture - Internal Pixel Formats
|
|
@@ -57,6 +57,10 @@ export interface GeometryGroup {
|
|
|
57
57
|
materialIndex?: number | undefined;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export interface BufferGeometryEventMap {
|
|
61
|
+
dispose: {};
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
/**
|
|
61
65
|
* A representation of mesh, line, or point geometry
|
|
62
66
|
* Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of passing all this data to the GPU.
|
|
@@ -117,7 +121,8 @@ export interface GeometryGroup {
|
|
|
117
121
|
*/
|
|
118
122
|
export class BufferGeometry<
|
|
119
123
|
Attributes extends NormalOrGLBufferAttributes = NormalBufferAttributes,
|
|
120
|
-
|
|
124
|
+
TEventMap extends BufferGeometryEventMap = BufferGeometryEventMap,
|
|
125
|
+
> extends EventDispatcher<TEventMap> {
|
|
121
126
|
/**
|
|
122
127
|
* This creates a new {@link THREE.BufferGeometry | BufferGeometry} object.
|
|
123
128
|
*/
|
|
@@ -18,8 +18,16 @@ export class GLBufferAttribute {
|
|
|
18
18
|
* @param itemSize How many values make up each item (vertex). See {@link GLBufferAttribute.itemSize | .itemSize}
|
|
19
19
|
* @param elementSize `1`, `2` or `4`. The corresponding size (in bytes) for the given {@link type} param. See {@link GLBufferAttribute.elementSize | .elementSize}
|
|
20
20
|
* @param count The expected number of vertices in VBO. See {@link GLBufferAttribute.count | .count}
|
|
21
|
+
* @param {boolean} [normalized=false] - Whether the data are normalized or not.
|
|
21
22
|
*/
|
|
22
|
-
constructor(
|
|
23
|
+
constructor(
|
|
24
|
+
buffer: WebGLBuffer,
|
|
25
|
+
type: GLenum,
|
|
26
|
+
itemSize: number,
|
|
27
|
+
elementSize: 1 | 2 | 4,
|
|
28
|
+
count: number,
|
|
29
|
+
normalized?: boolean,
|
|
30
|
+
);
|
|
23
31
|
|
|
24
32
|
/**
|
|
25
33
|
* Read-only flag to check if a given object is of type {@link GLBufferAttribute}.
|
|
@@ -87,6 +95,15 @@ export class GLBufferAttribute {
|
|
|
87
95
|
*/
|
|
88
96
|
count: number;
|
|
89
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Applies to integer data only. Indicates how the underlying data in the buffer maps to
|
|
100
|
+
* the values in the GLSL code. For instance, if `buffer` contains data of `gl.UNSIGNED_SHORT`,
|
|
101
|
+
* and `normalized` is `true`, the values `0 - +65535` in the buffer data will be mapped to
|
|
102
|
+
* `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted
|
|
103
|
+
* to floats unmodified, i.e. `65535` becomes `65535.0f`.
|
|
104
|
+
*/
|
|
105
|
+
normalized: boolean;
|
|
106
|
+
|
|
90
107
|
/**
|
|
91
108
|
* A version number, incremented every time the needsUpdate property is set to true.
|
|
92
109
|
* @remarks Expects a `Integer`
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BufferGeometry } from "../core/BufferGeometry.js";
|
|
2
|
+
import { LineBasicMaterial } from "../materials/LineBasicMaterial.js";
|
|
1
3
|
import { ColorRepresentation } from "../math/Color.js";
|
|
2
4
|
import { LineSegments } from "../objects/LineSegments.js";
|
|
3
5
|
|
|
@@ -18,7 +20,7 @@ import { LineSegments } from "../objects/LineSegments.js";
|
|
|
18
20
|
* @see {@link https://threejs.org/docs/index.html#api/en/helpers/AxesHelper | Official Documentation}
|
|
19
21
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/helpers/AxesHelper.js | Source}
|
|
20
22
|
*/
|
|
21
|
-
export class AxesHelper extends LineSegments {
|
|
23
|
+
export class AxesHelper extends LineSegments<BufferGeometry, LineBasicMaterial> {
|
|
22
24
|
/**
|
|
23
25
|
* Create a new instance of {@link AxesHelper}
|
|
24
26
|
* @param size Size of the lines representing the axes. Default `1`
|
|
@@ -1,55 +1,87 @@
|
|
|
1
|
-
import { Color
|
|
1
|
+
import { Color } from "../math/Color.js";
|
|
2
2
|
import { Texture } from "../textures/Texture.js";
|
|
3
|
-
import { Material,
|
|
4
|
-
|
|
5
|
-
export interface LineBasicMaterialParameters extends MaterialParameters {
|
|
6
|
-
color?: ColorRepresentation | undefined;
|
|
7
|
-
fog?: boolean | undefined;
|
|
8
|
-
linewidth?: number | undefined;
|
|
9
|
-
linecap?: string | undefined;
|
|
10
|
-
linejoin?: string | undefined;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class LineBasicMaterial extends Material {
|
|
14
|
-
constructor(parameters?: LineBasicMaterialParameters);
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Read-only flag to check if a given object is of type {@link LineBasicMaterial}.
|
|
18
|
-
* @remarks This is a _constant_ value
|
|
19
|
-
* @defaultValue `true`
|
|
20
|
-
*/
|
|
21
|
-
readonly isLineBasicMaterial: true;
|
|
3
|
+
import { MapColorPropertiesToColorRepresentations, Material, MaterialProperties } from "./Material.js";
|
|
22
4
|
|
|
5
|
+
export interface LineBasicMaterialProperties extends MaterialProperties {
|
|
23
6
|
/**
|
|
24
|
-
*
|
|
7
|
+
* Color of the material.
|
|
8
|
+
*
|
|
9
|
+
* @default (1,1,1)
|
|
25
10
|
*/
|
|
26
11
|
color: Color;
|
|
27
|
-
|
|
28
12
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
13
|
+
* Sets the color of the lines using data from a texture. The texture map
|
|
14
|
+
* color is modulated by the diffuse `color`.
|
|
15
|
+
*
|
|
16
|
+
* @default null
|
|
31
17
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
map: Texture | null;
|
|
34
19
|
/**
|
|
20
|
+
* Controls line thickness or lines.
|
|
21
|
+
*
|
|
22
|
+
* Can only be used with {@link SVGRenderer}. WebGL and WebGPU
|
|
23
|
+
* ignore this setting and always render line primitives with a
|
|
24
|
+
* width of one pixel.
|
|
25
|
+
*
|
|
35
26
|
* @default 1
|
|
36
27
|
*/
|
|
37
28
|
linewidth: number;
|
|
38
|
-
|
|
39
29
|
/**
|
|
30
|
+
* Defines appearance of line ends.
|
|
31
|
+
*
|
|
32
|
+
* Can only be used with {@link SVGRenderer}.
|
|
33
|
+
*
|
|
40
34
|
* @default 'round'
|
|
41
35
|
*/
|
|
42
|
-
linecap:
|
|
43
|
-
|
|
36
|
+
linecap: "butt" | "round" | "square";
|
|
44
37
|
/**
|
|
38
|
+
* Defines appearance of line joints.
|
|
39
|
+
*
|
|
40
|
+
* Can only be used with {@link SVGRenderer}.
|
|
41
|
+
*
|
|
45
42
|
* @default 'round'
|
|
46
43
|
*/
|
|
47
|
-
linejoin:
|
|
48
|
-
|
|
44
|
+
linejoin: "round" | "bevel" | "miter";
|
|
49
45
|
/**
|
|
50
|
-
*
|
|
46
|
+
* Whether the material is affected by fog or not.
|
|
47
|
+
*
|
|
48
|
+
* @default true
|
|
51
49
|
*/
|
|
52
|
-
|
|
50
|
+
fog: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
54
|
+
export interface LineBasicMaterialParameters
|
|
55
|
+
extends Partial<MapColorPropertiesToColorRepresentations<LineBasicMaterialProperties>>
|
|
56
|
+
{}
|
|
53
57
|
|
|
54
|
-
|
|
58
|
+
/**
|
|
59
|
+
* A material for rendering line primitives.
|
|
60
|
+
*
|
|
61
|
+
* Materials define the appearance of renderable 3D objects.
|
|
62
|
+
*
|
|
63
|
+
* ```js
|
|
64
|
+
* const material = new THREE.LineBasicMaterial( { color: 0xffffff } );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export class LineBasicMaterial extends Material {
|
|
68
|
+
/**
|
|
69
|
+
* Constructs a new line basic material.
|
|
70
|
+
*
|
|
71
|
+
* @param {Object} [parameters] - An object with one or more properties
|
|
72
|
+
* defining the material's appearance. Any property of the material
|
|
73
|
+
* (including any property from inherited materials) can be passed
|
|
74
|
+
* in here. Color values can be passed any type of value accepted
|
|
75
|
+
* by {@link Color#set}.
|
|
76
|
+
*/
|
|
77
|
+
constructor(parameters?: LineBasicMaterialParameters);
|
|
78
|
+
/**
|
|
79
|
+
* This flag can be used for type testing.
|
|
80
|
+
*
|
|
81
|
+
* @default true
|
|
82
|
+
*/
|
|
83
|
+
readonly isLineBasicMaterial: boolean;
|
|
55
84
|
}
|
|
85
|
+
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
87
|
+
export interface LineBasicMaterial extends LineBasicMaterialProperties {}
|
|
@@ -1,35 +1,55 @@
|
|
|
1
|
-
import { LineBasicMaterial,
|
|
2
|
-
|
|
3
|
-
export interface LineDashedMaterialParameters extends LineBasicMaterialParameters {
|
|
4
|
-
scale?: number | undefined;
|
|
5
|
-
dashSize?: number | undefined;
|
|
6
|
-
gapSize?: number | undefined;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export class LineDashedMaterial extends LineBasicMaterial {
|
|
10
|
-
constructor(parameters?: LineDashedMaterialParameters);
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Read-only flag to check if a given object is of type {@link LineDashedMaterial}.
|
|
14
|
-
* @remarks This is a _constant_ value
|
|
15
|
-
* @defaultValue `true`
|
|
16
|
-
*/
|
|
17
|
-
readonly isLineDashedMaterial: true;
|
|
1
|
+
import { LineBasicMaterial, LineBasicMaterialProperties } from "./LineBasicMaterial.js";
|
|
2
|
+
import { MapColorPropertiesToColorRepresentations } from "./Material.js";
|
|
18
3
|
|
|
4
|
+
export interface LineDashedMaterialProperties extends LineBasicMaterialProperties {
|
|
19
5
|
/**
|
|
6
|
+
* The scale of the dashed part of a line.
|
|
7
|
+
*
|
|
20
8
|
* @default 1
|
|
21
9
|
*/
|
|
22
10
|
scale: number;
|
|
23
|
-
|
|
24
11
|
/**
|
|
25
|
-
*
|
|
12
|
+
* The size of the dash. This is both the gap with the stroke.
|
|
13
|
+
*
|
|
14
|
+
* @default 3
|
|
26
15
|
*/
|
|
27
16
|
dashSize: number;
|
|
28
|
-
|
|
29
17
|
/**
|
|
18
|
+
* The size of the gap.
|
|
19
|
+
*
|
|
30
20
|
* @default 1
|
|
31
21
|
*/
|
|
32
22
|
gapSize: number;
|
|
23
|
+
}
|
|
33
24
|
|
|
34
|
-
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
26
|
+
export interface LineDashedMaterialParameters
|
|
27
|
+
extends Partial<MapColorPropertiesToColorRepresentations<LineDashedMaterialProperties>>
|
|
28
|
+
{}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A material for rendering line primitives.
|
|
32
|
+
*
|
|
33
|
+
* Materials define the appearance of renderable 3D objects.
|
|
34
|
+
*
|
|
35
|
+
* ```js
|
|
36
|
+
* const material = new THREE.LineDashedMaterial( {
|
|
37
|
+
* color: 0xffffff,
|
|
38
|
+
* scale: 1,
|
|
39
|
+
* dashSize: 3,
|
|
40
|
+
* gapSize: 1,
|
|
41
|
+
* } );
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export class LineDashedMaterial extends LineBasicMaterial {
|
|
45
|
+
constructor(parameters?: LineDashedMaterialParameters);
|
|
46
|
+
/**
|
|
47
|
+
* This flag can be used for type testing.
|
|
48
|
+
*
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
readonly isLineDashedMaterial: boolean;
|
|
35
52
|
}
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
55
|
+
export interface LineDashedMaterial extends LineDashedMaterialProperties {}
|