@types/three 0.148.1 → 0.150.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 (62) 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 +8 -3
  6. three/examples/jsm/controls/TrackballControls.d.ts +2 -2
  7. three/examples/jsm/controls/TransformControls.d.ts +4 -4
  8. three/examples/jsm/helpers/OctreeHelper.d.ts +1 -1
  9. three/examples/jsm/helpers/ViewHelper.d.ts +16 -0
  10. three/examples/jsm/libs/fflate.module.d.ts +1 -0
  11. three/examples/jsm/libs/lil-gui.module.min.d.ts +1 -0
  12. three/examples/jsm/libs/stats.module.d.ts +2 -23
  13. three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +1 -1
  14. three/examples/jsm/loaders/IFCLoader.d.ts +1 -0
  15. three/examples/jsm/loaders/USDZLoader.d.ts +1 -0
  16. three/examples/jsm/loaders/VOXLoader.d.ts +1 -1
  17. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +1 -0
  18. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +3 -4
  19. three/examples/jsm/objects/MarchingCubes.d.ts +1 -0
  20. three/examples/jsm/shaders/VelocityShader.d.ts +2 -2
  21. three/index.d.ts +1 -1
  22. three/package.json +19 -4
  23. three/src/Three.d.ts +1 -5
  24. three/src/constants.d.ts +395 -253
  25. three/src/core/BufferAttribute.d.ts +456 -85
  26. three/src/core/BufferGeometry.d.ts +241 -70
  27. three/src/core/Clock.d.ts +28 -20
  28. three/src/core/EventDispatcher.d.ts +20 -4
  29. three/src/core/GLBufferAttribute.d.ts +105 -7
  30. three/src/core/InstancedBufferAttribute.d.ts +13 -24
  31. three/src/core/InstancedBufferGeometry.d.ts +22 -4
  32. three/src/core/InstancedInterleavedBuffer.d.ts +10 -2
  33. three/src/core/InterleavedBuffer.d.ts +98 -14
  34. three/src/core/InterleavedBufferAttribute.d.ts +146 -7
  35. three/src/core/Layers.d.ts +61 -6
  36. three/src/core/Object3D.d.ts +252 -119
  37. three/src/core/Raycaster.d.ts +103 -27
  38. three/src/core/Uniform.d.ts +30 -13
  39. three/src/core/UniformsGroup.d.ts +10 -4
  40. three/src/extras/Earcut.d.ts +3 -4
  41. three/src/helpers/CameraHelper.d.ts +43 -0
  42. three/src/lights/DirectionalLight.d.ts +3 -1
  43. three/src/lights/HemisphereLight.d.ts +3 -1
  44. three/src/lights/SpotLight.d.ts +3 -1
  45. three/src/loaders/CubeTextureLoader.d.ts +1 -1
  46. three/src/loaders/Loader.d.ts +1 -2
  47. three/src/materials/Material.d.ts +9 -2
  48. three/src/materials/MeshPhysicalMaterial.d.ts +13 -1
  49. three/src/math/Color.d.ts +157 -3
  50. three/src/math/ColorManagement.d.ts +13 -7
  51. three/src/math/Euler.d.ts +2 -3
  52. three/src/objects/Mesh.d.ts +2 -2
  53. three/src/renderers/WebGLRenderer.d.ts +2 -2
  54. three/src/renderers/webgl/WebGLAttributes.d.ts +4 -3
  55. three/src/renderers/webgl/WebGLClipping.d.ts +3 -1
  56. three/src/renderers/webxr/WebXRManager.d.ts +2 -2
  57. three/src/textures/Data3DTexture.d.ts +2 -2
  58. three/src/utils.d.ts +5 -2
  59. three/examples/jsm/libs/fflate.module.min.d.ts +0 -1185
  60. three/src/renderers/WebGLMultisampleRenderTarget.d.ts +0 -6
  61. three/src/textures/DataTexture2DArray.d.ts +0 -6
  62. three/src/textures/DataTexture3D.d.ts +0 -6
three/src/constants.d.ts CHANGED
@@ -1,172 +1,439 @@
1
1
  export const REVISION: string;
2
2
 
3
3
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.button
4
- export enum MOUSE {
5
- LEFT = 0,
6
- MIDDLE = 1,
7
- RIGHT = 2,
8
- ROTATE = 0,
9
- DOLLY = 1,
10
- PAN = 2,
11
- }
12
-
13
- export enum TOUCH {
14
- ROTATE,
15
- PAN,
16
- DOLLY_PAN,
17
- DOLLY_ROTATE,
18
- }
4
+ export const MOUSE: {
5
+ LEFT: 0;
6
+ MIDDLE: 1;
7
+ RIGHT: 2;
8
+ ROTATE: 0;
9
+ DOLLY: 1;
10
+ PAN: 2;
11
+ };
12
+
13
+ export type MouseButton = 0 | 1 | 2;
14
+
15
+ export const TOUCH: {
16
+ ROTATE: 0;
17
+ PAN: 1;
18
+ DOLLY_PAN: 2;
19
+ DOLLY_ROTATE: 3;
20
+ };
21
+
22
+ export type TouchCount = 0 | 1 | 2 | 3;
19
23
 
20
24
  // 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;
25
+ export const CullFaceNone: 0;
26
+ export const CullFaceBack: 1;
27
+ export const CullFaceFront: 2;
28
+ export const CullFaceFrontBack: 3;
29
+ export type CullFace = typeof CullFaceNone | typeof CullFaceBack | typeof CullFaceFront | typeof CullFaceFrontBack;
26
30
 
27
31
  // 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;
32
+ export const BasicShadowMap: 0;
33
+ export const PCFShadowMap: 1;
34
+ export const PCFSoftShadowMap: 2;
35
+ export const VSMShadowMap: 3;
36
+ export type ShadowMapType = typeof BasicShadowMap | typeof PCFShadowMap | typeof PCFSoftShadowMap | typeof VSMShadowMap;
33
37
 
34
38
  // MATERIAL CONSTANTS
35
39
 
36
40
  // side
41
+ export const FrontSide: 0;
42
+ export const BackSide: 1;
43
+ export const DoubleSide: 2;
44
+ export const TwoPassDoubleSide: 2;
37
45
  /**
38
46
  * Defines which side of faces will be rendered - front, back or both.
39
- * Default is FrontSide.
40
- *
41
- * TwoPassDoubleSide will renderer double-sided transparent materials in two passes in back-front order to mitigate transparency artifacts.
47
+ * Default is {@link FrontSide}.
42
48
  */
43
- export enum Side {}
44
- export const FrontSide: Side;
45
- export const BackSide: Side;
46
- export const DoubleSide: Side;
47
- export const TwoPassDoubleSide: Side;
49
+ export type Side = typeof FrontSide | typeof BackSide | typeof DoubleSide | typeof TwoPassDoubleSide;
48
50
 
49
51
  // blending modes
50
- export enum Blending {}
51
- export const NoBlending: Blending;
52
- export const NormalBlending: Blending;
53
- export const AdditiveBlending: Blending;
54
- export const SubtractiveBlending: Blending;
55
- export const MultiplyBlending: Blending;
56
- export const CustomBlending: Blending;
52
+ export const NoBlending: 0;
53
+ export const NormalBlending: 1;
54
+ export const AdditiveBlending: 2;
55
+ export const SubtractiveBlending: 3;
56
+ export const MultiplyBlending: 4;
57
+ export const CustomBlending: 5;
58
+ export type Blending =
59
+ | typeof NoBlending
60
+ | typeof NormalBlending
61
+ | typeof AdditiveBlending
62
+ | typeof SubtractiveBlending
63
+ | typeof MultiplyBlending
64
+ | typeof CustomBlending;
57
65
 
58
66
  // custom blending equations
59
67
  // (numbers start from 100 not to clash with other
60
68
  // mappings to OpenGL constants defined in Texture.js)
61
- export enum BlendingEquation {}
62
- export const AddEquation: BlendingEquation;
63
- export const SubtractEquation: BlendingEquation;
64
- export const ReverseSubtractEquation: BlendingEquation;
65
- export const MinEquation: BlendingEquation;
66
- export const MaxEquation: BlendingEquation;
69
+ export const AddEquation: 100;
70
+ export const SubtractEquation: 101;
71
+ export const ReverseSubtractEquation: 102;
72
+ export const MinEquation: 103;
73
+ export const MaxEquation: 104;
74
+ export type BlendingEquation =
75
+ | typeof AddEquation
76
+ | typeof SubtractEquation
77
+ | typeof ReverseSubtractEquation
78
+ | typeof MinEquation
79
+ | typeof MaxEquation;
67
80
 
68
81
  // custom blending destination factors
69
- export enum BlendingDstFactor {}
70
- export const ZeroFactor: BlendingDstFactor;
71
- export const OneFactor: BlendingDstFactor;
72
- export const SrcColorFactor: BlendingDstFactor;
73
- export const OneMinusSrcColorFactor: BlendingDstFactor;
74
- export const SrcAlphaFactor: BlendingDstFactor;
75
- export const OneMinusSrcAlphaFactor: BlendingDstFactor;
76
- export const DstAlphaFactor: BlendingDstFactor;
77
- export const OneMinusDstAlphaFactor: BlendingDstFactor;
78
- export const DstColorFactor: BlendingDstFactor;
79
- export const OneMinusDstColorFactor: BlendingDstFactor;
82
+ export const ZeroFactor: 200;
83
+ export const OneFactor: 201;
84
+ export const SrcColorFactor: 202;
85
+ export const OneMinusSrcColorFactor: 203;
86
+ export const SrcAlphaFactor: 204;
87
+ export const OneMinusSrcAlphaFactor: 205;
88
+ export const DstAlphaFactor: 206;
89
+ export const OneMinusDstAlphaFactor: 207;
90
+ export const DstColorFactor: 208;
91
+ export const OneMinusDstColorFactor: 209;
92
+ export type BlendingDstFactor =
93
+ | typeof ZeroFactor
94
+ | typeof OneFactor
95
+ | typeof SrcColorFactor
96
+ | typeof OneMinusSrcColorFactor
97
+ | typeof SrcAlphaFactor
98
+ | typeof OneMinusSrcAlphaFactor
99
+ | typeof DstAlphaFactor
100
+ | typeof OneMinusDstAlphaFactor
101
+ | typeof DstColorFactor
102
+ | typeof OneMinusDstColorFactor;
80
103
 
81
104
  // custom blending src factors
82
- export enum BlendingSrcFactor {}
83
- export const SrcAlphaSaturateFactor: BlendingSrcFactor;
105
+ export const SrcAlphaSaturateFactor: 210;
106
+ export type BlendingSrcFactor = typeof SrcAlphaSaturateFactor;
84
107
 
85
108
  // depth modes
86
- export enum DepthModes {}
87
- export const NeverDepth: DepthModes;
88
- export const AlwaysDepth: DepthModes;
89
- export const LessDepth: DepthModes;
90
- export const LessEqualDepth: DepthModes;
91
- export const EqualDepth: DepthModes;
92
- export const GreaterEqualDepth: DepthModes;
93
- export const GreaterDepth: DepthModes;
94
- export const NotEqualDepth: DepthModes;
109
+ export const NeverDepth: 0;
110
+ export const AlwaysDepth: 1;
111
+ export const LessDepth: 2;
112
+ export const LessEqualDepth: 3;
113
+ export const EqualDepth: 4;
114
+ export const GreaterEqualDepth: 5;
115
+ export const GreaterDepth: 6;
116
+ export const NotEqualDepth: 7;
117
+ export type DepthModes =
118
+ | typeof NeverDepth
119
+ | typeof AlwaysDepth
120
+ | typeof LessDepth
121
+ | typeof LessEqualDepth
122
+ | typeof EqualDepth
123
+ | typeof GreaterEqualDepth
124
+ | typeof GreaterDepth
125
+ | typeof NotEqualDepth;
95
126
 
96
127
  // TEXTURE CONSTANTS
97
128
  // Operations
98
- export enum Combine {}
99
- export const MultiplyOperation: Combine;
100
- export const MixOperation: Combine;
101
- export const AddOperation: Combine;
129
+ export const MultiplyOperation: 0;
130
+ export const MixOperation: 1;
131
+ export const AddOperation: 2;
132
+ export type Combine = typeof MultiplyOperation | typeof MixOperation | typeof AddOperation;
102
133
 
103
134
  // Tone Mapping modes
104
- export enum ToneMapping {}
105
- export const NoToneMapping: ToneMapping;
106
- export const LinearToneMapping: ToneMapping;
107
- export const ReinhardToneMapping: ToneMapping;
108
- export const CineonToneMapping: ToneMapping;
109
- export const ACESFilmicToneMapping: ToneMapping;
110
- export const CustomToneMapping: ToneMapping;
135
+ export const NoToneMapping: 0;
136
+ export const LinearToneMapping: 1;
137
+ export const ReinhardToneMapping: 2;
138
+ export const CineonToneMapping: 3;
139
+ export const ACESFilmicToneMapping: 4;
140
+ export const CustomToneMapping: 5;
141
+ export type ToneMapping =
142
+ | typeof NoToneMapping
143
+ | typeof LinearToneMapping
144
+ | typeof ReinhardToneMapping
145
+ | typeof CineonToneMapping
146
+ | typeof ACESFilmicToneMapping
147
+ | typeof CustomToneMapping;
111
148
 
112
149
  // Mapping modes
113
- export enum Mapping {}
114
- export const UVMapping: Mapping;
115
- export const CubeReflectionMapping: Mapping;
116
- export const CubeRefractionMapping: Mapping;
117
- export const EquirectangularReflectionMapping: Mapping;
118
- export const EquirectangularRefractionMapping: Mapping;
119
- export const CubeUVReflectionMapping: Mapping;
150
+ export const UVMapping: 300;
151
+ export const CubeReflectionMapping: 301;
152
+ export const CubeRefractionMapping: 302;
153
+ export const EquirectangularReflectionMapping: 303;
154
+ export const EquirectangularRefractionMapping: 304;
155
+ export const CubeUVReflectionMapping: 306;
156
+ export type Mapping =
157
+ | typeof UVMapping
158
+ | typeof CubeReflectionMapping
159
+ | typeof CubeRefractionMapping
160
+ | typeof EquirectangularReflectionMapping
161
+ | typeof EquirectangularRefractionMapping
162
+ | typeof CubeUVReflectionMapping;
120
163
 
121
164
  // Wrapping modes
122
- export enum Wrapping {}
123
- export const RepeatWrapping: Wrapping;
124
- export const ClampToEdgeWrapping: Wrapping;
125
- export const MirroredRepeatWrapping: Wrapping;
165
+ export const RepeatWrapping: 1000;
166
+ export const ClampToEdgeWrapping: 1001;
167
+ export const MirroredRepeatWrapping: 1002;
168
+ export type Wrapping = typeof RepeatWrapping | typeof ClampToEdgeWrapping | typeof MirroredRepeatWrapping;
126
169
 
127
170
  // Filters
128
- export enum TextureFilter {}
129
- export const NearestFilter: TextureFilter;
130
- export const NearestMipmapNearestFilter: TextureFilter;
131
- export const NearestMipMapNearestFilter: TextureFilter;
132
- export const NearestMipmapLinearFilter: TextureFilter;
133
- export const NearestMipMapLinearFilter: TextureFilter;
134
- export const LinearFilter: TextureFilter;
135
- export const LinearMipmapNearestFilter: TextureFilter;
136
- export const LinearMipMapNearestFilter: TextureFilter;
137
- export const LinearMipmapLinearFilter: TextureFilter;
138
- export const LinearMipMapLinearFilter: TextureFilter;
171
+ export const NearestFilter: 1003;
172
+ export const NearestMipmapNearestFilter: 1004;
173
+ export const NearestMipMapNearestFilter: 1004;
174
+ export const NearestMipmapLinearFilter: 1005;
175
+ export const NearestMipMapLinearFilter: 1005;
176
+ export const LinearFilter: 1006;
177
+ export const LinearMipmapNearestFilter: 1007;
178
+ export const LinearMipMapNearestFilter: 1007;
179
+ export const LinearMipmapLinearFilter: 1008;
180
+ export const LinearMipMapLinearFilter: 1008;
181
+ export type TextureFilter =
182
+ | typeof NearestFilter
183
+ | typeof NearestMipmapNearestFilter
184
+ | typeof NearestMipMapNearestFilter
185
+ | typeof NearestMipmapLinearFilter
186
+ | typeof NearestMipMapLinearFilter
187
+ | typeof LinearFilter
188
+ | typeof LinearMipmapNearestFilter
189
+ | typeof LinearMipMapNearestFilter
190
+ | typeof LinearMipmapLinearFilter
191
+ | typeof LinearMipMapLinearFilter;
139
192
 
140
193
  // Data types
141
- export enum TextureDataType {}
142
- export const UnsignedByteType: TextureDataType;
143
- export const ByteType: TextureDataType;
144
- export const ShortType: TextureDataType;
145
- export const UnsignedShortType: TextureDataType;
146
- export const IntType: TextureDataType;
147
- export const UnsignedIntType: TextureDataType;
148
- export const FloatType: TextureDataType;
149
- export const HalfFloatType: TextureDataType;
150
- export const UnsignedShort4444Type: TextureDataType;
151
- export const UnsignedShort5551Type: TextureDataType;
152
- export const UnsignedInt248Type: TextureDataType;
194
+ export const UnsignedByteType: 1009;
195
+ export const ByteType: 1010;
196
+ export const ShortType: 1011;
197
+ export const UnsignedShortType: 1012;
198
+ export const IntType: 1013;
199
+ export const UnsignedIntType: 1014;
200
+ export const FloatType: 1015;
201
+ export const HalfFloatType: 1016;
202
+ export const UnsignedShort4444Type: 1017;
203
+ export const UnsignedShort5551Type: 1018;
204
+ export const UnsignedInt248Type: 1020;
205
+ export type TextureDataType =
206
+ | typeof UnsignedByteType
207
+ | typeof ByteType
208
+ | typeof ShortType
209
+ | typeof UnsignedShortType
210
+ | typeof IntType
211
+ | typeof UnsignedIntType
212
+ | typeof FloatType
213
+ | typeof HalfFloatType
214
+ | typeof UnsignedShort4444Type
215
+ | typeof UnsignedShort5551Type
216
+ | typeof UnsignedInt248Type;
153
217
 
154
218
  // Pixel formats
155
- export enum PixelFormat {}
156
- export const AlphaFormat: PixelFormat;
157
- export const RGBFormat: PixelFormat;
158
- export const RGBAFormat: PixelFormat;
159
- export const LuminanceFormat: PixelFormat;
160
- export const LuminanceAlphaFormat: PixelFormat;
161
- export const DepthFormat: PixelFormat;
162
- export const DepthStencilFormat: PixelFormat;
163
- export const RedFormat: PixelFormat;
164
- export const RedIntegerFormat: PixelFormat;
165
- export const RGFormat: PixelFormat;
166
- export const RGIntegerFormat: PixelFormat;
167
- export const RGBAIntegerFormat: PixelFormat;
168
- export const _SRGBFormat: PixelFormat; // fallback for WebGL 1
169
- export const _SRGBAFormat: PixelFormat; // fallback for WebGL 1
219
+ export const AlphaFormat: 1021;
220
+ export const RGBAFormat: 1023;
221
+ export const LuminanceFormat: 1024;
222
+ export const LuminanceAlphaFormat: 1025;
223
+ export const DepthFormat: 1026;
224
+ export const DepthStencilFormat: 1027;
225
+ export const RedFormat: 1028;
226
+ export const RedIntegerFormat: 1029;
227
+ export const RGFormat: 1030;
228
+ export const RGIntegerFormat: 1031;
229
+ export const RGBAIntegerFormat: 1033;
230
+ export type PixelFormat =
231
+ | typeof AlphaFormat
232
+ | typeof RGBAFormat
233
+ | typeof LuminanceFormat
234
+ | typeof LuminanceAlphaFormat
235
+ | typeof DepthFormat
236
+ | typeof DepthStencilFormat
237
+ | typeof RedFormat
238
+ | typeof RedIntegerFormat
239
+ | typeof RGFormat
240
+ | typeof RGIntegerFormat
241
+ | typeof RGBAIntegerFormat
242
+ | typeof _SRGBAFormat;
243
+
244
+ // Compressed texture formats
245
+ // DDS / ST3C Compressed texture formats
246
+ export const RGB_S3TC_DXT1_Format: 33776;
247
+ export const RGBA_S3TC_DXT1_Format: 33777;
248
+ export const RGBA_S3TC_DXT3_Format: 33778;
249
+ export const RGBA_S3TC_DXT5_Format: 33779;
250
+
251
+ // PVRTC compressed './texture formats
252
+ export const RGB_PVRTC_4BPPV1_Format: 35840;
253
+ export const RGB_PVRTC_2BPPV1_Format: 35841;
254
+ export const RGBA_PVRTC_4BPPV1_Format: 35842;
255
+ export const RGBA_PVRTC_2BPPV1_Format: 35843;
256
+
257
+ // ETC compressed texture formats
258
+ export const RGB_ETC1_Format: 36196;
259
+ export const RGB_ETC2_Format: 37492;
260
+ export const RGBA_ETC2_EAC_Format: 37496;
261
+
262
+ // ASTC compressed texture formats
263
+ export const RGBA_ASTC_4x4_Format: 37808;
264
+ export const RGBA_ASTC_5x4_Format: 37809;
265
+ export const RGBA_ASTC_5x5_Format: 37810;
266
+ export const RGBA_ASTC_6x5_Format: 37811;
267
+ export const RGBA_ASTC_6x6_Format: 37812;
268
+ export const RGBA_ASTC_8x5_Format: 37813;
269
+ export const RGBA_ASTC_8x6_Format: 37814;
270
+ export const RGBA_ASTC_8x8_Format: 37815;
271
+ export const RGBA_ASTC_10x5_Format: 37816;
272
+ export const RGBA_ASTC_10x6_Format: 37817;
273
+ export const RGBA_ASTC_10x8_Format: 37818;
274
+ export const RGBA_ASTC_10x10_Format: 37819;
275
+ export const RGBA_ASTC_12x10_Format: 37820;
276
+ export const RGBA_ASTC_12x12_Format: 37821;
277
+
278
+ // BPTC compressed texture formats
279
+ export const RGBA_BPTC_Format: 36492;
280
+
281
+ // RGTC compressed texture formats
282
+ export const RED_RGTC1_Format: 36283;
283
+ export const SIGNED_RED_RGTC1_Format: 36284;
284
+ export const RED_GREEN_RGTC2_Format: 36285;
285
+ export const SIGNED_RED_GREEN_RGTC2_Format: 36286;
286
+
287
+ export type CompressedPixelFormat =
288
+ | typeof RGB_S3TC_DXT1_Format
289
+ | typeof RGBA_S3TC_DXT1_Format
290
+ | typeof RGBA_S3TC_DXT3_Format
291
+ | typeof RGBA_S3TC_DXT5_Format
292
+ | typeof RGB_PVRTC_4BPPV1_Format
293
+ | typeof RGB_PVRTC_2BPPV1_Format
294
+ | typeof RGBA_PVRTC_4BPPV1_Format
295
+ | typeof RGBA_PVRTC_2BPPV1_Format
296
+ | typeof RGB_ETC1_Format
297
+ | typeof RGB_ETC2_Format
298
+ | typeof RGBA_ETC2_EAC_Format
299
+ | typeof RGBA_ASTC_4x4_Format
300
+ | typeof RGBA_ASTC_5x4_Format
301
+ | typeof RGBA_ASTC_5x5_Format
302
+ | typeof RGBA_ASTC_6x5_Format
303
+ | typeof RGBA_ASTC_6x6_Format
304
+ | typeof RGBA_ASTC_8x5_Format
305
+ | typeof RGBA_ASTC_8x6_Format
306
+ | typeof RGBA_ASTC_8x8_Format
307
+ | typeof RGBA_ASTC_10x5_Format
308
+ | typeof RGBA_ASTC_10x6_Format
309
+ | typeof RGBA_ASTC_10x8_Format
310
+ | typeof RGBA_ASTC_10x10_Format
311
+ | typeof RGBA_ASTC_12x10_Format
312
+ | typeof RGBA_ASTC_12x12_Format
313
+ | typeof RGBA_BPTC_Format
314
+ | typeof RED_RGTC1_Format
315
+ | typeof SIGNED_RED_RGTC1_Format
316
+ | typeof RED_GREEN_RGTC2_Format
317
+ | typeof SIGNED_RED_GREEN_RGTC2_Format;
318
+
319
+ // Loop styles for AnimationAction
320
+ export const LoopOnce: 2200;
321
+ export const LoopRepeat: 2201;
322
+ export const LoopPingPong: 2202;
323
+ export type AnimationActionLoopStyles = typeof LoopOnce | typeof LoopRepeat | typeof LoopPingPong;
324
+
325
+ // Interpolation
326
+ export const InterpolateDiscrete: 2300;
327
+ export const InterpolateLinear: 2301;
328
+ export const InterpolateSmooth: 2302;
329
+ export type InterpolationModes = typeof InterpolateDiscrete | typeof InterpolateLinear | typeof InterpolateSmooth;
330
+
331
+ // Interpolant ending modes
332
+ export const ZeroCurvatureEnding: 2400;
333
+ export const ZeroSlopeEnding: 2401;
334
+ export const WrapAroundEnding: 2402;
335
+ export type InterpolationEndingModes = typeof ZeroCurvatureEnding | typeof ZeroSlopeEnding | typeof WrapAroundEnding;
336
+
337
+ // Animation blending modes
338
+ export const NormalAnimationBlendMode: 2500;
339
+ export const AdditiveAnimationBlendMode: 2501;
340
+ export type AnimationBlendMode = typeof NormalAnimationBlendMode | typeof AdditiveAnimationBlendMode;
341
+
342
+ // Triangle Draw modes
343
+ export const TrianglesDrawMode: 0;
344
+ export const TriangleStripDrawMode: 1;
345
+ export const TriangleFanDrawMode: 2;
346
+ export type TrianglesDrawModes = typeof TrianglesDrawMode | typeof TriangleStripDrawMode | typeof TriangleFanDrawMode;
347
+
348
+ // Texture Encodings
349
+ export const LinearEncoding: 3000;
350
+ export const sRGBEncoding: 3001;
351
+ export type TextureEncoding = typeof LinearEncoding | typeof sRGBEncoding;
352
+
353
+ // Depth packing strategies
354
+ export const BasicDepthPacking: 3200;
355
+ export const RGBADepthPacking: 3201;
356
+ export type DepthPackingStrategies = typeof BasicDepthPacking | typeof RGBADepthPacking;
357
+
358
+ // Normal Map types
359
+ export const TangentSpaceNormalMap: 0;
360
+ export const ObjectSpaceNormalMap: 1;
361
+ export type NormalMapTypes = typeof TangentSpaceNormalMap | typeof ObjectSpaceNormalMap;
362
+
363
+ export const NoColorSpace: '';
364
+ export const SRGBColorSpace: 'srgb';
365
+ export const LinearSRGBColorSpace: 'srgb-linear';
366
+ export const DisplayP3ColorSpace = 'display-p3';
367
+ export type ColorSpace =
368
+ | typeof NoColorSpace
369
+ | typeof SRGBColorSpace
370
+ | typeof LinearSRGBColorSpace
371
+ | typeof DisplayP3ColorSpace;
372
+
373
+ // Stencil Op types
374
+ export const ZeroStencilOp: 0;
375
+ export const KeepStencilOp: 7680;
376
+ export const ReplaceStencilOp: 7681;
377
+ export const IncrementStencilOp: 7682;
378
+ export const DecrementStencilOp: 7283;
379
+ export const IncrementWrapStencilOp: 34055;
380
+ export const DecrementWrapStencilOp: 34056;
381
+ export const InvertStencilOp: 5386;
382
+ export type StencilOp =
383
+ | typeof ZeroStencilOp
384
+ | typeof KeepStencilOp
385
+ | typeof ReplaceStencilOp
386
+ | typeof IncrementStencilOp
387
+ | typeof DecrementStencilOp
388
+ | typeof IncrementWrapStencilOp
389
+ | typeof DecrementWrapStencilOp
390
+ | typeof InvertStencilOp;
391
+
392
+ // Stencil Func types
393
+ export const NeverStencilFunc: 512;
394
+ export const LessStencilFunc: 513;
395
+ export const EqualStencilFunc: 514;
396
+ export const LessEqualStencilFunc: 515;
397
+ export const GreaterStencilFunc: 516;
398
+ export const NotEqualStencilFunc: 517;
399
+ export const GreaterEqualStencilFunc: 518;
400
+ export const AlwaysStencilFunc: 519;
401
+ export type StencilFunc =
402
+ | typeof NeverStencilFunc
403
+ | typeof LessStencilFunc
404
+ | typeof EqualStencilFunc
405
+ | typeof LessEqualStencilFunc
406
+ | typeof GreaterStencilFunc
407
+ | typeof NotEqualStencilFunc
408
+ | typeof GreaterEqualStencilFunc
409
+ | typeof AlwaysStencilFunc;
410
+
411
+ // usage types
412
+ export const StaticDrawUsage: 35044;
413
+ export const DynamicDrawUsage: 35048;
414
+ export const StreamDrawUsage: 35040;
415
+ export const StaticReadUsage: 35045;
416
+ export const DynamicReadUsage: 35049;
417
+ export const StreamReadUsage: 35041;
418
+ export const StaticCopyUsage: 35046;
419
+ export const DynamicCopyUsage: 35050;
420
+ export const StreamCopyUsage: 35042;
421
+ export type Usage =
422
+ | typeof StaticDrawUsage
423
+ | typeof DynamicDrawUsage
424
+ | typeof StreamDrawUsage
425
+ | typeof StaticReadUsage
426
+ | typeof DynamicReadUsage
427
+ | typeof StreamReadUsage
428
+ | typeof StaticCopyUsage
429
+ | typeof DynamicCopyUsage
430
+ | typeof StreamCopyUsage;
431
+
432
+ export const GLSL1: '100';
433
+ export const GLSL3: '300 es';
434
+ export type GLSLVersion = typeof GLSL1 | typeof GLSL3;
435
+
436
+ export const _SRGBAFormat = 1035; // fallback for WebGL 1
170
437
 
171
438
  // Internal Pixel Formats
172
439
  export type PixelFormatGPU =
@@ -232,131 +499,6 @@ export type PixelFormatGPU =
232
499
  | 'DEPTH24_STENCIL8'
233
500
  | 'DEPTH32F_STENCIL8';
234
501
 
235
- // Compressed texture formats
236
- // DDS / ST3C Compressed texture formats
237
- export enum CompressedPixelFormat {}
238
- export const RGB_S3TC_DXT1_Format: CompressedPixelFormat;
239
- export const RGBA_S3TC_DXT1_Format: CompressedPixelFormat;
240
- export const RGBA_S3TC_DXT3_Format: CompressedPixelFormat;
241
- export const RGBA_S3TC_DXT5_Format: CompressedPixelFormat;
242
-
243
- // PVRTC compressed './texture formats
244
- export const RGB_PVRTC_4BPPV1_Format: CompressedPixelFormat;
245
- export const RGB_PVRTC_2BPPV1_Format: CompressedPixelFormat;
246
- export const RGBA_PVRTC_4BPPV1_Format: CompressedPixelFormat;
247
- export const RGBA_PVRTC_2BPPV1_Format: CompressedPixelFormat;
248
-
249
- // ETC compressed texture formats
250
- export const RGB_ETC1_Format: CompressedPixelFormat;
251
- export const RGB_ETC2_Format: CompressedPixelFormat;
252
- export const RGBA_ETC2_EAC_Format: CompressedPixelFormat;
253
-
254
- // ASTC compressed texture formats
255
- export const RGBA_ASTC_4x4_Format: CompressedPixelFormat;
256
- export const RGBA_ASTC_5x4_Format: CompressedPixelFormat;
257
- export const RGBA_ASTC_5x5_Format: CompressedPixelFormat;
258
- export const RGBA_ASTC_6x5_Format: CompressedPixelFormat;
259
- export const RGBA_ASTC_6x6_Format: CompressedPixelFormat;
260
- export const RGBA_ASTC_8x5_Format: CompressedPixelFormat;
261
- export const RGBA_ASTC_8x6_Format: CompressedPixelFormat;
262
- export const RGBA_ASTC_8x8_Format: CompressedPixelFormat;
263
- export const RGBA_ASTC_10x5_Format: CompressedPixelFormat;
264
- export const RGBA_ASTC_10x6_Format: CompressedPixelFormat;
265
- export const RGBA_ASTC_10x8_Format: CompressedPixelFormat;
266
- export const RGBA_ASTC_10x10_Format: CompressedPixelFormat;
267
- export const RGBA_ASTC_12x10_Format: CompressedPixelFormat;
268
- export const RGBA_ASTC_12x12_Format: CompressedPixelFormat;
269
-
270
- // BPTC compressed texture formats
271
- export const RGBA_BPTC_Format: CompressedPixelFormat;
272
-
273
- // Loop styles for AnimationAction
274
- export enum AnimationActionLoopStyles {}
275
- export const LoopOnce: AnimationActionLoopStyles;
276
- export const LoopRepeat: AnimationActionLoopStyles;
277
- export const LoopPingPong: AnimationActionLoopStyles;
278
-
279
- // Interpolation
280
- export enum InterpolationModes {}
281
- export const InterpolateDiscrete: InterpolationModes;
282
- export const InterpolateLinear: InterpolationModes;
283
- export const InterpolateSmooth: InterpolationModes;
284
-
285
- // Interpolant ending modes
286
- export enum InterpolationEndingModes {}
287
- export const ZeroCurvatureEnding: InterpolationEndingModes;
288
- export const ZeroSlopeEnding: InterpolationEndingModes;
289
- export const WrapAroundEnding: InterpolationEndingModes;
290
-
291
- // Animation blending modes
292
- export enum AnimationBlendMode {}
293
- export const NormalAnimationBlendMode: AnimationBlendMode;
294
- export const AdditiveAnimationBlendMode: AnimationBlendMode;
295
-
296
- // Triangle Draw modes
297
- export enum TrianglesDrawModes {}
298
- export const TrianglesDrawMode: TrianglesDrawModes;
299
- export const TriangleStripDrawMode: TrianglesDrawModes;
300
- export const TriangleFanDrawMode: TrianglesDrawModes;
301
-
302
- // Texture Encodings
303
- export enum TextureEncoding {}
304
- export const LinearEncoding: TextureEncoding;
305
- export const sRGBEncoding: TextureEncoding;
306
-
307
- // Depth packing strategies
308
- export enum DepthPackingStrategies {}
309
- export const BasicDepthPacking: DepthPackingStrategies;
310
- export const RGBADepthPacking: DepthPackingStrategies;
311
-
312
- // Normal Map types
313
- export enum NormalMapTypes {}
314
- export const TangentSpaceNormalMap: NormalMapTypes;
315
- export const ObjectSpaceNormalMap: NormalMapTypes;
316
-
317
- export type ColorSpace = NoColorSpace | SRGBColorSpace | LinearSRGBColorSpace;
318
- export type NoColorSpace = '';
319
- export type SRGBColorSpace = 'srgb';
320
- export type LinearSRGBColorSpace = 'srgb-linear';
321
-
322
- // Stencil Op types
323
- export enum StencilOp {}
324
- export const ZeroStencilOp: StencilOp;
325
- export const KeepStencilOp: StencilOp;
326
- export const ReplaceStencilOp: StencilOp;
327
- export const IncrementStencilOp: StencilOp;
328
- export const DecrementStencilOp: StencilOp;
329
- export const IncrementWrapStencilOp: StencilOp;
330
- export const DecrementWrapStencilOp: StencilOp;
331
- export const InvertStencilOp: StencilOp;
332
-
333
- // Stencil Func types
334
- export enum StencilFunc {}
335
- export const NeverStencilFunc: StencilFunc;
336
- export const LessStencilFunc: StencilFunc;
337
- export const EqualStencilFunc: StencilFunc;
338
- export const LessEqualStencilFunc: StencilFunc;
339
- export const GreaterStencilFunc: StencilFunc;
340
- export const NotEqualStencilFunc: StencilFunc;
341
- export const GreaterEqualStencilFunc: StencilFunc;
342
- export const AlwaysStencilFunc: StencilFunc;
343
-
344
- // usage types
345
- export enum Usage {}
346
- export const StaticDrawUsage: Usage;
347
- export const DynamicDrawUsage: Usage;
348
- export const StreamDrawUsage: Usage;
349
- export const StaticReadUsage: Usage;
350
- export const DynamicReadUsage: Usage;
351
- export const StreamReadUsage: Usage;
352
- export const StaticCopyUsage: Usage;
353
- export const DynamicCopyUsage: Usage;
354
- export const StreamCopyUsage: Usage;
355
-
356
- export enum GLSLVersion {}
357
- export const GLSL1: GLSLVersion;
358
- export const GLSL3: GLSLVersion;
359
-
360
502
  export type BuiltinShaderAttributeName =
361
503
  | 'position'
362
504
  | 'normal'