@defold-typescript/types 0.36.0 → 0.38.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 +42 -42
- package/examples/translations.json +5 -5
- package/generated/b2d.d.ts +1 -1
- package/generated/b2d_body.d.ts +6 -4
- package/generated/b2d_fixture.d.ts +6 -4
- package/generated/b2d_shape.d.ts +6 -4
- package/generated/resource.d.ts +4 -4
- package/generated/sys.d.ts +2 -2
- package/generated/versions/defold-1.12.4/b2d.d.ts +1 -1
- package/generated/versions/defold-1.12.4/resource.d.ts +4 -4
- package/generated/versions/defold-1.12.4/sys.d.ts +2 -2
- package/generated/versions/defold-1.12.4/window.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +6 -4
- package/generated/versions/defold-1.13.0/b2d_fixture.d.ts +6 -4
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +6 -4
- package/generated/versions/defold-1.13.0/resource.d.ts +4 -4
- package/generated/versions/defold-1.13.0/sys.d.ts +2 -2
- package/generated/versions/defold-1.13.0/window.d.ts +1 -1
- package/generated/window.d.ts +1 -1
- package/package.json +1 -1
- package/src/emit-dts.ts +182 -8
- package/src/lifecycle.ts +31 -8
- package/src/message-dispatch.d.ts +55 -13
- package/src/msg-overloads.d.ts +73 -3
- package/src/return-correction-provenance.ts +306 -0
package/api-signatures.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"versions": {
|
|
3
3
|
"1.13.1": {
|
|
4
|
-
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": "function get_body(url: string | Hash | Url): Opaque<\"b2Body\"
|
|
4
|
+
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": "function get_body(url: string | Hash | Url): Opaque<\"b2Body\"> | undefined;",
|
|
5
5
|
"b2d\u0000FUNCTION\u0000b2d.get_version\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_version(): { version: number; major: number; middle: number; minor: number };",
|
|
6
6
|
"b2d\u0000FUNCTION\u0000b2d.get_world\u0000[]->[{\"types\":[\"b2World\"],\"isOptional\":false}]": "function get_world(): Opaque<\"b2World\">;",
|
|
7
7
|
"b2d\u0000TYPEDEF\u0000b2Body\u0000": "type b2Body = Opaque<\"b2Body\">;",
|
|
@@ -921,10 +921,10 @@
|
|
|
921
921
|
"model\u0000PROPERTY\u0000cursor\u0000": "cursor: number;",
|
|
922
922
|
"model\u0000PROPERTY\u0000playback_rate\u0000": "playback_rate: number;",
|
|
923
923
|
"model\u0000PROPERTY\u0000textureN\u0000": "textureN: Hash;",
|
|
924
|
-
"msg\u0000FUNCTION\u0000msg.post\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"nil\",\"table\"],\"isOptional\":true}]->[]": "msg.post<K extends
|
|
925
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
926
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
927
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
924
|
+
"msg\u0000FUNCTION\u0000msg.post\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"nil\",\"table\"],\"isOptional\":true}]->[]": "msg.post<R extends SceneAddress | Hash | Url, K extends (keyof ReceiverMessages<R> & string) | MessageId | (string & {})>(receiver: R, message_id: K, message?: K extends BuiltinMessageId ? MessagePayload<K> : K extends keyof ReceiverMessages<R> ? ReceiverMessages<R>[K] : MessagePayload<K>): void\nmsg.post(receiver: SceneAddress | Url | Hash, message_id: Hash, message?: Record<string | number, unknown>): void",
|
|
925
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
926
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
927
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
928
928
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_POSTSPAWN\u0000": "const EMITTER_STATE_POSTSPAWN: number & { readonly __brand: \"particlefx.EMITTER_STATE_POSTSPAWN\" };",
|
|
929
929
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_PRESPAWN\u0000": "const EMITTER_STATE_PRESPAWN: number & { readonly __brand: \"particlefx.EMITTER_STATE_PRESPAWN\" };",
|
|
930
930
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_SLEEPING\u0000": "const EMITTER_STATE_SLEEPING: number & { readonly __brand: \"particlefx.EMITTER_STATE_SLEEPING\" };",
|
|
@@ -1049,7 +1049,7 @@
|
|
|
1049
1049
|
"resource\u0000FUNCTION\u0000resource.font\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"hash\"],\"isOptional\":false}]": "function font(path?: string): Hash;",
|
|
1050
1050
|
"resource\u0000FUNCTION\u0000resource.get_atlas\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_atlas(path: Hash | string): { texture: string | Hash; animations: { id: string; width: number; height: number; frame_start: number; frame_end: number; playback: Opaque<\"constant\">; fps: number; flip_vertical: boolean; flip_horizontal: boolean }[]; geometries: { vertices: number[]; uvs: number[]; indices: number[] }[] };",
|
|
1051
1051
|
"resource\u0000FUNCTION\u0000resource.get_buffer\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function get_buffer(path: Hash | string): Opaque<\"buffer\">;",
|
|
1052
|
-
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_render_target_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
1052
|
+
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_render_target_info(path: Hash | string | number): { handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] };",
|
|
1053
1053
|
"resource\u0000FUNCTION\u0000resource.get_text_metrics\u0000[{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_text_metrics(url: Hash, text: string, options?: { width?: number; leading?: number; tracking?: number; line_break?: boolean }): { width: number; height: number; max_ascent: number; max_descent: number };",
|
|
1054
1054
|
"resource\u0000FUNCTION\u0000resource.get_texture_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_texture_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; page_count: number; mipmaps: number; flags: number; type: number };",
|
|
1055
1055
|
"resource\u0000FUNCTION\u0000resource.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function load(path: string): Opaque<\"buffer\">;",
|
|
@@ -1184,9 +1184,9 @@
|
|
|
1184
1184
|
"sys\u0000FUNCTION\u0000sys.get_connectivity\u0000[]->[{\"types\":[\"constant\"],\"isOptional\":false}]": "function get_connectivity(): number & { readonly __brand: \"sys.NETWORK_DISCONNECTED\" } | number & { readonly __brand: \"sys.NETWORK_CONNECTED_CELLULAR\" } | number & { readonly __brand: \"sys.NETWORK_CONNECTED\" };",
|
|
1185
1185
|
"sys\u0000FUNCTION\u0000sys.get_engine_info\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_engine_info(): { version: string; version_sha1: string; is_debug: boolean };",
|
|
1186
1186
|
"sys\u0000FUNCTION\u0000sys.get_host_path\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_host_path(filename: string): string;",
|
|
1187
|
-
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_ifaddrs(): { name: string; address
|
|
1187
|
+
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_ifaddrs(): { name: string; address?: string; mac?: string; up: boolean; running: boolean }[];",
|
|
1188
1188
|
"sys\u0000FUNCTION\u0000sys.get_save_file\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_save_file(application_id: string, file_name: string): string;",
|
|
1189
|
-
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_sys_info(options?: { ignore_secure?: boolean }): { device_model
|
|
1189
|
+
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_sys_info(options?: { ignore_secure?: boolean }): { device_model?: string; manufacturer?: string; system_name: string; system_version: string; api_version: string; language: string; device_language: string; territory: string; gmt_offset: number; device_ident?: string; user_agent?: string };",
|
|
1190
1190
|
"sys\u0000FUNCTION\u0000sys.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function load(filename: string): Record<string | number, unknown>;",
|
|
1191
1191
|
"sys\u0000FUNCTION\u0000sys.load_buffer\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function load_buffer(path: string): Opaque<\"buffer\">;",
|
|
1192
1192
|
"sys\u0000FUNCTION\u0000sys.load_buffer_async\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"function(self, request_id, result)\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function load_buffer_async(path: string, status_callback: (self: unknown, request_id: unknown, result: unknown) => void): number;",
|
|
@@ -1292,7 +1292,7 @@
|
|
|
1292
1292
|
"window\u0000FUNCTION\u0000window.get_dim_mode\u0000[]->[{\"types\":[\"constant\"],\"isOptional\":false}]": "function get_dim_mode(): number & { readonly __brand: \"window.DIMMING_UNKNOWN\" } | number & { readonly __brand: \"window.DIMMING_ON\" } | number & { readonly __brand: \"window.DIMMING_OFF\" };",
|
|
1293
1293
|
"window\u0000FUNCTION\u0000window.get_display_scale\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_display_scale(): number;",
|
|
1294
1294
|
"window\u0000FUNCTION\u0000window.get_mouse_lock\u0000[]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function get_mouse_lock(): boolean;",
|
|
1295
|
-
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_safe_area(): {
|
|
1295
|
+
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_safe_area(): { x: number; y: number; width: number; height: number; inset_left: number; inset_top: number; inset_right: number; inset_bottom: number };",
|
|
1296
1296
|
"window\u0000FUNCTION\u0000window.get_size\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]": "function get_size(): LuaMultiReturn<[number, number]>;",
|
|
1297
1297
|
"window\u0000FUNCTION\u0000window.set_dim_mode\u0000[{\"types\":[\"constant\"],\"isOptional\":false}]->[]": "function set_dim_mode(mode: number & { readonly __brand: \"window.DIMMING_ON\" } | number & { readonly __brand: \"window.DIMMING_OFF\" }): void;",
|
|
1298
1298
|
"window\u0000FUNCTION\u0000window.set_listener\u0000[{\"types\":[\"function(self, event, data)\",\"nil\"],\"isOptional\":false}]->[]": "function set_listener(callback?: (self: unknown, event: typeof WINDOW_EVENT_FOCUS_LOST | typeof WINDOW_EVENT_FOCUS_GAINED | typeof WINDOW_EVENT_RESIZED | typeof WINDOW_EVENT_ICONFIED | typeof WINDOW_EVENT_DEICONIFIED, data: Record<string | number, unknown>) => void): void;",
|
|
@@ -1304,7 +1304,7 @@
|
|
|
1304
1304
|
"zlib\u0000FUNCTION\u0000zlib.inflate\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function inflate(buf: string): string;"
|
|
1305
1305
|
},
|
|
1306
1306
|
"1.13.0": {
|
|
1307
|
-
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": "function get_body(url: string | Hash | Url): Opaque<\"b2Body\"
|
|
1307
|
+
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": "function get_body(url: string | Hash | Url): Opaque<\"b2Body\"> | undefined;",
|
|
1308
1308
|
"b2d\u0000FUNCTION\u0000b2d.get_version\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_version(): { version: number; major: number; middle: number; minor: number };",
|
|
1309
1309
|
"b2d\u0000FUNCTION\u0000b2d.get_world\u0000[]->[{\"types\":[\"b2World\"],\"isOptional\":false}]": "function get_world(): Opaque<\"b2World\">;",
|
|
1310
1310
|
"b2d\u0000TYPEDEF\u0000b2Body\u0000": "type b2Body = Opaque<\"b2Body\">;",
|
|
@@ -2223,10 +2223,10 @@
|
|
|
2223
2223
|
"model\u0000PROPERTY\u0000cursor\u0000": "cursor: number;",
|
|
2224
2224
|
"model\u0000PROPERTY\u0000playback_rate\u0000": "playback_rate: number;",
|
|
2225
2225
|
"model\u0000PROPERTY\u0000textureN\u0000": "textureN: Hash;",
|
|
2226
|
-
"msg\u0000FUNCTION\u0000msg.post\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"nil\",\"table\"],\"isOptional\":true}]->[]": "msg.post<K extends
|
|
2227
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
2228
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
2229
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
2226
|
+
"msg\u0000FUNCTION\u0000msg.post\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"nil\",\"table\"],\"isOptional\":true}]->[]": "msg.post<R extends SceneAddress | Hash | Url, K extends (keyof ReceiverMessages<R> & string) | MessageId | (string & {})>(receiver: R, message_id: K, message?: K extends BuiltinMessageId ? MessagePayload<K> : K extends keyof ReceiverMessages<R> ? ReceiverMessages<R>[K] : MessagePayload<K>): void\nmsg.post(receiver: SceneAddress | Url | Hash, message_id: Hash, message?: Record<string | number, unknown>): void",
|
|
2227
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
2228
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
2229
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
2230
2230
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_POSTSPAWN\u0000": "const EMITTER_STATE_POSTSPAWN: number & { readonly __brand: \"particlefx.EMITTER_STATE_POSTSPAWN\" };",
|
|
2231
2231
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_PRESPAWN\u0000": "const EMITTER_STATE_PRESPAWN: number & { readonly __brand: \"particlefx.EMITTER_STATE_PRESPAWN\" };",
|
|
2232
2232
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_SLEEPING\u0000": "const EMITTER_STATE_SLEEPING: number & { readonly __brand: \"particlefx.EMITTER_STATE_SLEEPING\" };",
|
|
@@ -2351,7 +2351,7 @@
|
|
|
2351
2351
|
"resource\u0000FUNCTION\u0000resource.font\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"hash\"],\"isOptional\":false}]": "function font(path?: string): Hash;",
|
|
2352
2352
|
"resource\u0000FUNCTION\u0000resource.get_atlas\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_atlas(path: Hash | string): { texture: string | Hash; animations: { id: string; width: number; height: number; frame_start: number; frame_end: number; playback: Opaque<\"constant\">; fps: number; flip_vertical: boolean; flip_horizontal: boolean }[]; geometries: { vertices: number[]; uvs: number[]; indices: number[] }[] };",
|
|
2353
2353
|
"resource\u0000FUNCTION\u0000resource.get_buffer\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function get_buffer(path: Hash | string): Opaque<\"buffer\">;",
|
|
2354
|
-
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_render_target_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
2354
|
+
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_render_target_info(path: Hash | string | number): { handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] };",
|
|
2355
2355
|
"resource\u0000FUNCTION\u0000resource.get_text_metrics\u0000[{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_text_metrics(url: Hash, text: string, options?: { width?: number; leading?: number; tracking?: number; line_break?: boolean }): { width: number; height: number; max_ascent: number; max_descent: number };",
|
|
2356
2356
|
"resource\u0000FUNCTION\u0000resource.get_texture_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_texture_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; page_count: number; mipmaps: number; flags: number; type: number };",
|
|
2357
2357
|
"resource\u0000FUNCTION\u0000resource.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function load(path: string): Opaque<\"buffer\">;",
|
|
@@ -2486,9 +2486,9 @@
|
|
|
2486
2486
|
"sys\u0000FUNCTION\u0000sys.get_connectivity\u0000[]->[{\"types\":[\"constant\"],\"isOptional\":false}]": "function get_connectivity(): number & { readonly __brand: \"sys.NETWORK_DISCONNECTED\" } | number & { readonly __brand: \"sys.NETWORK_CONNECTED_CELLULAR\" } | number & { readonly __brand: \"sys.NETWORK_CONNECTED\" };",
|
|
2487
2487
|
"sys\u0000FUNCTION\u0000sys.get_engine_info\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_engine_info(): { version: string; version_sha1: string; is_debug: boolean };",
|
|
2488
2488
|
"sys\u0000FUNCTION\u0000sys.get_host_path\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_host_path(filename: string): string;",
|
|
2489
|
-
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_ifaddrs(): { name: string; address
|
|
2489
|
+
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_ifaddrs(): { name: string; address?: string; mac?: string; up: boolean; running: boolean }[];",
|
|
2490
2490
|
"sys\u0000FUNCTION\u0000sys.get_save_file\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_save_file(application_id: string, file_name: string): string;",
|
|
2491
|
-
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_sys_info(options?: { ignore_secure?: boolean }): { device_model
|
|
2491
|
+
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_sys_info(options?: { ignore_secure?: boolean }): { device_model?: string; manufacturer?: string; system_name: string; system_version: string; api_version: string; language: string; device_language: string; territory: string; gmt_offset: number; device_ident?: string; user_agent?: string };",
|
|
2492
2492
|
"sys\u0000FUNCTION\u0000sys.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function load(filename: string): Record<string | number, unknown>;",
|
|
2493
2493
|
"sys\u0000FUNCTION\u0000sys.load_buffer\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function load_buffer(path: string): Opaque<\"buffer\">;",
|
|
2494
2494
|
"sys\u0000FUNCTION\u0000sys.load_buffer_async\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"function(self, request_id, result)\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function load_buffer_async(path: string, status_callback: (self: unknown, request_id: unknown, result: unknown) => void): number;",
|
|
@@ -2594,7 +2594,7 @@
|
|
|
2594
2594
|
"window\u0000FUNCTION\u0000window.get_dim_mode\u0000[]->[{\"types\":[\"constant\"],\"isOptional\":false}]": "function get_dim_mode(): number & { readonly __brand: \"window.DIMMING_UNKNOWN\" } | number & { readonly __brand: \"window.DIMMING_ON\" } | number & { readonly __brand: \"window.DIMMING_OFF\" };",
|
|
2595
2595
|
"window\u0000FUNCTION\u0000window.get_display_scale\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_display_scale(): number;",
|
|
2596
2596
|
"window\u0000FUNCTION\u0000window.get_mouse_lock\u0000[]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function get_mouse_lock(): boolean;",
|
|
2597
|
-
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_safe_area(): {
|
|
2597
|
+
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_safe_area(): { x: number; y: number; width: number; height: number; inset_left: number; inset_top: number; inset_right: number; inset_bottom: number };",
|
|
2598
2598
|
"window\u0000FUNCTION\u0000window.get_size\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]": "function get_size(): LuaMultiReturn<[number, number]>;",
|
|
2599
2599
|
"window\u0000FUNCTION\u0000window.set_dim_mode\u0000[{\"types\":[\"constant\"],\"isOptional\":false}]->[]": "function set_dim_mode(mode: number & { readonly __brand: \"window.DIMMING_ON\" } | number & { readonly __brand: \"window.DIMMING_OFF\" }): void;",
|
|
2600
2600
|
"window\u0000FUNCTION\u0000window.set_listener\u0000[{\"types\":[\"function(self, event, data)\",\"nil\"],\"isOptional\":false}]->[]": "function set_listener(callback?: (self: unknown, event: typeof WINDOW_EVENT_FOCUS_LOST | typeof WINDOW_EVENT_FOCUS_GAINED | typeof WINDOW_EVENT_RESIZED | typeof WINDOW_EVENT_ICONFIED | typeof WINDOW_EVENT_DEICONIFIED, data: Record<string | number, unknown>) => void): void;",
|
|
@@ -2606,7 +2606,7 @@
|
|
|
2606
2606
|
"zlib\u0000FUNCTION\u0000zlib.inflate\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function inflate(buf: string): string;"
|
|
2607
2607
|
},
|
|
2608
2608
|
"1.12.4": {
|
|
2609
|
-
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": "function get_body(url: string | Hash | Url): Opaque<\"b2Body\"
|
|
2609
|
+
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": "function get_body(url: string | Hash | Url): Opaque<\"b2Body\"> | undefined;",
|
|
2610
2610
|
"b2d\u0000FUNCTION\u0000b2d.get_world\u0000[]->[{\"types\":[\"b2World\"],\"isOptional\":false}]": "function get_world(): Opaque<\"b2World\">;",
|
|
2611
2611
|
"b2d\u0000TYPEDEF\u0000b2Body\u0000": "type b2Body = Opaque<\"b2Body\">;",
|
|
2612
2612
|
"b2d\u0000TYPEDEF\u0000b2World\u0000": "type b2World = Opaque<\"b2World\">;",
|
|
@@ -3227,10 +3227,10 @@
|
|
|
3227
3227
|
"model\u0000PROPERTY\u0000material\u0000": "material: Hash;",
|
|
3228
3228
|
"model\u0000PROPERTY\u0000playback_rate\u0000": "playback_rate: number;",
|
|
3229
3229
|
"model\u0000PROPERTY\u0000textureN\u0000": "textureN: Hash;",
|
|
3230
|
-
"msg\u0000FUNCTION\u0000msg.post\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"nil\",\"table\"],\"isOptional\":true}]->[]": "msg.post<K extends
|
|
3231
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
3232
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
3233
|
-
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url",
|
|
3230
|
+
"msg\u0000FUNCTION\u0000msg.post\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"nil\",\"table\"],\"isOptional\":true}]->[]": "msg.post<R extends SceneAddress | Hash | Url, K extends (keyof ReceiverMessages<R> & string) | MessageId | (string & {})>(receiver: R, message_id: K, message?: K extends BuiltinMessageId ? MessagePayload<K> : K extends keyof ReceiverMessages<R> ? ReceiverMessages<R>[K] : MessagePayload<K>): void\nmsg.post(receiver: SceneAddress | Url | Hash, message_id: Hash, message?: Record<string | number, unknown>): void",
|
|
3231
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
3232
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
3233
|
+
"msg\u0000FUNCTION\u0000msg.url\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"url\"],\"isOptional\":false}]": "msg.url(): Url\nmsg.url(urlstring: SceneAddress | undefined): Url\nmsg.url(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): Url\nmsg.url<M extends object>(): ReceiverUrl<M>\nmsg.url<M extends object>(urlstring: SceneAddress | undefined): ReceiverUrl<M>\nmsg.url<M extends object>(socket: string | Hash | undefined, path: string | Hash, fragment: string | Hash): ReceiverUrl<M>",
|
|
3234
3234
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_POSTSPAWN\u0000": "const EMITTER_STATE_POSTSPAWN: number & { readonly __brand: \"particlefx.EMITTER_STATE_POSTSPAWN\" };",
|
|
3235
3235
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_PRESPAWN\u0000": "const EMITTER_STATE_PRESPAWN: number & { readonly __brand: \"particlefx.EMITTER_STATE_PRESPAWN\" };",
|
|
3236
3236
|
"particlefx\u0000CONSTANT\u0000particlefx.EMITTER_STATE_SLEEPING\u0000": "const EMITTER_STATE_SLEEPING: number & { readonly __brand: \"particlefx.EMITTER_STATE_SLEEPING\" };",
|
|
@@ -3353,7 +3353,7 @@
|
|
|
3353
3353
|
"resource\u0000FUNCTION\u0000resource.font\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"hash\"],\"isOptional\":false}]": "function font(path?: string): Hash;",
|
|
3354
3354
|
"resource\u0000FUNCTION\u0000resource.get_atlas\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_atlas(path: Hash | string): { texture: string | Hash; animations: { id: string; width: number; height: number; frame_start: number; frame_end: number; playback: Opaque<\"constant\">; fps: number; flip_vertical: boolean; flip_horizontal: boolean }[]; geometries: { vertices: number[]; uvs: number[]; indices: number[] }[] };",
|
|
3355
3355
|
"resource\u0000FUNCTION\u0000resource.get_buffer\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function get_buffer(path: Hash | string): Opaque<\"buffer\">;",
|
|
3356
|
-
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_render_target_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
3356
|
+
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_render_target_info(path: Hash | string | number): { handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] };",
|
|
3357
3357
|
"resource\u0000FUNCTION\u0000resource.get_text_metrics\u0000[{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_text_metrics(url: Hash, text: string, options?: { width?: number; leading?: number; tracking?: number; line_break?: boolean }): { width: number; height: number; max_ascent: number; max_descent: number };",
|
|
3358
3358
|
"resource\u0000FUNCTION\u0000resource.get_texture_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_texture_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; page_count: number; mipmaps: number; flags: number; type: number };",
|
|
3359
3359
|
"resource\u0000FUNCTION\u0000resource.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function load(path: string): Opaque<\"buffer\">;",
|
|
@@ -3487,9 +3487,9 @@
|
|
|
3487
3487
|
"sys\u0000FUNCTION\u0000sys.get_connectivity\u0000[]->[{\"types\":[\"constant\"],\"isOptional\":false}]": "function get_connectivity(): number & { readonly __brand: \"sys.NETWORK_DISCONNECTED\" } | number & { readonly __brand: \"sys.NETWORK_CONNECTED_CELLULAR\" } | number & { readonly __brand: \"sys.NETWORK_CONNECTED\" };",
|
|
3488
3488
|
"sys\u0000FUNCTION\u0000sys.get_engine_info\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_engine_info(): { version: string; version_sha1: string; is_debug: boolean };",
|
|
3489
3489
|
"sys\u0000FUNCTION\u0000sys.get_host_path\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_host_path(filename: string): string;",
|
|
3490
|
-
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_ifaddrs(): { name: string; address
|
|
3490
|
+
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_ifaddrs(): { name: string; address?: string; mac?: string; up: boolean; running: boolean }[];",
|
|
3491
3491
|
"sys\u0000FUNCTION\u0000sys.get_save_file\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_save_file(application_id: string, file_name: string): string;",
|
|
3492
|
-
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_sys_info(options?: { ignore_secure?: boolean }): { device_model
|
|
3492
|
+
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_sys_info(options?: { ignore_secure?: boolean }): { device_model?: string; manufacturer?: string; system_name: string; system_version: string; api_version: string; language: string; device_language: string; territory: string; gmt_offset: number; device_ident?: string; user_agent?: string };",
|
|
3493
3493
|
"sys\u0000FUNCTION\u0000sys.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function load(filename: string): Record<string | number, unknown>;",
|
|
3494
3494
|
"sys\u0000FUNCTION\u0000sys.load_buffer\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"buffer\"],\"isOptional\":false}]": "function load_buffer(path: string): Opaque<\"buffer\">;",
|
|
3495
3495
|
"sys\u0000FUNCTION\u0000sys.load_buffer_async\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"function(self, request_id, result)\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function load_buffer_async(path: string, status_callback: (self: unknown, request_id: unknown, result: unknown) => void): number;",
|
|
@@ -3594,7 +3594,7 @@
|
|
|
3594
3594
|
"window\u0000FUNCTION\u0000window.get_dim_mode\u0000[]->[{\"types\":[\"constant\"],\"isOptional\":false}]": "function get_dim_mode(): number & { readonly __brand: \"window.DIMMING_UNKNOWN\" } | number & { readonly __brand: \"window.DIMMING_ON\" } | number & { readonly __brand: \"window.DIMMING_OFF\" };",
|
|
3595
3595
|
"window\u0000FUNCTION\u0000window.get_display_scale\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_display_scale(): number;",
|
|
3596
3596
|
"window\u0000FUNCTION\u0000window.get_mouse_lock\u0000[]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function get_mouse_lock(): boolean;",
|
|
3597
|
-
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_safe_area(): {
|
|
3597
|
+
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_safe_area(): { x: number; y: number; width: number; height: number; inset_left: number; inset_top: number; inset_right: number; inset_bottom: number };",
|
|
3598
3598
|
"window\u0000FUNCTION\u0000window.get_size\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]": "function get_size(): LuaMultiReturn<[number, number]>;",
|
|
3599
3599
|
"window\u0000FUNCTION\u0000window.set_dim_mode\u0000[{\"types\":[\"constant\"],\"isOptional\":false}]->[]": "function set_dim_mode(mode: number & { readonly __brand: \"window.DIMMING_ON\" } | number & { readonly __brand: \"window.DIMMING_OFF\" }): void;",
|
|
3600
3600
|
"window\u0000FUNCTION\u0000window.set_listener\u0000[{\"types\":[\"function(self, event, data)\",\"nil\"],\"isOptional\":false}]->[]": "function set_listener(callback?: (self: unknown, event: typeof WINDOW_EVENT_FOCUS_LOST | typeof WINDOW_EVENT_FOCUS_GAINED | typeof WINDOW_EVENT_RESIZED | typeof WINDOW_EVENT_ICONFIED | typeof WINDOW_EVENT_DEICONIFIED, data: Record<string | number, unknown>) => void): void;",
|
|
@@ -3610,7 +3610,7 @@
|
|
|
3610
3610
|
"1.13.1": {
|
|
3611
3611
|
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": {
|
|
3612
3612
|
"param:0:url": "string | Hash | Url",
|
|
3613
|
-
"return:0:body": "Opaque<\"b2Body\">"
|
|
3613
|
+
"return:0:body": "Opaque<\"b2Body\"> | undefined"
|
|
3614
3614
|
},
|
|
3615
3615
|
"b2d\u0000FUNCTION\u0000b2d.get_version\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
3616
3616
|
"return:0:info": "{ version: number; major: number; middle: number; minor: number }"
|
|
@@ -6222,7 +6222,7 @@
|
|
|
6222
6222
|
},
|
|
6223
6223
|
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
6224
6224
|
"param:0:path": "Hash | string | number",
|
|
6225
|
-
"return:0:table": "{ handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
6225
|
+
"return:0:table": "{ handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] }"
|
|
6226
6226
|
},
|
|
6227
6227
|
"resource\u0000FUNCTION\u0000resource.get_text_metrics\u0000[{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
6228
6228
|
"param:0:url": "Hash",
|
|
@@ -6702,7 +6702,7 @@
|
|
|
6702
6702
|
"return:0:host_path": "string"
|
|
6703
6703
|
},
|
|
6704
6704
|
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
6705
|
-
"return:0:ifaddrs": "{ name: string; address
|
|
6705
|
+
"return:0:ifaddrs": "{ name: string; address?: string; mac?: string; up: boolean; running: boolean }[]"
|
|
6706
6706
|
},
|
|
6707
6707
|
"sys\u0000FUNCTION\u0000sys.get_save_file\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": {
|
|
6708
6708
|
"param:0:application_id": "string",
|
|
@@ -6711,7 +6711,7 @@
|
|
|
6711
6711
|
},
|
|
6712
6712
|
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
6713
6713
|
"param:0:options": "{ ignore_secure?: boolean }",
|
|
6714
|
-
"return:0:sys_info": "{ device_model
|
|
6714
|
+
"return:0:sys_info": "{ device_model?: string; manufacturer?: string; system_name: string; system_version: string; api_version: string; language: string; device_language: string; territory: string; gmt_offset: number; device_ident?: string; user_agent?: string }"
|
|
6715
6715
|
},
|
|
6716
6716
|
"sys\u0000FUNCTION\u0000sys.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
6717
6717
|
"param:0:filename": "string",
|
|
@@ -7077,7 +7077,7 @@
|
|
|
7077
7077
|
"return:0:state": "boolean"
|
|
7078
7078
|
},
|
|
7079
7079
|
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
7080
|
-
"return:0:safe_area": "{
|
|
7080
|
+
"return:0:safe_area": "{ x: number; y: number; width: number; height: number; inset_left: number; inset_top: number; inset_right: number; inset_bottom: number }"
|
|
7081
7081
|
},
|
|
7082
7082
|
"window\u0000FUNCTION\u0000window.get_size\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]": {
|
|
7083
7083
|
"return:0:width": "number",
|
|
@@ -7115,7 +7115,7 @@
|
|
|
7115
7115
|
"1.13.0": {
|
|
7116
7116
|
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": {
|
|
7117
7117
|
"param:0:url": "string | Hash | Url",
|
|
7118
|
-
"return:0:body": "Opaque<\"b2Body\">"
|
|
7118
|
+
"return:0:body": "Opaque<\"b2Body\"> | undefined"
|
|
7119
7119
|
},
|
|
7120
7120
|
"b2d\u0000FUNCTION\u0000b2d.get_version\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
7121
7121
|
"return:0:info": "{ version: number; major: number; middle: number; minor: number }"
|
|
@@ -9722,7 +9722,7 @@
|
|
|
9722
9722
|
},
|
|
9723
9723
|
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
9724
9724
|
"param:0:path": "Hash | string | number",
|
|
9725
|
-
"return:0:table": "{ handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
9725
|
+
"return:0:table": "{ handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] }"
|
|
9726
9726
|
},
|
|
9727
9727
|
"resource\u0000FUNCTION\u0000resource.get_text_metrics\u0000[{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
9728
9728
|
"param:0:url": "Hash",
|
|
@@ -10202,7 +10202,7 @@
|
|
|
10202
10202
|
"return:0:host_path": "string"
|
|
10203
10203
|
},
|
|
10204
10204
|
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
10205
|
-
"return:0:ifaddrs": "{ name: string; address
|
|
10205
|
+
"return:0:ifaddrs": "{ name: string; address?: string; mac?: string; up: boolean; running: boolean }[]"
|
|
10206
10206
|
},
|
|
10207
10207
|
"sys\u0000FUNCTION\u0000sys.get_save_file\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": {
|
|
10208
10208
|
"param:0:application_id": "string",
|
|
@@ -10211,7 +10211,7 @@
|
|
|
10211
10211
|
},
|
|
10212
10212
|
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
10213
10213
|
"param:0:options": "{ ignore_secure?: boolean }",
|
|
10214
|
-
"return:0:sys_info": "{ device_model
|
|
10214
|
+
"return:0:sys_info": "{ device_model?: string; manufacturer?: string; system_name: string; system_version: string; api_version: string; language: string; device_language: string; territory: string; gmt_offset: number; device_ident?: string; user_agent?: string }"
|
|
10215
10215
|
},
|
|
10216
10216
|
"sys\u0000FUNCTION\u0000sys.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
10217
10217
|
"param:0:filename": "string",
|
|
@@ -10577,7 +10577,7 @@
|
|
|
10577
10577
|
"return:0:state": "boolean"
|
|
10578
10578
|
},
|
|
10579
10579
|
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
10580
|
-
"return:0:safe_area": "{
|
|
10580
|
+
"return:0:safe_area": "{ x: number; y: number; width: number; height: number; inset_left: number; inset_top: number; inset_right: number; inset_bottom: number }"
|
|
10581
10581
|
},
|
|
10582
10582
|
"window\u0000FUNCTION\u0000window.get_size\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]": {
|
|
10583
10583
|
"return:0:width": "number",
|
|
@@ -10615,7 +10615,7 @@
|
|
|
10615
10615
|
"1.12.4": {
|
|
10616
10616
|
"b2d\u0000FUNCTION\u0000b2d.get_body\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"b2Body\"],\"isOptional\":false}]": {
|
|
10617
10617
|
"param:0:url": "string | Hash | Url",
|
|
10618
|
-
"return:0:body": "Opaque<\"b2Body\">"
|
|
10618
|
+
"return:0:body": "Opaque<\"b2Body\"> | undefined"
|
|
10619
10619
|
},
|
|
10620
10620
|
"b2d\u0000FUNCTION\u0000b2d.get_world\u0000[]->[{\"types\":[\"b2World\"],\"isOptional\":false}]": {
|
|
10621
10621
|
"return:0:world": "Opaque<\"b2World\">"
|
|
@@ -12111,7 +12111,7 @@
|
|
|
12111
12111
|
},
|
|
12112
12112
|
"resource\u0000FUNCTION\u0000resource.get_render_target_info\u0000[{\"types\":[\"hash\",\"number\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
12113
12113
|
"param:0:path": "Hash | string | number",
|
|
12114
|
-
"return:0:table": "{ handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
12114
|
+
"return:0:table": "{ handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] }"
|
|
12115
12115
|
},
|
|
12116
12116
|
"resource\u0000FUNCTION\u0000resource.get_text_metrics\u0000[{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
12117
12117
|
"param:0:url": "Hash",
|
|
@@ -12587,7 +12587,7 @@
|
|
|
12587
12587
|
"return:0:host_path": "string"
|
|
12588
12588
|
},
|
|
12589
12589
|
"sys\u0000FUNCTION\u0000sys.get_ifaddrs\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
12590
|
-
"return:0:ifaddrs": "{ name: string; address
|
|
12590
|
+
"return:0:ifaddrs": "{ name: string; address?: string; mac?: string; up: boolean; running: boolean }[]"
|
|
12591
12591
|
},
|
|
12592
12592
|
"sys\u0000FUNCTION\u0000sys.get_save_file\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": {
|
|
12593
12593
|
"param:0:application_id": "string",
|
|
@@ -12596,7 +12596,7 @@
|
|
|
12596
12596
|
},
|
|
12597
12597
|
"sys\u0000FUNCTION\u0000sys.get_sys_info\u0000[{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
12598
12598
|
"param:0:options": "{ ignore_secure?: boolean }",
|
|
12599
|
-
"return:0:sys_info": "{ device_model
|
|
12599
|
+
"return:0:sys_info": "{ device_model?: string; manufacturer?: string; system_name: string; system_version: string; api_version: string; language: string; device_language: string; territory: string; gmt_offset: number; device_ident?: string; user_agent?: string }"
|
|
12600
12600
|
},
|
|
12601
12601
|
"sys\u0000FUNCTION\u0000sys.load\u0000[{\"types\":[\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
12602
12602
|
"param:0:filename": "string",
|
|
@@ -12958,7 +12958,7 @@
|
|
|
12958
12958
|
"return:0:state": "boolean"
|
|
12959
12959
|
},
|
|
12960
12960
|
"window\u0000FUNCTION\u0000window.get_safe_area\u0000[]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
|
|
12961
|
-
"return:0:safe_area": "{
|
|
12961
|
+
"return:0:safe_area": "{ x: number; y: number; width: number; height: number; inset_left: number; inset_top: number; inset_right: number; inset_bottom: number }"
|
|
12962
12962
|
},
|
|
12963
12963
|
"window\u0000FUNCTION\u0000window.get_size\u0000[]->[{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]": {
|
|
12964
12964
|
"return:0:width": "number",
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
"b2d.body.create_fixture": [
|
|
9
9
|
{
|
|
10
10
|
"sourceHash": "1f1d588d084c0e48",
|
|
11
|
-
"ts": "const body = b2d.get_body(\"#collisionobject\");\
|
|
11
|
+
"ts": "const body = b2d.get_body(\"#collisionobject\");\nif (body !== undefined) {\n const triangle = b2d.body.create_fixture(body, {\n density: 1.0, friction: 0.3,\n shape: { type: b2d.shape.SHAPE_TYPE_POLYGON, vertices: [vmath.vector3(-16, -16, 0), vmath.vector3(16, -16, 0), vmath.vector3(0, 16, 0)] },\n });\n}"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"b2d.fixture.set_shape": [
|
|
15
15
|
{
|
|
16
16
|
"sourceHash": "ff836b80569f5d30",
|
|
17
|
-
"ts": "const body = b2d.get_body(\"#collisionobject\");\
|
|
17
|
+
"ts": "const body = b2d.get_body(\"#collisionobject\");\nif (body !== undefined) {\n const circle = b2d.fixture.get_shape(body, 1);\n circle.center = vmath.vector3(24, 0, 0);\n b2d.fixture.set_shape(body, 1, circle, true);\n b2d.fixture.set_shape(body, 2, { type: b2d.shape.SHAPE_TYPE_EDGE, v1: vmath.vector3(-32, 0, 0), v2: vmath.vector3(32, 0, 0) });\n}"
|
|
18
18
|
}
|
|
19
19
|
],
|
|
20
20
|
"b2d.shape.set_shape": [
|
|
21
21
|
{
|
|
22
22
|
"sourceHash": "f31970e9ebb8d446",
|
|
23
|
-
"ts": "const body = b2d.get_body(\"#collisionobject\");\
|
|
23
|
+
"ts": "const body = b2d.get_body(\"#collisionobject\");\nif (body !== undefined) {\n const circle = b2d.shape.get_shape(body, 1);\n circle.center = vmath.vector3(24, 0, 0);\n b2d.shape.set_shape(body, 1, circle, true);\n b2d.shape.set_shape(body, 2, { type: b2d.shape.SHAPE_TYPE_SEGMENT, v1: vmath.vector3(-32, 0, 0), v2: vmath.vector3(32, 0, 0) });\n}"
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
26
|
"buffer.copy_buffer": [
|
|
@@ -1224,7 +1224,7 @@
|
|
|
1224
1224
|
"resource.get_render_target_info": [
|
|
1225
1225
|
{
|
|
1226
1226
|
"sourceHash": "5e526c539ed8ae25",
|
|
1227
|
-
"ts": "// Get the metadata from a render target resource\nexport default defineScript({\n init() {\n const info = resource.get_render_target_info(\"/my_render_target.render_targetc\");\n // the info table contains meta data about all the render target attachments\n // so it's not necessary to use resource.get_texture here, but we do it here\n // just to show that it's possible:\n const info_attachment_1 = resource.get_texture_info(info.attachments[0]
|
|
1227
|
+
"ts": "// Get the metadata from a render target resource\nexport default defineScript({\n init() {\n const info = resource.get_render_target_info(\"/my_render_target.render_targetc\");\n // the info table contains meta data about all the render target attachments\n // so it's not necessary to use resource.get_texture here, but we do it here\n // just to show that it's possible:\n const info_attachment_1 = resource.get_texture_info(info.attachments[0]!.handle);\n },\n});\n\n// Get a texture attachment from a render target and set it on a model component\nexport default defineScript({\n init() {\n const info = resource.get_render_target_info(\"/my_render_target.render_targetc\");\n const attachment = info.attachments[0]!.texture!;\n // you can also get texture info from the 'texture' field, since it's a resource hash\n const texture_info = resource.get_texture_info(attachment);\n go.set(\"#model\", \"texture0\", attachment);\n },\n});"
|
|
1228
1228
|
}
|
|
1229
1229
|
],
|
|
1230
1230
|
"resource.get_text_metrics": [
|
|
@@ -1254,7 +1254,7 @@
|
|
|
1254
1254
|
"resource.render_target": [
|
|
1255
1255
|
{
|
|
1256
1256
|
"sourceHash": "87231742204d2351",
|
|
1257
|
-
"ts": "// Set a render target color attachment as a model texture:\ngo.property(\"my_render_target\", resource.render_target(\"/rt.render_target\"));\n\nexport default defineScript({\n init(self) {\n const rt_info = resource.get_render_target_info(self.my_render_target);\n go.set(\"#model\", \"texture0\", rt_info.attachments[0]
|
|
1257
|
+
"ts": "// Set a render target color attachment as a model texture:\ngo.property(\"my_render_target\", resource.render_target(\"/rt.render_target\"));\n\nexport default defineScript({\n init(self) {\n const rt_info = resource.get_render_target_info(self.my_render_target);\n go.set(\"#model\", \"texture0\", rt_info.attachments[0]!.texture!);\n },\n});"
|
|
1258
1258
|
}
|
|
1259
1259
|
],
|
|
1260
1260
|
"resource.set": [
|
package/generated/b2d.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare global {
|
|
|
14
14
|
* @param url - the url to the game object collision component
|
|
15
15
|
* @returns the body if successful. Otherwise `nil`.
|
|
16
16
|
*/
|
|
17
|
-
function get_body(url: string | Hash | Url): Opaque<"b2Body"
|
|
17
|
+
function get_body(url: string | Hash | Url): Opaque<"b2Body"> | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Get the Box2D version information for the active backend.
|
|
20
20
|
*
|
package/generated/b2d_body.d.ts
CHANGED
|
@@ -133,10 +133,12 @@ declare global {
|
|
|
133
133
|
* @example
|
|
134
134
|
* ```ts
|
|
135
135
|
* const body = b2d.get_body("#collisionobject");
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* }
|
|
136
|
+
* if (body !== undefined) {
|
|
137
|
+
* const triangle = b2d.body.create_fixture(body, {
|
|
138
|
+
* density: 1.0, friction: 0.3,
|
|
139
|
+
* shape: { type: b2d.shape.SHAPE_TYPE_POLYGON, vertices: [vmath.vector3(-16, -16, 0), vmath.vector3(16, -16, 0), vmath.vector3(0, 16, 0)] },
|
|
140
|
+
* });
|
|
141
|
+
* }
|
|
140
142
|
* ```
|
|
141
143
|
*/
|
|
142
144
|
function create_fixture(body: Opaque<"b2Body">, definition: { shape?: { type?: number; radius?: number; center?: Vector3; v0?: Vector3; v1?: Vector3; v2?: Vector3; v3?: Vector3; vertices?: Vector3[]; hx?: number; hy?: number; angle?: number; loop?: boolean; prev_vertex?: Vector3; next_vertex?: Vector3 }; friction?: number; restitution?: number; density?: number; sensor?: boolean; filter?: { category_bits?: number; mask_bits?: number; group_index?: number } }): { index: number; type: number; sensor: boolean; density: number; friction: number; restitution: number; child_count: number };
|
|
@@ -134,10 +134,12 @@ declare global {
|
|
|
134
134
|
* @example
|
|
135
135
|
* ```ts
|
|
136
136
|
* const body = b2d.get_body("#collisionobject");
|
|
137
|
-
*
|
|
138
|
-
* circle
|
|
139
|
-
*
|
|
140
|
-
*
|
|
137
|
+
* if (body !== undefined) {
|
|
138
|
+
* const circle = b2d.fixture.get_shape(body, 1);
|
|
139
|
+
* circle.center = vmath.vector3(24, 0, 0);
|
|
140
|
+
* b2d.fixture.set_shape(body, 1, circle, true);
|
|
141
|
+
* b2d.fixture.set_shape(body, 2, { type: b2d.shape.SHAPE_TYPE_EDGE, v1: vmath.vector3(-32, 0, 0), v2: vmath.vector3(32, 0, 0) });
|
|
142
|
+
* }
|
|
141
143
|
* ```
|
|
142
144
|
*/
|
|
143
145
|
function set_shape(body: Opaque<"b2Body">, fixture_index: number, shape: { type?: number; radius?: number; center?: Vector3; v0?: Vector3; v1?: Vector3; v2?: Vector3; v3?: Vector3; vertices?: Vector3[]; hx?: number; hy?: number; angle?: number; loop?: boolean; prev_vertex?: Vector3; next_vertex?: Vector3 }, update_mass?: boolean): void;
|
package/generated/b2d_shape.d.ts
CHANGED
|
@@ -202,10 +202,12 @@ declare global {
|
|
|
202
202
|
* @example
|
|
203
203
|
* ```ts
|
|
204
204
|
* const body = b2d.get_body("#collisionobject");
|
|
205
|
-
*
|
|
206
|
-
* circle
|
|
207
|
-
*
|
|
208
|
-
*
|
|
205
|
+
* if (body !== undefined) {
|
|
206
|
+
* const circle = b2d.shape.get_shape(body, 1);
|
|
207
|
+
* circle.center = vmath.vector3(24, 0, 0);
|
|
208
|
+
* b2d.shape.set_shape(body, 1, circle, true);
|
|
209
|
+
* b2d.shape.set_shape(body, 2, { type: b2d.shape.SHAPE_TYPE_SEGMENT, v1: vmath.vector3(-32, 0, 0), v2: vmath.vector3(32, 0, 0) });
|
|
210
|
+
* }
|
|
209
211
|
* ```
|
|
210
212
|
*/
|
|
211
213
|
function set_shape(shape_id: Opaque<"b2Shape">, definition: { type?: number; radius?: number; center?: Vector3; v0?: Vector3; v1?: Vector3; v2?: Vector3; v3?: Vector3; vertices?: Vector3[]; hx?: number; hy?: number; angle?: number; loop?: boolean; prev_vertex?: Vector3; next_vertex?: Vector3 }, update_mass: boolean): void;
|
package/generated/resource.d.ts
CHANGED
|
@@ -844,7 +844,7 @@ declare global {
|
|
|
844
844
|
* // the info table contains meta data about all the render target attachments
|
|
845
845
|
* // so it's not necessary to use resource.get_texture here, but we do it here
|
|
846
846
|
* // just to show that it's possible:
|
|
847
|
-
* const info_attachment_1 = resource.get_texture_info(info.attachments[0]
|
|
847
|
+
* const info_attachment_1 = resource.get_texture_info(info.attachments[0]!.handle);
|
|
848
848
|
* },
|
|
849
849
|
* });
|
|
850
850
|
*
|
|
@@ -852,7 +852,7 @@ declare global {
|
|
|
852
852
|
* export default defineScript({
|
|
853
853
|
* init() {
|
|
854
854
|
* const info = resource.get_render_target_info("/my_render_target.render_targetc");
|
|
855
|
-
* const attachment = info.attachments[0]
|
|
855
|
+
* const attachment = info.attachments[0]!.texture!;
|
|
856
856
|
* // you can also get texture info from the 'texture' field, since it's a resource hash
|
|
857
857
|
* const texture_info = resource.get_texture_info(attachment);
|
|
858
858
|
* go.set("#model", "texture0", attachment);
|
|
@@ -860,7 +860,7 @@ declare global {
|
|
|
860
860
|
* });
|
|
861
861
|
* ```
|
|
862
862
|
*/
|
|
863
|
-
function get_render_target_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
863
|
+
function get_render_target_info(path: Hash | string | number): { handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] };
|
|
864
864
|
/**
|
|
865
865
|
* Gets the text metrics from a font
|
|
866
866
|
*
|
|
@@ -1051,7 +1051,7 @@ declare global {
|
|
|
1051
1051
|
* export default defineScript({
|
|
1052
1052
|
* init(self) {
|
|
1053
1053
|
* const rt_info = resource.get_render_target_info(self.my_render_target);
|
|
1054
|
-
* go.set("#model", "texture0", rt_info.attachments[0]
|
|
1054
|
+
* go.set("#model", "texture0", rt_info.attachments[0]!.texture!);
|
|
1055
1055
|
* },
|
|
1056
1056
|
* });
|
|
1057
1057
|
* ```
|
package/generated/sys.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ declare global {
|
|
|
294
294
|
* }
|
|
295
295
|
* ```
|
|
296
296
|
*/
|
|
297
|
-
function get_ifaddrs(): { name: string; address
|
|
297
|
+
function get_ifaddrs(): { name: string; address?: string; mac?: string; up: boolean; running: boolean }[];
|
|
298
298
|
/**
|
|
299
299
|
* The save-file path is operating system specific and is typically located under the user's home directory.
|
|
300
300
|
* This function will raise a Lua error if unable to get the save file path.
|
|
@@ -365,7 +365,7 @@ declare global {
|
|
|
365
365
|
* }
|
|
366
366
|
* ```
|
|
367
367
|
*/
|
|
368
|
-
function get_sys_info(options?: { ignore_secure?: boolean }): { device_model
|
|
368
|
+
function get_sys_info(options?: { ignore_secure?: boolean }): { device_model?: string; manufacturer?: string; system_name: string; system_version: string; api_version: string; language: string; device_language: string; territory: string; gmt_offset: number; device_ident?: string; user_agent?: string };
|
|
369
369
|
/**
|
|
370
370
|
* If the file exists, it must have been created by `sys.save` to be loaded.
|
|
371
371
|
* This function will raise a Lua error if an error occurs while loading the file.
|
|
@@ -14,7 +14,7 @@ declare global {
|
|
|
14
14
|
* @param url - the url to the game object collision component
|
|
15
15
|
* @returns the body if successful. Otherwise `nil`.
|
|
16
16
|
*/
|
|
17
|
-
function get_body(url: string | Hash | Url): Opaque<"b2Body"
|
|
17
|
+
function get_body(url: string | Hash | Url): Opaque<"b2Body"> | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Get the Box2D world from the current collection
|
|
20
20
|
*
|
|
@@ -844,7 +844,7 @@ declare global {
|
|
|
844
844
|
* // the info table contains meta data about all the render target attachments
|
|
845
845
|
* // so it's not necessary to use resource.get_texture here, but we do it here
|
|
846
846
|
* // just to show that it's possible:
|
|
847
|
-
* const info_attachment_1 = resource.get_texture_info(info.attachments[0]
|
|
847
|
+
* const info_attachment_1 = resource.get_texture_info(info.attachments[0]!.handle);
|
|
848
848
|
* },
|
|
849
849
|
* });
|
|
850
850
|
*
|
|
@@ -852,7 +852,7 @@ declare global {
|
|
|
852
852
|
* export default defineScript({
|
|
853
853
|
* init() {
|
|
854
854
|
* const info = resource.get_render_target_info("/my_render_target.render_targetc");
|
|
855
|
-
* const attachment = info.attachments[0]
|
|
855
|
+
* const attachment = info.attachments[0]!.texture!;
|
|
856
856
|
* // you can also get texture info from the 'texture' field, since it's a resource hash
|
|
857
857
|
* const texture_info = resource.get_texture_info(attachment);
|
|
858
858
|
* go.set("#model", "texture0", attachment);
|
|
@@ -860,7 +860,7 @@ declare global {
|
|
|
860
860
|
* });
|
|
861
861
|
* ```
|
|
862
862
|
*/
|
|
863
|
-
function get_render_target_info(path: Hash | string | number): { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture
|
|
863
|
+
function get_render_target_info(path: Hash | string | number): { handle: number; attachments: { handle: number; width: number; height: number; depth: number; mipmaps: number; type: number; buffer_type: number; texture?: Hash }[] };
|
|
864
864
|
/**
|
|
865
865
|
* Gets the text metrics from a font
|
|
866
866
|
*
|
|
@@ -1051,7 +1051,7 @@ declare global {
|
|
|
1051
1051
|
* export default defineScript({
|
|
1052
1052
|
* init(self) {
|
|
1053
1053
|
* const rt_info = resource.get_render_target_info(self.my_render_target);
|
|
1054
|
-
* go.set("#model", "texture0", rt_info.attachments[0]
|
|
1054
|
+
* go.set("#model", "texture0", rt_info.attachments[0]!.texture!);
|
|
1055
1055
|
* },
|
|
1056
1056
|
* });
|
|
1057
1057
|
* ```
|