@stdex/create 0.0.0-stage → 1.2.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 (95) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -2
  3. package/README_EN.md +67 -0
  4. package/package.json +40 -3
  5. package/src/eslint.config.js +2 -0
  6. package/src/index.js +233 -0
  7. package/templates/base/eslint.config.js +2 -0
  8. package/templates/base/index.js +3 -0
  9. package/templates/base/package.json +16 -0
  10. package/templates/miniprogram/README.md +27 -0
  11. package/templates/miniprogram/_gitignore +3 -0
  12. package/templates/miniprogram/eslint.config.cjs +25 -0
  13. package/templates/miniprogram/gulpfile.js +81 -0
  14. package/templates/miniprogram/package.json +22 -0
  15. package/templates/miniprogram/project.config.json +31 -0
  16. package/templates/miniprogram/project.private.config.json +8 -0
  17. package/templates/miniprogram/src/app.json +16 -0
  18. package/templates/miniprogram/src/app.scss +0 -0
  19. package/templates/miniprogram/src/app.ts +6 -0
  20. package/templates/miniprogram/src/lib/app-data.ts +46 -0
  21. package/templates/miniprogram/src/pages/index/index.json +3 -0
  22. package/templates/miniprogram/src/pages/index/index.scss +11 -0
  23. package/templates/miniprogram/src/pages/index/index.ts +13 -0
  24. package/templates/miniprogram/src/pages/index/index.wxml +1 -0
  25. package/templates/miniprogram/src/sitemap.json +9 -0
  26. package/templates/miniprogram/tsconfig.json +11 -0
  27. package/templates/miniprogram/typings/index.d.ts +5 -0
  28. package/templates/miniprogram/typings/types/index.d.ts +1 -0
  29. package/templates/miniprogram/typings/types/wx/index.d.ts +162 -0
  30. package/templates/miniprogram/typings/types/wx/lib.wx.api.d.ts +32387 -0
  31. package/templates/miniprogram/typings/types/wx/lib.wx.app.d.ts +400 -0
  32. package/templates/miniprogram/typings/types/wx/lib.wx.behavior.d.ts +68 -0
  33. package/templates/miniprogram/typings/types/wx/lib.wx.canvas.d.ts +2623 -0
  34. package/templates/miniprogram/typings/types/wx/lib.wx.cloud.d.ts +1016 -0
  35. package/templates/miniprogram/typings/types/wx/lib.wx.component.d.ts +700 -0
  36. package/templates/miniprogram/typings/types/wx/lib.wx.event.d.ts +1436 -0
  37. package/templates/miniprogram/typings/types/wx/lib.wx.page.d.ts +272 -0
  38. package/templates/miniprogram/typings/types/wx/lib.wx.phys3D.d.ts +409 -0
  39. package/templates/miniprogram/typings/types/wx/lib.wx.wasm.d.ts +152 -0
  40. package/templates/miniprogram/typings/types/wx/lib.wx.xr-frame.d.ts +15631 -0
  41. package/templates/miniprogram/variables.json +11 -0
  42. package/templates/service/README.md +64 -0
  43. package/templates/service/_env +1 -0
  44. package/templates/service/_gitignore +5 -0
  45. package/templates/service/eslint.config.js +2 -0
  46. package/templates/service/package.json +48 -0
  47. package/templates/service/prisma/schema.prisma +40 -0
  48. package/templates/service/prisma/sql/demoTypedSql.sql +1 -0
  49. package/templates/service/prisma.config.ts +12 -0
  50. package/templates/service/setup.js +4 -0
  51. package/templates/service/src/cache.ts +28 -0
  52. package/templates/service/src/config.ts +49 -0
  53. package/templates/service/src/controllers/common.ts +43 -0
  54. package/templates/service/src/controllers/demo-school.ts +7 -0
  55. package/templates/service/src/controllers/demo-student.ts +7 -0
  56. package/templates/service/src/controllers/index.ts +15 -0
  57. package/templates/service/src/database.ts +52 -0
  58. package/templates/service/src/index.ts +15 -0
  59. package/templates/service/src/logger.ts +10 -0
  60. package/templates/service/src/routes/demo-school.ts +9 -0
  61. package/templates/service/src/routes/index.ts +3 -0
  62. package/templates/service/src/routes/router.ts +42 -0
  63. package/templates/service/src/tasks/common.ts +25 -0
  64. package/templates/service/src/tasks/demo-school.ts +10 -0
  65. package/templates/service/src/tasks/index.ts +1 -0
  66. package/templates/service/tsconfig.build.json +9 -0
  67. package/templates/service/tsconfig.json +10 -0
  68. package/templates/site/_gitignore +3 -0
  69. package/templates/site/_pnpm-workspace.yaml +4 -0
  70. package/templates/site/eslint.config.js +19 -0
  71. package/templates/site/package.json +41 -0
  72. package/templates/site/public/favicon.png +0 -0
  73. package/templates/site/src/app/header.tsx +31 -0
  74. package/templates/site/src/app/index.tsx +38 -0
  75. package/templates/site/src/app/layout.tsx +63 -0
  76. package/templates/site/src/app/menu.tsx +115 -0
  77. package/templates/site/src/app/router.tsx +50 -0
  78. package/templates/site/src/app/style.css +9 -0
  79. package/templates/site/src/assets/logo.png +0 -0
  80. package/templates/site/src/components/Breadcrumb.tsx +47 -0
  81. package/templates/site/src/components/DevStatus.tsx +14 -0
  82. package/templates/site/src/index.html +13 -0
  83. package/templates/site/src/index.tsx +5 -0
  84. package/templates/site/src/lib/config.ts +6 -0
  85. package/templates/site/src/lib/init-dayjs.ts +8 -0
  86. package/templates/site/src/lib/logging.ts +5 -0
  87. package/templates/site/src/views/dashboard.tsx +7 -0
  88. package/templates/site/src/views/school-detail.tsx +13 -0
  89. package/templates/site/src/views/school-ranking.tsx +7 -0
  90. package/templates/site/src/views/schools.tsx +43 -0
  91. package/templates/site/src/views/setting.tsx +7 -0
  92. package/templates/site/src/views/student-score.tsx +7 -0
  93. package/templates/site/src/views/students.tsx +7 -0
  94. package/templates/site/tsconfig.json +10 -0
  95. package/templates/site/vite.config.js +60 -0
@@ -0,0 +1,2623 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) 2023 Tencent, Inc. All rights reserved.
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ this software and associated documentation files (the "Software"), to deal in
6
+ the Software without restriction, including without limitation the rights to
7
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8
+ of the Software, and to permit persons to whom the Software is furnished to do
9
+ so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ ***************************************************************************** */
22
+
23
+ /* eslint-disable @typescript-eslint/naming-convention */
24
+
25
+ declare namespace WechatMiniprogram.CanvasRenderingContext {
26
+ type CanvasDirection = 'inherit' | 'ltr' | 'rtl'
27
+ type CanvasFillRule = 'evenodd' | 'nonzero'
28
+ type CanvasFontKerning = 'auto' | 'none' | 'normal'
29
+ type CanvasFontStretch =
30
+ | 'condensed'
31
+ | 'expanded'
32
+ | 'extra-condensed'
33
+ | 'extra-expanded'
34
+ | 'normal'
35
+ | 'semi-condensed'
36
+ | 'semi-expanded'
37
+ | 'ultra-condensed'
38
+ | 'ultra-expanded'
39
+ type CanvasFontVariantCaps =
40
+ | 'all-petite-caps'
41
+ | 'all-small-caps'
42
+ | 'normal'
43
+ | 'petite-caps'
44
+ | 'small-caps'
45
+ | 'titling-caps'
46
+ | 'unicase'
47
+ type CanvasLineCap = 'butt' | 'round' | 'square'
48
+ type CanvasLineJoin = 'bevel' | 'miter' | 'round'
49
+ type CanvasTextAlign = 'center' | 'end' | 'left' | 'right' | 'start'
50
+ type CanvasTextBaseline =
51
+ | 'alphabetic'
52
+ | 'bottom'
53
+ | 'hanging'
54
+ | 'ideographic'
55
+ | 'middle'
56
+ | 'top'
57
+ type CanvasTextRendering =
58
+ | 'auto'
59
+ | 'geometricPrecision'
60
+ | 'optimizeLegibility'
61
+ | 'optimizeSpeed'
62
+
63
+ type GlobalCompositeOperation =
64
+ | 'color'
65
+ | 'color-burn'
66
+ | 'color-dodge'
67
+ | 'copy'
68
+ | 'darken'
69
+ | 'destination-atop'
70
+ | 'destination-in'
71
+ | 'destination-out'
72
+ | 'destination-over'
73
+ | 'difference'
74
+ | 'exclusion'
75
+ | 'hard-light'
76
+ | 'hue'
77
+ | 'lighten'
78
+ | 'lighter'
79
+ | 'luminosity'
80
+ | 'multiply'
81
+ | 'overlay'
82
+ | 'saturation'
83
+ | 'screen'
84
+ | 'soft-light'
85
+ | 'source-atop'
86
+ | 'source-in'
87
+ | 'source-out'
88
+ | 'source-over'
89
+ | 'xor'
90
+
91
+ interface CanvasCompositing {
92
+ globalAlpha: number
93
+ globalCompositeOperation: GlobalCompositeOperation
94
+ }
95
+
96
+ type CanvasImageSource = VideoContext | Canvas | Image | OffscreenCanvas
97
+
98
+ interface CanvasDrawImage {
99
+ drawImage(image: CanvasImageSource, dx: number, dy: number): void
100
+ drawImage(
101
+ image: CanvasImageSource,
102
+ dx: number,
103
+ dy: number,
104
+ dw: number,
105
+ dh: number
106
+ ): void
107
+ drawImage(
108
+ image: CanvasImageSource,
109
+ sx: number,
110
+ sy: number,
111
+ sw: number,
112
+ sh: number,
113
+ dx: number,
114
+ dy: number,
115
+ dw: number,
116
+ dh: number
117
+ ): void
118
+ }
119
+
120
+ interface CanvasDrawPath {
121
+ beginPath(): void
122
+ clip(fillRule?: CanvasFillRule): void
123
+ clip(path: Path2D, fillRule?: CanvasFillRule): void
124
+ fill(fillRule?: CanvasFillRule): void
125
+ fill(path: Path2D, fillRule?: CanvasFillRule): void
126
+ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean
127
+ isPointInPath(
128
+ path: Path2D,
129
+ x: number,
130
+ y: number,
131
+ fillRule?: CanvasFillRule
132
+ ): boolean
133
+ isPointInStroke(x: number, y: number): boolean
134
+ isPointInStroke(path: Path2D, x: number, y: number): boolean
135
+ stroke(): void
136
+ stroke(path: Path2D): void
137
+ }
138
+
139
+ interface CanvasFillStrokeStyles {
140
+ fillStyle: string | CanvasGradient | CanvasPattern
141
+ strokeStyle: string | CanvasGradient | CanvasPattern
142
+ createConicGradient(
143
+ startAngle: number,
144
+ x: number,
145
+ y: number
146
+ ): CanvasGradient
147
+ createLinearGradient(
148
+ x0: number,
149
+ y0: number,
150
+ x1: number,
151
+ y1: number
152
+ ): CanvasGradient
153
+ createPattern(
154
+ image: CanvasImageSource,
155
+ repetition: string | null
156
+ ): CanvasPattern | null
157
+ createRadialGradient(
158
+ x0: number,
159
+ y0: number,
160
+ r0: number,
161
+ x1: number,
162
+ y1: number,
163
+ r1: number
164
+ ): CanvasGradient
165
+ }
166
+
167
+ interface CanvasFilters {
168
+ filter: string
169
+ }
170
+
171
+ /** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
172
+ interface CanvasGradient {
173
+ /**
174
+ * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
175
+ *
176
+ * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
177
+ */
178
+ addColorStop(offset: number, color: string): void
179
+ }
180
+
181
+ type PredefinedColorSpace = 'display-p3' | 'srgb'
182
+
183
+ interface ImageDataSettings {
184
+ colorSpace?: PredefinedColorSpace
185
+ }
186
+
187
+ interface CanvasImageData {
188
+ createImageData(
189
+ sw: number,
190
+ sh: number,
191
+ settings?: ImageDataSettings
192
+ ): ImageData
193
+ createImageData(imagedata: ImageData): ImageData
194
+ getImageData(
195
+ sx: number,
196
+ sy: number,
197
+ sw: number,
198
+ sh: number,
199
+ settings?: ImageDataSettings
200
+ ): ImageData
201
+ putImageData(imagedata: ImageData, dx: number, dy: number): void
202
+ putImageData(
203
+ imagedata: ImageData,
204
+ dx: number,
205
+ dy: number,
206
+ dirtyX: number,
207
+ dirtyY: number,
208
+ dirtyWidth: number,
209
+ dirtyHeight: number
210
+ ): void
211
+ }
212
+
213
+ type ImageSmoothingQuality = 'high' | 'low' | 'medium'
214
+
215
+ interface CanvasImageSmoothing {
216
+ imageSmoothingEnabled: boolean
217
+ imageSmoothingQuality: ImageSmoothingQuality
218
+ }
219
+
220
+ interface CanvasPath {
221
+ arc(
222
+ x: number,
223
+ y: number,
224
+ radius: number,
225
+ startAngle: number,
226
+ endAngle: number,
227
+ counterclockwise?: boolean
228
+ ): void
229
+ arcTo(
230
+ x1: number,
231
+ y1: number,
232
+ x2: number,
233
+ y2: number,
234
+ radius: number
235
+ ): void
236
+ bezierCurveTo(
237
+ cp1x: number,
238
+ cp1y: number,
239
+ cp2x: number,
240
+ cp2y: number,
241
+ x: number,
242
+ y: number
243
+ ): void
244
+ closePath(): void
245
+ ellipse(
246
+ x: number,
247
+ y: number,
248
+ radiusX: number,
249
+ radiusY: number,
250
+ rotation: number,
251
+ startAngle: number,
252
+ endAngle: number,
253
+ counterclockwise?: boolean
254
+ ): void
255
+ lineTo(x: number, y: number): void
256
+ moveTo(x: number, y: number): void
257
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void
258
+ rect(x: number, y: number, w: number, h: number): void
259
+ roundRect(
260
+ x: number,
261
+ y: number,
262
+ w: number,
263
+ h: number,
264
+ radii?: number | number[]
265
+ ): void
266
+ }
267
+
268
+ interface CanvasPathDrawingStyles {
269
+ lineCap: CanvasLineCap
270
+ lineDashOffset: number
271
+ lineJoin: CanvasLineJoin
272
+ lineWidth: number
273
+ miterLimit: number
274
+ getLineDash(): number[]
275
+ setLineDash(segments: number[]): void
276
+ }
277
+
278
+ interface DOMMatrix2DInit {
279
+ a?: number
280
+ b?: number
281
+ c?: number
282
+ d?: number
283
+ e?: number
284
+ f?: number
285
+ m11?: number
286
+ m12?: number
287
+ m21?: number
288
+ m22?: number
289
+ m41?: number
290
+ m42?: number
291
+ }
292
+
293
+ /** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
294
+ interface CanvasPattern {
295
+ /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. */
296
+ setTransform(transform?: DOMMatrix2DInit): void
297
+ }
298
+
299
+ interface CanvasRect {
300
+ clearRect(x: number, y: number, w: number, h: number): void
301
+ fillRect(x: number, y: number, w: number, h: number): void
302
+ strokeRect(x: number, y: number, w: number, h: number): void
303
+ }
304
+
305
+ interface CanvasShadowStyles {
306
+ shadowBlur: number
307
+ shadowColor: string
308
+ shadowOffsetX: number
309
+ shadowOffsetY: number
310
+ }
311
+
312
+ interface CanvasState {
313
+ restore(): void
314
+ save(): void
315
+ }
316
+
317
+ /** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
318
+ interface TextMetrics {
319
+ /** Returns the measurement described below. */
320
+ readonly actualBoundingBoxAscent: number
321
+ /** Returns the measurement described below. */
322
+ readonly actualBoundingBoxDescent: number
323
+ /** Returns the measurement described below. */
324
+ readonly actualBoundingBoxLeft: number
325
+ /** Returns the measurement described below. */
326
+ readonly actualBoundingBoxRight: number
327
+ /** Returns the measurement described below. */
328
+ readonly fontBoundingBoxAscent: number
329
+ /** Returns the measurement described below. */
330
+ readonly fontBoundingBoxDescent: number
331
+ /** Returns the measurement described below. */
332
+ readonly width: number
333
+ }
334
+
335
+ interface CanvasText {
336
+ fillText(text: string, x: number, y: number, maxWidth?: number): void
337
+ measureText(text: string): TextMetrics
338
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void
339
+ }
340
+
341
+ interface CanvasTextDrawingStyles {
342
+ direction: CanvasDirection
343
+ font: string
344
+ fontKerning: CanvasFontKerning
345
+ textAlign: CanvasTextAlign
346
+ textBaseline: CanvasTextBaseline
347
+ }
348
+
349
+ interface DOMMatrixReadOnly {
350
+ readonly a: number
351
+ readonly b: number
352
+ readonly c: number
353
+ readonly d: number
354
+ readonly e: number
355
+ readonly f: number
356
+ readonly is2D: boolean
357
+ readonly isIdentity: boolean
358
+ readonly m11: number
359
+ readonly m12: number
360
+ readonly m13: number
361
+ readonly m14: number
362
+ readonly m21: number
363
+ readonly m22: number
364
+ readonly m23: number
365
+ readonly m24: number
366
+ readonly m31: number
367
+ readonly m32: number
368
+ readonly m33: number
369
+ readonly m34: number
370
+ readonly m41: number
371
+ readonly m42: number
372
+ readonly m43: number
373
+ readonly m44: number
374
+ }
375
+
376
+ interface CanvasTransform {
377
+ getTransform(): DOMMatrixReadOnly
378
+ resetTransform(): void
379
+ rotate(angle: number): void
380
+ scale(x: number, y: number): void
381
+ setTransform(
382
+ a: number,
383
+ b: number,
384
+ c: number,
385
+ d: number,
386
+ e: number,
387
+ f: number
388
+ ): void
389
+ setTransform(transform?: DOMMatrix2DInit): void
390
+ transform(
391
+ a: number,
392
+ b: number,
393
+ c: number,
394
+ d: number,
395
+ e: number,
396
+ f: number
397
+ ): void
398
+ translate(x: number, y: number): void
399
+ }
400
+
401
+ interface CanvasUserInterface {
402
+ // drawFocusIfNeeded(element: Element): void;
403
+ // drawFocusIfNeeded(path: Path2D, element: Element): void;
404
+ }
405
+
406
+ interface CanvasRenderingContext2DSettings {
407
+ alpha?: boolean
408
+ colorSpace?: PredefinedColorSpace
409
+ desynchronized?: boolean
410
+ willReadFrequently?: boolean
411
+ }
412
+
413
+ /** The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a <canvas> element. It is used for drawing shapes, text, images, and other objects. */
414
+ interface CanvasRenderingContext2D
415
+ extends CanvasCompositing,
416
+ CanvasDrawImage,
417
+ CanvasDrawPath,
418
+ CanvasFillStrokeStyles,
419
+ CanvasFilters,
420
+ CanvasImageData,
421
+ CanvasImageSmoothing,
422
+ CanvasPath,
423
+ CanvasPathDrawingStyles,
424
+ CanvasRect,
425
+ CanvasShadowStyles,
426
+ CanvasState,
427
+ CanvasText,
428
+ CanvasTextDrawingStyles,
429
+ CanvasTransform,
430
+ CanvasUserInterface {
431
+ readonly canvas: Canvas
432
+ getContextAttributes(): CanvasRenderingContext2DSettings
433
+ }
434
+
435
+ type GLbitfield = number
436
+ type GLboolean = boolean
437
+ type GLclampf = number
438
+ type GLenum = number
439
+ type GLfloat = number
440
+ type GLint = number
441
+ type GLint64 = number
442
+ type GLintptr = number
443
+ type GLsizei = number
444
+ type GLsizeiptr = number
445
+ type GLuint = number
446
+ type GLuint64 = number
447
+
448
+ interface WEBGL_color_buffer_float {
449
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum
450
+ readonly RGBA32F_EXT: GLenum
451
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum
452
+ }
453
+
454
+ interface WEBGL_compressed_texture_astc {
455
+ getSupportedProfiles(): string[]
456
+ readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum
457
+ readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum
458
+ readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum
459
+ readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum
460
+ readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum
461
+ readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum
462
+ readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum
463
+ readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum
464
+ readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum
465
+ readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum
466
+ readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum
467
+ readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum
468
+ readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum
469
+ readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum
470
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum
471
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum
472
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum
473
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum
474
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum
475
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum
476
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum
477
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum
478
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum
479
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum
480
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum
481
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum
482
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum
483
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum
484
+ }
485
+
486
+ interface WEBGL_compressed_texture_etc {
487
+ readonly COMPRESSED_R11_EAC: GLenum
488
+ readonly COMPRESSED_RG11_EAC: GLenum
489
+ readonly COMPRESSED_RGB8_ETC2: GLenum
490
+ readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum
491
+ readonly COMPRESSED_RGBA8_ETC2_EAC: GLenum
492
+ readonly COMPRESSED_SIGNED_R11_EAC: GLenum
493
+ readonly COMPRESSED_SIGNED_RG11_EAC: GLenum
494
+ readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum
495
+ readonly COMPRESSED_SRGB8_ETC2: GLenum
496
+ readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum
497
+ }
498
+
499
+ interface WEBGL_compressed_texture_etc1 {
500
+ readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum
501
+ }
502
+
503
+ /** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
504
+ interface WEBGL_compressed_texture_s3tc {
505
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum
506
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum
507
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum
508
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum
509
+ }
510
+
511
+ interface WEBGL_compressed_texture_s3tc_srgb {
512
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum
513
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum
514
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum
515
+ readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum
516
+ }
517
+
518
+ /** The WEBGL_debug_renderer_info extension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. */
519
+ interface WEBGL_debug_renderer_info {
520
+ readonly UNMASKED_RENDERER_WEBGL: GLenum
521
+ readonly UNMASKED_VENDOR_WEBGL: GLenum
522
+ }
523
+
524
+ interface WEBGL_debug_shaders {
525
+ getTranslatedShaderSource(shader: WebGLShader): string
526
+ }
527
+
528
+ /** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
529
+ interface WEBGL_depth_texture {
530
+ readonly UNSIGNED_INT_24_8_WEBGL: GLenum
531
+ }
532
+
533
+ interface WEBGL_draw_buffers {
534
+ drawBuffersWEBGL(buffers: GLenum[]): void
535
+ readonly COLOR_ATTACHMENT0_WEBGL: GLenum
536
+ readonly COLOR_ATTACHMENT10_WEBGL: GLenum
537
+ readonly COLOR_ATTACHMENT11_WEBGL: GLenum
538
+ readonly COLOR_ATTACHMENT12_WEBGL: GLenum
539
+ readonly COLOR_ATTACHMENT13_WEBGL: GLenum
540
+ readonly COLOR_ATTACHMENT14_WEBGL: GLenum
541
+ readonly COLOR_ATTACHMENT15_WEBGL: GLenum
542
+ readonly COLOR_ATTACHMENT1_WEBGL: GLenum
543
+ readonly COLOR_ATTACHMENT2_WEBGL: GLenum
544
+ readonly COLOR_ATTACHMENT3_WEBGL: GLenum
545
+ readonly COLOR_ATTACHMENT4_WEBGL: GLenum
546
+ readonly COLOR_ATTACHMENT5_WEBGL: GLenum
547
+ readonly COLOR_ATTACHMENT6_WEBGL: GLenum
548
+ readonly COLOR_ATTACHMENT7_WEBGL: GLenum
549
+ readonly COLOR_ATTACHMENT8_WEBGL: GLenum
550
+ readonly COLOR_ATTACHMENT9_WEBGL: GLenum
551
+ readonly DRAW_BUFFER0_WEBGL: GLenum
552
+ readonly DRAW_BUFFER10_WEBGL: GLenum
553
+ readonly DRAW_BUFFER11_WEBGL: GLenum
554
+ readonly DRAW_BUFFER12_WEBGL: GLenum
555
+ readonly DRAW_BUFFER13_WEBGL: GLenum
556
+ readonly DRAW_BUFFER14_WEBGL: GLenum
557
+ readonly DRAW_BUFFER15_WEBGL: GLenum
558
+ readonly DRAW_BUFFER1_WEBGL: GLenum
559
+ readonly DRAW_BUFFER2_WEBGL: GLenum
560
+ readonly DRAW_BUFFER3_WEBGL: GLenum
561
+ readonly DRAW_BUFFER4_WEBGL: GLenum
562
+ readonly DRAW_BUFFER5_WEBGL: GLenum
563
+ readonly DRAW_BUFFER6_WEBGL: GLenum
564
+ readonly DRAW_BUFFER7_WEBGL: GLenum
565
+ readonly DRAW_BUFFER8_WEBGL: GLenum
566
+ readonly DRAW_BUFFER9_WEBGL: GLenum
567
+ readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum
568
+ readonly MAX_DRAW_BUFFERS_WEBGL: GLenum
569
+ }
570
+
571
+ interface WEBGL_lose_context {
572
+ loseContext(): void
573
+ restoreContext(): void
574
+ }
575
+
576
+ interface WEBGL_multi_draw {
577
+ multiDrawArraysInstancedWEBGL(
578
+ mode: GLenum,
579
+ firstsList: Int32Array | GLint[],
580
+ firstsOffset: GLuint,
581
+ countsList: Int32Array | GLsizei[],
582
+ countsOffset: GLuint,
583
+ instanceCountsList: Int32Array | GLsizei[],
584
+ instanceCountsOffset: GLuint,
585
+ drawcount: GLsizei
586
+ ): void
587
+ multiDrawArraysWEBGL(
588
+ mode: GLenum,
589
+ firstsList: Int32Array | GLint[],
590
+ firstsOffset: GLuint,
591
+ countsList: Int32Array | GLsizei[],
592
+ countsOffset: GLuint,
593
+ drawcount: GLsizei
594
+ ): void
595
+ multiDrawElementsInstancedWEBGL(
596
+ mode: GLenum,
597
+ countsList: Int32Array | GLsizei[],
598
+ countsOffset: GLuint,
599
+ type: GLenum,
600
+ offsetsList: Int32Array | GLsizei[],
601
+ offsetsOffset: GLuint,
602
+ instanceCountsList: Int32Array | GLsizei[],
603
+ instanceCountsOffset: GLuint,
604
+ drawcount: GLsizei
605
+ ): void
606
+ multiDrawElementsWEBGL(
607
+ mode: GLenum,
608
+ countsList: Int32Array | GLsizei[],
609
+ countsOffset: GLuint,
610
+ type: GLenum,
611
+ offsetsList: Int32Array | GLsizei[],
612
+ offsetsOffset: GLuint,
613
+ drawcount: GLsizei
614
+ ): void
615
+ }
616
+
617
+ type OverSampleType = '2x' | '4x' | 'none'
618
+
619
+ interface WebGL2RenderingContext
620
+ extends WebGL2RenderingContextBase,
621
+ WebGL2RenderingContextOverloads,
622
+ WebGLRenderingContextBase {}
623
+
624
+ type Int32List = Int32Array | GLint[]
625
+ type Uint32List = Uint32Array | GLuint[]
626
+
627
+ interface WebGL2RenderingContextBase {
628
+ beginQuery(target: GLenum, query: WebGLQuery): void
629
+ beginTransformFeedback(primitiveMode: GLenum): void
630
+ bindBufferBase(
631
+ target: GLenum,
632
+ index: GLuint,
633
+ buffer: WebGLBuffer | null
634
+ ): void
635
+ bindBufferRange(
636
+ target: GLenum,
637
+ index: GLuint,
638
+ buffer: WebGLBuffer | null,
639
+ offset: GLintptr,
640
+ size: GLsizeiptr
641
+ ): void
642
+ bindSampler(unit: GLuint, sampler: WebGLSampler | null): void
643
+ bindTransformFeedback(
644
+ target: GLenum,
645
+ tf: WebGLTransformFeedback | null
646
+ ): void
647
+ bindVertexArray(array: WebGLVertexArrayObject | null): void
648
+ blitFramebuffer(
649
+ srcX0: GLint,
650
+ srcY0: GLint,
651
+ srcX1: GLint,
652
+ srcY1: GLint,
653
+ dstX0: GLint,
654
+ dstY0: GLint,
655
+ dstX1: GLint,
656
+ dstY1: GLint,
657
+ mask: GLbitfield,
658
+ filter: GLenum
659
+ ): void
660
+ clearBufferfi(
661
+ buffer: GLenum,
662
+ drawbuffer: GLint,
663
+ depth: GLfloat,
664
+ stencil: GLint
665
+ ): void
666
+ clearBufferfv(
667
+ buffer: GLenum,
668
+ drawbuffer: GLint,
669
+ values: Float32List,
670
+ srcOffset?: GLuint
671
+ ): void
672
+ clearBufferiv(
673
+ buffer: GLenum,
674
+ drawbuffer: GLint,
675
+ values: Int32List,
676
+ srcOffset?: GLuint
677
+ ): void
678
+ clearBufferuiv(
679
+ buffer: GLenum,
680
+ drawbuffer: GLint,
681
+ values: Uint32List,
682
+ srcOffset?: GLuint
683
+ ): void
684
+ clientWaitSync(
685
+ sync: WebGLSync,
686
+ flags: GLbitfield,
687
+ timeout: GLuint64
688
+ ): GLenum
689
+ compressedTexImage3D(
690
+ target: GLenum,
691
+ level: GLint,
692
+ internalformat: GLenum,
693
+ width: GLsizei,
694
+ height: GLsizei,
695
+ depth: GLsizei,
696
+ border: GLint,
697
+ imageSize: GLsizei,
698
+ offset: GLintptr
699
+ ): void
700
+ compressedTexImage3D(
701
+ target: GLenum,
702
+ level: GLint,
703
+ internalformat: GLenum,
704
+ width: GLsizei,
705
+ height: GLsizei,
706
+ depth: GLsizei,
707
+ border: GLint,
708
+ srcData: ArrayBufferView,
709
+ srcOffset?: GLuint,
710
+ srcLengthOverride?: GLuint
711
+ ): void
712
+ compressedTexSubImage3D(
713
+ target: GLenum,
714
+ level: GLint,
715
+ xoffset: GLint,
716
+ yoffset: GLint,
717
+ zoffset: GLint,
718
+ width: GLsizei,
719
+ height: GLsizei,
720
+ depth: GLsizei,
721
+ format: GLenum,
722
+ imageSize: GLsizei,
723
+ offset: GLintptr
724
+ ): void
725
+ compressedTexSubImage3D(
726
+ target: GLenum,
727
+ level: GLint,
728
+ xoffset: GLint,
729
+ yoffset: GLint,
730
+ zoffset: GLint,
731
+ width: GLsizei,
732
+ height: GLsizei,
733
+ depth: GLsizei,
734
+ format: GLenum,
735
+ srcData: ArrayBufferView,
736
+ srcOffset?: GLuint,
737
+ srcLengthOverride?: GLuint
738
+ ): void
739
+ copyBufferSubData(
740
+ readTarget: GLenum,
741
+ writeTarget: GLenum,
742
+ readOffset: GLintptr,
743
+ writeOffset: GLintptr,
744
+ size: GLsizeiptr
745
+ ): void
746
+ copyTexSubImage3D(
747
+ target: GLenum,
748
+ level: GLint,
749
+ xoffset: GLint,
750
+ yoffset: GLint,
751
+ zoffset: GLint,
752
+ x: GLint,
753
+ y: GLint,
754
+ width: GLsizei,
755
+ height: GLsizei
756
+ ): void
757
+ createQuery(): WebGLQuery | null
758
+ createSampler(): WebGLSampler | null
759
+ createTransformFeedback(): WebGLTransformFeedback | null
760
+ createVertexArray(): WebGLVertexArrayObject | null
761
+ deleteQuery(query: WebGLQuery | null): void
762
+ deleteSampler(sampler: WebGLSampler | null): void
763
+ deleteSync(sync: WebGLSync | null): void
764
+ deleteTransformFeedback(tf: WebGLTransformFeedback | null): void
765
+ deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void
766
+ drawArraysInstanced(
767
+ mode: GLenum,
768
+ first: GLint,
769
+ count: GLsizei,
770
+ instanceCount: GLsizei
771
+ ): void
772
+ drawBuffers(buffers: GLenum[]): void
773
+ drawElementsInstanced(
774
+ mode: GLenum,
775
+ count: GLsizei,
776
+ type: GLenum,
777
+ offset: GLintptr,
778
+ instanceCount: GLsizei
779
+ ): void
780
+ drawRangeElements(
781
+ mode: GLenum,
782
+ start: GLuint,
783
+ end: GLuint,
784
+ count: GLsizei,
785
+ type: GLenum,
786
+ offset: GLintptr
787
+ ): void
788
+ endQuery(target: GLenum): void
789
+ endTransformFeedback(): void
790
+ fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null
791
+ framebufferTextureLayer(
792
+ target: GLenum,
793
+ attachment: GLenum,
794
+ texture: WebGLTexture | null,
795
+ level: GLint,
796
+ layer: GLint
797
+ ): void
798
+ getActiveUniformBlockName(
799
+ program: WebGLProgram,
800
+ uniformBlockIndex: GLuint
801
+ ): string | null
802
+ getActiveUniformBlockParameter(
803
+ program: WebGLProgram,
804
+ uniformBlockIndex: GLuint,
805
+ pname: GLenum
806
+ ): any
807
+ getActiveUniforms(
808
+ program: WebGLProgram,
809
+ uniformIndices: GLuint[],
810
+ pname: GLenum
811
+ ): any
812
+ getBufferSubData(
813
+ target: GLenum,
814
+ srcByteOffset: GLintptr,
815
+ dstBuffer: ArrayBufferView,
816
+ dstOffset?: GLuint,
817
+ length?: GLuint
818
+ ): void
819
+ getFragDataLocation(program: WebGLProgram, name: string): GLint
820
+ getIndexedParameter(target: GLenum, index: GLuint): any
821
+ getInternalformatParameter(
822
+ target: GLenum,
823
+ internalformat: GLenum,
824
+ pname: GLenum
825
+ ): any
826
+ getQuery(target: GLenum, pname: GLenum): WebGLQuery | null
827
+ getQueryParameter(query: WebGLQuery, pname: GLenum): any
828
+ getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any
829
+ getSyncParameter(sync: WebGLSync, pname: GLenum): any
830
+ getTransformFeedbackVarying(
831
+ program: WebGLProgram,
832
+ index: GLuint
833
+ ): WebGLActiveInfo | null
834
+ getUniformBlockIndex(
835
+ program: WebGLProgram,
836
+ uniformBlockName: string
837
+ ): GLuint
838
+ getUniformIndices(
839
+ program: WebGLProgram,
840
+ uniformNames: string[]
841
+ ): GLuint[] | null
842
+ invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void
843
+ invalidateSubFramebuffer(
844
+ target: GLenum,
845
+ attachments: GLenum[],
846
+ x: GLint,
847
+ y: GLint,
848
+ width: GLsizei,
849
+ height: GLsizei
850
+ ): void
851
+ isQuery(query: WebGLQuery | null): GLboolean
852
+ isSampler(sampler: WebGLSampler | null): GLboolean
853
+ isSync(sync: WebGLSync | null): GLboolean
854
+ isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean
855
+ isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean
856
+ pauseTransformFeedback(): void
857
+ readBuffer(src: GLenum): void
858
+ renderbufferStorageMultisample(
859
+ target: GLenum,
860
+ samples: GLsizei,
861
+ internalformat: GLenum,
862
+ width: GLsizei,
863
+ height: GLsizei
864
+ ): void
865
+ resumeTransformFeedback(): void
866
+ samplerParameterf(
867
+ sampler: WebGLSampler,
868
+ pname: GLenum,
869
+ param: GLfloat
870
+ ): void
871
+ samplerParameteri(
872
+ sampler: WebGLSampler,
873
+ pname: GLenum,
874
+ param: GLint
875
+ ): void
876
+ texImage3D(
877
+ target: GLenum,
878
+ level: GLint,
879
+ internalformat: GLint,
880
+ width: GLsizei,
881
+ height: GLsizei,
882
+ depth: GLsizei,
883
+ border: GLint,
884
+ format: GLenum,
885
+ type: GLenum,
886
+ pboOffset: GLintptr
887
+ ): void
888
+ texImage3D(
889
+ target: GLenum,
890
+ level: GLint,
891
+ internalformat: GLint,
892
+ width: GLsizei,
893
+ height: GLsizei,
894
+ depth: GLsizei,
895
+ border: GLint,
896
+ format: GLenum,
897
+ type: GLenum,
898
+ source: TexImageSource
899
+ ): void
900
+ texImage3D(
901
+ target: GLenum,
902
+ level: GLint,
903
+ internalformat: GLint,
904
+ width: GLsizei,
905
+ height: GLsizei,
906
+ depth: GLsizei,
907
+ border: GLint,
908
+ format: GLenum,
909
+ type: GLenum,
910
+ srcData: ArrayBufferView | null
911
+ ): void
912
+ texImage3D(
913
+ target: GLenum,
914
+ level: GLint,
915
+ internalformat: GLint,
916
+ width: GLsizei,
917
+ height: GLsizei,
918
+ depth: GLsizei,
919
+ border: GLint,
920
+ format: GLenum,
921
+ type: GLenum,
922
+ srcData: ArrayBufferView,
923
+ srcOffset: GLuint
924
+ ): void
925
+ texStorage2D(
926
+ target: GLenum,
927
+ levels: GLsizei,
928
+ internalformat: GLenum,
929
+ width: GLsizei,
930
+ height: GLsizei
931
+ ): void
932
+ texStorage3D(
933
+ target: GLenum,
934
+ levels: GLsizei,
935
+ internalformat: GLenum,
936
+ width: GLsizei,
937
+ height: GLsizei,
938
+ depth: GLsizei
939
+ ): void
940
+ texSubImage3D(
941
+ target: GLenum,
942
+ level: GLint,
943
+ xoffset: GLint,
944
+ yoffset: GLint,
945
+ zoffset: GLint,
946
+ width: GLsizei,
947
+ height: GLsizei,
948
+ depth: GLsizei,
949
+ format: GLenum,
950
+ type: GLenum,
951
+ pboOffset: GLintptr
952
+ ): void
953
+ texSubImage3D(
954
+ target: GLenum,
955
+ level: GLint,
956
+ xoffset: GLint,
957
+ yoffset: GLint,
958
+ zoffset: GLint,
959
+ width: GLsizei,
960
+ height: GLsizei,
961
+ depth: GLsizei,
962
+ format: GLenum,
963
+ type: GLenum,
964
+ source: TexImageSource
965
+ ): void
966
+ texSubImage3D(
967
+ target: GLenum,
968
+ level: GLint,
969
+ xoffset: GLint,
970
+ yoffset: GLint,
971
+ zoffset: GLint,
972
+ width: GLsizei,
973
+ height: GLsizei,
974
+ depth: GLsizei,
975
+ format: GLenum,
976
+ type: GLenum,
977
+ srcData: ArrayBufferView | null,
978
+ srcOffset?: GLuint
979
+ ): void
980
+ transformFeedbackVaryings(
981
+ program: WebGLProgram,
982
+ varyings: string[],
983
+ bufferMode: GLenum
984
+ ): void
985
+ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void
986
+ uniform1uiv(
987
+ location: WebGLUniformLocation | null,
988
+ data: Uint32List,
989
+ srcOffset?: GLuint,
990
+ srcLength?: GLuint
991
+ ): void
992
+ uniform2ui(
993
+ location: WebGLUniformLocation | null,
994
+ v0: GLuint,
995
+ v1: GLuint
996
+ ): void
997
+ uniform2uiv(
998
+ location: WebGLUniformLocation | null,
999
+ data: Uint32List,
1000
+ srcOffset?: GLuint,
1001
+ srcLength?: GLuint
1002
+ ): void
1003
+ uniform3ui(
1004
+ location: WebGLUniformLocation | null,
1005
+ v0: GLuint,
1006
+ v1: GLuint,
1007
+ v2: GLuint
1008
+ ): void
1009
+ uniform3uiv(
1010
+ location: WebGLUniformLocation | null,
1011
+ data: Uint32List,
1012
+ srcOffset?: GLuint,
1013
+ srcLength?: GLuint
1014
+ ): void
1015
+ uniform4ui(
1016
+ location: WebGLUniformLocation | null,
1017
+ v0: GLuint,
1018
+ v1: GLuint,
1019
+ v2: GLuint,
1020
+ v3: GLuint
1021
+ ): void
1022
+ uniform4uiv(
1023
+ location: WebGLUniformLocation | null,
1024
+ data: Uint32List,
1025
+ srcOffset?: GLuint,
1026
+ srcLength?: GLuint
1027
+ ): void
1028
+ uniformBlockBinding(
1029
+ program: WebGLProgram,
1030
+ uniformBlockIndex: GLuint,
1031
+ uniformBlockBinding: GLuint
1032
+ ): void
1033
+ uniformMatrix2x3fv(
1034
+ location: WebGLUniformLocation | null,
1035
+ transpose: GLboolean,
1036
+ data: Float32List,
1037
+ srcOffset?: GLuint,
1038
+ srcLength?: GLuint
1039
+ ): void
1040
+ uniformMatrix2x4fv(
1041
+ location: WebGLUniformLocation | null,
1042
+ transpose: GLboolean,
1043
+ data: Float32List,
1044
+ srcOffset?: GLuint,
1045
+ srcLength?: GLuint
1046
+ ): void
1047
+ uniformMatrix3x2fv(
1048
+ location: WebGLUniformLocation | null,
1049
+ transpose: GLboolean,
1050
+ data: Float32List,
1051
+ srcOffset?: GLuint,
1052
+ srcLength?: GLuint
1053
+ ): void
1054
+ uniformMatrix3x4fv(
1055
+ location: WebGLUniformLocation | null,
1056
+ transpose: GLboolean,
1057
+ data: Float32List,
1058
+ srcOffset?: GLuint,
1059
+ srcLength?: GLuint
1060
+ ): void
1061
+ uniformMatrix4x2fv(
1062
+ location: WebGLUniformLocation | null,
1063
+ transpose: GLboolean,
1064
+ data: Float32List,
1065
+ srcOffset?: GLuint,
1066
+ srcLength?: GLuint
1067
+ ): void
1068
+ uniformMatrix4x3fv(
1069
+ location: WebGLUniformLocation | null,
1070
+ transpose: GLboolean,
1071
+ data: Float32List,
1072
+ srcOffset?: GLuint,
1073
+ srcLength?: GLuint
1074
+ ): void
1075
+ vertexAttribDivisor(index: GLuint, divisor: GLuint): void
1076
+ vertexAttribI4i(
1077
+ index: GLuint,
1078
+ x: GLint,
1079
+ y: GLint,
1080
+ z: GLint,
1081
+ w: GLint
1082
+ ): void
1083
+ vertexAttribI4iv(index: GLuint, values: Int32List): void
1084
+ vertexAttribI4ui(
1085
+ index: GLuint,
1086
+ x: GLuint,
1087
+ y: GLuint,
1088
+ z: GLuint,
1089
+ w: GLuint
1090
+ ): void
1091
+ vertexAttribI4uiv(index: GLuint, values: Uint32List): void
1092
+ vertexAttribIPointer(
1093
+ index: GLuint,
1094
+ size: GLint,
1095
+ type: GLenum,
1096
+ stride: GLsizei,
1097
+ offset: GLintptr
1098
+ ): void
1099
+ waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void
1100
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum
1101
+ readonly ALREADY_SIGNALED: GLenum
1102
+ readonly ANY_SAMPLES_PASSED: GLenum
1103
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum
1104
+ readonly COLOR: GLenum
1105
+ readonly COLOR_ATTACHMENT1: GLenum
1106
+ readonly COLOR_ATTACHMENT10: GLenum
1107
+ readonly COLOR_ATTACHMENT11: GLenum
1108
+ readonly COLOR_ATTACHMENT12: GLenum
1109
+ readonly COLOR_ATTACHMENT13: GLenum
1110
+ readonly COLOR_ATTACHMENT14: GLenum
1111
+ readonly COLOR_ATTACHMENT15: GLenum
1112
+ readonly COLOR_ATTACHMENT2: GLenum
1113
+ readonly COLOR_ATTACHMENT3: GLenum
1114
+ readonly COLOR_ATTACHMENT4: GLenum
1115
+ readonly COLOR_ATTACHMENT5: GLenum
1116
+ readonly COLOR_ATTACHMENT6: GLenum
1117
+ readonly COLOR_ATTACHMENT7: GLenum
1118
+ readonly COLOR_ATTACHMENT8: GLenum
1119
+ readonly COLOR_ATTACHMENT9: GLenum
1120
+ readonly COMPARE_REF_TO_TEXTURE: GLenum
1121
+ readonly CONDITION_SATISFIED: GLenum
1122
+ readonly COPY_READ_BUFFER: GLenum
1123
+ readonly COPY_READ_BUFFER_BINDING: GLenum
1124
+ readonly COPY_WRITE_BUFFER: GLenum
1125
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum
1126
+ readonly CURRENT_QUERY: GLenum
1127
+ readonly DEPTH: GLenum
1128
+ readonly DEPTH24_STENCIL8: GLenum
1129
+ readonly DEPTH32F_STENCIL8: GLenum
1130
+ readonly DEPTH_COMPONENT24: GLenum
1131
+ readonly DEPTH_COMPONENT32F: GLenum
1132
+ readonly DRAW_BUFFER0: GLenum
1133
+ readonly DRAW_BUFFER1: GLenum
1134
+ readonly DRAW_BUFFER10: GLenum
1135
+ readonly DRAW_BUFFER11: GLenum
1136
+ readonly DRAW_BUFFER12: GLenum
1137
+ readonly DRAW_BUFFER13: GLenum
1138
+ readonly DRAW_BUFFER14: GLenum
1139
+ readonly DRAW_BUFFER15: GLenum
1140
+ readonly DRAW_BUFFER2: GLenum
1141
+ readonly DRAW_BUFFER3: GLenum
1142
+ readonly DRAW_BUFFER4: GLenum
1143
+ readonly DRAW_BUFFER5: GLenum
1144
+ readonly DRAW_BUFFER6: GLenum
1145
+ readonly DRAW_BUFFER7: GLenum
1146
+ readonly DRAW_BUFFER8: GLenum
1147
+ readonly DRAW_BUFFER9: GLenum
1148
+ readonly DRAW_FRAMEBUFFER: GLenum
1149
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum
1150
+ readonly DYNAMIC_COPY: GLenum
1151
+ readonly DYNAMIC_READ: GLenum
1152
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum
1153
+ readonly FLOAT_MAT2x3: GLenum
1154
+ readonly FLOAT_MAT2x4: GLenum
1155
+ readonly FLOAT_MAT3x2: GLenum
1156
+ readonly FLOAT_MAT3x4: GLenum
1157
+ readonly FLOAT_MAT4x2: GLenum
1158
+ readonly FLOAT_MAT4x3: GLenum
1159
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum
1160
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum
1161
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum
1162
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum
1163
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum
1164
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum
1165
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum
1166
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum
1167
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum
1168
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum
1169
+ readonly FRAMEBUFFER_DEFAULT: GLenum
1170
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum
1171
+ readonly HALF_FLOAT: GLenum
1172
+ readonly INTERLEAVED_ATTRIBS: GLenum
1173
+ readonly INT_2_10_10_10_REV: GLenum
1174
+ readonly INT_SAMPLER_2D: GLenum
1175
+ readonly INT_SAMPLER_2D_ARRAY: GLenum
1176
+ readonly INT_SAMPLER_3D: GLenum
1177
+ readonly INT_SAMPLER_CUBE: GLenum
1178
+ readonly INVALID_INDEX: GLenum
1179
+ readonly MAX: GLenum
1180
+ readonly MAX_3D_TEXTURE_SIZE: GLenum
1181
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum
1182
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum
1183
+ readonly MAX_COLOR_ATTACHMENTS: GLenum
1184
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum
1185
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum
1186
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum
1187
+ readonly MAX_DRAW_BUFFERS: GLenum
1188
+ readonly MAX_ELEMENTS_INDICES: GLenum
1189
+ readonly MAX_ELEMENTS_VERTICES: GLenum
1190
+ readonly MAX_ELEMENT_INDEX: GLenum
1191
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum
1192
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum
1193
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum
1194
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum
1195
+ readonly MAX_SAMPLES: GLenum
1196
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum
1197
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum
1198
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum
1199
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum
1200
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum
1201
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum
1202
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum
1203
+ readonly MAX_VARYING_COMPONENTS: GLenum
1204
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum
1205
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum
1206
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum
1207
+ readonly MIN: GLenum
1208
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum
1209
+ readonly OBJECT_TYPE: GLenum
1210
+ readonly PACK_ROW_LENGTH: GLenum
1211
+ readonly PACK_SKIP_PIXELS: GLenum
1212
+ readonly PACK_SKIP_ROWS: GLenum
1213
+ readonly PIXEL_PACK_BUFFER: GLenum
1214
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum
1215
+ readonly PIXEL_UNPACK_BUFFER: GLenum
1216
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum
1217
+ readonly QUERY_RESULT: GLenum
1218
+ readonly QUERY_RESULT_AVAILABLE: GLenum
1219
+ readonly R11F_G11F_B10F: GLenum
1220
+ readonly R16F: GLenum
1221
+ readonly R16I: GLenum
1222
+ readonly R16UI: GLenum
1223
+ readonly R32F: GLenum
1224
+ readonly R32I: GLenum
1225
+ readonly R32UI: GLenum
1226
+ readonly R8: GLenum
1227
+ readonly R8I: GLenum
1228
+ readonly R8UI: GLenum
1229
+ readonly R8_SNORM: GLenum
1230
+ readonly RASTERIZER_DISCARD: GLenum
1231
+ readonly READ_BUFFER: GLenum
1232
+ readonly READ_FRAMEBUFFER: GLenum
1233
+ readonly READ_FRAMEBUFFER_BINDING: GLenum
1234
+ readonly RED: GLenum
1235
+ readonly RED_INTEGER: GLenum
1236
+ readonly RENDERBUFFER_SAMPLES: GLenum
1237
+ readonly RG: GLenum
1238
+ readonly RG16F: GLenum
1239
+ readonly RG16I: GLenum
1240
+ readonly RG16UI: GLenum
1241
+ readonly RG32F: GLenum
1242
+ readonly RG32I: GLenum
1243
+ readonly RG32UI: GLenum
1244
+ readonly RG8: GLenum
1245
+ readonly RG8I: GLenum
1246
+ readonly RG8UI: GLenum
1247
+ readonly RG8_SNORM: GLenum
1248
+ readonly RGB10_A2: GLenum
1249
+ readonly RGB10_A2UI: GLenum
1250
+ readonly RGB16F: GLenum
1251
+ readonly RGB16I: GLenum
1252
+ readonly RGB16UI: GLenum
1253
+ readonly RGB32F: GLenum
1254
+ readonly RGB32I: GLenum
1255
+ readonly RGB32UI: GLenum
1256
+ readonly RGB8: GLenum
1257
+ readonly RGB8I: GLenum
1258
+ readonly RGB8UI: GLenum
1259
+ readonly RGB8_SNORM: GLenum
1260
+ readonly RGB9_E5: GLenum
1261
+ readonly RGBA16F: GLenum
1262
+ readonly RGBA16I: GLenum
1263
+ readonly RGBA16UI: GLenum
1264
+ readonly RGBA32F: GLenum
1265
+ readonly RGBA32I: GLenum
1266
+ readonly RGBA32UI: GLenum
1267
+ readonly RGBA8: GLenum
1268
+ readonly RGBA8I: GLenum
1269
+ readonly RGBA8UI: GLenum
1270
+ readonly RGBA8_SNORM: GLenum
1271
+ readonly RGBA_INTEGER: GLenum
1272
+ readonly RGB_INTEGER: GLenum
1273
+ readonly RG_INTEGER: GLenum
1274
+ readonly SAMPLER_2D_ARRAY: GLenum
1275
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum
1276
+ readonly SAMPLER_2D_SHADOW: GLenum
1277
+ readonly SAMPLER_3D: GLenum
1278
+ readonly SAMPLER_BINDING: GLenum
1279
+ readonly SAMPLER_CUBE_SHADOW: GLenum
1280
+ readonly SEPARATE_ATTRIBS: GLenum
1281
+ readonly SIGNALED: GLenum
1282
+ readonly SIGNED_NORMALIZED: GLenum
1283
+ readonly SRGB: GLenum
1284
+ readonly SRGB8: GLenum
1285
+ readonly SRGB8_ALPHA8: GLenum
1286
+ readonly STATIC_COPY: GLenum
1287
+ readonly STATIC_READ: GLenum
1288
+ readonly STENCIL: GLenum
1289
+ readonly STREAM_COPY: GLenum
1290
+ readonly STREAM_READ: GLenum
1291
+ readonly SYNC_CONDITION: GLenum
1292
+ readonly SYNC_FENCE: GLenum
1293
+ readonly SYNC_FLAGS: GLenum
1294
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum
1295
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum
1296
+ readonly SYNC_STATUS: GLenum
1297
+ readonly TEXTURE_2D_ARRAY: GLenum
1298
+ readonly TEXTURE_3D: GLenum
1299
+ readonly TEXTURE_BASE_LEVEL: GLenum
1300
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum
1301
+ readonly TEXTURE_BINDING_3D: GLenum
1302
+ readonly TEXTURE_COMPARE_FUNC: GLenum
1303
+ readonly TEXTURE_COMPARE_MODE: GLenum
1304
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum
1305
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum
1306
+ readonly TEXTURE_MAX_LEVEL: GLenum
1307
+ readonly TEXTURE_MAX_LOD: GLenum
1308
+ readonly TEXTURE_MIN_LOD: GLenum
1309
+ readonly TEXTURE_WRAP_R: GLenum
1310
+ readonly TIMEOUT_EXPIRED: GLenum
1311
+ readonly TIMEOUT_IGNORED: GLint64
1312
+ readonly TRANSFORM_FEEDBACK: GLenum
1313
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum
1314
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum
1315
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum
1316
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum
1317
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum
1318
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum
1319
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum
1320
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum
1321
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum
1322
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum
1323
+ readonly UNIFORM_ARRAY_STRIDE: GLenum
1324
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum
1325
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum
1326
+ readonly UNIFORM_BLOCK_BINDING: GLenum
1327
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum
1328
+ readonly UNIFORM_BLOCK_INDEX: GLenum
1329
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum
1330
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum
1331
+ readonly UNIFORM_BUFFER: GLenum
1332
+ readonly UNIFORM_BUFFER_BINDING: GLenum
1333
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum
1334
+ readonly UNIFORM_BUFFER_SIZE: GLenum
1335
+ readonly UNIFORM_BUFFER_START: GLenum
1336
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum
1337
+ readonly UNIFORM_MATRIX_STRIDE: GLenum
1338
+ readonly UNIFORM_OFFSET: GLenum
1339
+ readonly UNIFORM_SIZE: GLenum
1340
+ readonly UNIFORM_TYPE: GLenum
1341
+ readonly UNPACK_IMAGE_HEIGHT: GLenum
1342
+ readonly UNPACK_ROW_LENGTH: GLenum
1343
+ readonly UNPACK_SKIP_IMAGES: GLenum
1344
+ readonly UNPACK_SKIP_PIXELS: GLenum
1345
+ readonly UNPACK_SKIP_ROWS: GLenum
1346
+ readonly UNSIGNALED: GLenum
1347
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum
1348
+ readonly UNSIGNED_INT_24_8: GLenum
1349
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum
1350
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum
1351
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum
1352
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum
1353
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum
1354
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum
1355
+ readonly UNSIGNED_INT_VEC2: GLenum
1356
+ readonly UNSIGNED_INT_VEC3: GLenum
1357
+ readonly UNSIGNED_INT_VEC4: GLenum
1358
+ readonly UNSIGNED_NORMALIZED: GLenum
1359
+ readonly VERTEX_ARRAY_BINDING: GLenum
1360
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum
1361
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum
1362
+ readonly WAIT_FAILED: GLenum
1363
+ }
1364
+
1365
+ interface WebGL2RenderingContextOverloads {
1366
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void
1367
+ bufferData(
1368
+ target: GLenum,
1369
+ srcData: BufferSource | null,
1370
+ usage: GLenum
1371
+ ): void
1372
+ bufferData(
1373
+ target: GLenum,
1374
+ srcData: ArrayBufferView,
1375
+ usage: GLenum,
1376
+ srcOffset: GLuint,
1377
+ length?: GLuint
1378
+ ): void
1379
+ bufferSubData(
1380
+ target: GLenum,
1381
+ dstByteOffset: GLintptr,
1382
+ srcData: BufferSource
1383
+ ): void
1384
+ bufferSubData(
1385
+ target: GLenum,
1386
+ dstByteOffset: GLintptr,
1387
+ srcData: ArrayBufferView,
1388
+ srcOffset: GLuint,
1389
+ length?: GLuint
1390
+ ): void
1391
+ compressedTexImage2D(
1392
+ target: GLenum,
1393
+ level: GLint,
1394
+ internalformat: GLenum,
1395
+ width: GLsizei,
1396
+ height: GLsizei,
1397
+ border: GLint,
1398
+ imageSize: GLsizei,
1399
+ offset: GLintptr
1400
+ ): void
1401
+ compressedTexImage2D(
1402
+ target: GLenum,
1403
+ level: GLint,
1404
+ internalformat: GLenum,
1405
+ width: GLsizei,
1406
+ height: GLsizei,
1407
+ border: GLint,
1408
+ srcData: ArrayBufferView,
1409
+ srcOffset?: GLuint,
1410
+ srcLengthOverride?: GLuint
1411
+ ): void
1412
+ compressedTexSubImage2D(
1413
+ target: GLenum,
1414
+ level: GLint,
1415
+ xoffset: GLint,
1416
+ yoffset: GLint,
1417
+ width: GLsizei,
1418
+ height: GLsizei,
1419
+ format: GLenum,
1420
+ imageSize: GLsizei,
1421
+ offset: GLintptr
1422
+ ): void
1423
+ compressedTexSubImage2D(
1424
+ target: GLenum,
1425
+ level: GLint,
1426
+ xoffset: GLint,
1427
+ yoffset: GLint,
1428
+ width: GLsizei,
1429
+ height: GLsizei,
1430
+ format: GLenum,
1431
+ srcData: ArrayBufferView,
1432
+ srcOffset?: GLuint,
1433
+ srcLengthOverride?: GLuint
1434
+ ): void
1435
+ readPixels(
1436
+ x: GLint,
1437
+ y: GLint,
1438
+ width: GLsizei,
1439
+ height: GLsizei,
1440
+ format: GLenum,
1441
+ type: GLenum,
1442
+ dstData: ArrayBufferView | null
1443
+ ): void
1444
+ readPixels(
1445
+ x: GLint,
1446
+ y: GLint,
1447
+ width: GLsizei,
1448
+ height: GLsizei,
1449
+ format: GLenum,
1450
+ type: GLenum,
1451
+ offset: GLintptr
1452
+ ): void
1453
+ readPixels(
1454
+ x: GLint,
1455
+ y: GLint,
1456
+ width: GLsizei,
1457
+ height: GLsizei,
1458
+ format: GLenum,
1459
+ type: GLenum,
1460
+ dstData: ArrayBufferView,
1461
+ dstOffset: GLuint
1462
+ ): void
1463
+ texImage2D(
1464
+ target: GLenum,
1465
+ level: GLint,
1466
+ internalformat: GLint,
1467
+ width: GLsizei,
1468
+ height: GLsizei,
1469
+ border: GLint,
1470
+ format: GLenum,
1471
+ type: GLenum,
1472
+ pixels: ArrayBufferView | null
1473
+ ): void
1474
+ texImage2D(
1475
+ target: GLenum,
1476
+ level: GLint,
1477
+ internalformat: GLint,
1478
+ format: GLenum,
1479
+ type: GLenum,
1480
+ source: TexImageSource
1481
+ ): void
1482
+ texImage2D(
1483
+ target: GLenum,
1484
+ level: GLint,
1485
+ internalformat: GLint,
1486
+ width: GLsizei,
1487
+ height: GLsizei,
1488
+ border: GLint,
1489
+ format: GLenum,
1490
+ type: GLenum,
1491
+ pboOffset: GLintptr
1492
+ ): void
1493
+ texImage2D(
1494
+ target: GLenum,
1495
+ level: GLint,
1496
+ internalformat: GLint,
1497
+ width: GLsizei,
1498
+ height: GLsizei,
1499
+ border: GLint,
1500
+ format: GLenum,
1501
+ type: GLenum,
1502
+ source: TexImageSource
1503
+ ): void
1504
+ texImage2D(
1505
+ target: GLenum,
1506
+ level: GLint,
1507
+ internalformat: GLint,
1508
+ width: GLsizei,
1509
+ height: GLsizei,
1510
+ border: GLint,
1511
+ format: GLenum,
1512
+ type: GLenum,
1513
+ srcData: ArrayBufferView,
1514
+ srcOffset: GLuint
1515
+ ): void
1516
+ texSubImage2D(
1517
+ target: GLenum,
1518
+ level: GLint,
1519
+ xoffset: GLint,
1520
+ yoffset: GLint,
1521
+ width: GLsizei,
1522
+ height: GLsizei,
1523
+ format: GLenum,
1524
+ type: GLenum,
1525
+ pixels: ArrayBufferView | null
1526
+ ): void
1527
+ texSubImage2D(
1528
+ target: GLenum,
1529
+ level: GLint,
1530
+ xoffset: GLint,
1531
+ yoffset: GLint,
1532
+ format: GLenum,
1533
+ type: GLenum,
1534
+ source: TexImageSource
1535
+ ): void
1536
+ texSubImage2D(
1537
+ target: GLenum,
1538
+ level: GLint,
1539
+ xoffset: GLint,
1540
+ yoffset: GLint,
1541
+ width: GLsizei,
1542
+ height: GLsizei,
1543
+ format: GLenum,
1544
+ type: GLenum,
1545
+ pboOffset: GLintptr
1546
+ ): void
1547
+ texSubImage2D(
1548
+ target: GLenum,
1549
+ level: GLint,
1550
+ xoffset: GLint,
1551
+ yoffset: GLint,
1552
+ width: GLsizei,
1553
+ height: GLsizei,
1554
+ format: GLenum,
1555
+ type: GLenum,
1556
+ source: TexImageSource
1557
+ ): void
1558
+ texSubImage2D(
1559
+ target: GLenum,
1560
+ level: GLint,
1561
+ xoffset: GLint,
1562
+ yoffset: GLint,
1563
+ width: GLsizei,
1564
+ height: GLsizei,
1565
+ format: GLenum,
1566
+ type: GLenum,
1567
+ srcData: ArrayBufferView,
1568
+ srcOffset: GLuint
1569
+ ): void
1570
+ uniform1fv(
1571
+ location: WebGLUniformLocation | null,
1572
+ data: Float32List,
1573
+ srcOffset?: GLuint,
1574
+ srcLength?: GLuint
1575
+ ): void
1576
+ uniform1iv(
1577
+ location: WebGLUniformLocation | null,
1578
+ data: Int32List,
1579
+ srcOffset?: GLuint,
1580
+ srcLength?: GLuint
1581
+ ): void
1582
+ uniform2fv(
1583
+ location: WebGLUniformLocation | null,
1584
+ data: Float32List,
1585
+ srcOffset?: GLuint,
1586
+ srcLength?: GLuint
1587
+ ): void
1588
+ uniform2iv(
1589
+ location: WebGLUniformLocation | null,
1590
+ data: Int32List,
1591
+ srcOffset?: GLuint,
1592
+ srcLength?: GLuint
1593
+ ): void
1594
+ uniform3fv(
1595
+ location: WebGLUniformLocation | null,
1596
+ data: Float32List,
1597
+ srcOffset?: GLuint,
1598
+ srcLength?: GLuint
1599
+ ): void
1600
+ uniform3iv(
1601
+ location: WebGLUniformLocation | null,
1602
+ data: Int32List,
1603
+ srcOffset?: GLuint,
1604
+ srcLength?: GLuint
1605
+ ): void
1606
+ uniform4fv(
1607
+ location: WebGLUniformLocation | null,
1608
+ data: Float32List,
1609
+ srcOffset?: GLuint,
1610
+ srcLength?: GLuint
1611
+ ): void
1612
+ uniform4iv(
1613
+ location: WebGLUniformLocation | null,
1614
+ data: Int32List,
1615
+ srcOffset?: GLuint,
1616
+ srcLength?: GLuint
1617
+ ): void
1618
+ uniformMatrix2fv(
1619
+ location: WebGLUniformLocation | null,
1620
+ transpose: GLboolean,
1621
+ data: Float32List,
1622
+ srcOffset?: GLuint,
1623
+ srcLength?: GLuint
1624
+ ): void
1625
+ uniformMatrix3fv(
1626
+ location: WebGLUniformLocation | null,
1627
+ transpose: GLboolean,
1628
+ data: Float32List,
1629
+ srcOffset?: GLuint,
1630
+ srcLength?: GLuint
1631
+ ): void
1632
+ uniformMatrix4fv(
1633
+ location: WebGLUniformLocation | null,
1634
+ transpose: GLboolean,
1635
+ data: Float32List,
1636
+ srcOffset?: GLuint,
1637
+ srcLength?: GLuint
1638
+ ): void
1639
+ }
1640
+
1641
+ /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
1642
+ interface WebGLActiveInfo {
1643
+ readonly name: string
1644
+ readonly size: GLint
1645
+ readonly type: GLenum
1646
+ }
1647
+
1648
+ /** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
1649
+ interface WebGLBuffer {}
1650
+
1651
+ /** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
1652
+ interface WebGLFramebuffer {}
1653
+
1654
+ /** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */
1655
+ interface WebGLProgram {}
1656
+
1657
+ interface WebGLQuery {}
1658
+
1659
+ /** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
1660
+ interface WebGLRenderbuffer {}
1661
+
1662
+ /** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
1663
+ interface WebGLRenderingContext
1664
+ extends WebGLRenderingContextBase,
1665
+ WebGLRenderingContextOverloads {}
1666
+
1667
+ /** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */
1668
+ interface ANGLE_instanced_arrays {
1669
+ drawArraysInstancedANGLE(
1670
+ mode: GLenum,
1671
+ first: GLint,
1672
+ count: GLsizei,
1673
+ primcount: GLsizei
1674
+ ): void
1675
+ drawElementsInstancedANGLE(
1676
+ mode: GLenum,
1677
+ count: GLsizei,
1678
+ type: GLenum,
1679
+ offset: GLintptr,
1680
+ primcount: GLsizei
1681
+ ): void
1682
+ vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void
1683
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum
1684
+ }
1685
+
1686
+ interface EXT_blend_minmax {
1687
+ readonly MAX_EXT: GLenum
1688
+ readonly MIN_EXT: GLenum
1689
+ }
1690
+
1691
+ interface EXT_color_buffer_float {}
1692
+
1693
+ interface EXT_color_buffer_half_float {
1694
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum
1695
+ readonly RGB16F_EXT: GLenum
1696
+ readonly RGBA16F_EXT: GLenum
1697
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum
1698
+ }
1699
+
1700
+ interface EXT_float_blend {}
1701
+
1702
+ /** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */
1703
+ interface EXT_frag_depth {}
1704
+
1705
+ interface EXT_sRGB {
1706
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum
1707
+ readonly SRGB8_ALPHA8_EXT: GLenum
1708
+ readonly SRGB_ALPHA_EXT: GLenum
1709
+ readonly SRGB_EXT: GLenum
1710
+ }
1711
+
1712
+ interface EXT_shader_texture_lod {}
1713
+
1714
+ interface EXT_texture_compression_bptc {
1715
+ readonly COMPRESSED_RGBA_BPTC_UNORM_EXT: GLenum
1716
+ readonly COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT: GLenum
1717
+ readonly COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT: GLenum
1718
+ readonly COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT: GLenum
1719
+ }
1720
+
1721
+ interface EXT_texture_compression_rgtc {
1722
+ readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum
1723
+ readonly COMPRESSED_RED_RGTC1_EXT: GLenum
1724
+ readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum
1725
+ readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum
1726
+ }
1727
+
1728
+ /** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
1729
+ interface EXT_texture_filter_anisotropic {
1730
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum
1731
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum
1732
+ }
1733
+
1734
+ interface EXT_texture_norm16 {
1735
+ readonly R16_EXT: GLenum
1736
+ readonly R16_SNORM_EXT: GLenum
1737
+ readonly RG16_EXT: GLenum
1738
+ readonly RG16_SNORM_EXT: GLenum
1739
+ readonly RGB16_EXT: GLenum
1740
+ readonly RGB16_SNORM_EXT: GLenum
1741
+ readonly RGBA16_EXT: GLenum
1742
+ readonly RGBA16_SNORM_EXT: GLenum
1743
+ }
1744
+
1745
+ interface KHR_parallel_shader_compile {
1746
+ readonly COMPLETION_STATUS_KHR: GLenum
1747
+ }
1748
+
1749
+ interface OES_draw_buffers_indexed {
1750
+ blendEquationSeparateiOES(
1751
+ buf: GLuint,
1752
+ modeRGB: GLenum,
1753
+ modeAlpha: GLenum
1754
+ ): void
1755
+ blendEquationiOES(buf: GLuint, mode: GLenum): void
1756
+ blendFuncSeparateiOES(
1757
+ buf: GLuint,
1758
+ srcRGB: GLenum,
1759
+ dstRGB: GLenum,
1760
+ srcAlpha: GLenum,
1761
+ dstAlpha: GLenum
1762
+ ): void
1763
+ blendFunciOES(buf: GLuint, src: GLenum, dst: GLenum): void
1764
+ colorMaskiOES(
1765
+ buf: GLuint,
1766
+ r: GLboolean,
1767
+ g: GLboolean,
1768
+ b: GLboolean,
1769
+ a: GLboolean
1770
+ ): void
1771
+ disableiOES(target: GLenum, index: GLuint): void
1772
+ enableiOES(target: GLenum, index: GLuint): void
1773
+ }
1774
+
1775
+ /** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
1776
+ interface OES_element_index_uint {}
1777
+
1778
+ interface OES_fbo_render_mipmap {}
1779
+
1780
+ /** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
1781
+ interface OES_standard_derivatives {
1782
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum
1783
+ }
1784
+
1785
+ /** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
1786
+ interface OES_texture_float {}
1787
+
1788
+ /** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
1789
+ interface OES_texture_float_linear {}
1790
+
1791
+ /** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */
1792
+ interface OES_texture_half_float {
1793
+ readonly HALF_FLOAT_OES: GLenum
1794
+ }
1795
+
1796
+ /** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */
1797
+ interface OES_texture_half_float_linear {}
1798
+
1799
+ interface OES_vertex_array_object {
1800
+ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void
1801
+ createVertexArrayOES(): WebGLVertexArrayObjectOES | null
1802
+ deleteVertexArrayOES(
1803
+ arrayObject: WebGLVertexArrayObjectOES | null
1804
+ ): void
1805
+ isVertexArrayOES(
1806
+ arrayObject: WebGLVertexArrayObjectOES | null
1807
+ ): GLboolean
1808
+ readonly VERTEX_ARRAY_BINDING_OES: GLenum
1809
+ }
1810
+
1811
+ interface OVR_multiview2 {
1812
+ framebufferTextureMultiviewOVR(
1813
+ target: GLenum,
1814
+ attachment: GLenum,
1815
+ texture: WebGLTexture | null,
1816
+ level: GLint,
1817
+ baseViewIndex: GLint,
1818
+ numViews: GLsizei
1819
+ ): void
1820
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum
1821
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum
1822
+ readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum
1823
+ readonly MAX_VIEWS_OVR: GLenum
1824
+ }
1825
+
1826
+ type WebGLPowerPreference = 'default' | 'high-performance' | 'low-power'
1827
+
1828
+ interface WebGLContextAttributes {
1829
+ alpha?: boolean
1830
+ antialias?: boolean
1831
+ depth?: boolean
1832
+ desynchronized?: boolean
1833
+ failIfMajorPerformanceCaveat?: boolean
1834
+ powerPreference?: WebGLPowerPreference
1835
+ premultipliedAlpha?: boolean
1836
+ preserveDrawingBuffer?: boolean
1837
+ stencil?: boolean
1838
+ }
1839
+
1840
+ interface WebGLRenderingContextBase {
1841
+ readonly canvas: Canvas
1842
+ readonly drawingBufferHeight: GLsizei
1843
+ readonly drawingBufferWidth: GLsizei
1844
+ activeTexture(texture: GLenum): void
1845
+ attachShader(program: WebGLProgram, shader: WebGLShader): void
1846
+ bindAttribLocation(
1847
+ program: WebGLProgram,
1848
+ index: GLuint,
1849
+ name: string
1850
+ ): void
1851
+ bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void
1852
+ bindFramebuffer(
1853
+ target: GLenum,
1854
+ framebuffer: WebGLFramebuffer | null
1855
+ ): void
1856
+ bindRenderbuffer(
1857
+ target: GLenum,
1858
+ renderbuffer: WebGLRenderbuffer | null
1859
+ ): void
1860
+ bindTexture(target: GLenum, texture: WebGLTexture | null): void
1861
+ blendColor(
1862
+ red: GLclampf,
1863
+ green: GLclampf,
1864
+ blue: GLclampf,
1865
+ alpha: GLclampf
1866
+ ): void
1867
+ blendEquation(mode: GLenum): void
1868
+ blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void
1869
+ blendFunc(sfactor: GLenum, dfactor: GLenum): void
1870
+ blendFuncSeparate(
1871
+ srcRGB: GLenum,
1872
+ dstRGB: GLenum,
1873
+ srcAlpha: GLenum,
1874
+ dstAlpha: GLenum
1875
+ ): void
1876
+ checkFramebufferStatus(target: GLenum): GLenum
1877
+ clear(mask: GLbitfield): void
1878
+ clearColor(
1879
+ red: GLclampf,
1880
+ green: GLclampf,
1881
+ blue: GLclampf,
1882
+ alpha: GLclampf
1883
+ ): void
1884
+ clearDepth(depth: GLclampf): void
1885
+ clearStencil(s: GLint): void
1886
+ colorMask(
1887
+ red: GLboolean,
1888
+ green: GLboolean,
1889
+ blue: GLboolean,
1890
+ alpha: GLboolean
1891
+ ): void
1892
+ compileShader(shader: WebGLShader): void
1893
+ copyTexImage2D(
1894
+ target: GLenum,
1895
+ level: GLint,
1896
+ internalformat: GLenum,
1897
+ x: GLint,
1898
+ y: GLint,
1899
+ width: GLsizei,
1900
+ height: GLsizei,
1901
+ border: GLint
1902
+ ): void
1903
+ copyTexSubImage2D(
1904
+ target: GLenum,
1905
+ level: GLint,
1906
+ xoffset: GLint,
1907
+ yoffset: GLint,
1908
+ x: GLint,
1909
+ y: GLint,
1910
+ width: GLsizei,
1911
+ height: GLsizei
1912
+ ): void
1913
+ createBuffer(): WebGLBuffer | null
1914
+ createFramebuffer(): WebGLFramebuffer | null
1915
+ createProgram(): WebGLProgram | null
1916
+ createRenderbuffer(): WebGLRenderbuffer | null
1917
+ createShader(type: GLenum): WebGLShader | null
1918
+ createTexture(): WebGLTexture | null
1919
+ cullFace(mode: GLenum): void
1920
+ deleteBuffer(buffer: WebGLBuffer | null): void
1921
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void
1922
+ deleteProgram(program: WebGLProgram | null): void
1923
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void
1924
+ deleteShader(shader: WebGLShader | null): void
1925
+ deleteTexture(texture: WebGLTexture | null): void
1926
+ depthFunc(func: GLenum): void
1927
+ depthMask(flag: GLboolean): void
1928
+ depthRange(zNear: GLclampf, zFar: GLclampf): void
1929
+ detachShader(program: WebGLProgram, shader: WebGLShader): void
1930
+ disable(cap: GLenum): void
1931
+ disableVertexAttribArray(index: GLuint): void
1932
+ drawArrays(mode: GLenum, first: GLint, count: GLsizei): void
1933
+ drawElements(
1934
+ mode: GLenum,
1935
+ count: GLsizei,
1936
+ type: GLenum,
1937
+ offset: GLintptr
1938
+ ): void
1939
+ enable(cap: GLenum): void
1940
+ enableVertexAttribArray(index: GLuint): void
1941
+ finish(): void
1942
+ flush(): void
1943
+ framebufferRenderbuffer(
1944
+ target: GLenum,
1945
+ attachment: GLenum,
1946
+ renderbuffertarget: GLenum,
1947
+ renderbuffer: WebGLRenderbuffer | null
1948
+ ): void
1949
+ framebufferTexture2D(
1950
+ target: GLenum,
1951
+ attachment: GLenum,
1952
+ textarget: GLenum,
1953
+ texture: WebGLTexture | null,
1954
+ level: GLint
1955
+ ): void
1956
+ frontFace(mode: GLenum): void
1957
+ generateMipmap(target: GLenum): void
1958
+ getActiveAttrib(
1959
+ program: WebGLProgram,
1960
+ index: GLuint
1961
+ ): WebGLActiveInfo | null
1962
+ getActiveUniform(
1963
+ program: WebGLProgram,
1964
+ index: GLuint
1965
+ ): WebGLActiveInfo | null
1966
+ getAttachedShaders(program: WebGLProgram): WebGLShader[] | null
1967
+ getAttribLocation(program: WebGLProgram, name: string): GLint
1968
+ getBufferParameter(target: GLenum, pname: GLenum): any
1969
+ getContextAttributes(): WebGLContextAttributes | null
1970
+ getError(): GLenum
1971
+ getExtension(
1972
+ extensionName: 'ANGLE_instanced_arrays'
1973
+ ): ANGLE_instanced_arrays | null
1974
+ getExtension(extensionName: 'EXT_blend_minmax'): EXT_blend_minmax | null
1975
+ getExtension(
1976
+ extensionName: 'EXT_color_buffer_float'
1977
+ ): EXT_color_buffer_float | null
1978
+ getExtension(
1979
+ extensionName: 'EXT_color_buffer_half_float'
1980
+ ): EXT_color_buffer_half_float | null
1981
+ getExtension(extensionName: 'EXT_float_blend'): EXT_float_blend | null
1982
+ getExtension(extensionName: 'EXT_frag_depth'): EXT_frag_depth | null
1983
+ getExtension(extensionName: 'EXT_sRGB'): EXT_sRGB | null
1984
+ getExtension(
1985
+ extensionName: 'EXT_shader_texture_lod'
1986
+ ): EXT_shader_texture_lod | null
1987
+ getExtension(
1988
+ extensionName: 'EXT_texture_compression_bptc'
1989
+ ): EXT_texture_compression_bptc | null
1990
+ getExtension(
1991
+ extensionName: 'EXT_texture_compression_rgtc'
1992
+ ): EXT_texture_compression_rgtc | null
1993
+ getExtension(
1994
+ extensionName: 'EXT_texture_filter_anisotropic'
1995
+ ): EXT_texture_filter_anisotropic | null
1996
+ getExtension(
1997
+ extensionName: 'KHR_parallel_shader_compile'
1998
+ ): KHR_parallel_shader_compile | null
1999
+ getExtension(
2000
+ extensionName: 'OES_element_index_uint'
2001
+ ): OES_element_index_uint | null
2002
+ getExtension(
2003
+ extensionName: 'OES_fbo_render_mipmap'
2004
+ ): OES_fbo_render_mipmap | null
2005
+ getExtension(
2006
+ extensionName: 'OES_standard_derivatives'
2007
+ ): OES_standard_derivatives | null
2008
+ getExtension(
2009
+ extensionName: 'OES_texture_float'
2010
+ ): OES_texture_float | null
2011
+ getExtension(
2012
+ extensionName: 'OES_texture_float_linear'
2013
+ ): OES_texture_float_linear | null
2014
+ getExtension(
2015
+ extensionName: 'OES_texture_half_float'
2016
+ ): OES_texture_half_float | null
2017
+ getExtension(
2018
+ extensionName: 'OES_texture_half_float_linear'
2019
+ ): OES_texture_half_float_linear | null
2020
+ getExtension(
2021
+ extensionName: 'OES_vertex_array_object'
2022
+ ): OES_vertex_array_object | null
2023
+ getExtension(extensionName: 'OVR_multiview2'): OVR_multiview2 | null
2024
+ getExtension(
2025
+ extensionName: 'WEBGL_color_buffer_float'
2026
+ ): WEBGL_color_buffer_float | null
2027
+ getExtension(
2028
+ extensionName: 'WEBGL_compressed_texture_astc'
2029
+ ): WEBGL_compressed_texture_astc | null
2030
+ getExtension(
2031
+ extensionName: 'WEBGL_compressed_texture_etc'
2032
+ ): WEBGL_compressed_texture_etc | null
2033
+ getExtension(
2034
+ extensionName: 'WEBGL_compressed_texture_etc1'
2035
+ ): WEBGL_compressed_texture_etc1 | null
2036
+ getExtension(
2037
+ extensionName: 'WEBGL_compressed_texture_s3tc'
2038
+ ): WEBGL_compressed_texture_s3tc | null
2039
+ getExtension(
2040
+ extensionName: 'WEBGL_compressed_texture_s3tc_srgb'
2041
+ ): WEBGL_compressed_texture_s3tc_srgb | null
2042
+ getExtension(
2043
+ extensionName: 'WEBGL_debug_renderer_info'
2044
+ ): WEBGL_debug_renderer_info | null
2045
+ getExtension(
2046
+ extensionName: 'WEBGL_debug_shaders'
2047
+ ): WEBGL_debug_shaders | null
2048
+ getExtension(
2049
+ extensionName: 'WEBGL_depth_texture'
2050
+ ): WEBGL_depth_texture | null
2051
+ getExtension(
2052
+ extensionName: 'WEBGL_draw_buffers'
2053
+ ): WEBGL_draw_buffers | null
2054
+ getExtension(
2055
+ extensionName: 'WEBGL_lose_context'
2056
+ ): WEBGL_lose_context | null
2057
+ getExtension(extensionName: 'WEBGL_multi_draw'): WEBGL_multi_draw | null
2058
+ getExtension(name: string): any
2059
+ getFramebufferAttachmentParameter(
2060
+ target: GLenum,
2061
+ attachment: GLenum,
2062
+ pname: GLenum
2063
+ ): any
2064
+ getParameter(pname: GLenum): any
2065
+ getProgramInfoLog(program: WebGLProgram): string | null
2066
+ getProgramParameter(program: WebGLProgram, pname: GLenum): any
2067
+ getRenderbufferParameter(target: GLenum, pname: GLenum): any
2068
+ getShaderInfoLog(shader: WebGLShader): string | null
2069
+ getShaderParameter(shader: WebGLShader, pname: GLenum): any
2070
+ getShaderPrecisionFormat(
2071
+ shadertype: GLenum,
2072
+ precisiontype: GLenum
2073
+ ): WebGLShaderPrecisionFormat | null
2074
+ getShaderSource(shader: WebGLShader): string | null
2075
+ getSupportedExtensions(): string[] | null
2076
+ getTexParameter(target: GLenum, pname: GLenum): any
2077
+ getUniform(program: WebGLProgram, location: WebGLUniformLocation): any
2078
+ getUniformLocation(
2079
+ program: WebGLProgram,
2080
+ name: string
2081
+ ): WebGLUniformLocation | null
2082
+ getVertexAttrib(index: GLuint, pname: GLenum): any
2083
+ getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr
2084
+ hint(target: GLenum, mode: GLenum): void
2085
+ isBuffer(buffer: WebGLBuffer | null): GLboolean
2086
+ isContextLost(): boolean
2087
+ isEnabled(cap: GLenum): GLboolean
2088
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean
2089
+ isProgram(program: WebGLProgram | null): GLboolean
2090
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean
2091
+ isShader(shader: WebGLShader | null): GLboolean
2092
+ isTexture(texture: WebGLTexture | null): GLboolean
2093
+ lineWidth(width: GLfloat): void
2094
+ linkProgram(program: WebGLProgram): void
2095
+ pixelStorei(pname: GLenum, param: GLint | GLboolean): void
2096
+ polygonOffset(factor: GLfloat, units: GLfloat): void
2097
+ renderbufferStorage(
2098
+ target: GLenum,
2099
+ internalformat: GLenum,
2100
+ width: GLsizei,
2101
+ height: GLsizei
2102
+ ): void
2103
+ sampleCoverage(value: GLclampf, invert: GLboolean): void
2104
+ scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void
2105
+ shaderSource(shader: WebGLShader, source: string): void
2106
+ stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void
2107
+ stencilFuncSeparate(
2108
+ face: GLenum,
2109
+ func: GLenum,
2110
+ ref: GLint,
2111
+ mask: GLuint
2112
+ ): void
2113
+ stencilMask(mask: GLuint): void
2114
+ stencilMaskSeparate(face: GLenum, mask: GLuint): void
2115
+ stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void
2116
+ stencilOpSeparate(
2117
+ face: GLenum,
2118
+ fail: GLenum,
2119
+ zfail: GLenum,
2120
+ zpass: GLenum
2121
+ ): void
2122
+ texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void
2123
+ texParameteri(target: GLenum, pname: GLenum, param: GLint): void
2124
+ uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void
2125
+ uniform1i(location: WebGLUniformLocation | null, x: GLint): void
2126
+ uniform2f(
2127
+ location: WebGLUniformLocation | null,
2128
+ x: GLfloat,
2129
+ y: GLfloat
2130
+ ): void
2131
+ uniform2i(
2132
+ location: WebGLUniformLocation | null,
2133
+ x: GLint,
2134
+ y: GLint
2135
+ ): void
2136
+ uniform3f(
2137
+ location: WebGLUniformLocation | null,
2138
+ x: GLfloat,
2139
+ y: GLfloat,
2140
+ z: GLfloat
2141
+ ): void
2142
+ uniform3i(
2143
+ location: WebGLUniformLocation | null,
2144
+ x: GLint,
2145
+ y: GLint,
2146
+ z: GLint
2147
+ ): void
2148
+ uniform4f(
2149
+ location: WebGLUniformLocation | null,
2150
+ x: GLfloat,
2151
+ y: GLfloat,
2152
+ z: GLfloat,
2153
+ w: GLfloat
2154
+ ): void
2155
+ uniform4i(
2156
+ location: WebGLUniformLocation | null,
2157
+ x: GLint,
2158
+ y: GLint,
2159
+ z: GLint,
2160
+ w: GLint
2161
+ ): void
2162
+ useProgram(program: WebGLProgram | null): void
2163
+ validateProgram(program: WebGLProgram): void
2164
+ vertexAttrib1f(index: GLuint, x: GLfloat): void
2165
+ vertexAttrib1fv(index: GLuint, values: Float32List): void
2166
+ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void
2167
+ vertexAttrib2fv(index: GLuint, values: Float32List): void
2168
+ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void
2169
+ vertexAttrib3fv(index: GLuint, values: Float32List): void
2170
+ vertexAttrib4f(
2171
+ index: GLuint,
2172
+ x: GLfloat,
2173
+ y: GLfloat,
2174
+ z: GLfloat,
2175
+ w: GLfloat
2176
+ ): void
2177
+ vertexAttrib4fv(index: GLuint, values: Float32List): void
2178
+ vertexAttribPointer(
2179
+ index: GLuint,
2180
+ size: GLint,
2181
+ type: GLenum,
2182
+ normalized: GLboolean,
2183
+ stride: GLsizei,
2184
+ offset: GLintptr
2185
+ ): void
2186
+ viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void
2187
+ readonly ACTIVE_ATTRIBUTES: GLenum
2188
+ readonly ACTIVE_TEXTURE: GLenum
2189
+ readonly ACTIVE_UNIFORMS: GLenum
2190
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum
2191
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum
2192
+ readonly ALPHA: GLenum
2193
+ readonly ALPHA_BITS: GLenum
2194
+ readonly ALWAYS: GLenum
2195
+ readonly ARRAY_BUFFER: GLenum
2196
+ readonly ARRAY_BUFFER_BINDING: GLenum
2197
+ readonly ATTACHED_SHADERS: GLenum
2198
+ readonly BACK: GLenum
2199
+ readonly BLEND: GLenum
2200
+ readonly BLEND_COLOR: GLenum
2201
+ readonly BLEND_DST_ALPHA: GLenum
2202
+ readonly BLEND_DST_RGB: GLenum
2203
+ readonly BLEND_EQUATION: GLenum
2204
+ readonly BLEND_EQUATION_ALPHA: GLenum
2205
+ readonly BLEND_EQUATION_RGB: GLenum
2206
+ readonly BLEND_SRC_ALPHA: GLenum
2207
+ readonly BLEND_SRC_RGB: GLenum
2208
+ readonly BLUE_BITS: GLenum
2209
+ readonly BOOL: GLenum
2210
+ readonly BOOL_VEC2: GLenum
2211
+ readonly BOOL_VEC3: GLenum
2212
+ readonly BOOL_VEC4: GLenum
2213
+ readonly BROWSER_DEFAULT_WEBGL: GLenum
2214
+ readonly BUFFER_SIZE: GLenum
2215
+ readonly BUFFER_USAGE: GLenum
2216
+ readonly BYTE: GLenum
2217
+ readonly CCW: GLenum
2218
+ readonly CLAMP_TO_EDGE: GLenum
2219
+ readonly COLOR_ATTACHMENT0: GLenum
2220
+ readonly COLOR_BUFFER_BIT: GLenum
2221
+ readonly COLOR_CLEAR_VALUE: GLenum
2222
+ readonly COLOR_WRITEMASK: GLenum
2223
+ readonly COMPILE_STATUS: GLenum
2224
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum
2225
+ readonly CONSTANT_ALPHA: GLenum
2226
+ readonly CONSTANT_COLOR: GLenum
2227
+ readonly CONTEXT_LOST_WEBGL: GLenum
2228
+ readonly CULL_FACE: GLenum
2229
+ readonly CULL_FACE_MODE: GLenum
2230
+ readonly CURRENT_PROGRAM: GLenum
2231
+ readonly CURRENT_VERTEX_ATTRIB: GLenum
2232
+ readonly CW: GLenum
2233
+ readonly DECR: GLenum
2234
+ readonly DECR_WRAP: GLenum
2235
+ readonly DELETE_STATUS: GLenum
2236
+ readonly DEPTH_ATTACHMENT: GLenum
2237
+ readonly DEPTH_BITS: GLenum
2238
+ readonly DEPTH_BUFFER_BIT: GLenum
2239
+ readonly DEPTH_CLEAR_VALUE: GLenum
2240
+ readonly DEPTH_COMPONENT: GLenum
2241
+ readonly DEPTH_COMPONENT16: GLenum
2242
+ readonly DEPTH_FUNC: GLenum
2243
+ readonly DEPTH_RANGE: GLenum
2244
+ readonly DEPTH_STENCIL: GLenum
2245
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum
2246
+ readonly DEPTH_TEST: GLenum
2247
+ readonly DEPTH_WRITEMASK: GLenum
2248
+ readonly DITHER: GLenum
2249
+ readonly DONT_CARE: GLenum
2250
+ readonly DST_ALPHA: GLenum
2251
+ readonly DST_COLOR: GLenum
2252
+ readonly DYNAMIC_DRAW: GLenum
2253
+ readonly ELEMENT_ARRAY_BUFFER: GLenum
2254
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum
2255
+ readonly EQUAL: GLenum
2256
+ readonly FASTEST: GLenum
2257
+ readonly FLOAT: GLenum
2258
+ readonly FLOAT_MAT2: GLenum
2259
+ readonly FLOAT_MAT3: GLenum
2260
+ readonly FLOAT_MAT4: GLenum
2261
+ readonly FLOAT_VEC2: GLenum
2262
+ readonly FLOAT_VEC3: GLenum
2263
+ readonly FLOAT_VEC4: GLenum
2264
+ readonly FRAGMENT_SHADER: GLenum
2265
+ readonly FRAMEBUFFER: GLenum
2266
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum
2267
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum
2268
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum
2269
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum
2270
+ readonly FRAMEBUFFER_BINDING: GLenum
2271
+ readonly FRAMEBUFFER_COMPLETE: GLenum
2272
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum
2273
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum
2274
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum
2275
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum
2276
+ readonly FRONT: GLenum
2277
+ readonly FRONT_AND_BACK: GLenum
2278
+ readonly FRONT_FACE: GLenum
2279
+ readonly FUNC_ADD: GLenum
2280
+ readonly FUNC_REVERSE_SUBTRACT: GLenum
2281
+ readonly FUNC_SUBTRACT: GLenum
2282
+ readonly GENERATE_MIPMAP_HINT: GLenum
2283
+ readonly GEQUAL: GLenum
2284
+ readonly GREATER: GLenum
2285
+ readonly GREEN_BITS: GLenum
2286
+ readonly HIGH_FLOAT: GLenum
2287
+ readonly HIGH_INT: GLenum
2288
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum
2289
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum
2290
+ readonly INCR: GLenum
2291
+ readonly INCR_WRAP: GLenum
2292
+ readonly INT: GLenum
2293
+ readonly INT_VEC2: GLenum
2294
+ readonly INT_VEC3: GLenum
2295
+ readonly INT_VEC4: GLenum
2296
+ readonly INVALID_ENUM: GLenum
2297
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum
2298
+ readonly INVALID_OPERATION: GLenum
2299
+ readonly INVALID_VALUE: GLenum
2300
+ readonly INVERT: GLenum
2301
+ readonly KEEP: GLenum
2302
+ readonly LEQUAL: GLenum
2303
+ readonly LESS: GLenum
2304
+ readonly LINEAR: GLenum
2305
+ readonly LINEAR_MIPMAP_LINEAR: GLenum
2306
+ readonly LINEAR_MIPMAP_NEAREST: GLenum
2307
+ readonly LINES: GLenum
2308
+ readonly LINE_LOOP: GLenum
2309
+ readonly LINE_STRIP: GLenum
2310
+ readonly LINE_WIDTH: GLenum
2311
+ readonly LINK_STATUS: GLenum
2312
+ readonly LOW_FLOAT: GLenum
2313
+ readonly LOW_INT: GLenum
2314
+ readonly LUMINANCE: GLenum
2315
+ readonly LUMINANCE_ALPHA: GLenum
2316
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum
2317
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum
2318
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum
2319
+ readonly MAX_RENDERBUFFER_SIZE: GLenum
2320
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum
2321
+ readonly MAX_TEXTURE_SIZE: GLenum
2322
+ readonly MAX_VARYING_VECTORS: GLenum
2323
+ readonly MAX_VERTEX_ATTRIBS: GLenum
2324
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum
2325
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum
2326
+ readonly MAX_VIEWPORT_DIMS: GLenum
2327
+ readonly MEDIUM_FLOAT: GLenum
2328
+ readonly MEDIUM_INT: GLenum
2329
+ readonly MIRRORED_REPEAT: GLenum
2330
+ readonly NEAREST: GLenum
2331
+ readonly NEAREST_MIPMAP_LINEAR: GLenum
2332
+ readonly NEAREST_MIPMAP_NEAREST: GLenum
2333
+ readonly NEVER: GLenum
2334
+ readonly NICEST: GLenum
2335
+ readonly NONE: GLenum
2336
+ readonly NOTEQUAL: GLenum
2337
+ readonly NO_ERROR: GLenum
2338
+ readonly ONE: GLenum
2339
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum
2340
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum
2341
+ readonly ONE_MINUS_DST_ALPHA: GLenum
2342
+ readonly ONE_MINUS_DST_COLOR: GLenum
2343
+ readonly ONE_MINUS_SRC_ALPHA: GLenum
2344
+ readonly ONE_MINUS_SRC_COLOR: GLenum
2345
+ readonly OUT_OF_MEMORY: GLenum
2346
+ readonly PACK_ALIGNMENT: GLenum
2347
+ readonly POINTS: GLenum
2348
+ readonly POLYGON_OFFSET_FACTOR: GLenum
2349
+ readonly POLYGON_OFFSET_FILL: GLenum
2350
+ readonly POLYGON_OFFSET_UNITS: GLenum
2351
+ readonly RED_BITS: GLenum
2352
+ readonly RENDERBUFFER: GLenum
2353
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum
2354
+ readonly RENDERBUFFER_BINDING: GLenum
2355
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum
2356
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum
2357
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum
2358
+ readonly RENDERBUFFER_HEIGHT: GLenum
2359
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum
2360
+ readonly RENDERBUFFER_RED_SIZE: GLenum
2361
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum
2362
+ readonly RENDERBUFFER_WIDTH: GLenum
2363
+ readonly RENDERER: GLenum
2364
+ readonly REPEAT: GLenum
2365
+ readonly REPLACE: GLenum
2366
+ readonly RGB: GLenum
2367
+ readonly RGB565: GLenum
2368
+ readonly RGB5_A1: GLenum
2369
+ readonly RGBA: GLenum
2370
+ readonly RGBA4: GLenum
2371
+ readonly SAMPLER_2D: GLenum
2372
+ readonly SAMPLER_CUBE: GLenum
2373
+ readonly SAMPLES: GLenum
2374
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum
2375
+ readonly SAMPLE_BUFFERS: GLenum
2376
+ readonly SAMPLE_COVERAGE: GLenum
2377
+ readonly SAMPLE_COVERAGE_INVERT: GLenum
2378
+ readonly SAMPLE_COVERAGE_VALUE: GLenum
2379
+ readonly SCISSOR_BOX: GLenum
2380
+ readonly SCISSOR_TEST: GLenum
2381
+ readonly SHADER_TYPE: GLenum
2382
+ readonly SHADING_LANGUAGE_VERSION: GLenum
2383
+ readonly SHORT: GLenum
2384
+ readonly SRC_ALPHA: GLenum
2385
+ readonly SRC_ALPHA_SATURATE: GLenum
2386
+ readonly SRC_COLOR: GLenum
2387
+ readonly STATIC_DRAW: GLenum
2388
+ readonly STENCIL_ATTACHMENT: GLenum
2389
+ readonly STENCIL_BACK_FAIL: GLenum
2390
+ readonly STENCIL_BACK_FUNC: GLenum
2391
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum
2392
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum
2393
+ readonly STENCIL_BACK_REF: GLenum
2394
+ readonly STENCIL_BACK_VALUE_MASK: GLenum
2395
+ readonly STENCIL_BACK_WRITEMASK: GLenum
2396
+ readonly STENCIL_BITS: GLenum
2397
+ readonly STENCIL_BUFFER_BIT: GLenum
2398
+ readonly STENCIL_CLEAR_VALUE: GLenum
2399
+ readonly STENCIL_FAIL: GLenum
2400
+ readonly STENCIL_FUNC: GLenum
2401
+ readonly STENCIL_INDEX8: GLenum
2402
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum
2403
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum
2404
+ readonly STENCIL_REF: GLenum
2405
+ readonly STENCIL_TEST: GLenum
2406
+ readonly STENCIL_VALUE_MASK: GLenum
2407
+ readonly STENCIL_WRITEMASK: GLenum
2408
+ readonly STREAM_DRAW: GLenum
2409
+ readonly SUBPIXEL_BITS: GLenum
2410
+ readonly TEXTURE: GLenum
2411
+ readonly TEXTURE0: GLenum
2412
+ readonly TEXTURE1: GLenum
2413
+ readonly TEXTURE10: GLenum
2414
+ readonly TEXTURE11: GLenum
2415
+ readonly TEXTURE12: GLenum
2416
+ readonly TEXTURE13: GLenum
2417
+ readonly TEXTURE14: GLenum
2418
+ readonly TEXTURE15: GLenum
2419
+ readonly TEXTURE16: GLenum
2420
+ readonly TEXTURE17: GLenum
2421
+ readonly TEXTURE18: GLenum
2422
+ readonly TEXTURE19: GLenum
2423
+ readonly TEXTURE2: GLenum
2424
+ readonly TEXTURE20: GLenum
2425
+ readonly TEXTURE21: GLenum
2426
+ readonly TEXTURE22: GLenum
2427
+ readonly TEXTURE23: GLenum
2428
+ readonly TEXTURE24: GLenum
2429
+ readonly TEXTURE25: GLenum
2430
+ readonly TEXTURE26: GLenum
2431
+ readonly TEXTURE27: GLenum
2432
+ readonly TEXTURE28: GLenum
2433
+ readonly TEXTURE29: GLenum
2434
+ readonly TEXTURE3: GLenum
2435
+ readonly TEXTURE30: GLenum
2436
+ readonly TEXTURE31: GLenum
2437
+ readonly TEXTURE4: GLenum
2438
+ readonly TEXTURE5: GLenum
2439
+ readonly TEXTURE6: GLenum
2440
+ readonly TEXTURE7: GLenum
2441
+ readonly TEXTURE8: GLenum
2442
+ readonly TEXTURE9: GLenum
2443
+ readonly TEXTURE_2D: GLenum
2444
+ readonly TEXTURE_BINDING_2D: GLenum
2445
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum
2446
+ readonly TEXTURE_CUBE_MAP: GLenum
2447
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum
2448
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum
2449
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum
2450
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum
2451
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum
2452
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum
2453
+ readonly TEXTURE_MAG_FILTER: GLenum
2454
+ readonly TEXTURE_MIN_FILTER: GLenum
2455
+ readonly TEXTURE_WRAP_S: GLenum
2456
+ readonly TEXTURE_WRAP_T: GLenum
2457
+ readonly TRIANGLES: GLenum
2458
+ readonly TRIANGLE_FAN: GLenum
2459
+ readonly TRIANGLE_STRIP: GLenum
2460
+ readonly UNPACK_ALIGNMENT: GLenum
2461
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum
2462
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum
2463
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum
2464
+ readonly UNSIGNED_BYTE: GLenum
2465
+ readonly UNSIGNED_INT: GLenum
2466
+ readonly UNSIGNED_SHORT: GLenum
2467
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum
2468
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum
2469
+ readonly UNSIGNED_SHORT_5_6_5: GLenum
2470
+ readonly VALIDATE_STATUS: GLenum
2471
+ readonly VENDOR: GLenum
2472
+ readonly VERSION: GLenum
2473
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum
2474
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum
2475
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum
2476
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum
2477
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum
2478
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum
2479
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum
2480
+ readonly VERTEX_SHADER: GLenum
2481
+ readonly VIEWPORT: GLenum
2482
+ readonly ZERO: GLenum
2483
+ }
2484
+
2485
+ type BufferSource = ArrayBufferView | ArrayBuffer
2486
+ type Float32List = Float32Array | GLfloat[]
2487
+ type TexImageSource =
2488
+ | Image
2489
+ | ImageData
2490
+ | Canvas
2491
+ | OffscreenCanvas
2492
+ | VideoContext
2493
+
2494
+ interface WebGLRenderingContextOverloads {
2495
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void
2496
+ bufferData(
2497
+ target: GLenum,
2498
+ data: BufferSource | null,
2499
+ usage: GLenum
2500
+ ): void
2501
+ bufferSubData(
2502
+ target: GLenum,
2503
+ offset: GLintptr,
2504
+ data: BufferSource
2505
+ ): void
2506
+ compressedTexImage2D(
2507
+ target: GLenum,
2508
+ level: GLint,
2509
+ internalformat: GLenum,
2510
+ width: GLsizei,
2511
+ height: GLsizei,
2512
+ border: GLint,
2513
+ data: ArrayBufferView
2514
+ ): void
2515
+ compressedTexSubImage2D(
2516
+ target: GLenum,
2517
+ level: GLint,
2518
+ xoffset: GLint,
2519
+ yoffset: GLint,
2520
+ width: GLsizei,
2521
+ height: GLsizei,
2522
+ format: GLenum,
2523
+ data: ArrayBufferView
2524
+ ): void
2525
+ readPixels(
2526
+ x: GLint,
2527
+ y: GLint,
2528
+ width: GLsizei,
2529
+ height: GLsizei,
2530
+ format: GLenum,
2531
+ type: GLenum,
2532
+ pixels: ArrayBufferView | null
2533
+ ): void
2534
+ texImage2D(
2535
+ target: GLenum,
2536
+ level: GLint,
2537
+ internalformat: GLint,
2538
+ width: GLsizei,
2539
+ height: GLsizei,
2540
+ border: GLint,
2541
+ format: GLenum,
2542
+ type: GLenum,
2543
+ pixels: ArrayBufferView | null
2544
+ ): void
2545
+ texImage2D(
2546
+ target: GLenum,
2547
+ level: GLint,
2548
+ internalformat: GLint,
2549
+ format: GLenum,
2550
+ type: GLenum,
2551
+ source: TexImageSource
2552
+ ): void
2553
+ texSubImage2D(
2554
+ target: GLenum,
2555
+ level: GLint,
2556
+ xoffset: GLint,
2557
+ yoffset: GLint,
2558
+ width: GLsizei,
2559
+ height: GLsizei,
2560
+ format: GLenum,
2561
+ type: GLenum,
2562
+ pixels: ArrayBufferView | null
2563
+ ): void
2564
+ texSubImage2D(
2565
+ target: GLenum,
2566
+ level: GLint,
2567
+ xoffset: GLint,
2568
+ yoffset: GLint,
2569
+ format: GLenum,
2570
+ type: GLenum,
2571
+ source: TexImageSource
2572
+ ): void
2573
+ uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void
2574
+ uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void
2575
+ uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void
2576
+ uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void
2577
+ uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void
2578
+ uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void
2579
+ uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void
2580
+ uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void
2581
+ uniformMatrix2fv(
2582
+ location: WebGLUniformLocation | null,
2583
+ transpose: GLboolean,
2584
+ value: Float32List
2585
+ ): void
2586
+ uniformMatrix3fv(
2587
+ location: WebGLUniformLocation | null,
2588
+ transpose: GLboolean,
2589
+ value: Float32List
2590
+ ): void
2591
+ uniformMatrix4fv(
2592
+ location: WebGLUniformLocation | null,
2593
+ transpose: GLboolean,
2594
+ value: Float32List
2595
+ ): void
2596
+ }
2597
+
2598
+ interface WebGLSampler {}
2599
+
2600
+ /** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */
2601
+ interface WebGLShader {}
2602
+
2603
+ /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
2604
+ interface WebGLShaderPrecisionFormat {
2605
+ readonly precision: GLint
2606
+ readonly rangeMax: GLint
2607
+ readonly rangeMin: GLint
2608
+ }
2609
+
2610
+ interface WebGLSync {}
2611
+
2612
+ /** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
2613
+ interface WebGLTexture {}
2614
+
2615
+ interface WebGLTransformFeedback {}
2616
+
2617
+ /** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
2618
+ interface WebGLUniformLocation {}
2619
+
2620
+ interface WebGLVertexArrayObject {}
2621
+
2622
+ interface WebGLVertexArrayObjectOES {}
2623
+ }