@defold-typescript/types 0.25.0 → 0.27.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.
- package/api-availability.json +333 -306
- package/api-signatures.json +1312 -0
- package/api-targets.json +351 -2
- package/examples/translations.json +1984 -0
- package/fixtures/messages_doc.json +880 -0
- package/generated/collectionproxy.d.ts +22 -0
- package/generated/editor-vm/http.d.ts +2 -2
- package/generated/editor-vm/image.d.ts +48 -0
- package/generated/editor.d.ts +27 -8
- package/generated/gui.d.ts +35 -6
- package/generated/kinds/editor-script.d.ts +1 -0
- package/generated/material.d.ts +4 -0
- package/generated/versions/defold-1.12.4/liveupdate.d.ts +22 -22
- package/generated/versions/defold-1.12.4/physics.d.ts +78 -75
- package/generated/versions/defold-1.12.4/render.d.ts +75 -55
- package/generated/versions/defold-1.12.4/resource.d.ts +187 -175
- package/generated/versions/defold-1.13.0/b2d.d.ts +33 -0
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +676 -0
- package/generated/versions/defold-1.13.0/b2d_chain.d.ts +106 -0
- package/generated/versions/defold-1.13.0/b2d_fixture.d.ts +155 -0
- package/generated/versions/defold-1.13.0/b2d_joint.d.ts +823 -0
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +215 -0
- package/generated/versions/defold-1.13.0/b2d_world.d.ts +314 -0
- package/generated/versions/defold-1.13.0/buffer.d.ts +176 -0
- package/generated/versions/defold-1.13.0/camera.d.ts +302 -0
- package/generated/versions/defold-1.13.0/collectionfactory.d.ts +146 -0
- package/generated/versions/defold-1.13.0/collectionproxy.d.ts +71 -0
- package/generated/versions/defold-1.13.0/compute.d.ts +306 -0
- package/generated/versions/defold-1.13.0/crash.d.ts +143 -0
- package/generated/versions/defold-1.13.0/editor-vm/http.d.ts +56 -0
- package/generated/versions/defold-1.13.0/editor-vm/json.d.ts +10 -0
- package/generated/versions/defold-1.13.0/editor-vm/localization.d.ts +42 -0
- package/generated/versions/defold-1.13.0/editor-vm/tilemap_tiles.d.ts +80 -0
- package/generated/versions/defold-1.13.0/editor-vm/zip.d.ts +10 -0
- package/generated/versions/defold-1.13.0/editor-vm/zlib.d.ts +24 -0
- package/generated/versions/defold-1.13.0/editor.d.ts +1092 -0
- package/generated/versions/defold-1.13.0/factory.d.ts +123 -0
- package/generated/versions/defold-1.13.0/font.d.ts +81 -0
- package/generated/versions/defold-1.13.0/go.d.ts +1054 -0
- package/generated/versions/defold-1.13.0/graphics.d.ts +321 -0
- package/generated/versions/defold-1.13.0/gui.d.ts +2370 -0
- package/generated/versions/defold-1.13.0/html5.d.ts +53 -0
- package/generated/versions/defold-1.13.0/http.d.ts +84 -0
- package/generated/versions/defold-1.13.0/iac.d.ts +18 -0
- package/generated/versions/defold-1.13.0/iap.d.ts +60 -0
- package/generated/versions/defold-1.13.0/image.d.ts +139 -0
- package/generated/versions/defold-1.13.0/index.d.ts +48 -0
- package/generated/versions/defold-1.13.0/json.d.ts +76 -0
- package/generated/versions/defold-1.13.0/kinds/editor-script.d.ts +13 -0
- package/generated/versions/defold-1.13.0/label.d.ts +94 -0
- package/generated/versions/defold-1.13.0/liveupdate.d.ts +140 -0
- package/generated/versions/defold-1.13.0/material.d.ts +444 -0
- package/generated/versions/defold-1.13.0/model.d.ts +246 -0
- package/generated/versions/defold-1.13.0/msg.d.ts +10 -0
- package/generated/versions/defold-1.13.0/particlefx.d.ts +166 -0
- package/generated/versions/defold-1.13.0/physics.d.ts +548 -0
- package/generated/versions/defold-1.13.0/profiler.d.ts +233 -0
- package/generated/versions/defold-1.13.0/push.d.ts +66 -0
- package/generated/versions/defold-1.13.0/render.d.ts +1185 -0
- package/generated/versions/defold-1.13.0/resource.d.ts +1530 -0
- package/generated/versions/defold-1.13.0/socket.d.ts +795 -0
- package/generated/versions/defold-1.13.0/sound.d.ts +291 -0
- package/generated/versions/defold-1.13.0/sprite.d.ts +157 -0
- package/generated/versions/defold-1.13.0/sys.d.ts +695 -0
- package/generated/versions/defold-1.13.0/tilemap.d.ts +195 -0
- package/generated/versions/defold-1.13.0/timer.d.ts +114 -0
- package/generated/versions/defold-1.13.0/types.d.ts +61 -0
- package/generated/versions/defold-1.13.0/vmath.d.ts +806 -0
- package/generated/versions/defold-1.13.0/webview.d.ts +68 -0
- package/generated/versions/defold-1.13.0/window.d.ts +198 -0
- package/generated/versions/defold-1.13.0/zlib.d.ts +40 -0
- package/index.d.ts +4 -81
- package/package.json +11 -3
- package/scripts/import-defold-release.ts +28 -1
- package/scripts/sync-api-docs.ts +4 -3
- package/src/api-availability.ts +0 -0
- package/src/emit-dts.ts +6 -0
- package/src/example-store.ts +5 -0
- package/src/index.ts +3 -0
- package/scripts/lua-types-signature-index.ts +0 -151
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
declare global {
|
|
3
|
+
/**
|
|
4
|
+
* Graphics functions and constants.
|
|
5
|
+
*/
|
|
6
|
+
namespace graphics {
|
|
7
|
+
const BLEND_EQUATION_ADD: number & { readonly __brand: "graphics.BLEND_EQUATION_ADD" };
|
|
8
|
+
const BLEND_EQUATION_MAX: number & { readonly __brand: "graphics.BLEND_EQUATION_MAX" };
|
|
9
|
+
const BLEND_EQUATION_MIN: number & { readonly __brand: "graphics.BLEND_EQUATION_MIN" };
|
|
10
|
+
const BLEND_EQUATION_REVERSE_SUBTRACT: number & { readonly __brand: "graphics.BLEND_EQUATION_REVERSE_SUBTRACT" };
|
|
11
|
+
const BLEND_EQUATION_SUBTRACT: number & { readonly __brand: "graphics.BLEND_EQUATION_SUBTRACT" };
|
|
12
|
+
const BLEND_FACTOR_CONSTANT_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_CONSTANT_ALPHA" };
|
|
13
|
+
const BLEND_FACTOR_CONSTANT_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_CONSTANT_COLOR" };
|
|
14
|
+
const BLEND_FACTOR_DST_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_DST_ALPHA" };
|
|
15
|
+
const BLEND_FACTOR_DST_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_DST_COLOR" };
|
|
16
|
+
const BLEND_FACTOR_ONE: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE" };
|
|
17
|
+
const BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA" };
|
|
18
|
+
const BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR" };
|
|
19
|
+
const BLEND_FACTOR_ONE_MINUS_DST_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_DST_ALPHA" };
|
|
20
|
+
const BLEND_FACTOR_ONE_MINUS_DST_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_DST_COLOR" };
|
|
21
|
+
const BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA" };
|
|
22
|
+
const BLEND_FACTOR_ONE_MINUS_SRC_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_SRC_COLOR" };
|
|
23
|
+
const BLEND_FACTOR_SRC_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_ALPHA" };
|
|
24
|
+
const BLEND_FACTOR_SRC_ALPHA_SATURATE: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_ALPHA_SATURATE" };
|
|
25
|
+
const BLEND_FACTOR_SRC_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_COLOR" };
|
|
26
|
+
const BLEND_FACTOR_ZERO: number & { readonly __brand: "graphics.BLEND_FACTOR_ZERO" };
|
|
27
|
+
const BUFFER_TYPE_COLOR0_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR0_BIT" };
|
|
28
|
+
/**
|
|
29
|
+
* May be nil if multitarget rendering isn't supported
|
|
30
|
+
*/
|
|
31
|
+
const BUFFER_TYPE_COLOR1_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR1_BIT" };
|
|
32
|
+
/**
|
|
33
|
+
* May be nil if multitarget rendering isn't supported
|
|
34
|
+
*/
|
|
35
|
+
const BUFFER_TYPE_COLOR2_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR2_BIT" };
|
|
36
|
+
/**
|
|
37
|
+
* May be nil if multitarget rendering isn't supported
|
|
38
|
+
*/
|
|
39
|
+
const BUFFER_TYPE_COLOR3_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR3_BIT" };
|
|
40
|
+
const BUFFER_TYPE_DEPTH_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_DEPTH_BIT" };
|
|
41
|
+
const BUFFER_TYPE_STENCIL_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_STENCIL_BIT" };
|
|
42
|
+
const COMPARE_FUNC_ALWAYS: number & { readonly __brand: "graphics.COMPARE_FUNC_ALWAYS" };
|
|
43
|
+
const COMPARE_FUNC_EQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_EQUAL" };
|
|
44
|
+
const COMPARE_FUNC_GEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_GEQUAL" };
|
|
45
|
+
const COMPARE_FUNC_GREATER: number & { readonly __brand: "graphics.COMPARE_FUNC_GREATER" };
|
|
46
|
+
const COMPARE_FUNC_LEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_LEQUAL" };
|
|
47
|
+
const COMPARE_FUNC_LESS: number & { readonly __brand: "graphics.COMPARE_FUNC_LESS" };
|
|
48
|
+
const COMPARE_FUNC_NEVER: number & { readonly __brand: "graphics.COMPARE_FUNC_NEVER" };
|
|
49
|
+
const COMPARE_FUNC_NOTEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_NOTEQUAL" };
|
|
50
|
+
const COMPRESSION_TYPE_BASIS_ETC1S: number & { readonly __brand: "graphics.COMPRESSION_TYPE_BASIS_ETC1S" };
|
|
51
|
+
const COMPRESSION_TYPE_BASIS_UASTC: number & { readonly __brand: "graphics.COMPRESSION_TYPE_BASIS_UASTC" };
|
|
52
|
+
const COMPRESSION_TYPE_DEFAULT: number & { readonly __brand: "graphics.COMPRESSION_TYPE_DEFAULT" };
|
|
53
|
+
const COMPRESSION_TYPE_WEBP: number & { readonly __brand: "graphics.COMPRESSION_TYPE_WEBP" };
|
|
54
|
+
const COMPRESSION_TYPE_WEBP_LOSSY: number & { readonly __brand: "graphics.COMPRESSION_TYPE_WEBP_LOSSY" };
|
|
55
|
+
/**
|
|
56
|
+
* Context feature flag indicating support for 3D (volume) textures.
|
|
57
|
+
*/
|
|
58
|
+
const CONTEXT_FEATURE_3D_TEXTURES: number & { readonly __brand: "graphics.CONTEXT_FEATURE_3D_TEXTURES" };
|
|
59
|
+
/**
|
|
60
|
+
* Context feature flag indicating support for ASTC compressed 2D array textures.
|
|
61
|
+
* Some WebGL/GLES drivers fail array texture ASTC uploads while 2D ASTC works.
|
|
62
|
+
*/
|
|
63
|
+
const CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES: number & { readonly __brand: "graphics.CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES" };
|
|
64
|
+
/**
|
|
65
|
+
* Context feature flag indicating support for min/max blend equations.
|
|
66
|
+
* Requires GLES3+ or EXT_blend_minmax.
|
|
67
|
+
*/
|
|
68
|
+
const CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX: number & { readonly __brand: "graphics.CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX" };
|
|
69
|
+
/**
|
|
70
|
+
* Context feature flag indicating support for compute shaders.
|
|
71
|
+
*/
|
|
72
|
+
const CONTEXT_FEATURE_COMPUTE_SHADER: number & { readonly __brand: "graphics.CONTEXT_FEATURE_COMPUTE_SHADER" };
|
|
73
|
+
/**
|
|
74
|
+
* Context feature flag indicating support for hardware instancing.
|
|
75
|
+
*/
|
|
76
|
+
const CONTEXT_FEATURE_INSTANCING: number & { readonly __brand: "graphics.CONTEXT_FEATURE_INSTANCING" };
|
|
77
|
+
/**
|
|
78
|
+
* Context feature flag indicating support for rendering to multiple color targets simultaneously.
|
|
79
|
+
*/
|
|
80
|
+
const CONTEXT_FEATURE_MULTI_TARGET_RENDERING: number & { readonly __brand: "graphics.CONTEXT_FEATURE_MULTI_TARGET_RENDERING" };
|
|
81
|
+
/**
|
|
82
|
+
* Context feature flag indicating support for storage buffers.
|
|
83
|
+
*/
|
|
84
|
+
const CONTEXT_FEATURE_STORAGE_BUFFER: number & { readonly __brand: "graphics.CONTEXT_FEATURE_STORAGE_BUFFER" };
|
|
85
|
+
/**
|
|
86
|
+
* Context feature flag indicating support for texture arrays.
|
|
87
|
+
*/
|
|
88
|
+
const CONTEXT_FEATURE_TEXTURE_ARRAY: number & { readonly __brand: "graphics.CONTEXT_FEATURE_TEXTURE_ARRAY" };
|
|
89
|
+
/**
|
|
90
|
+
* Context feature flag indicating support for vertical sync (vsync).
|
|
91
|
+
*/
|
|
92
|
+
const CONTEXT_FEATURE_VSYNC: number & { readonly __brand: "graphics.CONTEXT_FEATURE_VSYNC" };
|
|
93
|
+
const FACE_TYPE_BACK: number & { readonly __brand: "graphics.FACE_TYPE_BACK" };
|
|
94
|
+
const FACE_TYPE_FRONT: number & { readonly __brand: "graphics.FACE_TYPE_FRONT" };
|
|
95
|
+
const FACE_TYPE_FRONT_AND_BACK: number & { readonly __brand: "graphics.FACE_TYPE_FRONT_AND_BACK" };
|
|
96
|
+
const STATE_ALPHA_TEST: number & { readonly __brand: "graphics.STATE_ALPHA_TEST" };
|
|
97
|
+
const STATE_ALPHA_TEST_SUPPORTED: number & { readonly __brand: "graphics.STATE_ALPHA_TEST_SUPPORTED" };
|
|
98
|
+
const STATE_BLEND: number & { readonly __brand: "graphics.STATE_BLEND" };
|
|
99
|
+
const STATE_CULL_FACE: number & { readonly __brand: "graphics.STATE_CULL_FACE" };
|
|
100
|
+
const STATE_DEPTH_TEST: number & { readonly __brand: "graphics.STATE_DEPTH_TEST" };
|
|
101
|
+
const STATE_POLYGON_OFFSET_FILL: number & { readonly __brand: "graphics.STATE_POLYGON_OFFSET_FILL" };
|
|
102
|
+
const STATE_SCISSOR_TEST: number & { readonly __brand: "graphics.STATE_SCISSOR_TEST" };
|
|
103
|
+
const STATE_STENCIL_TEST: number & { readonly __brand: "graphics.STATE_STENCIL_TEST" };
|
|
104
|
+
const STENCIL_OP_DECR: number & { readonly __brand: "graphics.STENCIL_OP_DECR" };
|
|
105
|
+
const STENCIL_OP_DECR_WRAP: number & { readonly __brand: "graphics.STENCIL_OP_DECR_WRAP" };
|
|
106
|
+
const STENCIL_OP_INCR: number & { readonly __brand: "graphics.STENCIL_OP_INCR" };
|
|
107
|
+
const STENCIL_OP_INCR_WRAP: number & { readonly __brand: "graphics.STENCIL_OP_INCR_WRAP" };
|
|
108
|
+
const STENCIL_OP_INVERT: number & { readonly __brand: "graphics.STENCIL_OP_INVERT" };
|
|
109
|
+
const STENCIL_OP_KEEP: number & { readonly __brand: "graphics.STENCIL_OP_KEEP" };
|
|
110
|
+
const STENCIL_OP_REPLACE: number & { readonly __brand: "graphics.STENCIL_OP_REPLACE" };
|
|
111
|
+
const STENCIL_OP_ZERO: number & { readonly __brand: "graphics.STENCIL_OP_ZERO" };
|
|
112
|
+
const TEXTURE_FILTER_DEFAULT: number & { readonly __brand: "graphics.TEXTURE_FILTER_DEFAULT" };
|
|
113
|
+
const TEXTURE_FILTER_LINEAR: number & { readonly __brand: "graphics.TEXTURE_FILTER_LINEAR" };
|
|
114
|
+
const TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR: number & { readonly __brand: "graphics.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR" };
|
|
115
|
+
const TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST: number & { readonly __brand: "graphics.TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST" };
|
|
116
|
+
const TEXTURE_FILTER_NEAREST: number & { readonly __brand: "graphics.TEXTURE_FILTER_NEAREST" };
|
|
117
|
+
const TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR: number & { readonly __brand: "graphics.TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR" };
|
|
118
|
+
const TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST: number & { readonly __brand: "graphics.TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST" };
|
|
119
|
+
/**
|
|
120
|
+
* May be nil if the graphics driver doesn't support it
|
|
121
|
+
*/
|
|
122
|
+
const TEXTURE_FORMAT_BGRA8U: number & { readonly __brand: "graphics.TEXTURE_FORMAT_BGRA8U" };
|
|
123
|
+
const TEXTURE_FORMAT_DEPTH: number & { readonly __brand: "graphics.TEXTURE_FORMAT_DEPTH" };
|
|
124
|
+
/**
|
|
125
|
+
* May be nil if the graphics driver doesn't support it
|
|
126
|
+
*/
|
|
127
|
+
const TEXTURE_FORMAT_LUMINANCE: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE" };
|
|
128
|
+
/**
|
|
129
|
+
* May be nil if the graphics driver doesn't support it
|
|
130
|
+
*/
|
|
131
|
+
const TEXTURE_FORMAT_LUMINANCE_ALPHA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE_ALPHA" };
|
|
132
|
+
/**
|
|
133
|
+
* May be nil if the graphics driver doesn't support it
|
|
134
|
+
*/
|
|
135
|
+
const TEXTURE_FORMAT_R_BC4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_BC4" };
|
|
136
|
+
/**
|
|
137
|
+
* May be nil if the graphics driver doesn't support it
|
|
138
|
+
*/
|
|
139
|
+
const TEXTURE_FORMAT_R_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_ETC2" };
|
|
140
|
+
/**
|
|
141
|
+
* May be nil if the graphics driver doesn't support it
|
|
142
|
+
*/
|
|
143
|
+
const TEXTURE_FORMAT_R16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R16F" };
|
|
144
|
+
/**
|
|
145
|
+
* May be nil if the graphics driver doesn't support it
|
|
146
|
+
*/
|
|
147
|
+
const TEXTURE_FORMAT_R32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32F" };
|
|
148
|
+
/**
|
|
149
|
+
* May be nil if the graphics driver doesn't support it
|
|
150
|
+
*/
|
|
151
|
+
const TEXTURE_FORMAT_R32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32UI" };
|
|
152
|
+
/**
|
|
153
|
+
* May be nil if the graphics driver doesn't support it
|
|
154
|
+
*/
|
|
155
|
+
const TEXTURE_FORMAT_RG_BC5: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_BC5" };
|
|
156
|
+
/**
|
|
157
|
+
* May be nil if the graphics driver doesn't support it
|
|
158
|
+
*/
|
|
159
|
+
const TEXTURE_FORMAT_RG_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_ETC2" };
|
|
160
|
+
/**
|
|
161
|
+
* May be nil if the graphics driver doesn't support it
|
|
162
|
+
*/
|
|
163
|
+
const TEXTURE_FORMAT_RG16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG16F" };
|
|
164
|
+
/**
|
|
165
|
+
* May be nil if the graphics driver doesn't support it
|
|
166
|
+
*/
|
|
167
|
+
const TEXTURE_FORMAT_RG32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG32F" };
|
|
168
|
+
/**
|
|
169
|
+
* May be nil if the graphics driver doesn't support it
|
|
170
|
+
*/
|
|
171
|
+
const TEXTURE_FORMAT_RGB: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB" };
|
|
172
|
+
/**
|
|
173
|
+
* May be nil if the graphics driver doesn't support it
|
|
174
|
+
*/
|
|
175
|
+
const TEXTURE_FORMAT_RGB_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_16BPP" };
|
|
176
|
+
/**
|
|
177
|
+
* May be nil if the graphics driver doesn't support it
|
|
178
|
+
*/
|
|
179
|
+
const TEXTURE_FORMAT_RGB_BC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_BC1" };
|
|
180
|
+
/**
|
|
181
|
+
* May be nil if the graphics driver doesn't support it
|
|
182
|
+
*/
|
|
183
|
+
const TEXTURE_FORMAT_RGB_ETC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_ETC1" };
|
|
184
|
+
/**
|
|
185
|
+
* May be nil if the graphics driver doesn't support it
|
|
186
|
+
*/
|
|
187
|
+
const TEXTURE_FORMAT_RGB_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1" };
|
|
188
|
+
/**
|
|
189
|
+
* May be nil if the graphics driver doesn't support it
|
|
190
|
+
*/
|
|
191
|
+
const TEXTURE_FORMAT_RGB_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1" };
|
|
192
|
+
/**
|
|
193
|
+
* May be nil if the graphics driver doesn't support it
|
|
194
|
+
*/
|
|
195
|
+
const TEXTURE_FORMAT_RGB16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB16F" };
|
|
196
|
+
/**
|
|
197
|
+
* May be nil if the graphics driver doesn't support it
|
|
198
|
+
*/
|
|
199
|
+
const TEXTURE_FORMAT_RGB32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB32F" };
|
|
200
|
+
/**
|
|
201
|
+
* May be nil if the graphics driver doesn't support it
|
|
202
|
+
*/
|
|
203
|
+
const TEXTURE_FORMAT_RGBA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA" };
|
|
204
|
+
/**
|
|
205
|
+
* May be nil if the graphics driver doesn't support it
|
|
206
|
+
*/
|
|
207
|
+
const TEXTURE_FORMAT_RGBA_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_16BPP" };
|
|
208
|
+
/**
|
|
209
|
+
* May be nil if the graphics driver doesn't support it
|
|
210
|
+
*/
|
|
211
|
+
const TEXTURE_FORMAT_RGBA_ASTC_4X4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ASTC_4X4" };
|
|
212
|
+
/**
|
|
213
|
+
* May be nil if the graphics driver doesn't support it
|
|
214
|
+
*/
|
|
215
|
+
const TEXTURE_FORMAT_RGBA_BC3: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC3" };
|
|
216
|
+
/**
|
|
217
|
+
* May be nil if the graphics driver doesn't support it
|
|
218
|
+
*/
|
|
219
|
+
const TEXTURE_FORMAT_RGBA_BC7: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC7" };
|
|
220
|
+
/**
|
|
221
|
+
* May be nil if the graphics driver doesn't support it
|
|
222
|
+
*/
|
|
223
|
+
const TEXTURE_FORMAT_RGBA_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ETC2" };
|
|
224
|
+
/**
|
|
225
|
+
* May be nil if the graphics driver doesn't support it
|
|
226
|
+
*/
|
|
227
|
+
const TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1" };
|
|
228
|
+
/**
|
|
229
|
+
* May be nil if the graphics driver doesn't support it
|
|
230
|
+
*/
|
|
231
|
+
const TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1" };
|
|
232
|
+
/**
|
|
233
|
+
* May be nil if the graphics driver doesn't support it
|
|
234
|
+
*/
|
|
235
|
+
const TEXTURE_FORMAT_RGBA16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA16F" };
|
|
236
|
+
/**
|
|
237
|
+
* May be nil if the graphics driver doesn't support it
|
|
238
|
+
*/
|
|
239
|
+
const TEXTURE_FORMAT_RGBA32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32F" };
|
|
240
|
+
/**
|
|
241
|
+
* May be nil if the graphics driver doesn't support it
|
|
242
|
+
*/
|
|
243
|
+
const TEXTURE_FORMAT_RGBA32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32UI" };
|
|
244
|
+
const TEXTURE_FORMAT_STENCIL: number & { readonly __brand: "graphics.TEXTURE_FORMAT_STENCIL" };
|
|
245
|
+
const TEXTURE_TYPE_2D: number & { readonly __brand: "graphics.TEXTURE_TYPE_2D" };
|
|
246
|
+
const TEXTURE_TYPE_2D_ARRAY: number & { readonly __brand: "graphics.TEXTURE_TYPE_2D_ARRAY" };
|
|
247
|
+
/**
|
|
248
|
+
* May be nil if the graphics driver doesn't support it
|
|
249
|
+
*/
|
|
250
|
+
const TEXTURE_TYPE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_3D" };
|
|
251
|
+
const TEXTURE_TYPE_CUBE_MAP: number & { readonly __brand: "graphics.TEXTURE_TYPE_CUBE_MAP" };
|
|
252
|
+
const TEXTURE_TYPE_IMAGE_2D: number & { readonly __brand: "graphics.TEXTURE_TYPE_IMAGE_2D" };
|
|
253
|
+
/**
|
|
254
|
+
* May be nil if the graphics driver doesn't support it
|
|
255
|
+
*/
|
|
256
|
+
const TEXTURE_TYPE_IMAGE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_IMAGE_3D" };
|
|
257
|
+
const TEXTURE_USAGE_FLAG_COLOR: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_COLOR" };
|
|
258
|
+
const TEXTURE_USAGE_FLAG_INPUT: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_INPUT" };
|
|
259
|
+
const TEXTURE_USAGE_FLAG_MEMORYLESS: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_MEMORYLESS" };
|
|
260
|
+
const TEXTURE_USAGE_FLAG_SAMPLE: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_SAMPLE" };
|
|
261
|
+
const TEXTURE_USAGE_FLAG_STORAGE: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_STORAGE" };
|
|
262
|
+
const TEXTURE_WRAP_CLAMP_TO_BORDER: number & { readonly __brand: "graphics.TEXTURE_WRAP_CLAMP_TO_BORDER" };
|
|
263
|
+
const TEXTURE_WRAP_CLAMP_TO_EDGE: number & { readonly __brand: "graphics.TEXTURE_WRAP_CLAMP_TO_EDGE" };
|
|
264
|
+
const TEXTURE_WRAP_MIRRORED_REPEAT: number & { readonly __brand: "graphics.TEXTURE_WRAP_MIRRORED_REPEAT" };
|
|
265
|
+
const TEXTURE_WRAP_REPEAT: number & { readonly __brand: "graphics.TEXTURE_WRAP_REPEAT" };
|
|
266
|
+
/**
|
|
267
|
+
* Returns a table describing the active graphics context: the adapter family,
|
|
268
|
+
* its hardware limits, the list of driver-reported extensions, and the set of
|
|
269
|
+
* optional context features supported by the backend.
|
|
270
|
+
*
|
|
271
|
+
* @returns table with the following fields:
|
|
272
|
+
* `family` string adapter family name (e.g. "opengl", "vulkan")
|
|
273
|
+
* `version_major` number adapter API major version (e.g. 1 for Vulkan 1.4)
|
|
274
|
+
* `version_minor` number adapter API minor version (e.g. 4 for Vulkan 1.4)
|
|
275
|
+
* `limits` table hardware/driver limits:
|
|
276
|
+
*
|
|
277
|
+
* ``max_texture_size_2d` [type:number] max 2D texture dimension in texels
|
|
278
|
+
* `max_texture_size_3d` [type:number] max 3D (volume) texture dimension in texels
|
|
279
|
+
* `max_texture_size_cube` [type:number] max cube map face dimension in texels
|
|
280
|
+
* `max_texture_array_layers` [type:number] max layers in an array texture
|
|
281
|
+
* `max_framebuffer_width` [type:number] max framebuffer width in pixels
|
|
282
|
+
* `max_framebuffer_height` [type:number] max framebuffer height in pixels
|
|
283
|
+
* `max_color_attachments` [type:number] max simultaneous color attachments
|
|
284
|
+
* `max_samplers_per_stage` [type:number] max texture samplers per shader stage
|
|
285
|
+
* `max_textures_per_stage` [type:number] max sampled textures per shader stage
|
|
286
|
+
* `max_vertex_attributes` [type:number] max vertex attributes
|
|
287
|
+
* `max_vertex_buffers` [type:number] max vertex buffer bindings
|
|
288
|
+
* `max_compute_workgroup_size_x` [type:number] max compute workgroup size (X)
|
|
289
|
+
* `max_compute_workgroup_size_y` [type:number] max compute workgroup size (Y)
|
|
290
|
+
* `max_compute_workgroup_size_z` [type:number] max compute workgroup size (Z)
|
|
291
|
+
* `max_compute_workgroup_invocations` [type:number] max invocations per compute workgroup
|
|
292
|
+
* `max_compute_shared_memory_size` [type:number] max shared memory per compute workgroup (bytes)
|
|
293
|
+
* `max_uniform_buffer_range` [type:number] max bindable uniform buffer range (bytes)
|
|
294
|
+
* `max_storage_buffer_range` [type:number] max bindable storage buffer range (bytes)
|
|
295
|
+
* `
|
|
296
|
+
*
|
|
297
|
+
* `extensions` table array of driver-reported extension name strings
|
|
298
|
+
* `features` table array of supported context feature ids:
|
|
299
|
+
*
|
|
300
|
+
* ``graphics.CONTEXT_FEATURE_MULTI_TARGET_RENDERING` multi-target rendering
|
|
301
|
+
* `graphics.CONTEXT_FEATURE_TEXTURE_ARRAY` texture arrays
|
|
302
|
+
* `graphics.CONTEXT_FEATURE_COMPUTE_SHADER` compute shaders
|
|
303
|
+
* `graphics.CONTEXT_FEATURE_STORAGE_BUFFER` storage buffers
|
|
304
|
+
* `graphics.CONTEXT_FEATURE_VSYNC` vertical sync
|
|
305
|
+
* `graphics.CONTEXT_FEATURE_INSTANCING` hardware instancing
|
|
306
|
+
* `graphics.CONTEXT_FEATURE_3D_TEXTURES` 3D (volume) textures
|
|
307
|
+
* `graphics.CONTEXT_FEATURE_ASTC_ARRAY_TEXTURES` ASTC compressed 2D array textures
|
|
308
|
+
* `graphics.CONTEXT_FEATURE_BLEND_EQUATION_MIN_MAX` min/max blend equations
|
|
309
|
+
* `
|
|
310
|
+
*/
|
|
311
|
+
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[] };
|
|
312
|
+
/**
|
|
313
|
+
* get the list of graphics adapters that have been registered with the engine
|
|
314
|
+
*
|
|
315
|
+
* @returns array of adapter family name strings (e.g. "opengl", "vulkan", "webgpu")
|
|
316
|
+
*/
|
|
317
|
+
function get_engine_adapters(): string[];
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export {};
|