@defold-typescript/types 0.39.0 → 0.41.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 (227) hide show
  1. package/api-availability.json +4024 -716
  2. package/api-migrations.json +27 -0
  3. package/api-signatures.json +18118 -10264
  4. package/api-targets.json +448 -11
  5. package/examples/translations.json +619 -148
  6. package/fixtures/messages_doc.json +96 -0
  7. package/generated/b2d.d.ts +680 -4
  8. package/generated/b2d_body.d.ts +29 -103
  9. package/generated/b2d_chain.d.ts +5 -6
  10. package/generated/b2d_fixture.d.ts +34 -38
  11. package/generated/b2d_joint.d.ts +503 -25
  12. package/generated/b2d_shape.d.ts +199 -14
  13. package/generated/b2d_world.d.ts +57 -63
  14. package/generated/buffer.d.ts +33 -29
  15. package/generated/builtin-messages.d.ts +7 -1
  16. package/generated/bullet3d.d.ts +91 -0
  17. package/generated/bullet3d_collision_object.d.ts +433 -0
  18. package/generated/bullet3d_constraint.d.ts +818 -0
  19. package/generated/bullet3d_rigid_body.d.ts +429 -0
  20. package/generated/bullet3d_shape.d.ts +123 -0
  21. package/generated/bullet3d_world.d.ts +492 -0
  22. package/generated/camera.d.ts +31 -34
  23. package/generated/collectionfactory.d.ts +26 -27
  24. package/generated/collectionproxy.d.ts +22 -6
  25. package/generated/compute.d.ts +12 -238
  26. package/generated/crash.d.ts +24 -10
  27. package/generated/editor-vm/http.d.ts +90 -7
  28. package/generated/editor-vm/image.d.ts +7 -7
  29. package/generated/editor-vm/json.d.ts +11 -0
  30. package/generated/editor-vm/localization.d.ts +7 -7
  31. package/generated/editor-vm/tilemap_tiles.d.ts +56 -10
  32. package/generated/editor-vm/zip.d.ts +28 -0
  33. package/generated/editor.d.ts +1496 -430
  34. package/generated/factory.d.ts +21 -25
  35. package/generated/font.d.ts +64 -22
  36. package/generated/go.d.ts +243 -186
  37. package/generated/graphics.d.ts +374 -84
  38. package/generated/gui.d.ts +282 -492
  39. package/generated/html5.d.ts +5 -3
  40. package/generated/http.d.ts +31 -36
  41. package/generated/image.d.ts +127 -85
  42. package/generated/json.d.ts +34 -16
  43. package/generated/kinds/gui-script.d.ts +8 -0
  44. package/generated/kinds/render-script.d.ts +8 -0
  45. package/generated/kinds/script.d.ts +8 -0
  46. package/generated/label.d.ts +77 -7
  47. package/generated/liveupdate.d.ts +13 -10
  48. package/generated/material.d.ts +312 -360
  49. package/generated/model.d.ts +72 -42
  50. package/generated/particlefx.d.ts +19 -28
  51. package/generated/physics.d.ts +378 -144
  52. package/generated/profiler.d.ts +14 -24
  53. package/generated/render.d.ts +294 -297
  54. package/generated/resource.d.ts +753 -641
  55. package/generated/socket.d.ts +131 -134
  56. package/generated/sound.d.ts +65 -34
  57. package/generated/sprite.d.ts +39 -17
  58. package/generated/sys.d.ts +237 -182
  59. package/generated/tilemap.d.ts +21 -16
  60. package/generated/timer.d.ts +34 -21
  61. package/generated/versions/defold-1.12.4/b2d_body.d.ts +0 -7
  62. package/generated/versions/defold-1.12.4/buffer.d.ts +18 -17
  63. package/generated/versions/defold-1.12.4/camera.d.ts +23 -23
  64. package/generated/versions/defold-1.12.4/collectionfactory.d.ts +21 -19
  65. package/generated/versions/defold-1.12.4/collectionproxy.d.ts +2 -2
  66. package/generated/versions/defold-1.12.4/crash.d.ts +2 -2
  67. package/generated/versions/defold-1.12.4/factory.d.ts +15 -16
  68. package/generated/versions/defold-1.12.4/go.d.ts +15 -17
  69. package/generated/versions/defold-1.12.4/gui.d.ts +111 -193
  70. package/generated/versions/defold-1.12.4/html5.d.ts +4 -2
  71. package/generated/versions/defold-1.12.4/http.d.ts +4 -15
  72. package/generated/versions/defold-1.12.4/image.d.ts +38 -46
  73. package/generated/versions/defold-1.12.4/index.d.ts +2 -0
  74. package/generated/versions/defold-1.12.4/json.d.ts +10 -6
  75. package/generated/versions/defold-1.12.4/label.d.ts +2 -3
  76. package/generated/versions/defold-1.12.4/liveupdate.d.ts +5 -3
  77. package/generated/versions/defold-1.12.4/model.d.ts +34 -13
  78. package/generated/versions/defold-1.12.4/particlefx.d.ts +2 -5
  79. package/generated/versions/defold-1.12.4/physics.d.ts +82 -78
  80. package/generated/versions/defold-1.12.4/profiler.d.ts +3 -6
  81. package/generated/versions/defold-1.12.4/render.d.ts +160 -132
  82. package/generated/versions/defold-1.12.4/resource.d.ts +212 -209
  83. package/generated/versions/defold-1.12.4/socket.d.ts +45 -61
  84. package/generated/versions/defold-1.12.4/sound.d.ts +11 -11
  85. package/generated/versions/defold-1.12.4/sprite.d.ts +24 -6
  86. package/generated/versions/defold-1.12.4/sys.d.ts +45 -68
  87. package/generated/versions/defold-1.12.4/tilemap.d.ts +18 -11
  88. package/generated/versions/defold-1.12.4/timer.d.ts +5 -3
  89. package/generated/versions/defold-1.12.4/vmath.d.ts +5 -26
  90. package/generated/versions/defold-1.12.4/window.d.ts +1 -16
  91. package/generated/versions/defold-1.13.0/b2d_body.d.ts +10 -55
  92. package/generated/versions/defold-1.13.0/b2d_fixture.d.ts +25 -25
  93. package/generated/versions/defold-1.13.0/b2d_shape.d.ts +188 -5
  94. package/generated/versions/defold-1.13.0/b2d_world.d.ts +16 -10
  95. package/generated/versions/defold-1.13.0/buffer.d.ts +18 -17
  96. package/generated/versions/defold-1.13.0/camera.d.ts +27 -27
  97. package/generated/versions/defold-1.13.0/collectionfactory.d.ts +21 -19
  98. package/generated/versions/defold-1.13.0/collectionproxy.d.ts +2 -2
  99. package/generated/versions/defold-1.13.0/compute.d.ts +1 -70
  100. package/generated/versions/defold-1.13.0/crash.d.ts +2 -2
  101. package/generated/versions/defold-1.13.0/editor-vm/tilemap_tiles.d.ts +3 -3
  102. package/generated/versions/defold-1.13.0/editor.d.ts +34 -24
  103. package/generated/versions/defold-1.13.0/factory.d.ts +15 -16
  104. package/generated/versions/defold-1.13.0/go.d.ts +15 -17
  105. package/generated/versions/defold-1.13.0/graphics.d.ts +121 -37
  106. package/generated/versions/defold-1.13.0/gui.d.ts +111 -193
  107. package/generated/versions/defold-1.13.0/html5.d.ts +4 -2
  108. package/generated/versions/defold-1.13.0/http.d.ts +4 -15
  109. package/generated/versions/defold-1.13.0/image.d.ts +38 -46
  110. package/generated/versions/defold-1.13.0/index.d.ts +2 -0
  111. package/generated/versions/defold-1.13.0/json.d.ts +10 -6
  112. package/generated/versions/defold-1.13.0/label.d.ts +2 -3
  113. package/generated/versions/defold-1.13.0/liveupdate.d.ts +7 -5
  114. package/generated/versions/defold-1.13.0/material.d.ts +69 -107
  115. package/generated/versions/defold-1.13.0/model.d.ts +34 -13
  116. package/generated/versions/defold-1.13.0/particlefx.d.ts +2 -5
  117. package/generated/versions/defold-1.13.0/physics.d.ts +82 -78
  118. package/generated/versions/defold-1.13.0/profiler.d.ts +3 -6
  119. package/generated/versions/defold-1.13.0/render.d.ts +160 -132
  120. package/generated/versions/defold-1.13.0/resource.d.ts +217 -210
  121. package/generated/versions/defold-1.13.0/socket.d.ts +45 -61
  122. package/generated/versions/defold-1.13.0/sound.d.ts +11 -11
  123. package/generated/versions/defold-1.13.0/sprite.d.ts +24 -6
  124. package/generated/versions/defold-1.13.0/sys.d.ts +45 -68
  125. package/generated/versions/defold-1.13.0/tilemap.d.ts +18 -11
  126. package/generated/versions/defold-1.13.0/timer.d.ts +5 -3
  127. package/generated/versions/defold-1.13.0/vmath.d.ts +5 -26
  128. package/generated/versions/defold-1.13.0/window.d.ts +1 -16
  129. package/generated/versions/defold-1.13.1/b2d.d.ts +33 -0
  130. package/generated/versions/defold-1.13.1/b2d_body.d.ts +636 -0
  131. package/generated/versions/defold-1.13.1/b2d_chain.d.ts +106 -0
  132. package/generated/versions/defold-1.13.1/b2d_fixture.d.ts +157 -0
  133. package/generated/versions/defold-1.13.1/b2d_joint.d.ts +823 -0
  134. package/generated/versions/defold-1.13.1/b2d_shape.d.ts +400 -0
  135. package/generated/versions/defold-1.13.1/b2d_world.d.ts +320 -0
  136. package/generated/versions/defold-1.13.1/buffer.d.ts +189 -0
  137. package/generated/versions/defold-1.13.1/camera.d.ts +303 -0
  138. package/generated/versions/defold-1.13.1/collectionfactory.d.ts +151 -0
  139. package/generated/versions/defold-1.13.1/collectionproxy.d.ts +93 -0
  140. package/generated/versions/defold-1.13.1/compute.d.ts +237 -0
  141. package/generated/versions/defold-1.13.1/crash.d.ts +143 -0
  142. package/generated/versions/defold-1.13.1/editor-vm/http.d.ts +56 -0
  143. package/generated/versions/defold-1.13.1/editor-vm/image.d.ts +48 -0
  144. package/generated/versions/defold-1.13.1/editor-vm/json.d.ts +10 -0
  145. package/generated/versions/defold-1.13.1/editor-vm/localization.d.ts +42 -0
  146. package/generated/versions/defold-1.13.1/editor-vm/tilemap_tiles.d.ts +80 -0
  147. package/generated/versions/defold-1.13.1/editor-vm/zip.d.ts +10 -0
  148. package/generated/versions/defold-1.13.1/editor-vm/zlib.d.ts +24 -0
  149. package/generated/versions/defold-1.13.1/editor.d.ts +1121 -0
  150. package/generated/versions/defold-1.13.1/factory.d.ts +124 -0
  151. package/generated/versions/defold-1.13.1/font.d.ts +81 -0
  152. package/generated/versions/defold-1.13.1/go.d.ts +1107 -0
  153. package/generated/versions/defold-1.13.1/graphics.d.ts +411 -0
  154. package/generated/versions/defold-1.13.1/gui.d.ts +2353 -0
  155. package/generated/versions/defold-1.13.1/html5.d.ts +55 -0
  156. package/generated/versions/defold-1.13.1/http.d.ts +77 -0
  157. package/generated/versions/defold-1.13.1/image.d.ts +131 -0
  158. package/generated/versions/defold-1.13.1/index.d.ts +57 -0
  159. package/generated/versions/defold-1.13.1/json.d.ts +80 -0
  160. package/generated/versions/defold-1.13.1/kinds/editor-script.d.ts +14 -0
  161. package/generated/versions/defold-1.13.1/label.d.ts +93 -0
  162. package/generated/versions/defold-1.13.1/liveupdate.d.ts +142 -0
  163. package/generated/versions/defold-1.13.1/material.d.ts +408 -0
  164. package/generated/versions/defold-1.13.1/model.d.ts +272 -0
  165. package/generated/versions/defold-1.13.1/msg.d.ts +10 -0
  166. package/generated/versions/defold-1.13.1/particlefx.d.ts +163 -0
  167. package/generated/versions/defold-1.13.1/physics.d.ts +559 -0
  168. package/generated/versions/defold-1.13.1/profiler.d.ts +235 -0
  169. package/generated/versions/defold-1.13.1/render.d.ts +1190 -0
  170. package/generated/versions/defold-1.13.1/resource.d.ts +1523 -0
  171. package/generated/versions/defold-1.13.1/socket.d.ts +784 -0
  172. package/generated/versions/defold-1.13.1/sound.d.ts +292 -0
  173. package/generated/versions/defold-1.13.1/sprite.d.ts +175 -0
  174. package/generated/versions/defold-1.13.1/sys.d.ts +678 -0
  175. package/generated/versions/defold-1.13.1/tilemap.d.ts +208 -0
  176. package/generated/versions/defold-1.13.1/timer.d.ts +125 -0
  177. package/generated/versions/defold-1.13.1/types.d.ts +61 -0
  178. package/generated/versions/defold-1.13.1/vmath.d.ts +774 -0
  179. package/generated/versions/defold-1.13.1/window.d.ts +183 -0
  180. package/generated/versions/defold-1.13.1/zlib.d.ts +41 -0
  181. package/generated/vmath.d.ts +6 -26
  182. package/generated/window.d.ts +71 -71
  183. package/identity-vocabulary.json +561 -0
  184. package/index.d.ts +8 -0
  185. package/package.json +13 -2
  186. package/scripts/example-store-io.ts +12 -1
  187. package/scripts/extension-goldens.ts +1 -0
  188. package/scripts/fidelity-baseline.json +146 -46
  189. package/scripts/generate-api-availability.ts +90 -12
  190. package/scripts/generate-api-signatures.ts +14 -3
  191. package/scripts/import-defold-release.ts +85 -24
  192. package/scripts/prose-constants.ts +157 -0
  193. package/scripts/regen.ts +396 -78
  194. package/scripts/shared-handle-methods.ts +53 -0
  195. package/scripts/signature-store-fs.ts +1 -0
  196. package/scripts/sync-api-docs.ts +16 -5
  197. package/src/api-availability.ts +0 -0
  198. package/src/api-doc.ts +201 -3
  199. package/src/api-identity.ts +252 -0
  200. package/src/component-properties.d.ts +33 -0
  201. package/src/core-types.ts +28 -3
  202. package/src/correction-pins.ts +49 -0
  203. package/src/custom-messages.d.ts +4 -3
  204. package/src/doc-comment.ts +139 -23
  205. package/src/doc-corrections.ts +108 -0
  206. package/src/editor-vm-globals.d.ts +5 -2
  207. package/src/emit-dts.ts +2474 -281
  208. package/src/emit-messages.ts +52 -0
  209. package/src/engine-globals.d.ts +2 -2
  210. package/src/example-store.ts +125 -14
  211. package/src/field-correction-coverage.ts +204 -0
  212. package/src/fnv1a.ts +16 -0
  213. package/src/go-overloads.d.ts +33 -13
  214. package/src/index-base-table.ts +145 -0
  215. package/src/index-slot-classifications.ts +588 -0
  216. package/src/index.ts +39 -2
  217. package/src/library-index-slot-classifications.ts +332 -0
  218. package/src/lifecycle.ts +61 -199
  219. package/src/luals-type-expr.ts +354 -0
  220. package/src/msg-overloads.d.ts +0 -1
  221. package/src/param-correction-provenance.ts +64 -0
  222. package/src/return-correction-provenance.ts +58 -16
  223. package/src/script-api.ts +3 -1
  224. package/src/sys-overloads.d.ts +48 -0
  225. package/src/vmath-overloads.d.ts +27 -1
  226. package/src/window-event-guard.d.ts +6 -9
  227. package/url-parameters.json +1 -2
@@ -4,50 +4,251 @@ declare global {
4
4
  * Graphics functions and constants.
5
5
  */
6
6
  namespace graphics {
7
+ /**
8
+ * Graphics adapter information
9
+ */
10
+ interface adapter_info {
11
+ /**
12
+ * Adapter family name.
13
+ */
14
+ family: string;
15
+ /**
16
+ * Adapter API major version.
17
+ */
18
+ version_major: number;
19
+ /**
20
+ * Adapter API minor version.
21
+ */
22
+ version_minor: number;
23
+ /**
24
+ * Hardware and driver limits.
25
+ */
26
+ limits: graphics.adapter_limits;
27
+ /**
28
+ * Driver-reported extension names.
29
+ */
30
+ extensions: string[];
31
+ /**
32
+ * Supported optional context features.
33
+ */
34
+ features: graphics.CONTEXT_FEATURE[];
35
+ }
36
+ /**
37
+ * Graphics context limits
38
+ */
39
+ interface adapter_limits {
40
+ /**
41
+ * Maximum 2D texture dimension in texels.
42
+ */
43
+ max_texture_size_2d: number;
44
+ /**
45
+ * Maximum 3D texture dimension in texels.
46
+ */
47
+ max_texture_size_3d: number;
48
+ /**
49
+ * Maximum cube-map face dimension in texels.
50
+ */
51
+ max_texture_size_cube: number;
52
+ /**
53
+ * Maximum number of array texture layers.
54
+ */
55
+ max_texture_array_layers: number;
56
+ /**
57
+ * Maximum framebuffer width in pixels.
58
+ */
59
+ max_framebuffer_width: number;
60
+ /**
61
+ * Maximum framebuffer height in pixels.
62
+ */
63
+ max_framebuffer_height: number;
64
+ /**
65
+ * Maximum number of simultaneous color attachments.
66
+ */
67
+ max_color_attachments: number;
68
+ /**
69
+ * Maximum number of texture samplers per shader stage.
70
+ */
71
+ max_samplers_per_stage: number;
72
+ /**
73
+ * Maximum number of sampled textures per shader stage.
74
+ */
75
+ max_textures_per_stage: number;
76
+ /**
77
+ * Maximum number of vertex attributes.
78
+ */
79
+ max_vertex_attributes: number;
80
+ /**
81
+ * Maximum number of vertex-buffer bindings.
82
+ */
83
+ max_vertex_buffers: number;
84
+ /**
85
+ * Maximum compute workgroup size on the X axis.
86
+ */
87
+ max_compute_workgroup_size_x: number;
88
+ /**
89
+ * Maximum compute workgroup size on the Y axis.
90
+ */
91
+ max_compute_workgroup_size_y: number;
92
+ /**
93
+ * Maximum compute workgroup size on the Z axis.
94
+ */
95
+ max_compute_workgroup_size_z: number;
96
+ /**
97
+ * Maximum invocations per compute workgroup.
98
+ */
99
+ max_compute_workgroup_invocations: number;
100
+ /**
101
+ * Maximum shared memory per compute workgroup in bytes.
102
+ */
103
+ max_compute_shared_memory_size: number;
104
+ /**
105
+ * Maximum bindable uniform-buffer range in bytes.
106
+ */
107
+ max_uniform_buffer_range: number;
108
+ /**
109
+ * Maximum bindable storage-buffer range in bytes.
110
+ */
111
+ max_storage_buffer_range: number;
112
+ }
7
113
  type BufferType = typeof graphics.BUFFER_TYPE_COLOR0_BIT | typeof graphics.BUFFER_TYPE_COLOR1_BIT | typeof graphics.BUFFER_TYPE_COLOR2_BIT | typeof graphics.BUFFER_TYPE_COLOR3_BIT | typeof graphics.BUFFER_TYPE_DEPTH_BIT | typeof graphics.BUFFER_TYPE_STENCIL_BIT;
8
114
  type State = typeof graphics.STATE_DEPTH_TEST | typeof graphics.STATE_STENCIL_TEST | typeof graphics.STATE_BLEND | typeof graphics.STATE_ALPHA_TEST | typeof graphics.STATE_CULL_FACE | typeof graphics.STATE_POLYGON_OFFSET_FILL;
115
+ type BLEND_EQUATION = typeof graphics.BLEND_EQUATION_ADD | typeof graphics.BLEND_EQUATION_MAX | typeof graphics.BLEND_EQUATION_MIN | typeof graphics.BLEND_EQUATION_REVERSE_SUBTRACT | typeof graphics.BLEND_EQUATION_SUBTRACT;
116
+ type BLEND_FACTOR = typeof graphics.BLEND_FACTOR_CONSTANT_ALPHA | typeof graphics.BLEND_FACTOR_CONSTANT_COLOR | typeof graphics.BLEND_FACTOR_DST_ALPHA | typeof graphics.BLEND_FACTOR_DST_COLOR | typeof graphics.BLEND_FACTOR_ONE | typeof graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA | typeof graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR | typeof graphics.BLEND_FACTOR_ONE_MINUS_DST_ALPHA | typeof graphics.BLEND_FACTOR_ONE_MINUS_DST_COLOR | typeof graphics.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA | typeof graphics.BLEND_FACTOR_ONE_MINUS_SRC_COLOR | typeof graphics.BLEND_FACTOR_SRC_ALPHA | typeof graphics.BLEND_FACTOR_SRC_ALPHA_SATURATE | typeof graphics.BLEND_FACTOR_SRC_COLOR | typeof graphics.BLEND_FACTOR_ZERO;
117
+ type BUFFER_TYPE = typeof graphics.BUFFER_TYPE_COLOR0_BIT | NonNullable<typeof graphics.BUFFER_TYPE_COLOR1_BIT> | NonNullable<typeof graphics.BUFFER_TYPE_COLOR2_BIT> | NonNullable<typeof graphics.BUFFER_TYPE_COLOR3_BIT> | typeof graphics.BUFFER_TYPE_DEPTH_BIT | typeof graphics.BUFFER_TYPE_STENCIL_BIT;
118
+ type COMPARE_FUNC = typeof graphics.COMPARE_FUNC_ALWAYS | typeof graphics.COMPARE_FUNC_EQUAL | typeof graphics.COMPARE_FUNC_GEQUAL | typeof graphics.COMPARE_FUNC_GREATER | typeof graphics.COMPARE_FUNC_LEQUAL | typeof graphics.COMPARE_FUNC_LESS | typeof graphics.COMPARE_FUNC_NEVER | typeof graphics.COMPARE_FUNC_NOTEQUAL;
119
+ type COMPRESSION_TYPE = typeof graphics.COMPRESSION_TYPE_BASIS_ETC1S | typeof graphics.COMPRESSION_TYPE_BASIS_UASTC | typeof graphics.COMPRESSION_TYPE_DEFAULT | typeof graphics.COMPRESSION_TYPE_WEBP | typeof graphics.COMPRESSION_TYPE_WEBP_LOSSY;
120
+ type CONTEXT_FEATURE = typeof graphics.CONTEXT_FEATURE_3D_TEXTURES | typeof graphics.CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES | typeof graphics.CONTEXT_FEATURE_BC_ARRAY_TEXTURES | typeof graphics.CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX | typeof graphics.CONTEXT_FEATURE_COMPUTE_SHADER | typeof graphics.CONTEXT_FEATURE_INSTANCING | typeof graphics.CONTEXT_FEATURE_MULTI_TARGET_RENDERING | typeof graphics.CONTEXT_FEATURE_STORAGE_BUFFER | typeof graphics.CONTEXT_FEATURE_TEXTURE_ARRAY | typeof graphics.CONTEXT_FEATURE_VSYNC;
121
+ type COORDINATE_SPACE = typeof graphics.COORDINATE_SPACE_DEFAULT | typeof graphics.COORDINATE_SPACE_LOCAL | typeof graphics.COORDINATE_SPACE_WORLD;
122
+ type DATA_TYPE = typeof graphics.DATA_TYPE_BYTE | typeof graphics.DATA_TYPE_FLOAT | typeof graphics.DATA_TYPE_INT | typeof graphics.DATA_TYPE_SHORT | typeof graphics.DATA_TYPE_UNSIGNED_BYTE | typeof graphics.DATA_TYPE_UNSIGNED_INT | typeof graphics.DATA_TYPE_UNSIGNED_SHORT;
123
+ type FACE_TYPE = typeof graphics.FACE_TYPE_BACK | typeof graphics.FACE_TYPE_FRONT | typeof graphics.FACE_TYPE_FRONT_AND_BACK;
124
+ type SEMANTIC_TYPE = typeof graphics.SEMANTIC_TYPE_BONE_INDICES | typeof graphics.SEMANTIC_TYPE_BONE_WEIGHTS | typeof graphics.SEMANTIC_TYPE_COLOR | typeof graphics.SEMANTIC_TYPE_MORPH_TARGET_WEIGHTS | typeof graphics.SEMANTIC_TYPE_NONE | typeof graphics.SEMANTIC_TYPE_NORMAL | typeof graphics.SEMANTIC_TYPE_NORMAL_MATRIX | typeof graphics.SEMANTIC_TYPE_PAGE_INDEX | typeof graphics.SEMANTIC_TYPE_POSITION | typeof graphics.SEMANTIC_TYPE_TANGENT | typeof graphics.SEMANTIC_TYPE_TEXCOORD | typeof graphics.SEMANTIC_TYPE_TEXTURE_TRANSFORM_2D | typeof graphics.SEMANTIC_TYPE_WORLD_MATRIX;
125
+ type STATE = typeof graphics.STATE_ALPHA_TEST | typeof graphics.STATE_ALPHA_TEST_SUPPORTED | typeof graphics.STATE_BLEND | typeof graphics.STATE_CULL_FACE | typeof graphics.STATE_DEPTH_TEST | typeof graphics.STATE_POLYGON_OFFSET_FILL | typeof graphics.STATE_SCISSOR_TEST | typeof graphics.STATE_STENCIL_TEST;
126
+ type STENCIL_OP = typeof graphics.STENCIL_OP_DECR | typeof graphics.STENCIL_OP_DECR_WRAP | typeof graphics.STENCIL_OP_INCR | typeof graphics.STENCIL_OP_INCR_WRAP | typeof graphics.STENCIL_OP_INVERT | typeof graphics.STENCIL_OP_KEEP | typeof graphics.STENCIL_OP_REPLACE | typeof graphics.STENCIL_OP_ZERO;
127
+ type TEXTURE_FILTER = typeof graphics.TEXTURE_FILTER_DEFAULT | typeof graphics.TEXTURE_FILTER_LINEAR | typeof graphics.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR | typeof graphics.TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST | typeof graphics.TEXTURE_FILTER_NEAREST | typeof graphics.TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR | typeof graphics.TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST;
128
+ type TEXTURE_FORMAT = NonNullable<typeof graphics.TEXTURE_FORMAT_BGRA8U> | typeof graphics.TEXTURE_FORMAT_DEPTH | NonNullable<typeof graphics.TEXTURE_FORMAT_LUMINANCE> | NonNullable<typeof graphics.TEXTURE_FORMAT_LUMINANCE_ALPHA> | NonNullable<typeof graphics.TEXTURE_FORMAT_R16F> | NonNullable<typeof graphics.TEXTURE_FORMAT_R32F> | NonNullable<typeof graphics.TEXTURE_FORMAT_R32UI> | NonNullable<typeof graphics.TEXTURE_FORMAT_RG16F> | NonNullable<typeof graphics.TEXTURE_FORMAT_RG32F> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB16F> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB32F> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA16F> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA32F> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA32UI> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA_16BPP> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA_ASTC_4X4> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA_BC3> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA_BC7> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA_ETC2> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB_16BPP> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB_BC1> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB_ETC1> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1> | NonNullable<typeof graphics.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1> | NonNullable<typeof graphics.TEXTURE_FORMAT_RG_BC5> | NonNullable<typeof graphics.TEXTURE_FORMAT_RG_ETC2> | NonNullable<typeof graphics.TEXTURE_FORMAT_R_BC4> | NonNullable<typeof graphics.TEXTURE_FORMAT_R_ETC2> | typeof graphics.TEXTURE_FORMAT_STENCIL;
129
+ type TEXTURE_TYPE = typeof graphics.TEXTURE_TYPE_2D | typeof graphics.TEXTURE_TYPE_2D_ARRAY | NonNullable<typeof graphics.TEXTURE_TYPE_3D> | typeof graphics.TEXTURE_TYPE_CUBE_MAP | typeof graphics.TEXTURE_TYPE_IMAGE_2D | NonNullable<typeof graphics.TEXTURE_TYPE_IMAGE_3D>;
130
+ type TEXTURE_USAGE_FLAG = typeof graphics.TEXTURE_USAGE_FLAG_COLOR | typeof graphics.TEXTURE_USAGE_FLAG_INPUT | typeof graphics.TEXTURE_USAGE_FLAG_MEMORYLESS | typeof graphics.TEXTURE_USAGE_FLAG_SAMPLE | typeof graphics.TEXTURE_USAGE_FLAG_STORAGE;
131
+ type TEXTURE_WRAP = typeof graphics.TEXTURE_WRAP_CLAMP_TO_BORDER | typeof graphics.TEXTURE_WRAP_CLAMP_TO_EDGE | typeof graphics.TEXTURE_WRAP_MIRRORED_REPEAT | typeof graphics.TEXTURE_WRAP_REPEAT;
9
132
  const BLEND_EQUATION_ADD: number & { readonly __brand: "graphics.BLEND_EQUATION_ADD" };
10
133
  const BLEND_EQUATION_MAX: number & { readonly __brand: "graphics.BLEND_EQUATION_MAX" };
11
134
  const BLEND_EQUATION_MIN: number & { readonly __brand: "graphics.BLEND_EQUATION_MIN" };
12
135
  const BLEND_EQUATION_REVERSE_SUBTRACT: number & { readonly __brand: "graphics.BLEND_EQUATION_REVERSE_SUBTRACT" };
13
136
  const BLEND_EQUATION_SUBTRACT: number & { readonly __brand: "graphics.BLEND_EQUATION_SUBTRACT" };
137
+ /**
138
+ * constant blend alpha for every component
139
+ */
14
140
  const BLEND_FACTOR_CONSTANT_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_CONSTANT_ALPHA" };
141
+ /**
142
+ * constant blend color
143
+ */
15
144
  const BLEND_FACTOR_CONSTANT_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_CONSTANT_COLOR" };
145
+ /**
146
+ * destination alpha for every component
147
+ */
16
148
  const BLEND_FACTOR_DST_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_DST_ALPHA" };
149
+ /**
150
+ * destination color
151
+ */
17
152
  const BLEND_FACTOR_DST_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_DST_COLOR" };
153
+ /**
154
+ * one for every component
155
+ */
18
156
  const BLEND_FACTOR_ONE: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE" };
157
+ /**
158
+ * one minus the constant blend alpha for every component
159
+ */
19
160
  const BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA" };
161
+ /**
162
+ * one minus the constant blend color
163
+ */
20
164
  const BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR" };
165
+ /**
166
+ * one minus the destination alpha for every component
167
+ */
21
168
  const BLEND_FACTOR_ONE_MINUS_DST_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_DST_ALPHA" };
169
+ /**
170
+ * one minus the destination color
171
+ */
22
172
  const BLEND_FACTOR_ONE_MINUS_DST_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_DST_COLOR" };
173
+ /**
174
+ * one minus the source alpha for every component
175
+ */
23
176
  const BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA" };
177
+ /**
178
+ * one minus the source color
179
+ */
24
180
  const BLEND_FACTOR_ONE_MINUS_SRC_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_SRC_COLOR" };
181
+ /**
182
+ * source alpha for every component
183
+ */
25
184
  const BLEND_FACTOR_SRC_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_ALPHA" };
185
+ /**
186
+ * minimum of source alpha and one minus destination alpha for color, and one for alpha
187
+ */
26
188
  const BLEND_FACTOR_SRC_ALPHA_SATURATE: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_ALPHA_SATURATE" };
189
+ /**
190
+ * source color
191
+ */
27
192
  const BLEND_FACTOR_SRC_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_COLOR" };
193
+ /**
194
+ * zero for every component
195
+ */
28
196
  const BLEND_FACTOR_ZERO: number & { readonly __brand: "graphics.BLEND_FACTOR_ZERO" };
197
+ /**
198
+ * first color attachment
199
+ */
29
200
  const BUFFER_TYPE_COLOR0_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR0_BIT" };
30
201
  /**
31
- * May be nil if multitarget rendering isn't supported
202
+ * second color attachment; may be nil if multiple render targets are unsupported
203
+ */
204
+ const BUFFER_TYPE_COLOR1_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR1_BIT" } | undefined;
205
+ /**
206
+ * third color attachment; may be nil if multiple render targets are unsupported
32
207
  */
33
- const BUFFER_TYPE_COLOR1_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR1_BIT" };
208
+ const BUFFER_TYPE_COLOR2_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR2_BIT" } | undefined;
34
209
  /**
35
- * May be nil if multitarget rendering isn't supported
210
+ * fourth color attachment; may be nil if multiple render targets are unsupported
36
211
  */
37
- const BUFFER_TYPE_COLOR2_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR2_BIT" };
212
+ const BUFFER_TYPE_COLOR3_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR3_BIT" } | undefined;
38
213
  /**
39
- * May be nil if multitarget rendering isn't supported
214
+ * depth attachment
40
215
  */
41
- const BUFFER_TYPE_COLOR3_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR3_BIT" };
42
216
  const BUFFER_TYPE_DEPTH_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_DEPTH_BIT" };
217
+ /**
218
+ * stencil attachment
219
+ */
43
220
  const BUFFER_TYPE_STENCIL_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_STENCIL_BIT" };
221
+ /**
222
+ * always passes
223
+ */
44
224
  const COMPARE_FUNC_ALWAYS: number & { readonly __brand: "graphics.COMPARE_FUNC_ALWAYS" };
225
+ /**
226
+ * passes when the values are equal
227
+ */
45
228
  const COMPARE_FUNC_EQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_EQUAL" };
229
+ /**
230
+ * passes when the incoming value is greater than or equal to the stored value
231
+ */
46
232
  const COMPARE_FUNC_GEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_GEQUAL" };
233
+ /**
234
+ * passes when the incoming value is greater than the stored value
235
+ */
47
236
  const COMPARE_FUNC_GREATER: number & { readonly __brand: "graphics.COMPARE_FUNC_GREATER" };
237
+ /**
238
+ * passes when the incoming value is less than or equal to the stored value
239
+ */
48
240
  const COMPARE_FUNC_LEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_LEQUAL" };
241
+ /**
242
+ * passes when the incoming value is less than the stored value
243
+ */
49
244
  const COMPARE_FUNC_LESS: number & { readonly __brand: "graphics.COMPARE_FUNC_LESS" };
245
+ /**
246
+ * never passes
247
+ */
50
248
  const COMPARE_FUNC_NEVER: number & { readonly __brand: "graphics.COMPARE_FUNC_NEVER" };
249
+ /**
250
+ * passes when the values are not equal
251
+ */
51
252
  const COMPARE_FUNC_NOTEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_NOTEQUAL" };
52
253
  const COMPRESSION_TYPE_BASIS_ETC1S: number & { readonly __brand: "graphics.COMPRESSION_TYPE_BASIS_ETC1S" };
53
254
  const COMPRESSION_TYPE_BASIS_UASTC: number & { readonly __brand: "graphics.COMPRESSION_TYPE_BASIS_UASTC" };
@@ -59,13 +260,15 @@ declare global {
59
260
  */
60
261
  const CONTEXT_FEATURE_3D_TEXTURES: number & { readonly __brand: "graphics.CONTEXT_FEATURE_3D_TEXTURES" };
61
262
  /**
62
- * Context feature flag indicating support for ASTC compressed 2D array textures.
63
- * Some WebGL/GLES drivers fail array texture ASTC uploads while 2D ASTC works.
263
+ * Context feature flag indicating support for ASTC compressed 2D array textures. Some WebGL/GLES drivers fail array texture ASTC uploads while 2D ASTC works.
64
264
  */
65
265
  const CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES: number & { readonly __brand: "graphics.CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES" };
66
266
  /**
67
- * Context feature flag indicating support for min/max blend equations.
68
- * Requires GLES3+ or EXT_blend_minmax.
267
+ * Context feature flag indicating support for BC (S3TC/RGTC/BPTC) compressed 2D array and 3D textures. WebGL2 forbids these compressed families on array/3D targets while allowing them on 2D.
268
+ */
269
+ const CONTEXT_FEATURE_BC_ARRAY_TEXTURES: number & { readonly __brand: "graphics.CONTEXT_FEATURE_BC_ARRAY_TEXTURES" };
270
+ /**
271
+ * Context feature flag indicating support for min/max blend equations. Requires GLES3+ or EXT_blend_minmax.
69
272
  */
70
273
  const CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX: number & { readonly __brand: "graphics.CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX" };
71
274
  /**
@@ -92,9 +295,110 @@ declare global {
92
295
  * Context feature flag indicating support for vertical sync (vsync).
93
296
  */
94
297
  const CONTEXT_FEATURE_VSYNC: number & { readonly __brand: "graphics.CONTEXT_FEATURE_VSYNC" };
298
+ /**
299
+ * Default vertex attribute coordinate space.
300
+ */
301
+ const COORDINATE_SPACE_DEFAULT: number & { readonly __brand: "graphics.COORDINATE_SPACE_DEFAULT" };
302
+ /**
303
+ * Local vertex attribute coordinate space.
304
+ */
305
+ const COORDINATE_SPACE_LOCAL: number & { readonly __brand: "graphics.COORDINATE_SPACE_LOCAL" };
306
+ /**
307
+ * World vertex attribute coordinate space.
308
+ */
309
+ const COORDINATE_SPACE_WORLD: number & { readonly __brand: "graphics.COORDINATE_SPACE_WORLD" };
310
+ /**
311
+ * Signed 8-bit vertex attribute data.
312
+ */
313
+ const DATA_TYPE_BYTE: number & { readonly __brand: "graphics.DATA_TYPE_BYTE" };
314
+ /**
315
+ * 32-bit floating-point vertex attribute data.
316
+ */
317
+ const DATA_TYPE_FLOAT: number & { readonly __brand: "graphics.DATA_TYPE_FLOAT" };
318
+ /**
319
+ * Signed 32-bit vertex attribute data.
320
+ */
321
+ const DATA_TYPE_INT: number & { readonly __brand: "graphics.DATA_TYPE_INT" };
322
+ /**
323
+ * Signed 16-bit vertex attribute data.
324
+ */
325
+ const DATA_TYPE_SHORT: number & { readonly __brand: "graphics.DATA_TYPE_SHORT" };
326
+ /**
327
+ * Unsigned 8-bit vertex attribute data.
328
+ */
329
+ const DATA_TYPE_UNSIGNED_BYTE: number & { readonly __brand: "graphics.DATA_TYPE_UNSIGNED_BYTE" };
330
+ /**
331
+ * Unsigned 32-bit vertex attribute data.
332
+ */
333
+ const DATA_TYPE_UNSIGNED_INT: number & { readonly __brand: "graphics.DATA_TYPE_UNSIGNED_INT" };
334
+ /**
335
+ * Unsigned 16-bit vertex attribute data.
336
+ */
337
+ const DATA_TYPE_UNSIGNED_SHORT: number & { readonly __brand: "graphics.DATA_TYPE_UNSIGNED_SHORT" };
338
+ /**
339
+ * back-facing polygons
340
+ */
95
341
  const FACE_TYPE_BACK: number & { readonly __brand: "graphics.FACE_TYPE_BACK" };
342
+ /**
343
+ * front-facing polygons
344
+ */
96
345
  const FACE_TYPE_FRONT: number & { readonly __brand: "graphics.FACE_TYPE_FRONT" };
346
+ /**
347
+ * both front- and back-facing polygons
348
+ */
97
349
  const FACE_TYPE_FRONT_AND_BACK: number & { readonly __brand: "graphics.FACE_TYPE_FRONT_AND_BACK" };
350
+ /**
351
+ * Bone-index vertex attribute.
352
+ */
353
+ const SEMANTIC_TYPE_BONE_INDICES: number & { readonly __brand: "graphics.SEMANTIC_TYPE_BONE_INDICES" };
354
+ /**
355
+ * Bone-weight vertex attribute.
356
+ */
357
+ const SEMANTIC_TYPE_BONE_WEIGHTS: number & { readonly __brand: "graphics.SEMANTIC_TYPE_BONE_WEIGHTS" };
358
+ /**
359
+ * Color vertex attribute.
360
+ */
361
+ const SEMANTIC_TYPE_COLOR: number & { readonly __brand: "graphics.SEMANTIC_TYPE_COLOR" };
362
+ /**
363
+ * Morph-target-weight vertex attribute.
364
+ */
365
+ const SEMANTIC_TYPE_MORPH_TARGET_WEIGHTS: number & { readonly __brand: "graphics.SEMANTIC_TYPE_MORPH_TARGET_WEIGHTS" };
366
+ /**
367
+ * Vertex attribute without a predefined semantic.
368
+ */
369
+ const SEMANTIC_TYPE_NONE: number & { readonly __brand: "graphics.SEMANTIC_TYPE_NONE" };
370
+ /**
371
+ * Normal vertex attribute.
372
+ */
373
+ const SEMANTIC_TYPE_NORMAL: number & { readonly __brand: "graphics.SEMANTIC_TYPE_NORMAL" };
374
+ /**
375
+ * Normal-matrix vertex attribute.
376
+ */
377
+ const SEMANTIC_TYPE_NORMAL_MATRIX: number & { readonly __brand: "graphics.SEMANTIC_TYPE_NORMAL_MATRIX" };
378
+ /**
379
+ * Texture page-index vertex attribute.
380
+ */
381
+ const SEMANTIC_TYPE_PAGE_INDEX: number & { readonly __brand: "graphics.SEMANTIC_TYPE_PAGE_INDEX" };
382
+ /**
383
+ * Position vertex attribute.
384
+ */
385
+ const SEMANTIC_TYPE_POSITION: number & { readonly __brand: "graphics.SEMANTIC_TYPE_POSITION" };
386
+ /**
387
+ * Tangent vertex attribute.
388
+ */
389
+ const SEMANTIC_TYPE_TANGENT: number & { readonly __brand: "graphics.SEMANTIC_TYPE_TANGENT" };
390
+ /**
391
+ * Texture-coordinate vertex attribute.
392
+ */
393
+ const SEMANTIC_TYPE_TEXCOORD: number & { readonly __brand: "graphics.SEMANTIC_TYPE_TEXCOORD" };
394
+ /**
395
+ * 2D texture-transform vertex attribute.
396
+ */
397
+ const SEMANTIC_TYPE_TEXTURE_TRANSFORM_2D: number & { readonly __brand: "graphics.SEMANTIC_TYPE_TEXTURE_TRANSFORM_2D" };
398
+ /**
399
+ * World-matrix vertex attribute.
400
+ */
401
+ const SEMANTIC_TYPE_WORLD_MATRIX: number & { readonly __brand: "graphics.SEMANTIC_TYPE_WORLD_MATRIX" };
98
402
  const STATE_ALPHA_TEST: number & { readonly __brand: "graphics.STATE_ALPHA_TEST" };
99
403
  const STATE_ALPHA_TEST_SUPPORTED: number & { readonly __brand: "graphics.STATE_ALPHA_TEST_SUPPORTED" };
100
404
  const STATE_BLEND: number & { readonly __brand: "graphics.STATE_BLEND" };
@@ -103,13 +407,37 @@ declare global {
103
407
  const STATE_POLYGON_OFFSET_FILL: number & { readonly __brand: "graphics.STATE_POLYGON_OFFSET_FILL" };
104
408
  const STATE_SCISSOR_TEST: number & { readonly __brand: "graphics.STATE_SCISSOR_TEST" };
105
409
  const STATE_STENCIL_TEST: number & { readonly __brand: "graphics.STATE_STENCIL_TEST" };
410
+ /**
411
+ * decrement and clamp at zero
412
+ */
106
413
  const STENCIL_OP_DECR: number & { readonly __brand: "graphics.STENCIL_OP_DECR" };
414
+ /**
415
+ * decrement and wrap zero to the maximum unsigned value
416
+ */
107
417
  const STENCIL_OP_DECR_WRAP: number & { readonly __brand: "graphics.STENCIL_OP_DECR_WRAP" };
418
+ /**
419
+ * increment and clamp at the maximum unsigned value
420
+ */
108
421
  const STENCIL_OP_INCR: number & { readonly __brand: "graphics.STENCIL_OP_INCR" };
422
+ /**
423
+ * increment and wrap the maximum unsigned value to zero
424
+ */
109
425
  const STENCIL_OP_INCR_WRAP: number & { readonly __brand: "graphics.STENCIL_OP_INCR_WRAP" };
426
+ /**
427
+ * bitwise invert
428
+ */
110
429
  const STENCIL_OP_INVERT: number & { readonly __brand: "graphics.STENCIL_OP_INVERT" };
430
+ /**
431
+ * keep the current value
432
+ */
111
433
  const STENCIL_OP_KEEP: number & { readonly __brand: "graphics.STENCIL_OP_KEEP" };
434
+ /**
435
+ * replace with the reference value from render.set_stencil_func
436
+ */
112
437
  const STENCIL_OP_REPLACE: number & { readonly __brand: "graphics.STENCIL_OP_REPLACE" };
438
+ /**
439
+ * set to zero
440
+ */
113
441
  const STENCIL_OP_ZERO: number & { readonly __brand: "graphics.STENCIL_OP_ZERO" };
114
442
  const TEXTURE_FILTER_DEFAULT: number & { readonly __brand: "graphics.TEXTURE_FILTER_DEFAULT" };
115
443
  const TEXTURE_FILTER_LINEAR: number & { readonly __brand: "graphics.TEXTURE_FILTER_LINEAR" };
@@ -121,141 +449,141 @@ declare global {
121
449
  /**
122
450
  * May be nil if the graphics driver doesn't support it
123
451
  */
124
- const TEXTURE_FORMAT_BGRA8U: number & { readonly __brand: "graphics.TEXTURE_FORMAT_BGRA8U" };
452
+ const TEXTURE_FORMAT_BGRA8U: number & { readonly __brand: "graphics.TEXTURE_FORMAT_BGRA8U" } | undefined;
125
453
  const TEXTURE_FORMAT_DEPTH: number & { readonly __brand: "graphics.TEXTURE_FORMAT_DEPTH" };
126
454
  /**
127
455
  * May be nil if the graphics driver doesn't support it
128
456
  */
129
- const TEXTURE_FORMAT_LUMINANCE: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE" };
457
+ const TEXTURE_FORMAT_LUMINANCE: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE" } | undefined;
130
458
  /**
131
459
  * May be nil if the graphics driver doesn't support it
132
460
  */
133
- const TEXTURE_FORMAT_LUMINANCE_ALPHA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE_ALPHA" };
461
+ const TEXTURE_FORMAT_LUMINANCE_ALPHA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE_ALPHA" } | undefined;
134
462
  /**
135
463
  * May be nil if the graphics driver doesn't support it
136
464
  */
137
- const TEXTURE_FORMAT_R_BC4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_BC4" };
465
+ const TEXTURE_FORMAT_R_BC4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_BC4" } | undefined;
138
466
  /**
139
467
  * May be nil if the graphics driver doesn't support it
140
468
  */
141
- const TEXTURE_FORMAT_R_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_ETC2" };
469
+ const TEXTURE_FORMAT_R_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_ETC2" } | undefined;
142
470
  /**
143
471
  * May be nil if the graphics driver doesn't support it
144
472
  */
145
- const TEXTURE_FORMAT_R16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R16F" };
473
+ const TEXTURE_FORMAT_R16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R16F" } | undefined;
146
474
  /**
147
475
  * May be nil if the graphics driver doesn't support it
148
476
  */
149
- const TEXTURE_FORMAT_R32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32F" };
477
+ const TEXTURE_FORMAT_R32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32F" } | undefined;
150
478
  /**
151
479
  * May be nil if the graphics driver doesn't support it
152
480
  */
153
- const TEXTURE_FORMAT_R32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32UI" };
481
+ const TEXTURE_FORMAT_R32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32UI" } | undefined;
154
482
  /**
155
483
  * May be nil if the graphics driver doesn't support it
156
484
  */
157
- const TEXTURE_FORMAT_RG_BC5: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_BC5" };
485
+ const TEXTURE_FORMAT_RG_BC5: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_BC5" } | undefined;
158
486
  /**
159
487
  * May be nil if the graphics driver doesn't support it
160
488
  */
161
- const TEXTURE_FORMAT_RG_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_ETC2" };
489
+ const TEXTURE_FORMAT_RG_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_ETC2" } | undefined;
162
490
  /**
163
491
  * May be nil if the graphics driver doesn't support it
164
492
  */
165
- const TEXTURE_FORMAT_RG16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG16F" };
493
+ const TEXTURE_FORMAT_RG16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG16F" } | undefined;
166
494
  /**
167
495
  * May be nil if the graphics driver doesn't support it
168
496
  */
169
- const TEXTURE_FORMAT_RG32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG32F" };
497
+ const TEXTURE_FORMAT_RG32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG32F" } | undefined;
170
498
  /**
171
499
  * May be nil if the graphics driver doesn't support it
172
500
  */
173
- const TEXTURE_FORMAT_RGB: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB" };
501
+ const TEXTURE_FORMAT_RGB: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB" } | undefined;
174
502
  /**
175
503
  * May be nil if the graphics driver doesn't support it
176
504
  */
177
- const TEXTURE_FORMAT_RGB_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_16BPP" };
505
+ const TEXTURE_FORMAT_RGB_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_16BPP" } | undefined;
178
506
  /**
179
507
  * May be nil if the graphics driver doesn't support it
180
508
  */
181
- const TEXTURE_FORMAT_RGB_BC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_BC1" };
509
+ const TEXTURE_FORMAT_RGB_BC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_BC1" } | undefined;
182
510
  /**
183
511
  * May be nil if the graphics driver doesn't support it
184
512
  */
185
- const TEXTURE_FORMAT_RGB_ETC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_ETC1" };
513
+ const TEXTURE_FORMAT_RGB_ETC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_ETC1" } | undefined;
186
514
  /**
187
515
  * May be nil if the graphics driver doesn't support it
188
516
  */
189
- const TEXTURE_FORMAT_RGB_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1" };
517
+ const TEXTURE_FORMAT_RGB_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1" } | undefined;
190
518
  /**
191
519
  * May be nil if the graphics driver doesn't support it
192
520
  */
193
- const TEXTURE_FORMAT_RGB_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1" };
521
+ const TEXTURE_FORMAT_RGB_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1" } | undefined;
194
522
  /**
195
523
  * May be nil if the graphics driver doesn't support it
196
524
  */
197
- const TEXTURE_FORMAT_RGB16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB16F" };
525
+ const TEXTURE_FORMAT_RGB16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB16F" } | undefined;
198
526
  /**
199
527
  * May be nil if the graphics driver doesn't support it
200
528
  */
201
- const TEXTURE_FORMAT_RGB32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB32F" };
529
+ const TEXTURE_FORMAT_RGB32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB32F" } | undefined;
202
530
  /**
203
531
  * May be nil if the graphics driver doesn't support it
204
532
  */
205
- const TEXTURE_FORMAT_RGBA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA" };
533
+ const TEXTURE_FORMAT_RGBA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA" } | undefined;
206
534
  /**
207
535
  * May be nil if the graphics driver doesn't support it
208
536
  */
209
- const TEXTURE_FORMAT_RGBA_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_16BPP" };
537
+ const TEXTURE_FORMAT_RGBA_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_16BPP" } | undefined;
210
538
  /**
211
539
  * May be nil if the graphics driver doesn't support it
212
540
  */
213
- const TEXTURE_FORMAT_RGBA_ASTC_4X4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ASTC_4X4" };
541
+ const TEXTURE_FORMAT_RGBA_ASTC_4X4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ASTC_4X4" } | undefined;
214
542
  /**
215
543
  * May be nil if the graphics driver doesn't support it
216
544
  */
217
- const TEXTURE_FORMAT_RGBA_BC3: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC3" };
545
+ const TEXTURE_FORMAT_RGBA_BC3: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC3" } | undefined;
218
546
  /**
219
547
  * May be nil if the graphics driver doesn't support it
220
548
  */
221
- const TEXTURE_FORMAT_RGBA_BC7: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC7" };
549
+ const TEXTURE_FORMAT_RGBA_BC7: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC7" } | undefined;
222
550
  /**
223
551
  * May be nil if the graphics driver doesn't support it
224
552
  */
225
- const TEXTURE_FORMAT_RGBA_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ETC2" };
553
+ const TEXTURE_FORMAT_RGBA_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ETC2" } | undefined;
226
554
  /**
227
555
  * May be nil if the graphics driver doesn't support it
228
556
  */
229
- const TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1" };
557
+ const TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1" } | undefined;
230
558
  /**
231
559
  * May be nil if the graphics driver doesn't support it
232
560
  */
233
- const TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1" };
561
+ const TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1" } | undefined;
234
562
  /**
235
563
  * May be nil if the graphics driver doesn't support it
236
564
  */
237
- const TEXTURE_FORMAT_RGBA16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA16F" };
565
+ const TEXTURE_FORMAT_RGBA16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA16F" } | undefined;
238
566
  /**
239
567
  * May be nil if the graphics driver doesn't support it
240
568
  */
241
- const TEXTURE_FORMAT_RGBA32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32F" };
569
+ const TEXTURE_FORMAT_RGBA32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32F" } | undefined;
242
570
  /**
243
571
  * May be nil if the graphics driver doesn't support it
244
572
  */
245
- const TEXTURE_FORMAT_RGBA32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32UI" };
573
+ const TEXTURE_FORMAT_RGBA32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32UI" } | undefined;
246
574
  const TEXTURE_FORMAT_STENCIL: number & { readonly __brand: "graphics.TEXTURE_FORMAT_STENCIL" };
247
575
  const TEXTURE_TYPE_2D: number & { readonly __brand: "graphics.TEXTURE_TYPE_2D" };
248
576
  const TEXTURE_TYPE_2D_ARRAY: number & { readonly __brand: "graphics.TEXTURE_TYPE_2D_ARRAY" };
249
577
  /**
250
578
  * May be nil if the graphics driver doesn't support it
251
579
  */
252
- const TEXTURE_TYPE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_3D" };
580
+ const TEXTURE_TYPE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_3D" } | undefined;
253
581
  const TEXTURE_TYPE_CUBE_MAP: number & { readonly __brand: "graphics.TEXTURE_TYPE_CUBE_MAP" };
254
582
  const TEXTURE_TYPE_IMAGE_2D: number & { readonly __brand: "graphics.TEXTURE_TYPE_IMAGE_2D" };
255
583
  /**
256
584
  * May be nil if the graphics driver doesn't support it
257
585
  */
258
- const TEXTURE_TYPE_IMAGE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_IMAGE_3D" };
586
+ const TEXTURE_TYPE_IMAGE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_IMAGE_3D" } | undefined;
259
587
  const TEXTURE_USAGE_FLAG_COLOR: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_COLOR" };
260
588
  const TEXTURE_USAGE_FLAG_INPUT: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_INPUT" };
261
589
  const TEXTURE_USAGE_FLAG_MEMORYLESS: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_MEMORYLESS" };
@@ -270,47 +598,9 @@ declare global {
270
598
  * its hardware limits, the list of driver-reported extensions, and the set of
271
599
  * optional context features supported by the backend.
272
600
  *
273
- * @returns table with the following fields:
274
- * `family` string adapter family name (e.g. "opengl", "vulkan")
275
- * `version_major` number adapter API major version (e.g. 1 for Vulkan 1.4)
276
- * `version_minor` number adapter API minor version (e.g. 4 for Vulkan 1.4)
277
- * `limits` table hardware/driver limits:
278
- *
279
- * ``max_texture_size_2d` [type:number] max 2D texture dimension in texels
280
- * `max_texture_size_3d` [type:number] max 3D (volume) texture dimension in texels
281
- * `max_texture_size_cube` [type:number] max cube map face dimension in texels
282
- * `max_texture_array_layers` [type:number] max layers in an array texture
283
- * `max_framebuffer_width` [type:number] max framebuffer width in pixels
284
- * `max_framebuffer_height` [type:number] max framebuffer height in pixels
285
- * `max_color_attachments` [type:number] max simultaneous color attachments
286
- * `max_samplers_per_stage` [type:number] max texture samplers per shader stage
287
- * `max_textures_per_stage` [type:number] max sampled textures per shader stage
288
- * `max_vertex_attributes` [type:number] max vertex attributes
289
- * `max_vertex_buffers` [type:number] max vertex buffer bindings
290
- * `max_compute_workgroup_size_x` [type:number] max compute workgroup size (X)
291
- * `max_compute_workgroup_size_y` [type:number] max compute workgroup size (Y)
292
- * `max_compute_workgroup_size_z` [type:number] max compute workgroup size (Z)
293
- * `max_compute_workgroup_invocations` [type:number] max invocations per compute workgroup
294
- * `max_compute_shared_memory_size` [type:number] max shared memory per compute workgroup (bytes)
295
- * `max_uniform_buffer_range` [type:number] max bindable uniform buffer range (bytes)
296
- * `max_storage_buffer_range` [type:number] max bindable storage buffer range (bytes)
297
- * `
298
- *
299
- * `extensions` table array of driver-reported extension name strings
300
- * `features` table array of supported context feature ids:
301
- *
302
- * ``graphics.CONTEXT_FEATURE_MULTI_TARGET_RENDERING` multi-target rendering
303
- * `graphics.CONTEXT_FEATURE_TEXTURE_ARRAY` texture arrays
304
- * `graphics.CONTEXT_FEATURE_COMPUTE_SHADER` compute shaders
305
- * `graphics.CONTEXT_FEATURE_STORAGE_BUFFER` storage buffers
306
- * `graphics.CONTEXT_FEATURE_VSYNC` vertical sync
307
- * `graphics.CONTEXT_FEATURE_INSTANCING` hardware instancing
308
- * `graphics.CONTEXT_FEATURE_3D_TEXTURES` 3D (volume) textures
309
- * `graphics.CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES` ASTC compressed 2D array textures
310
- * `graphics.CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX` min/max blend equations
311
- * `
312
- */
313
- function get_adapter_info(): { family: string; version_major: number; version_minor: number; limits: { max_texture_size_2d: number; max_texture_size_3d: number; max_texture_size_cube: number; max_texture_array_layers: number; max_framebuffer_width: number; max_framebuffer_height: number; max_color_attachments: number; max_samplers_per_stage: number; max_textures_per_stage: number; max_vertex_attributes: number; max_vertex_buffers: number; max_compute_workgroup_size_x: number; max_compute_workgroup_size_y: number; max_compute_workgroup_size_z: number; max_compute_workgroup_invocations: number; max_compute_shared_memory_size: number; max_uniform_buffer_range: number; max_storage_buffer_range: number }; extensions: string[]; features: number[] };
601
+ * @returns information about the active graphics adapter and context
602
+ */
603
+ function get_adapter_info(): graphics.adapter_info;
314
604
  /**
315
605
  * get the list of graphics adapters that have been registered with the engine
316
606
  *