@types/three 0.150.2 → 0.152.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 (118) hide show
  1. three/README.md +2 -2
  2. three/build/three.min.d.ts +2 -0
  3. three/build/three.module.min.d.ts +2 -0
  4. three/examples/jsm/controls/MapControls.d.ts +21 -0
  5. three/examples/jsm/controls/OrbitControls.d.ts +1 -5
  6. three/examples/jsm/controls/PointerLockControls.d.ts +3 -0
  7. three/examples/jsm/controls/TrackballControls.d.ts +2 -0
  8. three/examples/jsm/helpers/ViewHelper.d.ts +3 -4
  9. three/examples/jsm/libs/tween.module.d.ts +2 -0
  10. three/examples/jsm/loaders/GLTFLoader.d.ts +2 -4
  11. three/examples/jsm/loaders/SVGLoader.d.ts +15 -3
  12. three/examples/jsm/nodes/Nodes.d.ts +131 -226
  13. three/examples/jsm/nodes/{core → code}/CodeNode.d.ts +2 -3
  14. three/examples/jsm/nodes/{core → code}/ExpressionNode.d.ts +2 -2
  15. three/examples/jsm/nodes/{core → code}/FunctionCallNode.d.ts +2 -2
  16. three/examples/jsm/nodes/{core → code}/FunctionNode.d.ts +4 -4
  17. three/examples/jsm/nodes/core/InputNode.d.ts +4 -0
  18. three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -11
  19. three/examples/jsm/nodes/core/NodeUtils.d.ts +8 -2
  20. three/examples/jsm/nodes/core/{VaryNode.d.ts → VaryingNode.d.ts} +1 -1
  21. three/examples/jsm/nodes/core/constants.d.ts +1 -0
  22. three/examples/jsm/nodes/fog/FogNode.d.ts +1 -1
  23. three/examples/jsm/nodes/geometry/RangeNode.d.ts +2 -1
  24. three/examples/jsm/nodes/lighting/LightUtils.d.ts +4 -0
  25. three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
  26. three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
  27. three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +0 -7
  28. three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +0 -9
  29. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -9
  30. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +17 -1
  31. three/examples/jsm/nodes/math/MathNode.d.ts +2 -2
  32. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +2 -2
  33. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +0 -2
  34. three/examples/jsm/objects/{GroundProjectedEnv.d.ts → GroundProjectedSkybox.d.ts} +1 -1
  35. three/examples/jsm/postprocessing/Pass.d.ts +2 -0
  36. three/examples/jsm/renderers/CSS2DRenderer.d.ts +2 -1
  37. three/examples/jsm/renderers/CSS3DRenderer.d.ts +2 -2
  38. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +1 -21
  39. three/examples/jsm/utils/BufferGeometryUtils.d.ts +12 -2
  40. three/examples/jsm/utils/SkeletonUtils.d.ts +3 -19
  41. three/index.d.ts +1 -1
  42. three/package.json +3 -2
  43. three/src/Three.d.ts +1 -0
  44. three/src/constants.d.ts +3 -23
  45. three/src/core/BufferGeometry.d.ts +60 -33
  46. three/src/core/Raycaster.d.ts +2 -1
  47. three/src/extras/DataUtils.d.ts +13 -0
  48. three/src/extras/Earcut.d.ts +12 -0
  49. three/src/extras/ImageUtils.d.ts +20 -20
  50. three/src/extras/PMREMGenerator.d.ts +66 -0
  51. three/src/extras/ShapeUtils.d.ts +19 -1
  52. three/src/extras/core/Curve.d.ts +86 -31
  53. three/src/extras/core/CurvePath.d.ts +46 -4
  54. three/src/extras/core/Interpolations.d.ts +36 -0
  55. three/src/extras/core/Path.d.ts +122 -15
  56. three/src/extras/core/Shape.d.ts +56 -6
  57. three/src/extras/core/ShapePath.d.ts +73 -8
  58. three/src/extras/curves/ArcCurve.d.ts +35 -3
  59. three/src/extras/curves/CatmullRomCurve3.d.ts +62 -15
  60. three/src/extras/curves/CubicBezierCurve.d.ts +48 -7
  61. three/src/extras/curves/CubicBezierCurve3.d.ts +48 -7
  62. three/src/extras/curves/EllipseCurve.d.ts +73 -18
  63. three/src/extras/curves/LineCurve.d.ts +26 -5
  64. three/src/extras/curves/LineCurve3.d.ts +26 -5
  65. three/src/extras/curves/QuadraticBezierCurve.d.ts +44 -6
  66. three/src/extras/curves/QuadraticBezierCurve3.d.ts +44 -6
  67. three/src/extras/curves/SplineCurve.d.ts +39 -3
  68. three/src/helpers/ArrowHelper.d.ts +47 -16
  69. three/src/helpers/AxesHelper.d.ts +35 -3
  70. three/src/helpers/Box3Helper.d.ts +28 -4
  71. three/src/helpers/BoxHelper.d.ts +44 -4
  72. three/src/helpers/CameraHelper.d.ts +38 -19
  73. three/src/helpers/DirectionalLightHelper.d.ts +57 -10
  74. three/src/helpers/GridHelper.d.ts +32 -6
  75. three/src/helpers/HemisphereLightHelper.d.ts +56 -3
  76. three/src/helpers/PlaneHelper.d.ts +31 -8
  77. three/src/helpers/PointLightHelper.d.ts +54 -6
  78. three/src/helpers/PolarGridHelper.d.ts +35 -8
  79. three/src/helpers/SkeletonHelper.d.ts +56 -8
  80. three/src/helpers/SpotLightHelper.d.ts +59 -4
  81. three/src/lights/AmbientLight.d.ts +23 -10
  82. three/src/lights/AmbientLightProbe.d.ts +18 -0
  83. three/src/lights/DirectionalLight.d.ts +75 -20
  84. three/src/lights/DirectionalLightShadow.d.ts +68 -2
  85. three/src/lights/HemisphereLight.d.ts +45 -12
  86. three/src/lights/HemisphereLightProbe.d.ts +19 -0
  87. three/src/lights/Light.d.ts +40 -43
  88. three/src/lights/LightProbe.d.ts +32 -5
  89. three/src/lights/LightShadow.d.ts +100 -18
  90. three/src/lights/PointLight.d.ts +57 -12
  91. three/src/lights/PointLightShadow.d.ts +18 -2
  92. three/src/lights/RectAreaLight.d.ts +60 -8
  93. three/src/lights/SpotLight.d.ts +105 -20
  94. three/src/lights/SpotLightShadow.d.ts +63 -3
  95. three/src/materials/LineBasicMaterial.d.ts +7 -1
  96. three/src/materials/MeshDistanceMaterial.d.ts +0 -15
  97. three/src/materials/ShaderMaterial.d.ts +1 -1
  98. three/src/math/Color.d.ts +23 -2
  99. three/src/math/Quaternion.d.ts +6 -0
  100. three/src/math/Triangle.d.ts +40 -0
  101. three/src/math/Vector2.d.ts +5 -0
  102. three/src/math/Vector3.d.ts +10 -3
  103. three/src/objects/InstancedMesh.d.ts +22 -30
  104. three/src/objects/LineSegments.d.ts +2 -0
  105. three/src/objects/Points.d.ts +7 -6
  106. three/src/objects/Skeleton.d.ts +5 -1
  107. three/src/objects/SkinnedMesh.d.ts +37 -25
  108. three/src/renderers/WebGLRenderTarget.d.ts +3 -0
  109. three/src/renderers/WebGLRenderer.d.ts +25 -1
  110. three/src/renderers/shaders/ShaderChunk.d.ts +58 -37
  111. three/src/renderers/shaders/UniformsLib.d.ts +88 -57
  112. three/src/textures/CanvasTexture.d.ts +0 -1
  113. three/src/textures/CompressedTexture.d.ts +3 -2
  114. three/src/textures/CubeTexture.d.ts +3 -4
  115. three/src/textures/DataTexture.d.ts +3 -3
  116. three/src/textures/Texture.d.ts +37 -24
  117. three/examples/jsm/nodes/functions/light/getDistanceAttenuation.d.ts +0 -5
  118. three/examples/jsm/nodes/lighting/PunctualLightNode.d.ts +0 -12
@@ -1,78 +1,92 @@
1
+ import { Color } from '../../math/Color';
2
+ import { Vector2 } from '../../math/Vector2';
3
+ import { Matrix3 } from '../../math/Matrix3';
4
+
1
5
  // tslint:disable-next-line:interface-name
2
6
  export interface IUniform<TValue = any> {
3
7
  value: TValue;
4
8
  }
5
9
 
6
- export let UniformsLib: {
10
+ export const UniformsLib: {
7
11
  common: {
8
- diffuse: IUniform;
9
- opacity: IUniform;
10
- map: IUniform;
11
- uvTransform: IUniform;
12
- uv2Transform: IUniform;
13
- alphaMap: IUniform;
12
+ diffuse: IUniform<Color>;
13
+ opacity: IUniform<number>;
14
+ map: IUniform<unknown>;
15
+ mapTransform: IUniform<Matrix3>;
16
+ alphaMap: IUniform<unknown>;
17
+ alphaMapTransform: IUniform<Matrix3>;
18
+ alphaTest: IUniform<number>;
14
19
  };
15
20
  specularmap: {
16
- specularMap: IUniform;
21
+ specularMap: IUniform<unknown>;
22
+ specularMapTransform: IUniform<Matrix3>;
17
23
  };
18
24
  envmap: {
19
- envMap: IUniform;
20
- flipEnvMap: IUniform;
21
- reflectivity: IUniform;
22
- ior: IUniform;
23
- refractRatio: IUniform;
24
- backgroundBlurriness: IUniform;
25
+ envMap: IUniform<unknown>;
26
+ flipEnvMap: IUniform<number>;
27
+ reflectivity: IUniform<number>;
28
+ ior: IUniform<number>;
29
+ refractRatio: IUniform<number>;
25
30
  };
26
31
  aomap: {
27
- aoMap: IUniform;
28
- aoMapIntensity: IUniform;
32
+ aoMap: IUniform<unknown>;
33
+ aoMapIntensity: IUniform<number>;
34
+ aoMapTransform: IUniform<Matrix3>;
29
35
  };
30
36
  lightmap: {
31
- lightMap: IUniform;
32
- lightMapIntensity: IUniform;
33
- };
34
- emissivemap: {
35
- emissiveMap: IUniform;
37
+ lightMap: IUniform<number>;
38
+ lightMapIntensity: IUniform<number>;
39
+ lightMapTransform: IUniform<Matrix3>;
36
40
  };
37
41
  bumpmap: {
38
- bumpMap: IUniform;
39
- bumpScale: IUniform;
42
+ bumpMap: IUniform<unknown>;
43
+ bumpMapTransform: IUniform<Matrix3>;
44
+ bumpScale: IUniform<number>;
40
45
  };
41
46
  normalmap: {
42
- normalMap: IUniform;
43
- normalScale: IUniform;
47
+ normalMap: IUniform<unknown>;
48
+ normalMapTransform: IUniform<Matrix3>;
49
+ normalScale: IUniform<Vector2>;
44
50
  };
45
51
  displacementmap: {
46
- displacementMap: IUniform;
47
- displacementScale: IUniform;
48
- displacementBias: IUniform;
52
+ displacementMap: IUniform<unknown>;
53
+ displacementMapTransform: IUniform<Matrix3>;
54
+ displacementScale: IUniform<number>;
55
+ displacementBias: IUniform<number>;
49
56
  };
50
- roughnessmap: {
51
- roughnessMap: IUniform;
57
+ emissivemap: {
58
+ emissiveMap: IUniform<unknown>;
59
+ emissiveMapTransform: IUniform<Matrix3>;
52
60
  };
53
61
  metalnessmap: {
54
- metalnessMap: IUniform;
62
+ metalnessMap: IUniform<unknown>;
63
+ metalnessMapTransform: IUniform<Matrix3>;
64
+ };
65
+ roughnessmap: {
66
+ roughnessMap: IUniform<unknown>;
67
+ roughnessMapTransform: IUniform<Matrix3>;
55
68
  };
56
69
  gradientmap: {
57
- gradientMap: IUniform;
70
+ gradientMap: IUniform<unknown>;
58
71
  };
59
72
  fog: {
60
- fogDensity: IUniform;
61
- fogNear: IUniform;
62
- fogFar: IUniform;
63
- fogColor: IUniform;
73
+ fogDensity: IUniform<number>;
74
+ fogNear: IUniform<number>;
75
+ fogFar: IUniform<number>;
76
+ fogColor: IUniform<Color>;
64
77
  };
65
78
  lights: {
66
- ambientLightColor: IUniform;
79
+ ambientLightColor: IUniform<unknown[]>;
80
+ lightProbe: IUniform<unknown[]>;
67
81
  directionalLights: {
68
- value: any[];
82
+ value: unknown[];
69
83
  properties: {
70
84
  direction: {};
71
85
  color: {};
72
86
  };
73
87
  };
74
88
  directionalLightShadows: {
75
- value: any[];
89
+ value: unknown[];
76
90
  properties: {
77
91
  shadowBias: {};
78
92
  shadowNormalBias: {};
@@ -80,10 +94,10 @@ export let UniformsLib: {
80
94
  shadowMapSize: {};
81
95
  };
82
96
  };
83
- directionalShadowMap: IUniform;
84
- directionalShadowMatrix: IUniform;
97
+ directionalShadowMap: IUniform<unknown[]>;
98
+ directionalShadowMatrix: IUniform<unknown[]>;
85
99
  spotLights: {
86
- value: any[];
100
+ value: unknown[];
87
101
  properties: {
88
102
  color: {};
89
103
  position: {};
@@ -95,7 +109,7 @@ export let UniformsLib: {
95
109
  };
96
110
  };
97
111
  spotLightShadows: {
98
- value: any[];
112
+ value: unknown[];
99
113
  properties: {
100
114
  shadowBias: {};
101
115
  shadowNormalBias: {};
@@ -103,10 +117,11 @@ export let UniformsLib: {
103
117
  shadowMapSize: {};
104
118
  };
105
119
  };
106
- spotShadowMap: IUniform;
107
- spotShadowMatrix: IUniform;
120
+ spotLightMap: IUniform<unknown[]>;
121
+ spotShadowMap: IUniform<unknown[]>;
122
+ spotLightMatrix: IUniform<unknown[]>;
108
123
  pointLights: {
109
- value: any[];
124
+ value: unknown[];
110
125
  properties: {
111
126
  color: {};
112
127
  position: {};
@@ -115,18 +130,20 @@ export let UniformsLib: {
115
130
  };
116
131
  };
117
132
  pointLightShadows: {
118
- value: any[];
133
+ value: unknown[];
119
134
  properties: {
120
135
  shadowBias: {};
121
136
  shadowNormalBias: {};
122
137
  shadowRadius: {};
123
138
  shadowMapSize: {};
139
+ shadowCameraNear: {};
140
+ shadowCameraFar: {};
124
141
  };
125
142
  };
126
- pointShadowMap: IUniform;
127
- pointShadowMatrix: IUniform;
143
+ pointShadowMap: IUniform<unknown[]>;
144
+ pointShadowMatrix: IUniform<unknown[]>;
128
145
  hemisphereLights: {
129
- value: any[];
146
+ value: unknown[];
130
147
  properties: {
131
148
  direction: {};
132
149
  skycolor: {};
@@ -134,7 +151,7 @@ export let UniformsLib: {
134
151
  };
135
152
  };
136
153
  rectAreaLights: {
137
- value: any[];
154
+ value: unknown[];
138
155
  properties: {
139
156
  color: {};
140
157
  position: {};
@@ -142,13 +159,27 @@ export let UniformsLib: {
142
159
  height: {};
143
160
  };
144
161
  };
162
+ ltc_1: IUniform<unknown>;
163
+ ltc_2: IUniform<unknown>;
145
164
  };
146
165
  points: {
147
- diffuse: IUniform;
148
- opacity: IUniform;
149
- size: IUniform;
150
- scale: IUniform;
151
- map: IUniform;
152
- uvTransform: IUniform;
166
+ diffuse: IUniform<Color>;
167
+ opacity: IUniform<number>;
168
+ size: IUniform<number>;
169
+ scale: IUniform<number>;
170
+ map: IUniform<unknown>;
171
+ alphaMap: IUniform<unknown>;
172
+ alphaTest: IUniform<number>;
173
+ uvTransform: IUniform<Matrix3>;
174
+ };
175
+ sprite: {
176
+ diffuse: IUniform<Color>;
177
+ opacity: IUniform<number>;
178
+ center: IUniform<Vector2>;
179
+ rotation: IUniform<number>;
180
+ map: IUniform<unknown>;
181
+ mapTransform: IUniform<Matrix3>;
182
+ alphaMap: IUniform<unknown>;
183
+ alphaTest: IUniform<number>;
153
184
  };
154
185
  };
@@ -29,7 +29,6 @@ export class CanvasTexture extends Texture {
29
29
  * @param format See {@link Texture.format | .format}. Default {@link THREE.RGBAFormat}
30
30
  * @param type See {@link Texture.type | .type}. Default {@link THREE.UnsignedByteType}
31
31
  * @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
32
- * @param encoding See {@link Texture.encoding | .encoding}. Default {@link THREE.LinearEncoding}
33
32
  */
34
33
  constructor(
35
34
  canvas: TexImageSource | OffscreenCanvas,
@@ -4,9 +4,9 @@ import {
4
4
  Wrapping,
5
5
  CompressedPixelFormat,
6
6
  TextureDataType,
7
- TextureEncoding,
8
7
  MagnificationTextureFilter,
9
8
  MinificationTextureFilter,
9
+ ColorSpace,
10
10
  } from '../constants';
11
11
 
12
12
  /**
@@ -30,6 +30,7 @@ export class CompressedTexture extends Texture {
30
30
  * @param magFilter See {@link Texture.magFilter | .magFilter}. Default {@link THREE.LinearFilter}
31
31
  * @param minFilter See {@link Texture.minFilter | .minFilter}. Default {@link THREE.LinearMipmapLinearFilter}
32
32
  * @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
33
+ * @param colorSpace See {@link Texture.colorSpace .colorSpace}. Default {@link NoColorSpace}
33
34
  */
34
35
  constructor(
35
36
  mipmaps: ImageData[],
@@ -43,7 +44,7 @@ export class CompressedTexture extends Texture {
43
44
  magFilter?: MagnificationTextureFilter,
44
45
  minFilter?: MinificationTextureFilter,
45
46
  anisotropy?: number,
46
- encoding?: TextureEncoding,
47
+ colorSpace?: ColorSpace,
47
48
  );
48
49
 
49
50
  /**
@@ -1,13 +1,12 @@
1
1
  import { Texture } from './Texture';
2
2
  import {
3
- Mapping,
4
3
  Wrapping,
5
4
  PixelFormat,
6
5
  TextureDataType,
7
- TextureEncoding,
8
6
  MagnificationTextureFilter,
9
7
  MinificationTextureFilter,
10
8
  CubeTextureMapping,
9
+ ColorSpace,
11
10
  } from '../constants';
12
11
 
13
12
  /**
@@ -41,7 +40,7 @@ export class CubeTexture extends Texture {
41
40
  * @param format See {@link Texture.format | .format}. Default {@link THREE.RGBAFormat}
42
41
  * @param type See {@link Texture.type | .type}. Default {@link THREE.UnsignedByteType}
43
42
  * @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
44
- * @param encoding See {@link Texture.encoding | .encoding}. Default {@link THREE.LinearEncoding}
43
+ * @param colorSpace See {@link Texture.colorSpace | .colorSpace}. Default {@link NoColorSpace}
45
44
  */
46
45
  constructor(
47
46
  images?: any[], // HTMLImageElement or HTMLCanvasElement
@@ -53,7 +52,7 @@ export class CubeTexture extends Texture {
53
52
  format?: PixelFormat,
54
53
  type?: TextureDataType,
55
54
  anisotropy?: number,
56
- encoding?: TextureEncoding,
55
+ colorSpace?: ColorSpace,
57
56
  );
58
57
 
59
58
  /**
@@ -4,9 +4,9 @@ import {
4
4
  Wrapping,
5
5
  PixelFormat,
6
6
  TextureDataType,
7
- TextureEncoding,
8
7
  MagnificationTextureFilter,
9
8
  MinificationTextureFilter,
9
+ ColorSpace,
10
10
  } from '../constants';
11
11
  import { TextureImageData } from './types';
12
12
 
@@ -50,7 +50,7 @@ export class DataTexture extends Texture {
50
50
  * @param magFilter See {@link Texture.magFilter | .magFilter}. Default {@link THREE.NearestFilter}
51
51
  * @param minFilter See {@link Texture.minFilter | .minFilter}. Default {@link THREE.NearestFilter}
52
52
  * @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
53
- * @param encoding See {@link Texture.encoding | .encoding}. Default {@link THREE.LinearEncoding}
53
+ * @param colorSpace See {@link Texture.colorSpace | .colorSpace}. Default {@link NoColorSpace}
54
54
  */
55
55
  constructor(
56
56
  data?: BufferSource | null,
@@ -64,7 +64,7 @@ export class DataTexture extends Texture {
64
64
  magFilter?: MagnificationTextureFilter,
65
65
  minFilter?: MinificationTextureFilter,
66
66
  anisotropy?: number,
67
- encoding?: TextureEncoding,
67
+ colorSpace?: ColorSpace,
68
68
  );
69
69
 
70
70
  /**
@@ -13,6 +13,7 @@ import {
13
13
  MinificationTextureFilter,
14
14
  AnyPixelFormat,
15
15
  AnyMapping,
16
+ ColorSpace,
16
17
  } from '../constants';
17
18
 
18
19
  /** Shim for OffscreenCanvas. */
@@ -49,7 +50,7 @@ export class Texture extends EventDispatcher {
49
50
  * @param format See {@link Texture.format | .format}. Default {@link THREE.RGBAFormat}
50
51
  * @param type See {@link Texture.type | .type}. Default {@link THREE.UnsignedByteType}
51
52
  * @param anisotropy See {@link Texture.anisotropy | .anisotropy}. Default {@link THREE.Texture.DEFAULT_ANISOTROPY}
52
- * @param encoding See {@link Texture.encoding | .encoding}. Default {@link THREE.LinearEncoding}
53
+ * @param colorSpace See {@link Texture.colorSpace | .colorSpace}. Default {@link THREE.NoColorSpace}
53
54
  */
54
55
  constructor(
55
56
  image?: TexImageSource | OffscreenCanvas,
@@ -61,7 +62,23 @@ export class Texture extends EventDispatcher {
61
62
  format?: PixelFormat,
62
63
  type?: TextureDataType,
63
64
  anisotropy?: number,
64
- encoding?: TextureEncoding,
65
+ colorSpace?: ColorSpace,
66
+ );
67
+
68
+ /**
69
+ * @deprecated
70
+ */
71
+ constructor(
72
+ image: TexImageSource | OffscreenCanvas,
73
+ mapping: Mapping,
74
+ wrapS: Wrapping,
75
+ wrapT: Wrapping,
76
+ magFilter: MagnificationTextureFilter,
77
+ minFilter: MinificationTextureFilter,
78
+ format: PixelFormat,
79
+ type: TextureDataType,
80
+ anisotropy: number,
81
+ encoding: TextureEncoding,
65
82
  );
66
83
 
67
84
  /**
@@ -123,6 +140,12 @@ export class Texture extends EventDispatcher {
123
140
  */
124
141
  mapping: AnyMapping;
125
142
 
143
+ /**
144
+ * Lets you select the uv attribute to map the texture to. `0` for `uv`, `1` for `uv1`, `2` for `uv2` and `3` for
145
+ * `uv3`.
146
+ */
147
+ channel: number;
148
+
126
149
  /**
127
150
  * This defines how the {@link Texture} is wrapped *horizontally* and corresponds to **U** in UV mapping.
128
151
  * @remarks for **WEBGL1** - tiling of images in textures only functions if image dimensions are powers of two
@@ -232,26 +255,6 @@ export class Texture extends EventDispatcher {
232
255
  /**
233
256
  * How much a single repetition of the texture is offset from the beginning, in each direction **U** and **V**.
234
257
  * @remarks Typical range is `0.0` to `1.0`.
235
- * @remarks
236
- * The below texture types share the `first` uv channel in the engine.
237
- * The offset (and repeat) setting is evaluated according to the following priorities and then shared by those textures:
238
- * - color map
239
- * - specular map
240
- * - displacement map
241
- * - normal map
242
- * - bump map
243
- * - roughness map
244
- * - metalness map
245
- * - alpha map
246
- * - emissive map
247
- * - clearcoat map
248
- * - clearcoat normal map
249
- * - clearcoat roughnessMap map
250
- * @remarks
251
- * The below {@link Texture} types share the `second` uv channel in the engine.
252
- * The offset (and repeat) setting is evaluated according to the following priorities and then shared by those textures:
253
- * - ao map
254
- * - light map
255
258
  * @defaultValue `new THREE.Vector2(0, 0)`
256
259
  */
257
260
  offset: Vector2;
@@ -261,8 +264,6 @@ export class Texture extends EventDispatcher {
261
264
  * @remarks
262
265
  * If repeat is set greater than `1` in either direction, the corresponding *Wrap* parameter should
263
266
  * also be set to {@link THREE.RepeatWrapping} or {@link THREE.MirroredRepeatWrapping} to achieve the desired tiling effect.
264
- * @remarks
265
- * Setting different repeat values for textures is restricted in the same way like {@link .offset | .offset}.
266
267
  * @see {@link wrapS}
267
268
  * @see {@link wrapT}
268
269
  * @defaultValue `new THREE.Vector2( 1, 1 )`
@@ -332,9 +333,21 @@ export class Texture extends EventDispatcher {
332
333
  * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
333
334
  * @see {@link THREE.TextureDataType}
334
335
  * @defaultValue {@link THREE.LinearEncoding}
336
+ * @deprecated Use {@link Texture.colorSpace .colorSpace} in three.js r152+.
335
337
  */
336
338
  encoding: TextureEncoding;
337
339
 
340
+ /**
341
+ * The {@link Textures | {@link Texture} constants} page for details of other color spaces.
342
+ * @remarks
343
+ * Textures containing color data should be annotated with {@link SRGBColorSpace THREE.SRGBColorSpace} or
344
+ * {@link LinearSRGBColorSpace THREE.LinearSRGBColorSpace}.
345
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
346
+ * @see {@link THREE.TextureDataType}
347
+ * @defaultValue {@link THREE.NoColorSpace}
348
+ */
349
+ colorSpace: ColorSpace;
350
+
338
351
  /**
339
352
  * Indicates whether a texture belongs to a render target or not
340
353
  * @defaultValue `false`
@@ -1,5 +0,0 @@
1
- import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements';
2
- import Node from '../../core/Node';
3
- declare const getDistanceAttenuation: ShaderNode<{ lightDistance: Node; cutoffDistance: Node; decayExponent: Node }>;
4
-
5
- export default getDistanceAttenuation;
@@ -1,12 +0,0 @@
1
- import AnalyticLightNode from './AnalyticLightNode';
2
- import Node from '../core/Node';
3
- import { PointLight, SpotLight } from '../../../../src/Three';
4
-
5
- export type PunctualLight = PointLight | SpotLight;
6
-
7
- export default class PunctualLightNode extends AnalyticLightNode<PunctualLight> {
8
- cutoffDistanceNode: Node;
9
- decayExponentNode: Node;
10
-
11
- constructor(light?: PunctualLight | null);
12
- }