@defold-typescript/types 0.40.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 (224) hide show
  1. package/api-availability.json +3963 -772
  2. package/api-migrations.json +27 -0
  3. package/api-signatures.json +18069 -10240
  4. package/api-targets.json +448 -11
  5. package/examples/translations.json +560 -89
  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 +183 -20
  13. package/generated/b2d_world.d.ts +57 -63
  14. package/generated/buffer.d.ts +16 -15
  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 +29 -32
  23. package/generated/collectionfactory.d.ts +15 -18
  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 +235 -182
  37. package/generated/graphics.d.ts +335 -97
  38. package/generated/gui.d.ts +240 -471
  39. package/generated/html5.d.ts +2 -2
  40. package/generated/http.d.ts +28 -35
  41. package/generated/image.d.ts +105 -72
  42. package/generated/json.d.ts +34 -16
  43. package/generated/kinds/gui-script.d.ts +7 -0
  44. package/generated/kinds/render-script.d.ts +7 -0
  45. package/generated/kinds/script.d.ts +7 -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 +40 -39
  50. package/generated/particlefx.d.ts +19 -28
  51. package/generated/physics.d.ts +365 -133
  52. package/generated/profiler.d.ts +13 -23
  53. package/generated/render.d.ts +237 -297
  54. package/generated/resource.d.ts +664 -583
  55. package/generated/socket.d.ts +120 -133
  56. package/generated/sound.d.ts +62 -31
  57. package/generated/sprite.d.ts +31 -17
  58. package/generated/sys.d.ts +234 -190
  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 +1 -3
  63. package/generated/versions/defold-1.12.4/camera.d.ts +21 -21
  64. package/generated/versions/defold-1.12.4/collectionfactory.d.ts +9 -9
  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 +6 -12
  69. package/generated/versions/defold-1.12.4/gui.d.ts +77 -175
  70. package/generated/versions/defold-1.12.4/html5.d.ts +1 -1
  71. package/generated/versions/defold-1.12.4/http.d.ts +0 -13
  72. package/generated/versions/defold-1.12.4/image.d.ts +16 -33
  73. package/generated/versions/defold-1.12.4/index.d.ts +1 -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 +2 -10
  78. package/generated/versions/defold-1.12.4/particlefx.d.ts +2 -5
  79. package/generated/versions/defold-1.12.4/physics.d.ts +69 -67
  80. package/generated/versions/defold-1.12.4/profiler.d.ts +2 -5
  81. package/generated/versions/defold-1.12.4/render.d.ts +99 -128
  82. package/generated/versions/defold-1.12.4/resource.d.ts +120 -148
  83. package/generated/versions/defold-1.12.4/socket.d.ts +34 -60
  84. package/generated/versions/defold-1.12.4/sound.d.ts +8 -8
  85. package/generated/versions/defold-1.12.4/sprite.d.ts +15 -5
  86. package/generated/versions/defold-1.12.4/sys.d.ts +37 -71
  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 +0 -21
  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 +169 -8
  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 +1 -3
  96. package/generated/versions/defold-1.13.0/camera.d.ts +25 -25
  97. package/generated/versions/defold-1.13.0/collectionfactory.d.ts +9 -9
  98. package/generated/versions/defold-1.13.0/collectionproxy.d.ts +2 -2
  99. package/generated/versions/defold-1.13.0/compute.d.ts +0 -69
  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 +6 -12
  105. package/generated/versions/defold-1.13.0/graphics.d.ts +73 -37
  106. package/generated/versions/defold-1.13.0/gui.d.ts +77 -175
  107. package/generated/versions/defold-1.13.0/html5.d.ts +1 -1
  108. package/generated/versions/defold-1.13.0/http.d.ts +0 -13
  109. package/generated/versions/defold-1.13.0/image.d.ts +16 -33
  110. package/generated/versions/defold-1.13.0/index.d.ts +1 -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 +68 -106
  115. package/generated/versions/defold-1.13.0/model.d.ts +2 -10
  116. package/generated/versions/defold-1.13.0/particlefx.d.ts +2 -5
  117. package/generated/versions/defold-1.13.0/physics.d.ts +69 -67
  118. package/generated/versions/defold-1.13.0/profiler.d.ts +2 -5
  119. package/generated/versions/defold-1.13.0/render.d.ts +99 -128
  120. package/generated/versions/defold-1.13.0/resource.d.ts +126 -150
  121. package/generated/versions/defold-1.13.0/socket.d.ts +34 -60
  122. package/generated/versions/defold-1.13.0/sound.d.ts +8 -8
  123. package/generated/versions/defold-1.13.0/sprite.d.ts +15 -5
  124. package/generated/versions/defold-1.13.0/sys.d.ts +37 -71
  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 +0 -21
  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 +1 -21
  182. package/generated/window.d.ts +71 -71
  183. package/identity-vocabulary.json +561 -0
  184. package/index.d.ts +7 -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 +12 -2
  191. package/scripts/import-defold-release.ts +85 -24
  192. package/scripts/prose-constants.ts +77 -16
  193. package/scripts/regen.ts +391 -77
  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/core-types.ts +26 -3
  201. package/src/correction-pins.ts +49 -0
  202. package/src/doc-comment.ts +104 -11
  203. package/src/doc-corrections.ts +108 -0
  204. package/src/editor-vm-globals.d.ts +5 -2
  205. package/src/emit-dts.ts +2064 -281
  206. package/src/emit-messages.ts +52 -0
  207. package/src/example-store.ts +125 -14
  208. package/src/field-correction-coverage.ts +204 -0
  209. package/src/fnv1a.ts +16 -0
  210. package/src/go-overloads.d.ts +25 -6
  211. package/src/index-base-table.ts +145 -0
  212. package/src/index-slot-classifications.ts +588 -0
  213. package/src/index.ts +38 -5
  214. package/src/library-index-slot-classifications.ts +332 -0
  215. package/src/lifecycle.ts +61 -199
  216. package/src/luals-type-expr.ts +354 -0
  217. package/src/msg-overloads.d.ts +0 -1
  218. package/src/param-correction-provenance.ts +8 -11
  219. package/src/render-overloads.d.ts +0 -15
  220. package/src/return-correction-provenance.ts +58 -16
  221. package/src/sys-overloads.d.ts +48 -0
  222. package/src/vmath-overloads.d.ts +27 -1
  223. package/src/window-event-guard.d.ts +6 -9
  224. package/url-parameters.json +1 -2
@@ -48,7 +48,7 @@ declare global {
48
48
  * });
49
49
  * ```
50
50
  */
51
- function set_interaction_listener(callback?: (self: unknown) => void): void;
51
+ function set_interaction_listener(callback: ((self: unknown) => void) | undefined): void;
52
52
  }
53
53
  }
54
54
 
@@ -22,36 +22,23 @@ declare global {
22
22
  * table The response data. Contains the fields:
23
23
  *
24
24
  * - number `status`: the status of the response
25
- *
26
25
  * - string `response`: the response data (if not saved on disc)
27
- *
28
26
  * - table `headers`: all the returned headers (if status is 200 or 206)
29
- *
30
27
  * - string `path`: the stored path (if saved to disc)
31
- *
32
28
  * - string `error`: if any unforeseen errors occurred (e.g. file I/O)
33
- *
34
29
  * - number `bytes_received`: the amount of bytes received/sent for a request, only if option `report_progress` is true
35
- *
36
30
  * - number `bytes_total`: the total amount of bytes for a request, only if option `report_progress` is true
37
- *
38
31
  * - number `range_start`: the start offset into the requested file
39
- *
40
32
  * - number `range_end`: the end offset into the requested file (inclusive)
41
- *
42
33
  * - number `document_size`: the full size of the requested file
43
34
  * @param headers - optional table with custom headers
44
35
  * @param post_data - optional data to send
45
36
  * @param options - optional table with request parameters. Supported entries:
46
37
  *
47
38
  * - number `timeout`: timeout in seconds
48
- *
49
39
  * - string `path`: path on disc where to download the file. Only overwrites the path if status is 200. Path should be absolute
50
- *
51
40
  * - boolean `ignore_cache`: don't return cached data if we get a 304. Not available in HTML5 build
52
- *
53
41
  * - boolean `chunked_transfer`: use chunked transfer encoding for https requests larger than 16kb. Defaults to true. Not available in HTML5 build
54
- *
55
42
  * - boolean `report_progress`: when it is true, the amount of bytes sent and/or received for a request will be passed into the callback function
56
43
  * @example
57
44
  * ```ts
@@ -9,19 +9,19 @@ declare global {
9
9
  /**
10
10
  * luminance image type
11
11
  */
12
- const TYPE_LUMINANCE: number & { readonly __brand: "image.TYPE_LUMINANCE" };
12
+ const TYPE_LUMINANCE: string & { readonly __brand: "image.TYPE_LUMINANCE" };
13
13
  /**
14
14
  * luminance image type
15
15
  */
16
- const TYPE_LUMINANCE_ALPHA: number & { readonly __brand: "image.TYPE_LUMINANCE_ALPHA" };
16
+ const TYPE_LUMINANCE_ALPHA: string & { readonly __brand: "image.TYPE_LUMINANCE_ALPHA" };
17
17
  /**
18
18
  * RGB image type
19
19
  */
20
- const TYPE_RGB: number & { readonly __brand: "image.TYPE_RGB" };
20
+ const TYPE_RGB: string & { readonly __brand: "image.TYPE_RGB" };
21
21
  /**
22
22
  * RGBA image type
23
23
  */
24
- const TYPE_RGBA: number & { readonly __brand: "image.TYPE_RGBA" };
24
+ const TYPE_RGBA: string & { readonly __brand: "image.TYPE_RGBA" };
25
25
  /**
26
26
  * get the header of an .astc buffer
27
27
  *
@@ -29,15 +29,10 @@ declare global {
29
29
  * @returns header or `nil` if buffer is not a valid .astc. The header has these fields:
30
30
  *
31
31
  * - number `width`: image width
32
- *
33
32
  * - number `height`: image height
34
- *
35
33
  * - number `depth`: image depth
36
- *
37
34
  * - number `block_size_x`: block size x
38
- *
39
35
  * - number `block_size_y`: block size y
40
- *
41
36
  * - number `block_size_z`: block size z
42
37
  * @example
43
38
  * ```ts
@@ -63,19 +58,12 @@ declare global {
63
58
  * @returns object or `nil` if loading fails. The object is a table with the following fields:
64
59
  *
65
60
  * - number `width`: image width
66
- *
67
61
  * - number `height`: image height
68
- *
69
62
  * - constant `type`: image type
70
- *
71
- * - `image.TYPE_RGB`
72
- *
73
- * - `image.TYPE_RGBA`
74
- *
75
- * - `image.TYPE_LUMINANCE`
76
- *
77
- * - `image.TYPE_LUMINANCE_ALPHA`
78
- *
63
+ * - `image.TYPE_RGB`
64
+ * - `image.TYPE_RGBA`
65
+ * - `image.TYPE_LUMINANCE`
66
+ * - `image.TYPE_LUMINANCE_ALPHA`
79
67
  * - string `buffer`: the raw image data
80
68
  * @example
81
69
  * ```ts
@@ -103,19 +91,12 @@ declare global {
103
91
  * @returns object or `nil` if loading fails. The object is a table with the following fields:
104
92
  *
105
93
  * - number `width`: image width
106
- *
107
94
  * - number `height`: image height
108
- *
109
95
  * - constant `type`: image type
110
- *
111
- * - `image.TYPE_RGB`
112
- *
113
- * - `image.TYPE_RGBA`
114
- *
115
- * - `image.TYPE_LUMINANCE`
116
- *
117
- * - `image.TYPE_LUMINANCE_ALPHA`
118
- *
96
+ * - `image.TYPE_RGB`
97
+ * - `image.TYPE_RGBA`
98
+ * - `image.TYPE_LUMINANCE`
99
+ * - `image.TYPE_LUMINANCE_ALPHA`
119
100
  * - buffer `buffer`: the script buffer that holds the decompressed image data. See buffer.create how to use the buffer.
120
101
  * @example
121
102
  * ```ts
@@ -126,12 +107,14 @@ declare global {
126
107
  * response.response !== undefined
127
108
  * ? image.load_buffer(response.response, { flip_vertically: true })
128
109
  * : undefined;
129
- * if (img !== undefined) {
110
+ * // the engine registers a texture format only when the driver supports it
111
+ * const format = graphics.TEXTURE_FORMAT_RGBA;
112
+ * if (img !== undefined && format !== undefined) {
130
113
  * const tparams = {
131
114
  * width: img.width,
132
115
  * height: img.height,
133
116
  * type: graphics.TEXTURE_TYPE_2D,
134
- * format: graphics.TEXTURE_FORMAT_RGBA,
117
+ * format,
135
118
  * };
136
119
  *
137
120
  * const my_texture_id = resource.create_texture("/my_custom_texture.texturec", tparams, img.buffer);
@@ -52,5 +52,6 @@ import "../../../src/go-overloads";
52
52
  import "../../../src/component-properties";
53
53
  import "../../../src/render-overloads";
54
54
  import "../../../src/vmath-overloads";
55
+ import "../../../src/sys-overloads";
55
56
 
56
57
  export {};
@@ -18,8 +18,8 @@ declare global {
18
18
  * - boolean `decode_null_as_userdata`: whether to decode a JSON null value as json.null or nil (default is nil)
19
19
  * @returns decoded json
20
20
  * @example
21
+ * Converting a string containing JSON data into a Lua table:
21
22
  * ```ts
22
- * // Converting a string containing JSON data into a table:
23
23
  * export default defineScript({
24
24
  * init() {
25
25
  * const jsonstring = '{"persons":[{"name":"John Doe"},{"name":"Darth Vader"}]}';
@@ -27,8 +27,10 @@ declare global {
27
27
  * pprint(data);
28
28
  * },
29
29
  * });
30
- *
31
- * // Results in the following printout:
30
+ * ```
31
+ * @example
32
+ * Results in the following printout:
33
+ * ```ts
32
34
  * // {
33
35
  * // persons = {
34
36
  * // 1 = {
@@ -52,8 +54,8 @@ declare global {
52
54
  * - string `encode_empty_table_as_object`: whether to encode an empty table as an JSON object or array (default is object)
53
55
  * @returns encoded json
54
56
  * @example
57
+ * Convert a lua table to a JSON string:
55
58
  * ```ts
56
- * // Convert a table to a JSON string:
57
59
  * export default defineScript({
58
60
  * init() {
59
61
  * const tbl = {
@@ -63,8 +65,10 @@ declare global {
63
65
  * pprint(jsonstring);
64
66
  * },
65
67
  * });
66
- *
67
- * // Results in the following printout:
68
+ * ```
69
+ * @example
70
+ * Results in the following printout:
71
+ * ```ts
68
72
  * // {"persons":[{"name":"John Doe"},{"name":"Darth Vader"}]}
69
73
  * ```
70
74
  */
@@ -68,10 +68,9 @@ declare global {
68
68
  */
69
69
  outline: Vector4;
70
70
  /**
71
- * The scale of the label. The type of the property is number (uniform)
72
- * or vector3 (non uniform).
71
+ * The scale of the label. `go.get` returns and `go.set` takes a vector3; `go.animate` also takes a number, which sets a uniform scale.
73
72
  */
74
- scale: number | Vector3;
73
+ scale: Vector3;
75
74
  /**
76
75
  * The shadow color of the label. The type of the property is vector4.
77
76
  */
@@ -85,20 +85,22 @@ declare global {
85
85
  *
86
86
  * @returns Array of mounts
87
87
  * @example
88
+ * Output the current resource mounts
88
89
  * ```ts
89
- * // Output the current resource mounts
90
90
  * pprint("MOUNTS", liveupdate.get_mounts());
91
- *
92
- * // Give an output like:
91
+ * ```
92
+ * @example
93
+ * Give an output like:
94
+ * ```ts
93
95
  * // DEBUG:SCRIPT: MOUNTS,
94
96
  * // {
95
97
  * // 1 = {
96
- * // name = "liveupdate",
98
+ * // name = hash: [liveupdate],
97
99
  * // uri = "zip:/device/path/to/acchives/liveupdate.zip",
98
100
  * // priority = 5
99
101
  * // },
100
102
  * // 2 = {
101
- * // name = "_base",
103
+ * // name = hash: [_base],
102
104
  * // uri = "archive:build/default/game.dmanifest",
103
105
  * // priority = -10
104
106
  * // }
@@ -6,6 +6,74 @@ declare global {
6
6
  * Functions for interacting with materials.
7
7
  */
8
8
  namespace material {
9
+ /**
10
+ * Material constant type, for `material.set_constants`.
11
+ */
12
+ const CONSTANT_TYPE_NORMAL: number & { readonly __brand: "material.CONSTANT_TYPE_NORMAL" };
13
+ /**
14
+ * Material constant type, for `material.set_constants`.
15
+ */
16
+ const CONSTANT_TYPE_PROJECTION: number & { readonly __brand: "material.CONSTANT_TYPE_PROJECTION" };
17
+ /**
18
+ * Material constant type, for `material.set_constants`.
19
+ */
20
+ const CONSTANT_TYPE_PROJECTION_INVERSE: number & { readonly __brand: "material.CONSTANT_TYPE_PROJECTION_INVERSE" };
21
+ /**
22
+ * Material constant type, for `material.set_constants`.
23
+ */
24
+ const CONSTANT_TYPE_TEXTURE: number & { readonly __brand: "material.CONSTANT_TYPE_TEXTURE" };
25
+ /**
26
+ * Material constant type, for `material.set_constants`.
27
+ */
28
+ const CONSTANT_TYPE_TIME: number & { readonly __brand: "material.CONSTANT_TYPE_TIME" };
29
+ /**
30
+ * Material constant type, for `material.set_constants`.
31
+ */
32
+ const CONSTANT_TYPE_USER: number & { readonly __brand: "material.CONSTANT_TYPE_USER" };
33
+ /**
34
+ * Material constant type, for `material.set_constants`.
35
+ */
36
+ const CONSTANT_TYPE_USER_MATRIX4: number & { readonly __brand: "material.CONSTANT_TYPE_USER_MATRIX4" };
37
+ /**
38
+ * Material constant type, for `material.set_constants`.
39
+ */
40
+ const CONSTANT_TYPE_VIEW: number & { readonly __brand: "material.CONSTANT_TYPE_VIEW" };
41
+ /**
42
+ * Material constant type, for `material.set_constants`.
43
+ */
44
+ const CONSTANT_TYPE_VIEW_INVERSE: number & { readonly __brand: "material.CONSTANT_TYPE_VIEW_INVERSE" };
45
+ /**
46
+ * Material constant type, for `material.set_constants`.
47
+ */
48
+ const CONSTANT_TYPE_VIEWPROJ: number & { readonly __brand: "material.CONSTANT_TYPE_VIEWPROJ" };
49
+ /**
50
+ * Material constant type, for `material.set_constants`.
51
+ */
52
+ const CONSTANT_TYPE_VIEWPROJ_INVERSE: number & { readonly __brand: "material.CONSTANT_TYPE_VIEWPROJ_INVERSE" };
53
+ /**
54
+ * Material constant type, for `material.set_constants`.
55
+ */
56
+ const CONSTANT_TYPE_WORLD: number & { readonly __brand: "material.CONSTANT_TYPE_WORLD" };
57
+ /**
58
+ * Material constant type, for `material.set_constants`.
59
+ */
60
+ const CONSTANT_TYPE_WORLD_INVERSE: number & { readonly __brand: "material.CONSTANT_TYPE_WORLD_INVERSE" };
61
+ /**
62
+ * Material constant type, for `material.set_constants`.
63
+ */
64
+ const CONSTANT_TYPE_WORLDVIEW: number & { readonly __brand: "material.CONSTANT_TYPE_WORLDVIEW" };
65
+ /**
66
+ * Material constant type, for `material.set_constants`.
67
+ */
68
+ const CONSTANT_TYPE_WORLDVIEW_INVERSE: number & { readonly __brand: "material.CONSTANT_TYPE_WORLDVIEW_INVERSE" };
69
+ /**
70
+ * Material constant type, for `material.set_constants`.
71
+ */
72
+ const CONSTANT_TYPE_WORLDVIEWPROJ: number & { readonly __brand: "material.CONSTANT_TYPE_WORLDVIEWPROJ" };
73
+ /**
74
+ * Material constant type, for `material.set_constants`.
75
+ */
76
+ const CONSTANT_TYPE_WORLDVIEWPROJ_INVERSE: number & { readonly __brand: "material.CONSTANT_TYPE_WORLDVIEWPROJ_INVERSE" };
9
77
  /**
10
78
  * Returns a table of all the shader constants in the material. This function will return all the shader constants
11
79
  * that are used in both the vertex and the fragment shaders.
@@ -19,37 +87,21 @@ declare global {
19
87
  * number the type of the constant. Supported values:
20
88
  *
21
89
  * - `material.CONSTANT_TYPE_USER`
22
- *
23
90
  * - `material.CONSTANT_TYPE_USER_MATRIX4`
24
- *
25
91
  * - `material.CONSTANT_TYPE_VIEWPROJ`
26
- *
27
92
  * - `material.CONSTANT_TYPE_WORLD`
28
- *
29
93
  * - `material.CONSTANT_TYPE_TEXTURE`
30
- *
31
94
  * - `material.CONSTANT_TYPE_VIEW`
32
- *
33
95
  * - `material.CONSTANT_TYPE_PROJECTION`
34
- *
35
96
  * - `material.CONSTANT_TYPE_NORMAL`
36
- *
37
97
  * - `material.CONSTANT_TYPE_WORLDVIEW`
38
- *
39
98
  * - `material.CONSTANT_TYPE_WORLDVIEWPROJ`
40
- *
41
99
  * - `material.CONSTANT_TYPE_TIME`
42
- *
43
100
  * - `material.CONSTANT_TYPE_WORLD_INVERSE`
44
- *
45
101
  * - `material.CONSTANT_TYPE_VIEW_INVERSE`
46
- *
47
102
  * - `material.CONSTANT_TYPE_PROJECTION_INVERSE`
48
- *
49
103
  * - `material.CONSTANT_TYPE_VIEWPROJ_INVERSE`
50
- *
51
104
  * - `material.CONSTANT_TYPE_WORLDVIEW_INVERSE`
52
- *
53
105
  * - `material.CONSTANT_TYPE_WORLDVIEWPROJ_INVERSE`
54
106
  *
55
107
  * `value`
@@ -73,48 +125,34 @@ declare global {
73
125
  * number the u wrap mode of the texture sampler. Supported values:
74
126
  *
75
127
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
76
- *
77
128
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
78
- *
79
129
  * - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
80
- *
81
130
  * - `graphics.TEXTURE_WRAP_REPEAT`
82
131
  *
83
132
  * `v_wrap`
84
133
  * number the v wrap mode of the texture sampler. Supported values:
85
134
  *
86
135
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
87
- *
88
136
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
89
- *
90
137
  * - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
91
- *
92
138
  * - `graphics.TEXTURE_WRAP_REPEAT`
93
139
  *
94
140
  * `min_filter`
95
141
  * number the min filter mode of the texture sampler. Supported values:
96
142
  *
97
143
  * - `graphics.TEXTURE_FILTER_DEFAULT`
98
- *
99
144
  * - `graphics.TEXTURE_FILTER_NEAREST`
100
- *
101
145
  * - `graphics.TEXTURE_FILTER_LINEAR`
102
- *
103
146
  * - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST`
104
- *
105
147
  * - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR`
106
- *
107
148
  * - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST`
108
- *
109
149
  * - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR`
110
150
  *
111
151
  * `mag_filter`
112
152
  * number the mag filter mode of the texture sampler
113
153
  *
114
154
  * - `graphics.TEXTURE_FILTER_DEFAULT`
115
- *
116
155
  * - `graphics.TEXTURE_FILTER_NEAREST`
117
- *
118
156
  * - `graphics.TEXTURE_FILTER_LINEAR`
119
157
  *
120
158
  * `max_anisotropy`
@@ -147,28 +185,19 @@ declare global {
147
185
  * number the type of the texture. Supported values:
148
186
  *
149
187
  * - `graphics.TEXTURE_TYPE_2D`
150
- *
151
188
  * - `graphics.TEXTURE_TYPE_2D_ARRAY`
152
- *
153
189
  * - `graphics.TEXTURE_TYPE_CUBE_MAP`
154
- *
155
190
  * - `graphics.TEXTURE_TYPE_IMAGE_2D`
156
- *
157
191
  * - `graphics.TEXTURE_TYPE_3D`
158
- *
159
192
  * - `graphics.TEXTURE_TYPE_IMAGE_3D`
160
193
  *
161
194
  * `flags`
162
195
  * number the flags of the texture. This field is a bit mask of these supported flags:
163
196
  *
164
197
  * - `graphics.TEXTURE_USAGE_FLAG_SAMPLE`
165
- *
166
198
  * - `graphics.TEXTURE_USAGE_FLAG_MEMORYLESS`
167
- *
168
199
  * - `graphics.TEXTURE_USAGE_FLAG_STORAGE`
169
- *
170
200
  * - `graphics.TEXTURE_USAGE_FLAG_INPUT`
171
- *
172
201
  * - `graphics.TEXTURE_USAGE_FLAG_COLOR`
173
202
  * @example
174
203
  * ```ts
@@ -193,51 +222,33 @@ declare global {
193
222
  * number the data type of the vertex attribute. Supported values:
194
223
  *
195
224
  * - `graphics.DATA_TYPE_BYTE`
196
- *
197
225
  * - `graphics.DATA_TYPE_UNSIGNED_BYTE`
198
- *
199
226
  * - `graphics.DATA_TYPE_SHORT`
200
- *
201
227
  * - `graphics.DATA_TYPE_UNSIGNED_SHORT`
202
- *
203
228
  * - `graphics.DATA_TYPE_INT`
204
- *
205
229
  * - `graphics.DATA_TYPE_UNSIGNED_INT`
206
- *
207
230
  * - `graphics.DATA_TYPE_FLOAT`
208
231
  *
209
232
  * `coordinate_space`
210
233
  * number the coordinate space of the vertex attribute. Supported values:
211
234
  *
212
235
  * - `graphics.COORDINATE_SPACE_WORLD`
213
- *
214
236
  * - `graphics.COORDINATE_SPACE_LOCAL`
215
237
  *
216
238
  * `semantic_type`
217
239
  * number the semantic type of the vertex attribute. Supported values:
218
240
  *
219
241
  * - `graphics.SEMANTIC_TYPE_NONE`
220
- *
221
242
  * - `graphics.SEMANTIC_TYPE_POSITION`
222
- *
223
243
  * - `graphics.SEMANTIC_TYPE_TEXCOORD`
224
- *
225
244
  * - `graphics.SEMANTIC_TYPE_PAGE_INDEX`
226
- *
227
245
  * - `graphics.SEMANTIC_TYPE_COLOR`
228
- *
229
246
  * - `graphics.SEMANTIC_TYPE_NORMAL`
230
- *
231
247
  * - `graphics.SEMANTIC_TYPE_TANGENT`
232
- *
233
248
  * - `graphics.SEMANTIC_TYPE_WORLD_MATRIX`
234
- *
235
249
  * - `graphics.SEMANTIC_TYPE_NORMAL_MATRIX`
236
- *
237
250
  * - `graphics.SEMANTIC_TYPE_BONE_WEIGHTS`
238
- *
239
251
  * - `graphics.SEMANTIC_TYPE_BONE_INDICES`
240
- *
241
252
  * - `graphics.SEMANTIC_TYPE_TEXTURE_TRANSFORM_2D`
242
253
  * @example
243
254
  * ```ts
@@ -255,37 +266,21 @@ declare global {
255
266
  * number the type of the constant. Supported values:
256
267
  *
257
268
  * - `material.CONSTANT_TYPE_USER`
258
- *
259
269
  * - `material.CONSTANT_TYPE_USER_MATRIX4`
260
- *
261
270
  * - `material.CONSTANT_TYPE_VIEWPROJ`
262
- *
263
271
  * - `material.CONSTANT_TYPE_WORLD`
264
- *
265
272
  * - `material.CONSTANT_TYPE_TEXTURE`
266
- *
267
273
  * - `material.CONSTANT_TYPE_VIEW`
268
- *
269
274
  * - `material.CONSTANT_TYPE_PROJECTION`
270
- *
271
275
  * - `material.CONSTANT_TYPE_NORMAL`
272
- *
273
276
  * - `material.CONSTANT_TYPE_WORLDVIEW`
274
- *
275
277
  * - `material.CONSTANT_TYPE_WORLDVIEWPROJ`
276
- *
277
278
  * - `material.CONSTANT_TYPE_TIME`
278
- *
279
279
  * - `material.CONSTANT_TYPE_WORLD_INVERSE`
280
- *
281
280
  * - `material.CONSTANT_TYPE_VIEW_INVERSE`
282
- *
283
281
  * - `material.CONSTANT_TYPE_PROJECTION_INVERSE`
284
- *
285
282
  * - `material.CONSTANT_TYPE_VIEWPROJ_INVERSE`
286
- *
287
283
  * - `material.CONSTANT_TYPE_WORLDVIEW_INVERSE`
288
- *
289
284
  * - `material.CONSTANT_TYPE_WORLDVIEWPROJ_INVERSE`
290
285
  *
291
286
  * `value`
@@ -307,48 +302,34 @@ declare global {
307
302
  * number the u wrap mode of the texture sampler. Supported values:
308
303
  *
309
304
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
310
- *
311
305
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
312
- *
313
306
  * - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
314
- *
315
307
  * - `graphics.TEXTURE_WRAP_REPEAT`
316
308
  *
317
309
  * `v_wrap`
318
310
  * number the v wrap mode of the texture sampler. Supported values:
319
311
  *
320
312
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
321
- *
322
313
  * - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
323
- *
324
314
  * - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
325
- *
326
315
  * - `graphics.TEXTURE_WRAP_REPEAT`
327
316
  *
328
317
  * `min_filter`
329
318
  * number the min filter mode of the texture sampler. Supported values:
330
319
  *
331
320
  * - `graphics.TEXTURE_FILTER_DEFAULT`
332
- *
333
321
  * - `graphics.TEXTURE_FILTER_NEAREST`
334
- *
335
322
  * - `graphics.TEXTURE_FILTER_LINEAR`
336
- *
337
323
  * - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST`
338
- *
339
324
  * - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR`
340
- *
341
325
  * - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST`
342
- *
343
326
  * - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR`
344
327
  *
345
328
  * `mag_filter`
346
329
  * number the mag filter mode of the texture sampler
347
330
  *
348
331
  * - `graphics.TEXTURE_FILTER_DEFAULT`
349
- *
350
332
  * - `graphics.TEXTURE_FILTER_NEAREST`
351
- *
352
333
  * - `graphics.TEXTURE_FILTER_LINEAR`
353
334
  *
354
335
  * `max_anisotropy`
@@ -384,53 +365,34 @@ declare global {
384
365
  * number the data type of the vertex attribute. Supported values:
385
366
  *
386
367
  * - `graphics.DATA_TYPE_BYTE`
387
- *
388
368
  * - `graphics.DATA_TYPE_UNSIGNED_BYTE`
389
- *
390
369
  * - `graphics.DATA_TYPE_SHORT`
391
- *
392
370
  * - `graphics.DATA_TYPE_UNSIGNED_SHORT`
393
- *
394
371
  * - `graphics.DATA_TYPE_INT`
395
- *
396
372
  * - `graphics.DATA_TYPE_UNSIGNED_INT`
397
- *
398
373
  * - `graphics.DATA_TYPE_FLOAT`
399
374
  *
400
375
  * `coordinate_space`
401
376
  * number the coordinate space of the vertex attribute. Supported values:
402
377
  *
403
378
  * - `graphics.COORDINATE_SPACE_DEFAULT`
404
- *
405
379
  * - `graphics.COORDINATE_SPACE_WORLD`
406
- *
407
380
  * - `graphics.COORDINATE_SPACE_LOCAL`
408
381
  *
409
382
  * `semantic_type`
410
383
  * number the semantic type of the vertex attribute. Supported values:
411
384
  *
412
385
  * - `graphics.SEMANTIC_TYPE_NONE`
413
- *
414
386
  * - `graphics.SEMANTIC_TYPE_POSITION`
415
- *
416
387
  * - `graphics.SEMANTIC_TYPE_TEXCOORD`
417
- *
418
388
  * - `graphics.SEMANTIC_TYPE_PAGE_INDEX`
419
- *
420
389
  * - `graphics.SEMANTIC_TYPE_COLOR`
421
- *
422
390
  * - `graphics.SEMANTIC_TYPE_NORMAL`
423
- *
424
391
  * - `graphics.SEMANTIC_TYPE_TANGENT`
425
- *
426
392
  * - `graphics.SEMANTIC_TYPE_WORLD_MATRIX`
427
- *
428
393
  * - `graphics.SEMANTIC_TYPE_NORMAL_MATRIX`
429
- *
430
394
  * - `graphics.SEMANTIC_TYPE_BONE_WEIGHTS`
431
- *
432
395
  * - `graphics.SEMANTIC_TYPE_BONE_INDICES`
433
- *
434
396
  * - `graphics.SEMANTIC_TYPE_TEXTURE_TRANSFORM_2D`
435
397
  * @example
436
398
  * ```ts
@@ -97,7 +97,7 @@ declare global {
97
97
  * });
98
98
  * ```
99
99
  */
100
- function get_mesh_enabled(url: string | Hash | Url, mesh_id: string | Hash | Url): boolean;
100
+ function get_mesh_enabled(url: string | Hash | Url, mesh_id: string | Hash): boolean;
101
101
  /**
102
102
  * Plays an animation on a model component with specified playback
103
103
  * mode and parameters.
@@ -109,9 +109,7 @@ declare global {
109
109
  * animations that play with the following playback modes:
110
110
  *
111
111
  * - `go.PLAYBACK_ONCE_FORWARD`
112
- *
113
112
  * - `go.PLAYBACK_ONCE_BACKWARD`
114
- *
115
113
  * - `go.PLAYBACK_ONCE_PINGPONG`
116
114
  *
117
115
  * @param url - the model for which to play the animation
@@ -119,15 +117,10 @@ declare global {
119
117
  * @param playback - playback mode of the animation
120
118
  *
121
119
  * - `go.PLAYBACK_ONCE_FORWARD`
122
- *
123
120
  * - `go.PLAYBACK_ONCE_BACKWARD`
124
- *
125
121
  * - `go.PLAYBACK_ONCE_PINGPONG`
126
- *
127
122
  * - `go.PLAYBACK_LOOP_FORWARD`
128
- *
129
123
  * - `go.PLAYBACK_LOOP_BACKWARD`
130
- *
131
124
  * - `go.PLAYBACK_LOOP_PINGPONG`
132
125
  * @param play_properties - optional table with properties
133
126
  * Play properties table:
@@ -148,7 +141,6 @@ declare global {
148
141
  * table Information about the completion:
149
142
  *
150
143
  * - hash `animation_id` - the animation that was completed.
151
- *
152
144
  * - constant `playback` - the playback mode for the animation.
153
145
  *
154
146
  * `sender`
@@ -226,7 +218,7 @@ declare global {
226
218
  * });
227
219
  * ```
228
220
  */
229
- function set_mesh_enabled(url: string | Hash | Url, mesh_id: string | Hash | Url, enabled: boolean): void;
221
+ function set_mesh_enabled(url: string | Hash | Url, mesh_id: string | Hash, enabled: boolean): void;
230
222
  interface properties {
231
223
  /**
232
224
  * The current animation set on the component. The type of the property is hash.