@types/three 0.170.0 → 0.172.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/build/three.core.d.ts +1 -0
- three/build/three.core.min.d.ts +1 -0
- three/build/three.tsl.d.ts +1 -0
- three/build/three.tsl.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +0 -5
- three/examples/jsm/controls/ArcballControls.d.ts +6 -1
- three/examples/jsm/controls/OrbitControls.d.ts +5 -0
- three/examples/jsm/controls/TransformControls.d.ts +1 -1
- three/examples/jsm/csm/CSMShadowNode.d.ts +2 -4
- three/examples/jsm/exporters/GLTFExporter.d.ts +23 -7
- three/examples/jsm/geometries/DecalGeometry.d.ts +1 -1
- three/examples/jsm/geometries/InstancedPointsGeometry.d.ts +13 -0
- three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
- three/examples/jsm/lines/LineSegments2.d.ts +3 -1
- three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +1 -1
- three/examples/jsm/modifiers/CurveModifier.d.ts +1 -1
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +1 -1
- three/examples/jsm/objects/InstancedPoints.d.ts +10 -0
- three/examples/jsm/objects/SkyMesh.d.ts +2 -2
- three/examples/jsm/objects/Water2Mesh.d.ts +13 -2
- three/examples/jsm/objects/WaterMesh.d.ts +11 -2
- three/examples/jsm/postprocessing/OutlinePass.d.ts +1 -1
- three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +1 -1
- three/examples/jsm/tsl/display/AfterImageNode.d.ts +2 -1
- three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +1 -1
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +2 -2
- three/examples/jsm/tsl/display/BleachBypass.d.ts +2 -1
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -1
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +3 -4
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +2 -1
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +2 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +2 -1
- three/examples/jsm/tsl/display/FilmNode.d.ts +2 -1
- three/examples/jsm/tsl/display/GTAONode.d.ts +5 -8
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +2 -2
- three/examples/jsm/tsl/display/LensflareNode.d.ts +2 -2
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +2 -2
- three/examples/jsm/tsl/display/MotionBlur.d.ts +2 -1
- three/examples/jsm/tsl/display/OutlineNode.d.ts +2 -2
- three/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +1 -1
- three/examples/jsm/tsl/display/PixelationPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +2 -1
- three/examples/jsm/tsl/display/SMAANode.d.ts +2 -1
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/SSRNode.d.ts +2 -2
- three/examples/jsm/tsl/display/Sepia.d.ts +2 -1
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +2 -1
- three/examples/jsm/tsl/display/StereoCompositePassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/StereoPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +2 -2
- three/examples/jsm/tsl/display/TransitionNode.d.ts +2 -1
- three/examples/jsm/tsl/display/hashBlur.d.ts +2 -1
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +2 -1
- three/examples/jsm/utils/ShadowMapViewer.d.ts +2 -2
- three/package.json +4 -4
- three/src/Three.Core.d.ts +159 -0
- three/src/Three.TSL.d.ts +533 -0
- three/src/Three.WebGPU.Nodes.d.ts +14 -195
- three/src/Three.WebGPU.d.ts +14 -196
- three/src/Three.d.ts +2 -158
- three/src/animation/AnimationClip.d.ts +3 -1
- three/src/cameras/CubeCamera.d.ts +19 -2
- three/src/core/Clock.d.ts +4 -6
- three/src/core/InterleavedBuffer.d.ts +12 -0
- three/src/core/RenderTarget.d.ts +3 -5
- three/src/core/RenderTarget3D.d.ts +9 -0
- three/src/core/RenderTargetArray.d.ts +9 -0
- three/src/materials/Material.d.ts +9 -5
- three/src/materials/MeshDepthMaterial.d.ts +0 -5
- three/src/materials/MeshDistanceMaterial.d.ts +0 -5
- three/src/materials/nodes/Line2NodeMaterial.d.ts +1 -0
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +3 -0
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +6 -6
- three/src/materials/nodes/NodeMaterial.d.ts +7 -1
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +56 -0
- three/src/nodes/Nodes.d.ts +2 -7
- three/src/nodes/TSL.d.ts +10 -5
- three/src/nodes/accessors/Arrays.d.ts +7 -0
- three/src/nodes/accessors/BufferAttributeNode.d.ts +117 -0
- three/src/nodes/accessors/BufferNode.d.ts +4 -4
- three/src/nodes/accessors/BuiltinNode.d.ts +14 -0
- three/src/nodes/accessors/ClippingNode.d.ts +6 -0
- three/src/nodes/accessors/InstanceNode.d.ts +15 -3
- three/src/nodes/accessors/InstancedMeshNode.d.ts +11 -0
- three/src/nodes/accessors/Lights.d.ts +15 -0
- three/src/nodes/accessors/MaterialNode.d.ts +3 -3
- three/src/nodes/accessors/ModelNode.d.ts +10 -2
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +2 -6
- three/src/nodes/accessors/StorageBufferNode.d.ts +25 -12
- three/src/nodes/accessors/StorageTextureNode.d.ts +5 -3
- three/src/nodes/accessors/TextureNode.d.ts +5 -0
- three/src/nodes/accessors/UniformArrayNode.d.ts +3 -2
- three/src/nodes/core/IndexNode.d.ts +2 -0
- three/src/nodes/core/Node.d.ts +237 -0
- three/src/nodes/core/NodeAttribute.d.ts +13 -0
- three/src/nodes/core/NodeBuilder.d.ts +1 -2
- three/src/nodes/core/NodeCache.d.ts +21 -0
- three/src/nodes/core/NodeParser.d.ts +11 -0
- three/src/nodes/core/NodeUniform.d.ts +28 -0
- three/src/nodes/core/NodeUtils.d.ts +7 -0
- three/src/nodes/core/NodeVar.d.ts +12 -0
- three/src/nodes/core/NodeVarying.d.ts +14 -0
- three/src/nodes/core/StackNode.d.ts +6 -1
- three/src/nodes/core/StructTypeNode.d.ts +19 -1
- three/src/nodes/core/UniformNode.d.ts +44 -0
- three/src/nodes/core/VaryingNode.d.ts +3 -0
- three/src/nodes/core/constants.d.ts +41 -0
- three/src/nodes/display/BlendModes.d.ts +32 -0
- three/src/nodes/display/PassNode.d.ts +1 -1
- three/src/nodes/display/ScreenNode.d.ts +5 -0
- three/src/nodes/display/ViewportDepthNode.d.ts +3 -1
- three/src/nodes/fog/Fog.d.ts +26 -0
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +88 -0
- three/src/nodes/gpgpu/BarrierNode.d.ts +12 -0
- three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +13 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +6 -1
- three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +19 -0
- three/src/nodes/lighting/AnalyticLightNode.d.ts +11 -0
- three/src/nodes/lighting/LightsNode.d.ts +2 -2
- three/src/nodes/lighting/PointLightNode.d.ts +3 -0
- three/src/nodes/lighting/PointShadowNode.d.ts +30 -0
- three/src/nodes/lighting/ShadowBaseNode.d.ts +15 -0
- three/src/nodes/lighting/ShadowNode.d.ts +28 -4
- three/src/nodes/math/MathNode.d.ts +13 -4
- three/src/nodes/math/OperatorNode.d.ts +3 -0
- three/src/nodes/tsl/TSLBase.d.ts +5 -0
- three/src/nodes/tsl/TSLCore.d.ts +51 -16
- three/src/nodes/utils/EquirectUVNode.d.ts +2 -2
- three/src/nodes/utils/LoopNode.d.ts +23 -2
- three/src/nodes/utils/SplitNode.d.ts +1 -1
- three/src/objects/BatchedMesh.d.ts +4 -4
- three/src/objects/ClippingGroup.d.ts +41 -0
- three/src/renderers/WebGLRenderer.d.ts +10 -8
- three/src/renderers/common/Animation.d.ts +41 -4
- three/src/renderers/common/Attributes.d.ts +31 -0
- three/src/renderers/common/Backend.d.ts +11 -0
- three/src/renderers/common/Background.d.ts +22 -0
- three/src/renderers/common/BindGroup.d.ts +15 -0
- three/src/renderers/common/Binding.d.ts +24 -0
- three/src/renderers/common/Bindings.d.ts +54 -0
- three/src/renderers/common/Buffer.d.ts +31 -0
- three/src/renderers/common/BufferUtils.d.ts +26 -0
- three/src/renderers/common/BundleGroup.d.ts +22 -0
- three/src/renderers/common/ChainMap.d.ts +31 -1
- three/src/renderers/common/ClippingContext.d.ts +61 -14
- three/src/renderers/common/Color4.d.ts +36 -0
- three/src/renderers/common/ComputePipeline.d.ts +12 -0
- three/src/renderers/common/CubeRenderTarget.d.ts +13 -0
- three/src/renderers/common/DataMap.d.ts +30 -0
- three/src/renderers/common/Geometries.d.ts +52 -0
- three/src/renderers/common/Info.d.ts +27 -0
- three/src/renderers/common/Pipeline.d.ts +11 -0
- three/src/renderers/common/Pipelines.d.ts +104 -0
- three/src/renderers/common/ProgrammableStage.d.ts +19 -1
- three/src/renderers/common/RenderBundle.d.ts +15 -4
- three/src/renderers/common/RenderBundles.d.ts +20 -2
- three/src/renderers/common/RenderContext.d.ts +22 -0
- three/src/renderers/common/RenderContexts.d.ts +42 -3
- three/src/renderers/common/RenderList.d.ts +90 -0
- three/src/renderers/common/RenderLists.d.ts +21 -0
- three/src/renderers/common/RenderObject.d.ts +160 -5
- three/src/renderers/common/RenderObjects.d.ts +56 -0
- three/src/renderers/common/RenderPipeline.d.ts +13 -0
- three/src/renderers/common/Renderer.d.ts +596 -6
- three/src/renderers/common/{PostProcessingUtils.d.ts → RendererUtils.d.ts} +16 -4
- three/src/renderers/common/StorageBufferAttribute.d.ts +1 -1
- three/src/renderers/common/Textures.d.ts +66 -0
- three/src/renderers/common/Uniform.d.ts +106 -0
- three/src/renderers/common/UniformBuffer.d.ts +12 -0
- three/src/renderers/common/UniformsGroup.d.ts +104 -0
- three/src/renderers/common/extras/PMREMGenerator.d.ts +15 -1
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +30 -0
- three/src/renderers/common/nodes/NodeLibrary.d.ts +73 -4
- three/src/renderers/common/nodes/NodeUniform.d.ts +161 -0
- three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +14 -2
- three/src/renderers/common/nodes/Nodes.d.ts +185 -11
- three/src/renderers/webgl/WebGLState.d.ts +1 -1
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +10 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +11 -0
- three/src/textures/Data3DTexture.d.ts +4 -2
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/textures/DataTexture.d.ts +7 -2
- three/src/textures/Texture.d.ts +3 -0
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +0 -99
- three/examples/jsm/animation/MMDPhysics.d.ts +0 -128
- three/examples/jsm/exporters/MMDExporter.d.ts +0 -11
- three/examples/jsm/loaders/MMDLoader.d.ts +0 -60
- three/examples/jsm/shaders/MMDToonShader.d.ts +0 -15
- three/src/Three.Legacy.d.ts +0 -20
- three/src/nodes/core/UniformGroup.d.ts +0 -7
- three/src/nodes/display/BlendMode.d.ts +0 -10
- three/src/nodes/fog/FogExp2Node.d.ts +0 -14
- three/src/nodes/fog/FogNode.d.ts +0 -20
- three/src/nodes/fog/FogRangeNode.d.ts +0 -19
- three/src/nodes/lighting/LightNode.d.ts +0 -18
- three/src/textures/types.d.ts +0 -9
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { CoordinateSystem } from "../constants.js";
|
|
2
2
|
import { Object3D } from "../core/Object3D.js";
|
|
3
|
+
import { RenderTarget } from "../core/RenderTarget.js";
|
|
3
4
|
import { WebGLCubeRenderTarget } from "../renderers/WebGLCubeRenderTarget.js";
|
|
4
|
-
import {
|
|
5
|
+
import { Camera } from "./Camera.js";
|
|
6
|
+
|
|
7
|
+
export interface CubeCameraRenderer {
|
|
8
|
+
coordinateSystem: CoordinateSystem;
|
|
9
|
+
getRenderTarget(): RenderTarget | null;
|
|
10
|
+
getActiveCubeFace(): number;
|
|
11
|
+
getActiveMipmapLevel(): number;
|
|
12
|
+
xr: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
};
|
|
15
|
+
setRenderTarget(
|
|
16
|
+
renderTarget: WebGLCubeRenderTarget | null,
|
|
17
|
+
activeCubeFace?: number,
|
|
18
|
+
activeMipmapLevel?: number,
|
|
19
|
+
): void;
|
|
20
|
+
render(scene: Object3D, camera: Camera): void;
|
|
21
|
+
}
|
|
5
22
|
|
|
6
23
|
/**
|
|
7
24
|
* Creates **6** {@link THREE.PerspectiveCamera | cameras} that render to a {@link THREE.WebGLCubeRenderTarget | WebGLCubeRenderTarget}.
|
|
@@ -64,5 +81,5 @@ export class CubeCamera extends Object3D {
|
|
|
64
81
|
* @param renderer The current WebGL renderer
|
|
65
82
|
* @param scene The current scene
|
|
66
83
|
*/
|
|
67
|
-
update(renderer:
|
|
84
|
+
update(renderer: CubeCameraRenderer, scene: Object3D): void;
|
|
68
85
|
}
|
three/src/core/Clock.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Object for keeping track of time
|
|
3
|
-
* @
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @see {@link https://threejs.org/docs/index.html#api/en/core/Clock | Official Documentation}
|
|
7
|
-
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Clock.js | Source}
|
|
2
|
+
* Object for keeping track of time. This uses
|
|
3
|
+
* [performance.now]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance/now}.
|
|
4
|
+
* @see [Official Documentation]{@link https://threejs.org/docs/index.html#api/en/core/Clock}
|
|
5
|
+
* @see [Source]{@link https://github.com/mrdoob/three.js/blob/master/src/core/Clock.js}
|
|
8
6
|
*/
|
|
9
7
|
export class Clock {
|
|
10
8
|
/**
|
|
@@ -85,6 +85,18 @@ export class InterleavedBuffer {
|
|
|
85
85
|
*/
|
|
86
86
|
uuid: string;
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* A callback function that is executed after the Renderer has transferred the geometry data to the GPU.
|
|
90
|
+
*/
|
|
91
|
+
onUploadCallback: () => void;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Sets the value of the {@link onUploadCallback} property.
|
|
95
|
+
* @see {@link onUploadCallback}
|
|
96
|
+
* @param callback function that is executed after the Renderer has transferred the geometry data to the GPU.
|
|
97
|
+
*/
|
|
98
|
+
onUpload(callback: () => void): this;
|
|
99
|
+
|
|
88
100
|
/**
|
|
89
101
|
* Calls {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set | TypedArray.set}( {@link value}, {@link offset} )
|
|
90
102
|
* on the {@link BufferAttribute.array | array}.
|
three/src/core/RenderTarget.d.ts
CHANGED
|
@@ -72,11 +72,6 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
|
|
|
72
72
|
*/
|
|
73
73
|
resolveStencilBuffer: boolean;
|
|
74
74
|
|
|
75
|
-
/**
|
|
76
|
-
* @default null
|
|
77
|
-
*/
|
|
78
|
-
depthTexture: DepthTexture | null;
|
|
79
|
-
|
|
80
75
|
/**
|
|
81
76
|
* Defines the count of MSAA samples. Can only be used with WebGL 2. Default is **0**.
|
|
82
77
|
* @default 0
|
|
@@ -88,6 +83,9 @@ export class RenderTarget<TTexture extends Texture | Texture[] = Texture> extend
|
|
|
88
83
|
get texture(): TTexture;
|
|
89
84
|
set texture(value: TTexture);
|
|
90
85
|
|
|
86
|
+
set depthTexture(current: DepthTexture | null);
|
|
87
|
+
get depthTexture(): DepthTexture | null;
|
|
88
|
+
|
|
91
89
|
setSize(width: number, height: number, depth?: number): void;
|
|
92
90
|
clone(): this;
|
|
93
91
|
copy(source: RenderTarget): this;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RenderTarget, RenderTargetOptions } from "./RenderTarget.js";
|
|
2
|
+
|
|
3
|
+
declare class RenderTarget3D extends RenderTarget {
|
|
4
|
+
readonly isRenderTarget3D: true;
|
|
5
|
+
|
|
6
|
+
constructor(width?: number, height?: number, depth?: number, options?: RenderTargetOptions);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { RenderTarget3D };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RenderTarget, RenderTargetOptions } from "./RenderTarget.js";
|
|
2
|
+
|
|
3
|
+
declare class RenderTargetArray extends RenderTarget {
|
|
4
|
+
readonly isRenderTargetArray: true;
|
|
5
|
+
|
|
6
|
+
constructor(width?: number, height?: number, depth?: number, options?: RenderTargetOptions);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { RenderTargetArray };
|
|
@@ -234,10 +234,6 @@ export interface MaterialJSON {
|
|
|
234
234
|
* Materials describe the appearance of objects. They are defined in a (mostly) renderer-independent way, so you don't have to rewrite materials if you decide to use a different renderer.
|
|
235
235
|
*/
|
|
236
236
|
export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
237
|
-
static get type(): string;
|
|
238
|
-
|
|
239
|
-
get type(): string;
|
|
240
|
-
|
|
241
237
|
constructor();
|
|
242
238
|
|
|
243
239
|
/**
|
|
@@ -247,6 +243,12 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
247
243
|
*/
|
|
248
244
|
readonly isMaterial: true;
|
|
249
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Value is the string 'Material'. This shouldn't be changed, and can be used to find all objects of this type in a
|
|
248
|
+
* scene.
|
|
249
|
+
*/
|
|
250
|
+
type: string;
|
|
251
|
+
|
|
250
252
|
/**
|
|
251
253
|
* Enables alpha hashed transparency, an alternative to {@link .transparent} or {@link .alphaTest}. The material
|
|
252
254
|
* will not be rendered if opacity is lower than a random threshold. Randomization introduces some grain or noise,
|
|
@@ -571,7 +573,9 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
571
573
|
/**
|
|
572
574
|
* An optional callback that is executed immediately before the shader program is compiled.
|
|
573
575
|
* This function is called with the shader source code as a parameter.
|
|
574
|
-
* Useful for the modification of built-in materials
|
|
576
|
+
* Useful for the modification of built-in materials, but the recommended approach moving forward is to use
|
|
577
|
+
* `WebGPURenderer` with the new Node Material system and
|
|
578
|
+
* [TSL]{@link https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language}.
|
|
575
579
|
* Unlike properties, the callback is not supported by {@link .clone()}, {@link .copy()} and {@link .toJSON()}.
|
|
576
580
|
* This callback is only supported in `WebGLRenderer` (not `WebGPURenderer`).
|
|
577
581
|
* @param parameters WebGL program parameters
|
|
@@ -5,6 +5,7 @@ import { LineDashedMaterialParameters } from "../LineDashedMaterial.js";
|
|
|
5
5
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
6
6
|
|
|
7
7
|
export interface Line2NodeMaterialParameters extends NodeMaterialParameters, LineDashedMaterialParameters {
|
|
8
|
+
worldUnits?: boolean | undefined;
|
|
8
9
|
dashed?: boolean | undefined;
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -3,6 +3,7 @@ import { LineDashedMaterialParameters } from "../LineDashedMaterial.js";
|
|
|
3
3
|
import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
|
|
4
4
|
|
|
5
5
|
export interface LineDashedNodeMaterialParameters extends NodeMaterialParameters, LineDashedMaterialParameters {
|
|
6
|
+
dashOffset?: number | undefined;
|
|
6
7
|
offsetNode?: Node | null | undefined;
|
|
7
8
|
dashScaleNode?: Node | null | undefined;
|
|
8
9
|
dashSizeNode?: Node | null | undefined;
|
|
@@ -12,6 +13,8 @@ export interface LineDashedNodeMaterialParameters extends NodeMaterialParameters
|
|
|
12
13
|
declare class LineDashedNodeMaterial extends NodeMaterial {
|
|
13
14
|
readonly isLineDashedNodeMaterial: true;
|
|
14
15
|
|
|
16
|
+
dashOffset: number;
|
|
17
|
+
|
|
15
18
|
offsetNode: Node | null;
|
|
16
19
|
dashScaleNode: Node | null;
|
|
17
20
|
dashSizeNode: Node | null;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import InputNode from "../../nodes/core/InputNode.js";
|
|
2
2
|
import Node from "../../nodes/core/Node.js";
|
|
3
3
|
import MeshPhysicalNodeMaterial, { MeshPhysicalNodeMaterialParameters } from "./MeshPhysicalNodeMaterial.js";
|
|
4
4
|
|
|
5
5
|
export default class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
|
|
6
6
|
thicknessColorNode: Node | null;
|
|
7
|
-
thicknessDistortionNode:
|
|
8
|
-
thicknessAmbientNode:
|
|
9
|
-
thicknessAttenuationNode:
|
|
10
|
-
thicknessPowerNode:
|
|
11
|
-
thicknessScaleNode:
|
|
7
|
+
thicknessDistortionNode: InputNode<number>;
|
|
8
|
+
thicknessAmbientNode: InputNode<number>;
|
|
9
|
+
thicknessAttenuationNode: InputNode<number>;
|
|
10
|
+
thicknessPowerNode: InputNode<number>;
|
|
11
|
+
thicknessScaleNode: InputNode<number>;
|
|
12
12
|
|
|
13
13
|
constructor(parameters?: MeshPhysicalNodeMaterialParameters);
|
|
14
14
|
|
|
@@ -42,6 +42,7 @@ declare class NodeMaterial extends Material {
|
|
|
42
42
|
|
|
43
43
|
fog: boolean;
|
|
44
44
|
lights: boolean;
|
|
45
|
+
hardwareClipping: boolean;
|
|
45
46
|
|
|
46
47
|
lightsNode: LightsNode | null;
|
|
47
48
|
envNode: Node | null;
|
|
@@ -58,8 +59,9 @@ declare class NodeMaterial extends Material {
|
|
|
58
59
|
geometryNode: Node | null;
|
|
59
60
|
|
|
60
61
|
depthNode: Node | null;
|
|
61
|
-
shadowNode: Node | null;
|
|
62
62
|
shadowPositionNode: Node | null;
|
|
63
|
+
receivedShadowNode: Node | null;
|
|
64
|
+
castShadowNode: Node | null;
|
|
63
65
|
|
|
64
66
|
outputNode: Node | null;
|
|
65
67
|
mrtNode: MRTNode | null;
|
|
@@ -72,7 +74,11 @@ declare class NodeMaterial extends Material {
|
|
|
72
74
|
build(builder: NodeBuilder): void;
|
|
73
75
|
setup(builder: NodeBuilder): void;
|
|
74
76
|
setupClipping(builder: NodeBuilder): ClippingNode | null;
|
|
77
|
+
setupHardwareClipping(builder: NodeBuilder): void;
|
|
75
78
|
setupDepth(builder: NodeBuilder): void;
|
|
79
|
+
setupPositionView(): Node;
|
|
80
|
+
setupModelViewProjection(): Node;
|
|
81
|
+
setupVertex(builder: NodeBuilder): Node;
|
|
76
82
|
setupPosition(builder: NodeBuilder): Node;
|
|
77
83
|
setupDiffuseColor(builder: NodeBuilder): void;
|
|
78
84
|
setupVariants(builder: NodeBuilder): void;
|
|
@@ -78,19 +78,75 @@ interface RenderObjectData {
|
|
|
78
78
|
worldMatrix: Matrix4;
|
|
79
79
|
version?: number;
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* This class is used by {@link WebGPURenderer} as management component.
|
|
83
|
+
* It's primary purpose is to determine whether render objects require a
|
|
84
|
+
* refresh right before they are going to be rendered or not.
|
|
85
|
+
*/
|
|
81
86
|
declare class NodeMaterialObserver {
|
|
82
87
|
renderObjects: WeakMap<RenderObject, RenderObjectData>;
|
|
83
88
|
hasNode: boolean;
|
|
84
89
|
hasAnimation: boolean;
|
|
85
90
|
refreshUniforms: readonly RefreshUniform[];
|
|
86
91
|
renderId: number;
|
|
92
|
+
/**
|
|
93
|
+
* Constructs a new node material observer.
|
|
94
|
+
*
|
|
95
|
+
* @param {NodeBuilder} builder - The node builder.
|
|
96
|
+
*/
|
|
87
97
|
constructor(builder: NodeBuilder);
|
|
98
|
+
/**
|
|
99
|
+
* Returns `true` if the given render object is verified for the first time of this observer.
|
|
100
|
+
*
|
|
101
|
+
* @param {RenderObject} renderObject - The render object.
|
|
102
|
+
* @return {Boolean} Whether the given render object is verified for the first time of this observer.
|
|
103
|
+
*/
|
|
88
104
|
firstInitialization(renderObject: RenderObject): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Returns monitoring data for the given render object.
|
|
107
|
+
*
|
|
108
|
+
* @param {RenderObject} renderObject - The render object.
|
|
109
|
+
* @return {Object} The monitoring data.
|
|
110
|
+
*/
|
|
89
111
|
getRenderObjectData(renderObject: RenderObject): RenderObjectData;
|
|
112
|
+
/**
|
|
113
|
+
* Returns an attribute data structure holding the attributes versions for
|
|
114
|
+
* monitoring.
|
|
115
|
+
*
|
|
116
|
+
* @param {Object} attributes - The geometry attributes.
|
|
117
|
+
* @return {Object} An object for monitoring the versions of attributes.
|
|
118
|
+
*/
|
|
90
119
|
getAttributesData(attributes: Record<string, BufferAttribute>): AttributesData;
|
|
120
|
+
/**
|
|
121
|
+
* Returns `true` if the node builder's material uses
|
|
122
|
+
* node properties.
|
|
123
|
+
*
|
|
124
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
125
|
+
* @return {Boolean} Whether the node builder's material uses node properties or not.
|
|
126
|
+
*/
|
|
91
127
|
containsNode(builder: NodeBuilder): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Returns a material data structure holding the material property values for
|
|
130
|
+
* monitoring.
|
|
131
|
+
*
|
|
132
|
+
* @param {Material} material - The material.
|
|
133
|
+
* @return {Object} An object for monitoring material properties.
|
|
134
|
+
*/
|
|
92
135
|
getMaterialData(material: Material): MaterialData;
|
|
136
|
+
/**
|
|
137
|
+
* Returns `true` if the given render object has not changed its state.
|
|
138
|
+
*
|
|
139
|
+
* @param {RenderObject} renderObject - The render object.
|
|
140
|
+
* @return {Boolean} Whether the given render object has changed its state or not.
|
|
141
|
+
*/
|
|
93
142
|
equals(renderObject: RenderObject): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Checks if the given render object requires a refresh.
|
|
145
|
+
*
|
|
146
|
+
* @param {RenderObject} renderObject - The render object.
|
|
147
|
+
* @param {NodeFrame} nodeFrame - The current node frame.
|
|
148
|
+
* @return {Boolean} Whether the given render object requires a refresh or not.
|
|
149
|
+
*/
|
|
94
150
|
needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean;
|
|
95
151
|
}
|
|
96
152
|
export default NodeMaterialObserver;
|
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -70,11 +70,11 @@ export { default as BatchNode } from "./accessors/BatchNode.js";
|
|
|
70
70
|
export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js";
|
|
71
71
|
export { default as BufferNode } from "./accessors/BufferNode.js";
|
|
72
72
|
export { default as CubeTextureNode } from "./accessors/CubeTextureNode.js";
|
|
73
|
+
export { default as InstancedMeshNode } from "./accessors/InstancedMeshNode.js";
|
|
73
74
|
export { default as InstanceNode } from "./accessors/InstanceNode.js";
|
|
74
75
|
export { default as MaterialNode, MaterialNodeScope } from "./accessors/MaterialNode.js";
|
|
75
76
|
export { default as MaterialReferenceNode } from "./accessors/MaterialReferenceNode.js";
|
|
76
77
|
export { default as ModelNode } from "./accessors/ModelNode.js";
|
|
77
|
-
export { default as ModelViewProjectionNode } from "./accessors/ModelViewProjectionNode.js";
|
|
78
78
|
export { default as MorphNode } from "./accessors/MorphNode.js";
|
|
79
79
|
export { default as Object3DNode } from "./accessors/Object3DNode.js";
|
|
80
80
|
export { default as PointUVNode } from "./accessors/PointUVNode.js";
|
|
@@ -114,11 +114,6 @@ export { default as FunctionNode } from "./code/FunctionNode.js";
|
|
|
114
114
|
export { default as ScriptableNode } from "./code/ScriptableNode.js";
|
|
115
115
|
export { default as ScriptableValueNode } from "./code/ScriptableValueNode.js";
|
|
116
116
|
|
|
117
|
-
// fog
|
|
118
|
-
export { default as FogExp2Node } from "./fog/FogExp2Node.js";
|
|
119
|
-
export { default as FogNode } from "./fog/FogNode.js";
|
|
120
|
-
export { default as FogRangeNode } from "./fog/FogRangeNode.js";
|
|
121
|
-
|
|
122
117
|
// geometry
|
|
123
118
|
export { default as RangeNode, RangeModeBound } from "./geometry/RangeNode.js";
|
|
124
119
|
|
|
@@ -137,11 +132,11 @@ export { default as IESSpotLightNode } from "./lighting/IESSpotLightNode.js";
|
|
|
137
132
|
export { default as IrradianceNode } from "./lighting/IrradianceNode.js";
|
|
138
133
|
export { default as LightingContextNode } from "./lighting/LightingContextNode.js";
|
|
139
134
|
export { default as LightingNode } from "./lighting/LightingNode.js";
|
|
140
|
-
export { default as LightNode, LightNodeScope } from "./lighting/LightNode.js";
|
|
141
135
|
export { default as LightProbeNode } from "./lighting/LightProbeNode.js";
|
|
142
136
|
export { default as LightsNode } from "./lighting/LightsNode.js";
|
|
143
137
|
export { default as PointLightNode } from "./lighting/PointLightNode.js";
|
|
144
138
|
export { default as RectAreaLightNode, RectAreaLightTexturesLib } from "./lighting/RectAreaLightNode.js";
|
|
139
|
+
export { default as ShadowBaseNode } from "./lighting/ShadowBaseNode.js";
|
|
145
140
|
export { default as ShadowNode } from "./lighting/ShadowNode.js";
|
|
146
141
|
export { default as SpotLightNode } from "./lighting/SpotLightNode.js";
|
|
147
142
|
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -47,12 +47,14 @@ export * from "./tsl/TSLBase.js";
|
|
|
47
47
|
|
|
48
48
|
// accessors
|
|
49
49
|
export * from "./accessors/AccessorsUtils.js";
|
|
50
|
+
export * from "./accessors/Arrays.js";
|
|
50
51
|
export * from "./accessors/BatchNode.js";
|
|
51
52
|
export * from "./accessors/Bitangent.js";
|
|
52
53
|
export * from "./accessors/BufferAttributeNode.js";
|
|
53
54
|
export * from "./accessors/BufferNode.js";
|
|
54
55
|
export * from "./accessors/Camera.js";
|
|
55
56
|
export * from "./accessors/CubeTextureNode.js";
|
|
57
|
+
export * from "./accessors/InstancedMeshNode.js";
|
|
56
58
|
export * from "./accessors/InstanceNode.js";
|
|
57
59
|
export * from "./accessors/MaterialNode.js";
|
|
58
60
|
export * from "./accessors/MaterialProperties.js";
|
|
@@ -83,7 +85,7 @@ export * from "./accessors/VelocityNode.js";
|
|
|
83
85
|
export * from "./accessors/VertexColorNode.js";
|
|
84
86
|
|
|
85
87
|
// display
|
|
86
|
-
export * from "./display/
|
|
88
|
+
export * from "./display/BlendModes.js";
|
|
87
89
|
export * from "./display/BumpMapNode.js";
|
|
88
90
|
export * from "./display/ColorAdjustment.js";
|
|
89
91
|
export * from "./display/ColorSpaceNode.js";
|
|
@@ -113,21 +115,24 @@ export * from "./code/ScriptableNode.js";
|
|
|
113
115
|
export * from "./code/ScriptableValueNode.js";
|
|
114
116
|
|
|
115
117
|
// fog
|
|
116
|
-
export * from "./fog/
|
|
117
|
-
export * from "./fog/FogNode.js";
|
|
118
|
-
export * from "./fog/FogRangeNode.js";
|
|
118
|
+
export * from "./fog/Fog.js";
|
|
119
119
|
|
|
120
120
|
// geometry
|
|
121
121
|
export * from "./geometry/RangeNode.js";
|
|
122
122
|
|
|
123
123
|
// gpgpu
|
|
124
|
+
export * from "./gpgpu/AtomicFunctionNode.js";
|
|
125
|
+
export * from "./gpgpu/BarrierNode.js";
|
|
126
|
+
export * from "./gpgpu/ComputeBuiltinNode.js";
|
|
124
127
|
export * from "./gpgpu/ComputeNode.js";
|
|
128
|
+
export * from "./gpgpu/WorkgroupInfoNode.js";
|
|
125
129
|
|
|
126
130
|
// lighting
|
|
131
|
+
export * from "./accessors/Lights.js";
|
|
127
132
|
export * from "./lighting/LightingContextNode.js";
|
|
128
|
-
export * from "./lighting/LightNode.js";
|
|
129
133
|
export * from "./lighting/LightsNode.js";
|
|
130
134
|
export * from "./lighting/PointLightNode.js";
|
|
135
|
+
export * from "./lighting/ShadowBaseNode.js";
|
|
131
136
|
export * from "./lighting/ShadowNode.js";
|
|
132
137
|
|
|
133
138
|
// pmrem
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TypedArray } from "../../core/BufferAttribute.js";
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
import StorageBufferNode from "./StorageBufferNode.js";
|
|
4
|
+
|
|
5
|
+
export const attributeArray: (count: TypedArray | number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|
|
6
|
+
|
|
7
|
+
export const instancedArray: (count: TypedArray | number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|
|
@@ -4,6 +4,29 @@ import { InterleavedBuffer } from "../../core/InterleavedBuffer.js";
|
|
|
4
4
|
import { InterleavedBufferAttribute } from "../../core/InterleavedBufferAttribute.js";
|
|
5
5
|
import InputNode from "../core/InputNode.js";
|
|
6
6
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
7
|
+
/** @module BufferAttributeNode **/
|
|
8
|
+
/**
|
|
9
|
+
* In earlier `three.js` versions it was only possible to define attribute data
|
|
10
|
+
* on geometry level. With `BufferAttributeNode`, it is also possible to do this
|
|
11
|
+
* on the node level.
|
|
12
|
+
* ```js
|
|
13
|
+
* const geometry = new THREE.PlaneGeometry();
|
|
14
|
+
* const positionAttribute = geometry.getAttribute( 'position' );
|
|
15
|
+
*
|
|
16
|
+
* const colors = [];
|
|
17
|
+
* for ( let i = 0; i < position.count; i ++ ) {
|
|
18
|
+
* colors.push( 1, 0, 0 );
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* material.colorNode = bufferAttribute( new THREE.Float32BufferAttribute( colors, 3 ) );
|
|
22
|
+
* ```
|
|
23
|
+
* This new approach is especially interesting when geometry data are generated via
|
|
24
|
+
* compute shaders. The below line converts a storage buffer into an attribute node.
|
|
25
|
+
* ```js
|
|
26
|
+
* material.positionNode = positionBuffer.toAttribute();
|
|
27
|
+
* ```
|
|
28
|
+
* @augments InputNode
|
|
29
|
+
*/
|
|
7
30
|
declare class BufferAttributeNode extends InputNode<TypedArray | InterleavedBuffer | BufferAttribute> {
|
|
8
31
|
static get type(): string;
|
|
9
32
|
readonly isBufferNode: true;
|
|
@@ -13,39 +36,133 @@ declare class BufferAttributeNode extends InputNode<TypedArray | InterleavedBuff
|
|
|
13
36
|
usage: Usage;
|
|
14
37
|
instanced: boolean;
|
|
15
38
|
attribute: BufferAttribute | InterleavedBufferAttribute | null;
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a new buffer attribute node.
|
|
41
|
+
*
|
|
42
|
+
* @param {BufferAttribute|InterleavedBuffer|TypedArray} value - The attribute data.
|
|
43
|
+
* @param {String?} [bufferType=null] - The buffer type (e.g. `'vec3'`).
|
|
44
|
+
* @param {Number} [bufferStride=0] - The buffer stride.
|
|
45
|
+
* @param {Number} [bufferOffset=0] - The buffer offset.
|
|
46
|
+
*/
|
|
16
47
|
constructor(
|
|
17
48
|
value: TypedArray | InterleavedBuffer | BufferAttribute,
|
|
18
49
|
bufferType?: string | null,
|
|
19
50
|
bufferStride?: number,
|
|
20
51
|
bufferOffset?: number,
|
|
21
52
|
);
|
|
53
|
+
/**
|
|
54
|
+
* This method is overwritten since the attribute data might be shared
|
|
55
|
+
* and thus the hash should be shared as well.
|
|
56
|
+
*
|
|
57
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
58
|
+
* @return {String} The hash.
|
|
59
|
+
*/
|
|
22
60
|
getHash(builder: NodeBuilder): string;
|
|
61
|
+
/**
|
|
62
|
+
* This method is overwritten since the node type is inferred from
|
|
63
|
+
* the buffer attribute.
|
|
64
|
+
*
|
|
65
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
66
|
+
* @return {String} The node type.
|
|
67
|
+
*/
|
|
23
68
|
getNodeType(builder: NodeBuilder): string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Depending on which value was passed to the node, `setup()` behaves
|
|
71
|
+
* differently. If no instance of `BufferAttribute` was passed, the method
|
|
72
|
+
* creates an internal attribute and configures it respectively.
|
|
73
|
+
*
|
|
74
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
75
|
+
*/
|
|
24
76
|
setup(builder: NodeBuilder): void;
|
|
77
|
+
/**
|
|
78
|
+
* Generates the code snippet of the buffer attribute node.
|
|
79
|
+
*
|
|
80
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
81
|
+
* @return {String} The generated code snippet.
|
|
82
|
+
*/
|
|
25
83
|
generate(builder: NodeBuilder): string | null | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Overwrites the default implementation to return a fixed value `'bufferAttribute'`.
|
|
86
|
+
*
|
|
87
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
88
|
+
* @return {String} The input type.
|
|
89
|
+
*/
|
|
26
90
|
getInputType(): string;
|
|
91
|
+
/**
|
|
92
|
+
* Sets the `usage` property to the given value.
|
|
93
|
+
*
|
|
94
|
+
* @param {Number} value - The usage to set.
|
|
95
|
+
* @return {BufferAttributeNode} A reference to this node.
|
|
96
|
+
*/
|
|
27
97
|
setUsage(value: Usage): this;
|
|
98
|
+
/**
|
|
99
|
+
* Sets the `instanced` property to the given value.
|
|
100
|
+
*
|
|
101
|
+
* @param {Number} value - The value to set.
|
|
102
|
+
* @return {BufferAttributeNode} A reference to this node.
|
|
103
|
+
*/
|
|
28
104
|
setInstanced(value: boolean): this;
|
|
29
105
|
}
|
|
30
106
|
export default BufferAttributeNode;
|
|
107
|
+
/**
|
|
108
|
+
* TSL function for creating a buffer attribute node.
|
|
109
|
+
*
|
|
110
|
+
* @function
|
|
111
|
+
* @param {BufferAttribute|InterleavedBuffer|TypedArray} array - The attribute data.
|
|
112
|
+
* @param {String?} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
113
|
+
* @param {Number} [stride=0] - The buffer stride.
|
|
114
|
+
* @param {Number} [offset=0] - The buffer offset.
|
|
115
|
+
* @returns {BufferAttributeNode}
|
|
116
|
+
*/
|
|
31
117
|
export declare const bufferAttribute: (
|
|
32
118
|
array: TypedArray | InterleavedBuffer | BufferAttribute,
|
|
33
119
|
type?: string | null,
|
|
34
120
|
stride?: number,
|
|
35
121
|
offset?: number,
|
|
36
122
|
) => import("../tsl/TSLCore.js").ShaderNodeObject<BufferAttributeNode>;
|
|
123
|
+
/**
|
|
124
|
+
* TSL function for creating a buffer attribute node but with dynamic draw usage.
|
|
125
|
+
* Use this function if attribute data are updated per frame.
|
|
126
|
+
*
|
|
127
|
+
* @function
|
|
128
|
+
* @param {BufferAttribute|InterleavedBuffer|TypedArray} array - The attribute data.
|
|
129
|
+
* @param {String?} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
130
|
+
* @param {Number} [stride=0] - The buffer stride.
|
|
131
|
+
* @param {Number} [offset=0] - The buffer offset.
|
|
132
|
+
* @returns {BufferAttributeNode}
|
|
133
|
+
*/
|
|
37
134
|
export declare const dynamicBufferAttribute: (
|
|
38
135
|
array: TypedArray | InterleavedBuffer | BufferAttribute,
|
|
39
136
|
type?: string | null,
|
|
40
137
|
stride?: number,
|
|
41
138
|
offset?: number,
|
|
42
139
|
) => import("../tsl/TSLCore.js").ShaderNodeObject<BufferAttributeNode>;
|
|
140
|
+
/**
|
|
141
|
+
* TSL function for creating a buffer attribute node but with enabled instancing
|
|
142
|
+
*
|
|
143
|
+
* @function
|
|
144
|
+
* @param {BufferAttribute|InterleavedBuffer|TypedArray} array - The attribute data.
|
|
145
|
+
* @param {String?} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
146
|
+
* @param {Number} [stride=0] - The buffer stride.
|
|
147
|
+
* @param {Number} [offset=0] - The buffer offset.
|
|
148
|
+
* @returns {BufferAttributeNode}
|
|
149
|
+
*/
|
|
43
150
|
export declare const instancedBufferAttribute: (
|
|
44
151
|
array: TypedArray | InterleavedBuffer | BufferAttribute,
|
|
45
152
|
type?: string | null,
|
|
46
153
|
stride?: number,
|
|
47
154
|
offset?: number,
|
|
48
155
|
) => import("../tsl/TSLCore.js").ShaderNodeObject<BufferAttributeNode>;
|
|
156
|
+
/**
|
|
157
|
+
* TSL function for creating a buffer attribute node but with dynamic draw usage and enabled instancing
|
|
158
|
+
*
|
|
159
|
+
* @function
|
|
160
|
+
* @param {BufferAttribute|InterleavedBuffer|TypedArray} array - The attribute data.
|
|
161
|
+
* @param {String?} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
162
|
+
* @param {Number} [stride=0] - The buffer stride.
|
|
163
|
+
* @param {Number} [offset=0] - The buffer offset.
|
|
164
|
+
* @returns {BufferAttributeNode}
|
|
165
|
+
*/
|
|
49
166
|
export declare const instancedDynamicBufferAttribute: (
|
|
50
167
|
array: TypedArray | InterleavedBuffer | BufferAttribute,
|
|
51
168
|
type?: string | null,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import UniformNode from "../core/UniformNode.js";
|
|
2
2
|
import { NodeOrType, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
|
-
export default class BufferNode extends UniformNode<
|
|
4
|
+
export default class BufferNode<TValue> extends UniformNode<TValue> {
|
|
5
5
|
isBufferNode: true;
|
|
6
6
|
|
|
7
7
|
bufferType: string;
|
|
8
8
|
bufferCount: number;
|
|
9
9
|
|
|
10
|
-
constructor(value:
|
|
10
|
+
constructor(value: TValue, bufferType: string, bufferCount?: number);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const buffer: (
|
|
13
|
+
export const buffer: <TValue>(
|
|
14
14
|
value: unknown,
|
|
15
15
|
nodeOrType: NodeOrType,
|
|
16
16
|
count: number,
|
|
17
|
-
) => ShaderNodeObject<BufferNode
|
|
17
|
+
) => ShaderNodeObject<BufferNode<TValue>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
|
|
4
|
+
declare class BuiltinNode extends Node {
|
|
5
|
+
name: string;
|
|
6
|
+
|
|
7
|
+
readonly isBuiltinNode: true;
|
|
8
|
+
|
|
9
|
+
constructor(name: string);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default BuiltinNode;
|
|
13
|
+
|
|
14
|
+
export const builtin: (name: string) => ShaderNodeObject<BuiltinNode>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Plane } from "../../math/Plane.js";
|
|
1
2
|
import Node from "../core/Node.js";
|
|
3
|
+
import NodeBuilder from "../core/NodeBuilder.js";
|
|
2
4
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
5
|
|
|
4
6
|
export type ClippingNodeScope = typeof ClippingNode.ALPHA_TO_COVERAGE | typeof ClippingNode.DEFAULT;
|
|
@@ -6,11 +8,15 @@ export type ClippingNodeScope = typeof ClippingNode.ALPHA_TO_COVERAGE | typeof C
|
|
|
6
8
|
export default class ClippingNode extends Node {
|
|
7
9
|
scope: ClippingNodeScope;
|
|
8
10
|
|
|
11
|
+
hardwareClipping?: boolean;
|
|
12
|
+
|
|
9
13
|
constructor(scope?: ClippingNodeScope);
|
|
10
14
|
|
|
11
15
|
static ALPHA_TO_COVERAGE: "alphaToCoverage";
|
|
12
16
|
static DEFAULT: "default";
|
|
17
|
+
static HARDWARE: "hardware";
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
export const clipping: () => ShaderNodeObject<ClippingNode>;
|
|
16
21
|
export const clippingAlpha: () => ShaderNodeObject<ClippingNode>;
|
|
22
|
+
export const hardwareClipping: () => ShaderNodeObject<ClippingNode>;
|