@defold-typescript/types 0.34.0 → 0.36.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 +9547 -186
- package/api-targets.json +9 -66
- package/examples/translations.json +6 -6
- package/generated/buffer.d.ts +2 -2
- package/generated/collectionfactory.d.ts +2 -2
- package/generated/factory.d.ts +13 -12
- package/generated/gui.d.ts +23 -23
- package/generated/kinds/gui-script.d.ts +0 -4
- package/generated/kinds/render-script.d.ts +1 -4
- package/generated/kinds/script.d.ts +0 -4
- package/generated/model.d.ts +2 -2
- package/generated/profiler.d.ts +2 -4
- package/generated/render.d.ts +7 -155
- package/generated/sys.d.ts +1 -1
- package/generated/versions/defold-1.12.4/buffer.d.ts +2 -2
- package/generated/versions/defold-1.12.4/collectionfactory.d.ts +2 -2
- package/generated/versions/defold-1.12.4/factory.d.ts +13 -12
- package/generated/versions/defold-1.12.4/gui.d.ts +23 -23
- package/generated/versions/defold-1.12.4/index.d.ts +9 -4
- package/generated/versions/defold-1.12.4/model.d.ts +2 -2
- package/generated/versions/defold-1.12.4/profiler.d.ts +2 -4
- package/generated/versions/defold-1.12.4/render.d.ts +7 -155
- package/generated/versions/defold-1.12.4/sys.d.ts +1 -1
- package/generated/versions/defold-1.12.4/vmath.d.ts +0 -19
- package/generated/versions/defold-1.12.4/window.d.ts +2 -4
- package/generated/versions/defold-1.12.4/zlib.d.ts +2 -1
- package/generated/versions/defold-1.13.0/buffer.d.ts +2 -2
- package/generated/versions/defold-1.13.0/collectionfactory.d.ts +2 -2
- package/generated/versions/defold-1.13.0/factory.d.ts +13 -12
- package/generated/versions/defold-1.13.0/gui.d.ts +23 -23
- package/generated/versions/defold-1.13.0/index.d.ts +9 -4
- package/generated/versions/defold-1.13.0/model.d.ts +2 -2
- package/generated/versions/defold-1.13.0/profiler.d.ts +2 -4
- package/generated/versions/defold-1.13.0/render.d.ts +7 -155
- package/generated/versions/defold-1.13.0/sys.d.ts +1 -1
- package/generated/versions/defold-1.13.0/vmath.d.ts +0 -19
- package/generated/versions/defold-1.13.0/window.d.ts +2 -4
- package/generated/versions/defold-1.13.0/zlib.d.ts +2 -1
- package/generated/vmath.d.ts +0 -19
- package/generated/window.d.ts +2 -4
- package/generated/zlib.d.ts +2 -1
- package/index.d.ts +2 -4
- package/package.json +7 -2
- package/scripts/extension-goldens.ts +23 -0
- package/scripts/generate-api-signatures.ts +72 -8
- package/scripts/materialize-version.ts +15 -1
- package/scripts/regen.ts +109 -27
- package/scripts/signature-store-fs.ts +1 -0
- package/scripts/sync-api-docs.ts +5 -61
- package/src/emit-dts.ts +359 -58
- package/src/index.ts +1 -0
- package/src/optional-correction-provenance.ts +13 -2
- package/src/render-overloads.d.ts +46 -0
- package/src/vmath-overloads.d.ts +19 -0
- package/generated/iac.d.ts +0 -18
- package/generated/iap.d.ts +0 -60
- package/generated/push.d.ts +0 -66
- package/generated/versions/defold-1.12.4/iac.d.ts +0 -18
- package/generated/versions/defold-1.12.4/iap.d.ts +0 -60
- package/generated/versions/defold-1.12.4/push.d.ts +0 -66
- package/generated/versions/defold-1.12.4/webview.d.ts +0 -71
- package/generated/versions/defold-1.13.0/iac.d.ts +0 -18
- package/generated/versions/defold-1.13.0/iap.d.ts +0 -60
- package/generated/versions/defold-1.13.0/push.d.ts +0 -66
- package/generated/versions/defold-1.13.0/webview.d.ts +0 -71
- package/generated/webview.d.ts +0 -71
- package/scripts/fidelity-audit.ts +0 -684
package/generated/render.d.ts
CHANGED
|
@@ -38,13 +38,13 @@ declare global {
|
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
40
40
|
* // Clear the color buffer and the depth buffer.
|
|
41
|
-
* render.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* const buffers = new LuaMap<render.ClearBufferKey, number | Vector4>();
|
|
42
|
+
* buffers.set(graphics.BUFFER_TYPE_COLOR0_BIT, vmath.vector4(0, 0, 0, 0));
|
|
43
|
+
* buffers.set(graphics.BUFFER_TYPE_DEPTH_BIT, 1);
|
|
44
|
+
* render.clear(buffers);
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
function clear(buffers: LuaMap<number, number | Vector4>): void;
|
|
47
|
+
function clear(buffers: LuaMap<number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR0_BIT" } | number & { readonly __brand: "graphics.BUFFER_TYPE_DEPTH_BIT" } | number & { readonly __brand: "graphics.BUFFER_TYPE_STENCIL_BIT" }, number | Vector4>): void;
|
|
48
48
|
/**
|
|
49
49
|
* Constant buffers are used to set shader program variables and are optionally passed to the `render.draw()` function.
|
|
50
50
|
* The buffer's constant elements can be indexed like an ordinary Lua table, but you can't iterate over them with pairs() or ipairs().
|
|
@@ -128,7 +128,7 @@ declare global {
|
|
|
128
128
|
* render.draw(self.tile_pred);
|
|
129
129
|
* ```
|
|
130
130
|
*/
|
|
131
|
-
function disable_state(state:
|
|
131
|
+
function disable_state(state: number & { readonly __brand: "graphics.STATE_DEPTH_TEST" } | number & { readonly __brand: "graphics.STATE_STENCIL_TEST" } | number & { readonly __brand: "graphics.STATE_BLEND" } | number & { readonly __brand: "graphics.STATE_ALPHA_TEST" } | number & { readonly __brand: "graphics.STATE_CULL_FACE" } | number & { readonly __brand: "graphics.STATE_POLYGON_OFFSET_FILL" }): void;
|
|
132
132
|
/**
|
|
133
133
|
* Disables a texture that has previourly been enabled.
|
|
134
134
|
*
|
|
@@ -307,7 +307,7 @@ declare global {
|
|
|
307
307
|
* render.disable_state(graphics.STATE_STENCIL_TEST);
|
|
308
308
|
* ```
|
|
309
309
|
*/
|
|
310
|
-
function enable_state(state:
|
|
310
|
+
function enable_state(state: number & { readonly __brand: "graphics.STATE_DEPTH_TEST" } | number & { readonly __brand: "graphics.STATE_STENCIL_TEST" } | number & { readonly __brand: "graphics.STATE_BLEND" } | number & { readonly __brand: "graphics.STATE_ALPHA_TEST" } | number & { readonly __brand: "graphics.STATE_CULL_FACE" } | number & { readonly __brand: "graphics.STATE_POLYGON_OFFSET_FILL" }): void;
|
|
311
311
|
/**
|
|
312
312
|
* Sets the specified texture handle for a render target attachment or a regular texture
|
|
313
313
|
* that should be used for rendering. The texture can be bound to either a texture unit
|
|
@@ -502,154 +502,6 @@ declare global {
|
|
|
502
502
|
* ```
|
|
503
503
|
*/
|
|
504
504
|
function predicate(tags: (string | Hash)[]): number;
|
|
505
|
-
/**
|
|
506
|
-
* Creates a new render target according to the supplied
|
|
507
|
-
* specification table.
|
|
508
|
-
* The table should contain keys specifying which buffers should be created
|
|
509
|
-
* with what parameters. Each buffer key should have a table value consisting
|
|
510
|
-
* of parameters. The following parameter keys are available:
|
|
511
|
-
*
|
|
512
|
-
* Key
|
|
513
|
-
* Values
|
|
514
|
-
*
|
|
515
|
-
* `format`
|
|
516
|
-
* `graphics.TEXTURE_FORMAT_LUMINANCE`
|
|
517
|
-
* `graphics.TEXTURE_FORMAT_RGB`
|
|
518
|
-
* `graphics.TEXTURE_FORMAT_RGBA`
|
|
519
|
-
* `graphics.TEXTURE_FORMAT_DEPTH`
|
|
520
|
-
* `graphics.TEXTURE_FORMAT_STENCIL`
|
|
521
|
-
* `graphics.TEXTURE_FORMAT_RGBA32F`
|
|
522
|
-
* `graphics.TEXTURE_FORMAT_RGBA16F`
|
|
523
|
-
*
|
|
524
|
-
* `width`
|
|
525
|
-
* number
|
|
526
|
-
*
|
|
527
|
-
* `height`
|
|
528
|
-
* number
|
|
529
|
-
*
|
|
530
|
-
* `min_filter` (optional)
|
|
531
|
-
* `graphics.TEXTURE_FILTER_LINEAR`
|
|
532
|
-
* `graphics.TEXTURE_FILTER_NEAREST`
|
|
533
|
-
*
|
|
534
|
-
* `mag_filter` (optional)
|
|
535
|
-
* `graphics.TEXTURE_FILTER_LINEAR`
|
|
536
|
-
* `graphics.TEXTURE_FILTER_NEAREST`
|
|
537
|
-
*
|
|
538
|
-
* `u_wrap` (optional)
|
|
539
|
-
* `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
|
|
540
|
-
* `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
|
|
541
|
-
* `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
|
|
542
|
-
* `graphics.TEXTURE_WRAP_REPEAT`
|
|
543
|
-
*
|
|
544
|
-
* `v_wrap` (optional)
|
|
545
|
-
* `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
|
|
546
|
-
* `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
|
|
547
|
-
* `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
|
|
548
|
-
* `graphics.TEXTURE_WRAP_REPEAT`
|
|
549
|
-
*
|
|
550
|
-
* `flags` (optional)
|
|
551
|
-
* `render.TEXTURE_BIT` (only applicable to depth and stencil buffers)
|
|
552
|
-
*
|
|
553
|
-
* The render target can be created to support multiple color attachments. Each attachment can have different format settings and texture filters,
|
|
554
|
-
* but attachments must be added in sequence, meaning you cannot create a render target at slot 0 and 3.
|
|
555
|
-
* Instead it has to be created with all four buffer types ranging from [0..3] (as denoted by graphics.BUFFER_TYPE_COLORX_BIT where 'X' is the attachment you want to create).
|
|
556
|
-
* It is not guaranteed that the device running the script can support creating render targets with multiple color attachments. To check if the device can support multiple attachments,
|
|
557
|
-
* you can check if the `render` table contains any of the `BUFFER_TYPE_COLOR1_BIT`, `BUFFER_TYPE_COLOR2_BIT` or `BUFFER_TYPE_COLOR3_BIT` constants:
|
|
558
|
-
*
|
|
559
|
-
* `function init(self)
|
|
560
|
-
* if graphics.BUFFER_TYPE_COLOR1_BIT == nil then
|
|
561
|
-
* -- this devices does not support multiple color attachments
|
|
562
|
-
* end
|
|
563
|
-
* end
|
|
564
|
-
* `
|
|
565
|
-
*
|
|
566
|
-
* @param name - render target name
|
|
567
|
-
* @param parameters - table of buffer parameters, see the description for available keys and values
|
|
568
|
-
* @returns new render target
|
|
569
|
-
* @example
|
|
570
|
-
* ```ts
|
|
571
|
-
* // How to create a new render target and draw to it:
|
|
572
|
-
* export default defineScript({
|
|
573
|
-
* init() {
|
|
574
|
-
* // render target buffer parameters
|
|
575
|
-
* const color_params = {
|
|
576
|
-
* format: graphics.TEXTURE_FORMAT_RGBA,
|
|
577
|
-
* width: render.get_window_width(),
|
|
578
|
-
* height: render.get_window_height(),
|
|
579
|
-
* min_filter: graphics.TEXTURE_FILTER_LINEAR,
|
|
580
|
-
* mag_filter: graphics.TEXTURE_FILTER_LINEAR,
|
|
581
|
-
* u_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
582
|
-
* v_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
583
|
-
* };
|
|
584
|
-
* const depth_params = {
|
|
585
|
-
* format: graphics.TEXTURE_FORMAT_DEPTH,
|
|
586
|
-
* width: render.get_window_width(),
|
|
587
|
-
* height: render.get_window_height(),
|
|
588
|
-
* u_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
589
|
-
* v_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
590
|
-
* };
|
|
591
|
-
* return {
|
|
592
|
-
* my_render_target: render.render_target({
|
|
593
|
-
* [graphics.BUFFER_TYPE_COLOR0_BIT]: color_params,
|
|
594
|
-
* [graphics.BUFFER_TYPE_DEPTH_BIT]: depth_params,
|
|
595
|
-
* }),
|
|
596
|
-
* };
|
|
597
|
-
* },
|
|
598
|
-
*
|
|
599
|
-
* update(self, dt) {
|
|
600
|
-
* // enable target so all drawing is done to it
|
|
601
|
-
* render.set_render_target(self.my_render_target);
|
|
602
|
-
*
|
|
603
|
-
* // draw a predicate to the render target
|
|
604
|
-
* render.draw(self.my_pred);
|
|
605
|
-
* },
|
|
606
|
-
* });
|
|
607
|
-
*
|
|
608
|
-
* // How to create a render target with multiple outputs:
|
|
609
|
-
* export default defineScript({
|
|
610
|
-
* init() {
|
|
611
|
-
* // render target buffer parameters
|
|
612
|
-
* const color_params_rgba = {
|
|
613
|
-
* format: graphics.TEXTURE_FORMAT_RGBA,
|
|
614
|
-
* width: render.get_window_width(),
|
|
615
|
-
* height: render.get_window_height(),
|
|
616
|
-
* min_filter: graphics.TEXTURE_FILTER_LINEAR,
|
|
617
|
-
* mag_filter: graphics.TEXTURE_FILTER_LINEAR,
|
|
618
|
-
* u_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
619
|
-
* v_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
620
|
-
* };
|
|
621
|
-
* const color_params_float = {
|
|
622
|
-
* format: graphics.TEXTURE_FORMAT_RG32F,
|
|
623
|
-
* width: render.get_window_width(),
|
|
624
|
-
* height: render.get_window_height(),
|
|
625
|
-
* min_filter: graphics.TEXTURE_FILTER_LINEAR,
|
|
626
|
-
* mag_filter: graphics.TEXTURE_FILTER_LINEAR,
|
|
627
|
-
* u_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
628
|
-
* v_wrap: graphics.TEXTURE_WRAP_CLAMP_TO_EDGE,
|
|
629
|
-
* };
|
|
630
|
-
*
|
|
631
|
-
* // Create a render target with three color attachments
|
|
632
|
-
* // Note: No depth buffer is attached here
|
|
633
|
-
* return {
|
|
634
|
-
* my_render_target: render.render_target({
|
|
635
|
-
* [graphics.BUFFER_TYPE_COLOR0_BIT]: color_params_rgba,
|
|
636
|
-
* [graphics.BUFFER_TYPE_COLOR1_BIT]: color_params_rgba,
|
|
637
|
-
* [graphics.BUFFER_TYPE_COLOR2_BIT]: color_params_float,
|
|
638
|
-
* }),
|
|
639
|
-
* };
|
|
640
|
-
* },
|
|
641
|
-
*
|
|
642
|
-
* update(self, dt) {
|
|
643
|
-
* // enable target so all drawing is done to it
|
|
644
|
-
* render.enable_render_target(self.my_render_target);
|
|
645
|
-
*
|
|
646
|
-
* // draw a predicate to the render target
|
|
647
|
-
* render.draw(self.my_pred);
|
|
648
|
-
* },
|
|
649
|
-
* });
|
|
650
|
-
* ```
|
|
651
|
-
*/
|
|
652
|
-
function render_target(name: string, parameters: Record<string | number, unknown>): Opaque<"render_target">;
|
|
653
505
|
/**
|
|
654
506
|
* Sets the blend equation with separate equations for the color and alpha channels.
|
|
655
507
|
*
|
package/generated/sys.d.ts
CHANGED
|
@@ -228,7 +228,7 @@ declare global {
|
|
|
228
228
|
* }
|
|
229
229
|
* ```
|
|
230
230
|
*/
|
|
231
|
-
function get_connectivity():
|
|
231
|
+
function get_connectivity(): number & { readonly __brand: "sys.NETWORK_DISCONNECTED" } | number & { readonly __brand: "sys.NETWORK_CONNECTED_CELLULAR" } | number & { readonly __brand: "sys.NETWORK_CONNECTED" };
|
|
232
232
|
/**
|
|
233
233
|
* Returns a table with engine information.
|
|
234
234
|
*
|
|
@@ -142,7 +142,7 @@ declare global {
|
|
|
142
142
|
* if (values) print(`${values.length} values in 'somefloats'`);
|
|
143
143
|
* ```
|
|
144
144
|
*/
|
|
145
|
-
function get_metadata(buf: Opaque<"buffer">, metadata_name: Hash | string): LuaMultiReturn<[number[] | undefined,
|
|
145
|
+
function get_metadata(buf: Opaque<"buffer">, metadata_name: Hash | string): LuaMultiReturn<[number[] | undefined, number & { readonly __brand: "buffer.VALUE_TYPE_FLOAT32" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT16" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT32" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT64" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT8" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT16" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT32" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT64" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT8" } | undefined]>;
|
|
146
146
|
/**
|
|
147
147
|
* Get a specified stream from a buffer.
|
|
148
148
|
*
|
|
@@ -169,7 +169,7 @@ declare global {
|
|
|
169
169
|
* buffer.set_metadata(buf, hash("somefloats"), [-2.5, 10.0, 32.2], buffer.VALUE_TYPE_FLOAT32);
|
|
170
170
|
* ```
|
|
171
171
|
*/
|
|
172
|
-
function set_metadata(buf: Opaque<"buffer">, metadata_name: Hash | string, values: number[], value_type:
|
|
172
|
+
function set_metadata(buf: Opaque<"buffer">, metadata_name: Hash | string, values: number[], value_type: number & { readonly __brand: "buffer.VALUE_TYPE_FLOAT32" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT16" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT32" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT64" } | number & { readonly __brand: "buffer.VALUE_TYPE_INT8" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT16" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT32" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT64" } | number & { readonly __brand: "buffer.VALUE_TYPE_UINT8" }): void;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import type { Hash,
|
|
2
|
+
import type { Hash, Quaternion, Url, Vector3 } from "../../../src/core-types";
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
5
|
/**
|
|
@@ -92,7 +92,7 @@ declare global {
|
|
|
92
92
|
*
|
|
93
93
|
* - `collectionfactory.STATUS_LOADED`
|
|
94
94
|
*/
|
|
95
|
-
function get_status(url?: string | Hash | Url):
|
|
95
|
+
function get_status(url?: string | Hash | Url): number & { readonly __brand: "collectionfactory.STATUS_UNLOADED" } | number & { readonly __brand: "collectionfactory.STATUS_LOADING" } | number & { readonly __brand: "collectionfactory.STATUS_LOADED" };
|
|
96
96
|
/**
|
|
97
97
|
* Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called.
|
|
98
98
|
* Calling this function when the factory is not marked as dynamic loading does nothing.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import type { Hash,
|
|
2
|
+
import type { Hash, Quaternion, Url, Vector3 } from "../../../src/core-types";
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
5
|
/**
|
|
@@ -39,20 +39,21 @@ declare global {
|
|
|
39
39
|
* export default defineScript({
|
|
40
40
|
* init(self) {
|
|
41
41
|
* // create a new game object and provide property values
|
|
42
|
-
*
|
|
42
|
+
* const created = factory.create("#factory", undefined, undefined, { my_value: 1 });
|
|
43
43
|
* // communicate with the object
|
|
44
|
-
* msg.post(
|
|
44
|
+
* msg.post(created, "hello");
|
|
45
45
|
* },
|
|
46
46
|
* });
|
|
47
47
|
*
|
|
48
|
-
* // And then let the new game object have a script attached:
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* }
|
|
48
|
+
* // And then let the new game object have a script attached, in its own file:
|
|
49
|
+
* //
|
|
50
|
+
* // go.property("my_value", 0);
|
|
51
|
+
* //
|
|
52
|
+
* // export default defineScript({
|
|
53
|
+
* // init(self) {
|
|
54
|
+
* // // do something with self.my_value which is now one
|
|
55
|
+
* // },
|
|
56
|
+
* // });
|
|
56
57
|
* ```
|
|
57
58
|
*/
|
|
58
59
|
function create(url: string | Hash | Url, position?: Vector3, rotation?: Quaternion, properties?: Record<string | number, unknown>, scale?: number | Vector3): Hash;
|
|
@@ -70,7 +71,7 @@ declare global {
|
|
|
70
71
|
*
|
|
71
72
|
* - `factory.STATUS_LOADED`
|
|
72
73
|
*/
|
|
73
|
-
function get_status(url?: string | Hash | Url):
|
|
74
|
+
function get_status(url?: string | Hash | Url): number & { readonly __brand: "factory.STATUS_UNLOADED" } | number & { readonly __brand: "factory.STATUS_LOADING" } | number & { readonly __brand: "factory.STATUS_LOADED" };
|
|
74
75
|
/**
|
|
75
76
|
* Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called.
|
|
76
77
|
* Calling this function when the factory is not marked as dynamic loading does nothing.
|
|
@@ -563,7 +563,7 @@ declare global {
|
|
|
563
563
|
* });
|
|
564
564
|
* ```
|
|
565
565
|
*/
|
|
566
|
-
function animate(node: Opaque<"node">, property: string |
|
|
566
|
+
function animate(node: Opaque<"node">, property: string | number & { readonly __brand: "gui.PROP_POSITION" } | number & { readonly __brand: "gui.PROP_ROTATION" } | number & { readonly __brand: "gui.PROP_EULER" } | number & { readonly __brand: "gui.PROP_SCALE" } | number & { readonly __brand: "gui.PROP_COLOR" } | number & { readonly __brand: "gui.PROP_OUTLINE" } | number & { readonly __brand: "gui.PROP_SHADOW" } | number & { readonly __brand: "gui.PROP_SIZE" } | number & { readonly __brand: "gui.PROP_FILL_ANGLE" } | number & { readonly __brand: "gui.PROP_INNER_RADIUS" } | number & { readonly __brand: "gui.PROP_LEADING" } | number & { readonly __brand: "gui.PROP_TRACKING" } | number & { readonly __brand: "gui.PROP_SLICE9" }, to: number | Vector3 | Vector4 | Quaternion, easing: number & { readonly __brand: "gui.EASING_INBACK" } | number & { readonly __brand: "gui.EASING_INBOUNCE" } | number & { readonly __brand: "gui.EASING_INCIRC" } | number & { readonly __brand: "gui.EASING_INCUBIC" } | number & { readonly __brand: "gui.EASING_INELASTIC" } | number & { readonly __brand: "gui.EASING_INEXPO" } | number & { readonly __brand: "gui.EASING_INOUTBACK" } | number & { readonly __brand: "gui.EASING_INOUTBOUNCE" } | number & { readonly __brand: "gui.EASING_INOUTCIRC" } | number & { readonly __brand: "gui.EASING_INOUTCUBIC" } | number & { readonly __brand: "gui.EASING_INOUTELASTIC" } | number & { readonly __brand: "gui.EASING_INOUTEXPO" } | number & { readonly __brand: "gui.EASING_INOUTQUAD" } | number & { readonly __brand: "gui.EASING_INOUTQUART" } | number & { readonly __brand: "gui.EASING_INOUTQUINT" } | number & { readonly __brand: "gui.EASING_INOUTSINE" } | number & { readonly __brand: "gui.EASING_INQUAD" } | number & { readonly __brand: "gui.EASING_INQUART" } | number & { readonly __brand: "gui.EASING_INQUINT" } | number & { readonly __brand: "gui.EASING_INSINE" } | number & { readonly __brand: "gui.EASING_LINEAR" } | number & { readonly __brand: "gui.EASING_OUTBACK" } | number & { readonly __brand: "gui.EASING_OUTBOUNCE" } | number & { readonly __brand: "gui.EASING_OUTCIRC" } | number & { readonly __brand: "gui.EASING_OUTCUBIC" } | number & { readonly __brand: "gui.EASING_OUTELASTIC" } | number & { readonly __brand: "gui.EASING_OUTEXPO" } | number & { readonly __brand: "gui.EASING_OUTINBACK" } | number & { readonly __brand: "gui.EASING_OUTINBOUNCE" } | number & { readonly __brand: "gui.EASING_OUTINCIRC" } | number & { readonly __brand: "gui.EASING_OUTINCUBIC" } | number & { readonly __brand: "gui.EASING_OUTINELASTIC" } | number & { readonly __brand: "gui.EASING_OUTINEXPO" } | number & { readonly __brand: "gui.EASING_OUTINQUAD" } | number & { readonly __brand: "gui.EASING_OUTINQUART" } | number & { readonly __brand: "gui.EASING_OUTINQUINT" } | number & { readonly __brand: "gui.EASING_OUTINSINE" } | number & { readonly __brand: "gui.EASING_OUTQUAD" } | number & { readonly __brand: "gui.EASING_OUTQUART" } | number & { readonly __brand: "gui.EASING_OUTQUINT" } | number & { readonly __brand: "gui.EASING_OUTSINE" } | Vector, duration: number, delay?: number, complete_function?: (self: unknown, node: unknown) => void, playback?: number & { readonly __brand: "gui.PLAYBACK_ONCE_FORWARD" } | number & { readonly __brand: "gui.PLAYBACK_ONCE_BACKWARD" } | number & { readonly __brand: "gui.PLAYBACK_ONCE_PINGPONG" } | number & { readonly __brand: "gui.PLAYBACK_LOOP_FORWARD" } | number & { readonly __brand: "gui.PLAYBACK_LOOP_BACKWARD" } | number & { readonly __brand: "gui.PLAYBACK_LOOP_PINGPONG" }): void;
|
|
567
567
|
/**
|
|
568
568
|
* If one or more animations of the specified node is currently running (started by `gui.animate`), they will immediately be canceled.
|
|
569
569
|
*
|
|
@@ -616,7 +616,7 @@ declare global {
|
|
|
616
616
|
* gui.cancel_animations(node);
|
|
617
617
|
* ```
|
|
618
618
|
*/
|
|
619
|
-
function cancel_animations(node: Opaque<"node">, property?: string |
|
|
619
|
+
function cancel_animations(node: Opaque<"node">, property?: string | number & { readonly __brand: "gui.PROP_POSITION" } | number & { readonly __brand: "gui.PROP_ROTATION" } | number & { readonly __brand: "gui.PROP_EULER" } | number & { readonly __brand: "gui.PROP_SCALE" } | number & { readonly __brand: "gui.PROP_COLOR" } | number & { readonly __brand: "gui.PROP_OUTLINE" } | number & { readonly __brand: "gui.PROP_SHADOW" } | number & { readonly __brand: "gui.PROP_SIZE" } | number & { readonly __brand: "gui.PROP_FILL_ANGLE" } | number & { readonly __brand: "gui.PROP_INNER_RADIUS" } | number & { readonly __brand: "gui.PROP_LEADING" } | number & { readonly __brand: "gui.PROP_TRACKING" } | number & { readonly __brand: "gui.PROP_SLICE9" }): void;
|
|
620
620
|
/**
|
|
621
621
|
* Cancels any running flipbook animation on the specified node.
|
|
622
622
|
*
|
|
@@ -746,7 +746,7 @@ declare global {
|
|
|
746
746
|
* const node_position = gui.get(node, "position");
|
|
747
747
|
* ```
|
|
748
748
|
*/
|
|
749
|
-
function get(node: Opaque<"node">, property: string | Hash |
|
|
749
|
+
function get(node: Opaque<"node">, property: string | Hash | number & { readonly __brand: "gui.PROP_POSITION" } | number & { readonly __brand: "gui.PROP_ROTATION" } | number & { readonly __brand: "gui.PROP_EULER" } | number & { readonly __brand: "gui.PROP_SCALE" } | number & { readonly __brand: "gui.PROP_COLOR" } | number & { readonly __brand: "gui.PROP_OUTLINE" } | number & { readonly __brand: "gui.PROP_SHADOW" } | number & { readonly __brand: "gui.PROP_SIZE" } | number & { readonly __brand: "gui.PROP_FILL_ANGLE" } | number & { readonly __brand: "gui.PROP_INNER_RADIUS" } | number & { readonly __brand: "gui.PROP_LEADING" } | number & { readonly __brand: "gui.PROP_TRACKING" } | number & { readonly __brand: "gui.PROP_SLICE9" }, options?: { index?: number }): unknown;
|
|
750
750
|
/**
|
|
751
751
|
* Returns the adjust mode of a node.
|
|
752
752
|
* The adjust mode defines how the node will adjust itself to screen
|
|
@@ -761,7 +761,7 @@ declare global {
|
|
|
761
761
|
*
|
|
762
762
|
* - `gui.ADJUST_STRETCH`
|
|
763
763
|
*/
|
|
764
|
-
function get_adjust_mode(node: Opaque<"node">):
|
|
764
|
+
function get_adjust_mode(node: Opaque<"node">): number & { readonly __brand: "gui.ADJUST_FIT" } | number & { readonly __brand: "gui.ADJUST_ZOOM" } | number & { readonly __brand: "gui.ADJUST_STRETCH" };
|
|
765
765
|
/**
|
|
766
766
|
* gets the node alpha
|
|
767
767
|
*
|
|
@@ -786,7 +786,7 @@ declare global {
|
|
|
786
786
|
*
|
|
787
787
|
* - `gui.BLEND_SCREEN`
|
|
788
788
|
*/
|
|
789
|
-
function get_blend_mode(node: Opaque<"node">):
|
|
789
|
+
function get_blend_mode(node: Opaque<"node">): number & { readonly __brand: "gui.BLEND_ALPHA" } | number & { readonly __brand: "gui.BLEND_ADD" } | number & { readonly __brand: "gui.BLEND_ADD_ALPHA" } | number & { readonly __brand: "gui.BLEND_MULT" } | number & { readonly __brand: "gui.BLEND_SCREEN" };
|
|
790
790
|
/**
|
|
791
791
|
* If node is set as an inverted clipping node, it will clip anything inside as opposed to outside.
|
|
792
792
|
*
|
|
@@ -804,7 +804,7 @@ declare global {
|
|
|
804
804
|
*
|
|
805
805
|
* - `gui.CLIPPING_MODE_STENCIL`
|
|
806
806
|
*/
|
|
807
|
-
function get_clipping_mode(node: Opaque<"node">):
|
|
807
|
+
function get_clipping_mode(node: Opaque<"node">): number & { readonly __brand: "gui.CLIPPING_MODE_NONE" } | number & { readonly __brand: "gui.CLIPPING_MODE_STENCIL" };
|
|
808
808
|
/**
|
|
809
809
|
* If node is set as visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually.
|
|
810
810
|
*
|
|
@@ -1030,7 +1030,7 @@ declare global {
|
|
|
1030
1030
|
*
|
|
1031
1031
|
* - `gui.PIEBOUNDS_ELLIPSE`
|
|
1032
1032
|
*/
|
|
1033
|
-
function get_outer_bounds(node: Opaque<"node">):
|
|
1033
|
+
function get_outer_bounds(node: Opaque<"node">): number & { readonly __brand: "gui.PIEBOUNDS_RECTANGLE" } | number & { readonly __brand: "gui.PIEBOUNDS_ELLIPSE" };
|
|
1034
1034
|
/**
|
|
1035
1035
|
* Returns the outline color of the supplied node.
|
|
1036
1036
|
* See gui.get_color for info how vectors encode color values.
|
|
@@ -1086,7 +1086,7 @@ declare global {
|
|
|
1086
1086
|
*
|
|
1087
1087
|
* - `gui.PIVOT_NW`
|
|
1088
1088
|
*/
|
|
1089
|
-
function get_pivot(node: Opaque<"node">):
|
|
1089
|
+
function get_pivot(node: Opaque<"node">): number & { readonly __brand: "gui.PIVOT_CENTER" } | number & { readonly __brand: "gui.PIVOT_N" } | number & { readonly __brand: "gui.PIVOT_NE" } | number & { readonly __brand: "gui.PIVOT_E" } | number & { readonly __brand: "gui.PIVOT_SE" } | number & { readonly __brand: "gui.PIVOT_S" } | number & { readonly __brand: "gui.PIVOT_SW" } | number & { readonly __brand: "gui.PIVOT_W" } | number & { readonly __brand: "gui.PIVOT_NW" };
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Returns the position of the supplied node.
|
|
1092
1092
|
*
|
|
@@ -1148,7 +1148,7 @@ declare global {
|
|
|
1148
1148
|
*
|
|
1149
1149
|
* - `gui.SIZE_MODE_AUTO`
|
|
1150
1150
|
*/
|
|
1151
|
-
function get_size_mode(node: Opaque<"node">):
|
|
1151
|
+
function get_size_mode(node: Opaque<"node">): number & { readonly __brand: "gui.SIZE_MODE_MANUAL" } | number & { readonly __brand: "gui.SIZE_MODE_AUTO" };
|
|
1152
1152
|
/**
|
|
1153
1153
|
* Returns the slice9 configuration values for the node.
|
|
1154
1154
|
*
|
|
@@ -1191,7 +1191,7 @@ declare global {
|
|
|
1191
1191
|
*
|
|
1192
1192
|
* @param node - node from which to get the type
|
|
1193
1193
|
*/
|
|
1194
|
-
function get_type(node: Opaque<"node">): LuaMultiReturn<[
|
|
1194
|
+
function get_type(node: Opaque<"node">): LuaMultiReturn<[number & { readonly __brand: "gui.TYPE_BOX" } | number & { readonly __brand: "gui.TYPE_TEXT" } | number & { readonly __brand: "gui.TYPE_PIE" } | number & { readonly __brand: "gui.TYPE_PARTICLEFX" } | number & { readonly __brand: "gui.TYPE_CUSTOM" }, number | undefined]>;
|
|
1195
1195
|
/**
|
|
1196
1196
|
* Returns `true` if a node is visible and `false` if it's not.
|
|
1197
1197
|
* Invisible nodes are not rendered.
|
|
@@ -1218,7 +1218,7 @@ declare global {
|
|
|
1218
1218
|
*
|
|
1219
1219
|
* - `gui.ANCHOR_RIGHT`
|
|
1220
1220
|
*/
|
|
1221
|
-
function get_xanchor(node: Opaque<"node">):
|
|
1221
|
+
function get_xanchor(node: Opaque<"node">): number & { readonly __brand: "gui.ANCHOR_NONE" } | number & { readonly __brand: "gui.ANCHOR_LEFT" } | number & { readonly __brand: "gui.ANCHOR_RIGHT" };
|
|
1222
1222
|
/**
|
|
1223
1223
|
* The y-anchor specifies how the node is moved when the game is run in a different resolution.
|
|
1224
1224
|
*
|
|
@@ -1231,7 +1231,7 @@ declare global {
|
|
|
1231
1231
|
*
|
|
1232
1232
|
* - `gui.ANCHOR_BOTTOM`
|
|
1233
1233
|
*/
|
|
1234
|
-
function get_yanchor(node: Opaque<"node">):
|
|
1234
|
+
function get_yanchor(node: Opaque<"node">): number & { readonly __brand: "gui.ANCHOR_NONE" } | number & { readonly __brand: "gui.ANCHOR_TOP" } | number & { readonly __brand: "gui.ANCHOR_BOTTOM" };
|
|
1235
1235
|
/**
|
|
1236
1236
|
* Hides the on-display touch keyboard on the device.
|
|
1237
1237
|
*/
|
|
@@ -1771,7 +1771,7 @@ declare global {
|
|
|
1771
1771
|
* });
|
|
1772
1772
|
* ```
|
|
1773
1773
|
*/
|
|
1774
|
-
function set(node: Opaque<"node"> | Url, property: string | Hash |
|
|
1774
|
+
function set(node: Opaque<"node"> | Url, property: string | Hash | number & { readonly __brand: "gui.PROP_POSITION" } | number & { readonly __brand: "gui.PROP_ROTATION" } | number & { readonly __brand: "gui.PROP_EULER" } | number & { readonly __brand: "gui.PROP_SCALE" } | number & { readonly __brand: "gui.PROP_COLOR" } | number & { readonly __brand: "gui.PROP_OUTLINE" } | number & { readonly __brand: "gui.PROP_SHADOW" } | number & { readonly __brand: "gui.PROP_SIZE" } | number & { readonly __brand: "gui.PROP_FILL_ANGLE" } | number & { readonly __brand: "gui.PROP_INNER_RADIUS" } | number & { readonly __brand: "gui.PROP_LEADING" } | number & { readonly __brand: "gui.PROP_TRACKING" } | number & { readonly __brand: "gui.PROP_SLICE9" }, value: number | Vector4 | Vector3 | Quaternion, options?: { index?: number; key?: Hash }): void;
|
|
1775
1775
|
/**
|
|
1776
1776
|
* Sets the adjust mode on a node.
|
|
1777
1777
|
* The adjust mode defines how the node will adjust itself to screen
|
|
@@ -1786,7 +1786,7 @@ declare global {
|
|
|
1786
1786
|
*
|
|
1787
1787
|
* - `gui.ADJUST_STRETCH`
|
|
1788
1788
|
*/
|
|
1789
|
-
function set_adjust_mode(node: Opaque<"node">, adjust_mode:
|
|
1789
|
+
function set_adjust_mode(node: Opaque<"node">, adjust_mode: number & { readonly __brand: "gui.ADJUST_FIT" } | number & { readonly __brand: "gui.ADJUST_ZOOM" } | number & { readonly __brand: "gui.ADJUST_STRETCH" }): void;
|
|
1790
1790
|
/**
|
|
1791
1791
|
* sets the node alpha
|
|
1792
1792
|
*
|
|
@@ -1811,7 +1811,7 @@ declare global {
|
|
|
1811
1811
|
*
|
|
1812
1812
|
* - `gui.BLEND_SCREEN`
|
|
1813
1813
|
*/
|
|
1814
|
-
function set_blend_mode(node: Opaque<"node">, blend_mode:
|
|
1814
|
+
function set_blend_mode(node: Opaque<"node">, blend_mode: number & { readonly __brand: "gui.BLEND_ALPHA" } | number & { readonly __brand: "gui.BLEND_ADD" } | number & { readonly __brand: "gui.BLEND_ADD_ALPHA" } | number & { readonly __brand: "gui.BLEND_MULT" } | number & { readonly __brand: "gui.BLEND_SCREEN" }): void;
|
|
1815
1815
|
/**
|
|
1816
1816
|
* If node is set as an inverted clipping node, it will clip anything inside as opposed to outside.
|
|
1817
1817
|
*
|
|
@@ -1829,7 +1829,7 @@ declare global {
|
|
|
1829
1829
|
*
|
|
1830
1830
|
* - `gui.CLIPPING_MODE_STENCIL`
|
|
1831
1831
|
*/
|
|
1832
|
-
function set_clipping_mode(node: Opaque<"node">, clipping_mode:
|
|
1832
|
+
function set_clipping_mode(node: Opaque<"node">, clipping_mode: number & { readonly __brand: "gui.CLIPPING_MODE_NONE" } | number & { readonly __brand: "gui.CLIPPING_MODE_STENCIL" }): void;
|
|
1833
1833
|
/**
|
|
1834
1834
|
* If node is set as an visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually.
|
|
1835
1835
|
*
|
|
@@ -1997,7 +1997,7 @@ declare global {
|
|
|
1997
1997
|
*
|
|
1998
1998
|
* - `gui.PIEBOUNDS_ELLIPSE`
|
|
1999
1999
|
*/
|
|
2000
|
-
function set_outer_bounds(node: Opaque<"node">, bounds_mode:
|
|
2000
|
+
function set_outer_bounds(node: Opaque<"node">, bounds_mode: number & { readonly __brand: "gui.PIEBOUNDS_RECTANGLE" } | number & { readonly __brand: "gui.PIEBOUNDS_ELLIPSE" }): void;
|
|
2001
2001
|
/**
|
|
2002
2002
|
* Sets the outline color of the supplied node.
|
|
2003
2003
|
* See gui.set_color for info how vectors encode color values.
|
|
@@ -2052,7 +2052,7 @@ declare global {
|
|
|
2052
2052
|
*
|
|
2053
2053
|
* - `gui.PIVOT_NW`
|
|
2054
2054
|
*/
|
|
2055
|
-
function set_pivot(node: Opaque<"node">, pivot:
|
|
2055
|
+
function set_pivot(node: Opaque<"node">, pivot: number & { readonly __brand: "gui.PIVOT_CENTER" } | number & { readonly __brand: "gui.PIVOT_N" } | number & { readonly __brand: "gui.PIVOT_NE" } | number & { readonly __brand: "gui.PIVOT_E" } | number & { readonly __brand: "gui.PIVOT_SE" } | number & { readonly __brand: "gui.PIVOT_S" } | number & { readonly __brand: "gui.PIVOT_SW" } | number & { readonly __brand: "gui.PIVOT_W" } | number & { readonly __brand: "gui.PIVOT_NW" }): void;
|
|
2056
2056
|
/**
|
|
2057
2057
|
* Sets the position of the supplied node.
|
|
2058
2058
|
*
|
|
@@ -2091,7 +2091,7 @@ declare global {
|
|
|
2091
2091
|
*
|
|
2092
2092
|
* - `gui.SAFE_AREA_BOTH`
|
|
2093
2093
|
*/
|
|
2094
|
-
function set_safe_area_mode(mode:
|
|
2094
|
+
function set_safe_area_mode(mode: number & { readonly __brand: "gui.SAFE_AREA_NONE" } | number & { readonly __brand: "gui.SAFE_AREA_LONG" } | number & { readonly __brand: "gui.SAFE_AREA_SHORT" } | number & { readonly __brand: "gui.SAFE_AREA_BOTH" }): void;
|
|
2095
2095
|
/**
|
|
2096
2096
|
* Sets the scaling of the supplied node.
|
|
2097
2097
|
*
|
|
@@ -2137,7 +2137,7 @@ declare global {
|
|
|
2137
2137
|
*
|
|
2138
2138
|
* - `gui.SIZE_MODE_AUTO`
|
|
2139
2139
|
*/
|
|
2140
|
-
function set_size_mode(node: Opaque<"node">, size_mode:
|
|
2140
|
+
function set_size_mode(node: Opaque<"node">, size_mode: number & { readonly __brand: "gui.SIZE_MODE_MANUAL" } | number & { readonly __brand: "gui.SIZE_MODE_AUTO" }): void;
|
|
2141
2141
|
/**
|
|
2142
2142
|
* Set the slice9 configuration values for the node.
|
|
2143
2143
|
*
|
|
@@ -2257,7 +2257,7 @@ declare global {
|
|
|
2257
2257
|
*
|
|
2258
2258
|
* - `gui.ANCHOR_RIGHT`
|
|
2259
2259
|
*/
|
|
2260
|
-
function set_xanchor(node: Opaque<"node">, anchor:
|
|
2260
|
+
function set_xanchor(node: Opaque<"node">, anchor: number & { readonly __brand: "gui.ANCHOR_NONE" } | number & { readonly __brand: "gui.ANCHOR_LEFT" } | number & { readonly __brand: "gui.ANCHOR_RIGHT" }): void;
|
|
2261
2261
|
/**
|
|
2262
2262
|
* The y-anchor specifies how the node is moved when the game is run in a different resolution.
|
|
2263
2263
|
*
|
|
@@ -2270,7 +2270,7 @@ declare global {
|
|
|
2270
2270
|
*
|
|
2271
2271
|
* - `gui.ANCHOR_BOTTOM`
|
|
2272
2272
|
*/
|
|
2273
|
-
function set_yanchor(node: Opaque<"node">, anchor:
|
|
2273
|
+
function set_yanchor(node: Opaque<"node">, anchor: number & { readonly __brand: "gui.ANCHOR_NONE" } | number & { readonly __brand: "gui.ANCHOR_TOP" } | number & { readonly __brand: "gui.ANCHOR_BOTTOM" }): void;
|
|
2274
2274
|
/**
|
|
2275
2275
|
* Shows the on-display touch keyboard.
|
|
2276
2276
|
* The specified type of keyboard is displayed if it is available on
|
|
@@ -2288,7 +2288,7 @@ declare global {
|
|
|
2288
2288
|
* - `gui.KEYBOARD_TYPE_PASSWORD`
|
|
2289
2289
|
* @param autoclose - if the keyboard should automatically close when clicking outside
|
|
2290
2290
|
*/
|
|
2291
|
-
function show_keyboard(type:
|
|
2291
|
+
function show_keyboard(type: number & { readonly __brand: "gui.KEYBOARD_TYPE_DEFAULT" } | number & { readonly __brand: "gui.KEYBOARD_TYPE_EMAIL" } | number & { readonly __brand: "gui.KEYBOARD_TYPE_NUMBER_PAD" } | number & { readonly __brand: "gui.KEYBOARD_TYPE_PASSWORD" }, autoclose: boolean): void;
|
|
2292
2292
|
/**
|
|
2293
2293
|
* Stops the particle fx for a gui node
|
|
2294
2294
|
*
|
|
@@ -14,8 +14,6 @@ import "./graphics";
|
|
|
14
14
|
import "./gui";
|
|
15
15
|
import "./html5";
|
|
16
16
|
import "./http";
|
|
17
|
-
import "./iac";
|
|
18
|
-
import "./iap";
|
|
19
17
|
import "./image";
|
|
20
18
|
import "./json";
|
|
21
19
|
import "./label";
|
|
@@ -25,7 +23,6 @@ import "./msg";
|
|
|
25
23
|
import "./particlefx";
|
|
26
24
|
import "./physics";
|
|
27
25
|
import "./profiler";
|
|
28
|
-
import "./push";
|
|
29
26
|
import "./render";
|
|
30
27
|
import "./resource";
|
|
31
28
|
import "./socket";
|
|
@@ -36,8 +33,16 @@ import "./tilemap";
|
|
|
36
33
|
import "./timer";
|
|
37
34
|
import "./types";
|
|
38
35
|
import "./vmath";
|
|
39
|
-
import "./webview";
|
|
40
36
|
import "./window";
|
|
41
37
|
import "./zlib";
|
|
38
|
+
import "../../../src/custom-messages";
|
|
39
|
+
import "../../../src/engine-globals";
|
|
40
|
+
import "../../../src/msg-overloads";
|
|
41
|
+
import "../../../src/message-guard";
|
|
42
|
+
import "../../../src/window-event-guard";
|
|
43
|
+
import "../../../src/scene-addresses";
|
|
44
|
+
import "../../../src/go-overloads";
|
|
45
|
+
import "../../../src/render-overloads";
|
|
46
|
+
import "../../../src/vmath-overloads";
|
|
42
47
|
|
|
43
48
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import type { Hash,
|
|
2
|
+
import type { Hash, Url, Vector3 } from "../../../src/core-types";
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
5
|
/**
|
|
@@ -158,7 +158,7 @@ declare global {
|
|
|
158
158
|
* });
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
|
-
function play_anim(url: string | Hash | Url, anim_id: string | Hash, playback:
|
|
161
|
+
function play_anim(url: string | Hash | Url, anim_id: string | Hash, playback: number & { readonly __brand: "go.PLAYBACK_ONCE_FORWARD" } | number & { readonly __brand: "go.PLAYBACK_ONCE_BACKWARD" } | number & { readonly __brand: "go.PLAYBACK_ONCE_PINGPONG" } | number & { readonly __brand: "go.PLAYBACK_LOOP_FORWARD" } | number & { readonly __brand: "go.PLAYBACK_LOOP_BACKWARD" } | number & { readonly __brand: "go.PLAYBACK_LOOP_PINGPONG" }, play_properties?: { blend_duration?: number; offset?: number; playback_rate?: number }, complete_function?: (self: unknown, message_id: unknown, message: unknown, sender: unknown) => void): void;
|
|
162
162
|
/**
|
|
163
163
|
* Enable or disable visibility of a mesh
|
|
164
164
|
*
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import type { Opaque } from "../../../src/core-types";
|
|
3
|
-
|
|
4
2
|
declare global {
|
|
5
3
|
/**
|
|
6
4
|
* Functions for getting profiling data in runtime.
|
|
@@ -176,7 +174,7 @@ declare global {
|
|
|
176
174
|
* }
|
|
177
175
|
* ```
|
|
178
176
|
*/
|
|
179
|
-
function set_ui_mode(mode:
|
|
177
|
+
function set_ui_mode(mode: number & { readonly __brand: "profiler.MODE_RUN" } | number & { readonly __brand: "profiler.MODE_PAUSE" } | number & { readonly __brand: "profiler.MODE_SHOW_PEAK_FRAME" } | number & { readonly __brand: "profiler.MODE_RECORD" }): void;
|
|
180
178
|
/**
|
|
181
179
|
* Set the on-screen profile view mode - minimized or expanded
|
|
182
180
|
*
|
|
@@ -191,7 +189,7 @@ declare global {
|
|
|
191
189
|
* profiler.set_ui_view_mode(profiler.VIEW_MODE_MINIMIZED);
|
|
192
190
|
* ```
|
|
193
191
|
*/
|
|
194
|
-
function set_ui_view_mode(mode:
|
|
192
|
+
function set_ui_view_mode(mode: number & { readonly __brand: "profiler.VIEW_MODE_FULL" } | number & { readonly __brand: "profiler.VIEW_MODE_MINIMIZED" }): void;
|
|
195
193
|
/**
|
|
196
194
|
* Shows or hides the time the engine waits for vsync in the on-screen profiler
|
|
197
195
|
* Each frame the engine waits for vsync and depending on your vsync settings and how much time
|