@types/three 0.174.0 → 0.176.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 (102) hide show
  1. three/README.md +2 -2
  2. three/examples/jsm/Addons.d.ts +1 -1
  3. three/examples/jsm/controls/PointerLockControls.d.ts +4 -1
  4. three/examples/jsm/geometries/ParametricFunctions.d.ts +8 -0
  5. three/examples/jsm/helpers/RapierHelper.d.ts +13 -0
  6. three/examples/jsm/interactive/HTMLMesh.d.ts +9 -2
  7. three/examples/jsm/loaders/LUTImageLoader.d.ts +2 -2
  8. three/examples/jsm/loaders/LottieLoader.d.ts +4 -0
  9. three/examples/jsm/misc/MD2CharacterComplex.d.ts +1 -1
  10. three/examples/jsm/physics/RapierPhysics.d.ts +12 -0
  11. three/examples/jsm/postprocessing/BokehPass.d.ts +2 -2
  12. three/examples/jsm/postprocessing/HalftonePass.d.ts +1 -1
  13. three/examples/jsm/postprocessing/LUTPass.d.ts +1 -1
  14. three/examples/jsm/postprocessing/SMAAPass.d.ts +1 -1
  15. three/examples/jsm/transpiler/AST.d.ts +218 -1
  16. three/examples/jsm/transpiler/TSLEncoder.d.ts +35 -1
  17. three/examples/jsm/tsl/shadows/TileShadowNode.d.ts +14 -0
  18. three/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts +14 -0
  19. three/examples/jsm/webxr/VRButton.d.ts +4 -2
  20. three/package.json +4 -3
  21. three/src/Three.Core.d.ts +2 -0
  22. three/src/Three.TSL.d.ts +11 -1
  23. three/src/animation/AnimationAction.d.ts +219 -19
  24. three/src/animation/AnimationClip.d.ts +140 -28
  25. three/src/animation/AnimationMixer.d.ts +100 -8
  26. three/src/animation/AnimationObjectGroup.d.ts +55 -14
  27. three/src/animation/AnimationUtils.d.ts +154 -43
  28. three/src/animation/KeyframeTrack.d.ts +134 -25
  29. three/src/animation/PropertyBinding.d.ts +89 -31
  30. three/src/animation/PropertyMixer.d.ts +62 -5
  31. three/src/animation/tracks/BooleanKeyframeTrack.d.ts +12 -4
  32. three/src/animation/tracks/ColorKeyframeTrack.d.ts +10 -4
  33. three/src/animation/tracks/NumberKeyframeTrack.d.ts +10 -4
  34. three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +10 -4
  35. three/src/animation/tracks/StringKeyframeTrack.d.ts +12 -4
  36. three/src/animation/tracks/VectorKeyframeTrack.d.ts +10 -4
  37. three/src/audio/AudioListener.d.ts +1 -1
  38. three/src/cameras/ArrayCamera.d.ts +5 -0
  39. three/src/constants.d.ts +18 -17
  40. three/src/core/BufferAttribute.d.ts +11 -0
  41. three/src/core/BufferGeometry.d.ts +1 -3
  42. three/src/core/RenderTarget.d.ts +9 -0
  43. three/src/extras/Controls.d.ts +1 -1
  44. three/src/extras/Earcut.d.ts +5 -3
  45. three/src/extras/ImageUtils.d.ts +1 -0
  46. three/src/geometries/CapsuleGeometry.d.ts +10 -3
  47. three/src/lights/LightShadow.d.ts +8 -0
  48. three/src/lights/PointLight.d.ts +1 -1
  49. three/src/loaders/FileLoader.d.ts +2 -2
  50. three/src/loaders/LoaderUtils.d.ts +0 -5
  51. three/src/materials/Material.d.ts +6 -8
  52. three/src/materials/ShaderMaterial.d.ts +1 -1
  53. three/src/materials/nodes/NodeMaterial.d.ts +10 -2
  54. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +8 -0
  55. three/src/math/FrustumArray.d.ts +27 -0
  56. three/src/nodes/Nodes.d.ts +1 -0
  57. three/src/nodes/TSL.d.ts +1 -0
  58. three/src/nodes/accessors/BufferAttributeNode.d.ts +11 -4
  59. three/src/nodes/accessors/InstanceNode.d.ts +2 -3
  60. three/src/nodes/accessors/Object3DNode.d.ts +6 -6
  61. three/src/nodes/accessors/SkinningNode.d.ts +4 -3
  62. three/src/nodes/accessors/StorageTextureNode.d.ts +2 -2
  63. three/src/nodes/accessors/TextureNode.d.ts +3 -1
  64. three/src/nodes/accessors/VertexColorNode.d.ts +1 -1
  65. three/src/nodes/code/ExpressionNode.d.ts +3 -2
  66. three/src/nodes/code/ScriptableNode.d.ts +1 -1
  67. three/src/nodes/code/ScriptableValueNode.d.ts +1 -1
  68. three/src/nodes/core/Node.d.ts +8 -5
  69. three/src/nodes/core/NodeVarying.d.ts +11 -1
  70. three/src/nodes/core/StackNode.d.ts +7 -1
  71. three/src/nodes/core/StructTypeNode.d.ts +1 -1
  72. three/src/nodes/core/VaryingNode.d.ts +6 -0
  73. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +3 -14
  74. three/src/nodes/lighting/ShadowFilterNode.d.ts +28 -0
  75. three/src/nodes/lighting/ShadowNode.d.ts +26 -24
  76. three/src/nodes/math/ConditionalNode.d.ts +4 -4
  77. three/src/nodes/math/MathNode.d.ts +20 -12
  78. three/src/nodes/math/OperatorNode.d.ts +65 -25
  79. three/src/nodes/tsl/TSLBase.d.ts +1 -0
  80. three/src/nodes/tsl/TSLCore.d.ts +34 -26
  81. three/src/nodes/utils/DebugNode.d.ts +21 -0
  82. three/src/nodes/utils/ReflectorNode.d.ts +1 -1
  83. three/src/nodes/utils/SpriteSheetUVNode.d.ts +2 -2
  84. three/src/renderers/common/Animation.d.ts +4 -4
  85. three/src/renderers/common/Attributes.d.ts +1 -1
  86. three/src/renderers/common/Color4.d.ts +1 -1
  87. three/src/renderers/common/CubeRenderTarget.d.ts +6 -0
  88. three/src/renderers/common/RenderList.d.ts +2 -2
  89. three/src/renderers/common/RenderObject.d.ts +1 -1
  90. three/src/renderers/common/RenderObjects.d.ts +2 -2
  91. three/src/renderers/common/Renderer.d.ts +55 -27
  92. three/src/renderers/common/Textures.d.ts +0 -7
  93. three/src/renderers/common/TimestampQueryPool.d.ts +1 -0
  94. three/src/renderers/common/XRManager.d.ts +79 -4
  95. three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -3
  96. three/src/renderers/webgpu/WebGPUBackend.d.ts +1 -0
  97. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
  98. three/src/textures/CanvasTexture.d.ts +1 -1
  99. three/src/textures/DepthArrayTexture.d.ts +14 -0
  100. three/src/textures/Texture.d.ts +8 -1
  101. three/src/textures/VideoFrameTexture.d.ts +1 -1
  102. three/examples/jsm/geometries/ParametricGeometries.d.ts +0 -32
@@ -31,7 +31,7 @@ export class CanvasTexture extends Texture {
31
31
  * @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
32
32
  */
33
33
  constructor(
34
- canvas: TexImageSource | OffscreenCanvas,
34
+ canvas?: TexImageSource | OffscreenCanvas,
35
35
  mapping?: Mapping,
36
36
  wrapS?: Wrapping,
37
37
  wrapT?: Wrapping,
@@ -0,0 +1,14 @@
1
+ import { DepthTexture } from "./DepthTexture.js";
2
+
3
+ declare class DepthArrayTexture extends DepthTexture {
4
+ readonly isDepthArrayTexture: true;
5
+ layerUpdates: Set<number>;
6
+
7
+ constructor(width?: number, height?: number, depth?: number);
8
+
9
+ addLayerUpdate(layerIndex: number): void;
10
+
11
+ clearLayerUpdates(): void;
12
+ }
13
+
14
+ export { DepthArrayTexture };
@@ -377,6 +377,13 @@ export class Texture extends EventDispatcher<{ dispose: {} }> {
377
377
  */
378
378
  isRenderTargetTexture: boolean;
379
379
 
380
+ /**
381
+ * Indicates if a texture should be handled like a texture array.
382
+ *
383
+ * @default false
384
+ */
385
+ isTextureArray: boolean;
386
+
380
387
  /**
381
388
  * An object that can be used to store custom data about the texture.
382
389
  * @remarks It should not hold references to functions as these will not be cloned.
@@ -432,7 +439,7 @@ export class Texture extends EventDispatcher<{ dispose: {} }> {
432
439
  /**
433
440
  * A callback function, called when the texture is updated _(e.g., when needsUpdate has been set to true and then the texture is used)_.
434
441
  */
435
- onUpdate: () => void;
442
+ onUpdate: ((texture: Texture) => void) | null;
436
443
 
437
444
  /**
438
445
  * Transform the **UV** based on the value of this texture's
@@ -21,7 +21,7 @@ declare class VideoFrameTexture extends VideoTexture {
21
21
  );
22
22
 
23
23
  // FIXME Replace with VideoFrame when we no longer need to support TypeScript 5.0
24
- setFrame(frane: unknown): void;
24
+ setFrame(frame: unknown): void;
25
25
  }
26
26
 
27
27
  export { VideoFrameTexture };
@@ -1,32 +0,0 @@
1
- import { Curve, Vector3 } from "three";
2
-
3
- import { ParametricGeometry } from "./ParametricGeometry.js";
4
-
5
- export namespace ParametricGeometries {
6
- function klein(v: number, u: number, target: Vector3): Vector3;
7
- function plane(width: number, height: number): (u: number, v: number, target: Vector3) => Vector3;
8
- function mobius(u: number, t: number, target: Vector3): Vector3;
9
- function mobius3d(u: number, t: number, target: Vector3): Vector3;
10
-
11
- class TubeGeometry extends ParametricGeometry {
12
- constructor(
13
- path: Curve<Vector3>,
14
- segments?: number,
15
- radius?: number,
16
- segmentsRadius?: number,
17
- closed?: boolean,
18
- );
19
- }
20
-
21
- class TorusKnotGeometry extends TubeGeometry {
22
- constructor(radius?: number, tube?: number, segmentsT?: number, segmentsR?: number, p?: number, q?: number);
23
- }
24
-
25
- class SphereGeometry extends ParametricGeometry {
26
- constructor(size: number, u: number, v: number);
27
- }
28
-
29
- class PlaneGeometry extends ParametricGeometry {
30
- constructor(width: number, depth: number, segmentsWidth: number, segmentsDepth: number);
31
- }
32
- }