@types/three 0.169.0 → 0.171.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 +3 -3
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
- three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
- three/examples/jsm/controls/ArcballControls.d.ts +6 -1
- three/examples/jsm/controls/TransformControls.d.ts +45 -1
- three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
- three/examples/jsm/csm/CSMHelper.d.ts +2 -1
- three/examples/jsm/csm/CSMShadowNode.d.ts +45 -0
- three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +43 -10
- three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
- three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
- three/examples/jsm/geometries/DecalGeometry.d.ts +10 -4
- three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
- three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
- three/examples/jsm/lines/Wireframe.d.ts +5 -2
- three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
- three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
- three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
- three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
- three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
- three/examples/jsm/math/ColorSpaces.d.ts +11 -0
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
- three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -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/renderers/SVGRenderer.d.ts +2 -2
- three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +4 -0
- three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +3 -8
- three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +5 -14
- three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
- three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
- three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +2 -2
- three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
- three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +2 -4
- three/examples/jsm/tsl/display/SMAANode.d.ts +18 -0
- three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
- three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
- three/examples/jsm/tsl/display/Sepia.d.ts +4 -0
- three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
- three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +2 -5
- three/examples/jsm/tsl/display/hashBlur.d.ts +8 -0
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +23 -0
- three/package.json +5 -4
- three/src/Three.Core.d.ts +158 -0
- three/src/Three.TSL.d.ts +528 -0
- three/src/Three.WebGPU.Nodes.d.ts +15 -192
- three/src/Three.WebGPU.d.ts +14 -192
- three/src/Three.d.ts +3 -164
- three/src/animation/AnimationClip.d.ts +3 -1
- three/src/constants.d.ts +1 -9
- three/src/core/BufferGeometry.d.ts +13 -2
- three/src/core/Clock.d.ts +4 -6
- three/src/core/InterleavedBuffer.d.ts +12 -0
- three/src/core/RenderTarget.d.ts +1 -2
- three/src/loaders/FileLoader.d.ts +3 -3
- three/src/materials/LineBasicMaterial.d.ts +0 -5
- three/src/materials/LineDashedMaterial.d.ts +0 -5
- three/src/materials/Material.d.ts +6 -6
- three/src/materials/MeshBasicMaterial.d.ts +0 -5
- three/src/materials/MeshDepthMaterial.d.ts +0 -5
- three/src/materials/MeshDistanceMaterial.d.ts +0 -5
- three/src/materials/MeshLambertMaterial.d.ts +0 -5
- three/src/materials/MeshMatcapMaterial.d.ts +0 -5
- three/src/materials/MeshNormalMaterial.d.ts +0 -5
- three/src/materials/MeshPhongMaterial.d.ts +0 -5
- three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
- three/src/materials/MeshStandardMaterial.d.ts +0 -5
- three/src/materials/MeshToonMaterial.d.ts +0 -5
- three/src/materials/PointsMaterial.d.ts +0 -5
- three/src/materials/RawShaderMaterial.d.ts +0 -2
- three/src/materials/ShaderMaterial.d.ts +0 -5
- three/src/materials/ShadowMaterial.d.ts +0 -5
- three/src/materials/SpriteMaterial.d.ts +0 -5
- three/src/materials/nodes/LineDashedNodeMaterial.d.ts +3 -0
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
- three/src/materials/nodes/NodeMaterial.d.ts +6 -1
- three/src/materials/nodes/NodeMaterials.d.ts +19 -16
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +15 -0
- three/src/math/Color.d.ts +39 -22
- three/src/math/ColorManagement.d.ts +24 -24
- three/src/math/Vector4.d.ts +2 -0
- three/src/nodes/Nodes.d.ts +2 -22
- three/src/nodes/TSL.d.ts +14 -26
- three/src/nodes/accessors/Arrays.d.ts +6 -0
- three/src/nodes/accessors/BuiltinNode.d.ts +14 -0
- three/src/nodes/accessors/Camera.d.ts +0 -1
- 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/SceneNode.d.ts +2 -0
- three/src/nodes/accessors/StorageBufferNode.d.ts +20 -11
- three/src/nodes/accessors/StorageTextureNode.d.ts +5 -3
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
- three/src/nodes/accessors/VelocityNode.d.ts +4 -0
- three/src/nodes/code/ScriptableNode.d.ts +1 -1
- three/src/nodes/core/IndexNode.d.ts +2 -0
- three/src/nodes/core/NodeUtils.d.ts +7 -0
- three/src/nodes/core/StackNode.d.ts +10 -5
- three/src/nodes/core/VarNode.d.ts +12 -1
- three/src/nodes/core/constants.d.ts +6 -0
- three/src/nodes/display/BlendModes.d.ts +32 -0
- three/src/nodes/display/ColorAdjustment.d.ts +29 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
- three/src/nodes/display/ColorSpaceNode.d.ts +14 -8
- three/src/nodes/display/RenderOutputNode.d.ts +4 -4
- three/src/nodes/display/ScreenNode.d.ts +5 -0
- three/src/nodes/display/ViewportDepthNode.d.ts +4 -0
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -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 +5 -0
- three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +17 -0
- three/src/nodes/lighting/AnalyticLightNode.d.ts +11 -0
- three/src/nodes/lighting/LightsNode.d.ts +7 -2
- three/src/nodes/lighting/PointLightNode.d.ts +14 -1
- three/src/nodes/lighting/PointShadowNode.d.ts +30 -0
- three/src/nodes/lighting/ShadowNode.d.ts +35 -0
- 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 +3 -0
- three/src/nodes/utils/Discard.d.ts +1 -1
- three/src/nodes/utils/Oscillators.d.ts +7 -0
- three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
- three/src/nodes/utils/ReflectorNode.d.ts +17 -4
- three/src/nodes/utils/SplitNode.d.ts +1 -1
- three/src/nodes/utils/Timer.d.ts +21 -0
- three/src/objects/BatchedMesh.d.ts +51 -6
- three/src/objects/ClippingGroup.d.ts +41 -0
- three/src/renderers/WebGLRenderer.d.ts +24 -11
- three/src/renderers/common/Animation.d.ts +11 -4
- three/src/renderers/common/ClippingContext.d.ts +16 -14
- three/src/renderers/common/Constants.d.ts +2 -1
- three/src/renderers/common/Geometries.d.ts +1 -0
- three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
- three/src/renderers/common/Lighting.d.ts +15 -0
- three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
- three/src/renderers/common/RenderList.d.ts +10 -2
- three/src/renderers/common/RenderLists.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +9 -4
- three/src/renderers/common/RenderObjects.d.ts +3 -0
- three/src/renderers/common/Renderer.d.ts +49 -10
- three/src/renderers/common/UniformsGroup.d.ts +1 -0
- three/src/renderers/common/extras/PMREMGenerator.d.ts +20 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +2 -11
- three/src/renderers/common/nodes/NodeUniform.d.ts +7 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +3 -10
- three/src/renderers/webgl/WebGLState.d.ts +14 -11
- three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
- three/src/textures/CompressedTexture.d.ts +1 -2
- three/src/textures/CubeTexture.d.ts +1 -2
- three/src/textures/Data3DTexture.d.ts +4 -2
- three/src/textures/DataArrayTexture.d.ts +1 -1
- three/src/textures/DataTexture.d.ts +7 -3
- three/src/textures/Texture.d.ts +3 -4
- three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
- three/src/nodes/display/BleachBypass.d.ts +0 -4
- three/src/nodes/display/BlendMode.d.ts +0 -10
- three/src/nodes/display/Sepia.d.ts +0 -4
- three/src/nodes/lighting/LightNode.d.ts +0 -18
- three/src/nodes/utils/OscNode.d.ts +0 -25
- three/src/nodes/utils/TimerNode.d.ts +0 -25
- three/src/textures/types.d.ts +0 -9
- /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
- /three/examples/jsm/utils/{TextureUtilsGPU.d.ts → WebGPUTextureUtils.d.ts} +0 -0
three/src/math/Color.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ColorSpace } from "../constants.js";
|
|
2
1
|
import { Matrix3 } from "./Matrix3.js";
|
|
3
2
|
import { Vector3 } from "./Vector3.js";
|
|
4
3
|
|
|
@@ -173,12 +172,30 @@ export interface RGB {
|
|
|
173
172
|
}
|
|
174
173
|
|
|
175
174
|
/**
|
|
176
|
-
*
|
|
175
|
+
* Class representing a color.
|
|
177
176
|
*
|
|
178
|
-
*
|
|
177
|
+
* A Color instance is represented by RGB components in the linear <i>working color space</i>, which defaults to
|
|
178
|
+
* `LinearSRGBColorSpace`. Inputs conventionally using `SRGBColorSpace` (such as hexadecimals and CSS strings) are
|
|
179
|
+
* converted to the working color space automatically.
|
|
179
180
|
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
181
|
+
* ```
|
|
182
|
+
* // converted automatically from SRGBColorSpace to LinearSRGBColorSpace
|
|
183
|
+
* const color = new THREE.Color().setHex( 0x112233 );
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
186
|
+
* Source color spaces may be specified explicitly, to ensure correct conversions.
|
|
187
|
+
*
|
|
188
|
+
* ```
|
|
189
|
+
* // assumed already LinearSRGBColorSpace; no conversion
|
|
190
|
+
* const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5 );
|
|
191
|
+
*
|
|
192
|
+
* // converted explicitly from SRGBColorSpace to LinearSRGBColorSpace
|
|
193
|
+
* const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5, SRGBColorSpace );
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* If THREE.ColorManagement is disabled, no conversions occur. For details, see <i>Color management</i>.
|
|
197
|
+
*
|
|
198
|
+
* Iterating through a Color instance will yield its components (r, g, b) in the corresponding order.
|
|
182
199
|
*/
|
|
183
200
|
export class Color {
|
|
184
201
|
constructor(color?: ColorRepresentation);
|
|
@@ -187,19 +204,19 @@ export class Color {
|
|
|
187
204
|
readonly isColor: true;
|
|
188
205
|
|
|
189
206
|
/**
|
|
190
|
-
* Red channel value between 0 and 1. Default is 1
|
|
207
|
+
* Red channel value between `0.0` and `1.0`. Default is `1`.
|
|
191
208
|
* @default 1
|
|
192
209
|
*/
|
|
193
210
|
r: number;
|
|
194
211
|
|
|
195
212
|
/**
|
|
196
|
-
* Green channel value between 0 and 1. Default is 1
|
|
213
|
+
* Green channel value between `0.0` and `1.0`. Default is `1`.
|
|
197
214
|
* @default 1
|
|
198
215
|
*/
|
|
199
216
|
g: number;
|
|
200
217
|
|
|
201
218
|
/**
|
|
202
|
-
* Blue channel value between 0 and 1. Default is 1
|
|
219
|
+
* Blue channel value between `0.0` and `1.0`. Default is `1`.
|
|
203
220
|
* @default 1
|
|
204
221
|
*/
|
|
205
222
|
b: number;
|
|
@@ -213,7 +230,7 @@ export class Color {
|
|
|
213
230
|
setFromVector3(vector: Vector3): this;
|
|
214
231
|
|
|
215
232
|
setScalar(scalar: number): Color;
|
|
216
|
-
setHex(hex: number, colorSpace?:
|
|
233
|
+
setHex(hex: number, colorSpace?: string): Color;
|
|
217
234
|
|
|
218
235
|
/**
|
|
219
236
|
* Sets this color from RGB values.
|
|
@@ -221,7 +238,7 @@ export class Color {
|
|
|
221
238
|
* @param g Green channel value between 0 and 1.
|
|
222
239
|
* @param b Blue channel value between 0 and 1.
|
|
223
240
|
*/
|
|
224
|
-
setRGB(r: number, g: number, b: number, colorSpace?:
|
|
241
|
+
setRGB(r: number, g: number, b: number, colorSpace?: string): Color;
|
|
225
242
|
|
|
226
243
|
/**
|
|
227
244
|
* Sets this color from HSL values.
|
|
@@ -231,20 +248,20 @@ export class Color {
|
|
|
231
248
|
* @param s Saturation value channel between 0 and 1.
|
|
232
249
|
* @param l Value channel value between 0 and 1.
|
|
233
250
|
*/
|
|
234
|
-
setHSL(h: number, s: number, l: number, colorSpace?:
|
|
251
|
+
setHSL(h: number, s: number, l: number, colorSpace?: string): Color;
|
|
235
252
|
|
|
236
253
|
/**
|
|
237
254
|
* Sets this color from a CSS context style string.
|
|
238
255
|
* @param contextStyle Color in CSS context style format.
|
|
239
256
|
*/
|
|
240
|
-
setStyle(style: string, colorSpace?:
|
|
257
|
+
setStyle(style: string, colorSpace?: string): Color;
|
|
241
258
|
|
|
242
259
|
/**
|
|
243
260
|
* Sets this color from a color name.
|
|
244
261
|
* Faster than {@link Color#setStyle .setStyle()} method if you don't need the other CSS-style formats.
|
|
245
262
|
* @param style Color name in X11 format.
|
|
246
263
|
*/
|
|
247
|
-
setColorName(style: string, colorSpace?:
|
|
264
|
+
setColorName(style: string, colorSpace?: string): Color;
|
|
248
265
|
|
|
249
266
|
/**
|
|
250
267
|
* Clones this color.
|
|
@@ -258,46 +275,46 @@ export class Color {
|
|
|
258
275
|
copy(color: Color): this;
|
|
259
276
|
|
|
260
277
|
/**
|
|
261
|
-
* Copies given color making conversion from
|
|
278
|
+
* Copies given color making conversion from `SRGBColorSpace` to `LinearSRGBColorSpace`.
|
|
262
279
|
* @param color Color to copy.
|
|
263
280
|
*/
|
|
264
281
|
copySRGBToLinear(color: Color): Color;
|
|
265
282
|
|
|
266
283
|
/**
|
|
267
|
-
* Copies given color making conversion from
|
|
284
|
+
* Copies given color making conversion from `LinearSRGBColorSpace` to `SRGBColorSpace`.
|
|
268
285
|
* @param color Color to copy.
|
|
269
286
|
*/
|
|
270
287
|
copyLinearToSRGB(color: Color): Color;
|
|
271
288
|
|
|
272
289
|
/**
|
|
273
|
-
* Converts this color from
|
|
290
|
+
* Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.
|
|
274
291
|
*/
|
|
275
292
|
convertSRGBToLinear(): Color;
|
|
276
293
|
|
|
277
294
|
/**
|
|
278
|
-
* Converts this color from
|
|
295
|
+
* Converts this color from `LinearSRGBColorSpace` to `SRGBColorSpace`.
|
|
279
296
|
*/
|
|
280
297
|
convertLinearToSRGB(): Color;
|
|
281
298
|
|
|
282
299
|
/**
|
|
283
300
|
* Returns the hexadecimal value of this color.
|
|
284
301
|
*/
|
|
285
|
-
getHex(colorSpace?:
|
|
302
|
+
getHex(colorSpace?: string): number;
|
|
286
303
|
|
|
287
304
|
/**
|
|
288
305
|
* Returns the string formated hexadecimal value of this color.
|
|
289
306
|
*/
|
|
290
|
-
getHexString(colorSpace?:
|
|
307
|
+
getHexString(colorSpace?: string): string;
|
|
291
308
|
|
|
292
|
-
getHSL(target: HSL, colorSpace?:
|
|
309
|
+
getHSL(target: HSL, colorSpace?: string): HSL;
|
|
293
310
|
|
|
294
|
-
getRGB(target: RGB, colorSpace?:
|
|
311
|
+
getRGB(target: RGB, colorSpace?: string): RGB;
|
|
295
312
|
|
|
296
313
|
/**
|
|
297
314
|
* Returns the value of this color in CSS context style.
|
|
298
315
|
* Example: rgb(r, g, b)
|
|
299
316
|
*/
|
|
300
|
-
getStyle(colorSpace?:
|
|
317
|
+
getStyle(colorSpace?: string): string;
|
|
301
318
|
|
|
302
319
|
offsetHSL(h: number, s: number, l: number): this;
|
|
303
320
|
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ColorSpace,
|
|
3
|
-
ColorSpacePrimaries,
|
|
4
|
-
ColorSpaceTransfer,
|
|
5
|
-
DisplayP3ColorSpace,
|
|
6
|
-
LinearDisplayP3ColorSpace,
|
|
7
|
-
LinearSRGBColorSpace,
|
|
8
|
-
SRGBColorSpace,
|
|
9
|
-
} from "../constants.js";
|
|
1
|
+
import { ColorSpaceTransfer } from "../constants.js";
|
|
10
2
|
import { Color } from "./Color.js";
|
|
3
|
+
import { Matrix3 } from "./Matrix3.js";
|
|
11
4
|
import { Vector3 } from "./Vector3.js";
|
|
12
5
|
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
export interface ColorSpaceDefinition {
|
|
7
|
+
primaries: [number, number, number, number, number, number];
|
|
8
|
+
whitePoint: [number, number];
|
|
9
|
+
transfer: ColorSpaceTransfer;
|
|
10
|
+
toXYZ: Matrix3;
|
|
11
|
+
fromXYZ: Matrix3;
|
|
12
|
+
luminanceCoefficients: [number, number, number];
|
|
13
|
+
workingColorSpaceConfig?: { unpackColorSpace: string };
|
|
14
|
+
outputColorSpaceConfig?: { drawingBufferColorSpace: string };
|
|
15
|
+
}
|
|
19
16
|
|
|
20
17
|
export interface ColorManagement {
|
|
21
18
|
/**
|
|
22
|
-
* @default
|
|
19
|
+
* @default true
|
|
23
20
|
*/
|
|
24
21
|
enabled: boolean;
|
|
25
22
|
|
|
26
23
|
/**
|
|
27
24
|
* @default LinearSRGBColorSpace
|
|
28
25
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
workingColorSpace: string;
|
|
27
|
+
|
|
28
|
+
spaces: Record<string, ColorSpaceDefinition>;
|
|
29
|
+
|
|
30
|
+
convert: (color: Color, sourceColorSpace: string, targetColorSpace: string) => Color;
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
fromWorkingColorSpace: (color: Color, targetColorSpace: string) => Color;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
toWorkingColorSpace: (color: Color, sourceColorSpace: string) => Color;
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
getPrimaries: (colorSpace: string) => [number, number, number, number, number, number];
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
getTransfer: (colorSpace: string) => ColorSpaceTransfer;
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
getLuminanceCoefficients: (target: Vector3, colorSpace?: string) => [number, number, number];
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
define: (colorSpaces: Record<string, ColorSpaceDefinition>) => void;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export const ColorManagement: ColorManagement;
|
three/src/math/Vector4.d.ts
CHANGED
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -55,7 +55,6 @@ export { default as JoinNode } from "./utils/JoinNode.js";
|
|
|
55
55
|
export { default as LoopNode } from "./utils/LoopNode.js";
|
|
56
56
|
export { default as MatcapUVNode } from "./utils/MatcapUVNode.js";
|
|
57
57
|
export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js";
|
|
58
|
-
export { default as OscNode, OscNodeMethod } from "./utils/OscNode.js";
|
|
59
58
|
export { default as ReflectorNode, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
|
|
60
59
|
export { default as RemapNode } from "./utils/RemapNode.js";
|
|
61
60
|
export { default as RotateNode } from "./utils/RotateNode.js";
|
|
@@ -64,7 +63,6 @@ export { default as SetNode } from "./utils/SetNode.js";
|
|
|
64
63
|
export { default as SplitNode } from "./utils/SplitNode.js";
|
|
65
64
|
export { default as SpriteSheetUVNode } from "./utils/SpriteSheetUVNode.js";
|
|
66
65
|
export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js";
|
|
67
|
-
export { default as TimerNode, TimerNodeScope } from "./utils/TimerNode.js";
|
|
68
66
|
export { default as TriplanarTexturesNode } from "./utils/TriplanarTexturesNode.js";
|
|
69
67
|
|
|
70
68
|
// accessors
|
|
@@ -72,6 +70,7 @@ export { default as BatchNode } from "./accessors/BatchNode.js";
|
|
|
72
70
|
export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js";
|
|
73
71
|
export { default as BufferNode } from "./accessors/BufferNode.js";
|
|
74
72
|
export { default as CubeTextureNode } from "./accessors/CubeTextureNode.js";
|
|
73
|
+
export { default as InstancedMeshNode } from "./accessors/InstancedMeshNode.js";
|
|
75
74
|
export { default as InstanceNode } from "./accessors/InstanceNode.js";
|
|
76
75
|
export { default as MaterialNode, MaterialNodeScope } from "./accessors/MaterialNode.js";
|
|
77
76
|
export { default as MaterialReferenceNode } from "./accessors/MaterialReferenceNode.js";
|
|
@@ -94,34 +93,15 @@ export { default as UserDataNode, NodeUserData } from "./accessors/UserDataNode.
|
|
|
94
93
|
export { default as VertexColorNode } from "./accessors/VertexColorNode.js";
|
|
95
94
|
|
|
96
95
|
// display
|
|
97
|
-
export { default as AfterImageNode } from "./display/AfterImageNode.js";
|
|
98
|
-
export { default as AnaglyphPassNode } from "./display/AnaglyphPassNode.js";
|
|
99
|
-
export { default as AnamorphicNode } from "./display/AnamorphicNode.js";
|
|
100
|
-
export { default as BloomNode } from "./display/BloomNode.js";
|
|
101
96
|
export { default as BumpMapNode } from "./display/BumpMapNode.js";
|
|
102
97
|
export { default as ColorSpaceNode } from "./display/ColorSpaceNode.js";
|
|
103
|
-
export { default as DenoiseNode } from "./display/DenoiseNode.js";
|
|
104
|
-
export { default as DepthOfFieldNode } from "./display/DepthOfFieldNode.js";
|
|
105
|
-
export { default as DotScreenNode } from "./display/DotScreenNode.js";
|
|
106
|
-
export { default as FilmNode } from "./display/FilmNode.js";
|
|
107
98
|
export { default as FrontFacingNode } from "./display/FrontFacingNode.js";
|
|
108
|
-
export { default as FXAANode } from "./display/FXAANode.js";
|
|
109
|
-
export { default as GaussianBlurNode } from "./display/GaussianBlurNode.js";
|
|
110
|
-
export { default as GTAONode } from "./display/GTAONode.js";
|
|
111
|
-
export { default as Lut3DNode } from "./display/Lut3DNode.js";
|
|
112
99
|
export { default as NormalMapNode } from "./display/NormalMapNode.js";
|
|
113
|
-
export { default as ParallaxBarrierPassNode } from "./display/ParallaxBarrierPassNode.js";
|
|
114
100
|
export { default as PassNode, PassNodeScope } from "./display/PassNode.js";
|
|
115
|
-
export { default as PixelationPassNode } from "./display/PixelationPassNode.js";
|
|
116
101
|
export { default as PosterizeNode } from "./display/PosterizeNode.js";
|
|
117
102
|
export { default as RenderOutputNode } from "./display/RenderOutputNode.js";
|
|
118
|
-
export { default as RGBShiftNode } from "./display/RGBShiftNode.js";
|
|
119
103
|
export { default as ScreenNode, ScreenNodeScope } from "./display/ScreenNode.js";
|
|
120
|
-
export { default as SobelOperatorNode } from "./display/SobelOperatorNode.js";
|
|
121
|
-
export { default as SSAAPassNode } from "./display/SSAAPassNode.js";
|
|
122
|
-
export { default as StereoPassNode } from "./display/StereoPassNode.js";
|
|
123
104
|
export { default as ToneMappingNode } from "./display/ToneMappingNode.js";
|
|
124
|
-
export { default as TransitionNode } from "./display/TransitionNode.js";
|
|
125
105
|
export { default as ViewportDepthNode, ViewportDepthNodeScope } from "./display/ViewportDepthNode.js";
|
|
126
106
|
export { default as ViewportDepthTextureNode } from "./display/ViewportDepthTextureNode.js";
|
|
127
107
|
export { default as ViewportSharedTextureNode } from "./display/ViewportSharedTextureNode.js";
|
|
@@ -158,11 +138,11 @@ export { default as IESSpotLightNode } from "./lighting/IESSpotLightNode.js";
|
|
|
158
138
|
export { default as IrradianceNode } from "./lighting/IrradianceNode.js";
|
|
159
139
|
export { default as LightingContextNode } from "./lighting/LightingContextNode.js";
|
|
160
140
|
export { default as LightingNode } from "./lighting/LightingNode.js";
|
|
161
|
-
export { default as LightNode, LightNodeScope } from "./lighting/LightNode.js";
|
|
162
141
|
export { default as LightProbeNode } from "./lighting/LightProbeNode.js";
|
|
163
142
|
export { default as LightsNode } from "./lighting/LightsNode.js";
|
|
164
143
|
export { default as PointLightNode } from "./lighting/PointLightNode.js";
|
|
165
144
|
export { default as RectAreaLightNode, RectAreaLightTexturesLib } from "./lighting/RectAreaLightNode.js";
|
|
145
|
+
export { default as ShadowNode } from "./lighting/ShadowNode.js";
|
|
166
146
|
export { default as SpotLightNode } from "./lighting/SpotLightNode.js";
|
|
167
147
|
|
|
168
148
|
// pmrem
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -28,15 +28,16 @@ export * from "./utils/FunctionOverloadingNode.js";
|
|
|
28
28
|
export * from "./utils/LoopNode.js";
|
|
29
29
|
export * from "./utils/MatcapUVNode.js";
|
|
30
30
|
export * from "./utils/MaxMipLevelNode.js";
|
|
31
|
-
export * from "./utils/
|
|
31
|
+
export * from "./utils/Oscillators.js";
|
|
32
32
|
export * from "./utils/Packing.js";
|
|
33
|
+
export * from "./utils/PostProcessingUtils.js";
|
|
33
34
|
export * from "./utils/ReflectorNode.js";
|
|
34
35
|
export * from "./utils/RemapNode.js";
|
|
35
36
|
export * from "./utils/RotateNode.js";
|
|
36
37
|
export * from "./utils/RTTNode.js";
|
|
37
38
|
export * from "./utils/SpriteSheetUVNode.js";
|
|
38
39
|
export * from "./utils/SpriteUtils.js";
|
|
39
|
-
export * from "./utils/
|
|
40
|
+
export * from "./utils/Timer.js";
|
|
40
41
|
export * from "./utils/TriplanarTexturesNode.js";
|
|
41
42
|
export * from "./utils/UVUtils.js";
|
|
42
43
|
export * from "./utils/ViewportUtils.js";
|
|
@@ -46,12 +47,14 @@ export * from "./tsl/TSLBase.js";
|
|
|
46
47
|
|
|
47
48
|
// accessors
|
|
48
49
|
export * from "./accessors/AccessorsUtils.js";
|
|
50
|
+
export * from "./accessors/Arrays.js";
|
|
49
51
|
export * from "./accessors/BatchNode.js";
|
|
50
52
|
export * from "./accessors/Bitangent.js";
|
|
51
53
|
export * from "./accessors/BufferAttributeNode.js";
|
|
52
54
|
export * from "./accessors/BufferNode.js";
|
|
53
55
|
export * from "./accessors/Camera.js";
|
|
54
56
|
export * from "./accessors/CubeTextureNode.js";
|
|
57
|
+
export * from "./accessors/InstancedMeshNode.js";
|
|
55
58
|
export * from "./accessors/InstanceNode.js";
|
|
56
59
|
export * from "./accessors/MaterialNode.js";
|
|
57
60
|
export * from "./accessors/MaterialProperties.js";
|
|
@@ -82,39 +85,17 @@ export * from "./accessors/VelocityNode.js";
|
|
|
82
85
|
export * from "./accessors/VertexColorNode.js";
|
|
83
86
|
|
|
84
87
|
// display
|
|
85
|
-
export * from "./display/
|
|
86
|
-
export * from "./display/AnaglyphPassNode.js";
|
|
87
|
-
export * from "./display/AnamorphicNode.js";
|
|
88
|
-
export * from "./display/BleachBypass.js";
|
|
89
|
-
export * from "./display/BlendMode.js";
|
|
90
|
-
export * from "./display/BloomNode.js";
|
|
88
|
+
export * from "./display/BlendModes.js";
|
|
91
89
|
export * from "./display/BumpMapNode.js";
|
|
92
90
|
export * from "./display/ColorAdjustment.js";
|
|
93
91
|
export * from "./display/ColorSpaceNode.js";
|
|
94
|
-
export * from "./display/DenoiseNode.js";
|
|
95
|
-
export * from "./display/DepthOfFieldNode.js";
|
|
96
|
-
export * from "./display/DotScreenNode.js";
|
|
97
|
-
export * from "./display/FilmNode.js";
|
|
98
92
|
export * from "./display/FrontFacingNode.js";
|
|
99
|
-
export * from "./display/FXAANode.js";
|
|
100
|
-
export * from "./display/GaussianBlurNode.js";
|
|
101
|
-
export * from "./display/GTAONode.js";
|
|
102
|
-
export * from "./display/Lut3DNode.js";
|
|
103
|
-
export * from "./display/MotionBlur.js";
|
|
104
93
|
export * from "./display/NormalMapNode.js";
|
|
105
|
-
export * from "./display/ParallaxBarrierPassNode.js";
|
|
106
|
-
export * from "./display/PixelationPassNode.js";
|
|
107
94
|
export * from "./display/PosterizeNode.js";
|
|
108
95
|
export * from "./display/RenderOutputNode.js";
|
|
109
|
-
export * from "./display/RGBShiftNode.js";
|
|
110
96
|
export * from "./display/ScreenNode.js";
|
|
111
|
-
export * from "./display/Sepia.js";
|
|
112
|
-
export * from "./display/SobelOperatorNode.js";
|
|
113
|
-
export * from "./display/SSAAPassNode.js";
|
|
114
|
-
export * from "./display/StereoPassNode.js";
|
|
115
97
|
export * from "./display/ToneMappingNode.js";
|
|
116
98
|
export * from "./display/ToonOutlinePassNode.js";
|
|
117
|
-
export * from "./display/TransitionNode.js";
|
|
118
99
|
export * from "./display/ViewportDepthNode.js";
|
|
119
100
|
export * from "./display/ViewportDepthTextureNode.js";
|
|
120
101
|
export * from "./display/ViewportSharedTextureNode.js";
|
|
@@ -142,12 +123,18 @@ export * from "./fog/FogRangeNode.js";
|
|
|
142
123
|
export * from "./geometry/RangeNode.js";
|
|
143
124
|
|
|
144
125
|
// gpgpu
|
|
126
|
+
export * from "./gpgpu/AtomicFunctionNode.js";
|
|
127
|
+
export * from "./gpgpu/BarrierNode.js";
|
|
128
|
+
export * from "./gpgpu/ComputeBuiltinNode.js";
|
|
145
129
|
export * from "./gpgpu/ComputeNode.js";
|
|
130
|
+
export * from "./gpgpu/WorkgroupInfoNode.js";
|
|
146
131
|
|
|
147
132
|
// lighting
|
|
133
|
+
export * from "./accessors/Lights.js";
|
|
148
134
|
export * from "./lighting/LightingContextNode.js";
|
|
149
|
-
export * from "./lighting/LightNode.js";
|
|
150
135
|
export * from "./lighting/LightsNode.js";
|
|
136
|
+
export * from "./lighting/PointLightNode.js";
|
|
137
|
+
export * from "./lighting/ShadowNode.js";
|
|
151
138
|
|
|
152
139
|
// pmrem
|
|
153
140
|
export * from "./pmrem/PMREMNode.js";
|
|
@@ -171,5 +158,6 @@ export { default as V_GGX_SmithCorrelated } from "./functions/BSDF/V_GGX_SmithCo
|
|
|
171
158
|
export * from "./lighting/LightUtils.js";
|
|
172
159
|
|
|
173
160
|
export { default as getGeometryRoughness } from "./functions/material/getGeometryRoughness.js";
|
|
161
|
+
export { default as getParallaxCorrectNormal } from "./functions/material/getParallaxCorrectNormal.js";
|
|
174
162
|
export { default as getRoughness } from "./functions/material/getRoughness.js";
|
|
175
163
|
export { default as getShIrradianceAt } from "./functions/material/getShIrradianceAt.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
|
+
import StorageBufferNode from "./StorageBufferNode.js";
|
|
3
|
+
|
|
4
|
+
export const attributeArray: (count: number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|
|
5
|
+
|
|
6
|
+
export const instancedArray: (count: number, type?: string) => ShaderNodeObject<StorageBufferNode>;
|
|
@@ -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>;
|
|
@@ -6,7 +6,6 @@ import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
|
6
6
|
|
|
7
7
|
export const cameraNear: ShaderNodeObject<UniformNode<number>>;
|
|
8
8
|
export const cameraFar: ShaderNodeObject<UniformNode<number>>;
|
|
9
|
-
export const cameraLogDepth: ShaderNodeObject<UniformNode<number>>;
|
|
10
9
|
export const cameraProjectionMatrix: ShaderNodeObject<UniformNode<Matrix4>>;
|
|
11
10
|
export const cameraProjectionMatrixInverse: ShaderNodeObject<UniformNode<Matrix4>>;
|
|
12
11
|
export const cameraViewMatrix: ShaderNodeObject<UniformNode<Matrix4>>;
|
|
@@ -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>;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
+
import { InstancedBufferAttribute } from "../../core/InstancedBufferAttribute.js";
|
|
1
2
|
import { InstancedMesh } from "../../objects/InstancedMesh.js";
|
|
2
3
|
import Node from "../core/Node.js";
|
|
3
4
|
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
5
|
|
|
5
6
|
export default class InstanceNode extends Node {
|
|
6
|
-
|
|
7
|
+
count: number;
|
|
8
|
+
instanceMatrix: InstancedBufferAttribute;
|
|
9
|
+
instanceColor: InstancedBufferAttribute | null;
|
|
10
|
+
|
|
7
11
|
instanceMatrixNode: Node | null;
|
|
8
12
|
instanceColorNode: Node | null;
|
|
9
13
|
|
|
10
|
-
constructor(
|
|
14
|
+
constructor(
|
|
15
|
+
count: number,
|
|
16
|
+
instanceMatrix: InstancedBufferAttribute,
|
|
17
|
+
instanceColor: InstancedBufferAttribute | null,
|
|
18
|
+
);
|
|
11
19
|
}
|
|
12
20
|
|
|
13
|
-
export const instance: (
|
|
21
|
+
export const instance: (
|
|
22
|
+
count: number,
|
|
23
|
+
instanceMatrix: InstancedBufferAttribute,
|
|
24
|
+
instanceColor: InstancedBufferAttribute | null,
|
|
25
|
+
) => ShaderNodeObject<InstanceNode>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InstancedMesh } from "../../objects/InstancedMesh.js";
|
|
2
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
|
+
import InstanceNode from "./InstanceNode.js";
|
|
4
|
+
|
|
5
|
+
declare class InstancedMeshNode extends InstanceNode {
|
|
6
|
+
constructor(instanceMesh: InstancedMesh);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default InstancedMeshNode;
|
|
10
|
+
|
|
11
|
+
export const instancedMesh: (instancedMesh: InstancedMesh) => ShaderNodeObject<InstancedMeshNode>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Light } from "../../lights/Light.js";
|
|
2
|
+
import Node from "../core/Node.js";
|
|
3
|
+
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
|
+
|
|
5
|
+
export function lightShadowMatrix(light: Light): ShaderNodeObject<Node>;
|
|
6
|
+
|
|
7
|
+
export function lightProjectionUV(light: Light): ShaderNodeObject<Node>;
|
|
8
|
+
|
|
9
|
+
export function lightPosition(light: Light): ShaderNodeObject<Node>;
|
|
10
|
+
|
|
11
|
+
export function lightTargetPosition(light: Light): ShaderNodeObject<Node>;
|
|
12
|
+
|
|
13
|
+
export function lightViewPosition(light: Light): ShaderNodeObject<Node>;
|
|
14
|
+
|
|
15
|
+
export const lightTargetDirection: (light: Light) => ShaderNodeObject<Node>;
|
|
@@ -12,9 +12,11 @@ declare class SceneNode extends Node {
|
|
|
12
12
|
|
|
13
13
|
static BACKGROUND_BLURRINESS: "backgroundBlurriness";
|
|
14
14
|
static BACKGROUND_INTENSITY: "backgroundIntensity";
|
|
15
|
+
static BACKGROUND_ROTATION: "backgroundRotation";
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export default SceneNode;
|
|
18
19
|
|
|
19
20
|
export const backgroundBlurriness: ShaderNodeObject<SceneNode>;
|
|
20
21
|
export const backgroundIntensity: ShaderNodeObject<SceneNode>;
|
|
22
|
+
export const backgroundRotation: ShaderNodeObject<SceneNode>;
|
|
@@ -1,38 +1,47 @@
|
|
|
1
1
|
import StorageBufferAttribute from "../../renderers/common/StorageBufferAttribute.js";
|
|
2
2
|
import StorageInstancedBufferAttribute from "../../renderers/common/StorageInstancedBufferAttribute.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { NodeAccess } from "../core/constants.js";
|
|
4
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
5
|
import StorageArrayElementNode from "../utils/StorageArrayElementNode.js";
|
|
6
6
|
import BufferNode from "./BufferNode.js";
|
|
7
7
|
|
|
8
8
|
export default class StorageBufferNode extends BufferNode {
|
|
9
9
|
readonly isStorageBufferNode: true;
|
|
10
|
-
bufferObject: boolean;
|
|
11
10
|
|
|
12
|
-
access:
|
|
11
|
+
access: NodeAccess;
|
|
12
|
+
isAtomic: boolean;
|
|
13
|
+
isPBO: boolean;
|
|
14
|
+
|
|
15
|
+
bufferObject: boolean;
|
|
13
16
|
|
|
14
17
|
constructor(
|
|
15
18
|
value: StorageBufferAttribute | StorageInstancedBufferAttribute,
|
|
16
|
-
bufferType
|
|
19
|
+
bufferType?: string | null,
|
|
17
20
|
bufferCount?: number,
|
|
18
21
|
);
|
|
19
22
|
|
|
20
23
|
element(indexNode: NodeRepresentation): ShaderNodeObject<StorageArrayElementNode>;
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
setPBO(value: boolean): this;
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
getPBO(): boolean;
|
|
28
|
+
|
|
29
|
+
setAccess(value: NodeAccess): this;
|
|
25
30
|
|
|
26
31
|
toReadOnly(): this;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
export const storage: (
|
|
30
35
|
value: StorageBufferAttribute | StorageInstancedBufferAttribute,
|
|
31
|
-
|
|
32
|
-
count
|
|
36
|
+
type?: string | null,
|
|
37
|
+
count?: number,
|
|
33
38
|
) => ShaderNodeObject<StorageBufferNode>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated
|
|
42
|
+
*/
|
|
34
43
|
export const storageObject: (
|
|
35
44
|
value: StorageBufferAttribute | StorageInstancedBufferAttribute,
|
|
36
|
-
|
|
37
|
-
count
|
|
45
|
+
type?: string | null,
|
|
46
|
+
count?: number,
|
|
38
47
|
) => ShaderNodeObject<StorageBufferNode>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GPUStorageTextureAccess } from "../../renderers/webgpu/utils/WebGPUConstants.js";
|
|
2
1
|
import { Texture } from "../../textures/Texture.js";
|
|
2
|
+
import { NodeAccess } from "../core/constants.js";
|
|
3
3
|
import Node from "../core/Node.js";
|
|
4
4
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
5
5
|
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
@@ -10,7 +10,7 @@ export default class StorageTextureNode extends TextureNode {
|
|
|
10
10
|
|
|
11
11
|
readonly isStorageTextureNode: true;
|
|
12
12
|
|
|
13
|
-
access:
|
|
13
|
+
access: NodeAccess;
|
|
14
14
|
|
|
15
15
|
constructor(
|
|
16
16
|
value: Texture,
|
|
@@ -18,7 +18,9 @@ export default class StorageTextureNode extends TextureNode {
|
|
|
18
18
|
storeNode?: Node | null,
|
|
19
19
|
);
|
|
20
20
|
|
|
21
|
-
setAccess(value:
|
|
21
|
+
setAccess(value: NodeAccess): this;
|
|
22
|
+
|
|
23
|
+
toReadWrite(): this;
|
|
22
24
|
|
|
23
25
|
toReadOnly(): this;
|
|
24
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
3
|
import ArrayElementNode from "../utils/ArrayElementNode.js";
|
|
4
4
|
import BufferNode from "./BufferNode.js";
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ declare class UniformArrayNode extends BufferNode {
|
|
|
17
17
|
|
|
18
18
|
getElementLength(): number;
|
|
19
19
|
|
|
20
|
-
element(indexNode:
|
|
20
|
+
element(indexNode: NodeRepresentation): ShaderNodeObject<UniformArrayElementNode>;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export default UniformArrayNode;
|