@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
package/src/lifecycle.ts CHANGED
@@ -1,122 +1,137 @@
1
1
  import type { Hash, Url } from "./core-types";
2
2
 
3
- // Field docs are hand-reconciled from the `on_input` description's "Touch input
4
- // table:" prose (not structured ref-doc data); a future ref-doc re-pin is
5
- // reconciled by hand, drift-guarded against that prose in lifecycle-member-docs.
3
+ // Fields and docs follow the go ref-doc's `on_input.touch` STRUCT, whose keys are
4
+ // the ones comp_script.cpp pushes; lifecycle-member-docs drift-guards the docs
5
+ // against it, and a ref-doc re-pin is reconciled by hand.
6
6
  export interface InputTouch {
7
7
  /**
8
- * A number identifying the touch input during its duration.
8
+ * Identifier for the touch during its lifetime.
9
9
  */
10
10
  id?: number;
11
11
  /**
12
- * True if the finger was pressed this frame.
12
+ * Whether the finger was pressed this frame.
13
13
  */
14
14
  pressed?: boolean;
15
15
  /**
16
- * True if the finger was released this frame.
16
+ * Whether the finger was released this frame.
17
17
  */
18
18
  released?: boolean;
19
19
  /**
20
- * Number of taps, one for single, two for double-tap, etc
20
+ * Number of taps, such as one for a single tap and two for a double tap.
21
21
  */
22
22
  tap_count?: number;
23
23
  /**
24
- * The x touch location.
24
+ * Touch x-coordinate.
25
25
  */
26
26
  x?: number;
27
27
  /**
28
- * The y touch location.
28
+ * Touch y-coordinate.
29
29
  */
30
30
  y?: number;
31
31
  /**
32
- * The change in x value.
32
+ * Change in the touch x-coordinate.
33
33
  */
34
34
  dx?: number;
35
35
  /**
36
- * The change in y value.
36
+ * Change in the touch y-coordinate.
37
37
  */
38
38
  dy?: number;
39
39
  /**
40
- * Accelerometer x value (if present).
40
+ * Touch x-coordinate in screen space.
41
41
  */
42
- acc_x?: number;
42
+ screen_x?: number;
43
43
  /**
44
- * Accelerometer y value (if present).
44
+ * Touch y-coordinate in screen space.
45
45
  */
46
- acc_y?: number;
46
+ screen_y?: number;
47
47
  /**
48
- * Accelerometer z value (if present).
48
+ * Change in the touch x-coordinate in screen space.
49
49
  */
50
- acc_z?: number;
50
+ screen_dx?: number;
51
+ /**
52
+ * Change in the touch y-coordinate in screen space.
53
+ */
54
+ screen_dy?: number;
51
55
  }
52
56
 
53
- // Field docs are hand-reconciled from the `on_input` description's main action
54
- // and "Gamepad specific fields:" prose (not structured ref-doc data); a future
55
- // ref-doc re-pin is reconciled by hand, drift-guarded against that prose in
56
- // lifecycle-member-docs.
57
+ // Fields and docs follow the go ref-doc's `on_input.action` STRUCT, whose keys are
58
+ // the ones comp_script.cpp pushes; lifecycle-member-docs drift-guards the docs
59
+ // against it, and a ref-doc re-pin is reconciled by hand.
57
60
  export interface InputAction {
58
61
  /**
59
- * The amount of input given by the user. This is usually 1 for buttons and 0-1 for analogue inputs. This is not present for mouse movement and text input.
62
+ * Amount of input, usually 1 for buttons or between 0 and 1 for analogue input; absent for pointer movement and text input.
60
63
  */
61
64
  value?: number;
62
65
  /**
63
- * If the input was pressed this frame. This is not present for mouse movement and text input.
66
+ * Whether the input was pressed this frame; absent for pointer movement and text input.
64
67
  */
65
68
  pressed?: boolean;
66
69
  /**
67
- * If the input was released this frame. This is not present for mouse movement and text input.
70
+ * Whether the input was released this frame; absent for pointer movement and text input.
68
71
  */
69
72
  released?: boolean;
70
73
  /**
71
- * If the input was repeated this frame. This is similar to how a key on a keyboard is repeated when you hold it down. This is not present for mouse movement and text input.
74
+ * Whether the input was repeated this frame; absent for pointer movement and text input.
72
75
  */
73
76
  repeated?: boolean;
74
77
  /**
75
- * The x value of a pointer device, if present. This is not present for gamepad, key and text input.
78
+ * Pointer x-coordinate; absent for gamepad, key, and text input.
76
79
  */
77
80
  x?: number;
78
81
  /**
79
- * The y value of a pointer device, if present. This is not present for gamepad, key and text input.
82
+ * Pointer y-coordinate; absent for gamepad, key, and text input.
80
83
  */
81
84
  y?: number;
82
85
  /**
83
- * The screen space x value of a pointer device, if present. This is not present for gamepad, key and text input.
86
+ * Pointer x-coordinate in screen space; absent for gamepad, key, and text input.
84
87
  */
85
88
  screen_x?: number;
86
89
  /**
87
- * The screen space y value of a pointer device, if present. This is not present for gamepad, key and text input.
90
+ * Pointer y-coordinate in screen space; absent for gamepad, key, and text input.
88
91
  */
89
92
  screen_y?: number;
90
93
  /**
91
- * The change in x value of a pointer device, if present. This is not present for gamepad, key and text input.
94
+ * Change in the pointer x-coordinate; absent for gamepad, key, and text input.
92
95
  */
93
96
  dx?: number;
94
97
  /**
95
- * The change in y value of a pointer device, if present. This is not present for gamepad, key and text input.
98
+ * Change in the pointer y-coordinate; absent for gamepad, key, and text input.
96
99
  */
97
100
  dy?: number;
98
101
  /**
99
- * The change in screen space x value of a pointer device, if present. This is not present for gamepad, key and text input.
102
+ * Change in the pointer x-coordinate in screen space; absent for gamepad, key, and text input.
100
103
  */
101
104
  screen_dx?: number;
102
105
  /**
103
- * The change in screen space y value of a pointer device, if present. This is not present for gamepad, key and text input.
106
+ * Change in the pointer y-coordinate in screen space; absent for gamepad, key, and text input.
104
107
  */
105
108
  screen_dy?: number;
106
109
  /**
107
- * The index of the gamepad device that provided the input. See table below about gamepad input.
110
+ * Accelerometer x value, when present.
111
+ */
112
+ acc_x?: number;
113
+ /**
114
+ * Accelerometer y value, when present.
115
+ */
116
+ acc_y?: number;
117
+ /**
118
+ * Accelerometer z value, when present.
119
+ */
120
+ acc_z?: number;
121
+ /**
122
+ * Index of the gamepad that provided the input.
108
123
  */
109
124
  gamepad?: number;
110
125
  /**
111
- * Id of the user associated with the controller. Usually only relevant on consoles.
126
+ * Id of the user associated with the controller.
112
127
  */
113
128
  userid?: number;
114
129
  /**
115
- * The guid of the gamepad controller. Only passed with "connected" action.
130
+ * SDL-compatible guid, supplied with a gamepad-connected action.
116
131
  */
117
132
  gamepad_guid?: string;
118
133
  /**
119
- * Parsed guid info table. Only passed with "connected" action. See table below.
134
+ * Parsed guid information, supplied with a gamepad-connected action.
120
135
  */
121
136
  gamepad_guid_info?: {
122
137
  vendor: number;
@@ -126,37 +141,33 @@ export interface InputAction {
126
141
  version: number;
127
142
  };
128
143
  /**
129
- * True if the input originated from an unknown/unmapped gamepad.
144
+ * Whether the input originated from an unknown or unmapped gamepad.
130
145
  */
131
146
  gamepad_unknown?: boolean;
132
147
  /**
133
- * Name of the gamepad
148
+ * Name of a connected gamepad.
134
149
  */
135
150
  gamepad_name?: string;
136
151
  /**
137
- * List of gamepad axis values. For raw gamepad input only.
152
+ * Axis values, supplied only for raw gamepad input.
138
153
  */
139
154
  gamepad_axis?: number[];
140
155
  /**
141
- * List of gamepad hat values. For raw gamepad input only.
156
+ * Hat values, supplied only for raw gamepad input.
142
157
  */
143
- gamepadhats?: number[];
158
+ gamepad_hats?: number[];
144
159
  /**
145
- * List of gamepad button values. For raw gamepad input only.
160
+ * Button values, supplied only for raw gamepad input.
146
161
  */
147
162
  gamepad_buttons?: number[];
148
163
  /**
149
- * List of touch input, one element per finger, if present. See table below about touch input
164
+ * Touch inputs, one entry per finger.
150
165
  */
151
166
  touch?: InputTouch[];
152
167
  /**
153
- * Text input from a (virtual) keyboard or similar.
168
+ * Text entered by a text action, or the current sequence for marked-text composition such as Japanese Kana.
154
169
  */
155
170
  text?: string;
156
- /**
157
- * Sequence of entered symbols while entering a symbol combination, for example Japanese Kana.
158
- */
159
- marked_text?: string;
160
171
  }
161
172
 
162
173
  /**
@@ -277,159 +288,10 @@ export interface ScriptHooks<TSelf, TInitState = TSelf> {
277
288
  * to signal that it wants input to be consumed.
278
289
  * See the documentation of acquire_input_focus for more
279
290
  * information.
280
- * The `action` parameter is a table containing data about the input mapped to the
281
- * `action_id`.
282
- * For mapped actions it specifies the value of the input and if it was just pressed or released.
283
- * Actions are mapped to input in an input_binding-file.
284
- * Mouse movement is specifically handled and uses `nil` as its `action_id`.
285
- * The `action` only contains positional parameters in this case, such as x and y of the pointer.
286
- * Here is a brief description of the available table fields:
287
- *
288
- * Field
289
- * Description
290
- *
291
- * `value`
292
- * The amount of input given by the user. This is usually 1 for buttons and 0-1 for analogue inputs. This is not present for mouse movement and text input.
293
- *
294
- * `pressed`
295
- * If the input was pressed this frame. This is not present for mouse movement and text input.
296
- *
297
- * `released`
298
- * If the input was released this frame. This is not present for mouse movement and text input.
299
- *
300
- * `repeated`
301
- * If the input was repeated this frame. This is similar to how a key on a keyboard is repeated when you hold it down. This is not present for mouse movement and text input.
302
- *
303
- * `x`
304
- * The x value of a pointer device, if present. This is not present for gamepad, key and text input.
305
- *
306
- * `y`
307
- * The y value of a pointer device, if present. This is not present for gamepad, key and text input.
308
- *
309
- * `screen_x`
310
- * The screen space x value of a pointer device, if present. This is not present for gamepad, key and text input.
311
- *
312
- * `screen_y`
313
- * The screen space y value of a pointer device, if present. This is not present for gamepad, key and text input.
314
- *
315
- * `dx`
316
- * The change in x value of a pointer device, if present. This is not present for gamepad, key and text input.
317
- *
318
- * `dy`
319
- * The change in y value of a pointer device, if present. This is not present for gamepad, key and text input.
320
- *
321
- * `screen_dx`
322
- * The change in screen space x value of a pointer device, if present. This is not present for gamepad, key and text input.
323
- *
324
- * `screen_dy`
325
- * The change in screen space y value of a pointer device, if present. This is not present for gamepad, key and text input.
326
- *
327
- * `gamepad`
328
- * The index of the gamepad device that provided the input. See table below about gamepad input.
329
- *
330
- * `touch`
331
- * List of touch input, one element per finger, if present. See table below about touch input
332
- *
333
- * `text`
334
- * Text input from a (virtual) keyboard or similar.
335
- *
336
- * `marked_text`
337
- * Sequence of entered symbols while entering a symbol combination, for example Japanese Kana.
338
- *
339
- * Gamepad specific fields:
340
- *
341
- * Field
342
- * Description
343
- *
344
- * `gamepad`
345
- * The index of the gamepad device that provided the input.
346
- *
347
- * `userid`
348
- * Id of the user associated with the controller. Usually only relevant on consoles.
349
- *
350
- * `gamepad_guid`
351
- * The guid of the gamepad controller. Only passed with "connected" action.
352
- *
353
- * `gamepad_guid_info`
354
- * Parsed guid info table. Only passed with "connected" action. See table below.
355
- *
356
- * `gamepad_unknown`
357
- * True if the input originated from an unknown/unmapped gamepad.
358
- *
359
- * `gamepad_name`
360
- * Name of the gamepad
361
- *
362
- * `gamepad_axis`
363
- * List of gamepad axis values. For raw gamepad input only.
364
- *
365
- * `gamepadhats`
366
- * List of gamepad hat values. For raw gamepad input only.
367
- *
368
- * `gamepad_buttons`
369
- * List of gamepad button values. For raw gamepad input only.
370
- *
371
- * Touch input table:
372
- *
373
- * Field
374
- * Description
375
- *
376
- * `id`
377
- * A number identifying the touch input during its duration.
378
- *
379
- * `pressed`
380
- * True if the finger was pressed this frame.
381
- *
382
- * `released`
383
- * True if the finger was released this frame.
384
- *
385
- * `tap_count`
386
- * Number of taps, one for single, two for double-tap, etc
387
- *
388
- * `x`
389
- * The x touch location.
390
- *
391
- * `y`
392
- * The y touch location.
393
- *
394
- * `dx`
395
- * The change in x value.
396
- *
397
- * `dy`
398
- * The change in y value.
399
- *
400
- * `acc_x`
401
- * Accelerometer x value (if present).
402
- *
403
- * `acc_y`
404
- * Accelerometer y value (if present).
405
- *
406
- * `acc_z`
407
- * Accelerometer z value (if present).
408
- *
409
- * Guid info table:
410
- * This info is only passed with a `connected` action.
411
- *
412
- * Field
413
- * Description
414
- *
415
- * `vendor`
416
- * USB vendor id. E.g. Nintendo 0x057e, Sony 0x054c, or Microsoft 0x045e
417
- *
418
- * `product`
419
- * USB product id
420
- *
421
- * `bus`
422
- * How device is communicating. E.g.0x0003 for USB devices and 0x0005 for Bluetooth devices.
423
- *
424
- * `crc`
425
- * SDL CRC16 signature, typically used when vendor and product ids are unavailable
426
- *
427
- * `version`
428
- * The device or firmware version
429
291
  *
430
292
  * @param self - reference to the script state to be used for storing data
431
293
  * @param action_id - id of the received input action, as mapped in the input_binding-file
432
- * @param action - a table containing the input data, see above for a description
294
+ * @param action - a table containing the input data; `InputAction` documents its fields
433
295
  * @example
434
296
  * ```ts
435
297
  * on_input(self, action_id, action) {