@defold-typescript/types 0.51.0 → 0.52.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 (130) hide show
  1. package/api-availability.json +4 -58
  2. package/api-signatures.json +878 -1356
  3. package/api-targets.json +15 -5
  4. package/examples/translations.json +4 -56
  5. package/generated/b2d_world.d.ts +10 -10
  6. package/generated/buffer.d.ts +9 -9
  7. package/generated/bullet3d_collision_object.d.ts +1 -1
  8. package/generated/bullet3d_constraint.d.ts +109 -7
  9. package/generated/bullet3d_shape.d.ts +2 -2
  10. package/generated/go.d.ts +114 -220
  11. package/generated/graphics.d.ts +1 -0
  12. package/generated/gui.d.ts +148 -371
  13. package/generated/http.d.ts +2 -2
  14. package/generated/image.d.ts +55 -3
  15. package/generated/kinds/gui-script.d.ts +2 -0
  16. package/generated/kinds/render-script.d.ts +14 -15
  17. package/generated/liveupdate.d.ts +5 -1
  18. package/generated/material.d.ts +3 -3
  19. package/generated/particlefx.d.ts +20 -1
  20. package/generated/physics.d.ts +45 -1
  21. package/generated/render-script-modules/b2d.d.ts +711 -0
  22. package/generated/render-script-modules/bullet3d.d.ts +73 -0
  23. package/generated/render-script-modules/collectionfactory.d.ts +25 -0
  24. package/generated/render-script-modules/collectionproxy.d.ts +39 -0
  25. package/generated/render-script-modules/factory.d.ts +25 -0
  26. package/generated/render-script-modules/go.d.ts +436 -0
  27. package/generated/render-script-modules/label.d.ts +105 -0
  28. package/generated/render-script-modules/model.d.ts +89 -0
  29. package/generated/render-script-modules/particlefx.d.ts +59 -0
  30. package/generated/render-script-modules/physics.d.ts +333 -0
  31. package/generated/render-script-modules/resource.d.ts +1233 -0
  32. package/generated/render-script-modules/sound.d.ts +227 -0
  33. package/generated/render-script-modules/sprite.d.ts +68 -0
  34. package/generated/render-script-modules/tilemap.d.ts +43 -0
  35. package/generated/render.d.ts +134 -8
  36. package/generated/resource.d.ts +31 -10
  37. package/generated/sprite.d.ts +49 -1
  38. package/generated/sys.d.ts +70 -6
  39. package/generated/versions/defold-1.12.4/buffer.d.ts +8 -8
  40. package/generated/versions/defold-1.12.4/go.d.ts +115 -343
  41. package/generated/versions/defold-1.12.4/graphics.d.ts +1 -0
  42. package/generated/versions/defold-1.12.4/gui.d.ts +151 -513
  43. package/generated/versions/defold-1.12.4/http.d.ts +2 -2
  44. package/generated/versions/defold-1.12.4/image.d.ts +82 -2
  45. package/generated/versions/defold-1.12.4/index.d.ts +1 -0
  46. package/generated/versions/defold-1.12.4/liveupdate.d.ts +4 -0
  47. package/generated/versions/defold-1.12.4/particlefx.d.ts +22 -1
  48. package/generated/versions/defold-1.12.4/physics.d.ts +45 -1
  49. package/generated/versions/defold-1.12.4/render.d.ts +78 -2
  50. package/generated/versions/defold-1.12.4/resource.d.ts +43 -10
  51. package/generated/versions/defold-1.12.4/sprite.d.ts +58 -1
  52. package/generated/versions/defold-1.12.4/sys.d.ts +101 -6
  53. package/generated/versions/defold-1.12.4/vmath.d.ts +0 -24
  54. package/generated/versions/defold-1.13.0/buffer.d.ts +8 -8
  55. package/generated/versions/defold-1.13.0/go.d.ts +115 -370
  56. package/generated/versions/defold-1.13.0/graphics.d.ts +1 -0
  57. package/generated/versions/defold-1.13.0/gui.d.ts +151 -513
  58. package/generated/versions/defold-1.13.0/http.d.ts +2 -2
  59. package/generated/versions/defold-1.13.0/image.d.ts +82 -2
  60. package/generated/versions/defold-1.13.0/index.d.ts +1 -0
  61. package/generated/versions/defold-1.13.0/liveupdate.d.ts +4 -0
  62. package/generated/versions/defold-1.13.0/material.d.ts +3 -1
  63. package/generated/versions/defold-1.13.0/particlefx.d.ts +22 -1
  64. package/generated/versions/defold-1.13.0/physics.d.ts +45 -1
  65. package/generated/versions/defold-1.13.0/render.d.ts +142 -4
  66. package/generated/versions/defold-1.13.0/resource.d.ts +43 -10
  67. package/generated/versions/defold-1.13.0/sprite.d.ts +58 -1
  68. package/generated/versions/defold-1.13.0/sys.d.ts +101 -6
  69. package/generated/versions/defold-1.13.0/vmath.d.ts +0 -24
  70. package/generated/versions/defold-1.13.1/buffer.d.ts +8 -8
  71. package/generated/versions/defold-1.13.1/go.d.ts +115 -370
  72. package/generated/versions/defold-1.13.1/graphics.d.ts +1 -0
  73. package/generated/versions/defold-1.13.1/gui.d.ts +151 -529
  74. package/generated/versions/defold-1.13.1/http.d.ts +2 -2
  75. package/generated/versions/defold-1.13.1/image.d.ts +82 -2
  76. package/generated/versions/defold-1.13.1/index.d.ts +2 -0
  77. package/generated/versions/defold-1.13.1/liveupdate.d.ts +4 -0
  78. package/generated/versions/defold-1.13.1/material.d.ts +3 -1
  79. package/generated/versions/defold-1.13.1/particlefx.d.ts +22 -1
  80. package/generated/versions/defold-1.13.1/physics.d.ts +45 -1
  81. package/generated/versions/defold-1.13.1/render.d.ts +142 -4
  82. package/generated/versions/defold-1.13.1/resource.d.ts +43 -10
  83. package/generated/versions/defold-1.13.1/sprite.d.ts +58 -1
  84. package/generated/versions/defold-1.13.1/sys.d.ts +101 -6
  85. package/generated/versions/defold-1.13.1/vmath.d.ts +0 -24
  86. package/generated/versions/defold-1.13.2/b2d_world.d.ts +10 -10
  87. package/generated/versions/defold-1.13.2/buffer.d.ts +9 -9
  88. package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +1 -1
  89. package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +109 -7
  90. package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +2 -2
  91. package/generated/versions/defold-1.13.2/go.d.ts +114 -220
  92. package/generated/versions/defold-1.13.2/graphics.d.ts +1 -0
  93. package/generated/versions/defold-1.13.2/gui.d.ts +148 -371
  94. package/generated/versions/defold-1.13.2/http.d.ts +2 -2
  95. package/generated/versions/defold-1.13.2/image.d.ts +55 -3
  96. package/generated/versions/defold-1.13.2/index.d.ts +2 -0
  97. package/generated/versions/defold-1.13.2/liveupdate.d.ts +5 -1
  98. package/generated/versions/defold-1.13.2/material.d.ts +3 -3
  99. package/generated/versions/defold-1.13.2/particlefx.d.ts +20 -1
  100. package/generated/versions/defold-1.13.2/physics.d.ts +45 -1
  101. package/generated/versions/defold-1.13.2/render.d.ts +123 -7
  102. package/generated/versions/defold-1.13.2/resource.d.ts +31 -10
  103. package/generated/versions/defold-1.13.2/sprite.d.ts +49 -1
  104. package/generated/versions/defold-1.13.2/sys.d.ts +70 -6
  105. package/generated/versions/defold-1.13.2/vmath.d.ts +0 -24
  106. package/generated/vmath.d.ts +0 -24
  107. package/identity-vocabulary.json +52 -7
  108. package/index.d.ts +2 -0
  109. package/package.json +2 -1
  110. package/scripts/generate-api-availability.ts +1 -21
  111. package/scripts/generate-api-signatures.ts +75 -14
  112. package/scripts/materialize-version.ts +48 -7
  113. package/scripts/regen.ts +214 -19
  114. package/scripts/signature-store-fs.ts +1 -0
  115. package/scripts/target-version.ts +26 -0
  116. package/src/api-doc.ts +26 -0
  117. package/src/component-properties.d.ts +89 -0
  118. package/src/core-types.ts +42 -15
  119. package/src/doc-corrections.ts +53 -5
  120. package/src/emit-dts.ts +758 -198
  121. package/src/engine-globals.d.ts +5 -1
  122. package/src/go-overloads.d.ts +68 -13
  123. package/src/gui-overloads.d.ts +489 -0
  124. package/src/gui-texture-removal.d.ts +41 -0
  125. package/src/index.ts +2 -0
  126. package/src/lifecycle.ts +30 -21
  127. package/src/msg-overloads.d.ts +25 -13
  128. package/src/signature-store.ts +50 -0
  129. package/src/timers.d.ts +2 -1
  130. 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 version_info {
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.version_info;
70
+ }
71
+ }
72
+
73
+ export {};
@@ -0,0 +1,25 @@
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_UNLOADED | typeof collectionfactory.STATUS_LOADING | typeof collectionfactory.STATUS_LOADED;
9
+ type STATUS = typeof collectionfactory.STATUS_LOADED | typeof collectionfactory.STATUS_LOADING | typeof collectionfactory.STATUS_UNLOADED;
10
+ /**
11
+ * The collection factory resources are loaded.
12
+ */
13
+ const STATUS_LOADED: number & { readonly __brand: "collectionfactory.STATUS_LOADED" };
14
+ /**
15
+ * The collection factory resources are loading.
16
+ */
17
+ const STATUS_LOADING: number & { readonly __brand: "collectionfactory.STATUS_LOADING" };
18
+ /**
19
+ * The collection factory resources are unloaded.
20
+ */
21
+ const STATUS_UNLOADED: number & { readonly __brand: "collectionfactory.STATUS_UNLOADED" };
22
+ }
23
+ }
24
+
25
+ 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 load_data {
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 TIME_STEP_MODE = 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,25 @@
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_UNLOADED | typeof factory.STATUS_LOADING | typeof factory.STATUS_LOADED;
9
+ type STATUS = typeof factory.STATUS_LOADED | typeof factory.STATUS_LOADING | typeof factory.STATUS_UNLOADED;
10
+ /**
11
+ * The factory resources are loaded.
12
+ */
13
+ const STATUS_LOADED: number & { readonly __brand: "factory.STATUS_LOADED" };
14
+ /**
15
+ * The factory resources are loading.
16
+ */
17
+ const STATUS_LOADING: number & { readonly __brand: "factory.STATUS_LOADING" };
18
+ /**
19
+ * The factory resources are unloaded.
20
+ */
21
+ const STATUS_UNLOADED: number & { readonly __brand: "factory.STATUS_UNLOADED" };
22
+ }
23
+ }
24
+
25
+ export {};
@@ -0,0 +1,436 @@
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 property_options {
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_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
+ 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
+ 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
+ /**
31
+ * in-back
32
+ */
33
+ const EASING_INBACK: number & { readonly __brand: "go.EASING_INBACK" };
34
+ /**
35
+ * in-bounce
36
+ */
37
+ const EASING_INBOUNCE: number & { readonly __brand: "go.EASING_INBOUNCE" };
38
+ /**
39
+ * in-circlic
40
+ */
41
+ const EASING_INCIRC: number & { readonly __brand: "go.EASING_INCIRC" };
42
+ /**
43
+ * in-cubic
44
+ */
45
+ const EASING_INCUBIC: number & { readonly __brand: "go.EASING_INCUBIC" };
46
+ /**
47
+ * in-elastic
48
+ */
49
+ const EASING_INELASTIC: number & { readonly __brand: "go.EASING_INELASTIC" };
50
+ /**
51
+ * in-exponential
52
+ */
53
+ const EASING_INEXPO: number & { readonly __brand: "go.EASING_INEXPO" };
54
+ /**
55
+ * in-out-back
56
+ */
57
+ const EASING_INOUTBACK: number & { readonly __brand: "go.EASING_INOUTBACK" };
58
+ /**
59
+ * in-out-bounce
60
+ */
61
+ const EASING_INOUTBOUNCE: number & { readonly __brand: "go.EASING_INOUTBOUNCE" };
62
+ /**
63
+ * in-out-circlic
64
+ */
65
+ const EASING_INOUTCIRC: number & { readonly __brand: "go.EASING_INOUTCIRC" };
66
+ /**
67
+ * in-out-cubic
68
+ */
69
+ const EASING_INOUTCUBIC: number & { readonly __brand: "go.EASING_INOUTCUBIC" };
70
+ /**
71
+ * in-out-elastic
72
+ */
73
+ const EASING_INOUTELASTIC: number & { readonly __brand: "go.EASING_INOUTELASTIC" };
74
+ /**
75
+ * in-out-exponential
76
+ */
77
+ const EASING_INOUTEXPO: number & { readonly __brand: "go.EASING_INOUTEXPO" };
78
+ /**
79
+ * in-out-quadratic
80
+ */
81
+ const EASING_INOUTQUAD: number & { readonly __brand: "go.EASING_INOUTQUAD" };
82
+ /**
83
+ * in-out-quartic
84
+ */
85
+ const EASING_INOUTQUART: number & { readonly __brand: "go.EASING_INOUTQUART" };
86
+ /**
87
+ * in-out-quintic
88
+ */
89
+ const EASING_INOUTQUINT: number & { readonly __brand: "go.EASING_INOUTQUINT" };
90
+ /**
91
+ * in-out-sine
92
+ */
93
+ const EASING_INOUTSINE: number & { readonly __brand: "go.EASING_INOUTSINE" };
94
+ /**
95
+ * in-quadratic
96
+ */
97
+ const EASING_INQUAD: number & { readonly __brand: "go.EASING_INQUAD" };
98
+ /**
99
+ * in-quartic
100
+ */
101
+ const EASING_INQUART: number & { readonly __brand: "go.EASING_INQUART" };
102
+ /**
103
+ * in-quintic
104
+ */
105
+ const EASING_INQUINT: number & { readonly __brand: "go.EASING_INQUINT" };
106
+ /**
107
+ * in-sine
108
+ */
109
+ const EASING_INSINE: number & { readonly __brand: "go.EASING_INSINE" };
110
+ /**
111
+ * linear interpolation
112
+ */
113
+ const EASING_LINEAR: number & { readonly __brand: "go.EASING_LINEAR" };
114
+ /**
115
+ * out-back
116
+ */
117
+ const EASING_OUTBACK: number & { readonly __brand: "go.EASING_OUTBACK" };
118
+ /**
119
+ * out-bounce
120
+ */
121
+ const EASING_OUTBOUNCE: number & { readonly __brand: "go.EASING_OUTBOUNCE" };
122
+ /**
123
+ * out-circlic
124
+ */
125
+ const EASING_OUTCIRC: number & { readonly __brand: "go.EASING_OUTCIRC" };
126
+ /**
127
+ * out-cubic
128
+ */
129
+ const EASING_OUTCUBIC: number & { readonly __brand: "go.EASING_OUTCUBIC" };
130
+ /**
131
+ * out-elastic
132
+ */
133
+ const EASING_OUTELASTIC: number & { readonly __brand: "go.EASING_OUTELASTIC" };
134
+ /**
135
+ * out-exponential
136
+ */
137
+ const EASING_OUTEXPO: number & { readonly __brand: "go.EASING_OUTEXPO" };
138
+ /**
139
+ * out-in-back
140
+ */
141
+ const EASING_OUTINBACK: number & { readonly __brand: "go.EASING_OUTINBACK" };
142
+ /**
143
+ * out-in-bounce
144
+ */
145
+ const EASING_OUTINBOUNCE: number & { readonly __brand: "go.EASING_OUTINBOUNCE" };
146
+ /**
147
+ * out-in-circlic
148
+ */
149
+ const EASING_OUTINCIRC: number & { readonly __brand: "go.EASING_OUTINCIRC" };
150
+ /**
151
+ * out-in-cubic
152
+ */
153
+ const EASING_OUTINCUBIC: number & { readonly __brand: "go.EASING_OUTINCUBIC" };
154
+ /**
155
+ * out-in-elastic
156
+ */
157
+ const EASING_OUTINELASTIC: number & { readonly __brand: "go.EASING_OUTINELASTIC" };
158
+ /**
159
+ * out-in-exponential
160
+ */
161
+ const EASING_OUTINEXPO: number & { readonly __brand: "go.EASING_OUTINEXPO" };
162
+ /**
163
+ * out-in-quadratic
164
+ */
165
+ const EASING_OUTINQUAD: number & { readonly __brand: "go.EASING_OUTINQUAD" };
166
+ /**
167
+ * out-in-quartic
168
+ */
169
+ const EASING_OUTINQUART: number & { readonly __brand: "go.EASING_OUTINQUART" };
170
+ /**
171
+ * out-in-quintic
172
+ */
173
+ const EASING_OUTINQUINT: number & { readonly __brand: "go.EASING_OUTINQUINT" };
174
+ /**
175
+ * out-in-sine
176
+ */
177
+ const EASING_OUTINSINE: number & { readonly __brand: "go.EASING_OUTINSINE" };
178
+ /**
179
+ * out-quadratic
180
+ */
181
+ const EASING_OUTQUAD: number & { readonly __brand: "go.EASING_OUTQUAD" };
182
+ /**
183
+ * out-quartic
184
+ */
185
+ const EASING_OUTQUART: number & { readonly __brand: "go.EASING_OUTQUART" };
186
+ /**
187
+ * out-quintic
188
+ */
189
+ const EASING_OUTQUINT: number & { readonly __brand: "go.EASING_OUTQUINT" };
190
+ /**
191
+ * out-sine
192
+ */
193
+ const EASING_OUTSINE: number & { readonly __brand: "go.EASING_OUTSINE" };
194
+ /**
195
+ * loop backward
196
+ */
197
+ const PLAYBACK_LOOP_BACKWARD: number & { readonly __brand: "go.PLAYBACK_LOOP_BACKWARD" };
198
+ /**
199
+ * loop forward
200
+ */
201
+ const PLAYBACK_LOOP_FORWARD: number & { readonly __brand: "go.PLAYBACK_LOOP_FORWARD" };
202
+ /**
203
+ * ping pong loop
204
+ */
205
+ const PLAYBACK_LOOP_PINGPONG: number & { readonly __brand: "go.PLAYBACK_LOOP_PINGPONG" };
206
+ /**
207
+ * no playback
208
+ */
209
+ const PLAYBACK_NONE: number & { readonly __brand: "go.PLAYBACK_NONE" };
210
+ /**
211
+ * once backward
212
+ */
213
+ const PLAYBACK_ONCE_BACKWARD: number & { readonly __brand: "go.PLAYBACK_ONCE_BACKWARD" };
214
+ /**
215
+ * once forward
216
+ */
217
+ const PLAYBACK_ONCE_FORWARD: number & { readonly __brand: "go.PLAYBACK_ONCE_FORWARD" };
218
+ /**
219
+ * once ping pong
220
+ */
221
+ const PLAYBACK_ONCE_PINGPONG: number & { readonly __brand: "go.PLAYBACK_ONCE_PINGPONG" };
222
+ namespace on_input {
223
+ /**
224
+ * Data supplied to the global `on_input` lifecycle function.
225
+ */
226
+ interface action {
227
+ /**
228
+ * Amount of input, usually 1 for buttons or between 0 and 1 for analogue input; absent for pointer movement and text input.
229
+ */
230
+ value?: number;
231
+ /**
232
+ * Whether the input was pressed this frame; absent for pointer movement and text input.
233
+ */
234
+ pressed?: boolean;
235
+ /**
236
+ * Whether the input was released this frame; absent for pointer movement and text input.
237
+ */
238
+ released?: boolean;
239
+ /**
240
+ * Whether the input was repeated this frame; absent for pointer movement and text input.
241
+ */
242
+ repeated?: boolean;
243
+ /**
244
+ * Pointer x-coordinate; absent for gamepad, key, and text input.
245
+ */
246
+ x?: number;
247
+ /**
248
+ * Pointer y-coordinate; absent for gamepad, key, and text input.
249
+ */
250
+ y?: number;
251
+ /**
252
+ * Pointer x-coordinate in screen space; absent for gamepad, key, and text input.
253
+ */
254
+ screen_x?: number;
255
+ /**
256
+ * Pointer y-coordinate in screen space; absent for gamepad, key, and text input.
257
+ */
258
+ screen_y?: number;
259
+ /**
260
+ * Change in the pointer x-coordinate; absent for gamepad, key, and text input.
261
+ */
262
+ dx?: number;
263
+ /**
264
+ * Change in the pointer y-coordinate; absent for gamepad, key, and text input.
265
+ */
266
+ dy?: number;
267
+ /**
268
+ * Change in the pointer x-coordinate in screen space; absent for gamepad, key, and text input.
269
+ */
270
+ screen_dx?: number;
271
+ /**
272
+ * Change in the pointer y-coordinate in screen space; absent for gamepad, key, and text input.
273
+ */
274
+ screen_dy?: number;
275
+ /**
276
+ * Accelerometer x value, when present.
277
+ */
278
+ acc_x?: number;
279
+ /**
280
+ * Accelerometer y value, when present.
281
+ */
282
+ acc_y?: number;
283
+ /**
284
+ * Accelerometer z value, when present.
285
+ */
286
+ acc_z?: number;
287
+ /**
288
+ * Index of the gamepad that provided the input.
289
+ */
290
+ gamepad?: number;
291
+ /**
292
+ * Id of the user associated with the controller.
293
+ */
294
+ userid?: number;
295
+ /**
296
+ * SDL-compatible guid, supplied with a gamepad-connected action.
297
+ */
298
+ gamepad_guid?: string;
299
+ /**
300
+ * Parsed guid information, supplied with a gamepad-connected action.
301
+ */
302
+ gamepad_guid_info?: go.on_input.gamepad_guid_info;
303
+ /**
304
+ * Whether the input originated from an unknown or unmapped gamepad.
305
+ */
306
+ gamepad_unknown?: boolean;
307
+ /**
308
+ * Name of a connected gamepad.
309
+ */
310
+ gamepad_name?: string;
311
+ /**
312
+ * Axis values, supplied only for raw gamepad input.
313
+ */
314
+ gamepad_axis?: number[];
315
+ /**
316
+ * Hat values, supplied only for raw gamepad input.
317
+ */
318
+ gamepad_hats?: number[];
319
+ /**
320
+ * Button values, supplied only for raw gamepad input.
321
+ */
322
+ gamepad_buttons?: number[];
323
+ /**
324
+ * Touch inputs, one entry per finger.
325
+ */
326
+ touch?: go.on_input.touch[];
327
+ /**
328
+ * Text entered by a text action, or the current sequence for marked-text composition such as Japanese Kana.
329
+ */
330
+ text?: string;
331
+ }
332
+ /**
333
+ * Parsed fields from a connected gamepad guid.
334
+ */
335
+ interface gamepad_guid_info {
336
+ /**
337
+ * USB vendor id.
338
+ */
339
+ vendor: number;
340
+ /**
341
+ * USB product id.
342
+ */
343
+ product: number;
344
+ /**
345
+ * Bus used to communicate with the device.
346
+ */
347
+ bus: number;
348
+ /**
349
+ * SDL CRC16 signature.
350
+ */
351
+ crc: number;
352
+ /**
353
+ * Device or firmware version.
354
+ */
355
+ version: number;
356
+ }
357
+ /**
358
+ * One touch entry in on_input.action.
359
+ */
360
+ interface touch {
361
+ /**
362
+ * Identifier for the touch during its lifetime.
363
+ */
364
+ id: number;
365
+ /**
366
+ * Whether the finger was pressed this frame.
367
+ */
368
+ pressed: boolean;
369
+ /**
370
+ * Whether the finger was released this frame.
371
+ */
372
+ released: boolean;
373
+ /**
374
+ * Number of taps, such as one for a single tap and two for a double tap.
375
+ */
376
+ tap_count: number;
377
+ /**
378
+ * Touch x-coordinate.
379
+ */
380
+ x: number;
381
+ /**
382
+ * Touch y-coordinate.
383
+ */
384
+ y: number;
385
+ /**
386
+ * Touch x-coordinate in screen space.
387
+ */
388
+ screen_x: number;
389
+ /**
390
+ * Touch y-coordinate in screen space.
391
+ */
392
+ screen_y: number;
393
+ /**
394
+ * Change in the touch x-coordinate.
395
+ */
396
+ dx: number;
397
+ /**
398
+ * Change in the touch y-coordinate.
399
+ */
400
+ dy: number;
401
+ /**
402
+ * Change in the touch x-coordinate in screen space.
403
+ */
404
+ screen_dx: number;
405
+ /**
406
+ * Change in the touch y-coordinate in screen space.
407
+ */
408
+ screen_dy: number;
409
+ }
410
+ }
411
+ interface properties {
412
+ /**
413
+ * The rotation of the game object expressed in Euler angles.
414
+ * Euler angles are specified in degrees in the interval (-360, 360).
415
+ * The type of the property is vector3.
416
+ */
417
+ euler: Vector3;
418
+ /**
419
+ * The position of the game object.
420
+ * The type of the property is vector3.
421
+ */
422
+ position: Vector3;
423
+ /**
424
+ * The rotation of the game object.
425
+ * The type of the property is quaternion.
426
+ */
427
+ rotation: Quaternion;
428
+ /**
429
+ * 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.
430
+ */
431
+ scale: number | Vector3;
432
+ }
433
+ }
434
+ }
435
+
436
+ export {};