@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
@@ -0,0 +1,73 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Opaque } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Native-style access to the Bullet 3D world and collision objects owned by
7
+ * Defold. World creation, destruction and stepping remain controlled by Defold.
8
+ * The backend name refers to three-dimensional physics.
9
+ *
10
+ * World, collision-object and rigid-body userdata are borrowed handles to
11
+ * Defold-owned objects. Shape userdata are borrowed logical child-slot handles
12
+ * attached to a collision object. Constraint userdata identify auxiliary native
13
+ * objects owned by this Lua API; destroy them explicitly when no longer needed.
14
+ * They are also destroyed automatically when a required body or world is
15
+ * destroyed.
16
+ *
17
+ * A collision-object, rigid-body or shape handle becomes invalid when its
18
+ * collision object is deleted or reloaded. A world handle remains valid across
19
+ * collision-object reloads, but becomes invalid when its collection and physics
20
+ * world are destroyed. The corresponding `is_valid()` function is safe for
21
+ * checking a retained handle; every other operation rejects an invalid handle.
22
+ */
23
+ namespace bullet3d {
24
+ type BtCollisionObject = Opaque<"btCollisionObject" | "btRigidBody">;
25
+ type BtDiscreteDynamicsWorld = Opaque<"btDiscreteDynamicsWorld">;
26
+ type BtRigidBody = Opaque<"btRigidBody">;
27
+ /**
28
+ * Bullet version information
29
+ */
30
+ interface VersionInfo {
31
+ /**
32
+ * full Bullet version string
33
+ */
34
+ version: string;
35
+ /**
36
+ * compact numeric Bullet version
37
+ */
38
+ number: number;
39
+ /**
40
+ * major version number
41
+ */
42
+ major: number;
43
+ /**
44
+ * minor version number
45
+ */
46
+ minor: number;
47
+ }
48
+ /**
49
+ * Returns the id of the game object that owns the collision-object component.
50
+ * Accepts both rigid bodies and ghost trigger objects.
51
+ * Raises a Lua error if the handle is invalid or its game object has been deleted.
52
+ *
53
+ * @param object - the Bullet collision object
54
+ * @returns the game object id, or `nil` if the collision object has no associated game object
55
+ * @example
56
+ * ```ts
57
+ * const object = bullet3d.get_collision_object("#collisionobject");
58
+ * if (object !== undefined) {
59
+ * const id = bullet3d.get_gameobject_id(object);
60
+ * }
61
+ * ```
62
+ */
63
+ function get_gameobject_id(object: Opaque<"btCollisionObject" | "btRigidBody">): Hash | undefined;
64
+ /**
65
+ * Get the Bullet version
66
+ *
67
+ * @returns version information
68
+ */
69
+ function get_version(): bullet3d.VersionInfo;
70
+ }
71
+ }
72
+
73
+ export {};
@@ -0,0 +1,24 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Functions for controlling collection factory components which are
5
+ * used to dynamically spawn collections into the runtime.
6
+ */
7
+ namespace collectionfactory {
8
+ type Status = typeof collectionfactory.STATUS_LOADED | typeof collectionfactory.STATUS_LOADING | typeof collectionfactory.STATUS_UNLOADED;
9
+ /**
10
+ * The collection factory resources are loaded.
11
+ */
12
+ const STATUS_LOADED: number & { readonly __brand: "collectionfactory.STATUS_LOADED" };
13
+ /**
14
+ * The collection factory resources are loading.
15
+ */
16
+ const STATUS_LOADING: number & { readonly __brand: "collectionfactory.STATUS_LOADING" };
17
+ /**
18
+ * The collection factory resources are unloaded.
19
+ */
20
+ const STATUS_UNLOADED: number & { readonly __brand: "collectionfactory.STATUS_UNLOADED" };
21
+ }
22
+ }
23
+
24
+ export {};
@@ -0,0 +1,39 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Messages for controlling and interacting with collection proxies
5
+ * which are used to dynamically load collections into the runtime.
6
+ */
7
+ namespace collectionproxy {
8
+ /**
9
+ * Data delivered to a collectionproxy.load callback. The available
10
+ * field depends on the callback message identifier.
11
+ */
12
+ interface LoadData {
13
+ /**
14
+ * Loading progress from 0 to 1 for `proxy_loading`.
15
+ */
16
+ progress?: number;
17
+ /**
18
+ * Error code for `proxy_error`.
19
+ */
20
+ code?: number;
21
+ }
22
+ type TimeStepMode = 0 | 1;
23
+ type Result = typeof collectionproxy.RESULT_ALREADY_LOADED | typeof collectionproxy.RESULT_LOADING | typeof collectionproxy.RESULT_NOT_EXCLUDED;
24
+ /**
25
+ * The collection proxy is already loaded, so its collection cannot be changed.
26
+ */
27
+ const RESULT_ALREADY_LOADED: number & { readonly __brand: "collectionproxy.RESULT_ALREADY_LOADED" };
28
+ /**
29
+ * The collection proxy is loading, so its collection cannot be changed.
30
+ */
31
+ const RESULT_LOADING: number & { readonly __brand: "collectionproxy.RESULT_LOADING" };
32
+ /**
33
+ * The collection proxy is not excluded from the bundle; only excluded proxies can change collections.
34
+ */
35
+ const RESULT_NOT_EXCLUDED: number & { readonly __brand: "collectionproxy.RESULT_NOT_EXCLUDED" };
36
+ }
37
+ }
38
+
39
+ export {};
@@ -0,0 +1,24 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Functions for controlling factory components which are used to
5
+ * dynamically spawn game objects into the runtime.
6
+ */
7
+ namespace factory {
8
+ type Status = typeof factory.STATUS_LOADED | typeof factory.STATUS_LOADING | typeof factory.STATUS_UNLOADED;
9
+ /**
10
+ * The factory resources are loaded.
11
+ */
12
+ const STATUS_LOADED: number & { readonly __brand: "factory.STATUS_LOADED" };
13
+ /**
14
+ * The factory resources are loading.
15
+ */
16
+ const STATUS_LOADING: number & { readonly __brand: "factory.STATUS_LOADING" };
17
+ /**
18
+ * The factory resources are unloaded.
19
+ */
20
+ const STATUS_UNLOADED: number & { readonly __brand: "factory.STATUS_UNLOADED" };
21
+ }
22
+ }
23
+
24
+ export {};
@@ -0,0 +1,434 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Quaternion, Vector3 } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Game object API documentation
7
+ */
8
+ namespace go {
9
+ /**
10
+ * Options for accessing indexed or internal component properties with go.get and go.set.
11
+ */
12
+ interface PropertyOptions {
13
+ /**
14
+ * Index into an array property, starting at one.
15
+ */
16
+ index?: number;
17
+ /**
18
+ * Name of an internal property.
19
+ */
20
+ key?: Hash;
21
+ /**
22
+ * Internal component resources identified by key, such as particle FX emitters.
23
+ */
24
+ keys?: Hash[];
25
+ }
26
+ 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
+ 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;
28
+ /**
29
+ * in-back
30
+ */
31
+ const EASING_INBACK: number & { readonly __brand: "go.EASING_INBACK" };
32
+ /**
33
+ * in-bounce
34
+ */
35
+ const EASING_INBOUNCE: number & { readonly __brand: "go.EASING_INBOUNCE" };
36
+ /**
37
+ * in-circlic
38
+ */
39
+ const EASING_INCIRC: number & { readonly __brand: "go.EASING_INCIRC" };
40
+ /**
41
+ * in-cubic
42
+ */
43
+ const EASING_INCUBIC: number & { readonly __brand: "go.EASING_INCUBIC" };
44
+ /**
45
+ * in-elastic
46
+ */
47
+ const EASING_INELASTIC: number & { readonly __brand: "go.EASING_INELASTIC" };
48
+ /**
49
+ * in-exponential
50
+ */
51
+ const EASING_INEXPO: number & { readonly __brand: "go.EASING_INEXPO" };
52
+ /**
53
+ * in-out-back
54
+ */
55
+ const EASING_INOUTBACK: number & { readonly __brand: "go.EASING_INOUTBACK" };
56
+ /**
57
+ * in-out-bounce
58
+ */
59
+ const EASING_INOUTBOUNCE: number & { readonly __brand: "go.EASING_INOUTBOUNCE" };
60
+ /**
61
+ * in-out-circlic
62
+ */
63
+ const EASING_INOUTCIRC: number & { readonly __brand: "go.EASING_INOUTCIRC" };
64
+ /**
65
+ * in-out-cubic
66
+ */
67
+ const EASING_INOUTCUBIC: number & { readonly __brand: "go.EASING_INOUTCUBIC" };
68
+ /**
69
+ * in-out-elastic
70
+ */
71
+ const EASING_INOUTELASTIC: number & { readonly __brand: "go.EASING_INOUTELASTIC" };
72
+ /**
73
+ * in-out-exponential
74
+ */
75
+ const EASING_INOUTEXPO: number & { readonly __brand: "go.EASING_INOUTEXPO" };
76
+ /**
77
+ * in-out-quadratic
78
+ */
79
+ const EASING_INOUTQUAD: number & { readonly __brand: "go.EASING_INOUTQUAD" };
80
+ /**
81
+ * in-out-quartic
82
+ */
83
+ const EASING_INOUTQUART: number & { readonly __brand: "go.EASING_INOUTQUART" };
84
+ /**
85
+ * in-out-quintic
86
+ */
87
+ const EASING_INOUTQUINT: number & { readonly __brand: "go.EASING_INOUTQUINT" };
88
+ /**
89
+ * in-out-sine
90
+ */
91
+ const EASING_INOUTSINE: number & { readonly __brand: "go.EASING_INOUTSINE" };
92
+ /**
93
+ * in-quadratic
94
+ */
95
+ const EASING_INQUAD: number & { readonly __brand: "go.EASING_INQUAD" };
96
+ /**
97
+ * in-quartic
98
+ */
99
+ const EASING_INQUART: number & { readonly __brand: "go.EASING_INQUART" };
100
+ /**
101
+ * in-quintic
102
+ */
103
+ const EASING_INQUINT: number & { readonly __brand: "go.EASING_INQUINT" };
104
+ /**
105
+ * in-sine
106
+ */
107
+ const EASING_INSINE: number & { readonly __brand: "go.EASING_INSINE" };
108
+ /**
109
+ * linear interpolation
110
+ */
111
+ const EASING_LINEAR: number & { readonly __brand: "go.EASING_LINEAR" };
112
+ /**
113
+ * out-back
114
+ */
115
+ const EASING_OUTBACK: number & { readonly __brand: "go.EASING_OUTBACK" };
116
+ /**
117
+ * out-bounce
118
+ */
119
+ const EASING_OUTBOUNCE: number & { readonly __brand: "go.EASING_OUTBOUNCE" };
120
+ /**
121
+ * out-circlic
122
+ */
123
+ const EASING_OUTCIRC: number & { readonly __brand: "go.EASING_OUTCIRC" };
124
+ /**
125
+ * out-cubic
126
+ */
127
+ const EASING_OUTCUBIC: number & { readonly __brand: "go.EASING_OUTCUBIC" };
128
+ /**
129
+ * out-elastic
130
+ */
131
+ const EASING_OUTELASTIC: number & { readonly __brand: "go.EASING_OUTELASTIC" };
132
+ /**
133
+ * out-exponential
134
+ */
135
+ const EASING_OUTEXPO: number & { readonly __brand: "go.EASING_OUTEXPO" };
136
+ /**
137
+ * out-in-back
138
+ */
139
+ const EASING_OUTINBACK: number & { readonly __brand: "go.EASING_OUTINBACK" };
140
+ /**
141
+ * out-in-bounce
142
+ */
143
+ const EASING_OUTINBOUNCE: number & { readonly __brand: "go.EASING_OUTINBOUNCE" };
144
+ /**
145
+ * out-in-circlic
146
+ */
147
+ const EASING_OUTINCIRC: number & { readonly __brand: "go.EASING_OUTINCIRC" };
148
+ /**
149
+ * out-in-cubic
150
+ */
151
+ const EASING_OUTINCUBIC: number & { readonly __brand: "go.EASING_OUTINCUBIC" };
152
+ /**
153
+ * out-in-elastic
154
+ */
155
+ const EASING_OUTINELASTIC: number & { readonly __brand: "go.EASING_OUTINELASTIC" };
156
+ /**
157
+ * out-in-exponential
158
+ */
159
+ const EASING_OUTINEXPO: number & { readonly __brand: "go.EASING_OUTINEXPO" };
160
+ /**
161
+ * out-in-quadratic
162
+ */
163
+ const EASING_OUTINQUAD: number & { readonly __brand: "go.EASING_OUTINQUAD" };
164
+ /**
165
+ * out-in-quartic
166
+ */
167
+ const EASING_OUTINQUART: number & { readonly __brand: "go.EASING_OUTINQUART" };
168
+ /**
169
+ * out-in-quintic
170
+ */
171
+ const EASING_OUTINQUINT: number & { readonly __brand: "go.EASING_OUTINQUINT" };
172
+ /**
173
+ * out-in-sine
174
+ */
175
+ const EASING_OUTINSINE: number & { readonly __brand: "go.EASING_OUTINSINE" };
176
+ /**
177
+ * out-quadratic
178
+ */
179
+ const EASING_OUTQUAD: number & { readonly __brand: "go.EASING_OUTQUAD" };
180
+ /**
181
+ * out-quartic
182
+ */
183
+ const EASING_OUTQUART: number & { readonly __brand: "go.EASING_OUTQUART" };
184
+ /**
185
+ * out-quintic
186
+ */
187
+ const EASING_OUTQUINT: number & { readonly __brand: "go.EASING_OUTQUINT" };
188
+ /**
189
+ * out-sine
190
+ */
191
+ const EASING_OUTSINE: number & { readonly __brand: "go.EASING_OUTSINE" };
192
+ /**
193
+ * loop backward
194
+ */
195
+ const PLAYBACK_LOOP_BACKWARD: number & { readonly __brand: "go.PLAYBACK_LOOP_BACKWARD" };
196
+ /**
197
+ * loop forward
198
+ */
199
+ const PLAYBACK_LOOP_FORWARD: number & { readonly __brand: "go.PLAYBACK_LOOP_FORWARD" };
200
+ /**
201
+ * ping pong loop
202
+ */
203
+ const PLAYBACK_LOOP_PINGPONG: number & { readonly __brand: "go.PLAYBACK_LOOP_PINGPONG" };
204
+ /**
205
+ * no playback
206
+ */
207
+ const PLAYBACK_NONE: number & { readonly __brand: "go.PLAYBACK_NONE" };
208
+ /**
209
+ * once backward
210
+ */
211
+ const PLAYBACK_ONCE_BACKWARD: number & { readonly __brand: "go.PLAYBACK_ONCE_BACKWARD" };
212
+ /**
213
+ * once forward
214
+ */
215
+ const PLAYBACK_ONCE_FORWARD: number & { readonly __brand: "go.PLAYBACK_ONCE_FORWARD" };
216
+ /**
217
+ * once ping pong
218
+ */
219
+ const PLAYBACK_ONCE_PINGPONG: number & { readonly __brand: "go.PLAYBACK_ONCE_PINGPONG" };
220
+ namespace on_input {
221
+ /**
222
+ * Data supplied to the global `on_input` lifecycle function.
223
+ */
224
+ interface Action {
225
+ /**
226
+ * Amount of input, usually 1 for buttons or between 0 and 1 for analogue input; absent for pointer movement and text input.
227
+ */
228
+ value?: number;
229
+ /**
230
+ * Whether the input was pressed this frame; absent for pointer movement and text input.
231
+ */
232
+ pressed?: boolean;
233
+ /**
234
+ * Whether the input was released this frame; absent for pointer movement and text input.
235
+ */
236
+ released?: boolean;
237
+ /**
238
+ * Whether the input was repeated this frame; absent for pointer movement and text input.
239
+ */
240
+ repeated?: boolean;
241
+ /**
242
+ * Pointer x-coordinate; absent for gamepad, key, and text input.
243
+ */
244
+ x?: number;
245
+ /**
246
+ * Pointer y-coordinate; absent for gamepad, key, and text input.
247
+ */
248
+ y?: number;
249
+ /**
250
+ * Pointer x-coordinate in screen space; absent for gamepad, key, and text input.
251
+ */
252
+ screen_x?: number;
253
+ /**
254
+ * Pointer y-coordinate in screen space; absent for gamepad, key, and text input.
255
+ */
256
+ screen_y?: number;
257
+ /**
258
+ * Change in the pointer x-coordinate; absent for gamepad, key, and text input.
259
+ */
260
+ dx?: number;
261
+ /**
262
+ * Change in the pointer y-coordinate; absent for gamepad, key, and text input.
263
+ */
264
+ dy?: number;
265
+ /**
266
+ * Change in the pointer x-coordinate in screen space; absent for gamepad, key, and text input.
267
+ */
268
+ screen_dx?: number;
269
+ /**
270
+ * Change in the pointer y-coordinate in screen space; absent for gamepad, key, and text input.
271
+ */
272
+ screen_dy?: number;
273
+ /**
274
+ * Accelerometer x value, when present.
275
+ */
276
+ acc_x?: number;
277
+ /**
278
+ * Accelerometer y value, when present.
279
+ */
280
+ acc_y?: number;
281
+ /**
282
+ * Accelerometer z value, when present.
283
+ */
284
+ acc_z?: number;
285
+ /**
286
+ * Index of the gamepad that provided the input.
287
+ */
288
+ gamepad?: number;
289
+ /**
290
+ * Id of the user associated with the controller.
291
+ */
292
+ userid?: number;
293
+ /**
294
+ * SDL-compatible guid, supplied with a gamepad-connected action.
295
+ */
296
+ gamepad_guid?: string;
297
+ /**
298
+ * Parsed guid information, supplied with a gamepad-connected action.
299
+ */
300
+ gamepad_guid_info?: go.on_input.GamepadGuidInfo;
301
+ /**
302
+ * Whether the input originated from an unknown or unmapped gamepad.
303
+ */
304
+ gamepad_unknown?: boolean;
305
+ /**
306
+ * Name of a connected gamepad.
307
+ */
308
+ gamepad_name?: string;
309
+ /**
310
+ * Axis values, supplied only for raw gamepad input.
311
+ */
312
+ gamepad_axis?: number[];
313
+ /**
314
+ * Hat values, supplied only for raw gamepad input.
315
+ */
316
+ gamepad_hats?: number[];
317
+ /**
318
+ * Button values, supplied only for raw gamepad input.
319
+ */
320
+ gamepad_buttons?: number[];
321
+ /**
322
+ * Touch inputs, one entry per finger.
323
+ */
324
+ touch?: go.on_input.Touch[];
325
+ /**
326
+ * Text entered by a text action, or the current sequence for marked-text composition such as Japanese Kana.
327
+ */
328
+ text?: string;
329
+ }
330
+ /**
331
+ * Parsed fields from a connected gamepad guid.
332
+ */
333
+ interface GamepadGuidInfo {
334
+ /**
335
+ * USB vendor id.
336
+ */
337
+ vendor: number;
338
+ /**
339
+ * USB product id.
340
+ */
341
+ product: number;
342
+ /**
343
+ * Bus used to communicate with the device.
344
+ */
345
+ bus: number;
346
+ /**
347
+ * SDL CRC16 signature.
348
+ */
349
+ crc: number;
350
+ /**
351
+ * Device or firmware version.
352
+ */
353
+ version: number;
354
+ }
355
+ /**
356
+ * One touch entry in on_input.action.
357
+ */
358
+ interface Touch {
359
+ /**
360
+ * Identifier for the touch during its lifetime.
361
+ */
362
+ id: number;
363
+ /**
364
+ * Whether the finger was pressed this frame.
365
+ */
366
+ pressed: boolean;
367
+ /**
368
+ * Whether the finger was released this frame.
369
+ */
370
+ released: boolean;
371
+ /**
372
+ * Number of taps, such as one for a single tap and two for a double tap.
373
+ */
374
+ tap_count: number;
375
+ /**
376
+ * Touch x-coordinate.
377
+ */
378
+ x: number;
379
+ /**
380
+ * Touch y-coordinate.
381
+ */
382
+ y: number;
383
+ /**
384
+ * Touch x-coordinate in screen space.
385
+ */
386
+ screen_x: number;
387
+ /**
388
+ * Touch y-coordinate in screen space.
389
+ */
390
+ screen_y: number;
391
+ /**
392
+ * Change in the touch x-coordinate.
393
+ */
394
+ dx: number;
395
+ /**
396
+ * Change in the touch y-coordinate.
397
+ */
398
+ dy: number;
399
+ /**
400
+ * Change in the touch x-coordinate in screen space.
401
+ */
402
+ screen_dx: number;
403
+ /**
404
+ * Change in the touch y-coordinate in screen space.
405
+ */
406
+ screen_dy: number;
407
+ }
408
+ }
409
+ interface Properties {
410
+ /**
411
+ * The rotation of the game object expressed in Euler angles.
412
+ * Euler angles are specified in degrees in the interval (-360, 360).
413
+ * The type of the property is vector3.
414
+ */
415
+ euler: Vector3;
416
+ /**
417
+ * The position of the game object.
418
+ * The type of the property is vector3.
419
+ */
420
+ position: Vector3;
421
+ /**
422
+ * The rotation of the game object.
423
+ * The type of the property is quaternion.
424
+ */
425
+ rotation: Quaternion;
426
+ /**
427
+ * The scale of the game object. `go.get` returns a vector3; `go.set` and `go.animate` also take a number, which sets a uniform scale.
428
+ */
429
+ scale: number | Vector3;
430
+ }
431
+ }
432
+ }
433
+
434
+ export {};
@@ -0,0 +1,105 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Vector3, Vector4 } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Label API documentation
7
+ */
8
+ namespace label {
9
+ /**
10
+ * Rich-text layout object
11
+ */
12
+ interface LayoutObject {
13
+ /**
14
+ * object type, currently `link` or `sprite`
15
+ */
16
+ type: string;
17
+ /**
18
+ * the object's `id` attribute, or its generated layout object id
19
+ */
20
+ id: Hash;
21
+ /**
22
+ * zero-based UTF-32 offset in the visible text
23
+ */
24
+ text_offset: number;
25
+ /**
26
+ * visible UTF-32 text length covered by the object
27
+ */
28
+ text_length: number;
29
+ /**
30
+ * unscaled lower-left x-coordinate relative to the label's pivot
31
+ */
32
+ x: number;
33
+ /**
34
+ * unscaled lower-left y-coordinate relative to the label's pivot
35
+ */
36
+ y: number;
37
+ /**
38
+ * resolved object width
39
+ */
40
+ width: number;
41
+ /**
42
+ * resolved object height
43
+ */
44
+ height: number;
45
+ /**
46
+ * markup attributes keyed by name
47
+ */
48
+ attributes: LuaTable<string, string>;
49
+ }
50
+ interface Properties {
51
+ /**
52
+ * The color of the label. The type of the property is vector4.
53
+ */
54
+ color: Vector4;
55
+ /**
56
+ * The font used when rendering the label. The type of the property is hash.
57
+ */
58
+ font: Hash;
59
+ /**
60
+ * The leading of the label. This value is used to scale the line spacing of text.
61
+ * The type of the property is number.
62
+ */
63
+ leading: number;
64
+ /**
65
+ * The line break of the label.
66
+ * This value is used to adjust the vertical spacing of characters in the text.
67
+ * The type of the property is boolean.
68
+ */
69
+ line_break: boolean;
70
+ /**
71
+ * The material used when rendering the label. The type of the property is hash.
72
+ */
73
+ material: Hash;
74
+ /**
75
+ * The outline color of the label. The type of the property is vector4.
76
+ */
77
+ outline: Vector4;
78
+ /**
79
+ * 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.
80
+ */
81
+ scale: Vector3;
82
+ /**
83
+ * The shadow color of the label. The type of the property is vector4.
84
+ */
85
+ shadow: Vector4;
86
+ /**
87
+ * Returns the size of the label. The size will constrain the text if line break is enabled.
88
+ * The type of the property is vector3.
89
+ */
90
+ size: Vector3;
91
+ /**
92
+ * The text of the label.
93
+ */
94
+ text: string;
95
+ /**
96
+ * The tracking of the label.
97
+ * This value is used to adjust the vertical spacing of characters in the text.
98
+ * The type of the property is number.
99
+ */
100
+ tracking: number;
101
+ }
102
+ }
103
+ }
104
+
105
+ export {};