@types/three 0.143.2 → 0.146.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 (168) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/animation/CCDIKSolver.d.ts +2 -1
  3. three/examples/jsm/animation/MMDPhysics.d.ts +6 -1
  4. three/examples/jsm/controls/FirstPersonControls.d.ts +4 -1
  5. three/examples/jsm/csm/CSM.d.ts +1 -1
  6. three/examples/jsm/csm/CSMHelper.d.ts +1 -0
  7. three/examples/jsm/environments/RoomEnvironment.d.ts +1 -0
  8. three/examples/jsm/helpers/OctreeHelper.d.ts +3 -0
  9. three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
  10. three/examples/jsm/helpers/VertexTangentsHelper.d.ts +2 -0
  11. three/examples/jsm/interactive/SelectionHelper.d.ts +1 -3
  12. three/examples/jsm/libs/stats.module.d.ts +1 -1
  13. three/examples/jsm/loaders/PCDLoader.d.ts +1 -1
  14. three/examples/jsm/loaders/RGBELoader.d.ts +0 -1
  15. three/examples/jsm/loaders/TIFFLoader.d.ts +16 -0
  16. three/examples/jsm/loaders/USDZLoader.d.ts +18 -0
  17. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
  18. three/examples/jsm/math/ColorConverter.d.ts +0 -2
  19. three/examples/jsm/misc/GPUComputationRenderer.d.ts +1 -0
  20. three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -2
  21. three/examples/jsm/misc/Volume.d.ts +1 -1
  22. three/examples/jsm/modifiers/CurveModifier.d.ts +6 -6
  23. three/examples/jsm/nodes/Nodes.d.ts +21 -3
  24. three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
  25. three/examples/jsm/nodes/accessors/NormalNode.d.ts +1 -6
  26. three/examples/jsm/nodes/accessors/PositionNode.d.ts +2 -0
  27. three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
  28. three/examples/jsm/nodes/core/CodeNode.d.ts +2 -2
  29. three/examples/jsm/nodes/core/FunctionCallNode.d.ts +5 -5
  30. three/examples/jsm/nodes/core/FunctionNode.d.ts +6 -4
  31. three/examples/jsm/nodes/core/Node.d.ts +1 -0
  32. three/examples/jsm/nodes/core/NodeBuilder.d.ts +4 -3
  33. three/examples/jsm/nodes/core/NodeUtils.d.ts +1 -0
  34. three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
  35. three/examples/jsm/nodes/core/constants.d.ts +13 -13
  36. three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
  37. three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
  38. three/examples/jsm/nodes/materials/Materials.d.ts +8 -6
  39. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
  40. three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
  41. three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
  42. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
  43. three/examples/jsm/nodes/math/MathNode.d.ts +1 -2
  44. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +2 -2
  45. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +10 -8
  46. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +49 -9
  47. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +30 -0
  48. three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
  49. three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
  50. three/examples/jsm/nodes/utils/TimerNode.d.ts +6 -1
  51. three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
  52. three/examples/jsm/objects/ReflectorForSSRPass.d.ts +4 -4
  53. three/examples/jsm/postprocessing/BloomPass.d.ts +1 -1
  54. three/examples/jsm/postprocessing/BokehPass.d.ts +0 -2
  55. three/examples/jsm/postprocessing/EffectComposer.d.ts +1 -0
  56. three/examples/jsm/postprocessing/Pass.d.ts +2 -0
  57. three/examples/jsm/postprocessing/SSRPass.d.ts +3 -3
  58. three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +15 -3
  59. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +6 -6
  60. three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +1 -1
  61. three/examples/jsm/shaders/AfterimageShader.d.ts +4 -4
  62. three/examples/jsm/shaders/BleachBypassShader.d.ts +3 -3
  63. three/examples/jsm/shaders/BlendShader.d.ts +5 -5
  64. three/examples/jsm/shaders/BokehShader.d.ts +9 -9
  65. three/examples/jsm/shaders/BokehShader2.d.ts +26 -26
  66. three/examples/jsm/shaders/BrightnessContrastShader.d.ts +4 -4
  67. three/examples/jsm/shaders/ColorCorrectionShader.d.ts +5 -5
  68. three/examples/jsm/shaders/ColorifyShader.d.ts +3 -3
  69. three/examples/jsm/shaders/ConvolutionShader.d.ts +4 -4
  70. three/examples/jsm/shaders/CopyShader.d.ts +3 -3
  71. three/examples/jsm/shaders/DOFMipMapShader.d.ts +5 -5
  72. three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +9 -9
  73. three/examples/jsm/shaders/DigitalGlitch.d.ts +12 -12
  74. three/examples/jsm/shaders/DotScreenShader.d.ts +6 -6
  75. three/examples/jsm/shaders/FXAAShader.d.ts +3 -3
  76. three/examples/jsm/shaders/FilmShader.d.ts +7 -7
  77. three/examples/jsm/shaders/FocusShader.d.ts +6 -6
  78. three/examples/jsm/shaders/FreiChenShader.d.ts +3 -3
  79. three/examples/jsm/shaders/GammaCorrectionShader.d.ts +2 -2
  80. three/examples/jsm/shaders/GodRaysShader.d.ts +12 -12
  81. three/examples/jsm/shaders/HalftoneShader.d.ts +14 -14
  82. three/examples/jsm/shaders/HorizontalBlurShader.d.ts +3 -3
  83. three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +4 -4
  84. three/examples/jsm/shaders/HueSaturationShader.d.ts +4 -4
  85. three/examples/jsm/shaders/KaleidoShader.d.ts +4 -4
  86. three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +6 -6
  87. three/examples/jsm/shaders/LuminosityShader.d.ts +2 -2
  88. three/examples/jsm/shaders/MirrorShader.d.ts +3 -3
  89. three/examples/jsm/shaders/NormalMapShader.d.ts +5 -5
  90. three/examples/jsm/shaders/PixelShader.d.ts +4 -4
  91. three/examples/jsm/shaders/RGBShiftShader.d.ts +4 -4
  92. three/examples/jsm/shaders/SAOShader.d.ts +15 -15
  93. three/examples/jsm/shaders/SMAAShader.d.ts +10 -10
  94. three/examples/jsm/shaders/SSAOShader.d.ts +19 -19
  95. three/examples/jsm/shaders/SepiaShader.d.ts +3 -3
  96. three/examples/jsm/shaders/SobelOperatorShader.d.ts +3 -3
  97. three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +30 -30
  98. three/examples/jsm/shaders/TechnicolorShader.d.ts +2 -2
  99. three/examples/jsm/shaders/ToneMapShader.d.ts +7 -7
  100. three/examples/jsm/shaders/ToonShader.d.ts +26 -26
  101. three/examples/jsm/shaders/TriangleBlurShader.d.ts +3 -3
  102. three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +3 -3
  103. three/examples/jsm/shaders/VelocityShader.d.ts +13 -0
  104. three/examples/jsm/shaders/VerticalBlurShader.d.ts +3 -3
  105. three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +4 -4
  106. three/examples/jsm/shaders/VignetteShader.d.ts +4 -4
  107. three/examples/jsm/shaders/VolumeShader.d.ts +7 -7
  108. three/examples/jsm/shaders/WaterRefractionShader.d.ts +6 -6
  109. three/examples/jsm/utils/BufferGeometryUtils.d.ts +1 -0
  110. three/examples/jsm/utils/CameraUtils.d.ts +1 -1
  111. three/examples/jsm/utils/SceneUtils.d.ts +9 -1
  112. three/index.d.ts +1 -1
  113. three/package.json +3 -3
  114. three/src/Three.d.ts +3 -1
  115. three/src/constants.d.ts +0 -5
  116. three/src/core/BufferAttribute.d.ts +0 -4
  117. three/src/core/BufferGeometry.d.ts +0 -1
  118. three/src/core/Object3D.d.ts +11 -2
  119. three/src/extras/core/ShapePath.d.ts +1 -1
  120. three/src/geometries/BoxGeometry.d.ts +0 -2
  121. three/src/geometries/CapsuleGeometry.d.ts +0 -2
  122. three/src/geometries/CircleGeometry.d.ts +0 -2
  123. three/src/geometries/ConeGeometry.d.ts +0 -2
  124. three/src/geometries/CylinderGeometry.d.ts +0 -2
  125. three/src/geometries/DodecahedronGeometry.d.ts +0 -2
  126. three/src/geometries/ExtrudeGeometry.d.ts +0 -2
  127. three/src/geometries/IcosahedronGeometry.d.ts +0 -2
  128. three/src/geometries/LatheGeometry.d.ts +0 -2
  129. three/src/geometries/OctahedronGeometry.d.ts +0 -2
  130. three/src/geometries/PlaneGeometry.d.ts +0 -2
  131. three/src/geometries/PolyhedronGeometry.d.ts +0 -2
  132. three/src/geometries/RingGeometry.d.ts +0 -2
  133. three/src/geometries/ShapeGeometry.d.ts +0 -2
  134. three/src/geometries/SphereGeometry.d.ts +0 -2
  135. three/src/geometries/TetrahedronGeometry.d.ts +0 -2
  136. three/src/geometries/TorusGeometry.d.ts +0 -2
  137. three/src/geometries/TorusKnotGeometry.d.ts +0 -2
  138. three/src/geometries/TubeGeometry.d.ts +0 -2
  139. three/src/helpers/ArrowHelper.d.ts +4 -0
  140. three/src/helpers/Box3Helper.d.ts +2 -0
  141. three/src/helpers/BoxHelper.d.ts +2 -0
  142. three/src/helpers/GridHelper.d.ts +1 -4
  143. three/src/helpers/PlaneHelper.d.ts +2 -0
  144. three/src/helpers/PolarGridHelper.d.ts +2 -0
  145. three/src/helpers/SkeletonHelper.d.ts +2 -0
  146. three/src/loaders/DataTextureLoader.d.ts +1 -1
  147. three/src/materials/LineBasicMaterial.d.ts +7 -0
  148. three/src/materials/MeshLambertMaterial.d.ts +52 -1
  149. three/src/materials/MeshPhysicalMaterial.d.ts +5 -0
  150. three/src/materials/ShaderMaterial.d.ts +1 -1
  151. three/src/math/ColorManagement.d.ts +11 -1
  152. three/src/math/Euler.d.ts +13 -11
  153. three/src/math/Quaternion.d.ts +10 -6
  154. three/src/renderers/WebGL3DRenderTarget.d.ts +1 -1
  155. three/src/renderers/WebGLArrayRenderTarget.d.ts +1 -1
  156. three/src/renderers/WebGLCubeRenderTarget.d.ts +1 -1
  157. three/src/renderers/WebGLMultipleRenderTargets.d.ts +1 -1
  158. three/src/renderers/WebGLRenderTarget.d.ts +1 -1
  159. three/src/renderers/WebGLRenderer.d.ts +1 -5
  160. three/src/renderers/shaders/UniformsLib.d.ts +3 -2
  161. three/src/renderers/shaders/UniformsUtils.d.ts +0 -1
  162. three/src/renderers/webgl/WebGLCapabilities.d.ts +1 -0
  163. three/src/scenes/Scene.d.ts +2 -5
  164. three/src/textures/CanvasTexture.d.ts +2 -2
  165. three/src/textures/CompressedArrayTexture.d.ts +17 -0
  166. three/src/textures/Texture.d.ts +5 -1
  167. three/examples/jsm/nodes/core/NodeVary.d.ts +0 -6
  168. three/examples/jsm/renderers/webgl/nodes/WebGLPhysicalContextNode.d.ts +0 -13
@@ -34,5 +34,3 @@ export class BoxGeometry extends BufferGeometry {
34
34
 
35
35
  static fromJSON(data: any): BoxGeometry;
36
36
  }
37
-
38
- export { BoxGeometry as BoxBufferGeometry };
@@ -23,5 +23,3 @@ export class CapsuleGeometry extends BufferGeometry {
23
23
 
24
24
  static fromJSON(data: any): CapsuleGeometry;
25
25
  }
26
-
27
- export { CapsuleGeometry as CapsuleBufferGeometry };
@@ -23,5 +23,3 @@ export class CircleGeometry extends BufferGeometry {
23
23
 
24
24
  static fromJSON(data: any): CircleGeometry;
25
25
  }
26
-
27
- export { CircleGeometry as CircleBufferGeometry };
@@ -27,5 +27,3 @@ export class ConeGeometry extends CylinderGeometry {
27
27
 
28
28
  static fromJSON(data: any): ConeGeometry;
29
29
  }
30
-
31
- export { ConeGeometry as ConeBufferGeometry };
@@ -40,5 +40,3 @@ export class CylinderGeometry extends BufferGeometry {
40
40
 
41
41
  static fromJSON(data: any): CylinderGeometry;
42
42
  }
43
-
44
- export { CylinderGeometry as CylinderBufferGeometry };
@@ -14,5 +14,3 @@ export class DodecahedronGeometry extends PolyhedronGeometry {
14
14
 
15
15
  static fromJSON(data: any): DodecahedronGeometry;
16
16
  }
17
-
18
- export { DodecahedronGeometry as DodecahedronBufferGeometry };
@@ -69,5 +69,3 @@ export class ExtrudeGeometry extends BufferGeometry {
69
69
 
70
70
  static fromJSON(data: any): ExtrudeGeometry;
71
71
  }
72
-
73
- export { ExtrudeGeometry as ExtrudeBufferGeometry };
@@ -14,5 +14,3 @@ export class IcosahedronGeometry extends PolyhedronGeometry {
14
14
 
15
15
  static fromJSON(data: any): IcosahedronGeometry;
16
16
  }
17
-
18
- export { IcosahedronGeometry as IcosahedronBufferGeometry };
@@ -24,5 +24,3 @@ export class LatheGeometry extends BufferGeometry {
24
24
 
25
25
  static fromJSON(data: any): LatheGeometry;
26
26
  }
27
-
28
- export { LatheGeometry as LatheBufferGeometry };
@@ -14,5 +14,3 @@ export class OctahedronGeometry extends PolyhedronGeometry {
14
14
 
15
15
  static fromJSON(data: any): OctahedronGeometry;
16
16
  }
17
-
18
- export { OctahedronGeometry as OctahedronBufferGeometry };
@@ -23,5 +23,3 @@ export class PlaneGeometry extends BufferGeometry {
23
23
 
24
24
  static fromJSON(data: any): PlaneGeometry;
25
25
  }
26
-
27
- export { PlaneGeometry as PlaneBufferGeometry };
@@ -23,5 +23,3 @@ export class PolyhedronGeometry extends BufferGeometry {
23
23
 
24
24
  static fromJSON(data: any): PolyhedronGeometry;
25
25
  }
26
-
27
- export { PolyhedronGeometry as PolyhedronBufferGeometry };
@@ -34,5 +34,3 @@ export class RingGeometry extends BufferGeometry {
34
34
 
35
35
  static fromJSON(data: any): RingGeometry;
36
36
  }
37
-
38
- export { RingGeometry as RingBufferGeometry };
@@ -11,5 +11,3 @@ export class ShapeGeometry extends BufferGeometry {
11
11
 
12
12
  static fromJSON(data: any): ShapeGeometry;
13
13
  }
14
-
15
- export { ShapeGeometry as ShapeBufferGeometry };
@@ -37,5 +37,3 @@ export class SphereGeometry extends BufferGeometry {
37
37
 
38
38
  static fromJSON(data: any): SphereGeometry;
39
39
  }
40
-
41
- export { SphereGeometry as SphereBufferGeometry };
@@ -14,5 +14,3 @@ export class TetrahedronGeometry extends PolyhedronGeometry {
14
14
 
15
15
  static fromJSON(data: any): TetrahedronGeometry;
16
16
  }
17
-
18
- export { TetrahedronGeometry as TetrahedronBufferGeometry };
@@ -25,5 +25,3 @@ export class TorusGeometry extends BufferGeometry {
25
25
 
26
26
  static fromJSON(data: any): TorusGeometry;
27
27
  }
28
-
29
- export { TorusGeometry as TorusBufferGeometry };
@@ -34,5 +34,3 @@ export class TorusKnotGeometry extends BufferGeometry {
34
34
 
35
35
  static fromJSON(data: any): TorusKnotGeometry;
36
36
  }
37
-
38
- export { TorusKnotGeometry as TorusKnotBufferGeometry };
@@ -36,5 +36,3 @@ export class TubeGeometry extends BufferGeometry {
36
36
 
37
37
  static fromJSON(data: any): TubeGeometry;
38
38
  }
39
-
40
- export { TubeGeometry as TubeBufferGeometry };
@@ -55,4 +55,8 @@ export class ArrowHelper extends Object3D {
55
55
  * @param color The desired color.
56
56
  */
57
57
  setColor(color: ColorRepresentation): void;
58
+
59
+ copy(source: this): this;
60
+
61
+ dispose(): void;
58
62
  }
@@ -15,4 +15,6 @@ export class Box3Helper extends LineSegments {
15
15
  type: string;
16
16
 
17
17
  box: Box3;
18
+
19
+ dispose(): void;
18
20
  }
@@ -17,4 +17,6 @@ export class BoxHelper extends LineSegments {
17
17
  update(object?: Object3D): void;
18
18
 
19
19
  setFromObject(object: Object3D): this;
20
+
21
+ dispose(): void;
20
22
  }
@@ -15,8 +15,5 @@ export class GridHelper extends LineSegments {
15
15
  */
16
16
  type: string;
17
17
 
18
- /**
19
- * @deprecated Colors should be specified in the constructor.
20
- */
21
- setColors(color1?: ColorRepresentation, color2?: ColorRepresentation): void;
18
+ dispose(): void;
22
19
  }
@@ -22,4 +22,6 @@ export class PlaneHelper extends LineSegments {
22
22
  size: number;
23
23
 
24
24
  updateMatrixWorld(force?: boolean): void;
25
+
26
+ dispose(): void;
25
27
  }
@@ -23,4 +23,6 @@ export class PolarGridHelper extends LineSegments {
23
23
  * @default 'PolarGridHelper'
24
24
  */
25
25
  type: string;
26
+
27
+ dispose(): void;
26
28
  }
@@ -25,4 +25,6 @@ export class SkeletonHelper extends LineSegments {
25
25
 
26
26
  getBoneList(object: Object3D): Bone[];
27
27
  update(): void;
28
+
29
+ dispose(): void;
28
30
  }
@@ -7,7 +7,7 @@ export class DataTextureLoader extends Loader {
7
7
 
8
8
  load(
9
9
  url: string,
10
- onLoad: (dataTexture: DataTexture, texData: object) => void,
10
+ onLoad?: (dataTexture: DataTexture, texData: object) => void,
11
11
  onProgress?: (event: ProgressEvent) => void,
12
12
  onError?: (event: ErrorEvent) => void,
13
13
  ): DataTexture;
@@ -4,6 +4,7 @@ import { MaterialParameters, Material } from './Material';
4
4
 
5
5
  export interface LineBasicMaterialParameters extends MaterialParameters {
6
6
  color?: ColorRepresentation | undefined;
7
+ fog?: boolean | undefined;
7
8
  linewidth?: number | undefined;
8
9
  linecap?: string | undefined;
9
10
  linejoin?: string | undefined;
@@ -22,6 +23,12 @@ export class LineBasicMaterial extends Material {
22
23
  */
23
24
  color: Color;
24
25
 
26
+ /**
27
+ * Whether the material is affected by fog. Default is true.
28
+ * @default true
29
+ */
30
+ fog: boolean;
31
+
25
32
  /**
26
33
  * @default 1
27
34
  */
@@ -1,17 +1,26 @@
1
1
  import { Color } from './../math/Color';
2
2
  import { Texture } from './../textures/Texture';
3
3
  import { MaterialParameters, Material } from './Material';
4
- import { Combine } from '../constants';
4
+ import { Combine, NormalMapTypes } from '../constants';
5
5
  import { ColorRepresentation } from '../utils';
6
+ import { Vector2 } from '../Three';
6
7
 
7
8
  export interface MeshLambertMaterialParameters extends MaterialParameters {
9
+ bumpMap?: Texture | undefined;
10
+ bumpScale?: number | undefined;
8
11
  color?: ColorRepresentation | undefined;
12
+ displacementMap?: Texture | undefined;
13
+ displacementScale?: number | undefined;
14
+ displacementBias?: number | undefined;
9
15
  emissive?: ColorRepresentation | undefined;
10
16
  emissiveIntensity?: number | undefined;
11
17
  emissiveMap?: Texture | null | undefined;
18
+ flatShading?: boolean | undefined;
12
19
  map?: Texture | null | undefined;
13
20
  lightMap?: Texture | null | undefined;
14
21
  lightMapIntensity?: number | undefined;
22
+ normalMap?: Texture | undefined;
23
+ normalScale?: Vector2 | undefined;
15
24
  aoMap?: Texture | null | undefined;
16
25
  aoMapIntensity?: number | undefined;
17
26
  specularMap?: Texture | null | undefined;
@@ -40,6 +49,31 @@ export class MeshLambertMaterial extends Material {
40
49
  */
41
50
  color: Color;
42
51
 
52
+ /**
53
+ * @default null
54
+ */
55
+ bumpMap: Texture | null;
56
+
57
+ /**
58
+ * @default 1
59
+ */
60
+ bumpScale: number;
61
+
62
+ /**
63
+ * @default null
64
+ */
65
+ displacementMap: Texture | null;
66
+
67
+ /**
68
+ * @default 1
69
+ */
70
+ displacementScale: number;
71
+
72
+ /**
73
+ * @default 0
74
+ */
75
+ displacementBias: number;
76
+
43
77
  /**
44
78
  * @default new THREE.Color( 0x000000 )
45
79
  */
@@ -55,6 +89,11 @@ export class MeshLambertMaterial extends Material {
55
89
  */
56
90
  emissiveMap: Texture | null;
57
91
 
92
+ /**
93
+ * @default false
94
+ */
95
+ flatShading: boolean;
96
+
58
97
  /**
59
98
  * @default null
60
99
  */
@@ -70,6 +109,18 @@ export class MeshLambertMaterial extends Material {
70
109
  */
71
110
  lightMapIntensity: number;
72
111
 
112
+ /**
113
+ * @default null
114
+ */
115
+ normalMap: Texture | null;
116
+
117
+ normalMapType: NormalMapTypes;
118
+
119
+ /**
120
+ * @default new THREE.Vector2( 1, 1 )
121
+ */
122
+ normalScale: Vector2;
123
+
73
124
  /**
74
125
  * @default null
75
126
  */
@@ -167,6 +167,11 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial {
167
167
  */
168
168
  iridescenceIOR: number;
169
169
 
170
+ /**
171
+ * @default 0
172
+ */
173
+ iridescence: number;
174
+
170
175
  /**
171
176
  * @default [100, 400]
172
177
  */
@@ -11,7 +11,7 @@ export interface ShaderMaterialParameters extends MaterialParameters {
11
11
  wireframeLinewidth?: number | undefined;
12
12
  lights?: boolean | undefined;
13
13
  clipping?: boolean | undefined;
14
-
14
+ fog?: boolean | undefined;
15
15
  extensions?:
16
16
  | {
17
17
  derivatives?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import { LinearSRGBColorSpace, SRGBColorSpace } from '../constants';
1
+ import { ColorSpace, LinearSRGBColorSpace, SRGBColorSpace } from '../constants';
2
2
  import { Color } from './Color';
3
3
 
4
4
  export function SRGBToLinear(c: number): number;
@@ -6,6 +6,16 @@ export function SRGBToLinear(c: number): number;
6
6
  export function LinearToSRGB(c: number): number;
7
7
 
8
8
  export namespace ColorManagement {
9
+ /**
10
+ * @default true
11
+ */
12
+ let legacyMode: boolean;
13
+
14
+ /**
15
+ * @default LinearSRGBColorSpace
16
+ */
17
+ let workingColorSpace: ColorSpace;
18
+
9
19
  function convert(
10
20
  color: Color,
11
21
  sourceColorSpace: SRGBColorSpace | LinearSRGBColorSpace,
three/src/math/Euler.d.ts CHANGED
@@ -2,8 +2,10 @@ import { Matrix4 } from './Matrix4';
2
2
  import { Quaternion } from './Quaternion';
3
3
  import { Vector3 } from './Vector3';
4
4
 
5
+ export type EulerOrder = 'XYZ' | 'YXZ' | 'ZXY' | 'ZYX' | 'YZX' | 'XZY';
6
+
5
7
  export class Euler {
6
- constructor(x?: number, y?: number, z?: number, order?: string);
8
+ constructor(x?: number, y?: number, z?: number, order?: EulerOrder);
7
9
 
8
10
  /**
9
11
  * @default 0
@@ -23,25 +25,25 @@ export class Euler {
23
25
  /**
24
26
  * @default THREE.Euler.DefaultOrder
25
27
  */
26
- order: string;
28
+ order: EulerOrder;
27
29
  readonly isEuler: true;
28
30
 
29
31
  _onChangeCallback: () => void;
30
32
 
31
- set(x: number, y: number, z: number, order?: string): Euler;
33
+ set(x: number, y: number, z: number, order?: EulerOrder): Euler;
32
34
  clone(): this;
33
35
  copy(euler: Euler): this;
34
- setFromRotationMatrix(m: Matrix4, order?: string, update?: boolean): Euler;
35
- setFromQuaternion(q: Quaternion, order?: string, update?: boolean): Euler;
36
- setFromVector3(v: Vector3, order?: string): Euler;
37
- reorder(newOrder: string): Euler;
36
+ setFromRotationMatrix(m: Matrix4, order?: EulerOrder, update?: boolean): Euler;
37
+ setFromQuaternion(q: Quaternion, order?: EulerOrder, update?: boolean): Euler;
38
+ setFromVector3(v: Vector3, order?: EulerOrder): Euler;
39
+ reorder(newOrder: EulerOrder): Euler;
38
40
  equals(euler: Euler): boolean;
39
- fromArray(xyzo: any[]): Euler;
40
- toArray(array?: number[], offset?: number): number[];
41
+ fromArray(xyzo: [number, number, number, EulerOrder?, ...any[]]): Euler;
42
+ toArray(array?: Array<number | string | undefined>, offset?: number): Array<number | string | undefined>;
41
43
  _onChange(callback: () => void): this;
42
44
 
43
- static RotationOrders: string[];
44
- static DefaultOrder: string;
45
+ static RotationOrders: EulerOrder[];
46
+ static DefaultOrder: 'XYZ';
45
47
 
46
48
  [Symbol.iterator](): Generator<string | number, void>;
47
49
  }
@@ -1,6 +1,8 @@
1
1
  import { Euler } from './Euler';
2
2
  import { Vector3 } from './Vector3';
3
3
  import { Matrix4 } from './Matrix4';
4
+ import { BufferAttribute } from '../core/BufferAttribute';
5
+ import { InterleavedBufferAttribute } from '../core/InterleavedBufferAttribute';
4
6
 
5
7
  /**
6
8
  * Implementation of a quaternion. This is used for rotating things without incurring in the dreaded gimbal lock issue, amongst other advantages.
@@ -136,6 +138,13 @@ export class Quaternion {
136
138
  */
137
139
  toArray(array: ArrayLike<number>, offset?: number): ArrayLike<number>;
138
140
 
141
+ /**
142
+ * Sets x, y, z, w properties of this quaternion from the attribute.
143
+ * @param attribute the source attribute.
144
+ * @param index index in the attribute.
145
+ */
146
+ fromBufferAttribute(attribute: BufferAttribute | InterleavedBufferAttribute, index: number): Quaternion;
147
+
139
148
  _onChange(callback: () => void): Quaternion;
140
149
  _onChangeCallback: () => void;
141
150
 
@@ -147,7 +156,7 @@ export class Quaternion {
147
156
  src1: number[],
148
157
  stcOffset1: number,
149
158
  t: number,
150
- ): Quaternion;
159
+ ): void;
151
160
 
152
161
  static multiplyQuaternionsFlat(
153
162
  dst: number[],
@@ -168,11 +177,6 @@ export class Quaternion {
168
177
  */
169
178
  multiplyVector3(v: any): any;
170
179
 
171
- /**
172
- * @deprecated Use {@link Quaternion#invert .invert()} instead.
173
- */
174
- inverse(): Quaternion;
175
-
176
180
  random(): Quaternion;
177
181
 
178
182
  [Symbol.iterator](): Generator<number, void>;
@@ -12,7 +12,7 @@ export class WebGL3DRenderTarget extends WebGLRenderTarget {
12
12
  * @param height the height of the render target, in pixels.
13
13
  * @param depth the depth of the render target.
14
14
  */
15
- constructor(width: number, height: number, depth: number);
15
+ constructor(width?: number, height?: number, depth?: number);
16
16
 
17
17
  /**
18
18
  * The depth of the render target.
@@ -12,7 +12,7 @@ export class WebGLArrayRenderTarget extends WebGLRenderTarget {
12
12
  * @param height the height of the render target, in pixels.
13
13
  * @param depth the depth/layer count of the render target.
14
14
  */
15
- constructor(width: number, height: number, depth: number);
15
+ constructor(width?: number, height?: number, depth?: number);
16
16
 
17
17
  /**
18
18
  * The depth of the render target.
@@ -4,7 +4,7 @@ import { Texture } from './../textures/Texture';
4
4
  import { CubeTexture } from './../textures/CubeTexture';
5
5
 
6
6
  export class WebGLCubeRenderTarget extends WebGLRenderTarget {
7
- constructor(size: number, options?: WebGLRenderTargetOptions);
7
+ constructor(size?: number, options?: WebGLRenderTargetOptions);
8
8
 
9
9
  texture: CubeTexture;
10
10
 
@@ -18,7 +18,7 @@ export class WebGLMultipleRenderTargets extends EventDispatcher {
18
18
  * @param options object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans.
19
19
  * For an explanation of the texture parameters see {@link Texture}.
20
20
  */
21
- constructor(width: number, height: number, count: number, options?: WebGLRenderTargetOptions);
21
+ constructor(width?: number, height?: number, count?: number, options?: WebGLRenderTargetOptions);
22
22
 
23
23
  setSize(width: number, height: number, depth?: number): this;
24
24
  copy(source: WebGLMultipleRenderTargets): this;
@@ -26,7 +26,7 @@ export interface WebGLRenderTargetOptions {
26
26
  }
27
27
 
28
28
  export class WebGLRenderTarget extends EventDispatcher {
29
- constructor(width: number, height: number, options?: WebGLRenderTargetOptions);
29
+ constructor(width?: number, height?: number, options?: WebGLRenderTargetOptions);
30
30
 
31
31
  width: number;
32
32
  height: number;
@@ -17,7 +17,7 @@ import { Material } from './../materials/Material';
17
17
  import { ToneMapping, ShadowMapType, CullFace, TextureEncoding } from '../constants';
18
18
  import { WebXRManager } from '../renderers/webxr/WebXRManager';
19
19
  import { BufferGeometry } from './../core/BufferGeometry';
20
- import { Texture } from '../textures/Texture';
20
+ import { OffscreenCanvas, Texture } from '../textures/Texture';
21
21
  import { Data3DTexture } from '../textures/Data3DTexture';
22
22
  import { Vector3 } from '../math/Vector3';
23
23
  import { Box3 } from '../math/Box3';
@@ -31,10 +31,6 @@ export interface Renderer {
31
31
  setSize(width: number, height: number, updateStyle?: boolean): void;
32
32
  }
33
33
 
34
- /** This is only available in worker JS contexts, not the DOM. */
35
- // tslint:disable-next-line:no-empty-interface
36
- export interface OffscreenCanvas extends EventTarget {}
37
-
38
34
  export interface WebGLRendererParameters {
39
35
  /**
40
36
  * A Canvas where the renderer draws its output.
@@ -19,8 +19,9 @@ export let UniformsLib: {
19
19
  envMap: IUniform;
20
20
  flipEnvMap: IUniform;
21
21
  reflectivity: IUniform;
22
- refractionRatio: IUniform;
23
- maxMipLevel: IUniform;
22
+ ior: IUniform;
23
+ refractRatio: IUniform;
24
+ backgroundBlurriness: IUniform;
24
25
  };
25
26
  aomap: {
26
27
  aoMap: IUniform;
@@ -1,4 +1,3 @@
1
- import { Uniform } from '../../core/Uniform';
2
1
  import { UniformsGroup } from '../../core/UniformsGroup';
3
2
 
4
3
  export function cloneUniforms(uniforms_src: any): any;
@@ -20,6 +20,7 @@ export class WebGLCapabilities {
20
20
  vertexTextures: boolean;
21
21
  floatFragmentTextures: boolean;
22
22
  floatVertexTextures: boolean;
23
+ maxSamples: number;
23
24
 
24
25
  getMaxAnisotropy(): number;
25
26
  getMaxPrecision(precision: string): string;
@@ -22,17 +22,14 @@ export class Scene extends Object3D {
22
22
  */
23
23
  fog: FogBase | null;
24
24
 
25
+ backgroundBlurriness: number;
26
+
25
27
  /**
26
28
  * If not null, it will force everything in the scene to be rendered with that material. Default is null.
27
29
  * @default null
28
30
  */
29
31
  overrideMaterial: Material | null;
30
32
 
31
- /**
32
- * @default true
33
- */
34
- autoUpdate: boolean;
35
-
36
33
  /**
37
34
  * @default null
38
35
  */
@@ -1,4 +1,4 @@
1
- import { Texture } from './Texture';
1
+ import { OffscreenCanvas, Texture } from './Texture';
2
2
  import { Mapping, Wrapping, TextureFilter, PixelFormat, TextureDataType } from '../constants';
3
3
 
4
4
  export class CanvasTexture extends Texture {
@@ -15,7 +15,7 @@ export class CanvasTexture extends Texture {
15
15
  * @param [encoding=THREE.LinearEncoding]
16
16
  */
17
17
  constructor(
18
- canvas: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap,
18
+ canvas: TexImageSource | OffscreenCanvas,
19
19
  mapping?: Mapping,
20
20
  wrapS?: Wrapping,
21
21
  wrapT?: Wrapping,
@@ -0,0 +1,17 @@
1
+ import { CompressedPixelFormat, TextureDataType, Wrapping } from '../constants';
2
+ import { CompressedTexture } from './CompressedTexture.js';
3
+
4
+ export class CompressedArrayTexture extends CompressedTexture {
5
+ isCompressedArrayTexture: true;
6
+
7
+ wrapR: Wrapping;
8
+
9
+ constructor(
10
+ mipmaps: ImageData[],
11
+ width: number,
12
+ height: number,
13
+ depth: number,
14
+ format?: CompressedPixelFormat,
15
+ type?: TextureDataType,
16
+ );
17
+ }
@@ -12,6 +12,10 @@ import {
12
12
  TextureEncoding,
13
13
  } from '../constants';
14
14
 
15
+ /** Shim for OffscreenCanvas. */
16
+ // tslint:disable-next-line:no-empty-interface
17
+ export interface OffscreenCanvas extends EventTarget {}
18
+
15
19
  export class Texture extends EventDispatcher {
16
20
  /**
17
21
  * @param [image]
@@ -26,7 +30,7 @@ export class Texture extends EventDispatcher {
26
30
  * @param [encoding=THREE.LinearEncoding]
27
31
  */
28
32
  constructor(
29
- image?: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement,
33
+ image?: TexImageSource | OffscreenCanvas,
30
34
  mapping?: Mapping,
31
35
  wrapS?: Wrapping,
32
36
  wrapT?: Wrapping,
@@ -1,6 +0,0 @@
1
- export default class NodeVary {
2
- name: string;
3
- type: string;
4
- isNodeVary: boolean;
5
- constructor(name: string, type: string);
6
- }
@@ -1,13 +0,0 @@
1
- import ContextNode from '../../../nodes/core/ContextNode.js';
2
- import Node from '../../../nodes/core/Node';
3
-
4
- export type WebGLPhysicalContextScope =
5
- | typeof WebGLPhysicalContextNode.RADIANCE
6
- | typeof WebGLPhysicalContextNode.IRRADIANCE;
7
-
8
- export default class WebGLPhysicalContextNode extends ContextNode {
9
- static RADIANCE: 'radiance';
10
- static IRRADIANCE: 'irradiance';
11
-
12
- constructor(scope: WebGLPhysicalContextScope, node: Node);
13
- }