@types/three 0.177.0 → 0.178.1
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 +171 -111
- 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,14 +1,15 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
1
2
|
import OperatorNode from "../math/OperatorNode.js";
|
|
2
|
-
import {
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
4
|
|
|
4
5
|
export const rotateUV: (
|
|
5
|
-
uv:
|
|
6
|
-
rotation:
|
|
7
|
-
center?:
|
|
6
|
+
uv: Node,
|
|
7
|
+
rotation: Node,
|
|
8
|
+
center?: Node,
|
|
8
9
|
) => ShaderNodeObject<OperatorNode>;
|
|
9
10
|
|
|
10
11
|
export const spherizeUV: (
|
|
11
|
-
uv:
|
|
12
|
-
strength:
|
|
13
|
-
center?:
|
|
12
|
+
uv: Node,
|
|
13
|
+
strength: Node | number,
|
|
14
|
+
center?: Node,
|
|
14
15
|
) => ShaderNodeObject<OperatorNode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export const viewportSafeUV: (uv?:
|
|
4
|
+
export const viewportSafeUV: (uv?: Node | null) => ShaderNodeObject<Node>;
|
three/src/objects/LOD.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export class LOD<TEventMap extends Object3DEventMap = Object3DEventMap> extends
|
|
|
87
87
|
* Otherwise `false`.
|
|
88
88
|
* @param distance Distance of the level to delete.
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
removeLevel(distance: number): boolean;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Get the currently active {@link LOD} level
|
|
@@ -463,7 +463,7 @@ export class WebGLRenderer {
|
|
|
463
463
|
* position. The `depthTexture` and `texture` property of 3D render targets are supported as well.
|
|
464
464
|
*
|
|
465
465
|
* When using render target textures as `srcTexture` and `dstTexture`, you must make sure both render targets are
|
|
466
|
-
*
|
|
466
|
+
* initialized e.g. via {@link .initRenderTarget}().
|
|
467
467
|
*
|
|
468
468
|
* @param srcTexture Specifies the source texture.
|
|
469
469
|
* @param dstTexture Specifies the destination texture.
|
|
@@ -13,12 +13,12 @@ declare module "../../core/Object3D.js" {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface BackendParameters {
|
|
16
|
-
canvas?: HTMLCanvasElement | undefined;
|
|
16
|
+
canvas?: HTMLCanvasElement | OffscreenCanvas | undefined;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export default abstract class Backend {
|
|
20
20
|
renderer: Renderer | null;
|
|
21
|
-
domElement: HTMLCanvasElement | null;
|
|
21
|
+
domElement: HTMLCanvasElement | OffscreenCanvas | null;
|
|
22
22
|
|
|
23
23
|
constructor(parameters?: BackendParameters);
|
|
24
24
|
|
|
@@ -26,5 +26,5 @@ export default abstract class Backend {
|
|
|
26
26
|
|
|
27
27
|
abstract get coordinateSystem(): CoordinateSystem;
|
|
28
28
|
|
|
29
|
-
getDomElement(): HTMLCanvasElement;
|
|
29
|
+
getDomElement(): HTMLCanvasElement | OffscreenCanvas;
|
|
30
30
|
}
|
|
@@ -53,7 +53,14 @@ declare class RenderObject {
|
|
|
53
53
|
count: number;
|
|
54
54
|
} | null;
|
|
55
55
|
attributes: Array<BufferAttribute | InterleavedBufferAttribute> | null;
|
|
56
|
+
attributesId: {
|
|
57
|
+
[attributeName: string]: number;
|
|
58
|
+
} | null;
|
|
56
59
|
pipeline: RenderPipeline | null;
|
|
60
|
+
group: {
|
|
61
|
+
start: number;
|
|
62
|
+
count: number;
|
|
63
|
+
} | null;
|
|
57
64
|
vertexBuffers: Array<BufferAttribute | InterleavedBuffer> | null;
|
|
58
65
|
drawParams: {
|
|
59
66
|
vertexCount: number;
|
|
@@ -64,14 +71,15 @@ declare class RenderObject {
|
|
|
64
71
|
bundle: BundleGroup | null;
|
|
65
72
|
clippingContext: ClippingContext | null;
|
|
66
73
|
clippingContextCacheKey: string;
|
|
67
|
-
initialNodesCacheKey:
|
|
68
|
-
initialCacheKey:
|
|
74
|
+
initialNodesCacheKey: number;
|
|
75
|
+
initialCacheKey: number;
|
|
69
76
|
_nodeBuilderState: NodeBuilderState | null;
|
|
70
77
|
_bindings: BindGroup[] | null;
|
|
71
78
|
_monitor: NodeMaterialObserver | null;
|
|
72
79
|
onDispose: (() => void) | null;
|
|
73
80
|
readonly isRenderObject: true;
|
|
74
81
|
onMaterialDispose: () => void;
|
|
82
|
+
onGeometryDispose: () => void;
|
|
75
83
|
/**
|
|
76
84
|
* Constructs a new render object.
|
|
77
85
|
*
|
|
@@ -239,7 +239,7 @@ declare class Renderer {
|
|
|
239
239
|
* @param {?Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added.
|
|
240
240
|
* @return {Promise<Array|undefined>} A Promise that resolves when the compile has been finished.
|
|
241
241
|
*/
|
|
242
|
-
compileAsync(scene: Object3D, camera: Camera, targetScene?:
|
|
242
|
+
compileAsync(scene: Object3D, camera: Camera, targetScene?: Scene | null): Promise<void>;
|
|
243
243
|
/**
|
|
244
244
|
* Renders the scene in an async fashion.
|
|
245
245
|
*
|
|
@@ -248,7 +248,7 @@ declare class Renderer {
|
|
|
248
248
|
* @param {Camera} camera - The camera.
|
|
249
249
|
* @return {Promise} A Promise that resolves when the render has been finished.
|
|
250
250
|
*/
|
|
251
|
-
renderAsync(scene:
|
|
251
|
+
renderAsync(scene: Object3D, camera: Camera): Promise<void>;
|
|
252
252
|
/**
|
|
253
253
|
* Can be used to synchronize CPU operations with GPU tasks. So when this method is called,
|
|
254
254
|
* the CPU waits for the GPU to complete its operation (e.g. a compute task).
|
|
@@ -321,7 +321,7 @@ declare class Renderer {
|
|
|
321
321
|
* @return {?Promise} A Promise that resolve when the scene has been rendered.
|
|
322
322
|
* Only returned when the renderer has not been initialized.
|
|
323
323
|
*/
|
|
324
|
-
render(scene:
|
|
324
|
+
render(scene: Object3D, camera: Camera): Promise<void> | undefined;
|
|
325
325
|
/**
|
|
326
326
|
* Returns an internal render target which is used when computing the output tone mapping
|
|
327
327
|
* and color space conversion. Unlike in `WebGLRenderer`, this is done in a separate render
|
|
@@ -340,7 +340,7 @@ declare class Renderer {
|
|
|
340
340
|
* @param {boolean} [useFrameBufferTarget=true] - Whether to use a framebuffer target or not.
|
|
341
341
|
* @return {RenderContext} The current render context.
|
|
342
342
|
*/
|
|
343
|
-
_renderScene(scene:
|
|
343
|
+
_renderScene(scene: Object3D, camera: Camera, useFrameBufferTarget?: boolean): RenderContext | undefined;
|
|
344
344
|
_setXRLayerSize(width: number, height: number): void;
|
|
345
345
|
/**
|
|
346
346
|
* The output pass performs tone mapping and color space conversion.
|
|
@@ -983,6 +983,6 @@ declare class Renderer {
|
|
|
983
983
|
* @param {Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added.
|
|
984
984
|
* @return {function(Object3D, Camera, ?Scene): Promise|undefined} A Promise that resolves when the compile has been finished.
|
|
985
985
|
*/
|
|
986
|
-
get compile(): (scene: Object3D, camera: Camera, targetScene?:
|
|
986
|
+
get compile(): (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise<void>;
|
|
987
987
|
}
|
|
988
988
|
export default Renderer;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Wrapping } from "../../constants.js";
|
|
2
|
+
import { Texture } from "../../textures/Texture.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This special type of texture is intended for compute shaders.
|
|
6
|
+
* It can be used to compute the data of a texture with a compute shader.
|
|
7
|
+
*
|
|
8
|
+
* Note: This type of texture can only be used with `WebGPURenderer`
|
|
9
|
+
* and a WebGPU backend.
|
|
10
|
+
*/
|
|
11
|
+
declare class Storage3DTexture extends Texture {
|
|
12
|
+
/**
|
|
13
|
+
* This defines how the texture is wrapped in the depth direction and corresponds to
|
|
14
|
+
* *W* in UVW mapping.
|
|
15
|
+
*/
|
|
16
|
+
wrapR: Wrapping;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* This flag can be used for type testing.
|
|
20
|
+
*
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
readonly isStorageTexture: true;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Indicates whether this texture is a 3D texture.
|
|
27
|
+
*/
|
|
28
|
+
is3DTexture: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new storage texture.
|
|
32
|
+
*
|
|
33
|
+
* @param {number} [width=1] - The storage texture's width.
|
|
34
|
+
* @param {number} [height=1] - The storage texture's height.
|
|
35
|
+
* @param {number} [depth=1] - The storage texture's depth.
|
|
36
|
+
*/
|
|
37
|
+
constructor(width?: number, height?: number, depth?: number);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default Storage3DTexture;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Wrapping } from "../../constants.js";
|
|
2
|
+
import { Texture } from "../../textures/Texture.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This special type of texture is intended for compute shaders.
|
|
6
|
+
* It can be used to compute the data of a texture with a compute shader.
|
|
7
|
+
*
|
|
8
|
+
* Note: This type of texture can only be used with `WebGPURenderer`
|
|
9
|
+
* and a WebGPU backend.
|
|
10
|
+
*/
|
|
11
|
+
declare class Storage3DTexture extends Texture {
|
|
12
|
+
/**
|
|
13
|
+
* This flag can be used for type testing.
|
|
14
|
+
*
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
readonly isStorageTexture: true;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Constructs a new storage texture.
|
|
21
|
+
*
|
|
22
|
+
* @param {number} [width=1] - The storage texture's width.
|
|
23
|
+
* @param {number} [height=1] - The storage texture's height.
|
|
24
|
+
* @param {number} [depth=1] - The storage texture's depth.
|
|
25
|
+
*/
|
|
26
|
+
constructor(width?: number, height?: number, depth?: number);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default Storage3DTexture;
|
|
@@ -6,7 +6,7 @@ import Backend from "./Backend.js";
|
|
|
6
6
|
import DataMap from "./DataMap.js";
|
|
7
7
|
import Info from "./Info.js";
|
|
8
8
|
import Renderer from "./Renderer.js";
|
|
9
|
-
type
|
|
9
|
+
type SizeVector3Uninitialized = Vector3 & {
|
|
10
10
|
width?: number;
|
|
11
11
|
height?: number;
|
|
12
12
|
depth?: number;
|
|
@@ -99,7 +99,7 @@ declare class Textures extends DataMap<{
|
|
|
99
99
|
* @param {Vector3} target - The target vector.
|
|
100
100
|
* @return {Vector3} The target vector.
|
|
101
101
|
*/
|
|
102
|
-
getSize(texture: Texture, target?:
|
|
102
|
+
getSize(texture: Texture, target?: SizeVector3Uninitialized): SizeVector3;
|
|
103
103
|
/**
|
|
104
104
|
* Computes the number of mipmap levels for the given texture.
|
|
105
105
|
*
|
|
@@ -8,8 +8,9 @@ import { RenderTarget, RenderTargetOptions } from "../../core/RenderTarget.js";
|
|
|
8
8
|
*/
|
|
9
9
|
declare class XRRenderTarget extends RenderTarget {
|
|
10
10
|
readonly isXRRenderTarget: true;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
_hasExternalTextures: boolean;
|
|
12
|
+
_autoAllocateDepthBuffer: boolean;
|
|
13
|
+
_isOpaqueFramebuffer: boolean;
|
|
13
14
|
/**
|
|
14
15
|
* Constructs a new XR render target.
|
|
15
16
|
*
|
|
@@ -4,7 +4,7 @@ import { Material } from "../../../materials/Material.js";
|
|
|
4
4
|
import NodeMaterial from "../../../materials/nodes/NodeMaterial.js";
|
|
5
5
|
import Node from "../../../nodes/core/Node.js";
|
|
6
6
|
import AnalyticLightNode from "../../../nodes/lighting/AnalyticLightNode.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ShaderNodeObject } from "../../../nodes/tsl/TSLCore.js";
|
|
8
8
|
/**
|
|
9
9
|
* The purpose of a node library is to assign node implementations
|
|
10
10
|
* to existing library features. In `WebGPURenderer` lights, materials
|
|
@@ -22,10 +22,7 @@ declare class NodeLibrary {
|
|
|
22
22
|
materialNodes: Map<string, {
|
|
23
23
|
new(): NodeMaterial;
|
|
24
24
|
}>;
|
|
25
|
-
toneMappingNodes: Map<
|
|
26
|
-
ToneMapping,
|
|
27
|
-
(color: NodeRepresentation, exposure: NodeRepresentation) => ShaderNodeObject<Node>
|
|
28
|
-
>;
|
|
25
|
+
toneMappingNodes: Map<ToneMapping, (color: Node, exposure: Node) => ShaderNodeObject<Node>>;
|
|
29
26
|
/**
|
|
30
27
|
* Constructs a new node library.
|
|
31
28
|
*/
|
|
@@ -48,7 +45,7 @@ declare class NodeLibrary {
|
|
|
48
45
|
* @param {number} toneMapping - The tone mapping.
|
|
49
46
|
*/
|
|
50
47
|
addToneMapping(
|
|
51
|
-
toneMappingNode: (color:
|
|
48
|
+
toneMappingNode: (color: Node, exposure: Node) => ShaderNodeObject<Node>,
|
|
52
49
|
toneMapping: ToneMapping,
|
|
53
50
|
): void;
|
|
54
51
|
/**
|
|
@@ -57,9 +54,7 @@ declare class NodeLibrary {
|
|
|
57
54
|
* @param {number} toneMapping - The tone mapping.
|
|
58
55
|
* @return {?Function} The tone mapping node function. Returns `null` if no node function is found.
|
|
59
56
|
*/
|
|
60
|
-
getToneMappingFunction(
|
|
61
|
-
toneMapping: ToneMapping,
|
|
62
|
-
): ((color: NodeRepresentation, exposure: NodeRepresentation) => ShaderNodeObject<Node>) | null;
|
|
57
|
+
getToneMappingFunction(toneMapping: ToneMapping): ((color: Node, exposure: Node) => ShaderNodeObject<Node>) | null;
|
|
63
58
|
/**
|
|
64
59
|
* Returns a node material class definition for a material type.
|
|
65
60
|
*
|
|
@@ -23,7 +23,7 @@ declare class NodeSampledCubeTexture extends NodeSampledTexture {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
declare class NodeSampledTexture3D extends NodeSampledTexture {
|
|
26
|
-
readonly isSampledTexture3D
|
|
26
|
+
readonly isSampledTexture3D: true;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export { NodeSampledCubeTexture, NodeSampledTexture, NodeSampledTexture3D };
|
|
@@ -106,7 +106,7 @@ declare class Nodes extends DataMap<{
|
|
|
106
106
|
* @param {RenderObject} renderObject - The render object.
|
|
107
107
|
* @return {number} The cache key.
|
|
108
108
|
*/
|
|
109
|
-
getForRenderCacheKey(renderObject: RenderObject):
|
|
109
|
+
getForRenderCacheKey(renderObject: RenderObject): number;
|
|
110
110
|
/**
|
|
111
111
|
* Returns a node builder state for the given render object.
|
|
112
112
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Renderer, { RendererParameters } from "../common/Renderer.js";
|
|
2
|
+
import StandardNodeLibrary from "./nodes/StandardNodeLibrary.js";
|
|
2
3
|
import { WebGPUBackendParameters } from "./WebGPUBackend.js";
|
|
3
4
|
|
|
4
5
|
export interface WebGPURendererParameters extends RendererParameters, WebGPUBackendParameters {
|
|
@@ -6,6 +7,8 @@ export interface WebGPURendererParameters extends RendererParameters, WebGPUBack
|
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
declare class WebGPURenderer extends Renderer {
|
|
10
|
+
library: StandardNodeLibrary;
|
|
11
|
+
|
|
9
12
|
readonly isWebGPURenderer: true;
|
|
10
13
|
|
|
11
14
|
constructor(parameters?: WebGPURendererParameters);
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
import { LineBasicNodeMaterialNodeProperties } from "../../../materials/nodes/LineBasicNodeMaterial.js";
|
|
2
|
+
import { LineDashedNodeMaterialNodeProperties } from "../../../materials/nodes/LineDashedNodeMaterial.js";
|
|
3
|
+
import { MeshBasicNodeMaterialNodeProperties } from "../../../materials/nodes/MeshBasicNodeMaterial.js";
|
|
4
|
+
import { MeshLambertNodeMaterialNodeProperties } from "../../../materials/nodes/MeshLambertNodeMaterial.js";
|
|
5
|
+
import { MeshMatcapNodeMaterialNodeProperties } from "../../../materials/nodes/MeshMatcapNodeMaterial.js";
|
|
6
|
+
import { MeshNormalNodeMaterialNodeProperties } from "../../../materials/nodes/MeshNormalNodeMaterial.js";
|
|
7
|
+
import { MeshPhongNodeMaterialNodeProperties } from "../../../materials/nodes/MeshPhongNodeMaterial.js";
|
|
8
|
+
import { MeshPhysicalNodeMaterialNodeProperties } from "../../../materials/nodes/MeshPhysicalNodeMaterial.js";
|
|
9
|
+
import { MeshStandardNodeMaterialNodeProperties } from "../../../materials/nodes/MeshStandardNodeMaterial.js";
|
|
10
|
+
import { MeshToonNodeMaterialNodeProperties } from "../../../materials/nodes/MeshToonNodeMaterial.js";
|
|
11
|
+
import { PointsNodeMaterialNodeProperties } from "../../../materials/nodes/PointsNodeMaterial.js";
|
|
12
|
+
import { ShadowNodeMaterialNodeProperties } from "../../../materials/nodes/ShadowNodeMaterial.js";
|
|
13
|
+
import { SpriteNodeMaterialNodeProperties } from "../../../materials/nodes/SpriteNodeMaterial.js";
|
|
1
14
|
import NodeLibrary from "../../common/nodes/NodeLibrary.js";
|
|
2
15
|
/**
|
|
3
16
|
* This version of a node library represents the standard version
|
|
@@ -13,4 +26,56 @@ declare class StandardNodeLibrary extends NodeLibrary {
|
|
|
13
26
|
*/
|
|
14
27
|
constructor();
|
|
15
28
|
}
|
|
29
|
+
declare module "../../../materials/MeshPhongMaterial.js" {
|
|
30
|
+
interface MeshPhongMaterialProperties extends MeshPhongNodeMaterialNodeProperties {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
declare module "../../../materials/MeshStandardMaterial.js" {
|
|
34
|
+
interface MeshStandardMaterialProperties extends MeshStandardNodeMaterialNodeProperties {
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
declare module "../../../materials/MeshPhysicalMaterial.js" {
|
|
38
|
+
interface MeshPhysicalMaterialProperties extends MeshPhysicalNodeMaterialNodeProperties {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
declare module "../../../materials/MeshToonMaterial.js" {
|
|
42
|
+
interface MeshToonMaterialProperties extends MeshToonNodeMaterialNodeProperties {
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
declare module "../../../materials/MeshBasicMaterial.js" {
|
|
46
|
+
interface MeshBasicMaterialProperties extends MeshBasicNodeMaterialNodeProperties {
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
declare module "../../../materials/MeshLambertMaterial.js" {
|
|
50
|
+
interface MeshLambertMaterialProperties extends MeshLambertNodeMaterialNodeProperties {
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
declare module "../../../materials/MeshNormalMaterial.js" {
|
|
54
|
+
interface MeshNormalMaterialProperties extends MeshNormalNodeMaterialNodeProperties {
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
declare module "../../../materials/MeshMatcapMaterial.js" {
|
|
58
|
+
interface MeshMatcapMaterialProperties extends MeshMatcapNodeMaterialNodeProperties {
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
declare module "../../../materials/LineBasicMaterial.js" {
|
|
62
|
+
interface LineBasicMaterialProperties extends LineBasicNodeMaterialNodeProperties {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
declare module "../../../materials/LineDashedMaterial.js" {
|
|
66
|
+
interface LineDashedMaterialProperties extends LineDashedNodeMaterialNodeProperties {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
declare module "../../../materials/PointsMaterial.js" {
|
|
70
|
+
interface PointsMaterialProperties extends PointsNodeMaterialNodeProperties {
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
declare module "../../../materials/SpriteMaterial.js" {
|
|
74
|
+
interface SpriteMaterialProperties extends SpriteNodeMaterialNodeProperties {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
declare module "../../../materials/ShadowMaterial.js" {
|
|
78
|
+
interface ShadowMaterialProperties extends ShadowNodeMaterialNodeProperties {
|
|
79
|
+
}
|
|
80
|
+
}
|
|
16
81
|
export default StandardNodeLibrary;
|
|
@@ -314,15 +314,24 @@ export enum GPUInputStepMode {
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
export enum GPUFeatureName {
|
|
317
|
+
CoreFeaturesAndLimits = "core-features-and-limits",
|
|
317
318
|
DepthClipControl = "depth-clip-control",
|
|
318
319
|
Depth32FloatStencil8 = "depth32float-stencil8",
|
|
319
320
|
TextureCompressionBC = "texture-compression-bc",
|
|
321
|
+
TextureCompressionBCSliced3D = "texture-compression-bc-sliced-3d",
|
|
320
322
|
TextureCompressionETC2 = "texture-compression-etc2",
|
|
321
323
|
TextureCompressionASTC = "texture-compression-astc",
|
|
324
|
+
TextureCompressionASTCSliced3D = "texture-compression-astc-sliced-3d",
|
|
322
325
|
TimestampQuery = "timestamp-query",
|
|
323
326
|
IndirectFirstInstance = "indirect-first-instance",
|
|
324
327
|
ShaderF16 = "shader-f16",
|
|
325
328
|
RG11B10UFloat = "rg11b10ufloat-renderable",
|
|
326
329
|
BGRA8UNormStorage = "bgra8unorm-storage",
|
|
327
330
|
Float32Filterable = "float32-filterable",
|
|
331
|
+
Float32Blendable = "float32-blendable",
|
|
332
|
+
ClipDistances = "clip-distances",
|
|
333
|
+
DualSourceBlending = "dual-source-blending",
|
|
334
|
+
Subgroups = "subgroups",
|
|
335
|
+
TextureFormatsTier1 = "texture-formats-tier1",
|
|
336
|
+
TextureFormatsTier2 = "texture-formats-tier2",
|
|
328
337
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Node, TempNode } from "../Nodes.js";
|
|
2
|
-
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
-
|
|
4
|
-
export default class EquirectUVNode extends TempNode {
|
|
5
|
-
constructor(dirNode?: ShaderNodeObject<Node>);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const equirectUV: (dirNode?: NodeRepresentation) => ShaderNodeObject<EquirectUVNode>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import TextureNode from "../accessors/TextureNode.js";
|
|
2
|
-
import Node from "../core/Node.js";
|
|
3
|
-
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
|
-
|
|
5
|
-
export default class TriplanarTexturesNode extends Node {
|
|
6
|
-
textureXNode: TextureNode;
|
|
7
|
-
textureYNode: TextureNode | null;
|
|
8
|
-
textureZNode: TextureNode | null;
|
|
9
|
-
|
|
10
|
-
scaleNode: ShaderNodeObject<Node>;
|
|
11
|
-
|
|
12
|
-
positionNode: ShaderNodeObject<Node>;
|
|
13
|
-
normalNode: ShaderNodeObject<Node>;
|
|
14
|
-
|
|
15
|
-
constructor(
|
|
16
|
-
textureXNode: Node,
|
|
17
|
-
textureYNode?: TextureNode | null,
|
|
18
|
-
textureZNode?: TextureNode | null,
|
|
19
|
-
scaleNode?: ShaderNodeObject<Node>,
|
|
20
|
-
positionNode?: ShaderNodeObject<Node>,
|
|
21
|
-
normalNode?: ShaderNodeObject<Node>,
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const triplanarTextures: (
|
|
26
|
-
textureXNode: NodeRepresentation,
|
|
27
|
-
textureYNode?: NodeRepresentation,
|
|
28
|
-
textureZNode?: NodeRepresentation,
|
|
29
|
-
scaleNode?: NodeRepresentation,
|
|
30
|
-
positionNode?: NodeRepresentation,
|
|
31
|
-
normalNode?: NodeRepresentation,
|
|
32
|
-
) => ShaderNodeObject<TriplanarTexturesNode>;
|
|
33
|
-
export const triplanarTexture: (
|
|
34
|
-
texture: NodeRepresentation,
|
|
35
|
-
...params: NodeRepresentation[]
|
|
36
|
-
) => ShaderNodeObject<TriplanarTexturesNode>;
|