@defold-typescript/types 0.51.0 → 0.53.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 (228) hide show
  1. package/api-availability.json +4 -58
  2. package/api-signatures.json +2804 -3172
  3. package/api-targets.json +15 -5
  4. package/examples/translations.json +19 -71
  5. package/generated/b2d.d.ts +39 -39
  6. package/generated/b2d_body.d.ts +11 -11
  7. package/generated/b2d_chain.d.ts +3 -3
  8. package/generated/b2d_fixture.d.ts +5 -5
  9. package/generated/b2d_joint.d.ts +29 -29
  10. package/generated/b2d_shape.d.ts +13 -13
  11. package/generated/b2d_world.d.ts +15 -15
  12. package/generated/buffer.d.ts +10 -11
  13. package/generated/bullet3d.d.ts +6 -6
  14. package/generated/bullet3d_collision_object.d.ts +10 -10
  15. package/generated/bullet3d_constraint.d.ts +173 -71
  16. package/generated/bullet3d_rigid_body.d.ts +3 -3
  17. package/generated/bullet3d_shape.d.ts +11 -11
  18. package/generated/bullet3d_world.d.ts +20 -20
  19. package/generated/camera.d.ts +4 -4
  20. package/generated/collectionfactory.d.ts +2 -3
  21. package/generated/collectionproxy.d.ts +5 -5
  22. package/generated/compute.d.ts +5 -5
  23. package/generated/crash.d.ts +7 -7
  24. package/generated/editor-vm/http.d.ts +13 -13
  25. package/generated/editor-vm/image.d.ts +4 -4
  26. package/generated/editor-vm/json.d.ts +1 -1
  27. package/generated/editor-vm/tilemap_tiles.d.ts +9 -9
  28. package/generated/editor-vm/zip.d.ts +4 -4
  29. package/generated/editor.d.ts +183 -183
  30. package/generated/factory.d.ts +2 -3
  31. package/generated/font.d.ts +4 -4
  32. package/generated/go.d.ts +122 -230
  33. package/generated/graphics.d.ts +23 -25
  34. package/generated/gui.d.ts +186 -423
  35. package/generated/http.d.ts +3 -3
  36. package/generated/image.d.ts +63 -11
  37. package/generated/json.d.ts +4 -4
  38. package/generated/kinds/gui-script.d.ts +2 -0
  39. package/generated/kinds/render-script.d.ts +14 -15
  40. package/generated/label.d.ts +5 -5
  41. package/generated/liveupdate.d.ts +7 -3
  42. package/generated/material.d.ts +49 -49
  43. package/generated/model.d.ts +46 -14
  44. package/generated/particlefx.d.ts +24 -5
  45. package/generated/physics.d.ts +64 -20
  46. package/generated/profiler.d.ts +3 -5
  47. package/generated/render-script-modules/b2d.d.ts +711 -0
  48. package/generated/render-script-modules/bullet3d.d.ts +73 -0
  49. package/generated/render-script-modules/collectionfactory.d.ts +24 -0
  50. package/generated/render-script-modules/collectionproxy.d.ts +39 -0
  51. package/generated/render-script-modules/factory.d.ts +24 -0
  52. package/generated/render-script-modules/go.d.ts +434 -0
  53. package/generated/render-script-modules/label.d.ts +105 -0
  54. package/generated/render-script-modules/model.d.ts +121 -0
  55. package/generated/render-script-modules/particlefx.d.ts +59 -0
  56. package/generated/render-script-modules/physics.d.ts +333 -0
  57. package/generated/render-script-modules/resource.d.ts +1232 -0
  58. package/generated/render-script-modules/sound.d.ts +227 -0
  59. package/generated/render-script-modules/sprite.d.ts +68 -0
  60. package/generated/render-script-modules/tilemap.d.ts +43 -0
  61. package/generated/render.d.ts +172 -47
  62. package/generated/resource.d.ts +81 -61
  63. package/generated/socket.d.ts +18 -23
  64. package/generated/sound.d.ts +6 -6
  65. package/generated/sprite.d.ts +51 -3
  66. package/generated/sys.d.ts +87 -24
  67. package/generated/tilemap.d.ts +3 -3
  68. package/generated/timer.d.ts +3 -3
  69. package/generated/versions/defold-1.12.4/b2d.d.ts +2 -2
  70. package/generated/versions/defold-1.12.4/b2d_body.d.ts +2 -2
  71. package/generated/versions/defold-1.12.4/buffer.d.ts +8 -8
  72. package/generated/versions/defold-1.12.4/go.d.ts +117 -345
  73. package/generated/versions/defold-1.12.4/graphics.d.ts +2 -1
  74. package/generated/versions/defold-1.12.4/gui.d.ts +169 -532
  75. package/generated/versions/defold-1.12.4/http.d.ts +2 -2
  76. package/generated/versions/defold-1.12.4/image.d.ts +82 -2
  77. package/generated/versions/defold-1.12.4/index.d.ts +1 -0
  78. package/generated/versions/defold-1.12.4/label.d.ts +1 -1
  79. package/generated/versions/defold-1.12.4/liveupdate.d.ts +4 -0
  80. package/generated/versions/defold-1.12.4/model.d.ts +42 -10
  81. package/generated/versions/defold-1.12.4/particlefx.d.ts +23 -2
  82. package/generated/versions/defold-1.12.4/physics.d.ts +46 -2
  83. package/generated/versions/defold-1.12.4/render.d.ts +83 -7
  84. package/generated/versions/defold-1.12.4/resource.d.ts +50 -17
  85. package/generated/versions/defold-1.12.4/socket.d.ts +12 -12
  86. package/generated/versions/defold-1.12.4/sound.d.ts +1 -1
  87. package/generated/versions/defold-1.12.4/sprite.d.ts +59 -2
  88. package/generated/versions/defold-1.12.4/sys.d.ts +103 -8
  89. package/generated/versions/defold-1.12.4/tilemap.d.ts +1 -1
  90. package/generated/versions/defold-1.12.4/vmath.d.ts +0 -24
  91. package/generated/versions/defold-1.12.4/window.d.ts +3 -4
  92. package/generated/versions/defold-1.13.0/b2d.d.ts +2 -2
  93. package/generated/versions/defold-1.13.0/b2d_body.d.ts +2 -2
  94. package/generated/versions/defold-1.13.0/b2d_chain.d.ts +1 -1
  95. package/generated/versions/defold-1.13.0/b2d_joint.d.ts +1 -1
  96. package/generated/versions/defold-1.13.0/b2d_shape.d.ts +1 -1
  97. package/generated/versions/defold-1.13.0/buffer.d.ts +8 -8
  98. package/generated/versions/defold-1.13.0/camera.d.ts +1 -1
  99. package/generated/versions/defold-1.13.0/go.d.ts +117 -372
  100. package/generated/versions/defold-1.13.0/graphics.d.ts +2 -1
  101. package/generated/versions/defold-1.13.0/gui.d.ts +169 -532
  102. package/generated/versions/defold-1.13.0/http.d.ts +2 -2
  103. package/generated/versions/defold-1.13.0/image.d.ts +82 -2
  104. package/generated/versions/defold-1.13.0/index.d.ts +1 -0
  105. package/generated/versions/defold-1.13.0/label.d.ts +1 -1
  106. package/generated/versions/defold-1.13.0/liveupdate.d.ts +4 -0
  107. package/generated/versions/defold-1.13.0/material.d.ts +3 -1
  108. package/generated/versions/defold-1.13.0/model.d.ts +42 -10
  109. package/generated/versions/defold-1.13.0/particlefx.d.ts +23 -2
  110. package/generated/versions/defold-1.13.0/physics.d.ts +46 -2
  111. package/generated/versions/defold-1.13.0/render.d.ts +147 -9
  112. package/generated/versions/defold-1.13.0/resource.d.ts +50 -17
  113. package/generated/versions/defold-1.13.0/socket.d.ts +12 -12
  114. package/generated/versions/defold-1.13.0/sound.d.ts +1 -1
  115. package/generated/versions/defold-1.13.0/sprite.d.ts +59 -2
  116. package/generated/versions/defold-1.13.0/sys.d.ts +103 -8
  117. package/generated/versions/defold-1.13.0/tilemap.d.ts +1 -1
  118. package/generated/versions/defold-1.13.0/vmath.d.ts +0 -24
  119. package/generated/versions/defold-1.13.0/window.d.ts +3 -4
  120. package/generated/versions/defold-1.13.1/b2d.d.ts +2 -2
  121. package/generated/versions/defold-1.13.1/b2d_body.d.ts +2 -2
  122. package/generated/versions/defold-1.13.1/b2d_chain.d.ts +1 -1
  123. package/generated/versions/defold-1.13.1/b2d_joint.d.ts +1 -1
  124. package/generated/versions/defold-1.13.1/b2d_shape.d.ts +1 -1
  125. package/generated/versions/defold-1.13.1/buffer.d.ts +8 -8
  126. package/generated/versions/defold-1.13.1/camera.d.ts +1 -1
  127. package/generated/versions/defold-1.13.1/go.d.ts +117 -372
  128. package/generated/versions/defold-1.13.1/graphics.d.ts +2 -1
  129. package/generated/versions/defold-1.13.1/gui.d.ts +169 -548
  130. package/generated/versions/defold-1.13.1/http.d.ts +2 -2
  131. package/generated/versions/defold-1.13.1/image.d.ts +82 -2
  132. package/generated/versions/defold-1.13.1/index.d.ts +2 -0
  133. package/generated/versions/defold-1.13.1/label.d.ts +1 -1
  134. package/generated/versions/defold-1.13.1/liveupdate.d.ts +4 -0
  135. package/generated/versions/defold-1.13.1/material.d.ts +3 -1
  136. package/generated/versions/defold-1.13.1/model.d.ts +42 -10
  137. package/generated/versions/defold-1.13.1/particlefx.d.ts +23 -2
  138. package/generated/versions/defold-1.13.1/physics.d.ts +46 -2
  139. package/generated/versions/defold-1.13.1/render.d.ts +147 -9
  140. package/generated/versions/defold-1.13.1/resource.d.ts +50 -17
  141. package/generated/versions/defold-1.13.1/socket.d.ts +12 -12
  142. package/generated/versions/defold-1.13.1/sound.d.ts +1 -1
  143. package/generated/versions/defold-1.13.1/sprite.d.ts +59 -2
  144. package/generated/versions/defold-1.13.1/sys.d.ts +103 -8
  145. package/generated/versions/defold-1.13.1/tilemap.d.ts +1 -1
  146. package/generated/versions/defold-1.13.1/vmath.d.ts +0 -24
  147. package/generated/versions/defold-1.13.1/window.d.ts +3 -4
  148. package/generated/versions/defold-1.13.2/b2d.d.ts +39 -39
  149. package/generated/versions/defold-1.13.2/b2d_body.d.ts +11 -11
  150. package/generated/versions/defold-1.13.2/b2d_chain.d.ts +3 -3
  151. package/generated/versions/defold-1.13.2/b2d_fixture.d.ts +5 -5
  152. package/generated/versions/defold-1.13.2/b2d_joint.d.ts +29 -29
  153. package/generated/versions/defold-1.13.2/b2d_shape.d.ts +13 -13
  154. package/generated/versions/defold-1.13.2/b2d_world.d.ts +15 -15
  155. package/generated/versions/defold-1.13.2/buffer.d.ts +10 -11
  156. package/generated/versions/defold-1.13.2/bullet3d.d.ts +6 -6
  157. package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +10 -10
  158. package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +173 -71
  159. package/generated/versions/defold-1.13.2/bullet3d_rigid_body.d.ts +3 -3
  160. package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +11 -11
  161. package/generated/versions/defold-1.13.2/bullet3d_world.d.ts +20 -20
  162. package/generated/versions/defold-1.13.2/camera.d.ts +4 -4
  163. package/generated/versions/defold-1.13.2/collectionfactory.d.ts +2 -3
  164. package/generated/versions/defold-1.13.2/collectionproxy.d.ts +5 -5
  165. package/generated/versions/defold-1.13.2/compute.d.ts +5 -5
  166. package/generated/versions/defold-1.13.2/crash.d.ts +7 -7
  167. package/generated/versions/defold-1.13.2/editor-vm/http.d.ts +13 -13
  168. package/generated/versions/defold-1.13.2/editor-vm/image.d.ts +4 -4
  169. package/generated/versions/defold-1.13.2/editor-vm/json.d.ts +1 -1
  170. package/generated/versions/defold-1.13.2/editor-vm/tilemap_tiles.d.ts +9 -9
  171. package/generated/versions/defold-1.13.2/editor-vm/zip.d.ts +4 -4
  172. package/generated/versions/defold-1.13.2/editor.d.ts +183 -183
  173. package/generated/versions/defold-1.13.2/factory.d.ts +2 -3
  174. package/generated/versions/defold-1.13.2/font.d.ts +4 -4
  175. package/generated/versions/defold-1.13.2/go.d.ts +122 -230
  176. package/generated/versions/defold-1.13.2/graphics.d.ts +22 -24
  177. package/generated/versions/defold-1.13.2/gui.d.ts +186 -423
  178. package/generated/versions/defold-1.13.2/http.d.ts +3 -3
  179. package/generated/versions/defold-1.13.2/image.d.ts +63 -11
  180. package/generated/versions/defold-1.13.2/index.d.ts +2 -0
  181. package/generated/versions/defold-1.13.2/json.d.ts +4 -4
  182. package/generated/versions/defold-1.13.2/label.d.ts +5 -5
  183. package/generated/versions/defold-1.13.2/liveupdate.d.ts +7 -3
  184. package/generated/versions/defold-1.13.2/material.d.ts +49 -49
  185. package/generated/versions/defold-1.13.2/model.d.ts +46 -14
  186. package/generated/versions/defold-1.13.2/particlefx.d.ts +24 -5
  187. package/generated/versions/defold-1.13.2/physics.d.ts +64 -20
  188. package/generated/versions/defold-1.13.2/profiler.d.ts +3 -5
  189. package/generated/versions/defold-1.13.2/render.d.ts +161 -46
  190. package/generated/versions/defold-1.13.2/resource.d.ts +81 -61
  191. package/generated/versions/defold-1.13.2/socket.d.ts +18 -23
  192. package/generated/versions/defold-1.13.2/sound.d.ts +6 -6
  193. package/generated/versions/defold-1.13.2/sprite.d.ts +51 -3
  194. package/generated/versions/defold-1.13.2/sys.d.ts +87 -24
  195. package/generated/versions/defold-1.13.2/tilemap.d.ts +3 -3
  196. package/generated/versions/defold-1.13.2/timer.d.ts +3 -3
  197. package/generated/versions/defold-1.13.2/vmath.d.ts +0 -25
  198. package/generated/versions/defold-1.13.2/window.d.ts +8 -10
  199. package/generated/vmath.d.ts +0 -25
  200. package/generated/window.d.ts +8 -10
  201. package/identity-vocabulary.json +86 -34
  202. package/index.d.ts +2 -0
  203. package/package.json +3 -1
  204. package/scripts/generate-api-availability.ts +10 -24
  205. package/scripts/generate-api-signatures.ts +75 -14
  206. package/scripts/materialize-version.ts +48 -7
  207. package/scripts/regen.ts +214 -19
  208. package/scripts/shared-handle-methods.ts +3 -2
  209. package/scripts/signature-store-fs.ts +1 -0
  210. package/scripts/target-version.ts +26 -0
  211. package/src/api-doc.ts +34 -0
  212. package/src/api-identity.ts +32 -1
  213. package/src/component-properties.d.ts +96 -7
  214. package/src/core-types.ts +71 -28
  215. package/src/doc-corrections.ts +62 -5
  216. package/src/emit-dts.ts +1423 -401
  217. package/src/engine-globals.d.ts +5 -1
  218. package/src/engine-type-name.ts +33 -0
  219. package/src/go-overloads.d.ts +74 -19
  220. package/src/gui-overloads.d.ts +489 -0
  221. package/src/gui-texture-removal.d.ts +41 -0
  222. package/src/index.ts +3 -0
  223. package/src/lifecycle.ts +32 -23
  224. package/src/msg-overloads.d.ts +25 -13
  225. package/src/signature-store.ts +50 -0
  226. package/src/socket-types.d.ts +3 -3
  227. package/src/timers.d.ts +2 -1
  228. package/src/vmath-overloads.d.ts +26 -0
@@ -7,8 +7,7 @@ declare global {
7
7
  * dynamically spawn game objects into the runtime.
8
8
  */
9
9
  namespace factory {
10
- type Status = typeof factory.STATUS_UNLOADED | typeof factory.STATUS_LOADING | typeof factory.STATUS_LOADED;
11
- type STATUS = typeof factory.STATUS_LOADED | typeof factory.STATUS_LOADING | typeof factory.STATUS_UNLOADED;
10
+ type Status = typeof factory.STATUS_LOADED | typeof factory.STATUS_LOADING | typeof factory.STATUS_UNLOADED;
12
11
  /**
13
12
  * The factory resources are loaded.
14
13
  */
@@ -70,7 +69,7 @@ declare global {
70
69
  * @param url - the factory component to get status from
71
70
  * @returns status of the factory component
72
71
  */
73
- function get_status(url: string | Hash | Url): factory.STATUS;
72
+ function get_status(url: string | Hash | Url): factory.Status;
74
73
  /**
75
74
  * Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called.
76
75
  * Calling this function when the factory is not marked as dynamic loading does nothing.
@@ -9,7 +9,7 @@ declare global {
9
9
  /**
10
10
  * Associated font file information
11
11
  */
12
- interface file_info {
12
+ interface FileInfo {
13
13
  /**
14
14
  * path to the `.ttf` or `.otf` font file
15
15
  */
@@ -22,7 +22,7 @@ declare global {
22
22
  /**
23
23
  * Font resource information
24
24
  */
25
- interface info {
25
+ interface Info {
26
26
  /**
27
27
  * path hash of the `.fontc` resource
28
28
  */
@@ -30,7 +30,7 @@ declare global {
30
30
  /**
31
31
  * associated font files
32
32
  */
33
- fonts: font.file_info[];
33
+ fonts: font.FileInfo[];
34
34
  }
35
35
  /**
36
36
  * associates a TTF or OTF resource to a .fontc file.
@@ -51,7 +51,7 @@ declare global {
51
51
  * @param fontc - The path to the .fontc resource
52
52
  * @returns font resource information
53
53
  */
54
- function get_info(fontc: string | Hash): font.info;
54
+ function get_info(fontc: string | Hash): font.Info;
55
55
  /**
56
56
  * prepopulates the font glyph cache with rasterised glyphs
57
57
  *
@@ -9,7 +9,7 @@ declare global {
9
9
  /**
10
10
  * Options for accessing indexed or internal component properties with go.get and go.set.
11
11
  */
12
- export interface property_options {
12
+ export interface PropertyOptions {
13
13
  /**
14
14
  * Index into an array property, starting at one.
15
15
  */
@@ -24,9 +24,7 @@ declare global {
24
24
  keys?: Hash[];
25
25
  }
26
26
  export type Easing = typeof go.EASING_INBACK | typeof go.EASING_INBOUNCE | typeof go.EASING_INCIRC | typeof go.EASING_INCUBIC | typeof go.EASING_INELASTIC | typeof go.EASING_INEXPO | typeof go.EASING_INOUTBACK | typeof go.EASING_INOUTBOUNCE | typeof go.EASING_INOUTCIRC | typeof go.EASING_INOUTCUBIC | typeof go.EASING_INOUTELASTIC | typeof go.EASING_INOUTEXPO | typeof go.EASING_INOUTQUAD | typeof go.EASING_INOUTQUART | typeof go.EASING_INOUTQUINT | typeof go.EASING_INOUTSINE | typeof go.EASING_INQUAD | typeof go.EASING_INQUART | typeof go.EASING_INQUINT | typeof go.EASING_INSINE | typeof go.EASING_LINEAR | typeof go.EASING_OUTBACK | typeof go.EASING_OUTBOUNCE | typeof go.EASING_OUTCIRC | typeof go.EASING_OUTCUBIC | typeof go.EASING_OUTELASTIC | typeof go.EASING_OUTEXPO | typeof go.EASING_OUTINBACK | typeof go.EASING_OUTINBOUNCE | typeof go.EASING_OUTINCIRC | typeof go.EASING_OUTINCUBIC | typeof go.EASING_OUTINELASTIC | typeof go.EASING_OUTINEXPO | typeof go.EASING_OUTINQUAD | typeof go.EASING_OUTINQUART | typeof go.EASING_OUTINQUINT | typeof go.EASING_OUTINSINE | typeof go.EASING_OUTQUAD | typeof go.EASING_OUTQUART | typeof go.EASING_OUTQUINT | typeof go.EASING_OUTSINE;
27
- export type Playback = typeof go.PLAYBACK_ONCE_FORWARD | typeof go.PLAYBACK_ONCE_BACKWARD | typeof go.PLAYBACK_ONCE_PINGPONG | typeof go.PLAYBACK_LOOP_FORWARD | typeof go.PLAYBACK_LOOP_BACKWARD | typeof go.PLAYBACK_LOOP_PINGPONG;
28
- export type EASING = typeof go.EASING_INBACK | typeof go.EASING_INBOUNCE | typeof go.EASING_INCIRC | typeof go.EASING_INCUBIC | typeof go.EASING_INELASTIC | typeof go.EASING_INEXPO | typeof go.EASING_INOUTBACK | typeof go.EASING_INOUTBOUNCE | typeof go.EASING_INOUTCIRC | typeof go.EASING_INOUTCUBIC | typeof go.EASING_INOUTELASTIC | typeof go.EASING_INOUTEXPO | typeof go.EASING_INOUTQUAD | typeof go.EASING_INOUTQUART | typeof go.EASING_INOUTQUINT | typeof go.EASING_INOUTSINE | typeof go.EASING_INQUAD | typeof go.EASING_INQUART | typeof go.EASING_INQUINT | typeof go.EASING_INSINE | typeof go.EASING_LINEAR | typeof go.EASING_OUTBACK | typeof go.EASING_OUTBOUNCE | typeof go.EASING_OUTCIRC | typeof go.EASING_OUTCUBIC | typeof go.EASING_OUTELASTIC | typeof go.EASING_OUTEXPO | typeof go.EASING_OUTINBACK | typeof go.EASING_OUTINBOUNCE | typeof go.EASING_OUTINCIRC | typeof go.EASING_OUTINCUBIC | typeof go.EASING_OUTINELASTIC | typeof go.EASING_OUTINEXPO | typeof go.EASING_OUTINQUAD | typeof go.EASING_OUTINQUART | typeof go.EASING_OUTINQUINT | typeof go.EASING_OUTINSINE | typeof go.EASING_OUTQUAD | typeof go.EASING_OUTQUART | typeof go.EASING_OUTQUINT | typeof go.EASING_OUTSINE;
29
- export type PLAYBACK = typeof go.PLAYBACK_LOOP_BACKWARD | typeof go.PLAYBACK_LOOP_FORWARD | typeof go.PLAYBACK_LOOP_PINGPONG | typeof go.PLAYBACK_NONE | typeof go.PLAYBACK_ONCE_BACKWARD | typeof go.PLAYBACK_ONCE_FORWARD | typeof go.PLAYBACK_ONCE_PINGPONG;
27
+ export type Playback = typeof go.PLAYBACK_LOOP_BACKWARD | typeof go.PLAYBACK_LOOP_FORWARD | typeof go.PLAYBACK_LOOP_PINGPONG | typeof go.PLAYBACK_NONE | typeof go.PLAYBACK_ONCE_BACKWARD | typeof go.PLAYBACK_ONCE_FORWARD | typeof go.PLAYBACK_ONCE_PINGPONG;
30
28
  /**
31
29
  * in-back
32
30
  */
@@ -276,7 +274,65 @@ declare global {
276
274
  * go.animate("go", "position.y", go.PLAYBACK_LOOP_PINGPONG, 100, vec, 2.0);
277
275
  * ```
278
276
  */
279
- export function animate(url: SceneAddress | Hash | Url, property: string | Hash, playback: go.PLAYBACK, to: number | Vector3 | Vector4 | Quaternion, easing: Vector | go.EASING, duration: number, delay?: number, complete_function?: (self: unknown, url: Url, property: Hash) => void): void;
277
+ export function animate(url: SceneAddress | Hash | Url, property: string | Hash, playback: go.Playback, to: number | Vector3 | Vector4 | Quaternion, easing: Vector | go.Easing, duration: number): void;
278
+ /**
279
+ * This is only supported for numerical properties. If the node property is already being
280
+ * animated, that animation will be canceled and replaced by the new one.
281
+ * If a `complete_function` (lua function) is specified, that function will be called when the animation has completed.
282
+ * By starting a new animation in that function, several animations can be sequenced together. See the examples for more information.
283
+ * If you call `go.animate()` from a game object's `final()` function,
284
+ * any passed `complete_function` will be ignored and never called upon animation completion.
285
+ * See the properties guide for which properties can be animated and the animation guide for how
286
+ * them.
287
+ *
288
+ * @param url - url of the game object or component having the property
289
+ * @param property - id of the property to animate
290
+ * @param playback - playback mode of the animation
291
+ *
292
+ * - `go.PLAYBACK_ONCE_FORWARD`
293
+ * - `go.PLAYBACK_ONCE_BACKWARD`
294
+ * - `go.PLAYBACK_ONCE_PINGPONG`
295
+ * - `go.PLAYBACK_LOOP_FORWARD`
296
+ * - `go.PLAYBACK_LOOP_BACKWARD`
297
+ * - `go.PLAYBACK_LOOP_PINGPONG`
298
+ * @param to - target property value
299
+ * @param easing - easing to use during animation. Either specify a constant, see the animation guide for a complete list, or a vmath.vector with a curve
300
+ * @param duration - duration of the animation in seconds
301
+ * @param delay - delay before the animation starts in seconds
302
+ * @param complete_function - optional function to call when the animation has completed
303
+ *
304
+ * `self`
305
+ *
306
+ * script_instance The current script instance.
307
+ *
308
+ * `url`
309
+ *
310
+ * url The game object or component instance for which the property is animated.
311
+ *
312
+ * `property`
313
+ *
314
+ * hash The id of the animated property.
315
+ * @example
316
+ * Animate the position of a game object to x = 10 during 1 second, then y = 20 during 1 second:
317
+ * ```ts
318
+ * go.animate(go.get_id(), "position.x", go.PLAYBACK_ONCE_FORWARD, 10, go.EASING_LINEAR, 1, 0, () => {
319
+ * go.animate(go.get_id(), "position.y", go.PLAYBACK_ONCE_FORWARD, 20, go.EASING_LINEAR, 1);
320
+ * });
321
+ * ```
322
+ * @example
323
+ * Animate the y position of a game object using a crazy custom easing curve:
324
+ * ```ts
325
+ * const values = [
326
+ * 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
327
+ * 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
328
+ * 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
329
+ * 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
330
+ * ];
331
+ * const vec = vmath.vector(values);
332
+ * go.animate("go", "position.y", go.PLAYBACK_LOOP_PINGPONG, 100, vec, 2.0);
333
+ * ```
334
+ */
335
+ export function animate(url: SceneAddress | Hash | Url, property: string | Hash, playback: go.Playback, to: number | Vector3 | Vector4 | Quaternion, easing: Vector | go.Easing, duration: number, delay: number, complete_function?: (self: unknown, url: Url, property: Hash) => void): void;
280
336
  /**
281
337
  * By calling this function, all or specified stored property animations of the game object or component will be canceled.
282
338
  * See the properties guide for which properties can be animated and the animation guide for how to animate them.
@@ -335,7 +391,43 @@ declare global {
335
391
  * go.delete(ids, true);
336
392
  * ```
337
393
  */
338
- function _delete(id?: SceneGameObjectAddress | Hash | Url | (string | Hash | Url)[] | boolean, recursive?: boolean): void;
394
+ function _delete(id?: SceneGameObjectAddress | Hash | Url | (SceneGameObjectAddress | Hash | Url)[] | LuaPairsIterable<AnyNotNil, SceneGameObjectAddress | Hash | Url> | boolean): void;
395
+ /**
396
+ * Delete one or more game objects identified by id. Deletion is asynchronous meaning that
397
+ * the game object(s) are scheduled for deletion which will happen at the end of the current
398
+ * frame. Note that game objects scheduled for deletion will be counted against
399
+ * `max_instances` in "game.project" until they are actually removed.
400
+ * Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using `particlefx.stop()`.
401
+ * Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using `sound.stop()`.
402
+ *
403
+ * @param id - optional id or table of id's of the instance(s) to delete, the instance of the calling script is deleted by default
404
+ * @param recursive - optional boolean, set to true to recursively delete child hiearchy in child to parent order
405
+ * @example
406
+ * This example demonstrates how to delete game objects
407
+ * ```ts
408
+ * // Delete the script's own game object.
409
+ * go.delete();
410
+ * // Delete a game object with the id "my_game_object".
411
+ * const id = go.get_id("my_game_object"); // retrieve the id of the game object to be deleted
412
+ * go.delete(id);
413
+ * // Delete a list of game objects.
414
+ * const ids = [hash("/my_object_1"), hash("/my_object_2"), hash("/my_object_3")];
415
+ * go.delete(ids);
416
+ * ```
417
+ * @example
418
+ * This example demonstrates how to delete a game objects and their children (child to parent order)
419
+ * ```ts
420
+ * // Delete the script's own game object and its children.
421
+ * go.delete(true);
422
+ * // Delete a game object with the id "my_game_object" and its children.
423
+ * const id = go.get_id("my_game_object"); // retrieve the id of the game object to be deleted
424
+ * go.delete(id, true);
425
+ * // Delete a list of game objects and their children.
426
+ * const ids = [hash("/my_object_1"), hash("/my_object_2"), hash("/my_object_3")];
427
+ * go.delete(ids, true);
428
+ * ```
429
+ */
430
+ function _delete(id: SceneGameObjectAddress | Hash | Url | (SceneGameObjectAddress | Hash | Url)[] | LuaPairsIterable<AnyNotNil, SceneGameObjectAddress | Hash | Url>, recursive: boolean): void;
339
431
  /**
340
432
  * This function can check for game objects in any collection by specifying
341
433
  * the collection name in the URL.
@@ -355,36 +447,29 @@ declare global {
355
447
  */
356
448
  export function exists(url: SceneGameObjectAddress | Hash | Url): boolean;
357
449
  /**
358
- * This is a callback-function, which is called by the engine when a script component is finalized (destroyed). It can
359
- * be used to e.g. take some last action, report the finalization to other game object instances, delete spawned objects
360
- * or release user input focus (see release_input_focus).
450
+ * Returns or constructs an instance identifier. The instance id is a hash
451
+ * of the absolute path to the instance.
452
+ *
453
+ * - If `path` is specified, it can either be absolute or relative to the instance of the calling script.
454
+ * - If `path` is not specified, the id of the game object instance the script is attached to will be returned.
361
455
  *
362
- * @param self - script instance used for storing state
456
+ * @param path - path of the instance for which to return the id
457
+ * @returns instance id
363
458
  * @example
364
459
  * ```ts
365
- * export default defineScript({
366
- * init() {
367
- * return { some_value: 0 };
368
- * },
460
+ * // For the instance with path /my_sub_collection/my_instance, the following calls
461
+ * // are equivalent:
462
+ * const id = go.get_id(); // no path, defaults to the instance containing the calling script
463
+ * print(id); // => hash: [/my_sub_collection/my_instance]
369
464
  *
370
- * final(self) {
371
- * // report finalization
372
- * msg.post("my_friend_instance", "im_dead", { my_stats: self.some_value });
373
- * },
374
- * });
375
- * ```
376
- */
377
- export function final(self: unknown): void;
378
- /**
379
- * This is a callback-function, which is called by the engine at fixed intervals to update the state of a script
380
- * component. The function will be called if 'Fixed Update Frequency' is enabled in the Engine section of game.project.
381
- * It can for instance be used to update game logic with the physics simulation if using a fixed timestep for the
382
- * physics (enabled by ticking 'Use Fixed Timestep' in the Physics section of game.project).
465
+ * const id2 = go.get_id("/my_sub_collection/my_instance"); // absolute path
466
+ * print(id2); // => hash: [/my_sub_collection/my_instance]
383
467
  *
384
- * @param self - script instance used for storing state
385
- * @param dt - the time-step of the frame update
468
+ * const id3 = go.get_id("my_instance"); // relative path
469
+ * print(id3); // => hash: [/my_sub_collection/my_instance]
470
+ * ```
386
471
  */
387
- export function fixed_update(self: unknown, dt: number): void;
472
+ export function get_id(): Hash;
388
473
  /**
389
474
  * Returns or constructs an instance identifier. The instance id is a hash
390
475
  * of the absolute path to the instance.
@@ -408,7 +493,7 @@ declare global {
408
493
  * print(id3); // => hash: [/my_sub_collection/my_instance]
409
494
  * ```
410
495
  */
411
- export function get_id(path?: string): Hash;
496
+ export function get_id(path: string): Hash;
412
497
  /**
413
498
  * Get the parent for a game object instance.
414
499
  *
@@ -591,176 +676,6 @@ declare global {
591
676
  * ```
592
677
  */
593
678
  export function get_world_transform(id?: SceneGameObjectAddress | Hash | Url): Matrix4;
594
- /**
595
- * This is a callback-function, which is called by the engine when a script component is initialized. It can be used
596
- * to set the initial state of the script.
597
- *
598
- * @param self - script instance used for storing state
599
- * @example
600
- * ```ts
601
- * export default defineScript({
602
- * init() {
603
- * // set up useful data
604
- * return { my_value: 1 };
605
- * },
606
- * });
607
- * ```
608
- */
609
- export function init(self: unknown): void;
610
- /**
611
- * This is a callback-function, which is called by the engine at the end of the frame to update the state of a script
612
- * component. Use it to make final adjustments to the game object instance.
613
- *
614
- * @param self - script instance used for storing state
615
- * @param dt - the time-step of the frame update
616
- */
617
- export function late_update(self: unknown, dt: number): void;
618
- /**
619
- * This is a callback-function, which is called by the engine when user input is sent to the game object instance of the script.
620
- * It can be used to take action on the input, e.g. move the instance according to the input.
621
- * For an instance to obtain user input, it must first acquire input focus
622
- * through the message `acquire_input_focus`.
623
- * Any instance that has obtained input will be put on top of an
624
- * input stack. Input is sent to all listeners on the stack until the
625
- * end of stack is reached, or a listener returns `true`
626
- * to signal that it wants input to be consumed.
627
- * See the documentation of acquire_input_focus for more
628
- * information.
629
- *
630
- * @param self - script instance used for storing state
631
- * @param action_id - id of the received input action, as mapped in the input_binding-file, or `nil` for mouse movement
632
- * @param action - input data for the action. **0️⃣ `gamepad` is 0-based; passed to Defold unchanged.**
633
- * @returns optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false
634
- * @example
635
- * ```ts
636
- * // This example demonstrates how a game object instance can be moved as a response to user input.
637
- * export default defineScript({
638
- * init() {
639
- * // acquire input focus
640
- * msg.post(".", "acquire_input_focus");
641
- * return {
642
- * // maximum speed the instance can be moved
643
- * max_speed: 2,
644
- * // velocity of the instance, initially zero
645
- * velocity: vmath.vector3(),
646
- * };
647
- * },
648
- *
649
- * update(self, dt) {
650
- * // move the instance
651
- * go.set_position(go.get_position().add(self.velocity.mul(dt)));
652
- * },
653
- *
654
- * on_input(self, action_id, action) {
655
- * // check for movement input
656
- * if (action_id === hash("right")) {
657
- * if (action.released) {
658
- * // reset velocity if input was released
659
- * self.velocity = vmath.vector3();
660
- * } else {
661
- * // update velocity
662
- * self.velocity = vmath.vector3((action.value ?? 0) * self.max_speed, 0, 0);
663
- * }
664
- * }
665
- * },
666
- * });
667
- * ```
668
- */
669
- export function on_input(self: unknown, action_id: Hash | undefined, action: go.on_input.action): boolean | undefined;
670
- /**
671
- * This is a callback-function, which is called by the engine whenever a message has been sent to the script component.
672
- * It can be used to take action on the message, e.g. send a response back to the sender of the message.
673
- * The `message` parameter is a table containing the message data. If the message is sent from the engine, the
674
- * documentation of the message specifies which data is supplied.
675
- *
676
- * @param self - script instance used for storing state
677
- * @param message_id - id of the received message
678
- * @param message - a table containing the message data
679
- * @param sender - address of the sender
680
- * @example
681
- * This example demonstrates how a game object instance, called "a", can communicate with another instance, called "b". It
682
- * is assumed that both script components of the instances has id "script".
683
- * Script of instance "a":
684
- * ```ts
685
- * // This example demonstrates how a game object instance, called "a", can communicate with another instance, called "b". It
686
- * // is assumed that both script components of the instances has id "script".
687
- *
688
- * // a.script — Script of instance "a":
689
- * export default defineScript({
690
- * init() {
691
- * // let b know about some important data
692
- * msg.post("b#script", "my_data", { important_value: 1 });
693
- * },
694
- * });
695
- * ```
696
- * @example
697
- * Script of instance "b":
698
- * ```ts
699
- * // b.script — Script of instance "b":
700
- * export default defineScript({
701
- * init() {
702
- * // store the url of instance "a" for later use, by specifying undefined as socket we
703
- * // automatically use our own socket
704
- * return { a_url: msg.url(undefined, go.get_id("a"), "script"), important_value: 0 };
705
- * },
706
- *
707
- * on_message(self, message_id, message, sender) {
708
- * // check message and sender
709
- * if (message_id === hash("my_data") && sender === self.a_url && typeof message.important_value === "number") {
710
- * // use the data in some way
711
- * self.important_value = message.important_value;
712
- * }
713
- * },
714
- * });
715
- * ```
716
- */
717
- export function on_message(self: unknown, message_id: Hash, message: LuaMap<AnyNotNil, unknown> | Record<string, unknown>, sender: Url): void;
718
- /**
719
- * This is a callback-function, which is called by the engine when the script component is reloaded, e.g. from the editor.
720
- * It can be used for live development, e.g. to tweak constants or set up the state properly for the instance.
721
- *
722
- * @param self - script instance used for storing state
723
- * @example
724
- * ```ts
725
- * // This example demonstrates how to tweak the speed of a game object instance that is moved on user input.
726
- * export default defineScript({
727
- * init() {
728
- * // acquire input focus
729
- * msg.post(".", "acquire_input_focus");
730
- * return {
731
- * // maximum speed the instance can be moved, this value is tweaked in the on_reload function below
732
- * max_speed: 2,
733
- * // velocity of the instance, initially zero
734
- * velocity: vmath.vector3(),
735
- * };
736
- * },
737
- *
738
- * update(self, dt) {
739
- * // move the instance
740
- * go.set_position(go.get_position().add(self.velocity.mul(dt)));
741
- * },
742
- *
743
- * on_input(self, action_id, action) {
744
- * // check for movement input
745
- * if (action_id === hash("right")) {
746
- * if (action.released) {
747
- * // reset velocity if input was released
748
- * self.velocity = vmath.vector3();
749
- * } else {
750
- * // update velocity
751
- * self.velocity = vmath.vector3((action.value ?? 0) * self.max_speed, 0, 0);
752
- * }
753
- * }
754
- * },
755
- *
756
- * on_reload(self) {
757
- * // edit this value and reload the script component
758
- * self.max_speed = 100;
759
- * },
760
- * });
761
- * ```
762
- */
763
- export function on_reload(self: unknown): void;
764
679
  /**
765
680
  * Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent,
766
681
  * like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world
@@ -873,29 +788,6 @@ declare global {
873
788
  * ```
874
789
  */
875
790
  export function set_scale_xy(scale: number | Vector3, id?: SceneGameObjectAddress | Hash | Url): void;
876
- /**
877
- * This is a callback-function, which is called by the engine every frame to update the state of a script component.
878
- * It can be used to perform any kind of game related tasks, e.g. moving the game object instance.
879
- *
880
- * @param self - script instance used for storing state
881
- * @param dt - the time-step of the frame update
882
- * @example
883
- * ```ts
884
- * // This example demonstrates how to move a game object instance through the script component:
885
- * export default defineScript({
886
- * init() {
887
- * // set initial velocity to be 1 along world x-axis
888
- * return { my_velocity: vmath.vector3(1, 0, 0) };
889
- * },
890
- *
891
- * update(self, dt) {
892
- * // move the game object instance
893
- * go.set_position(go.get_position().add(self.my_velocity.mul(dt)));
894
- * },
895
- * });
896
- * ```
897
- */
898
- export function update(self: unknown, dt: number): void;
899
791
  /**
900
792
  * Recalculates and updates the cached world transform immediately for the target instance
901
793
  * and its ancestors (parent chain up to the collection root). Descendants (children) are
@@ -953,7 +845,7 @@ declare global {
953
845
  /**
954
846
  * Data supplied to the global `on_input` lifecycle function.
955
847
  */
956
- interface action {
848
+ interface Action {
957
849
  /**
958
850
  * Amount of input, usually 1 for buttons or between 0 and 1 for analogue input; absent for pointer movement and text input.
959
851
  */
@@ -1029,7 +921,7 @@ declare global {
1029
921
  /**
1030
922
  * Parsed guid information, supplied with a gamepad-connected action.
1031
923
  */
1032
- gamepad_guid_info?: go.on_input.gamepad_guid_info;
924
+ gamepad_guid_info?: go.on_input.GamepadGuidInfo;
1033
925
  /**
1034
926
  * Whether the input originated from an unknown or unmapped gamepad.
1035
927
  */
@@ -1053,7 +945,7 @@ declare global {
1053
945
  /**
1054
946
  * Touch inputs, one entry per finger.
1055
947
  */
1056
- touch?: go.on_input.touch[];
948
+ touch?: go.on_input.Touch[];
1057
949
  /**
1058
950
  * Text entered by a text action, or the current sequence for marked-text composition such as Japanese Kana.
1059
951
  */
@@ -1062,7 +954,7 @@ declare global {
1062
954
  /**
1063
955
  * Parsed fields from a connected gamepad guid.
1064
956
  */
1065
- interface gamepad_guid_info {
957
+ interface GamepadGuidInfo {
1066
958
  /**
1067
959
  * USB vendor id.
1068
960
  */
@@ -1087,7 +979,7 @@ declare global {
1087
979
  /**
1088
980
  * One touch entry in on_input.action.
1089
981
  */
1090
- interface touch {
982
+ interface Touch {
1091
983
  /**
1092
984
  * Identifier for the touch during its lifetime.
1093
985
  */
@@ -1138,7 +1030,7 @@ declare global {
1138
1030
  screen_dy: number;
1139
1031
  }
1140
1032
  }
1141
- export interface properties {
1033
+ export interface Properties {
1142
1034
  /**
1143
1035
  * The rotation of the game object expressed in Euler angles.
1144
1036
  * Euler angles are specified in degrees in the interval (-360, 360).
@@ -7,7 +7,7 @@ declare global {
7
7
  /**
8
8
  * Graphics adapter information
9
9
  */
10
- interface adapter_info {
10
+ interface AdapterInfo {
11
11
  /**
12
12
  * Adapter family name.
13
13
  */
@@ -23,7 +23,7 @@ declare global {
23
23
  /**
24
24
  * Hardware and driver limits.
25
25
  */
26
- limits: graphics.adapter_limits;
26
+ limits: graphics.AdapterLimits;
27
27
  /**
28
28
  * Driver-reported extension names.
29
29
  */
@@ -31,12 +31,12 @@ declare global {
31
31
  /**
32
32
  * Supported optional context features.
33
33
  */
34
- features: graphics.CONTEXT_FEATURE[];
34
+ features: graphics.ContextFeature[];
35
35
  }
36
36
  /**
37
37
  * Graphics context limits
38
38
  */
39
- interface adapter_limits {
39
+ interface AdapterLimits {
40
40
  /**
41
41
  * Maximum 2D texture dimension in texels.
42
42
  */
@@ -110,25 +110,23 @@ declare global {
110
110
  */
111
111
  max_storage_buffer_range: number;
112
112
  }
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;
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;
113
+ type BlendEquation = 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;
114
+ type BlendFactor = 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;
115
+ type BufferType = 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;
116
+ type CompareFunc = 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;
117
+ type CompressionType = 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;
118
+ type ContextFeature = 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;
119
+ type CoordinateSpace = typeof graphics.COORDINATE_SPACE_DEFAULT | typeof graphics.COORDINATE_SPACE_LOCAL | typeof graphics.COORDINATE_SPACE_WORLD;
120
+ type DataType = 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;
121
+ type FaceType = typeof graphics.FACE_TYPE_BACK | typeof graphics.FACE_TYPE_FRONT | typeof graphics.FACE_TYPE_FRONT_AND_BACK;
122
+ type SemanticType = 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;
123
+ 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;
124
+ type StencilOp = 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;
125
+ type TextureFilter = 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;
126
+ type TextureFormat = 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;
127
+ type TextureType = 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>;
128
+ type TextureUsageFlag = 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;
129
+ type TextureWrap = 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;
132
130
  const BLEND_EQUATION_ADD: number & { readonly __brand: "graphics.BLEND_EQUATION_ADD" };
133
131
  const BLEND_EQUATION_MAX: number & { readonly __brand: "graphics.BLEND_EQUATION_MAX" };
134
132
  const BLEND_EQUATION_MIN: number & { readonly __brand: "graphics.BLEND_EQUATION_MIN" };
@@ -600,7 +598,7 @@ declare global {
600
598
  *
601
599
  * @returns information about the active graphics adapter and context
602
600
  */
603
- function get_adapter_info(): graphics.adapter_info;
601
+ function get_adapter_info(): graphics.AdapterInfo;
604
602
  /**
605
603
  * get the list of graphics adapters that have been registered with the engine
606
604
  *