@defold-typescript/types 0.30.0 → 0.32.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-signatures.json +19 -19
- package/generated/camera.d.ts +8 -8
- package/generated/kinds/gui-script.d.ts +1 -0
- package/generated/kinds/render-script.d.ts +1 -0
- package/generated/kinds/script.d.ts +1 -0
- package/generated/sprite.d.ts +1 -1
- package/generated/versions/defold-1.12.4/sprite.d.ts +1 -1
- package/generated/versions/defold-1.13.0/camera.d.ts +8 -8
- package/generated/versions/defold-1.13.0/sprite.d.ts +1 -1
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/scripts/regen.ts +1 -0
- package/src/core-types.ts +5 -2
- package/src/custom-messages.d.ts +54 -0
- package/src/emit-dts.ts +62 -4
- package/src/engine-globals.d.ts +3 -3
- package/src/go-overloads.d.ts +3 -5
- package/src/index.ts +2 -0
- package/src/message-dispatch.d.ts +1 -1
- package/src/message-guard.d.ts +2 -2
- package/src/msg-overloads.d.ts +1 -5
- package/src/url-parameters.ts +41 -2
- package/url-parameters.json +43 -0
package/api-signatures.json
CHANGED
|
@@ -349,14 +349,14 @@
|
|
|
349
349
|
"camera\u0000FUNCTION\u0000camera.set_orthographic_mode\u0000[{\"types\":[\"nil\",\"number\",\"url\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function set_orthographic_mode(camera: Url | number | undefined, mode: number): void;",
|
|
350
350
|
"camera\u0000FUNCTION\u0000camera.set_orthographic_zoom\u0000[{\"types\":[\"nil\",\"number\",\"url\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function set_orthographic_zoom(camera: Url | number | undefined, orthographic_zoom: number): void;",
|
|
351
351
|
"camera\u0000FUNCTION\u0000camera.world_to_screen\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"nil\",\"number\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function world_to_screen(world_pos: Vector3, camera?: Url | number): Vector3;",
|
|
352
|
-
"camera\u0000PROPERTY\u0000aspect_ratio\u0000": "aspect_ratio:
|
|
353
|
-
"camera\u0000PROPERTY\u0000far_z\u0000": "far_z:
|
|
354
|
-
"camera\u0000PROPERTY\u0000fov\u0000": "fov:
|
|
355
|
-
"camera\u0000PROPERTY\u0000near_z\u0000": "near_z:
|
|
356
|
-
"camera\u0000PROPERTY\u0000orthographic_auto_zoom\u0000": "orthographic_auto_zoom:
|
|
357
|
-
"camera\u0000PROPERTY\u0000orthographic_zoom\u0000": "orthographic_zoom:
|
|
358
|
-
"camera\u0000PROPERTY\u0000projection\u0000": "projection:
|
|
359
|
-
"camera\u0000PROPERTY\u0000view\u0000": "view:
|
|
352
|
+
"camera\u0000PROPERTY\u0000aspect_ratio\u0000": "aspect_ratio: number;",
|
|
353
|
+
"camera\u0000PROPERTY\u0000far_z\u0000": "far_z: number;",
|
|
354
|
+
"camera\u0000PROPERTY\u0000fov\u0000": "fov: number;",
|
|
355
|
+
"camera\u0000PROPERTY\u0000near_z\u0000": "near_z: number;",
|
|
356
|
+
"camera\u0000PROPERTY\u0000orthographic_auto_zoom\u0000": "orthographic_auto_zoom: number;",
|
|
357
|
+
"camera\u0000PROPERTY\u0000orthographic_zoom\u0000": "orthographic_zoom: number;",
|
|
358
|
+
"camera\u0000PROPERTY\u0000projection\u0000": "projection: Matrix4;",
|
|
359
|
+
"camera\u0000PROPERTY\u0000view\u0000": "view: Matrix4;",
|
|
360
360
|
"collectionfactory\u0000CONSTANT\u0000collectionfactory.STATUS_LOADED\u0000": "const STATUS_LOADED: number & { readonly __brand: \"collectionfactory.STATUS_LOADED\" };",
|
|
361
361
|
"collectionfactory\u0000CONSTANT\u0000collectionfactory.STATUS_LOADING\u0000": "const STATUS_LOADING: number & { readonly __brand: \"collectionfactory.STATUS_LOADING\" };",
|
|
362
362
|
"collectionfactory\u0000CONSTANT\u0000collectionfactory.STATUS_UNLOADED\u0000": "const STATUS_UNLOADED: number & { readonly __brand: \"collectionfactory.STATUS_UNLOADED\" };",
|
|
@@ -1168,7 +1168,7 @@
|
|
|
1168
1168
|
"sprite\u0000FUNCTION\u0000sprite.set_vflip\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"boolean\"],\"isOptional\":false}]->[]": "function set_vflip(url: string | Hash | Url, flip: boolean): void;",
|
|
1169
1169
|
"sprite\u0000PROPERTY\u0000animation\u0000": "animation: Hash;",
|
|
1170
1170
|
"sprite\u0000PROPERTY\u0000cursor\u0000": "cursor: number;",
|
|
1171
|
-
"sprite\u0000PROPERTY\u0000frame_count\u0000": "frame_count:
|
|
1171
|
+
"sprite\u0000PROPERTY\u0000frame_count\u0000": "frame_count: number;",
|
|
1172
1172
|
"sprite\u0000PROPERTY\u0000image\u0000": "image: Hash;",
|
|
1173
1173
|
"sprite\u0000PROPERTY\u0000material\u0000": "material: Hash;",
|
|
1174
1174
|
"sprite\u0000PROPERTY\u0000playback_rate\u0000": "playback_rate: number;",
|
|
@@ -1661,14 +1661,14 @@
|
|
|
1661
1661
|
"camera\u0000FUNCTION\u0000camera.set_orthographic_mode\u0000[{\"types\":[\"nil\",\"number\",\"url\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function set_orthographic_mode(camera: Url | number | undefined, mode: number): void;",
|
|
1662
1662
|
"camera\u0000FUNCTION\u0000camera.set_orthographic_zoom\u0000[{\"types\":[\"nil\",\"number\",\"url\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function set_orthographic_zoom(camera: Url | number | undefined, orthographic_zoom: number): void;",
|
|
1663
1663
|
"camera\u0000FUNCTION\u0000camera.world_to_screen\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"nil\",\"number\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function world_to_screen(world_pos: Vector3, camera?: Url | number): Vector3;",
|
|
1664
|
-
"camera\u0000PROPERTY\u0000aspect_ratio\u0000": "aspect_ratio:
|
|
1665
|
-
"camera\u0000PROPERTY\u0000far_z\u0000": "far_z:
|
|
1666
|
-
"camera\u0000PROPERTY\u0000fov\u0000": "fov:
|
|
1667
|
-
"camera\u0000PROPERTY\u0000near_z\u0000": "near_z:
|
|
1668
|
-
"camera\u0000PROPERTY\u0000orthographic_auto_zoom\u0000": "orthographic_auto_zoom:
|
|
1669
|
-
"camera\u0000PROPERTY\u0000orthographic_zoom\u0000": "orthographic_zoom:
|
|
1670
|
-
"camera\u0000PROPERTY\u0000projection\u0000": "projection:
|
|
1671
|
-
"camera\u0000PROPERTY\u0000view\u0000": "view:
|
|
1664
|
+
"camera\u0000PROPERTY\u0000aspect_ratio\u0000": "aspect_ratio: number;",
|
|
1665
|
+
"camera\u0000PROPERTY\u0000far_z\u0000": "far_z: number;",
|
|
1666
|
+
"camera\u0000PROPERTY\u0000fov\u0000": "fov: number;",
|
|
1667
|
+
"camera\u0000PROPERTY\u0000near_z\u0000": "near_z: number;",
|
|
1668
|
+
"camera\u0000PROPERTY\u0000orthographic_auto_zoom\u0000": "orthographic_auto_zoom: number;",
|
|
1669
|
+
"camera\u0000PROPERTY\u0000orthographic_zoom\u0000": "orthographic_zoom: number;",
|
|
1670
|
+
"camera\u0000PROPERTY\u0000projection\u0000": "projection: Matrix4;",
|
|
1671
|
+
"camera\u0000PROPERTY\u0000view\u0000": "view: Matrix4;",
|
|
1672
1672
|
"collectionfactory\u0000CONSTANT\u0000collectionfactory.STATUS_LOADED\u0000": "const STATUS_LOADED: number & { readonly __brand: \"collectionfactory.STATUS_LOADED\" };",
|
|
1673
1673
|
"collectionfactory\u0000CONSTANT\u0000collectionfactory.STATUS_LOADING\u0000": "const STATUS_LOADING: number & { readonly __brand: \"collectionfactory.STATUS_LOADING\" };",
|
|
1674
1674
|
"collectionfactory\u0000CONSTANT\u0000collectionfactory.STATUS_UNLOADED\u0000": "const STATUS_UNLOADED: number & { readonly __brand: \"collectionfactory.STATUS_UNLOADED\" };",
|
|
@@ -2479,7 +2479,7 @@
|
|
|
2479
2479
|
"sprite\u0000FUNCTION\u0000sprite.set_vflip\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"boolean\"],\"isOptional\":false}]->[]": "function set_vflip(url: string | Hash | Url, flip: boolean): void;",
|
|
2480
2480
|
"sprite\u0000PROPERTY\u0000animation\u0000": "animation: Hash;",
|
|
2481
2481
|
"sprite\u0000PROPERTY\u0000cursor\u0000": "cursor: number;",
|
|
2482
|
-
"sprite\u0000PROPERTY\u0000frame_count\u0000": "frame_count:
|
|
2482
|
+
"sprite\u0000PROPERTY\u0000frame_count\u0000": "frame_count: number;",
|
|
2483
2483
|
"sprite\u0000PROPERTY\u0000image\u0000": "image: Hash;",
|
|
2484
2484
|
"sprite\u0000PROPERTY\u0000material\u0000": "material: Hash;",
|
|
2485
2485
|
"sprite\u0000PROPERTY\u0000playback_rate\u0000": "playback_rate: number;",
|
|
@@ -3489,7 +3489,7 @@
|
|
|
3489
3489
|
"sprite\u0000FUNCTION\u0000sprite.set_vflip\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"boolean\"],\"isOptional\":false}]->[]": "function set_vflip(url: string | Hash | Url, flip: boolean): void;",
|
|
3490
3490
|
"sprite\u0000PROPERTY\u0000animation\u0000": "animation: Hash;",
|
|
3491
3491
|
"sprite\u0000PROPERTY\u0000cursor\u0000": "cursor: number;",
|
|
3492
|
-
"sprite\u0000PROPERTY\u0000frame_count\u0000": "frame_count:
|
|
3492
|
+
"sprite\u0000PROPERTY\u0000frame_count\u0000": "frame_count: number;",
|
|
3493
3493
|
"sprite\u0000PROPERTY\u0000image\u0000": "image: Hash;",
|
|
3494
3494
|
"sprite\u0000PROPERTY\u0000material\u0000": "material: Hash;",
|
|
3495
3495
|
"sprite\u0000PROPERTY\u0000playback_rate\u0000": "playback_rate: number;",
|
package/generated/camera.d.ts
CHANGED
|
@@ -257,44 +257,44 @@ declare global {
|
|
|
257
257
|
* projection of a perspective camera.
|
|
258
258
|
* The type of the property is number.
|
|
259
259
|
*/
|
|
260
|
-
aspect_ratio:
|
|
260
|
+
aspect_ratio: number;
|
|
261
261
|
/**
|
|
262
262
|
* Camera frustum far plane.
|
|
263
263
|
* The type of the property is float.
|
|
264
264
|
*/
|
|
265
|
-
far_z:
|
|
265
|
+
far_z: number;
|
|
266
266
|
/**
|
|
267
267
|
* Vertical field of view of the camera.
|
|
268
268
|
* The type of the property is float.
|
|
269
269
|
*/
|
|
270
|
-
fov:
|
|
270
|
+
fov: number;
|
|
271
271
|
/**
|
|
272
272
|
* Camera frustum near plane.
|
|
273
273
|
* The type of the property is float.
|
|
274
274
|
*/
|
|
275
|
-
near_z:
|
|
275
|
+
near_z: number;
|
|
276
276
|
/**
|
|
277
277
|
* READ ONLY The zoom calculated from the current window and project dimensions
|
|
278
278
|
* in auto fit and auto cover modes. The value is 1.0 in fixed mode.
|
|
279
279
|
* The type of the property is float.
|
|
280
280
|
*/
|
|
281
|
-
orthographic_auto_zoom:
|
|
281
|
+
orthographic_auto_zoom: number;
|
|
282
282
|
/**
|
|
283
283
|
* Positive zoom multiplier when using an orthographic projection. In auto fit and auto cover
|
|
284
284
|
* modes, this value is multiplied with the calculated orthographic_auto_zoom value.
|
|
285
285
|
* The type of the property is float.
|
|
286
286
|
*/
|
|
287
|
-
orthographic_zoom:
|
|
287
|
+
orthographic_zoom: number;
|
|
288
288
|
/**
|
|
289
289
|
* READ ONLY The calculated projection matrix of the camera.
|
|
290
290
|
* The type of the property is matrix4.
|
|
291
291
|
*/
|
|
292
|
-
projection:
|
|
292
|
+
projection: Matrix4;
|
|
293
293
|
/**
|
|
294
294
|
* READ ONLY The calculated view matrix of the camera.
|
|
295
295
|
* The type of the property is matrix4.
|
|
296
296
|
*/
|
|
297
|
-
view:
|
|
297
|
+
view: Matrix4;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
}
|
package/generated/sprite.d.ts
CHANGED
|
@@ -257,44 +257,44 @@ declare global {
|
|
|
257
257
|
* projection of a perspective camera.
|
|
258
258
|
* The type of the property is number.
|
|
259
259
|
*/
|
|
260
|
-
aspect_ratio:
|
|
260
|
+
aspect_ratio: number;
|
|
261
261
|
/**
|
|
262
262
|
* Camera frustum far plane.
|
|
263
263
|
* The type of the property is float.
|
|
264
264
|
*/
|
|
265
|
-
far_z:
|
|
265
|
+
far_z: number;
|
|
266
266
|
/**
|
|
267
267
|
* Vertical field of view of the camera.
|
|
268
268
|
* The type of the property is float.
|
|
269
269
|
*/
|
|
270
|
-
fov:
|
|
270
|
+
fov: number;
|
|
271
271
|
/**
|
|
272
272
|
* Camera frustum near plane.
|
|
273
273
|
* The type of the property is float.
|
|
274
274
|
*/
|
|
275
|
-
near_z:
|
|
275
|
+
near_z: number;
|
|
276
276
|
/**
|
|
277
277
|
* READ ONLY The zoom calculated from the current window and project dimensions
|
|
278
278
|
* in auto fit and auto cover modes. The value is 1.0 in fixed mode.
|
|
279
279
|
* The type of the property is float.
|
|
280
280
|
*/
|
|
281
|
-
orthographic_auto_zoom:
|
|
281
|
+
orthographic_auto_zoom: number;
|
|
282
282
|
/**
|
|
283
283
|
* Positive zoom multiplier when using an orthographic projection. In auto fit and auto cover
|
|
284
284
|
* modes, this value is multiplied with the calculated orthographic_auto_zoom value.
|
|
285
285
|
* The type of the property is float.
|
|
286
286
|
*/
|
|
287
|
-
orthographic_zoom:
|
|
287
|
+
orthographic_zoom: number;
|
|
288
288
|
/**
|
|
289
289
|
* READ ONLY The calculated projection matrix of the camera.
|
|
290
290
|
* The type of the property is matrix4.
|
|
291
291
|
*/
|
|
292
|
-
projection:
|
|
292
|
+
projection: Matrix4;
|
|
293
293
|
/**
|
|
294
294
|
* READ ONLY The calculated view matrix of the camera.
|
|
295
295
|
* The type of the property is matrix4.
|
|
296
296
|
*/
|
|
297
|
-
view:
|
|
297
|
+
view: Matrix4;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="lua-types/5.1" />
|
|
2
2
|
/// <reference types="lua-types/special/jit-only" />
|
|
3
3
|
import "./generated/builtin-messages";
|
|
4
|
+
import "./src/custom-messages";
|
|
4
5
|
import "./src/msg-overloads";
|
|
5
6
|
import "./src/message-guard";
|
|
6
7
|
import "./src/window-event-guard";
|
package/package.json
CHANGED
package/scripts/regen.ts
CHANGED
|
@@ -546,6 +546,7 @@ export function kindStdlibReferences(entry: KindManifestEntry): string {
|
|
|
546
546
|
|
|
547
547
|
const UNIVERSAL_EXTRA_IMPORTS: readonly string[] = [
|
|
548
548
|
"../builtin-messages",
|
|
549
|
+
"../../src/custom-messages",
|
|
549
550
|
"../../src/engine-globals",
|
|
550
551
|
"../../src/msg-overloads",
|
|
551
552
|
"../../src/message-guard",
|
package/src/core-types.ts
CHANGED
|
@@ -152,8 +152,7 @@ declare const OpaqueBrand: unique symbol;
|
|
|
152
152
|
* The handle kinds modeled today:
|
|
153
153
|
* - GUI & rendering: `Opaque<"node">`, `Opaque<"texture">`,
|
|
154
154
|
* `Opaque<"render_target">`, `Opaque<"constant">`, `Opaque<"constant_buffer">`
|
|
155
|
-
* -
|
|
156
|
-
* `Opaque<"bufferstream">`
|
|
155
|
+
* - Buffers: `Opaque<"buffer">`, `Opaque<"bufferstream">`
|
|
157
156
|
* - Sockets: `Opaque<"client">`, `Opaque<"server">`, `Opaque<"master">`,
|
|
158
157
|
* `Opaque<"connected">`, `Opaque<"unconnected">`
|
|
159
158
|
* - Box2D physics: `Opaque<"b2Body">`, `Opaque<"b2World">`
|
|
@@ -193,6 +192,7 @@ export const DEFOLD_TYPE_MAP: Readonly<Record<string, string>> = {
|
|
|
193
192
|
number: "number",
|
|
194
193
|
int: "number",
|
|
195
194
|
integer: "number",
|
|
195
|
+
float: "number",
|
|
196
196
|
string: "string",
|
|
197
197
|
boolean: "boolean",
|
|
198
198
|
table: "Record<string | number, unknown>",
|
|
@@ -218,6 +218,9 @@ export const DEFOLD_TYPE_MAP: Readonly<Record<string, string>> = {
|
|
|
218
218
|
buffer: 'Opaque<"buffer">',
|
|
219
219
|
bufferstream: 'Opaque<"bufferstream"> & { [index: number]: number }',
|
|
220
220
|
userdata: 'Opaque<"userdata">',
|
|
221
|
+
// Vocabulary, not a shipped brand: no current ref-doc fixture types a slot
|
|
222
|
+
// `resource`, so nothing hand-written may name `Opaque<"resource">`. Kept so a
|
|
223
|
+
// future upstream slot carrying the token emits a handle rather than `unknown`.
|
|
221
224
|
resource: 'Opaque<"resource">',
|
|
222
225
|
b2World: 'Opaque<"b2World">',
|
|
223
226
|
b2Body: 'Opaque<"b2Body">',
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
/**
|
|
5
|
+
* A project's own message ids, mapped to the payload each carries. Empty as
|
|
6
|
+
* shipped and extended by declaration merging in your own code:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* declare global {
|
|
10
|
+
* interface CustomMessages {
|
|
11
|
+
* spawn_wave: { count: number; boss?: boolean };
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* export {};
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* The `export {};` makes the file a module, which `declare global` requires;
|
|
19
|
+
* drop it only in a file that already imports or exports something.
|
|
20
|
+
*
|
|
21
|
+
* Once declared, an id is checked on `msg.post` and narrowed by `isMessage`
|
|
22
|
+
* and `onMessage` exactly like a built-in one. Augment this interface rather
|
|
23
|
+
* than `BuiltinMessages`, which is regenerated from the Defold reference docs
|
|
24
|
+
* and reserved for the ids the engine itself defines.
|
|
25
|
+
*/
|
|
26
|
+
interface CustomMessages {}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Every message id with a declared payload: the engine's, plus your own.
|
|
30
|
+
*
|
|
31
|
+
* The custom half is intersected with `string` because a numeric key is one
|
|
32
|
+
* the lowering cannot emit — `onMessage`'s handler names become `hash(...)`
|
|
33
|
+
* comparisons, and only an identifier or a string literal survives that — so
|
|
34
|
+
* offering it would type-check a handler that silently never runs.
|
|
35
|
+
*/
|
|
36
|
+
type MessageId = BuiltinMessageId | (keyof CustomMessages & string);
|
|
37
|
+
|
|
38
|
+
// A built-in id is tested first, so a `CustomMessages` key shadowing one is
|
|
39
|
+
// inert rather than silently re-typing an engine message. Resolving to the
|
|
40
|
+
// intersection instead would yield an unsatisfiable payload and point the
|
|
41
|
+
// diagnostic at the call site rather than the declaration.
|
|
42
|
+
/**
|
|
43
|
+
* The payload declared for a message id: its `BuiltinMessages` entry, else
|
|
44
|
+
* its `CustomMessages` entry, else the open record an undeclared id keeps.
|
|
45
|
+
* An id declared in both resolves to the built-in payload.
|
|
46
|
+
*/
|
|
47
|
+
type MessagePayload<K> = K extends BuiltinMessageId
|
|
48
|
+
? BuiltinMessages[K]
|
|
49
|
+
: K extends keyof CustomMessages
|
|
50
|
+
? CustomMessages[K]
|
|
51
|
+
: Record<string | number, unknown>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export {};
|
package/src/emit-dts.ts
CHANGED
|
@@ -240,6 +240,54 @@ export const RETURN_TYPE_OVERRIDES: ReadonlyMap<string, string> = new Map([
|
|
|
240
240
|
["editor.tx.add", 'Opaque<"transaction_step">'],
|
|
241
241
|
]);
|
|
242
242
|
|
|
243
|
+
// A property whose upstream `<span class="type">` states a type the engine does
|
|
244
|
+
// not use. Unlike every other override here, which fills a gap upstream left
|
|
245
|
+
// empty, these contradict a token upstream explicitly declares — so each entry
|
|
246
|
+
// records that token and `property-correction-provenance.test.ts` pins it
|
|
247
|
+
// against every vendored ref-doc. The day upstream corrects a span the suite
|
|
248
|
+
// reds and the entry is deleted rather than silently overriding a value that
|
|
249
|
+
// had since become right.
|
|
250
|
+
//
|
|
251
|
+
// Demonstrated errors only. A property whose declared type is merely imprecise
|
|
252
|
+
// — every `resource.*` path hash, say — is not a correction candidate.
|
|
253
|
+
export interface PropertyTypeCorrection {
|
|
254
|
+
readonly ts: string;
|
|
255
|
+
readonly upstream: string;
|
|
256
|
+
readonly reason: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Keyed `<namespace>.<property>`, so a same-named property in another catalog
|
|
260
|
+
// is untouched.
|
|
261
|
+
export const PROPERTY_TYPE_CORRECTIONS: ReadonlyMap<string, PropertyTypeCorrection> = new Map([
|
|
262
|
+
[
|
|
263
|
+
"sprite.frame_count",
|
|
264
|
+
{
|
|
265
|
+
ts: "number",
|
|
266
|
+
upstream: "hash",
|
|
267
|
+
reason:
|
|
268
|
+
"a count of animation frames, which the prose confirms; `hash` is a copy-paste of the sibling animation-id spans",
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
[
|
|
272
|
+
"camera.projection",
|
|
273
|
+
{
|
|
274
|
+
ts: "Matrix4",
|
|
275
|
+
upstream: "float",
|
|
276
|
+
reason:
|
|
277
|
+
"the prose in the same element says matrix4; every camera property carries the same blanket `float` span",
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
[
|
|
281
|
+
"camera.view",
|
|
282
|
+
{
|
|
283
|
+
ts: "Matrix4",
|
|
284
|
+
upstream: "float",
|
|
285
|
+
reason:
|
|
286
|
+
"the prose in the same element says matrix4; every camera property carries the same blanket `float` span",
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
]);
|
|
290
|
+
|
|
243
291
|
// FQN-keyed allowlist of the `types.is_*` checks that genuinely narrow their
|
|
244
292
|
// argument, mapped to the `DEFOLD_TYPE_MAP` token whose interface they prove.
|
|
245
293
|
// Emitting these as user-defined type guards (`var_ is Vector3`) is the only way
|
|
@@ -1641,7 +1689,7 @@ export function emitDeclarations(module: ApiModule, options?: EmitOptions): stri
|
|
|
1641
1689
|
for (const docLine of summaryDocLines(p.brief, p.description, `${INDENT}${INDENT}`)) {
|
|
1642
1690
|
lines.push(docLine);
|
|
1643
1691
|
}
|
|
1644
|
-
lines.push(`${INDENT}${INDENT}${emitPropertyMember(p, mapType)}`);
|
|
1692
|
+
lines.push(`${INDENT}${INDENT}${emitPropertyMember(p, mapType, module.namespace)}`);
|
|
1645
1693
|
}
|
|
1646
1694
|
lines.push(`${INDENT}}`);
|
|
1647
1695
|
}
|
|
@@ -1759,7 +1807,7 @@ export function emitSymbolSignatures(module: ApiModule, options?: EmitOptions):
|
|
|
1759
1807
|
for (const p of module.properties) {
|
|
1760
1808
|
out.push({
|
|
1761
1809
|
identity: { namespace: module.namespace, kind: "PROPERTY", name: p.name, signature: "" },
|
|
1762
|
-
tsSignature: emitPropertyMember(p, mapType),
|
|
1810
|
+
tsSignature: emitPropertyMember(p, mapType, module.namespace),
|
|
1763
1811
|
});
|
|
1764
1812
|
}
|
|
1765
1813
|
|
|
@@ -2224,9 +2272,19 @@ function emitReturn(
|
|
|
2224
2272
|
return { type: ts, trailing: "" };
|
|
2225
2273
|
}
|
|
2226
2274
|
|
|
2227
|
-
function emitPropertyMember(
|
|
2275
|
+
function emitPropertyMember(
|
|
2276
|
+
p: ApiProperty,
|
|
2277
|
+
mapType: (t: string) => string,
|
|
2278
|
+
namespace: string,
|
|
2279
|
+
): string {
|
|
2228
2280
|
const key = TS_IDENTIFIER.test(p.name) ? p.name : JSON.stringify(p.name);
|
|
2229
|
-
const
|
|
2281
|
+
const correction = PROPERTY_TYPE_CORRECTIONS.get(`${namespace}.${p.name}`);
|
|
2282
|
+
const ts =
|
|
2283
|
+
correction !== undefined
|
|
2284
|
+
? correction.ts
|
|
2285
|
+
: p.types.length > 0
|
|
2286
|
+
? unionFromTokens(p.types, mapType)
|
|
2287
|
+
: "unknown";
|
|
2230
2288
|
return `${key}: ${ts};`;
|
|
2231
2289
|
}
|
|
2232
2290
|
|
package/src/engine-globals.d.ts
CHANGED
|
@@ -26,9 +26,9 @@ declare global {
|
|
|
26
26
|
* that lives only in the type system and is erased at transpile; because the
|
|
27
27
|
* symbol is not exported, consumer code cannot fabricate one. The kinds
|
|
28
28
|
* modeled: `node`, `texture`, `render_target`, `constant`, `constant_buffer`,
|
|
29
|
-
* `
|
|
30
|
-
* `
|
|
31
|
-
*
|
|
29
|
+
* `buffer`, `bufferstream`, `client`, `server`, `master`, `connected`,
|
|
30
|
+
* `unconnected`, `b2Body`, `b2World`, `userdata`. You obtain them from the
|
|
31
|
+
* engine, e.g. `gui.get_node("id")`, `render.render_target(...)`,
|
|
32
32
|
* `render.constant_buffer()`, `resource.load_buffer(path)`, `b2d.get_world()`,
|
|
33
33
|
* or `socket.tcp()`. See {@link Core.Opaque} for the full explanation, the per
|
|
34
34
|
* -kind obtain examples, and the contrast with a `LuaTable` alias.
|
package/src/go-overloads.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
2
|
|
|
3
|
-
import type { Hash,
|
|
3
|
+
import type { Hash, Quaternion, Url, Vector3, Vector4 } from "./core-types";
|
|
4
4
|
|
|
5
5
|
interface ScriptProperty<TValue> {
|
|
6
6
|
readonly __defoldScriptProperty: TValue;
|
|
@@ -46,7 +46,7 @@ declare global {
|
|
|
46
46
|
url: SceneAddress | Hash | Url,
|
|
47
47
|
property: string | Hash,
|
|
48
48
|
options?: GoPropertyOptions,
|
|
49
|
-
): number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion
|
|
49
|
+
): number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion;
|
|
50
50
|
/**
|
|
51
51
|
* sets a named property of the specified game object or component, or a material constant
|
|
52
52
|
*
|
|
@@ -80,7 +80,7 @@ declare global {
|
|
|
80
80
|
function set(
|
|
81
81
|
url: SceneAddress | Hash | Url,
|
|
82
82
|
property: string | Hash,
|
|
83
|
-
value: number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion
|
|
83
|
+
value: number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion,
|
|
84
84
|
options?: GoPropertyOptions,
|
|
85
85
|
): void;
|
|
86
86
|
/**
|
|
@@ -119,7 +119,5 @@ declare global {
|
|
|
119
119
|
function property(name: string, value: Vector4): ScriptProperty<Vector4>;
|
|
120
120
|
/** @deprecated Declare quaternions via the `defineScript({ properties })` field. */
|
|
121
121
|
function property(name: string, value: Quaternion): ScriptProperty<Quaternion>;
|
|
122
|
-
/** @deprecated Declare resources via the `defineScript({ properties })` field. */
|
|
123
|
-
function property(name: string, value: Opaque<"resource">): ScriptProperty<Opaque<"resource">>;
|
|
124
122
|
}
|
|
125
123
|
}
|
package/src/index.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare global {
|
|
|
33
33
|
*/
|
|
34
34
|
function onMessage<TSelf = Record<never, never>>(
|
|
35
35
|
handlers: Partial<{
|
|
36
|
-
[K in
|
|
36
|
+
[K in MessageId]: (self: TSelf, message: MessagePayload<K>, sender: Url) => void;
|
|
37
37
|
}>,
|
|
38
38
|
): (
|
|
39
39
|
self: TSelf,
|
package/src/message-guard.d.ts
CHANGED
|
@@ -27,9 +27,9 @@ declare global {
|
|
|
27
27
|
* }
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
function isMessage<K extends
|
|
30
|
+
function isMessage<K extends MessageId>(
|
|
31
31
|
message_id: Hash,
|
|
32
32
|
message: Record<string | number, unknown>,
|
|
33
33
|
expected: K,
|
|
34
|
-
): message is
|
|
34
|
+
): message is MessagePayload<K>;
|
|
35
35
|
}
|
package/src/msg-overloads.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
2
|
import type { Hash, Url } from "./core-types";
|
|
3
3
|
|
|
4
|
-
type MsgPostPayload<K> = K extends BuiltinMessageId
|
|
5
|
-
? BuiltinMessages[K]
|
|
6
|
-
: Record<string | number, unknown>;
|
|
7
|
-
|
|
8
4
|
declare global {
|
|
9
5
|
namespace msg {
|
|
10
6
|
/**
|
|
@@ -33,7 +29,7 @@ declare global {
|
|
|
33
29
|
function post<K extends string>(
|
|
34
30
|
receiver: SceneAddress | Url | Hash,
|
|
35
31
|
message_id: K,
|
|
36
|
-
message?:
|
|
32
|
+
message?: MessagePayload<K>,
|
|
37
33
|
): void;
|
|
38
34
|
function post(
|
|
39
35
|
receiver: SceneAddress | Url | Hash,
|
package/src/url-parameters.ts
CHANGED
|
@@ -6,8 +6,10 @@ import type { ApiModule } from "./api-doc";
|
|
|
6
6
|
// naming a mesh inside the model asset), so a slot is classified only
|
|
7
7
|
// deliberately. The first three address the scene graph; `gui-node` names a node
|
|
8
8
|
// inside the one `.gui` that owns the script, which is not an address at all;
|
|
9
|
-
// `animation` names a block inside
|
|
10
|
-
//
|
|
9
|
+
// `animation` names a block inside an atlas reached through a *companion*
|
|
10
|
+
// parameter of the same call — the sibling literal addressing a sprite
|
|
11
|
+
// component, or the gui node whose scene declares its textures — which is why
|
|
12
|
+
// it is the one class needing a companion;
|
|
11
13
|
// `resource-path` names a project file outright, so it is scoped by the
|
|
12
14
|
// extensions its entry declares rather than by anything in the scene graph;
|
|
13
15
|
// `config-key` names a `<section>.<key>` entry in the project's own
|
|
@@ -28,6 +30,13 @@ export type UrlParameterClass =
|
|
|
28
30
|
| "config-key"
|
|
29
31
|
| "action-id";
|
|
30
32
|
|
|
33
|
+
// Whether an address slot resolves its literal through the message bus, which
|
|
34
|
+
// crosses collection-proxy worlds, or through an instance/component handle,
|
|
35
|
+
// which does not. `msg.post("mylevel:/hero#script", ...)` is the documented
|
|
36
|
+
// proxy idiom; `go.get_position("mylevel:/hero")` fails in the engine's
|
|
37
|
+
// instance resolution.
|
|
38
|
+
export type SocketScope = "same-world" | "cross-world";
|
|
39
|
+
|
|
31
40
|
export interface UrlParameterEntry {
|
|
32
41
|
fqn: string;
|
|
33
42
|
parameter: string;
|
|
@@ -38,6 +47,12 @@ export interface UrlParameterEntry {
|
|
|
38
47
|
// shape would fan the table's one interface out into a union for a single
|
|
39
48
|
// optional field.
|
|
40
49
|
addressParameter?: string;
|
|
50
|
+
// The alternative to `addressParameter`: the parameter naming the gui node
|
|
51
|
+
// this call animates, which scopes the candidates to the `.gui` scene owning
|
|
52
|
+
// the script rather than to a component a sibling literal addresses. An
|
|
53
|
+
// `animation` entry declares exactly one of the two, enforced by the same
|
|
54
|
+
// drift guard and for the same reason.
|
|
55
|
+
nodeParameter?: string;
|
|
41
56
|
// The file extensions this slot's literal may name, each written with its
|
|
42
57
|
// leading dot. Required for `resource-path` and absent otherwise — enforced by
|
|
43
58
|
// the drift guard for the same reason `addressParameter` is. Recorded per
|
|
@@ -51,6 +66,14 @@ export interface UrlParameterEntry {
|
|
|
51
66
|
// is. Unlike `addressParameter` this names a parameter of the surrounding
|
|
52
67
|
// *hook*, not of the classified function.
|
|
53
68
|
comparedParameter?: string;
|
|
69
|
+
// Whether this slot accepts a socket-qualified address naming another world.
|
|
70
|
+
// Required for `game-object`, `component` and `either` and absent otherwise —
|
|
71
|
+
// enforced by the drift guard rather than the type, for the same reason
|
|
72
|
+
// `addressParameter` is. Never defaulted: a slot whose behaviour cannot be
|
|
73
|
+
// established from the engine is `cross-world`, because a wrong `same-world`
|
|
74
|
+
// is a false warning about correct code while a wrong `cross-world` only
|
|
75
|
+
// loses a finding.
|
|
76
|
+
socketScope?: SocketScope;
|
|
54
77
|
// `"generated"` for a slot the emitter derives from the ref-doc, otherwise a
|
|
55
78
|
// package-relative path to the hand-authored `.d.ts` that declares it,
|
|
56
79
|
// resolved against the `packages/types` package root. Not repo-relative: the
|
|
@@ -172,3 +195,19 @@ export function classifyUrlParameter(
|
|
|
172
195
|
}
|
|
173
196
|
return "none";
|
|
174
197
|
}
|
|
198
|
+
|
|
199
|
+
// Whether a socket-qualified address naming a foreign world is legal in this
|
|
200
|
+
// slot. Fails open — an unclassified slot, and a classified one carrying no
|
|
201
|
+
// judgment, both accept — so nothing is reported on a slot nobody judged.
|
|
202
|
+
export function slotAcceptsForeignSocket(
|
|
203
|
+
table: UrlParameterTable,
|
|
204
|
+
fqn: string,
|
|
205
|
+
parameter: string,
|
|
206
|
+
): boolean {
|
|
207
|
+
for (const entry of table) {
|
|
208
|
+
if (entry.fqn === fqn && entry.parameter === parameter) {
|
|
209
|
+
return entry.socketScope !== "same-world";
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return true;
|
|
213
|
+
}
|
package/url-parameters.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"fqn": "go.get_position",
|
|
4
4
|
"parameter": "id",
|
|
5
5
|
"class": "game-object",
|
|
6
|
+
"socketScope": "same-world",
|
|
6
7
|
"source": "generated",
|
|
7
8
|
"evidence": "id of the game object instance to get the position for"
|
|
8
9
|
},
|
|
@@ -10,6 +11,7 @@
|
|
|
10
11
|
"fqn": "go.get_rotation",
|
|
11
12
|
"parameter": "id",
|
|
12
13
|
"class": "game-object",
|
|
14
|
+
"socketScope": "same-world",
|
|
13
15
|
"source": "generated",
|
|
14
16
|
"evidence": "id of the game object instance to get the rotation for"
|
|
15
17
|
},
|
|
@@ -17,6 +19,7 @@
|
|
|
17
19
|
"fqn": "go.get_scale",
|
|
18
20
|
"parameter": "id",
|
|
19
21
|
"class": "game-object",
|
|
22
|
+
"socketScope": "same-world",
|
|
20
23
|
"source": "generated",
|
|
21
24
|
"evidence": "id of the game object instance to get the scale for"
|
|
22
25
|
},
|
|
@@ -24,6 +27,7 @@
|
|
|
24
27
|
"fqn": "go.get_scale_uniform",
|
|
25
28
|
"parameter": "id",
|
|
26
29
|
"class": "game-object",
|
|
30
|
+
"socketScope": "same-world",
|
|
27
31
|
"source": "generated",
|
|
28
32
|
"evidence": "id of the game object instance to get the uniform scale for"
|
|
29
33
|
},
|
|
@@ -31,6 +35,7 @@
|
|
|
31
35
|
"fqn": "go.set_position",
|
|
32
36
|
"parameter": "id",
|
|
33
37
|
"class": "game-object",
|
|
38
|
+
"socketScope": "same-world",
|
|
34
39
|
"source": "generated",
|
|
35
40
|
"evidence": "id of the game object instance to set the position for"
|
|
36
41
|
},
|
|
@@ -38,6 +43,7 @@
|
|
|
38
43
|
"fqn": "go.set_rotation",
|
|
39
44
|
"parameter": "id",
|
|
40
45
|
"class": "game-object",
|
|
46
|
+
"socketScope": "same-world",
|
|
41
47
|
"source": "generated",
|
|
42
48
|
"evidence": "id of the game object instance to get the rotation for"
|
|
43
49
|
},
|
|
@@ -45,6 +51,7 @@
|
|
|
45
51
|
"fqn": "go.set_scale",
|
|
46
52
|
"parameter": "id",
|
|
47
53
|
"class": "game-object",
|
|
54
|
+
"socketScope": "same-world",
|
|
48
55
|
"source": "generated",
|
|
49
56
|
"evidence": "id of the game object instance to get the scale for"
|
|
50
57
|
},
|
|
@@ -52,6 +59,7 @@
|
|
|
52
59
|
"fqn": "go.set_scale_xy",
|
|
53
60
|
"parameter": "id",
|
|
54
61
|
"class": "game-object",
|
|
62
|
+
"socketScope": "same-world",
|
|
55
63
|
"source": "generated",
|
|
56
64
|
"evidence": "id of the game object instance to get the scale for"
|
|
57
65
|
},
|
|
@@ -59,6 +67,7 @@
|
|
|
59
67
|
"fqn": "go.set_parent",
|
|
60
68
|
"parameter": "id",
|
|
61
69
|
"class": "game-object",
|
|
70
|
+
"socketScope": "same-world",
|
|
62
71
|
"source": "generated",
|
|
63
72
|
"evidence": "id of the game object instance to set parent for"
|
|
64
73
|
},
|
|
@@ -66,6 +75,7 @@
|
|
|
66
75
|
"fqn": "go.set_parent",
|
|
67
76
|
"parameter": "parent_id",
|
|
68
77
|
"class": "game-object",
|
|
78
|
+
"socketScope": "same-world",
|
|
69
79
|
"source": "generated",
|
|
70
80
|
"evidence": "id of the new parent game object"
|
|
71
81
|
},
|
|
@@ -73,6 +83,7 @@
|
|
|
73
83
|
"fqn": "go.get_parent",
|
|
74
84
|
"parameter": "id",
|
|
75
85
|
"class": "game-object",
|
|
86
|
+
"socketScope": "same-world",
|
|
76
87
|
"source": "generated",
|
|
77
88
|
"evidence": "id of the game object instance to get parent for"
|
|
78
89
|
},
|
|
@@ -80,6 +91,7 @@
|
|
|
80
91
|
"fqn": "go.get_world_position",
|
|
81
92
|
"parameter": "id",
|
|
82
93
|
"class": "game-object",
|
|
94
|
+
"socketScope": "same-world",
|
|
83
95
|
"source": "generated",
|
|
84
96
|
"evidence": "id of the game object instance to get the world position for"
|
|
85
97
|
},
|
|
@@ -87,6 +99,7 @@
|
|
|
87
99
|
"fqn": "go.get_world_rotation",
|
|
88
100
|
"parameter": "id",
|
|
89
101
|
"class": "game-object",
|
|
102
|
+
"socketScope": "same-world",
|
|
90
103
|
"source": "generated",
|
|
91
104
|
"evidence": "id of the game object instance to get the world rotation for"
|
|
92
105
|
},
|
|
@@ -94,6 +107,7 @@
|
|
|
94
107
|
"fqn": "go.get_world_scale",
|
|
95
108
|
"parameter": "id",
|
|
96
109
|
"class": "game-object",
|
|
110
|
+
"socketScope": "same-world",
|
|
97
111
|
"source": "generated",
|
|
98
112
|
"evidence": "id of the game object instance to get the world scale for"
|
|
99
113
|
},
|
|
@@ -101,6 +115,7 @@
|
|
|
101
115
|
"fqn": "go.get_world_scale_uniform",
|
|
102
116
|
"parameter": "id",
|
|
103
117
|
"class": "game-object",
|
|
118
|
+
"socketScope": "same-world",
|
|
104
119
|
"source": "generated",
|
|
105
120
|
"evidence": "id of the game object instance to get the world scale for"
|
|
106
121
|
},
|
|
@@ -108,6 +123,7 @@
|
|
|
108
123
|
"fqn": "go.get_world_transform",
|
|
109
124
|
"parameter": "id",
|
|
110
125
|
"class": "game-object",
|
|
126
|
+
"socketScope": "same-world",
|
|
111
127
|
"source": "generated",
|
|
112
128
|
"evidence": "id of the game object instance to get the world transform for"
|
|
113
129
|
},
|
|
@@ -115,6 +131,7 @@
|
|
|
115
131
|
"fqn": "go.update_world_transform",
|
|
116
132
|
"parameter": "id",
|
|
117
133
|
"class": "game-object",
|
|
134
|
+
"socketScope": "same-world",
|
|
118
135
|
"source": "generated",
|
|
119
136
|
"evidence": "id of the game object instance to update"
|
|
120
137
|
},
|
|
@@ -122,6 +139,7 @@
|
|
|
122
139
|
"fqn": "go.delete",
|
|
123
140
|
"parameter": "id",
|
|
124
141
|
"class": "game-object",
|
|
142
|
+
"socketScope": "same-world",
|
|
125
143
|
"source": "generated",
|
|
126
144
|
"evidence": "id or table of id's of the instance(s) to delete"
|
|
127
145
|
},
|
|
@@ -129,6 +147,7 @@
|
|
|
129
147
|
"fqn": "go.exists",
|
|
130
148
|
"parameter": "url",
|
|
131
149
|
"class": "game-object",
|
|
150
|
+
"socketScope": "same-world",
|
|
132
151
|
"source": "generated",
|
|
133
152
|
"evidence": "url of the game object to check"
|
|
134
153
|
},
|
|
@@ -136,6 +155,7 @@
|
|
|
136
155
|
"fqn": "go.world_to_local_position",
|
|
137
156
|
"parameter": "url",
|
|
138
157
|
"class": "game-object",
|
|
158
|
+
"socketScope": "same-world",
|
|
139
159
|
"source": "generated",
|
|
140
160
|
"evidence": "url of the game object which coordinate system convert to"
|
|
141
161
|
},
|
|
@@ -143,6 +163,7 @@
|
|
|
143
163
|
"fqn": "go.world_to_local_transform",
|
|
144
164
|
"parameter": "url",
|
|
145
165
|
"class": "game-object",
|
|
166
|
+
"socketScope": "same-world",
|
|
146
167
|
"source": "generated",
|
|
147
168
|
"evidence": "url of the game object which coordinate system convert to"
|
|
148
169
|
},
|
|
@@ -150,6 +171,7 @@
|
|
|
150
171
|
"fqn": "go.animate",
|
|
151
172
|
"parameter": "url",
|
|
152
173
|
"class": "either",
|
|
174
|
+
"socketScope": "same-world",
|
|
153
175
|
"source": "generated",
|
|
154
176
|
"evidence": "url of the game object or component having the property"
|
|
155
177
|
},
|
|
@@ -157,6 +179,7 @@
|
|
|
157
179
|
"fqn": "go.cancel_animations",
|
|
158
180
|
"parameter": "url",
|
|
159
181
|
"class": "either",
|
|
182
|
+
"socketScope": "same-world",
|
|
160
183
|
"source": "generated",
|
|
161
184
|
"evidence": "url of the game object or component"
|
|
162
185
|
},
|
|
@@ -164,24 +187,28 @@
|
|
|
164
187
|
"fqn": "go.get",
|
|
165
188
|
"parameter": "url",
|
|
166
189
|
"class": "either",
|
|
190
|
+
"socketScope": "same-world",
|
|
167
191
|
"source": "src/go-overloads.d.ts"
|
|
168
192
|
},
|
|
169
193
|
{
|
|
170
194
|
"fqn": "go.set",
|
|
171
195
|
"parameter": "url",
|
|
172
196
|
"class": "either",
|
|
197
|
+
"socketScope": "same-world",
|
|
173
198
|
"source": "src/go-overloads.d.ts"
|
|
174
199
|
},
|
|
175
200
|
{
|
|
176
201
|
"fqn": "msg.post",
|
|
177
202
|
"parameter": "receiver",
|
|
178
203
|
"class": "either",
|
|
204
|
+
"socketScope": "cross-world",
|
|
179
205
|
"source": "src/msg-overloads.d.ts"
|
|
180
206
|
},
|
|
181
207
|
{
|
|
182
208
|
"fqn": "msg.url",
|
|
183
209
|
"parameter": "urlstring",
|
|
184
210
|
"class": "either",
|
|
211
|
+
"socketScope": "cross-world",
|
|
185
212
|
"source": "src/msg-overloads.d.ts"
|
|
186
213
|
},
|
|
187
214
|
{
|
|
@@ -199,6 +226,22 @@
|
|
|
199
226
|
"source": "generated",
|
|
200
227
|
"evidence": "hashed id of the animation to play"
|
|
201
228
|
},
|
|
229
|
+
{
|
|
230
|
+
"fqn": "gui.play_flipbook",
|
|
231
|
+
"parameter": "animation",
|
|
232
|
+
"class": "animation",
|
|
233
|
+
"nodeParameter": "node",
|
|
234
|
+
"source": "generated",
|
|
235
|
+
"evidence": "animation id"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"fqn": "model.play_anim",
|
|
239
|
+
"parameter": "anim_id",
|
|
240
|
+
"class": "animation",
|
|
241
|
+
"addressParameter": "url",
|
|
242
|
+
"source": "generated",
|
|
243
|
+
"evidence": "id of the animation to play"
|
|
244
|
+
},
|
|
202
245
|
{
|
|
203
246
|
"fqn": "resource.atlas",
|
|
204
247
|
"parameter": "path",
|