@types/three 0.149.0 → 0.150.1

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 (103) hide show
  1. three/README.md +2 -2
  2. three/build/three.d.cts +2 -0
  3. three/build/three.d.ts +2 -0
  4. three/build/three.module.d.ts +2 -0
  5. three/examples/jsm/controls/OrbitControls.d.ts +5 -0
  6. three/examples/jsm/controls/TransformControls.d.ts +1 -5
  7. three/examples/jsm/geometries/TextGeometry.d.ts +92 -15
  8. three/examples/jsm/helpers/OctreeHelper.d.ts +1 -1
  9. three/examples/jsm/libs/fflate.module.d.ts +1 -0
  10. three/examples/jsm/libs/lil-gui.module.min.d.ts +1 -0
  11. three/examples/jsm/libs/stats.module.d.ts +2 -23
  12. three/examples/jsm/loaders/EXRLoader.d.ts +3 -2
  13. three/examples/jsm/misc/GPUComputationRenderer.d.ts +4 -2
  14. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +3 -4
  15. three/examples/jsm/objects/MarchingCubes.d.ts +1 -0
  16. three/examples/jsm/shaders/VelocityShader.d.ts +2 -2
  17. three/index.d.ts +1 -1
  18. three/package.json +19 -4
  19. three/src/Three.d.ts +0 -1
  20. three/src/audio/Audio.d.ts +184 -20
  21. three/src/audio/AudioAnalyser.d.ts +42 -4
  22. three/src/audio/AudioContext.d.ts +12 -1
  23. three/src/audio/AudioListener.d.ts +76 -8
  24. three/src/audio/PositionalAudio.d.ts +86 -5
  25. three/src/cameras/ArrayCamera.d.ts +23 -2
  26. three/src/cameras/Camera.d.ts +42 -13
  27. three/src/cameras/CubeCamera.d.ts +49 -1
  28. three/src/cameras/OrthographicCamera.d.ts +77 -25
  29. three/src/cameras/PerspectiveCamera.d.ts +132 -56
  30. three/src/cameras/StereoCamera.d.ts +29 -2
  31. three/src/constants.d.ts +790 -245
  32. three/src/core/BufferAttribute.d.ts +456 -85
  33. three/src/core/BufferGeometry.d.ts +237 -67
  34. three/src/core/Clock.d.ts +28 -20
  35. three/src/core/EventDispatcher.d.ts +20 -4
  36. three/src/core/GLBufferAttribute.d.ts +102 -8
  37. three/src/core/InstancedBufferAttribute.d.ts +13 -24
  38. three/src/core/InstancedBufferGeometry.d.ts +22 -4
  39. three/src/core/InstancedInterleavedBuffer.d.ts +10 -2
  40. three/src/core/InterleavedBuffer.d.ts +98 -14
  41. three/src/core/InterleavedBufferAttribute.d.ts +146 -7
  42. three/src/core/Layers.d.ts +61 -6
  43. three/src/core/Object3D.d.ts +244 -123
  44. three/src/core/Raycaster.d.ts +104 -27
  45. three/src/core/Uniform.d.ts +28 -11
  46. three/src/core/UniformsGroup.d.ts +10 -4
  47. three/src/extras/Earcut.d.ts +3 -4
  48. three/src/geometries/BoxGeometry.d.ts +39 -16
  49. three/src/geometries/CapsuleGeometry.d.ts +35 -12
  50. three/src/geometries/CircleGeometry.d.ts +38 -12
  51. three/src/geometries/ConeGeometry.d.ts +45 -10
  52. three/src/geometries/CylinderGeometry.d.ts +41 -19
  53. three/src/geometries/DodecahedronGeometry.d.ts +14 -5
  54. three/src/geometries/EdgesGeometry.d.ts +30 -8
  55. three/src/geometries/ExtrudeGeometry.d.ts +93 -12
  56. three/src/geometries/IcosahedronGeometry.d.ts +15 -5
  57. three/src/geometries/LatheGeometry.d.ts +41 -12
  58. three/src/geometries/OctahedronGeometry.d.ts +14 -5
  59. three/src/geometries/PlaneGeometry.d.ts +35 -12
  60. three/src/geometries/PolyhedronGeometry.d.ts +41 -12
  61. three/src/geometries/RingGeometry.d.ts +39 -16
  62. three/src/geometries/ShapeGeometry.d.ts +44 -4
  63. three/src/geometries/SphereGeometry.d.ts +43 -21
  64. three/src/geometries/TetrahedronGeometry.d.ts +14 -5
  65. three/src/geometries/TorusGeometry.d.ts +35 -13
  66. three/src/geometries/TorusKnotGeometry.d.ts +39 -16
  67. three/src/geometries/TubeGeometry.d.ts +63 -15
  68. three/src/geometries/WireframeGeometry.d.ts +30 -4
  69. three/src/materials/MeshPhysicalMaterial.d.ts +13 -1
  70. three/src/math/Color.d.ts +157 -3
  71. three/src/math/ColorManagement.d.ts +13 -7
  72. three/src/objects/Bone.d.ts +30 -3
  73. three/src/objects/Group.d.ts +37 -1
  74. three/src/objects/InstancedMesh.d.ts +122 -3
  75. three/src/objects/LOD.d.ts +62 -18
  76. three/src/objects/Line.d.ts +67 -4
  77. three/src/objects/LineLoop.d.ts +26 -1
  78. three/src/objects/LineSegments.d.ts +21 -9
  79. three/src/objects/Mesh.d.ts +60 -4
  80. three/src/objects/Points.d.ts +39 -8
  81. three/src/objects/Skeleton.d.ts +89 -3
  82. three/src/objects/SkinnedMesh.d.ts +122 -3
  83. three/src/objects/Sprite.d.ts +51 -4
  84. three/src/renderers/WebGLRenderTarget.d.ts +9 -3
  85. three/src/renderers/WebGLRenderer.d.ts +2 -2
  86. three/src/scenes/Fog.d.ts +59 -7
  87. three/src/scenes/FogExp2.d.ts +41 -6
  88. three/src/scenes/Scene.d.ts +45 -22
  89. three/src/textures/CanvasTexture.d.ts +35 -13
  90. three/src/textures/CompressedArrayTexture.d.ts +39 -5
  91. three/src/textures/CompressedTexture.d.ts +49 -20
  92. three/src/textures/CubeTexture.d.ts +71 -18
  93. three/src/textures/Data3DTexture.d.ts +74 -10
  94. three/src/textures/DataArrayTexture.d.ts +83 -9
  95. three/src/textures/DataTexture.d.ts +81 -26
  96. three/src/textures/DepthTexture.d.ts +71 -15
  97. three/src/textures/FramebufferTexture.d.ts +57 -2
  98. three/src/textures/Source.d.ts +23 -13
  99. three/src/textures/Texture.d.ts +289 -73
  100. three/src/textures/VideoTexture.d.ts +69 -13
  101. three/src/textures/types.d.ts +9 -0
  102. three/src/utils.d.ts +5 -2
  103. three/examples/jsm/libs/fflate.module.min.d.ts +0 -1185
three/src/constants.d.ts CHANGED
@@ -11,160 +11,834 @@ export enum MOUSE {
11
11
  }
12
12
 
13
13
  export enum TOUCH {
14
- ROTATE,
15
- PAN,
16
- DOLLY_PAN,
17
- DOLLY_ROTATE,
14
+ ROTATE = 0,
15
+ PAN = 1,
16
+ DOLLY_PAN = 2,
17
+ DOLLY_ROTATE = 3,
18
18
  }
19
19
 
20
20
  // GL STATE CONSTANTS
21
- export enum CullFace {}
22
- export const CullFaceNone: CullFace;
23
- export const CullFaceBack: CullFace;
24
- export const CullFaceFront: CullFace;
25
- export const CullFaceFrontBack: CullFace;
21
+ export const CullFaceNone: 0;
22
+ export const CullFaceBack: 1;
23
+ export const CullFaceFront: 2;
24
+ export const CullFaceFrontBack: 3;
25
+ export type CullFace = typeof CullFaceNone | typeof CullFaceBack | typeof CullFaceFront | typeof CullFaceFrontBack;
26
26
 
27
27
  // Shadowing Type
28
- export enum ShadowMapType {}
29
- export const BasicShadowMap: ShadowMapType;
30
- export const PCFShadowMap: ShadowMapType;
31
- export const PCFSoftShadowMap: ShadowMapType;
32
- export const VSMShadowMap: ShadowMapType;
28
+ export const BasicShadowMap: 0;
29
+ export const PCFShadowMap: 1;
30
+ export const PCFSoftShadowMap: 2;
31
+ export const VSMShadowMap: 3;
32
+ export type ShadowMapType = typeof BasicShadowMap | typeof PCFShadowMap | typeof PCFSoftShadowMap | typeof VSMShadowMap;
33
33
 
34
34
  // MATERIAL CONSTANTS
35
35
 
36
36
  // side
37
+ export const FrontSide: 0;
38
+ export const BackSide: 1;
39
+ export const DoubleSide: 2;
40
+ export const TwoPassDoubleSide: 2;
37
41
  /**
38
42
  * Defines which side of faces will be rendered - front, back or both.
39
43
  * Default is {@link FrontSide}.
40
44
  */
41
- export enum Side {}
42
- export const FrontSide: Side;
43
- export const BackSide: Side;
44
- export const DoubleSide: Side;
45
+ export type Side = typeof FrontSide | typeof BackSide | typeof DoubleSide | typeof TwoPassDoubleSide;
45
46
 
46
47
  // blending modes
47
- export enum Blending {}
48
- export const NoBlending: Blending;
49
- export const NormalBlending: Blending;
50
- export const AdditiveBlending: Blending;
51
- export const SubtractiveBlending: Blending;
52
- export const MultiplyBlending: Blending;
53
- export const CustomBlending: Blending;
48
+ export const NoBlending: 0;
49
+ export const NormalBlending: 1;
50
+ export const AdditiveBlending: 2;
51
+ export const SubtractiveBlending: 3;
52
+ export const MultiplyBlending: 4;
53
+ export const CustomBlending: 5;
54
+ export type Blending =
55
+ | typeof NoBlending
56
+ | typeof NormalBlending
57
+ | typeof AdditiveBlending
58
+ | typeof SubtractiveBlending
59
+ | typeof MultiplyBlending
60
+ | typeof CustomBlending;
54
61
 
55
62
  // custom blending equations
56
63
  // (numbers start from 100 not to clash with other
57
64
  // mappings to OpenGL constants defined in Texture.js)
58
- export enum BlendingEquation {}
59
- export const AddEquation: BlendingEquation;
60
- export const SubtractEquation: BlendingEquation;
61
- export const ReverseSubtractEquation: BlendingEquation;
62
- export const MinEquation: BlendingEquation;
63
- export const MaxEquation: BlendingEquation;
65
+ export const AddEquation: 100;
66
+ export const SubtractEquation: 101;
67
+ export const ReverseSubtractEquation: 102;
68
+ export const MinEquation: 103;
69
+ export const MaxEquation: 104;
70
+ export type BlendingEquation =
71
+ | typeof AddEquation
72
+ | typeof SubtractEquation
73
+ | typeof ReverseSubtractEquation
74
+ | typeof MinEquation
75
+ | typeof MaxEquation;
64
76
 
65
77
  // custom blending destination factors
66
- export enum BlendingDstFactor {}
67
- export const ZeroFactor: BlendingDstFactor;
68
- export const OneFactor: BlendingDstFactor;
69
- export const SrcColorFactor: BlendingDstFactor;
70
- export const OneMinusSrcColorFactor: BlendingDstFactor;
71
- export const SrcAlphaFactor: BlendingDstFactor;
72
- export const OneMinusSrcAlphaFactor: BlendingDstFactor;
73
- export const DstAlphaFactor: BlendingDstFactor;
74
- export const OneMinusDstAlphaFactor: BlendingDstFactor;
75
- export const DstColorFactor: BlendingDstFactor;
76
- export const OneMinusDstColorFactor: BlendingDstFactor;
78
+ export const ZeroFactor: 200;
79
+ export const OneFactor: 201;
80
+ export const SrcColorFactor: 202;
81
+ export const OneMinusSrcColorFactor: 203;
82
+ export const SrcAlphaFactor: 204;
83
+ export const OneMinusSrcAlphaFactor: 205;
84
+ export const DstAlphaFactor: 206;
85
+ export const OneMinusDstAlphaFactor: 207;
86
+ export const DstColorFactor: 208;
87
+ export const OneMinusDstColorFactor: 209;
88
+ export type BlendingDstFactor =
89
+ | typeof ZeroFactor
90
+ | typeof OneFactor
91
+ | typeof SrcColorFactor
92
+ | typeof OneMinusSrcColorFactor
93
+ | typeof SrcAlphaFactor
94
+ | typeof OneMinusSrcAlphaFactor
95
+ | typeof DstAlphaFactor
96
+ | typeof OneMinusDstAlphaFactor
97
+ | typeof DstColorFactor
98
+ | typeof OneMinusDstColorFactor;
77
99
 
78
100
  // custom blending src factors
79
- export enum BlendingSrcFactor {}
80
- export const SrcAlphaSaturateFactor: BlendingSrcFactor;
101
+ export const SrcAlphaSaturateFactor: 210;
102
+ export type BlendingSrcFactor = typeof SrcAlphaSaturateFactor;
81
103
 
82
104
  // depth modes
83
- export enum DepthModes {}
84
- export const NeverDepth: DepthModes;
85
- export const AlwaysDepth: DepthModes;
86
- export const LessDepth: DepthModes;
87
- export const LessEqualDepth: DepthModes;
88
- export const EqualDepth: DepthModes;
89
- export const GreaterEqualDepth: DepthModes;
90
- export const GreaterDepth: DepthModes;
91
- export const NotEqualDepth: DepthModes;
105
+ export const NeverDepth: 0;
106
+ export const AlwaysDepth: 1;
107
+ export const LessDepth: 2;
108
+ export const LessEqualDepth: 3;
109
+ export const EqualDepth: 4;
110
+ export const GreaterEqualDepth: 5;
111
+ export const GreaterDepth: 6;
112
+ export const NotEqualDepth: 7;
113
+ export type DepthModes =
114
+ | typeof NeverDepth
115
+ | typeof AlwaysDepth
116
+ | typeof LessDepth
117
+ | typeof LessEqualDepth
118
+ | typeof EqualDepth
119
+ | typeof GreaterEqualDepth
120
+ | typeof GreaterDepth
121
+ | typeof NotEqualDepth;
92
122
 
93
123
  // TEXTURE CONSTANTS
94
124
  // Operations
95
- export enum Combine {}
96
- export const MultiplyOperation: Combine;
97
- export const MixOperation: Combine;
98
- export const AddOperation: Combine;
125
+ export const MultiplyOperation: 0;
126
+ export const MixOperation: 1;
127
+ export const AddOperation: 2;
128
+ export type Combine = typeof MultiplyOperation | typeof MixOperation | typeof AddOperation;
99
129
 
100
130
  // Tone Mapping modes
101
- export enum ToneMapping {}
102
- export const NoToneMapping: ToneMapping;
103
- export const LinearToneMapping: ToneMapping;
104
- export const ReinhardToneMapping: ToneMapping;
105
- export const CineonToneMapping: ToneMapping;
106
- export const ACESFilmicToneMapping: ToneMapping;
107
- export const CustomToneMapping: ToneMapping;
108
-
131
+ export const NoToneMapping: 0;
132
+ export const LinearToneMapping: 1;
133
+ export const ReinhardToneMapping: 2;
134
+ export const CineonToneMapping: 3;
135
+ export const ACESFilmicToneMapping: 4;
136
+ export const CustomToneMapping: 5;
137
+ export type ToneMapping =
138
+ | typeof NoToneMapping
139
+ | typeof LinearToneMapping
140
+ | typeof ReinhardToneMapping
141
+ | typeof CineonToneMapping
142
+ | typeof ACESFilmicToneMapping
143
+ | typeof CustomToneMapping;
144
+
145
+ ///////////////////////////////////////////////////////////////////////////////
146
+ ///////////////////////////////////////////////////////////////////////////////
147
+ ///////////////////////////////////////////////////////////////////////////////
109
148
  // Mapping modes
110
- export enum Mapping {}
111
- export const UVMapping: Mapping;
112
- export const CubeReflectionMapping: Mapping;
113
- export const CubeRefractionMapping: Mapping;
114
- export const EquirectangularReflectionMapping: Mapping;
115
- export const EquirectangularRefractionMapping: Mapping;
116
- export const CubeUVReflectionMapping: Mapping;
117
149
 
150
+ /**
151
+ * Maps the texture using the mesh's UV coordinates.
152
+ * @remarks This is the _default_ value and behaver for Texture Mapping.
153
+ */
154
+ export const UVMapping: 300;
155
+
156
+ /**
157
+ * @remarks This is the _default_ value and behaver for Cube Texture Mapping.
158
+ */
159
+ export const CubeReflectionMapping: 301;
160
+ export const CubeRefractionMapping: 302;
161
+ export const CubeUVReflectionMapping: 306;
162
+
163
+ export const EquirectangularReflectionMapping: 303;
164
+ export const EquirectangularRefractionMapping: 304;
165
+
166
+ /**
167
+ * Texture Mapping Modes for non-cube Textures
168
+ * @remarks {@link UVMapping} is the _default_ value and behaver for Texture Mapping.
169
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
170
+ */
171
+ export type Mapping =
172
+ | typeof UVMapping
173
+ | typeof EquirectangularReflectionMapping
174
+ | typeof EquirectangularRefractionMapping;
175
+
176
+ /**
177
+ * Texture Mapping Modes for cube Textures
178
+ * @remarks {@link CubeReflectionMapping} is the _default_ value and behaver for Cube Texture Mapping.
179
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
180
+ */
181
+ export type CubeTextureMapping =
182
+ | typeof CubeReflectionMapping
183
+ | typeof CubeRefractionMapping
184
+ | typeof CubeUVReflectionMapping;
185
+
186
+ /**
187
+ * Texture Mapping Modes for any type of Textures
188
+ * @see {@link Mapping} and {@link CubeTextureMapping}
189
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
190
+ */
191
+ export type AnyMapping = Mapping | CubeTextureMapping;
192
+
193
+ ///////////////////////////////////////////////////////////////////////////////
118
194
  // Wrapping modes
119
- export enum Wrapping {}
120
- export const RepeatWrapping: Wrapping;
121
- export const ClampToEdgeWrapping: Wrapping;
122
- export const MirroredRepeatWrapping: Wrapping;
123
195
 
196
+ /** With {@link RepeatWrapping} the texture will simply repeat to infinity. */
197
+ export const RepeatWrapping: 1000;
198
+ /**
199
+ * With {@link ClampToEdgeWrapping} the last pixel of the texture stretches to the edge of the mesh.
200
+ * @remarks This is the _default_ value and behaver for Wrapping Mapping.
201
+ */
202
+ export const ClampToEdgeWrapping: 1001;
203
+ /** With {@link MirroredRepeatWrapping} the texture will repeats to infinity, mirroring on each repeat. */
204
+ export const MirroredRepeatWrapping: 1002;
205
+
206
+ /**
207
+ * Texture Wrapping Modes
208
+ * @remarks {@link ClampToEdgeWrapping} is the _default_ value and behaver for Wrapping Mapping.
209
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
210
+ */
211
+ export type Wrapping = typeof RepeatWrapping | typeof ClampToEdgeWrapping | typeof MirroredRepeatWrapping;
212
+
213
+ ///////////////////////////////////////////////////////////////////////////////
124
214
  // Filters
125
- export enum TextureFilter {}
126
- export const NearestFilter: TextureFilter;
127
- export const NearestMipmapNearestFilter: TextureFilter;
128
- export const NearestMipMapNearestFilter: TextureFilter;
129
- export const NearestMipmapLinearFilter: TextureFilter;
130
- export const NearestMipMapLinearFilter: TextureFilter;
131
- export const LinearFilter: TextureFilter;
132
- export const LinearMipmapNearestFilter: TextureFilter;
133
- export const LinearMipMapNearestFilter: TextureFilter;
134
- export const LinearMipmapLinearFilter: TextureFilter;
135
- export const LinearMipMapLinearFilter: TextureFilter;
136
215
 
216
+ /** {@link NearestFilter} returns the value of the texture element that is nearest (in Manhattan distance) to the specified texture coordinates. */
217
+ export const NearestFilter: 1003;
218
+
219
+ /**
220
+ * {@link NearestMipmapNearestFilter} chooses the mipmap that most closely matches the size of the pixel being textured
221
+ * and uses the {@link NearestFilter} criterion (the texel nearest to the center of the pixel) to produce a texture value.
222
+ */
223
+ export const NearestMipmapNearestFilter: 1004;
224
+ /**
225
+ * {@link NearestMipmapNearestFilter} chooses the mipmap that most closely matches the size of the pixel being textured
226
+ * and uses the {@link NearestFilter} criterion (the texel nearest to the center of the pixel) to produce a texture value.
227
+ */
228
+ export const NearestMipMapNearestFilter: 1004;
229
+
230
+ /**
231
+ * {@link NearestMipmapLinearFilter} chooses the two mipmaps that most closely match the size of the pixel being textured
232
+ * and uses the {@link NearestFilter} criterion to produce a texture value from each mipmap.
233
+ * The final texture value is a weighted average of those two values.
234
+ */
235
+ export const NearestMipmapLinearFilter: 1005;
236
+ /**
237
+ * {@link NearestMipMapLinearFilter} chooses the two mipmaps that most closely match the size of the pixel being textured
238
+ * and uses the {@link NearestFilter} criterion to produce a texture value from each mipmap.
239
+ * The final texture value is a weighted average of those two values.
240
+ */
241
+ export const NearestMipMapLinearFilter: 1005;
242
+
243
+ /**
244
+ * {@link LinearFilter} returns the weighted average of the four texture elements that are closest to the specified texture coordinates,
245
+ * and can include items wrapped or repeated from other parts of a texture,
246
+ * depending on the values of {@link THREE.Texture.wrapS | wrapS} and {@link THREE.Texture.wrapT | wrapT}, and on the exact mapping.
247
+ */
248
+ export const LinearFilter: 1006;
249
+
250
+ /**
251
+ * {@link LinearMipmapNearestFilter} chooses the mipmap that most closely matches the size of the pixel being textured and
252
+ * uses the {@link LinearFilter} criterion (a weighted average of the four texels that are closest to the center of the pixel) to produce a texture value.
253
+ */
254
+ export const LinearMipmapNearestFilter: 1007;
255
+ /**
256
+ * {@link LinearMipMapNearestFilter} chooses the mipmap that most closely matches the size of the pixel being textured and
257
+ * uses the {@link LinearFilter} criterion (a weighted average of the four texels that are closest to the center of the pixel) to produce a texture value.
258
+ */
259
+ export const LinearMipMapNearestFilter: 1007;
260
+
261
+ /**
262
+ * {@link LinearMipmapLinearFilter} is the default and chooses the two mipmaps that most closely match the size of the pixel being textured and
263
+ * uses the {@link LinearFilter} criterion to produce a texture value from each mipmap.
264
+ * The final texture value is a weighted average of those two values.
265
+ */
266
+ export const LinearMipmapLinearFilter: 1008;
267
+
268
+ /**
269
+ * {@link LinearMipMapLinearFilter} is the default and chooses the two mipmaps that most closely match the size of the pixel being textured and
270
+ * uses the {@link LinearFilter} criterion to produce a texture value from each mipmap.
271
+ * The final texture value is a weighted average of those two values.
272
+ */
273
+ export const LinearMipMapLinearFilter: 1008;
274
+
275
+ /**
276
+ * Texture Magnification Filter Modes.
277
+ * For use with a texture's {@link THREE.Texture.magFilter | magFilter} property,
278
+ * these define the texture magnification function to be used when the pixel being textured maps to an area less than or equal to one texture element (texel).
279
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
280
+ * @see {@link https://sbcode.net/threejs/mipmaps/ | Texture Mipmaps (non-official)}
281
+ */
282
+ export type MagnificationTextureFilter = typeof NearestFilter | typeof LinearFilter;
283
+
284
+ /**
285
+ * Texture Minification Filter Modes.
286
+ * For use with a texture's {@link THREE.Texture.minFilter | minFilter} property,
287
+ * these define the texture minifying function that is used whenever the pixel being textured maps to an area greater than one texture element (texel).
288
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
289
+ * @see {@link https://sbcode.net/threejs/mipmaps/ | Texture Mipmaps (non-official)}
290
+ */
291
+ export type MinificationTextureFilter =
292
+ | typeof NearestFilter
293
+ | typeof NearestMipmapNearestFilter
294
+ | typeof NearestMipMapNearestFilter
295
+ | typeof NearestMipmapLinearFilter
296
+ | typeof NearestMipMapLinearFilter
297
+ | typeof LinearFilter
298
+ | typeof LinearMipmapNearestFilter
299
+ | typeof LinearMipMapNearestFilter
300
+ | typeof LinearMipmapLinearFilter
301
+ | typeof LinearMipMapLinearFilter;
302
+
303
+ /**
304
+ * Texture all Magnification and Minification Filter Modes.
305
+ * @see {@link MagnificationTextureFilter} and {@link MinificationTextureFilter}
306
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
307
+ * @see {@link https://sbcode.net/threejs/mipmaps/ | Texture Mipmaps (non-official)}
308
+ */
309
+ export type TextureFilter = MagnificationTextureFilter | MinificationTextureFilter;
310
+
311
+ ///////////////////////////////////////////////////////////////////////////////
137
312
  // Data types
138
- export enum TextureDataType {}
139
- export const UnsignedByteType: TextureDataType;
140
- export const ByteType: TextureDataType;
141
- export const ShortType: TextureDataType;
142
- export const UnsignedShortType: TextureDataType;
143
- export const IntType: TextureDataType;
144
- export const UnsignedIntType: TextureDataType;
145
- export const FloatType: TextureDataType;
146
- export const HalfFloatType: TextureDataType;
147
- export const UnsignedShort4444Type: TextureDataType;
148
- export const UnsignedShort5551Type: TextureDataType;
149
- export const UnsignedInt248Type: TextureDataType;
150
313
 
314
+ export const UnsignedByteType: 1009;
315
+ export const ByteType: 1010;
316
+ export const ShortType: 1011;
317
+ export const UnsignedShortType: 1012;
318
+ export const IntType: 1013;
319
+ export const UnsignedIntType: 1014;
320
+ export const FloatType: 1015;
321
+ export const HalfFloatType: 1016;
322
+ export const UnsignedShort4444Type: 1017;
323
+ export const UnsignedShort5551Type: 1018;
324
+ export const UnsignedInt248Type: 1020;
325
+
326
+ /**
327
+ * Texture Types.
328
+ * @remarks Must correspond to the correct {@link PixelFormat | format}.
329
+ * @see {@link THREE.Texture.type}
330
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
331
+ */
332
+ export type TextureDataType =
333
+ | typeof UnsignedByteType
334
+ | typeof ByteType
335
+ | typeof ShortType
336
+ | typeof UnsignedShortType
337
+ | typeof IntType
338
+ | typeof UnsignedIntType
339
+ | typeof FloatType
340
+ | typeof HalfFloatType
341
+ | typeof UnsignedShort4444Type
342
+ | typeof UnsignedShort5551Type
343
+ | typeof UnsignedInt248Type;
344
+
345
+ ///////////////////////////////////////////////////////////////////////////////
151
346
  // Pixel formats
152
- export enum PixelFormat {}
153
- export const AlphaFormat: PixelFormat;
154
- export const RGBAFormat: PixelFormat;
155
- export const LuminanceFormat: PixelFormat;
156
- export const LuminanceAlphaFormat: PixelFormat;
157
- export const DepthFormat: PixelFormat;
158
- export const DepthStencilFormat: PixelFormat;
159
- export const RedFormat: PixelFormat;
160
- export const RedIntegerFormat: PixelFormat;
161
- export const RGFormat: PixelFormat;
162
- export const RGIntegerFormat: PixelFormat;
163
- export const RGBAIntegerFormat: PixelFormat;
164
- export const _SRGBFormat: PixelFormat; // fallback for WebGL 1
165
- export const _SRGBAFormat: PixelFormat; // fallback for WebGL 1
166
-
167
- // Internal Pixel Formats
347
+
348
+ /** {@link AlphaFormat} discards the red, green and blue components and reads just the alpha component. */
349
+ export const AlphaFormat: 1021;
350
+
351
+ /** {@link RGBAFormat} discards the green and blue components and reads just the red component. (Can only be used with a WebGL 2 rendering context). */
352
+ export const RGBAFormat: 1023;
353
+
354
+ /**
355
+ * {@link LuminanceFormat} reads each element as a single luminance component.
356
+ * This is then converted to a floating point, clamped to the range `[0,1]`, and then assembled into an RGBA element by
357
+ * placing the luminance value in the red, green and blue channels, and attaching `1.0` to the alpha channel.
358
+ */
359
+ export const LuminanceFormat: 1024;
360
+
361
+ /**
362
+ * {@link LuminanceAlphaFormat} reads each element as a luminance/alpha double.
363
+ * The same process occurs as for the {@link LuminanceFormat}, except that the alpha channel may have values other than `1.0`.
364
+ */
365
+ export const LuminanceAlphaFormat: 1025;
366
+
367
+ /**
368
+ * {@link DepthFormat} reads each element as a single depth value, converts it to floating point, and clamps to the range `[0,1]`.
369
+ * @remarks This is the default for {@link THREE.DepthTexture}.
370
+ */
371
+ export const DepthFormat: 1026;
372
+
373
+ /**
374
+ * {@link DepthStencilFormat} reads each element is a pair of depth and stencil values.
375
+ * The depth component of the pair is interpreted as in {@link DepthFormat}.
376
+ * The stencil component is interpreted based on the depth + stencil internal format.
377
+ */
378
+ export const DepthStencilFormat: 1027;
379
+
380
+ /**
381
+ * {@link RedFormat} discards the green and blue components and reads just the red component.
382
+ * @remarks Can only be used with a WebGL 2 rendering context.
383
+ */
384
+ export const RedFormat: 1028;
385
+
386
+ /**
387
+ * {@link RedIntegerFormat} discards the green and blue components and reads just the red component.
388
+ * The texels are read as integers instead of floating point.
389
+ * @remarks Can only be used with a WebGL 2 rendering context.
390
+ */
391
+ export const RedIntegerFormat: 1029;
392
+
393
+ /**
394
+ * {@link RGFormat} discards the alpha, and blue components and reads the red, and green components.
395
+ * @remarks Can only be used with a WebGL 2 rendering context.
396
+ */
397
+ export const RGFormat: 1030;
398
+
399
+ /**
400
+ * {@link RGIntegerFormat} discards the alpha, and blue components and reads the red, and green components.
401
+ * The texels are read as integers instead of floating point.
402
+ * @remarks Can only be used with a WebGL 2 rendering context.
403
+ */
404
+ export const RGIntegerFormat: 1031;
405
+
406
+ /**
407
+ * {@link RGBAIntegerFormat} reads the red, green, blue and alpha component
408
+ * @remarks This is the default for {@link THREE.Texture}.
409
+ */
410
+ export const RGBAIntegerFormat: 1033;
411
+
412
+ export const _SRGBAFormat = 1035; // fallback for WebGL 1
413
+
414
+ /**
415
+ * Texture Pixel Formats Modes. Compatible only with {@link WebGLRenderingContext | WebGL 1 Rendering Context}.
416
+ * @remarks Note that the texture must have the correct {@link THREE.Texture.type} set, as described in {@link TextureDataType}.
417
+ * @see {@link WebGLRenderingContext.texImage2D} for details.
418
+ * @see {@link WebGL2PixelFormat} and {@link PixelFormat}
419
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
420
+ */
421
+ export type WebGL1PixelFormat =
422
+ | typeof AlphaFormat
423
+ | typeof LuminanceFormat
424
+ | typeof LuminanceAlphaFormat
425
+ | typeof DepthFormat
426
+ | typeof DepthStencilFormat
427
+ | typeof RedFormat
428
+ | typeof RedIntegerFormat
429
+ | typeof RGFormat
430
+ | typeof _SRGBAFormat;
431
+
432
+ /**
433
+ * Texture Pixel Formats Modes. Compatible only with {@link WebGL2RenderingContext | WebGL 2 Rendering Context}.
434
+ * @remarks Note that the texture must have the correct {@link THREE.Texture.type} set, as described in {@link TextureDataType}.
435
+ * @see {@link WebGLRenderingContext.texImage2D} for details.
436
+ * @see {@link WebGL2PixelFormat} and {@link PixelFormat}
437
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
438
+ */
439
+ export type WebGL2PixelFormat =
440
+ | typeof AlphaFormat
441
+ | typeof RGBAFormat
442
+ | typeof LuminanceFormat
443
+ | typeof LuminanceAlphaFormat
444
+ | typeof DepthFormat
445
+ | typeof DepthStencilFormat
446
+ | typeof RedFormat
447
+ | typeof RedIntegerFormat
448
+ | typeof RGFormat
449
+ | typeof RGIntegerFormat
450
+ | typeof RGBAIntegerFormat
451
+ | typeof _SRGBAFormat;
452
+
453
+ /**
454
+ * All Texture Pixel Formats Modes.
455
+ * @remarks Note that the texture must have the correct {@link THREE.Texture.type} set, as described in {@link TextureDataType}.
456
+ * @see {@link WebGLRenderingContext.texImage2D} for details.
457
+ * @see {@link WebGL1PixelFormat} and {@link WebGL2PixelFormat}
458
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
459
+ */
460
+ export type PixelFormat = WebGL1PixelFormat | WebGL2PixelFormat;
461
+
462
+ /**
463
+ * All Texture Pixel Formats Modes for {@link THREE.DeepTexture}.
464
+ * @see {@link WebGLRenderingContext.texImage2D} for details.
465
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
466
+ */
467
+ export type DeepTexturePixelFormat = typeof DepthFormat | typeof DepthStencilFormat;
468
+
469
+ ///////////////////////////////////////////////////////////////////////////////
470
+ // Compressed texture formats
471
+ // DDS / ST3C Compressed texture formats
472
+
473
+ /**
474
+ * A DXT1-compressed image in an RGB image format.
475
+ * @remarks Require support for the _WEBGL_compressed_texture_s3tc_ WebGL extension.
476
+ */
477
+ export const RGB_S3TC_DXT1_Format: 33776;
478
+ /**
479
+ * A DXT1-compressed image in an RGB image format with a simple on/off alpha value.
480
+ * @remarks Require support for the _WEBGL_compressed_texture_s3tc_ WebGL extension.
481
+ */
482
+ export const RGBA_S3TC_DXT1_Format: 33777;
483
+ /**
484
+ * A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression.
485
+ * @remarks Require support for the _WEBGL_compressed_texture_s3tc_ WebGL extension.
486
+ */
487
+ export const RGBA_S3TC_DXT3_Format: 33778;
488
+ /**
489
+ * A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 compression in how the alpha compression is done.
490
+ * @remarks Require support for the _WEBGL_compressed_texture_s3tc_ WebGL extension.
491
+ */
492
+ export const RGBA_S3TC_DXT5_Format: 33779;
493
+
494
+ // PVRTC compressed './texture formats
495
+
496
+ /**
497
+ * RGB compression in 4-bit mode. One block for each 4×4 pixels.
498
+ * @remarks Require support for the _WEBGL_compressed_texture_pvrtc_ WebGL extension.
499
+ */
500
+ export const RGB_PVRTC_4BPPV1_Format: 35840;
501
+ /**
502
+ * RGB compression in 2-bit mode. One block for each 8×4 pixels.
503
+ * @remarks Require support for the _WEBGL_compressed_texture_pvrtc_ WebGL extension.
504
+ */
505
+ export const RGB_PVRTC_2BPPV1_Format: 35841;
506
+ /**
507
+ * RGBA compression in 4-bit mode. One block for each 4×4 pixels.
508
+ * @remarks Require support for the _WEBGL_compressed_texture_pvrtc_ WebGL extension.
509
+ */
510
+ export const RGBA_PVRTC_4BPPV1_Format: 35842;
511
+ /**
512
+ * RGBA compression in 2-bit mode. One block for each 8×4 pixels.
513
+ * @remarks Require support for the _WEBGL_compressed_texture_pvrtc_ WebGL extension.
514
+ */
515
+ export const RGBA_PVRTC_2BPPV1_Format: 35843;
516
+
517
+ // ETC compressed texture formats
518
+
519
+ /**
520
+ * @remarks Require support for the _WEBGL_compressed_texture_etc1_ (ETC1) or _WEBGL_compressed_texture_etc_ (ETC2) WebGL extension.
521
+ */
522
+ export const RGB_ETC1_Format: 36196;
523
+ /**
524
+ * @remarks Require support for the _WEBGL_compressed_texture_etc1_ (ETC1) or _WEBGL_compressed_texture_etc_ (ETC2) WebGL extension.
525
+ */
526
+ export const RGB_ETC2_Format: 37492;
527
+ /**
528
+ * @remarks Require support for the _WEBGL_compressed_texture_etc1_ (ETC1) or _WEBGL_compressed_texture_etc_ (ETC2) WebGL extension.
529
+ */
530
+ export const RGBA_ETC2_EAC_Format: 37496;
531
+
532
+ // ASTC compressed texture formats
533
+
534
+ /**
535
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
536
+ */
537
+ export const RGBA_ASTC_4x4_Format: 37808;
538
+ /**
539
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
540
+ */
541
+ export const RGBA_ASTC_5x4_Format: 37809;
542
+ /**
543
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
544
+ */
545
+ export const RGBA_ASTC_5x5_Format: 37810;
546
+ /**
547
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
548
+ */
549
+ export const RGBA_ASTC_6x5_Format: 37811;
550
+ /**
551
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
552
+ */
553
+ export const RGBA_ASTC_6x6_Format: 37812;
554
+ /**
555
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
556
+ */
557
+ export const RGBA_ASTC_8x5_Format: 37813;
558
+ /**
559
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
560
+ */
561
+ export const RGBA_ASTC_8x6_Format: 37814;
562
+ /**
563
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
564
+ */
565
+ export const RGBA_ASTC_8x8_Format: 37815;
566
+ /**
567
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
568
+ */
569
+ export const RGBA_ASTC_10x5_Format: 37816;
570
+ /**
571
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
572
+ */
573
+ export const RGBA_ASTC_10x6_Format: 37817;
574
+ /**
575
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
576
+ */
577
+ export const RGBA_ASTC_10x8_Format: 37818;
578
+ /**
579
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
580
+ */
581
+ export const RGBA_ASTC_10x10_Format: 37819;
582
+ /**
583
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
584
+ */
585
+ export const RGBA_ASTC_12x10_Format: 37820;
586
+ /**
587
+ * @remarks Require support for the _WEBGL_compressed_texture_astc_ WebGL extension.
588
+ */
589
+ export const RGBA_ASTC_12x12_Format: 37821;
590
+
591
+ // BPTC compressed texture formats
592
+
593
+ /**
594
+ * @remarks Require support for the _EXT_texture_compression_bptc_ WebGL extension.
595
+ */
596
+ export const RGBA_BPTC_Format: 36492;
597
+
598
+ // RGTC compressed texture formats
599
+ export const RED_RGTC1_Format: 36283;
600
+ export const SIGNED_RED_RGTC1_Format: 36284;
601
+ export const RED_GREEN_RGTC2_Format: 36285;
602
+ export const SIGNED_RED_GREEN_RGTC2_Format: 36286;
603
+
604
+ /**
605
+ * For use with a {@link THREE.CompressedTexture}'s {@link THREE.CompressedTexture.format | .format} property.
606
+ * @remarks Compressed Require support for correct WebGL extension.
607
+ */
608
+ export type CompressedPixelFormat =
609
+ | typeof RGB_S3TC_DXT1_Format
610
+ | typeof RGBA_S3TC_DXT1_Format
611
+ | typeof RGBA_S3TC_DXT3_Format
612
+ | typeof RGBA_S3TC_DXT5_Format
613
+ | typeof RGB_PVRTC_4BPPV1_Format
614
+ | typeof RGB_PVRTC_2BPPV1_Format
615
+ | typeof RGBA_PVRTC_4BPPV1_Format
616
+ | typeof RGBA_PVRTC_2BPPV1_Format
617
+ | typeof RGB_ETC1_Format
618
+ | typeof RGB_ETC2_Format
619
+ | typeof RGBA_ETC2_EAC_Format
620
+ | typeof RGBA_ASTC_4x4_Format
621
+ | typeof RGBA_ASTC_5x4_Format
622
+ | typeof RGBA_ASTC_5x5_Format
623
+ | typeof RGBA_ASTC_6x5_Format
624
+ | typeof RGBA_ASTC_6x6_Format
625
+ | typeof RGBA_ASTC_8x5_Format
626
+ | typeof RGBA_ASTC_8x6_Format
627
+ | typeof RGBA_ASTC_8x8_Format
628
+ | typeof RGBA_ASTC_10x5_Format
629
+ | typeof RGBA_ASTC_10x6_Format
630
+ | typeof RGBA_ASTC_10x8_Format
631
+ | typeof RGBA_ASTC_10x10_Format
632
+ | typeof RGBA_ASTC_12x10_Format
633
+ | typeof RGBA_ASTC_12x12_Format
634
+ | typeof RGBA_BPTC_Format
635
+ | typeof RED_RGTC1_Format
636
+ | typeof SIGNED_RED_RGTC1_Format
637
+ | typeof RED_GREEN_RGTC2_Format
638
+ | typeof SIGNED_RED_GREEN_RGTC2_Format;
639
+
640
+ ///////////////////////////////////////////////////////////////////////////////
641
+
642
+ /**
643
+ * All Possible Texture Pixel Formats Modes. For any Type or SubType of Textures.
644
+ * @remarks Note that the texture must have the correct {@link THREE.Texture.type} set, as described in {@link TextureDataType}.
645
+ * @see {@link WebGLRenderingContext.texImage2D} for details.
646
+ * @see {@link PixelFormat} and {@link DeepTexturePixelFormat} and {@link CompressedPixelFormat}
647
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
648
+ */
649
+ export type AnyPixelFormat = PixelFormat | DeepTexturePixelFormat | CompressedPixelFormat;
650
+
651
+ ///////////////////////////////////////////////////////////////////////////////
652
+ // Loop styles for AnimationAction
653
+ export const LoopOnce: 2200;
654
+ export const LoopRepeat: 2201;
655
+ export const LoopPingPong: 2202;
656
+ export type AnimationActionLoopStyles = typeof LoopOnce | typeof LoopRepeat | typeof LoopPingPong;
657
+
658
+ // Interpolation
659
+ export const InterpolateDiscrete: 2300;
660
+ export const InterpolateLinear: 2301;
661
+ export const InterpolateSmooth: 2302;
662
+ export type InterpolationModes = typeof InterpolateDiscrete | typeof InterpolateLinear | typeof InterpolateSmooth;
663
+
664
+ // Interpolant ending modes
665
+ export const ZeroCurvatureEnding: 2400;
666
+ export const ZeroSlopeEnding: 2401;
667
+ export const WrapAroundEnding: 2402;
668
+ export type InterpolationEndingModes = typeof ZeroCurvatureEnding | typeof ZeroSlopeEnding | typeof WrapAroundEnding;
669
+
670
+ // Animation blending modes
671
+ export const NormalAnimationBlendMode: 2500;
672
+ export const AdditiveAnimationBlendMode: 2501;
673
+ export type AnimationBlendMode = typeof NormalAnimationBlendMode | typeof AdditiveAnimationBlendMode;
674
+
675
+ // Triangle Draw modes
676
+ export const TrianglesDrawMode: 0;
677
+ export const TriangleStripDrawMode: 1;
678
+ export const TriangleFanDrawMode: 2;
679
+ export type TrianglesDrawModes = typeof TrianglesDrawMode | typeof TriangleStripDrawMode | typeof TriangleFanDrawMode;
680
+
681
+ ///////////////////////////////////////////////////////////////////////////////
682
+ // Texture Encodings
683
+
684
+ export const LinearEncoding: 3000;
685
+ export const sRGBEncoding: 3001;
686
+ /**
687
+ * Texture Encodings.
688
+ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
689
+ */
690
+ export type TextureEncoding = typeof LinearEncoding | typeof sRGBEncoding;
691
+
692
+ ///////////////////////////////////////////////////////////////////////////////
693
+ // Depth packing strategies
694
+
695
+ export const BasicDepthPacking: 3200;
696
+ export const RGBADepthPacking: 3201;
697
+ export type DepthPackingStrategies = typeof BasicDepthPacking | typeof RGBADepthPacking;
698
+
699
+ ///////////////////////////////////////////////////////////////////////////////
700
+ // Normal Map types
701
+
702
+ export const TangentSpaceNormalMap: 0;
703
+ export const ObjectSpaceNormalMap: 1;
704
+ export type NormalMapTypes = typeof TangentSpaceNormalMap | typeof ObjectSpaceNormalMap;
705
+
706
+ export const NoColorSpace: '';
707
+ export const SRGBColorSpace: 'srgb';
708
+ export const LinearSRGBColorSpace: 'srgb-linear';
709
+ export const DisplayP3ColorSpace = 'display-p3';
710
+ export type ColorSpace =
711
+ | typeof NoColorSpace
712
+ | typeof SRGBColorSpace
713
+ | typeof LinearSRGBColorSpace
714
+ | typeof DisplayP3ColorSpace;
715
+
716
+ // Stencil Op types
717
+ export const ZeroStencilOp: 0;
718
+ export const KeepStencilOp: 7680;
719
+ export const ReplaceStencilOp: 7681;
720
+ export const IncrementStencilOp: 7682;
721
+ export const DecrementStencilOp: 7283;
722
+ export const IncrementWrapStencilOp: 34055;
723
+ export const DecrementWrapStencilOp: 34056;
724
+ export const InvertStencilOp: 5386;
725
+ export type StencilOp =
726
+ | typeof ZeroStencilOp
727
+ | typeof KeepStencilOp
728
+ | typeof ReplaceStencilOp
729
+ | typeof IncrementStencilOp
730
+ | typeof DecrementStencilOp
731
+ | typeof IncrementWrapStencilOp
732
+ | typeof DecrementWrapStencilOp
733
+ | typeof InvertStencilOp;
734
+
735
+ // Stencil Func types
736
+ export const NeverStencilFunc: 512;
737
+ export const LessStencilFunc: 513;
738
+ export const EqualStencilFunc: 514;
739
+ export const LessEqualStencilFunc: 515;
740
+ export const GreaterStencilFunc: 516;
741
+ export const NotEqualStencilFunc: 517;
742
+ export const GreaterEqualStencilFunc: 518;
743
+ export const AlwaysStencilFunc: 519;
744
+ export type StencilFunc =
745
+ | typeof NeverStencilFunc
746
+ | typeof LessStencilFunc
747
+ | typeof EqualStencilFunc
748
+ | typeof LessEqualStencilFunc
749
+ | typeof GreaterStencilFunc
750
+ | typeof NotEqualStencilFunc
751
+ | typeof GreaterEqualStencilFunc
752
+ | typeof AlwaysStencilFunc;
753
+
754
+ // usage types
755
+ export const StaticDrawUsage: 35044;
756
+ export const DynamicDrawUsage: 35048;
757
+ export const StreamDrawUsage: 35040;
758
+ export const StaticReadUsage: 35045;
759
+ export const DynamicReadUsage: 35049;
760
+ export const StreamReadUsage: 35041;
761
+ export const StaticCopyUsage: 35046;
762
+ export const DynamicCopyUsage: 35050;
763
+ export const StreamCopyUsage: 35042;
764
+ export type Usage =
765
+ | typeof StaticDrawUsage
766
+ | typeof DynamicDrawUsage
767
+ | typeof StreamDrawUsage
768
+ | typeof StaticReadUsage
769
+ | typeof DynamicReadUsage
770
+ | typeof StreamReadUsage
771
+ | typeof StaticCopyUsage
772
+ | typeof DynamicCopyUsage
773
+ | typeof StreamCopyUsage;
774
+
775
+ export const GLSL1: '100';
776
+ export const GLSL3: '300 es';
777
+ export type GLSLVersion = typeof GLSL1 | typeof GLSL3;
778
+
779
+ ///////////////////////////////////////////////////////////////////////////////
780
+ // Texture - Internal Pixel Formats
781
+
782
+ /**
783
+ * For use with a texture's {@link THREE.Texture.internalFormat} property, these define how elements of a {@link THREE.Texture}, or texels, are stored on the GPU.
784
+ * - `R8` stores the red component on 8 bits.
785
+ * - `R8_SNORM` stores the red component on 8 bits. The component is stored as normalized.
786
+ * - `R8I` stores the red component on 8 bits. The component is stored as an integer.
787
+ * - `R8UI` stores the red component on 8 bits. The component is stored as an unsigned integer.
788
+ * - `R16I` stores the red component on 16 bits. The component is stored as an integer.
789
+ * - `R16UI` stores the red component on 16 bits. The component is stored as an unsigned integer.
790
+ * - `R16F` stores the red component on 16 bits. The component is stored as floating point.
791
+ * - `R32I` stores the red component on 32 bits. The component is stored as an integer.
792
+ * - `R32UI` stores the red component on 32 bits. The component is stored as an unsigned integer.
793
+ * - `R32F` stores the red component on 32 bits. The component is stored as floating point.
794
+ * - `RG8` stores the red and green components on 8 bits each.
795
+ * - `RG8_SNORM` stores the red and green components on 8 bits each. Every component is stored as normalized.
796
+ * - `RG8I` stores the red and green components on 8 bits each. Every component is stored as an integer.
797
+ * - `RG8UI` stores the red and green components on 8 bits each. Every component is stored as an unsigned integer.
798
+ * - `RG16I` stores the red and green components on 16 bits each. Every component is stored as an integer.
799
+ * - `RG16UI` stores the red and green components on 16 bits each. Every component is stored as an unsigned integer.
800
+ * - `RG16F` stores the red and green components on 16 bits each. Every component is stored as floating point.
801
+ * - `RG32I` stores the red and green components on 32 bits each. Every component is stored as an integer.
802
+ * - `RG32UI` stores the red and green components on 32 bits. Every component is stored as an unsigned integer.
803
+ * - `RG32F` stores the red and green components on 32 bits. Every component is stored as floating point.
804
+ * - `RGB8` stores the red, green, and blue components on 8 bits each. RGB8_SNORM` stores the red, green, and blue components on 8 bits each. Every component is stored as normalized.
805
+ * - `RGB8I` stores the red, green, and blue components on 8 bits each. Every component is stored as an integer.
806
+ * - `RGB8UI` stores the red, green, and blue components on 8 bits each. Every component is stored as an unsigned integer.
807
+ * - `RGB16I` stores the red, green, and blue components on 16 bits each. Every component is stored as an integer.
808
+ * - `RGB16UI` stores the red, green, and blue components on 16 bits each. Every component is stored as an unsigned integer.
809
+ * - `RGB16F` stores the red, green, and blue components on 16 bits each. Every component is stored as floating point
810
+ * - `RGB32I` stores the red, green, and blue components on 32 bits each. Every component is stored as an integer.
811
+ * - `RGB32UI` stores the red, green, and blue components on 32 bits each. Every component is stored as an unsigned integer.
812
+ * - `RGB32F` stores the red, green, and blue components on 32 bits each. Every component is stored as floating point
813
+ * - `R11F_G11F_B10F` stores the red, green, and blue components respectively on 11 bits, 11 bits, and 10bits. Every component is stored as floating point.
814
+ * - `RGB565` stores the red, green, and blue components respectively on 5 bits, 6 bits, and 5 bits.
815
+ * - `RGB9_E5` stores the red, green, and blue components on 9 bits each.
816
+ * - `RGBA8` stores the red, green, blue, and alpha components on 8 bits each.
817
+ * - `RGBA8_SNORM` stores the red, green, blue, and alpha components on 8 bits. Every component is stored as normalized.
818
+ * - `RGBA8I` stores the red, green, blue, and alpha components on 8 bits each. Every component is stored as an integer.
819
+ * - `RGBA8UI` stores the red, green, blue, and alpha components on 8 bits. Every component is stored as an unsigned integer.
820
+ * - `RGBA16I` stores the red, green, blue, and alpha components on 16 bits. Every component is stored as an integer.
821
+ * - `RGBA16UI` stores the red, green, blue, and alpha components on 16 bits. Every component is stored as an unsigned integer.
822
+ * - `RGBA16F` stores the red, green, blue, and alpha components on 16 bits. Every component is stored as floating point.
823
+ * - `RGBA32I` stores the red, green, blue, and alpha components on 32 bits. Every component is stored as an integer.
824
+ * - `RGBA32UI` stores the red, green, blue, and alpha components on 32 bits. Every component is stored as an unsigned integer.
825
+ * - `RGBA32F` stores the red, green, blue, and alpha components on 32 bits. Every component is stored as floating point.
826
+ * - `RGB5_A1` stores the red, green, blue, and alpha components respectively on 5 bits, 5 bits, 5 bits, and 1 bit.
827
+ * - `RGB10_A2` stores the red, green, blue, and alpha components respectively on 10 bits, 10 bits, 10 bits and 2 bits.
828
+ * - `RGB10_A2UI` stores the red, green, blue, and alpha components respectively on 10 bits, 10 bits, 10 bits and 2 bits. Every component is stored as an unsigned integer.
829
+ * - `SRGB8` stores the red, green, and blue components on 8 bits each.
830
+ * - `SRGB8_ALPHA8` stores the red, green, blue, and alpha components on 8 bits each.
831
+ * - `DEPTH_COMPONENT16` stores the depth component on 16bits.
832
+ * - `DEPTH_COMPONENT24` stores the depth component on 24bits.
833
+ * - `DEPTH_COMPONENT32F` stores the depth component on 32bits. The component is stored as floating point.
834
+ * - `DEPTH24_STENCIL8` stores the depth, and stencil components respectively on 24 bits and 8 bits. The stencil component is stored as an unsigned integer.
835
+ * - `DEPTH32F_STENCIL8` stores the depth, and stencil components respectively on 32 bits and 8 bits. The depth component is stored as floating point, and the stencil component as an unsigned integer.
836
+ * @remark Note that the texture must have the correct {@link THREE.Texture.type} set, as well as the correct {@link THREE.Texture.format}.
837
+ * @see {@link WebGLRenderingContext.texImage2D} and {@link WebGLRenderingContext.texImage3D} for more details regarding the possible combination
838
+ * of {@link THREE.Texture.format}, {@link THREE.Texture.internalFormat}, and {@link THREE.Texture.type}.
839
+ * @see {@link https://registry.khronos.org/webgl/specs/latest/2.0/ | WebGL2 Specification} and
840
+ * {@link https://registry.khronos.org/OpenGL/specs/es/3.0/es_spec_3.0.pdf | OpenGL ES 3.0 Specification} For more in-depth information regarding internal formats.
841
+ */
168
842
  export type PixelFormatGPU =
169
843
  | 'ALPHA'
170
844
  | 'RGB'
@@ -228,136 +902,7 @@ export type PixelFormatGPU =
228
902
  | 'DEPTH24_STENCIL8'
229
903
  | 'DEPTH32F_STENCIL8';
230
904
 
231
- // Compressed texture formats
232
- // DDS / ST3C Compressed texture formats
233
- export enum CompressedPixelFormat {}
234
- export const RGB_S3TC_DXT1_Format: CompressedPixelFormat;
235
- export const RGBA_S3TC_DXT1_Format: CompressedPixelFormat;
236
- export const RGBA_S3TC_DXT3_Format: CompressedPixelFormat;
237
- export const RGBA_S3TC_DXT5_Format: CompressedPixelFormat;
238
-
239
- // PVRTC compressed './texture formats
240
- export const RGB_PVRTC_4BPPV1_Format: CompressedPixelFormat;
241
- export const RGB_PVRTC_2BPPV1_Format: CompressedPixelFormat;
242
- export const RGBA_PVRTC_4BPPV1_Format: CompressedPixelFormat;
243
- export const RGBA_PVRTC_2BPPV1_Format: CompressedPixelFormat;
244
-
245
- // ETC compressed texture formats
246
- export const RGB_ETC1_Format: CompressedPixelFormat;
247
- export const RGB_ETC2_Format: CompressedPixelFormat;
248
- export const RGBA_ETC2_EAC_Format: CompressedPixelFormat;
249
-
250
- // ASTC compressed texture formats
251
- export const RGBA_ASTC_4x4_Format: CompressedPixelFormat;
252
- export const RGBA_ASTC_5x4_Format: CompressedPixelFormat;
253
- export const RGBA_ASTC_5x5_Format: CompressedPixelFormat;
254
- export const RGBA_ASTC_6x5_Format: CompressedPixelFormat;
255
- export const RGBA_ASTC_6x6_Format: CompressedPixelFormat;
256
- export const RGBA_ASTC_8x5_Format: CompressedPixelFormat;
257
- export const RGBA_ASTC_8x6_Format: CompressedPixelFormat;
258
- export const RGBA_ASTC_8x8_Format: CompressedPixelFormat;
259
- export const RGBA_ASTC_10x5_Format: CompressedPixelFormat;
260
- export const RGBA_ASTC_10x6_Format: CompressedPixelFormat;
261
- export const RGBA_ASTC_10x8_Format: CompressedPixelFormat;
262
- export const RGBA_ASTC_10x10_Format: CompressedPixelFormat;
263
- export const RGBA_ASTC_12x10_Format: CompressedPixelFormat;
264
- export const RGBA_ASTC_12x12_Format: CompressedPixelFormat;
265
-
266
- // BPTC compressed texture formats
267
- export const RGBA_BPTC_Format: CompressedPixelFormat;
268
-
269
- // RGTC compressed texture formats
270
- export const RED_RGTC1_Format: CompressedPixelFormat;
271
- export const SIGNED_RED_RGTC1_Format: CompressedPixelFormat;
272
- export const RED_GREEN_RGTC2_Format: CompressedPixelFormat;
273
- export const SIGNED_RED_GREEN_RGTC2_Format: CompressedPixelFormat;
274
-
275
- // Loop styles for AnimationAction
276
- export enum AnimationActionLoopStyles {}
277
- export const LoopOnce: AnimationActionLoopStyles;
278
- export const LoopRepeat: AnimationActionLoopStyles;
279
- export const LoopPingPong: AnimationActionLoopStyles;
280
-
281
- // Interpolation
282
- export enum InterpolationModes {}
283
- export const InterpolateDiscrete: InterpolationModes;
284
- export const InterpolateLinear: InterpolationModes;
285
- export const InterpolateSmooth: InterpolationModes;
286
-
287
- // Interpolant ending modes
288
- export enum InterpolationEndingModes {}
289
- export const ZeroCurvatureEnding: InterpolationEndingModes;
290
- export const ZeroSlopeEnding: InterpolationEndingModes;
291
- export const WrapAroundEnding: InterpolationEndingModes;
292
-
293
- // Animation blending modes
294
- export enum AnimationBlendMode {}
295
- export const NormalAnimationBlendMode: AnimationBlendMode;
296
- export const AdditiveAnimationBlendMode: AnimationBlendMode;
297
-
298
- // Triangle Draw modes
299
- export enum TrianglesDrawModes {}
300
- export const TrianglesDrawMode: TrianglesDrawModes;
301
- export const TriangleStripDrawMode: TrianglesDrawModes;
302
- export const TriangleFanDrawMode: TrianglesDrawModes;
303
-
304
- // Texture Encodings
305
- export enum TextureEncoding {}
306
- export const LinearEncoding: TextureEncoding;
307
- export const sRGBEncoding: TextureEncoding;
308
-
309
- // Depth packing strategies
310
- export enum DepthPackingStrategies {}
311
- export const BasicDepthPacking: DepthPackingStrategies;
312
- export const RGBADepthPacking: DepthPackingStrategies;
313
-
314
- // Normal Map types
315
- export enum NormalMapTypes {}
316
- export const TangentSpaceNormalMap: NormalMapTypes;
317
- export const ObjectSpaceNormalMap: NormalMapTypes;
318
-
319
- export type ColorSpace = NoColorSpace | SRGBColorSpace | LinearSRGBColorSpace;
320
- export type NoColorSpace = '';
321
- export type SRGBColorSpace = 'srgb';
322
- export type LinearSRGBColorSpace = 'srgb-linear';
323
-
324
- // Stencil Op types
325
- export enum StencilOp {}
326
- export const ZeroStencilOp: StencilOp;
327
- export const KeepStencilOp: StencilOp;
328
- export const ReplaceStencilOp: StencilOp;
329
- export const IncrementStencilOp: StencilOp;
330
- export const DecrementStencilOp: StencilOp;
331
- export const IncrementWrapStencilOp: StencilOp;
332
- export const DecrementWrapStencilOp: StencilOp;
333
- export const InvertStencilOp: StencilOp;
334
-
335
- // Stencil Func types
336
- export enum StencilFunc {}
337
- export const NeverStencilFunc: StencilFunc;
338
- export const LessStencilFunc: StencilFunc;
339
- export const EqualStencilFunc: StencilFunc;
340
- export const LessEqualStencilFunc: StencilFunc;
341
- export const GreaterStencilFunc: StencilFunc;
342
- export const NotEqualStencilFunc: StencilFunc;
343
- export const GreaterEqualStencilFunc: StencilFunc;
344
- export const AlwaysStencilFunc: StencilFunc;
345
-
346
- // usage types
347
- export enum Usage {}
348
- export const StaticDrawUsage: Usage;
349
- export const DynamicDrawUsage: Usage;
350
- export const StreamDrawUsage: Usage;
351
- export const StaticReadUsage: Usage;
352
- export const DynamicReadUsage: Usage;
353
- export const StreamReadUsage: Usage;
354
- export const StaticCopyUsage: Usage;
355
- export const DynamicCopyUsage: Usage;
356
- export const StreamCopyUsage: Usage;
357
-
358
- export enum GLSLVersion {}
359
- export const GLSL1: GLSLVersion;
360
- export const GLSL3: GLSLVersion;
905
+ ///////////////////////////////////////////////////////////////////////////////
361
906
 
362
907
  export type BuiltinShaderAttributeName =
363
908
  | 'position'