@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
@@ -1,4 +1,4 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const SAOShader: {
4
4
  defines: {
@@ -10,20 +10,20 @@ export const SAOShader: {
10
10
  PERSPECTIVE_CAMERA: number;
11
11
  };
12
12
  uniforms: {
13
- tDepth: Uniform;
14
- tDiffuse: Uniform;
15
- tNormal: Uniform;
16
- size: Uniform;
17
- cameraNear: Uniform;
18
- cameraFar: Uniform;
19
- cameraProjectionMatrix: Uniform;
20
- cameraInverseProjectionMatrix: Uniform;
21
- scale: Uniform;
22
- intensity: Uniform;
23
- bias: Uniform;
24
- minResolution: Uniform;
25
- kernelRadius: Uniform;
26
- randomSeed: Uniform;
13
+ tDepth: IUniform;
14
+ tDiffuse: IUniform;
15
+ tNormal: IUniform;
16
+ size: IUniform;
17
+ cameraNear: IUniform;
18
+ cameraFar: IUniform;
19
+ cameraProjectionMatrix: IUniform;
20
+ cameraInverseProjectionMatrix: IUniform;
21
+ scale: IUniform;
22
+ intensity: IUniform;
23
+ bias: IUniform;
24
+ minResolution: IUniform;
25
+ kernelRadius: IUniform;
26
+ randomSeed: IUniform;
27
27
  };
28
28
  vertexShader: string;
29
29
  fragmentShader: string;
@@ -1,12 +1,12 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const SMAAEdgesShader: {
4
4
  defines: {
5
5
  SMAA_THRESHOLD: string;
6
6
  };
7
7
  uniforms: {
8
- tDiffuse: Uniform;
9
- resolution: Uniform;
8
+ tDiffuse: IUniform;
9
+ resolution: IUniform;
10
10
  };
11
11
  vertexShader: string;
12
12
  fragmentShader: string;
@@ -20,10 +20,10 @@ export const SMAAWeightsShader: {
20
20
  SMAA_AREATEX_SUBTEX_SIZE: string;
21
21
  };
22
22
  uniforms: {
23
- tDiffuse: Uniform;
24
- tArea: Uniform;
25
- tSearch: Uniform;
26
- resolution: Uniform;
23
+ tDiffuse: IUniform;
24
+ tArea: IUniform;
25
+ tSearch: IUniform;
26
+ resolution: IUniform;
27
27
  };
28
28
  vertexShader: string;
29
29
  fragmentShader: string;
@@ -31,9 +31,9 @@ export const SMAAWeightsShader: {
31
31
 
32
32
  export const SMAABlendShader: {
33
33
  uniforms: {
34
- tDiffuse: Uniform;
35
- tColor: Uniform;
36
- resolution: Uniform;
34
+ tDiffuse: IUniform;
35
+ tColor: IUniform;
36
+ resolution: IUniform;
37
37
  };
38
38
  vertexShader: string;
39
39
  fragmentShader: string;
@@ -1,4 +1,4 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const SSAOShader: {
4
4
  defines: {
@@ -6,19 +6,19 @@ export const SSAOShader: {
6
6
  KERNEL_SIZE: number;
7
7
  };
8
8
  uniforms: {
9
- tDiffuse: Uniform;
10
- tNormal: Uniform;
11
- tDepth: Uniform;
12
- tNoise: Uniform;
13
- kernel: Uniform;
14
- cameraNear: Uniform;
15
- cameraFar: Uniform;
16
- resolution: Uniform;
17
- cameraProjectionMatrix: Uniform;
18
- cameraInverseProjectionMatrix: Uniform;
19
- kernelRadius: Uniform;
20
- minDistance: Uniform;
21
- maxDistance: Uniform;
9
+ tDiffuse: IUniform;
10
+ tNormal: IUniform;
11
+ tDepth: IUniform;
12
+ tNoise: IUniform;
13
+ kernel: IUniform;
14
+ cameraNear: IUniform;
15
+ cameraFar: IUniform;
16
+ resolution: IUniform;
17
+ cameraProjectionMatrix: IUniform;
18
+ cameraInverseProjectionMatrix: IUniform;
19
+ kernelRadius: IUniform;
20
+ minDistance: IUniform;
21
+ maxDistance: IUniform;
22
22
  };
23
23
  vertexShader: string;
24
24
  fragmentShader: string;
@@ -29,9 +29,9 @@ export const SSAODepthShader: {
29
29
  PERSPECTIVE_CAMERA: number;
30
30
  };
31
31
  uniforms: {
32
- tDepth: Uniform;
33
- cameraNear: Uniform;
34
- cameraFar: Uniform;
32
+ tDepth: IUniform;
33
+ cameraNear: IUniform;
34
+ cameraFar: IUniform;
35
35
  };
36
36
  vertexShader: string;
37
37
  fragmentShader: string;
@@ -39,8 +39,8 @@ export const SSAODepthShader: {
39
39
 
40
40
  export const SSAOBlurShader: {
41
41
  uniforms: {
42
- tDiffuse: Uniform;
43
- resolution: Uniform;
42
+ tDiffuse: IUniform;
43
+ resolution: IUniform;
44
44
  };
45
45
  vertexShader: string;
46
46
  fragmentShader: string;
@@ -1,9 +1,9 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const SepiaShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
6
- amount: Uniform;
5
+ tDiffuse: IUniform;
6
+ amount: IUniform;
7
7
  };
8
8
  vertexShader: string;
9
9
  fragmentShader: string;
@@ -1,9 +1,9 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const SobelOperatorShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
6
- resolution: Uniform;
5
+ tDiffuse: IUniform;
6
+ resolution: IUniform;
7
7
  };
8
8
  vertexShader: string;
9
9
  fragmentShader: string;
@@ -1,36 +1,36 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const SubsurfaceScatteringShader: {
4
4
  uniforms: {
5
- alphaMap: Uniform;
6
- ambientLightColor: Uniform;
7
- color: Uniform;
8
- diffuse: Uniform;
9
- directionalLights: Uniform;
10
- directionalShadowMap: Uniform;
11
- directionalShadowMatrix: Uniform;
12
- emissive: Uniform;
13
- hemisphereLights: Uniform;
14
- lightProbe: Uniform;
15
- map: Uniform;
16
- opacity: Uniform;
17
- pointLights: Uniform;
18
- pointShadowMap: Uniform;
19
- pointShadowMatrix: Uniform;
20
- rectAreaLights: Uniform;
21
- shininess: Uniform;
22
- specular: Uniform;
23
- spotLights: Uniform;
24
- spotShadowMap: Uniform;
25
- spotShadowMatrix: Uniform;
26
- thicknessAmbient: Uniform;
27
- thicknessAttenuation: Uniform;
28
- thicknessColor: Uniform;
29
- thicknessDistortion: Uniform;
30
- thicknessMap: Uniform;
31
- thicknessPower: Uniform;
32
- thicknessScale: Uniform;
33
- uvTransform: Uniform;
5
+ alphaMap: IUniform;
6
+ ambientLightColor: IUniform;
7
+ color: IUniform;
8
+ diffuse: IUniform;
9
+ directionalLights: IUniform;
10
+ directionalShadowMap: IUniform;
11
+ directionalShadowMatrix: IUniform;
12
+ emissive: IUniform;
13
+ hemisphereLights: IUniform;
14
+ lightProbe: IUniform;
15
+ map: IUniform;
16
+ opacity: IUniform;
17
+ pointLights: IUniform;
18
+ pointShadowMap: IUniform;
19
+ pointShadowMatrix: IUniform;
20
+ rectAreaLights: IUniform;
21
+ shininess: IUniform;
22
+ specular: IUniform;
23
+ spotLights: IUniform;
24
+ spotShadowMap: IUniform;
25
+ spotShadowMatrix: IUniform;
26
+ thicknessAmbient: IUniform;
27
+ thicknessAttenuation: IUniform;
28
+ thicknessColor: IUniform;
29
+ thicknessDistortion: IUniform;
30
+ thicknessMap: IUniform;
31
+ thicknessPower: IUniform;
32
+ thicknessScale: IUniform;
33
+ uvTransform: IUniform;
34
34
  };
35
35
  vertexShader: string;
36
36
  fragmentShader: string;
@@ -1,8 +1,8 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const TechnicolorShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
5
+ tDiffuse: IUniform;
6
6
  };
7
7
  vertexShader: string;
8
8
  fragmentShader: string;
@@ -1,13 +1,13 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const ToneMapShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
6
- averageLuminance: Uniform;
7
- luminanceMap: Uniform;
8
- maxLuminance: Uniform;
9
- minLuminance: Uniform;
10
- middleGrey: Uniform;
5
+ tDiffuse: IUniform;
6
+ averageLuminance: IUniform;
7
+ luminanceMap: IUniform;
8
+ maxLuminance: IUniform;
9
+ minLuminance: IUniform;
10
+ middleGrey: IUniform;
11
11
  };
12
12
  vertexShader: string;
13
13
  fragmentShader: string;
@@ -1,11 +1,11 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const ToonShader1: {
4
4
  uniforms: {
5
- uDirLightPos: Uniform;
6
- uDirLightColor: Uniform;
7
- uAmbientLightColor: Uniform;
8
- uBaseColor: Uniform;
5
+ uDirLightPos: IUniform;
6
+ uDirLightColor: IUniform;
7
+ uAmbientLightColor: IUniform;
8
+ uBaseColor: IUniform;
9
9
  };
10
10
  vertexShader: string;
11
11
  fragmentShader: string;
@@ -13,14 +13,14 @@ export const ToonShader1: {
13
13
 
14
14
  export const ToonShader2: {
15
15
  uniforms: {
16
- uDirLightPos: Uniform;
17
- uDirLightColor: Uniform;
18
- uAmbientLightColor: Uniform;
19
- uBaseColor: Uniform;
20
- uLineColor1: Uniform;
21
- uLineColor2: Uniform;
22
- uLineColor3: Uniform;
23
- uLineColor4: Uniform;
16
+ uDirLightPos: IUniform;
17
+ uDirLightColor: IUniform;
18
+ uAmbientLightColor: IUniform;
19
+ uBaseColor: IUniform;
20
+ uLineColor1: IUniform;
21
+ uLineColor2: IUniform;
22
+ uLineColor3: IUniform;
23
+ uLineColor4: IUniform;
24
24
  };
25
25
  vertexShader: string;
26
26
  fragmentShader: string;
@@ -28,14 +28,14 @@ export const ToonShader2: {
28
28
 
29
29
  export const ToonShaderHatching: {
30
30
  uniforms: {
31
- uDirLightPos: Uniform;
32
- uDirLightColor: Uniform;
33
- uAmbientLightColor: Uniform;
34
- uBaseColor: Uniform;
35
- uLineColor1: Uniform;
36
- uLineColor2: Uniform;
37
- uLineColor3: Uniform;
38
- uLineColor4: Uniform;
31
+ uDirLightPos: IUniform;
32
+ uDirLightColor: IUniform;
33
+ uAmbientLightColor: IUniform;
34
+ uBaseColor: IUniform;
35
+ uLineColor1: IUniform;
36
+ uLineColor2: IUniform;
37
+ uLineColor3: IUniform;
38
+ uLineColor4: IUniform;
39
39
  };
40
40
  vertexShader: string;
41
41
  fragmentShader: string;
@@ -43,11 +43,11 @@ export const ToonShaderHatching: {
43
43
 
44
44
  export const ToonShaderDotted: {
45
45
  uniforms: {
46
- uDirLightPos: Uniform;
47
- uDirLightColor: Uniform;
48
- uAmbientLightColor: Uniform;
49
- uBaseColor: Uniform;
50
- uLineColor1: Uniform;
46
+ uDirLightPos: IUniform;
47
+ uDirLightColor: IUniform;
48
+ uAmbientLightColor: IUniform;
49
+ uBaseColor: IUniform;
50
+ uLineColor1: IUniform;
51
51
  };
52
52
  vertexShader: string;
53
53
  fragmentShader: string;
@@ -1,9 +1,9 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const TriangleBlurShader: {
4
4
  uniforms: {
5
- texture: Uniform;
6
- delta: Uniform;
5
+ texture: IUniform;
6
+ delta: IUniform;
7
7
  };
8
8
  vertexShader: string;
9
9
  fragmentShader: string;
@@ -1,9 +1,9 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const UnpackDepthRGBAShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
6
- opacity: Uniform;
5
+ tDiffuse: IUniform;
6
+ opacity: IUniform;
7
7
  };
8
8
  vertexShader: string;
9
9
  fragmentShader: string;
@@ -0,0 +1,13 @@
1
+ import { IUniform, UniformsLib } from '../../../src/Three';
2
+
3
+ export const VelocityShader: {
4
+ uniforms: typeof UniformsLib['common'] &
5
+ typeof UniformsLib['displacementmap'] & {
6
+ modelMatrixPrev: IUniform;
7
+ currentProjectionViewMatrix: IUniform;
8
+ previousProjectionViewMatrix: IUniform;
9
+ };
10
+
11
+ fragmentShader: string;
12
+ vertexShader: string;
13
+ };
@@ -1,9 +1,9 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const VerticalBlurShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
6
- v: Uniform;
5
+ tDiffuse: IUniform;
6
+ v: IUniform;
7
7
  };
8
8
  vertexShader: string;
9
9
  fragmentShader: string;
@@ -1,10 +1,10 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const VerticalTiltShiftShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
6
- v: Uniform;
7
- r: Uniform;
5
+ tDiffuse: IUniform;
6
+ v: IUniform;
7
+ r: IUniform;
8
8
  };
9
9
  vertexShader: string;
10
10
  fragmentShader: string;
@@ -1,10 +1,10 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const VignetteShader: {
4
4
  uniforms: {
5
- tDiffuse: Uniform;
6
- offset: Uniform;
7
- darkness: Uniform;
5
+ tDiffuse: IUniform;
6
+ offset: IUniform;
7
+ darkness: IUniform;
8
8
  };
9
9
  vertexShader: string;
10
10
  fragmentShader: string;
@@ -1,13 +1,13 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const VolumeRenderShader1: {
4
4
  uniforms: {
5
- u_size: Uniform;
6
- u_renderstyle: Uniform;
7
- u_renderthreshold: Uniform;
8
- u_clim: Uniform;
9
- u_data: Uniform;
10
- u_cmdata: Uniform;
5
+ u_size: IUniform;
6
+ u_renderstyle: IUniform;
7
+ u_renderthreshold: IUniform;
8
+ u_clim: IUniform;
9
+ u_data: IUniform;
10
+ u_cmdata: IUniform;
11
11
  };
12
12
  vertexShader: string;
13
13
  fragmentShader: string;
@@ -1,12 +1,12 @@
1
- import { Uniform } from '../../../src/Three';
1
+ import { IUniform } from '../../../src/Three';
2
2
 
3
3
  export const WaterRefractionShader: {
4
4
  uniforms: {
5
- color: Uniform;
6
- time: Uniform;
7
- tDiffuse: Uniform;
8
- tDudv: Uniform;
9
- textureMatrix: Uniform;
5
+ color: IUniform;
6
+ time: IUniform;
7
+ tDiffuse: IUniform;
8
+ tDudv: IUniform;
9
+ textureMatrix: IUniform;
10
10
  };
11
11
  vertexShader: string;
12
12
  fragmentShader: string;
@@ -8,6 +8,7 @@ import {
8
8
  Points,
9
9
  } from '../../../src/Three';
10
10
 
11
+ export function deepCloneAttribute(attribute: BufferAttribute): BufferAttribute;
11
12
  export function mergeBufferGeometries(geometries: BufferGeometry[], useGroups?: boolean): BufferGeometry;
12
13
  export function mergeBufferAttributes(attributes: BufferAttribute[]): BufferAttribute;
13
14
  export function interleaveAttributes(attributes: BufferAttribute[]): InterleavedBufferAttribute;
@@ -1,4 +1,4 @@
1
- import { PerspectiveCamera, Vector3 } from '../../../src/Three.js';
1
+ import { PerspectiveCamera, Vector3 } from '../../../src/Three';
2
2
 
3
3
  export function frameCorners(
4
4
  camera: PerspectiveCamera,
@@ -1,4 +1,4 @@
1
- import { BufferGeometry, Group, InstancedMesh, Material, Object3D, Scene, Mesh } from '../../../src/Three';
1
+ import { BufferGeometry, Group, InstancedMesh, Material, Object3D, Scene, Mesh, Vector3 } from '../../../src/Three';
2
2
 
3
3
  export function createMeshesFromInstancedMesh(instancedMesh: InstancedMesh): Group;
4
4
  export function createMultiMaterialObject(geometry: BufferGeometry, materials: Material[]): Group;
@@ -12,3 +12,11 @@ export function detach(child: Object3D, parent: Object3D, scene: Scene): void;
12
12
  export function attach(child: Object3D, scene: Scene, parent: Object3D): void;
13
13
 
14
14
  export function createMeshesFromMultiMaterialMesh(mesh: Mesh): Group;
15
+
16
+ export function sortInstancedMesh(mesh: InstancedMesh, compareFn: (a: number, b: number) => number): void;
17
+
18
+ export function reduceVertices<TValue>(
19
+ object: Object3D,
20
+ func: (value: TValue, vertex: Vector3) => TValue,
21
+ initialValue: TValue,
22
+ ): TValue;
three/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for three 0.143
1
+ // Type definitions for three 0.146
2
2
  // Project: https://threejs.org/
3
3
  // Definitions by: Josh Ellis <https://github.com/joshuaellis>
4
4
  // Nathan Bierema <https://github.com/Methuselah96>
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.143.2",
3
+ "version": "0.146.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -27,6 +27,6 @@
27
27
  "dependencies": {
28
28
  "@types/webxr": "*"
29
29
  },
30
- "typesPublisherContentHash": "737cbdf423532e44f0ca249fff948668695b32755741113e2aa638786cd7717e",
31
- "typeScriptVersion": "4.0"
30
+ "typesPublisherContentHash": "8811cec6dcb6daed91e5163eee03aeed7a0b56ad67126ce3b6ade0354b3d8614",
31
+ "typeScriptVersion": "4.1"
32
32
  }
three/src/Three.d.ts CHANGED
@@ -158,6 +158,7 @@ export * from './math/Vector2';
158
158
  export * from './math/Quaternion';
159
159
  export * from './math/Color';
160
160
  export * from './math/SphericalHarmonics3';
161
+ export { ColorManagement } from './math/ColorManagement';
161
162
  import * as MathUtils from './math/MathUtils';
162
163
  export { MathUtils };
163
164
  /**
@@ -212,7 +213,7 @@ export * from './renderers/webgl/WebGLUniforms';
212
213
  export * from './renderers/webgl/WebGLUniformsGroups';
213
214
  export * from './renderers/webxr/WebXRController';
214
215
  export * from './renderers/webxr/WebXRManager';
215
- export { WebGLUtils } from './renderers/webgl/WebGLUtils.js';
216
+ export { WebGLUtils } from './renderers/webgl/WebGLUtils';
216
217
  /**
217
218
  * Scenes
218
219
  */
@@ -223,6 +224,7 @@ export * from './scenes/Scene';
223
224
  * Textures
224
225
  */
225
226
  export * from './textures/VideoTexture';
227
+ export * from './textures/CompressedArrayTexture';
226
228
  export * from './textures/DataTexture';
227
229
  export * from './textures/DataTexture2DArray';
228
230
  export * from './textures/DataTexture3D';
three/src/constants.d.ts CHANGED
@@ -39,11 +39,6 @@ export const FrontSide: Side;
39
39
  export const BackSide: Side;
40
40
  export const DoubleSide: Side;
41
41
 
42
- // shading
43
- export enum Shading {}
44
- export const FlatShading: Shading;
45
- export const SmoothShading: Shading;
46
-
47
42
  // blending modes
48
43
  export enum Blending {}
49
44
  export const NoBlending: Blending;
@@ -51,10 +51,6 @@ export class BufferAttribute {
51
51
  copy(source: BufferAttribute): this;
52
52
  copyAt(index1: number, attribute: BufferAttribute, index2: number): this;
53
53
  copyArray(array: ArrayLike<number>): this;
54
- copyColorsArray(colors: Array<{ r: number; g: number; b: number }>): this;
55
- copyVector2sArray(vectors: Array<{ x: number; y: number }>): this;
56
- copyVector3sArray(vectors: Array<{ x: number; y: number; z: number }>): this;
57
- copyVector4sArray(vectors: Array<{ x: number; y: number; z: number; w: number }>): this;
58
54
  applyMatrix3(m: Matrix3): this;
59
55
  applyMatrix4(m: Matrix4): this;
60
56
  applyNormalMatrix(m: Matrix3): this;
@@ -143,7 +143,6 @@ export class BufferGeometry extends EventDispatcher {
143
143
  */
144
144
  computeVertexNormals(): void;
145
145
 
146
- merge(geometry: BufferGeometry, offset?: number): BufferGeometry;
147
146
  normalizeNormals(): void;
148
147
 
149
148
  toNonIndexed(): BufferGeometry;
@@ -109,6 +109,13 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
109
109
  */
110
110
  matrixAutoUpdate: boolean;
111
111
 
112
+ /**
113
+ * When this is set, the renderer checks every frame if the object and its children need matrix updates.
114
+ * Otherwise, you have to maintain all matrices in the object and its children yourself.
115
+ * @default THREE.Object3D.DefaultMatrixWorldAutoUpdate
116
+ */
117
+ matrixWorldAutoUpdate: boolean;
118
+
112
119
  /**
113
120
  * When this is set, it calculates the matrixWorld in that frame and resets this property to false.
114
121
  * @default false
@@ -210,6 +217,7 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
210
217
 
211
218
  static DefaultUp: Vector3;
212
219
  static DefaultMatrixAutoUpdate: boolean;
220
+ static DefaultMatrixWorldAutoUpdate: boolean;
213
221
 
214
222
  /**
215
223
  * Applies the matrix transform to the object and updates the object's position, rotation and scale.
@@ -324,7 +332,8 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
324
332
  * This method does not support objects having non-uniformly-scaled parent(s).
325
333
  * @param vector A world vector to look at.
326
334
  */
327
- lookAt(vector: Vector3 | number, y?: number, z?: number): void;
335
+ lookAt(vector: Vector3): void;
336
+ lookAt(x: number, y: number, z: number): void;
328
337
 
329
338
  /**
330
339
  * Adds object as child of this object.
@@ -363,7 +372,7 @@ export class Object3D<E extends BaseEvent = Event> extends EventDispatcher<E> {
363
372
  */
364
373
  getObjectByName(name: string): Object3D | undefined;
365
374
 
366
- getObjectByProperty(name: string, value: string): Object3D | undefined;
375
+ getObjectByProperty(name: string, value: any): Object3D | undefined;
367
376
 
368
377
  getWorldPosition(target: Vector3): Vector3;
369
378
  getWorldQuaternion(target: Quaternion): Quaternion;
@@ -30,5 +30,5 @@ export class ShapePath {
30
30
  quadraticCurveTo(aCPx: number, aCPy: number, aX: number, aY: number): this;
31
31
  bezierCurveTo(aCP1x: number, aCP1y: number, aCP2x: number, aCP2y: number, aX: number, aY: number): this;
32
32
  splineThru(pts: Vector2[]): this;
33
- toShapes(isCCW: boolean, noHoles?: boolean): Shape[];
33
+ toShapes(isCCW: boolean): Shape[];
34
34
  }