@defold-typescript/types 0.39.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.
- package/api-availability.json +4024 -716
- package/api-migrations.json +27 -0
- package/api-signatures.json +18118 -10264
- package/api-targets.json +448 -11
- package/examples/translations.json +619 -148
- package/fixtures/messages_doc.json +96 -0
- package/generated/b2d.d.ts +680 -4
- package/generated/b2d_body.d.ts +29 -103
- package/generated/b2d_chain.d.ts +5 -6
- package/generated/b2d_fixture.d.ts +34 -38
- package/generated/b2d_joint.d.ts +503 -25
- package/generated/b2d_shape.d.ts +199 -14
- package/generated/b2d_world.d.ts +57 -63
- package/generated/buffer.d.ts +33 -29
- package/generated/builtin-messages.d.ts +7 -1
- package/generated/bullet3d.d.ts +91 -0
- package/generated/bullet3d_collision_object.d.ts +433 -0
- package/generated/bullet3d_constraint.d.ts +818 -0
- package/generated/bullet3d_rigid_body.d.ts +429 -0
- package/generated/bullet3d_shape.d.ts +123 -0
- package/generated/bullet3d_world.d.ts +492 -0
- package/generated/camera.d.ts +31 -34
- package/generated/collectionfactory.d.ts +26 -27
- package/generated/collectionproxy.d.ts +22 -6
- package/generated/compute.d.ts +12 -238
- package/generated/crash.d.ts +24 -10
- package/generated/editor-vm/http.d.ts +90 -7
- package/generated/editor-vm/image.d.ts +7 -7
- package/generated/editor-vm/json.d.ts +11 -0
- package/generated/editor-vm/localization.d.ts +7 -7
- package/generated/editor-vm/tilemap_tiles.d.ts +56 -10
- package/generated/editor-vm/zip.d.ts +28 -0
- package/generated/editor.d.ts +1496 -430
- package/generated/factory.d.ts +21 -25
- package/generated/font.d.ts +64 -22
- package/generated/go.d.ts +243 -186
- package/generated/graphics.d.ts +374 -84
- package/generated/gui.d.ts +282 -492
- package/generated/html5.d.ts +5 -3
- package/generated/http.d.ts +31 -36
- package/generated/image.d.ts +127 -85
- package/generated/json.d.ts +34 -16
- package/generated/kinds/gui-script.d.ts +8 -0
- package/generated/kinds/render-script.d.ts +8 -0
- package/generated/kinds/script.d.ts +8 -0
- package/generated/label.d.ts +77 -7
- package/generated/liveupdate.d.ts +13 -10
- package/generated/material.d.ts +312 -360
- package/generated/model.d.ts +72 -42
- package/generated/particlefx.d.ts +19 -28
- package/generated/physics.d.ts +378 -144
- package/generated/profiler.d.ts +14 -24
- package/generated/render.d.ts +294 -297
- package/generated/resource.d.ts +753 -641
- package/generated/socket.d.ts +131 -134
- package/generated/sound.d.ts +65 -34
- package/generated/sprite.d.ts +39 -17
- package/generated/sys.d.ts +237 -182
- package/generated/tilemap.d.ts +21 -16
- package/generated/timer.d.ts +34 -21
- package/generated/versions/defold-1.12.4/b2d_body.d.ts +0 -7
- package/generated/versions/defold-1.12.4/buffer.d.ts +18 -17
- package/generated/versions/defold-1.12.4/camera.d.ts +23 -23
- package/generated/versions/defold-1.12.4/collectionfactory.d.ts +21 -19
- package/generated/versions/defold-1.12.4/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.12.4/crash.d.ts +2 -2
- package/generated/versions/defold-1.12.4/factory.d.ts +15 -16
- package/generated/versions/defold-1.12.4/go.d.ts +15 -17
- package/generated/versions/defold-1.12.4/gui.d.ts +111 -193
- package/generated/versions/defold-1.12.4/html5.d.ts +4 -2
- package/generated/versions/defold-1.12.4/http.d.ts +4 -15
- package/generated/versions/defold-1.12.4/image.d.ts +38 -46
- package/generated/versions/defold-1.12.4/index.d.ts +2 -0
- package/generated/versions/defold-1.12.4/json.d.ts +10 -6
- package/generated/versions/defold-1.12.4/label.d.ts +2 -3
- package/generated/versions/defold-1.12.4/liveupdate.d.ts +5 -3
- package/generated/versions/defold-1.12.4/model.d.ts +34 -13
- package/generated/versions/defold-1.12.4/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.12.4/physics.d.ts +82 -78
- package/generated/versions/defold-1.12.4/profiler.d.ts +3 -6
- package/generated/versions/defold-1.12.4/render.d.ts +160 -132
- package/generated/versions/defold-1.12.4/resource.d.ts +212 -209
- package/generated/versions/defold-1.12.4/socket.d.ts +45 -61
- package/generated/versions/defold-1.12.4/sound.d.ts +11 -11
- package/generated/versions/defold-1.12.4/sprite.d.ts +24 -6
- package/generated/versions/defold-1.12.4/sys.d.ts +45 -68
- package/generated/versions/defold-1.12.4/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.12.4/timer.d.ts +5 -3
- package/generated/versions/defold-1.12.4/vmath.d.ts +5 -26
- package/generated/versions/defold-1.12.4/window.d.ts +1 -16
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +10 -55
- package/generated/versions/defold-1.13.0/b2d_fixture.d.ts +25 -25
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +188 -5
- package/generated/versions/defold-1.13.0/b2d_world.d.ts +16 -10
- package/generated/versions/defold-1.13.0/buffer.d.ts +18 -17
- package/generated/versions/defold-1.13.0/camera.d.ts +27 -27
- package/generated/versions/defold-1.13.0/collectionfactory.d.ts +21 -19
- package/generated/versions/defold-1.13.0/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.13.0/compute.d.ts +1 -70
- package/generated/versions/defold-1.13.0/crash.d.ts +2 -2
- package/generated/versions/defold-1.13.0/editor-vm/tilemap_tiles.d.ts +3 -3
- package/generated/versions/defold-1.13.0/editor.d.ts +34 -24
- package/generated/versions/defold-1.13.0/factory.d.ts +15 -16
- package/generated/versions/defold-1.13.0/go.d.ts +15 -17
- package/generated/versions/defold-1.13.0/graphics.d.ts +121 -37
- package/generated/versions/defold-1.13.0/gui.d.ts +111 -193
- package/generated/versions/defold-1.13.0/html5.d.ts +4 -2
- package/generated/versions/defold-1.13.0/http.d.ts +4 -15
- package/generated/versions/defold-1.13.0/image.d.ts +38 -46
- package/generated/versions/defold-1.13.0/index.d.ts +2 -0
- package/generated/versions/defold-1.13.0/json.d.ts +10 -6
- package/generated/versions/defold-1.13.0/label.d.ts +2 -3
- package/generated/versions/defold-1.13.0/liveupdate.d.ts +7 -5
- package/generated/versions/defold-1.13.0/material.d.ts +69 -107
- package/generated/versions/defold-1.13.0/model.d.ts +34 -13
- package/generated/versions/defold-1.13.0/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.13.0/physics.d.ts +82 -78
- package/generated/versions/defold-1.13.0/profiler.d.ts +3 -6
- package/generated/versions/defold-1.13.0/render.d.ts +160 -132
- package/generated/versions/defold-1.13.0/resource.d.ts +217 -210
- package/generated/versions/defold-1.13.0/socket.d.ts +45 -61
- package/generated/versions/defold-1.13.0/sound.d.ts +11 -11
- package/generated/versions/defold-1.13.0/sprite.d.ts +24 -6
- package/generated/versions/defold-1.13.0/sys.d.ts +45 -68
- package/generated/versions/defold-1.13.0/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.13.0/timer.d.ts +5 -3
- package/generated/versions/defold-1.13.0/vmath.d.ts +5 -26
- package/generated/versions/defold-1.13.0/window.d.ts +1 -16
- package/generated/versions/defold-1.13.1/b2d.d.ts +33 -0
- package/generated/versions/defold-1.13.1/b2d_body.d.ts +636 -0
- package/generated/versions/defold-1.13.1/b2d_chain.d.ts +106 -0
- package/generated/versions/defold-1.13.1/b2d_fixture.d.ts +157 -0
- package/generated/versions/defold-1.13.1/b2d_joint.d.ts +823 -0
- package/generated/versions/defold-1.13.1/b2d_shape.d.ts +400 -0
- package/generated/versions/defold-1.13.1/b2d_world.d.ts +320 -0
- package/generated/versions/defold-1.13.1/buffer.d.ts +189 -0
- package/generated/versions/defold-1.13.1/camera.d.ts +303 -0
- package/generated/versions/defold-1.13.1/collectionfactory.d.ts +151 -0
- package/generated/versions/defold-1.13.1/collectionproxy.d.ts +93 -0
- package/generated/versions/defold-1.13.1/compute.d.ts +237 -0
- package/generated/versions/defold-1.13.1/crash.d.ts +143 -0
- package/generated/versions/defold-1.13.1/editor-vm/http.d.ts +56 -0
- package/generated/versions/defold-1.13.1/editor-vm/image.d.ts +48 -0
- package/generated/versions/defold-1.13.1/editor-vm/json.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/localization.d.ts +42 -0
- package/generated/versions/defold-1.13.1/editor-vm/tilemap_tiles.d.ts +80 -0
- package/generated/versions/defold-1.13.1/editor-vm/zip.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/zlib.d.ts +24 -0
- package/generated/versions/defold-1.13.1/editor.d.ts +1121 -0
- package/generated/versions/defold-1.13.1/factory.d.ts +124 -0
- package/generated/versions/defold-1.13.1/font.d.ts +81 -0
- package/generated/versions/defold-1.13.1/go.d.ts +1107 -0
- package/generated/versions/defold-1.13.1/graphics.d.ts +411 -0
- package/generated/versions/defold-1.13.1/gui.d.ts +2353 -0
- package/generated/versions/defold-1.13.1/html5.d.ts +55 -0
- package/generated/versions/defold-1.13.1/http.d.ts +77 -0
- package/generated/versions/defold-1.13.1/image.d.ts +131 -0
- package/generated/versions/defold-1.13.1/index.d.ts +57 -0
- package/generated/versions/defold-1.13.1/json.d.ts +80 -0
- package/generated/versions/defold-1.13.1/kinds/editor-script.d.ts +14 -0
- package/generated/versions/defold-1.13.1/label.d.ts +93 -0
- package/generated/versions/defold-1.13.1/liveupdate.d.ts +142 -0
- package/generated/versions/defold-1.13.1/material.d.ts +408 -0
- package/generated/versions/defold-1.13.1/model.d.ts +272 -0
- package/generated/versions/defold-1.13.1/msg.d.ts +10 -0
- package/generated/versions/defold-1.13.1/particlefx.d.ts +163 -0
- package/generated/versions/defold-1.13.1/physics.d.ts +559 -0
- package/generated/versions/defold-1.13.1/profiler.d.ts +235 -0
- package/generated/versions/defold-1.13.1/render.d.ts +1190 -0
- package/generated/versions/defold-1.13.1/resource.d.ts +1523 -0
- package/generated/versions/defold-1.13.1/socket.d.ts +784 -0
- package/generated/versions/defold-1.13.1/sound.d.ts +292 -0
- package/generated/versions/defold-1.13.1/sprite.d.ts +175 -0
- package/generated/versions/defold-1.13.1/sys.d.ts +678 -0
- package/generated/versions/defold-1.13.1/tilemap.d.ts +208 -0
- package/generated/versions/defold-1.13.1/timer.d.ts +125 -0
- package/generated/versions/defold-1.13.1/types.d.ts +61 -0
- package/generated/versions/defold-1.13.1/vmath.d.ts +774 -0
- package/generated/versions/defold-1.13.1/window.d.ts +183 -0
- package/generated/versions/defold-1.13.1/zlib.d.ts +41 -0
- package/generated/vmath.d.ts +6 -26
- package/generated/window.d.ts +71 -71
- package/identity-vocabulary.json +561 -0
- package/index.d.ts +8 -0
- package/package.json +13 -2
- package/scripts/example-store-io.ts +12 -1
- package/scripts/extension-goldens.ts +1 -0
- package/scripts/fidelity-baseline.json +146 -46
- package/scripts/generate-api-availability.ts +90 -12
- package/scripts/generate-api-signatures.ts +14 -3
- package/scripts/import-defold-release.ts +85 -24
- package/scripts/prose-constants.ts +157 -0
- package/scripts/regen.ts +396 -78
- package/scripts/shared-handle-methods.ts +53 -0
- package/scripts/signature-store-fs.ts +1 -0
- package/scripts/sync-api-docs.ts +16 -5
- package/src/api-availability.ts +0 -0
- package/src/api-doc.ts +201 -3
- package/src/api-identity.ts +252 -0
- package/src/component-properties.d.ts +33 -0
- package/src/core-types.ts +28 -3
- package/src/correction-pins.ts +49 -0
- package/src/custom-messages.d.ts +4 -3
- package/src/doc-comment.ts +139 -23
- package/src/doc-corrections.ts +108 -0
- package/src/editor-vm-globals.d.ts +5 -2
- package/src/emit-dts.ts +2474 -281
- package/src/emit-messages.ts +52 -0
- package/src/engine-globals.d.ts +2 -2
- package/src/example-store.ts +125 -14
- package/src/field-correction-coverage.ts +204 -0
- package/src/fnv1a.ts +16 -0
- package/src/go-overloads.d.ts +33 -13
- package/src/index-base-table.ts +145 -0
- package/src/index-slot-classifications.ts +588 -0
- package/src/index.ts +39 -2
- package/src/library-index-slot-classifications.ts +332 -0
- package/src/lifecycle.ts +61 -199
- package/src/luals-type-expr.ts +354 -0
- package/src/msg-overloads.d.ts +0 -1
- package/src/param-correction-provenance.ts +64 -0
- package/src/return-correction-provenance.ts +58 -16
- package/src/script-api.ts +3 -1
- package/src/sys-overloads.d.ts +48 -0
- package/src/vmath-overloads.d.ts +27 -1
- package/src/window-event-guard.d.ts +6 -9
- package/url-parameters.json +1 -2
package/generated/go.d.ts
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import type { Hash, Matrix4,
|
|
2
|
+
import type { Hash, Matrix4, Quaternion, Url, Vector, Vector3, Vector4 } from "../src/core-types";
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
5
|
/**
|
|
6
6
|
* Game object API documentation
|
|
7
7
|
*/
|
|
8
8
|
namespace go {
|
|
9
|
+
/**
|
|
10
|
+
* Options for accessing indexed or internal component properties with go.get and go.set.
|
|
11
|
+
*/
|
|
12
|
+
export 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
|
+
}
|
|
9
26
|
export type Easing = typeof go.EASING_INBACK | typeof go.EASING_INBOUNCE | typeof go.EASING_INCIRC | typeof go.EASING_INCUBIC | typeof go.EASING_INELASTIC | typeof go.EASING_INEXPO | typeof go.EASING_INOUTBACK | typeof go.EASING_INOUTBOUNCE | typeof go.EASING_INOUTCIRC | typeof go.EASING_INOUTCUBIC | typeof go.EASING_INOUTELASTIC | typeof go.EASING_INOUTEXPO | typeof go.EASING_INOUTQUAD | typeof go.EASING_INOUTQUART | typeof go.EASING_INOUTQUINT | typeof go.EASING_INOUTSINE | typeof go.EASING_INQUAD | typeof go.EASING_INQUART | typeof go.EASING_INQUINT | typeof go.EASING_INSINE | typeof go.EASING_LINEAR | typeof go.EASING_OUTBACK | typeof go.EASING_OUTBOUNCE | typeof go.EASING_OUTCIRC | typeof go.EASING_OUTCUBIC | typeof go.EASING_OUTELASTIC | typeof go.EASING_OUTEXPO | typeof go.EASING_OUTINBACK | typeof go.EASING_OUTINBOUNCE | typeof go.EASING_OUTINCIRC | typeof go.EASING_OUTINCUBIC | typeof go.EASING_OUTINELASTIC | typeof go.EASING_OUTINEXPO | typeof go.EASING_OUTINQUAD | typeof go.EASING_OUTINQUART | typeof go.EASING_OUTINQUINT | typeof go.EASING_OUTINSINE | typeof go.EASING_OUTQUAD | typeof go.EASING_OUTQUART | typeof go.EASING_OUTQUINT | typeof go.EASING_OUTSINE;
|
|
10
27
|
export type Playback = typeof go.PLAYBACK_ONCE_FORWARD | typeof go.PLAYBACK_ONCE_BACKWARD | typeof go.PLAYBACK_ONCE_PINGPONG | typeof go.PLAYBACK_LOOP_FORWARD | typeof go.PLAYBACK_LOOP_BACKWARD | typeof go.PLAYBACK_LOOP_PINGPONG;
|
|
28
|
+
export type EASING = typeof go.EASING_INBACK | typeof go.EASING_INBOUNCE | typeof go.EASING_INCIRC | typeof go.EASING_INCUBIC | typeof go.EASING_INELASTIC | typeof go.EASING_INEXPO | typeof go.EASING_INOUTBACK | typeof go.EASING_INOUTBOUNCE | typeof go.EASING_INOUTCIRC | typeof go.EASING_INOUTCUBIC | typeof go.EASING_INOUTELASTIC | typeof go.EASING_INOUTEXPO | typeof go.EASING_INOUTQUAD | typeof go.EASING_INOUTQUART | typeof go.EASING_INOUTQUINT | typeof go.EASING_INOUTSINE | typeof go.EASING_INQUAD | typeof go.EASING_INQUART | typeof go.EASING_INQUINT | typeof go.EASING_INSINE | typeof go.EASING_LINEAR | typeof go.EASING_OUTBACK | typeof go.EASING_OUTBOUNCE | typeof go.EASING_OUTCIRC | typeof go.EASING_OUTCUBIC | typeof go.EASING_OUTELASTIC | typeof go.EASING_OUTEXPO | typeof go.EASING_OUTINBACK | typeof go.EASING_OUTINBOUNCE | typeof go.EASING_OUTINCIRC | typeof go.EASING_OUTINCUBIC | typeof go.EASING_OUTINELASTIC | typeof go.EASING_OUTINEXPO | typeof go.EASING_OUTINQUAD | typeof go.EASING_OUTINQUART | typeof go.EASING_OUTINQUINT | typeof go.EASING_OUTINSINE | typeof go.EASING_OUTQUAD | typeof go.EASING_OUTQUART | typeof go.EASING_OUTQUINT | typeof go.EASING_OUTSINE;
|
|
29
|
+
export type PLAYBACK = typeof go.PLAYBACK_LOOP_BACKWARD | typeof go.PLAYBACK_LOOP_FORWARD | typeof go.PLAYBACK_LOOP_PINGPONG | typeof go.PLAYBACK_NONE | typeof go.PLAYBACK_ONCE_BACKWARD | typeof go.PLAYBACK_ONCE_FORWARD | typeof go.PLAYBACK_ONCE_PINGPONG;
|
|
11
30
|
/**
|
|
12
31
|
* in-back
|
|
13
32
|
*/
|
|
@@ -215,15 +234,10 @@ declare global {
|
|
|
215
234
|
* @param playback - playback mode of the animation
|
|
216
235
|
*
|
|
217
236
|
* - `go.PLAYBACK_ONCE_FORWARD`
|
|
218
|
-
*
|
|
219
237
|
* - `go.PLAYBACK_ONCE_BACKWARD`
|
|
220
|
-
*
|
|
221
238
|
* - `go.PLAYBACK_ONCE_PINGPONG`
|
|
222
|
-
*
|
|
223
239
|
* - `go.PLAYBACK_LOOP_FORWARD`
|
|
224
|
-
*
|
|
225
240
|
* - `go.PLAYBACK_LOOP_BACKWARD`
|
|
226
|
-
*
|
|
227
241
|
* - `go.PLAYBACK_LOOP_PINGPONG`
|
|
228
242
|
* @param to - target property value
|
|
229
243
|
* @param easing - easing to use during animation. Either specify a constant, see the animation guide for a complete list, or a vmath.vector with a curve
|
|
@@ -233,7 +247,7 @@ declare global {
|
|
|
233
247
|
*
|
|
234
248
|
* `self`
|
|
235
249
|
*
|
|
236
|
-
*
|
|
250
|
+
* script_instance The current script instance.
|
|
237
251
|
*
|
|
238
252
|
* `url`
|
|
239
253
|
*
|
|
@@ -262,7 +276,7 @@ declare global {
|
|
|
262
276
|
* go.animate("go", "position.y", go.PLAYBACK_LOOP_PINGPONG, 100, vec, 2.0);
|
|
263
277
|
* ```
|
|
264
278
|
*/
|
|
265
|
-
export function animate(url: SceneAddress | Hash | Url, property: string | Hash, playback: go.
|
|
279
|
+
export function animate(url: SceneAddress | Hash | Url, property: string | Hash, playback: go.PLAYBACK, to: number | Vector3 | Vector4 | Quaternion, easing: Vector | go.EASING, duration: number, delay?: number, complete_function?: (self: unknown, url: Url, property: Hash) => void): void;
|
|
266
280
|
/**
|
|
267
281
|
* By calling this function, all or specified stored property animations of the game object or component will be canceled.
|
|
268
282
|
* See the properties guide for which properties can be animated and the animation guide for how to animate them.
|
|
@@ -285,7 +299,7 @@ declare global {
|
|
|
285
299
|
* go.cancel_animations("#sprite");
|
|
286
300
|
* ```
|
|
287
301
|
*/
|
|
288
|
-
export function cancel_animations(url
|
|
302
|
+
export function cancel_animations(url?: SceneAddress | Hash | Url, property?: string | Hash): void;
|
|
289
303
|
/**
|
|
290
304
|
* Delete one or more game objects identified by id. Deletion is asynchronous meaning that
|
|
291
305
|
* the game object(s) are scheduled for deletion which will happen at the end of the current
|
|
@@ -321,7 +335,7 @@ declare global {
|
|
|
321
335
|
* go.delete(ids, true);
|
|
322
336
|
* ```
|
|
323
337
|
*/
|
|
324
|
-
function _delete(id?: SceneGameObjectAddress | Hash | Url | (
|
|
338
|
+
function _delete(id?: SceneGameObjectAddress | Hash | Url | (string | Hash | Url)[] | boolean, recursive?: boolean): void;
|
|
325
339
|
/**
|
|
326
340
|
* This function can check for game objects in any collection by specifying
|
|
327
341
|
* the collection name in the URL.
|
|
@@ -345,10 +359,14 @@ declare global {
|
|
|
345
359
|
* be used to e.g. take some last action, report the finalization to other game object instances, delete spawned objects
|
|
346
360
|
* or release user input focus (see release_input_focus).
|
|
347
361
|
*
|
|
348
|
-
* @param self -
|
|
362
|
+
* @param self - script instance used for storing state
|
|
349
363
|
* @example
|
|
350
364
|
* ```ts
|
|
351
365
|
* export default defineScript({
|
|
366
|
+
* init() {
|
|
367
|
+
* return { some_value: 0 };
|
|
368
|
+
* },
|
|
369
|
+
*
|
|
352
370
|
* final(self) {
|
|
353
371
|
* // report finalization
|
|
354
372
|
* msg.post("my_friend_instance", "im_dead", { my_stats: self.some_value });
|
|
@@ -356,23 +374,22 @@ declare global {
|
|
|
356
374
|
* });
|
|
357
375
|
* ```
|
|
358
376
|
*/
|
|
359
|
-
export function final(self:
|
|
377
|
+
export function final(self: unknown): void;
|
|
360
378
|
/**
|
|
361
379
|
* This is a callback-function, which is called by the engine at fixed intervals to update the state of a script
|
|
362
380
|
* component. The function will be called if 'Fixed Update Frequency' is enabled in the Engine section of game.project.
|
|
363
381
|
* It can for instance be used to update game logic with the physics simulation if using a fixed timestep for the
|
|
364
382
|
* physics (enabled by ticking 'Use Fixed Timestep' in the Physics section of game.project).
|
|
365
383
|
*
|
|
366
|
-
* @param self -
|
|
384
|
+
* @param self - script instance used for storing state
|
|
367
385
|
* @param dt - the time-step of the frame update
|
|
368
386
|
*/
|
|
369
|
-
export function fixed_update(self:
|
|
387
|
+
export function fixed_update(self: unknown, dt: number): void;
|
|
370
388
|
/**
|
|
371
389
|
* Returns or constructs an instance identifier. The instance id is a hash
|
|
372
390
|
* of the absolute path to the instance.
|
|
373
391
|
*
|
|
374
392
|
* - If `path` is specified, it can either be absolute or relative to the instance of the calling script.
|
|
375
|
-
*
|
|
376
393
|
* - If `path` is not specified, the id of the game object instance the script is attached to will be returned.
|
|
377
394
|
*
|
|
378
395
|
* @param path - path of the instance for which to return the id
|
|
@@ -578,7 +595,7 @@ declare global {
|
|
|
578
595
|
* This is a callback-function, which is called by the engine when a script component is initialized. It can be used
|
|
579
596
|
* to set the initial state of the script.
|
|
580
597
|
*
|
|
581
|
-
* @param self -
|
|
598
|
+
* @param self - script instance used for storing state
|
|
582
599
|
* @example
|
|
583
600
|
* ```ts
|
|
584
601
|
* export default defineScript({
|
|
@@ -589,15 +606,15 @@ declare global {
|
|
|
589
606
|
* });
|
|
590
607
|
* ```
|
|
591
608
|
*/
|
|
592
|
-
export function init(self:
|
|
609
|
+
export function init(self: unknown): void;
|
|
593
610
|
/**
|
|
594
611
|
* This is a callback-function, which is called by the engine at the end of the frame to update the state of a script
|
|
595
612
|
* component. Use it to make final adjustments to the game object instance.
|
|
596
613
|
*
|
|
597
|
-
* @param self -
|
|
614
|
+
* @param self - script instance used for storing state
|
|
598
615
|
* @param dt - the time-step of the frame update
|
|
599
616
|
*/
|
|
600
|
-
export function late_update(self:
|
|
617
|
+
export function late_update(self: unknown, dt: number): void;
|
|
601
618
|
/**
|
|
602
619
|
* This is a callback-function, which is called by the engine when user input is sent to the game object instance of the script.
|
|
603
620
|
* It can be used to take action on the input, e.g. move the instance according to the input.
|
|
@@ -609,159 +626,10 @@ declare global {
|
|
|
609
626
|
* to signal that it wants input to be consumed.
|
|
610
627
|
* See the documentation of acquire_input_focus for more
|
|
611
628
|
* information.
|
|
612
|
-
* The `action` parameter is a table containing data about the input mapped to the
|
|
613
|
-
* `action_id`.
|
|
614
|
-
* For mapped actions it specifies the value of the input and if it was just pressed or released.
|
|
615
|
-
* Actions are mapped to input in an input_binding-file.
|
|
616
|
-
* Mouse movement is specifically handled and uses `nil` as its `action_id`.
|
|
617
|
-
* The `action` only contains positional parameters in this case, such as x and y of the pointer.
|
|
618
|
-
* Here is a brief description of the available table fields:
|
|
619
|
-
*
|
|
620
|
-
* Field
|
|
621
|
-
* Description
|
|
622
|
-
*
|
|
623
|
-
* `value`
|
|
624
|
-
* 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.
|
|
625
|
-
*
|
|
626
|
-
* `pressed`
|
|
627
|
-
* If the input was pressed this frame. This is not present for mouse movement and text input.
|
|
628
|
-
*
|
|
629
|
-
* `released`
|
|
630
|
-
* If the input was released this frame. This is not present for mouse movement and text input.
|
|
631
|
-
*
|
|
632
|
-
* `repeated`
|
|
633
|
-
* 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.
|
|
634
|
-
*
|
|
635
|
-
* `x`
|
|
636
|
-
* The x value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
637
|
-
*
|
|
638
|
-
* `y`
|
|
639
|
-
* The y value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
640
|
-
*
|
|
641
|
-
* `screen_x`
|
|
642
|
-
* The screen space x value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
643
|
-
*
|
|
644
|
-
* `screen_y`
|
|
645
|
-
* The screen space y value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
646
|
-
*
|
|
647
|
-
* `dx`
|
|
648
|
-
* The change in x value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
649
|
-
*
|
|
650
|
-
* `dy`
|
|
651
|
-
* The change in y value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
652
|
-
*
|
|
653
|
-
* `screen_dx`
|
|
654
|
-
* The change in screen space x value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
655
|
-
*
|
|
656
|
-
* `screen_dy`
|
|
657
|
-
* The change in screen space y value of a pointer device, if present. This is not present for gamepad, key and text input.
|
|
658
|
-
*
|
|
659
|
-
* `gamepad`
|
|
660
|
-
* The index of the gamepad device that provided the input. See table below about gamepad input.
|
|
661
|
-
*
|
|
662
|
-
* `touch`
|
|
663
|
-
* List of touch input, one element per finger, if present. See table below about touch input
|
|
664
|
-
*
|
|
665
|
-
* `text`
|
|
666
|
-
* Text input from a (virtual) keyboard or similar.
|
|
667
|
-
*
|
|
668
|
-
* `marked_text`
|
|
669
|
-
* Sequence of entered symbols while entering a symbol combination, for example Japanese Kana.
|
|
670
|
-
*
|
|
671
|
-
* Gamepad specific fields:
|
|
672
|
-
*
|
|
673
|
-
* Field
|
|
674
|
-
* Description
|
|
675
629
|
*
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
* `userid`
|
|
680
|
-
* Id of the user associated with the controller. Usually only relevant on consoles.
|
|
681
|
-
*
|
|
682
|
-
* `gamepad_guid`
|
|
683
|
-
* The guid of the gamepad controller. Only passed with "connected" action.
|
|
684
|
-
*
|
|
685
|
-
* `gamepad_guid_info`
|
|
686
|
-
* Parsed guid info table. Only passed with "connected" action. See table below.
|
|
687
|
-
*
|
|
688
|
-
* `gamepad_unknown`
|
|
689
|
-
* True if the input originated from an unknown/unmapped gamepad.
|
|
690
|
-
*
|
|
691
|
-
* `gamepad_name`
|
|
692
|
-
* Name of the gamepad
|
|
693
|
-
*
|
|
694
|
-
* `gamepad_axis`
|
|
695
|
-
* List of gamepad axis values. For raw gamepad input only.
|
|
696
|
-
*
|
|
697
|
-
* `gamepadhats`
|
|
698
|
-
* List of gamepad hat values. For raw gamepad input only.
|
|
699
|
-
*
|
|
700
|
-
* `gamepad_buttons`
|
|
701
|
-
* List of gamepad button values. For raw gamepad input only.
|
|
702
|
-
*
|
|
703
|
-
* Touch input table:
|
|
704
|
-
*
|
|
705
|
-
* Field
|
|
706
|
-
* Description
|
|
707
|
-
*
|
|
708
|
-
* `id`
|
|
709
|
-
* A number identifying the touch input during its duration.
|
|
710
|
-
*
|
|
711
|
-
* `pressed`
|
|
712
|
-
* True if the finger was pressed this frame.
|
|
713
|
-
*
|
|
714
|
-
* `released`
|
|
715
|
-
* True if the finger was released this frame.
|
|
716
|
-
*
|
|
717
|
-
* `tap_count`
|
|
718
|
-
* Number of taps, one for single, two for double-tap, etc
|
|
719
|
-
*
|
|
720
|
-
* `x`
|
|
721
|
-
* The x touch location.
|
|
722
|
-
*
|
|
723
|
-
* `y`
|
|
724
|
-
* The y touch location.
|
|
725
|
-
*
|
|
726
|
-
* `dx`
|
|
727
|
-
* The change in x value.
|
|
728
|
-
*
|
|
729
|
-
* `dy`
|
|
730
|
-
* The change in y value.
|
|
731
|
-
*
|
|
732
|
-
* `acc_x`
|
|
733
|
-
* Accelerometer x value (if present).
|
|
734
|
-
*
|
|
735
|
-
* `acc_y`
|
|
736
|
-
* Accelerometer y value (if present).
|
|
737
|
-
*
|
|
738
|
-
* `acc_z`
|
|
739
|
-
* Accelerometer z value (if present).
|
|
740
|
-
*
|
|
741
|
-
* Guid info table:
|
|
742
|
-
* This info is only passed with a `connected` action.
|
|
743
|
-
*
|
|
744
|
-
* Field
|
|
745
|
-
* Description
|
|
746
|
-
*
|
|
747
|
-
* `vendor`
|
|
748
|
-
* USB vendor id. E.g. Nintendo 0x057e, Sony 0x054c, or Microsoft 0x045e
|
|
749
|
-
*
|
|
750
|
-
* `product`
|
|
751
|
-
* USB product id
|
|
752
|
-
*
|
|
753
|
-
* `bus`
|
|
754
|
-
* How device is communicating. E.g.0x0003 for USB devices and 0x0005 for Bluetooth devices.
|
|
755
|
-
*
|
|
756
|
-
* `crc`
|
|
757
|
-
* SDL CRC16 signature, typically used when vendor and product ids are unavailable
|
|
758
|
-
*
|
|
759
|
-
* `version`
|
|
760
|
-
* The device or firmware version
|
|
761
|
-
*
|
|
762
|
-
* @param self - reference to the script state to be used for storing data
|
|
763
|
-
* @param action_id - id of the received input action, as mapped in the input_binding-file
|
|
764
|
-
* @param action - a table containing the input data, see above for a description
|
|
630
|
+
* @param self - script instance used for storing state
|
|
631
|
+
* @param action_id - id of the received input action, as mapped in the input_binding-file, or `nil` for mouse movement
|
|
632
|
+
* @param action - input data for the action. **0️⃣ `gamepad` is 0-based; passed to Defold unchanged.**
|
|
765
633
|
* @returns optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false
|
|
766
634
|
* @example
|
|
767
635
|
* ```ts
|
|
@@ -791,21 +659,21 @@ declare global {
|
|
|
791
659
|
* self.velocity = vmath.vector3();
|
|
792
660
|
* } else {
|
|
793
661
|
* // update velocity
|
|
794
|
-
* self.velocity = vmath.vector3(action.value * self.max_speed, 0, 0);
|
|
662
|
+
* self.velocity = vmath.vector3((action.value ?? 0) * self.max_speed, 0, 0);
|
|
795
663
|
* }
|
|
796
664
|
* }
|
|
797
665
|
* },
|
|
798
666
|
* });
|
|
799
667
|
* ```
|
|
800
668
|
*/
|
|
801
|
-
export function on_input(self:
|
|
669
|
+
export function on_input(self: unknown, action_id: Hash | undefined, action: go.on_input.action): boolean | undefined;
|
|
802
670
|
/**
|
|
803
671
|
* This is a callback-function, which is called by the engine whenever a message has been sent to the script component.
|
|
804
672
|
* It can be used to take action on the message, e.g. send a response back to the sender of the message.
|
|
805
673
|
* The `message` parameter is a table containing the message data. If the message is sent from the engine, the
|
|
806
674
|
* documentation of the message specifies which data is supplied.
|
|
807
675
|
*
|
|
808
|
-
* @param self -
|
|
676
|
+
* @param self - script instance used for storing state
|
|
809
677
|
* @param message_id - id of the received message
|
|
810
678
|
* @param message - a table containing the message data
|
|
811
679
|
* @param sender - address of the sender
|
|
@@ -833,12 +701,12 @@ declare global {
|
|
|
833
701
|
* init() {
|
|
834
702
|
* // store the url of instance "a" for later use, by specifying undefined as socket we
|
|
835
703
|
* // automatically use our own socket
|
|
836
|
-
* return { a_url: msg.url(undefined, go.get_id("a"), "script") };
|
|
704
|
+
* return { a_url: msg.url(undefined, go.get_id("a"), "script"), important_value: 0 };
|
|
837
705
|
* },
|
|
838
706
|
*
|
|
839
707
|
* on_message(self, message_id, message, sender) {
|
|
840
708
|
* // check message and sender
|
|
841
|
-
* if (message_id === hash("my_data") && sender === self.a_url) {
|
|
709
|
+
* if (message_id === hash("my_data") && sender === self.a_url && typeof message.important_value === "number") {
|
|
842
710
|
* // use the data in some way
|
|
843
711
|
* self.important_value = message.important_value;
|
|
844
712
|
* }
|
|
@@ -846,12 +714,12 @@ declare global {
|
|
|
846
714
|
* });
|
|
847
715
|
* ```
|
|
848
716
|
*/
|
|
849
|
-
export function on_message(self:
|
|
717
|
+
export function on_message(self: unknown, message_id: Hash, message: LuaMap<AnyNotNil, unknown> | Record<string, unknown>, sender: Url): void;
|
|
850
718
|
/**
|
|
851
719
|
* This is a callback-function, which is called by the engine when the script component is reloaded, e.g. from the editor.
|
|
852
720
|
* It can be used for live development, e.g. to tweak constants or set up the state properly for the instance.
|
|
853
721
|
*
|
|
854
|
-
* @param self -
|
|
722
|
+
* @param self - script instance used for storing state
|
|
855
723
|
* @example
|
|
856
724
|
* ```ts
|
|
857
725
|
* // This example demonstrates how to tweak the speed of a game object instance that is moved on user input.
|
|
@@ -880,7 +748,7 @@ declare global {
|
|
|
880
748
|
* self.velocity = vmath.vector3();
|
|
881
749
|
* } else {
|
|
882
750
|
* // update velocity
|
|
883
|
-
* self.velocity = vmath.vector3(action.value * self.max_speed, 0, 0);
|
|
751
|
+
* self.velocity = vmath.vector3((action.value ?? 0) * self.max_speed, 0, 0);
|
|
884
752
|
* }
|
|
885
753
|
* }
|
|
886
754
|
* },
|
|
@@ -892,7 +760,7 @@ declare global {
|
|
|
892
760
|
* });
|
|
893
761
|
* ```
|
|
894
762
|
*/
|
|
895
|
-
export function on_reload(self:
|
|
763
|
+
export function on_reload(self: unknown): void;
|
|
896
764
|
/**
|
|
897
765
|
* Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent,
|
|
898
766
|
* like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world
|
|
@@ -1009,7 +877,7 @@ declare global {
|
|
|
1009
877
|
* This is a callback-function, which is called by the engine every frame to update the state of a script component.
|
|
1010
878
|
* It can be used to perform any kind of game related tasks, e.g. moving the game object instance.
|
|
1011
879
|
*
|
|
1012
|
-
* @param self -
|
|
880
|
+
* @param self - script instance used for storing state
|
|
1013
881
|
* @param dt - the time-step of the frame update
|
|
1014
882
|
* @example
|
|
1015
883
|
* ```ts
|
|
@@ -1027,7 +895,7 @@ declare global {
|
|
|
1027
895
|
* });
|
|
1028
896
|
* ```
|
|
1029
897
|
*/
|
|
1030
|
-
export function update(self:
|
|
898
|
+
export function update(self: unknown, dt: number): void;
|
|
1031
899
|
/**
|
|
1032
900
|
* Recalculates and updates the cached world transform immediately for the target instance
|
|
1033
901
|
* and its ancestors (parent chain up to the collection root). Descendants (children) are
|
|
@@ -1064,7 +932,7 @@ declare global {
|
|
|
1064
932
|
* const new_position = go.world_to_local_position(test_pos, "/child");
|
|
1065
933
|
* ```
|
|
1066
934
|
*/
|
|
1067
|
-
export function world_to_local_position(position: Vector3, url
|
|
935
|
+
export function world_to_local_position(position: Vector3, url?: SceneGameObjectAddress | Hash | Url): Vector3;
|
|
1068
936
|
/**
|
|
1069
937
|
* The function uses world transformation calculated at the end of previous frame.
|
|
1070
938
|
*
|
|
@@ -1079,8 +947,197 @@ declare global {
|
|
|
1079
947
|
* const result_transform = go.world_to_local_transform(test_transform, "/child");
|
|
1080
948
|
* ```
|
|
1081
949
|
*/
|
|
1082
|
-
export function world_to_local_transform(transformation: Matrix4, url
|
|
950
|
+
export function world_to_local_transform(transformation: Matrix4, url?: SceneGameObjectAddress | Hash | Url): Matrix4;
|
|
1083
951
|
export { _delete as delete };
|
|
952
|
+
export namespace on_input {
|
|
953
|
+
/**
|
|
954
|
+
* Data supplied to the global `on_input` lifecycle function.
|
|
955
|
+
*/
|
|
956
|
+
interface action {
|
|
957
|
+
/**
|
|
958
|
+
* Amount of input, usually 1 for buttons or between 0 and 1 for analogue input; absent for pointer movement and text input.
|
|
959
|
+
*/
|
|
960
|
+
value?: number;
|
|
961
|
+
/**
|
|
962
|
+
* Whether the input was pressed this frame; absent for pointer movement and text input.
|
|
963
|
+
*/
|
|
964
|
+
pressed?: boolean;
|
|
965
|
+
/**
|
|
966
|
+
* Whether the input was released this frame; absent for pointer movement and text input.
|
|
967
|
+
*/
|
|
968
|
+
released?: boolean;
|
|
969
|
+
/**
|
|
970
|
+
* Whether the input was repeated this frame; absent for pointer movement and text input.
|
|
971
|
+
*/
|
|
972
|
+
repeated?: boolean;
|
|
973
|
+
/**
|
|
974
|
+
* Pointer x-coordinate; absent for gamepad, key, and text input.
|
|
975
|
+
*/
|
|
976
|
+
x?: number;
|
|
977
|
+
/**
|
|
978
|
+
* Pointer y-coordinate; absent for gamepad, key, and text input.
|
|
979
|
+
*/
|
|
980
|
+
y?: number;
|
|
981
|
+
/**
|
|
982
|
+
* Pointer x-coordinate in screen space; absent for gamepad, key, and text input.
|
|
983
|
+
*/
|
|
984
|
+
screen_x?: number;
|
|
985
|
+
/**
|
|
986
|
+
* Pointer y-coordinate in screen space; absent for gamepad, key, and text input.
|
|
987
|
+
*/
|
|
988
|
+
screen_y?: number;
|
|
989
|
+
/**
|
|
990
|
+
* Change in the pointer x-coordinate; absent for gamepad, key, and text input.
|
|
991
|
+
*/
|
|
992
|
+
dx?: number;
|
|
993
|
+
/**
|
|
994
|
+
* Change in the pointer y-coordinate; absent for gamepad, key, and text input.
|
|
995
|
+
*/
|
|
996
|
+
dy?: number;
|
|
997
|
+
/**
|
|
998
|
+
* Change in the pointer x-coordinate in screen space; absent for gamepad, key, and text input.
|
|
999
|
+
*/
|
|
1000
|
+
screen_dx?: number;
|
|
1001
|
+
/**
|
|
1002
|
+
* Change in the pointer y-coordinate in screen space; absent for gamepad, key, and text input.
|
|
1003
|
+
*/
|
|
1004
|
+
screen_dy?: number;
|
|
1005
|
+
/**
|
|
1006
|
+
* Accelerometer x value, when present.
|
|
1007
|
+
*/
|
|
1008
|
+
acc_x?: number;
|
|
1009
|
+
/**
|
|
1010
|
+
* Accelerometer y value, when present.
|
|
1011
|
+
*/
|
|
1012
|
+
acc_y?: number;
|
|
1013
|
+
/**
|
|
1014
|
+
* Accelerometer z value, when present.
|
|
1015
|
+
*/
|
|
1016
|
+
acc_z?: number;
|
|
1017
|
+
/**
|
|
1018
|
+
* Index of the gamepad that provided the input.
|
|
1019
|
+
*/
|
|
1020
|
+
gamepad?: number;
|
|
1021
|
+
/**
|
|
1022
|
+
* Id of the user associated with the controller.
|
|
1023
|
+
*/
|
|
1024
|
+
userid?: number;
|
|
1025
|
+
/**
|
|
1026
|
+
* SDL-compatible guid, supplied with a gamepad-connected action.
|
|
1027
|
+
*/
|
|
1028
|
+
gamepad_guid?: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* Parsed guid information, supplied with a gamepad-connected action.
|
|
1031
|
+
*/
|
|
1032
|
+
gamepad_guid_info?: go.on_input.gamepad_guid_info;
|
|
1033
|
+
/**
|
|
1034
|
+
* Whether the input originated from an unknown or unmapped gamepad.
|
|
1035
|
+
*/
|
|
1036
|
+
gamepad_unknown?: boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* Name of a connected gamepad.
|
|
1039
|
+
*/
|
|
1040
|
+
gamepad_name?: string;
|
|
1041
|
+
/**
|
|
1042
|
+
* Axis values, supplied only for raw gamepad input.
|
|
1043
|
+
*/
|
|
1044
|
+
gamepad_axis?: number[];
|
|
1045
|
+
/**
|
|
1046
|
+
* Hat values, supplied only for raw gamepad input.
|
|
1047
|
+
*/
|
|
1048
|
+
gamepad_hats?: number[];
|
|
1049
|
+
/**
|
|
1050
|
+
* Button values, supplied only for raw gamepad input.
|
|
1051
|
+
*/
|
|
1052
|
+
gamepad_buttons?: number[];
|
|
1053
|
+
/**
|
|
1054
|
+
* Touch inputs, one entry per finger.
|
|
1055
|
+
*/
|
|
1056
|
+
touch?: go.on_input.touch[];
|
|
1057
|
+
/**
|
|
1058
|
+
* Text entered by a text action, or the current sequence for marked-text composition such as Japanese Kana.
|
|
1059
|
+
*/
|
|
1060
|
+
text?: string;
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Parsed fields from a connected gamepad guid.
|
|
1064
|
+
*/
|
|
1065
|
+
interface gamepad_guid_info {
|
|
1066
|
+
/**
|
|
1067
|
+
* USB vendor id.
|
|
1068
|
+
*/
|
|
1069
|
+
vendor: number;
|
|
1070
|
+
/**
|
|
1071
|
+
* USB product id.
|
|
1072
|
+
*/
|
|
1073
|
+
product: number;
|
|
1074
|
+
/**
|
|
1075
|
+
* Bus used to communicate with the device.
|
|
1076
|
+
*/
|
|
1077
|
+
bus: number;
|
|
1078
|
+
/**
|
|
1079
|
+
* SDL CRC16 signature.
|
|
1080
|
+
*/
|
|
1081
|
+
crc: number;
|
|
1082
|
+
/**
|
|
1083
|
+
* Device or firmware version.
|
|
1084
|
+
*/
|
|
1085
|
+
version: number;
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1088
|
+
* One touch entry in on_input.action.
|
|
1089
|
+
*/
|
|
1090
|
+
interface touch {
|
|
1091
|
+
/**
|
|
1092
|
+
* Identifier for the touch during its lifetime.
|
|
1093
|
+
*/
|
|
1094
|
+
id: number;
|
|
1095
|
+
/**
|
|
1096
|
+
* Whether the finger was pressed this frame.
|
|
1097
|
+
*/
|
|
1098
|
+
pressed: boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Whether the finger was released this frame.
|
|
1101
|
+
*/
|
|
1102
|
+
released: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* Number of taps, such as one for a single tap and two for a double tap.
|
|
1105
|
+
*/
|
|
1106
|
+
tap_count: number;
|
|
1107
|
+
/**
|
|
1108
|
+
* Touch x-coordinate.
|
|
1109
|
+
*/
|
|
1110
|
+
x: number;
|
|
1111
|
+
/**
|
|
1112
|
+
* Touch y-coordinate.
|
|
1113
|
+
*/
|
|
1114
|
+
y: number;
|
|
1115
|
+
/**
|
|
1116
|
+
* Touch x-coordinate in screen space.
|
|
1117
|
+
*/
|
|
1118
|
+
screen_x: number;
|
|
1119
|
+
/**
|
|
1120
|
+
* Touch y-coordinate in screen space.
|
|
1121
|
+
*/
|
|
1122
|
+
screen_y: number;
|
|
1123
|
+
/**
|
|
1124
|
+
* Change in the touch x-coordinate.
|
|
1125
|
+
*/
|
|
1126
|
+
dx: number;
|
|
1127
|
+
/**
|
|
1128
|
+
* Change in the touch y-coordinate.
|
|
1129
|
+
*/
|
|
1130
|
+
dy: number;
|
|
1131
|
+
/**
|
|
1132
|
+
* Change in the touch x-coordinate in screen space.
|
|
1133
|
+
*/
|
|
1134
|
+
screen_dx: number;
|
|
1135
|
+
/**
|
|
1136
|
+
* Change in the touch y-coordinate in screen space.
|
|
1137
|
+
*/
|
|
1138
|
+
screen_dy: number;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1084
1141
|
export interface properties {
|
|
1085
1142
|
/**
|
|
1086
1143
|
* The rotation of the game object expressed in Euler angles.
|
|
@@ -1099,9 +1156,9 @@ declare global {
|
|
|
1099
1156
|
*/
|
|
1100
1157
|
rotation: Quaternion;
|
|
1101
1158
|
/**
|
|
1102
|
-
* The
|
|
1159
|
+
* 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.
|
|
1103
1160
|
*/
|
|
1104
|
-
scale: number;
|
|
1161
|
+
scale: number | Vector3;
|
|
1105
1162
|
}
|
|
1106
1163
|
}
|
|
1107
1164
|
}
|