@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.
Files changed (194) hide show
  1. three/README.md +1 -1
  2. three/build/three.core.d.ts +1 -0
  3. three/build/three.core.min.d.ts +1 -0
  4. three/build/three.tsl.d.ts +1 -0
  5. three/build/three.tsl.min.d.ts +1 -0
  6. three/examples/jsm/Addons.d.ts +3 -3
  7. three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
  8. three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
  9. three/examples/jsm/controls/ArcballControls.d.ts +6 -1
  10. three/examples/jsm/controls/TransformControls.d.ts +45 -1
  11. three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
  12. three/examples/jsm/csm/CSMHelper.d.ts +2 -1
  13. three/examples/jsm/csm/CSMShadowNode.d.ts +45 -0
  14. three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
  15. three/examples/jsm/exporters/GLTFExporter.d.ts +43 -10
  16. three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
  17. three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
  18. three/examples/jsm/geometries/DecalGeometry.d.ts +10 -4
  19. three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
  20. three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
  21. three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
  22. three/examples/jsm/lines/Wireframe.d.ts +5 -2
  23. three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
  24. three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
  25. three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
  26. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
  27. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
  28. three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
  29. three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
  30. three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
  31. three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
  32. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
  33. three/examples/jsm/math/ColorSpaces.d.ts +11 -0
  34. three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
  35. three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
  36. three/examples/jsm/objects/SkyMesh.d.ts +2 -2
  37. three/examples/jsm/objects/Water2Mesh.d.ts +13 -2
  38. three/examples/jsm/objects/WaterMesh.d.ts +11 -2
  39. three/examples/jsm/renderers/SVGRenderer.d.ts +2 -2
  40. three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +2 -5
  41. three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
  42. three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
  43. three/examples/jsm/tsl/display/BleachBypass.d.ts +4 -0
  44. three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +2 -5
  45. three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +3 -8
  46. three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +2 -5
  47. three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
  48. three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +2 -3
  49. three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +2 -3
  50. three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +5 -14
  51. three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
  52. three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
  53. three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
  54. three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +2 -2
  55. three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
  56. three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
  57. three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
  58. three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +2 -4
  59. three/examples/jsm/tsl/display/SMAANode.d.ts +18 -0
  60. three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
  61. three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
  62. three/examples/jsm/tsl/display/Sepia.d.ts +4 -0
  63. three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +2 -3
  64. three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +1 -5
  65. three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
  66. three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
  67. three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +2 -5
  68. three/examples/jsm/tsl/display/hashBlur.d.ts +8 -0
  69. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +23 -0
  70. three/package.json +5 -4
  71. three/src/Three.Core.d.ts +158 -0
  72. three/src/Three.TSL.d.ts +528 -0
  73. three/src/Three.WebGPU.Nodes.d.ts +15 -192
  74. three/src/Three.WebGPU.d.ts +14 -192
  75. three/src/Three.d.ts +3 -164
  76. three/src/animation/AnimationClip.d.ts +3 -1
  77. three/src/constants.d.ts +1 -9
  78. three/src/core/BufferGeometry.d.ts +13 -2
  79. three/src/core/Clock.d.ts +4 -6
  80. three/src/core/InterleavedBuffer.d.ts +12 -0
  81. three/src/core/RenderTarget.d.ts +1 -2
  82. three/src/loaders/FileLoader.d.ts +3 -3
  83. three/src/materials/LineBasicMaterial.d.ts +0 -5
  84. three/src/materials/LineDashedMaterial.d.ts +0 -5
  85. three/src/materials/Material.d.ts +6 -6
  86. three/src/materials/MeshBasicMaterial.d.ts +0 -5
  87. three/src/materials/MeshDepthMaterial.d.ts +0 -5
  88. three/src/materials/MeshDistanceMaterial.d.ts +0 -5
  89. three/src/materials/MeshLambertMaterial.d.ts +0 -5
  90. three/src/materials/MeshMatcapMaterial.d.ts +0 -5
  91. three/src/materials/MeshNormalMaterial.d.ts +0 -5
  92. three/src/materials/MeshPhongMaterial.d.ts +0 -5
  93. three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
  94. three/src/materials/MeshStandardMaterial.d.ts +0 -5
  95. three/src/materials/MeshToonMaterial.d.ts +0 -5
  96. three/src/materials/PointsMaterial.d.ts +0 -5
  97. three/src/materials/RawShaderMaterial.d.ts +0 -2
  98. three/src/materials/ShaderMaterial.d.ts +0 -5
  99. three/src/materials/ShadowMaterial.d.ts +0 -5
  100. three/src/materials/SpriteMaterial.d.ts +0 -5
  101. three/src/materials/nodes/LineDashedNodeMaterial.d.ts +3 -0
  102. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
  103. three/src/materials/nodes/NodeMaterial.d.ts +6 -1
  104. three/src/materials/nodes/NodeMaterials.d.ts +19 -16
  105. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +15 -0
  106. three/src/math/Color.d.ts +39 -22
  107. three/src/math/ColorManagement.d.ts +24 -24
  108. three/src/math/Vector4.d.ts +2 -0
  109. three/src/nodes/Nodes.d.ts +2 -22
  110. three/src/nodes/TSL.d.ts +14 -26
  111. three/src/nodes/accessors/Arrays.d.ts +6 -0
  112. three/src/nodes/accessors/BuiltinNode.d.ts +14 -0
  113. three/src/nodes/accessors/Camera.d.ts +0 -1
  114. three/src/nodes/accessors/ClippingNode.d.ts +6 -0
  115. three/src/nodes/accessors/InstanceNode.d.ts +15 -3
  116. three/src/nodes/accessors/InstancedMeshNode.d.ts +11 -0
  117. three/src/nodes/accessors/Lights.d.ts +15 -0
  118. three/src/nodes/accessors/SceneNode.d.ts +2 -0
  119. three/src/nodes/accessors/StorageBufferNode.d.ts +20 -11
  120. three/src/nodes/accessors/StorageTextureNode.d.ts +5 -3
  121. three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
  122. three/src/nodes/accessors/VelocityNode.d.ts +4 -0
  123. three/src/nodes/code/ScriptableNode.d.ts +1 -1
  124. three/src/nodes/core/IndexNode.d.ts +2 -0
  125. three/src/nodes/core/NodeUtils.d.ts +7 -0
  126. three/src/nodes/core/StackNode.d.ts +10 -5
  127. three/src/nodes/core/VarNode.d.ts +12 -1
  128. three/src/nodes/core/constants.d.ts +6 -0
  129. three/src/nodes/display/BlendModes.d.ts +32 -0
  130. three/src/nodes/display/ColorAdjustment.d.ts +29 -0
  131. three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
  132. three/src/nodes/display/ColorSpaceNode.d.ts +14 -8
  133. three/src/nodes/display/RenderOutputNode.d.ts +4 -4
  134. three/src/nodes/display/ScreenNode.d.ts +5 -0
  135. three/src/nodes/display/ViewportDepthNode.d.ts +4 -0
  136. three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
  137. three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -0
  138. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +88 -0
  139. three/src/nodes/gpgpu/BarrierNode.d.ts +12 -0
  140. three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +13 -0
  141. three/src/nodes/gpgpu/ComputeNode.d.ts +5 -0
  142. three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +17 -0
  143. three/src/nodes/lighting/AnalyticLightNode.d.ts +11 -0
  144. three/src/nodes/lighting/LightsNode.d.ts +7 -2
  145. three/src/nodes/lighting/PointLightNode.d.ts +14 -1
  146. three/src/nodes/lighting/PointShadowNode.d.ts +30 -0
  147. three/src/nodes/lighting/ShadowNode.d.ts +35 -0
  148. three/src/nodes/math/OperatorNode.d.ts +3 -0
  149. three/src/nodes/tsl/TSLBase.d.ts +5 -0
  150. three/src/nodes/tsl/TSLCore.d.ts +3 -0
  151. three/src/nodes/utils/Discard.d.ts +1 -1
  152. three/src/nodes/utils/Oscillators.d.ts +7 -0
  153. three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
  154. three/src/nodes/utils/ReflectorNode.d.ts +17 -4
  155. three/src/nodes/utils/SplitNode.d.ts +1 -1
  156. three/src/nodes/utils/Timer.d.ts +21 -0
  157. three/src/objects/BatchedMesh.d.ts +51 -6
  158. three/src/objects/ClippingGroup.d.ts +41 -0
  159. three/src/renderers/WebGLRenderer.d.ts +24 -11
  160. three/src/renderers/common/Animation.d.ts +11 -4
  161. three/src/renderers/common/ClippingContext.d.ts +16 -14
  162. three/src/renderers/common/Constants.d.ts +2 -1
  163. three/src/renderers/common/Geometries.d.ts +1 -0
  164. three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
  165. three/src/renderers/common/Lighting.d.ts +15 -0
  166. three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
  167. three/src/renderers/common/RenderList.d.ts +10 -2
  168. three/src/renderers/common/RenderLists.d.ts +3 -1
  169. three/src/renderers/common/RenderObject.d.ts +9 -4
  170. three/src/renderers/common/RenderObjects.d.ts +3 -0
  171. three/src/renderers/common/Renderer.d.ts +49 -10
  172. three/src/renderers/common/UniformsGroup.d.ts +1 -0
  173. three/src/renderers/common/extras/PMREMGenerator.d.ts +20 -2
  174. three/src/renderers/common/nodes/NodeLibrary.d.ts +2 -11
  175. three/src/renderers/common/nodes/NodeUniform.d.ts +7 -0
  176. three/src/renderers/webgl/WebGLPrograms.d.ts +3 -10
  177. three/src/renderers/webgl/WebGLState.d.ts +14 -11
  178. three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
  179. three/src/textures/CompressedTexture.d.ts +1 -2
  180. three/src/textures/CubeTexture.d.ts +1 -2
  181. three/src/textures/Data3DTexture.d.ts +4 -2
  182. three/src/textures/DataArrayTexture.d.ts +1 -1
  183. three/src/textures/DataTexture.d.ts +7 -3
  184. three/src/textures/Texture.d.ts +3 -4
  185. three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
  186. three/src/nodes/display/BleachBypass.d.ts +0 -4
  187. three/src/nodes/display/BlendMode.d.ts +0 -10
  188. three/src/nodes/display/Sepia.d.ts +0 -4
  189. three/src/nodes/lighting/LightNode.d.ts +0 -18
  190. three/src/nodes/utils/OscNode.d.ts +0 -25
  191. three/src/nodes/utils/TimerNode.d.ts +0 -25
  192. three/src/textures/types.d.ts +0 -9
  193. /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
  194. /three/examples/jsm/utils/{TextureUtilsGPU.d.ts → WebGPUTextureUtils.d.ts} +0 -0
three/src/constants.d.ts CHANGED
@@ -697,23 +697,15 @@ export type NormalMapTypes = typeof TangentSpaceNormalMap | typeof ObjectSpaceNo
697
697
  export const NoColorSpace: "";
698
698
  export const SRGBColorSpace: "srgb";
699
699
  export const LinearSRGBColorSpace: "srgb-linear";
700
- export const DisplayP3ColorSpace: "display-p3";
701
- export const LinearDisplayP3ColorSpace = "display-p3-linear";
702
700
  export type ColorSpace =
703
701
  | typeof NoColorSpace
704
702
  | typeof SRGBColorSpace
705
- | typeof LinearSRGBColorSpace
706
- | typeof DisplayP3ColorSpace
707
- | typeof LinearDisplayP3ColorSpace;
703
+ | typeof LinearSRGBColorSpace;
708
704
 
709
705
  export const LinearTransfer: "linear";
710
706
  export const SRGBTransfer: "srgb";
711
707
  export type ColorSpaceTransfer = typeof LinearTransfer | typeof SRGBTransfer;
712
708
 
713
- export const Rec709Primaries: "rec709";
714
- export const P3Primaries: "p3";
715
- export type ColorSpacePrimaries = typeof Rec709Primaries | typeof P3Primaries;
716
-
717
709
  // Stencil Op types
718
710
  export const ZeroStencilOp: 0;
719
711
  export const KeepStencilOp: 7680;
@@ -4,6 +4,7 @@ import { Quaternion } from "../math/Quaternion.js";
4
4
  import { Sphere } from "../math/Sphere.js";
5
5
  import { Vector2 } from "../math/Vector2.js";
6
6
  import { Vector3, Vector3Tuple } from "../math/Vector3.js";
7
+ import IndirectStorageBufferAttribute from "../renderers/common/IndirectStorageBufferAttribute.js";
7
8
  import { BufferAttribute, BufferAttributeJSON } from "./BufferAttribute.js";
8
9
  import { EventDispatcher } from "./EventDispatcher.js";
9
10
  import { GLBufferAttribute } from "./GLBufferAttribute.js";
@@ -155,6 +156,8 @@ export class BufferGeometry<
155
156
  */
156
157
  index: BufferAttribute | null;
157
158
 
159
+ indirect: IndirectStorageBufferAttribute | null;
160
+
158
161
  /**
159
162
  * This hashmap has as id the name of the attribute to be set and as value the {@link THREE.BufferAttribute | buffer} to set it to. Rather than accessing this property directly,
160
163
  * use {@link setAttribute | .setAttribute} and {@link getAttribute | .getAttribute} to access attributes of this geometry.
@@ -233,6 +236,10 @@ export class BufferGeometry<
233
236
  */
234
237
  setIndex(index: BufferAttribute | number[] | null): this;
235
238
 
239
+ setIndirect(indirect: IndirectStorageBufferAttribute | null): this;
240
+
241
+ getIndirect(): IndirectStorageBufferAttribute | null;
242
+
236
243
  /**
237
244
  * Sets an {@link attributes | attribute} to this geometry with the specified name.
238
245
  * @remarks
@@ -352,8 +359,12 @@ export class BufferGeometry<
352
359
  center(): this;
353
360
 
354
361
  /**
355
- * Sets the attributes for this BufferGeometry from an array of points.
356
- * @param points
362
+ * Defines a geometry by creating a `position` attribute based on the given array of points. The array can hold
363
+ * instances of {@link Vector2} or {@link Vector3}. When using two-dimensional data, the `z` coordinate for all
364
+ * vertices is set to `0`.
365
+ *
366
+ * If the method is used with an existing `position` attribute, the vertex data are overwritten with the data from
367
+ * the array. The length of the array must match the vertex count.
357
368
  */
358
369
  setFromPoints(points: Vector3[] | Vector2[]): this;
359
370
 
three/src/core/Clock.d.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Object for keeping track of time
3
- * @remarks
4
- * This uses {@link https://developer.mozilla.org/en-US/docs/Web/API/Performance/now | performance.now} if it is available,
5
- * otherwise it reverts to the less accurate {@link https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/now | Date.now}.
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}.
@@ -1,5 +1,4 @@
1
1
  import {
2
- ColorSpace,
3
2
  MagnificationTextureFilter,
4
3
  MinificationTextureFilter,
5
4
  PixelFormatGPU,
@@ -20,7 +19,7 @@ export interface RenderTargetOptions {
20
19
  format?: number | undefined; // RGBAFormat
21
20
  type?: TextureDataType | undefined; // UnsignedByteType
22
21
  anisotropy?: number | undefined; // 1
23
- colorSpace?: ColorSpace | undefined;
22
+ colorSpace?: string | undefined;
24
23
  internalFormat?: PixelFormatGPU | null | undefined; // null
25
24
  depthBuffer?: boolean | undefined; // true
26
25
  stencilBuffer?: boolean | undefined; // false
@@ -11,9 +11,9 @@ export class FileLoader extends Loader<string | ArrayBuffer> {
11
11
  onError?: (err: unknown) => void,
12
12
  ): void;
13
13
 
14
- mimeType: undefined | MimeType;
15
- responseType: undefined | string;
14
+ mimeType: string | undefined;
15
+ responseType: string | undefined;
16
16
 
17
- setMimeType(mimeType: MimeType): FileLoader;
17
+ setMimeType(mimeType: string): FileLoader;
18
18
  setResponseType(responseType: string): FileLoader;
19
19
  }
@@ -20,11 +20,6 @@ export class LineBasicMaterial extends Material {
20
20
  */
21
21
  readonly isLineBasicMaterial: true;
22
22
 
23
- /**
24
- * @default 'LineBasicMaterial'
25
- */
26
- type: string;
27
-
28
23
  /**
29
24
  * @default 0xffffff
30
25
  */
@@ -16,11 +16,6 @@ export class LineDashedMaterial extends LineBasicMaterial {
16
16
  */
17
17
  readonly isLineDashedMaterial: true;
18
18
 
19
- /**
20
- * @default 'LineDashedMaterial'
21
- */
22
- type: string;
23
-
24
19
  /**
25
20
  * @default 1
26
21
  */
@@ -243,6 +243,12 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
243
243
  */
244
244
  readonly isMaterial: true;
245
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
+
246
252
  /**
247
253
  * Enables alpha hashed transparency, an alternative to {@link .transparent} or {@link .alphaTest}. The material
248
254
  * will not be rendered if opacity is lower than a random threshold. Randomization introduces some grain or noise,
@@ -509,12 +515,6 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
509
515
  */
510
516
  transparent: boolean;
511
517
 
512
- /**
513
- * Value is the string 'Material'. This shouldn't be changed, and can be used to find all objects of this type in a scene.
514
- * @default 'Material'
515
- */
516
- type: string;
517
-
518
518
  /**
519
519
  * UUID of this material instance. This gets automatically assigned, so this shouldn't be edited.
520
520
  */
@@ -39,11 +39,6 @@ export class MeshBasicMaterial extends Material {
39
39
  */
40
40
  readonly isMeshBasicMaterial: true;
41
41
 
42
- /**
43
- * @default 'MeshBasicMaterial'
44
- */
45
- type: string;
46
-
47
42
  /**
48
43
  * @default new THREE.Color( 0xffffff )
49
44
  */
@@ -22,11 +22,6 @@ export class MeshDepthMaterial extends Material {
22
22
  */
23
23
  readonly isMeshDepthMaterial: true;
24
24
 
25
- /**
26
- * @default 'MeshDepthMaterial'
27
- */
28
- type: string;
29
-
30
25
  /**
31
26
  * @default null
32
27
  */
@@ -23,11 +23,6 @@ export class MeshDistanceMaterial extends Material {
23
23
  */
24
24
  readonly isMeshDistanceMaterial: true;
25
25
 
26
- /**
27
- * @default 'MeshDistanceMaterial'
28
- */
29
- type: string;
30
-
31
26
  /**
32
27
  * @default null
33
28
  */
@@ -47,11 +47,6 @@ export class MeshLambertMaterial extends Material {
47
47
  */
48
48
  readonly isMeshLambertMaterial: true;
49
49
 
50
- /**
51
- * @default 'MeshLambertMaterial'
52
- */
53
- type: string;
54
-
55
50
  /**
56
51
  * @default new THREE.Color( 0xffffff )
57
52
  */
@@ -31,11 +31,6 @@ export class MeshMatcapMaterial extends Material {
31
31
  */
32
32
  readonly isMeshMatcapMaterial: true;
33
33
 
34
- /**
35
- * @default 'MeshMatcapMaterial'
36
- */
37
- type: string;
38
-
39
34
  /**
40
35
  * @default { 'MATCAP': '' }
41
36
  */
@@ -28,11 +28,6 @@ export class MeshNormalMaterial extends Material {
28
28
  */
29
29
  readonly isMeshNormalMaterial: true;
30
30
 
31
- /**
32
- * @default 'MeshNormalMaterial'
33
- */
34
- type: string;
35
-
36
31
  /**
37
32
  * @default null
38
33
  */
@@ -52,11 +52,6 @@ export class MeshPhongMaterial extends Material {
52
52
  */
53
53
  readonly isMeshPhongMaterial: true;
54
54
 
55
- /**
56
- * @default 'MeshNormalMaterial'
57
- */
58
- type: string;
59
-
60
55
  /**
61
56
  * @default new THREE.Color( 0xffffff )
62
57
  */
@@ -62,11 +62,6 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
62
62
  */
63
63
  defines: { [key: string]: any };
64
64
 
65
- /**
66
- * @default 'MeshPhysicalMaterial'
67
- */
68
- type: string;
69
-
70
65
  /**
71
66
  * @default 0
72
67
  */
@@ -47,11 +47,6 @@ export class MeshStandardMaterial extends Material {
47
47
  */
48
48
  readonly isMeshStandardMaterial: true;
49
49
 
50
- /**
51
- * @default 'MeshStandardMaterial'
52
- */
53
- type: string;
54
-
55
50
  /**
56
51
  * @default { 'STANDARD': '' }
57
52
  */
@@ -43,11 +43,6 @@ export class MeshToonMaterial extends Material {
43
43
  */
44
44
  readonly isMeshToonMaterial: true;
45
45
 
46
- /**
47
- * @default 'MeshToonMaterial'
48
- */
49
- type: string;
50
-
51
46
  /**
52
47
  * @default { 'TOON': '' }
53
48
  */
@@ -21,11 +21,6 @@ export class PointsMaterial extends Material {
21
21
  */
22
22
  readonly isPointsMaterial: true;
23
23
 
24
- /**
25
- * @default 'PointsMaterial'
26
- */
27
- type: string;
28
-
29
24
  /**
30
25
  * @default new THREE.Color( 0xffffff )
31
26
  */
@@ -9,6 +9,4 @@ export class RawShaderMaterial extends ShaderMaterial {
9
9
  * @defaultValue `true`
10
10
  */
11
11
  readonly isRawShaderMaterial: true;
12
-
13
- override readonly type: "RawShaderMaterial";
14
12
  }
@@ -79,11 +79,6 @@ export class ShaderMaterial extends Material {
79
79
  */
80
80
  readonly isShaderMaterial: true;
81
81
 
82
- /**
83
- * @default 'ShaderMaterial'
84
- */
85
- type: string;
86
-
87
82
  /**
88
83
  * @default {}
89
84
  */
@@ -16,11 +16,6 @@ export class ShadowMaterial extends Material {
16
16
  */
17
17
  readonly isShadowMaterial: true;
18
18
 
19
- /**
20
- * @default 'ShadowMaterial'
21
- */
22
- type: string;
23
-
24
19
  /**
25
20
  * @default new THREE.Color( 0x000000 )
26
21
  */
@@ -20,11 +20,6 @@ export class SpriteMaterial extends Material {
20
20
  */
21
21
  readonly isSpriteMaterial: true;
22
22
 
23
- /**
24
- * @default 'SpriteMaterial'
25
- */
26
- type: string;
27
-
28
23
  /**
29
24
  * @default new THREE.Color( 0xffffff )
30
25
  */
@@ -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;
@@ -4,7 +4,7 @@ import { Texture } from "../../textures/Texture.js";
4
4
  import { MeshNormalMaterialParameters } from "../MeshNormalMaterial.js";
5
5
  import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js";
6
6
 
7
- export interface MeshBasicNodeMaterialParameters extends NodeMaterialParameters, MeshNormalMaterialParameters {
7
+ export interface MeshNormalNodeMaterialParameters extends NodeMaterialParameters, MeshNormalMaterialParameters {
8
8
  }
9
9
 
10
10
  export default class MeshNormalNodeMaterial extends NodeMaterial {
@@ -24,5 +24,5 @@ export default class MeshNormalNodeMaterial extends NodeMaterial {
24
24
  wireframeLinewidth: number;
25
25
  flatShading: boolean;
26
26
 
27
- constructor(parameters?: MeshBasicNodeMaterialParameters);
27
+ constructor(parameters?: MeshNormalNodeMaterialParameters);
28
28
  }
@@ -24,6 +24,7 @@ export interface NodeMaterialParameters extends MaterialParameters {
24
24
  alphaTestNode?: Node | null | undefined;
25
25
 
26
26
  positionNode?: Node | null | undefined;
27
+ geometryNode?: Node | null | undefined;
27
28
 
28
29
  depthNode?: Node | null | undefined;
29
30
  shadowNode?: Node | null | undefined;
@@ -41,6 +42,7 @@ declare class NodeMaterial extends Material {
41
42
 
42
43
  fog: boolean;
43
44
  lights: boolean;
45
+ hardwareClipping: boolean;
44
46
 
45
47
  lightsNode: LightsNode | null;
46
48
  envNode: Node | null;
@@ -54,10 +56,12 @@ declare class NodeMaterial extends Material {
54
56
  alphaTestNode: Node | null;
55
57
 
56
58
  positionNode: Node | null;
59
+ geometryNode: Node | null;
57
60
 
58
61
  depthNode: Node | null;
59
- shadowNode: Node | null;
60
62
  shadowPositionNode: Node | null;
63
+ receivedShadowNode: Node | null;
64
+ castShadowNode: Node | null;
61
65
 
62
66
  outputNode: Node | null;
63
67
  mrtNode: MRTNode | null;
@@ -70,6 +74,7 @@ declare class NodeMaterial extends Material {
70
74
  build(builder: NodeBuilder): void;
71
75
  setup(builder: NodeBuilder): void;
72
76
  setupClipping(builder: NodeBuilder): ClippingNode | null;
77
+ setupHardwareClipping(builder: NodeBuilder): void;
73
78
  setupDepth(builder: NodeBuilder): void;
74
79
  setupPosition(builder: NodeBuilder): Node;
75
80
  setupDiffuseColor(builder: NodeBuilder): void;
@@ -1,18 +1,21 @@
1
- export { default as InstancedPointsNodeMaterial } from "./InstancedPointsNodeMaterial.js";
2
- export { default as Line2NodeMaterial } from "./Line2NodeMaterial.js";
3
- export { default as LineBasicNodeMaterial } from "./LineBasicNodeMaterial.js";
4
- export { default as LineDashedNodeMaterial } from "./LineDashedNodeMaterial.js";
5
- export { default as MeshBasicNodeMaterial } from "./MeshBasicNodeMaterial.js";
6
- export { default as MeshLambertNodeMaterial } from "./MeshLambertNodeMaterial.js";
7
- export { default as MeshMatcapNodeMaterial } from "./MeshMatcapNodeMaterial.js";
8
- export { default as MeshNormalNodeMaterial } from "./MeshNormalNodeMaterial.js";
9
- export { default as MeshPhongNodeMaterial } from "./MeshPhongNodeMaterial.js";
10
- export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.js";
1
+ export {
2
+ default as InstancedPointsNodeMaterial,
3
+ InstancedPointsNodeMaterialParameters,
4
+ } from "./InstancedPointsNodeMaterial.js";
5
+ export { default as Line2NodeMaterial, Line2NodeMaterialParameters } from "./Line2NodeMaterial.js";
6
+ export { default as LineBasicNodeMaterial, LineBasicNodeMaterialParameters } from "./LineBasicNodeMaterial.js";
7
+ export { default as LineDashedNodeMaterial, LineDashedNodeMaterialParameters } from "./LineDashedNodeMaterial.js";
8
+ export { default as MeshBasicNodeMaterial, MeshBasicNodeMaterialParameters } from "./MeshBasicNodeMaterial.js";
9
+ export { default as MeshLambertNodeMaterial, MeshLambertNodeMaterialParameters } from "./MeshLambertNodeMaterial.js";
10
+ export { default as MeshMatcapNodeMaterial, MeshMatcapNodeMaterialParameters } from "./MeshMatcapNodeMaterial.js";
11
+ export { default as MeshNormalNodeMaterial, MeshNormalNodeMaterialParameters } from "./MeshNormalNodeMaterial.js";
12
+ export { default as MeshPhongNodeMaterial, MeshPhongNodeMaterialParameters } from "./MeshPhongNodeMaterial.js";
13
+ export { default as MeshPhysicalNodeMaterial, MeshPhysicalNodeMaterialParameters } from "./MeshPhysicalNodeMaterial.js";
11
14
  export { default as MeshSSSNodeMaterial } from "./MeshSSSNodeMaterial.js";
12
- export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js";
13
- export { default as MeshToonNodeMaterial } from "./MeshToonNodeMaterial.js";
14
- export { default as NodeMaterial } from "./NodeMaterial.js";
15
- export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js";
16
- export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js";
17
- export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js";
15
+ export { default as MeshStandardNodeMaterial, MeshStandardNodeMaterialParameters } from "./MeshStandardNodeMaterial.js";
16
+ export { default as MeshToonNodeMaterial, MeshToonNodeMaterialParameters } from "./MeshToonNodeMaterial.js";
17
+ export { default as NodeMaterial, NodeMaterialParameters } from "./NodeMaterial.js";
18
+ export { default as PointsNodeMaterial, PointsNodeMaterialParameters } from "./PointsNodeMaterial.js";
19
+ export { default as ShadowNodeMaterial, ShadowNodeMaterialParameters } from "./ShadowNodeMaterial.js";
20
+ export { default as SpriteNodeMaterial, SpriteNodeMaterialParameters } from "./SpriteNodeMaterial.js";
18
21
  export { default as VolumeNodeMaterial } from "./VolumeNodeMaterial.js";
@@ -1,3 +1,4 @@
1
+ import { BufferAttribute } from "../../../core/BufferAttribute.js";
1
2
  import { Matrix4 } from "../../../math/Matrix4.js";
2
3
  import NodeBuilder from "../../../nodes/core/NodeBuilder.js";
3
4
  import NodeFrame from "../../../nodes/core/NodeFrame.js";
@@ -59,8 +60,21 @@ type RefreshUniform = (typeof refreshUniforms)[number];
59
60
  type MaterialData = {
60
61
  [K in RefreshUniform]?: unknown;
61
62
  };
63
+ interface AttributesData {
64
+ [name: string]: {
65
+ version: number;
66
+ };
67
+ }
62
68
  interface RenderObjectData {
63
69
  material: MaterialData;
70
+ geometry: {
71
+ attributes: AttributesData;
72
+ indexVersion: number | null;
73
+ drawRange: {
74
+ start: number;
75
+ count: number;
76
+ };
77
+ };
64
78
  worldMatrix: Matrix4;
65
79
  version?: number;
66
80
  }
@@ -73,6 +87,7 @@ declare class NodeMaterialObserver {
73
87
  constructor(builder: NodeBuilder);
74
88
  firstInitialization(renderObject: RenderObject): boolean;
75
89
  getRenderObjectData(renderObject: RenderObject): RenderObjectData;
90
+ getAttributesData(attributes: Record<string, BufferAttribute>): AttributesData;
76
91
  containsNode(builder: NodeBuilder): boolean;
77
92
  getMaterialData(material: Material): MaterialData;
78
93
  equals(renderObject: RenderObject): boolean;