@defold-typescript/types 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/api-targets.json +84 -0
  2. package/generated/b2d.d.ts +13 -0
  3. package/generated/buffer.d.ts +25 -0
  4. package/generated/builtin-messages.d.ts +42 -0
  5. package/generated/camera.d.ts +7 -0
  6. package/generated/collectionfactory.d.ts +17 -0
  7. package/generated/collectionproxy.d.ts +14 -0
  8. package/generated/crash.d.ts +31 -0
  9. package/generated/factory.d.ts +17 -0
  10. package/generated/go.d.ts +96 -0
  11. package/generated/graphics.d.ts +115 -0
  12. package/generated/gui.d.ts +245 -0
  13. package/generated/http.d.ts +8 -0
  14. package/generated/iac.d.ts +8 -0
  15. package/generated/iap.d.ts +16 -0
  16. package/generated/image.d.ts +16 -0
  17. package/generated/json.d.ts +11 -0
  18. package/generated/kinds/gui-script.d.ts +39 -0
  19. package/generated/kinds/render-script.d.ts +39 -0
  20. package/generated/kinds/script.d.ts +38 -0
  21. package/generated/label.d.ts +23 -0
  22. package/generated/liveupdate.d.ts +23 -0
  23. package/generated/model.d.ts +23 -0
  24. package/generated/msg.d.ts +12 -0
  25. package/generated/particlefx.d.ts +22 -0
  26. package/generated/physics.d.ts +47 -0
  27. package/generated/profiler.d.ts +28 -0
  28. package/generated/push.d.ts +15 -0
  29. package/generated/render.d.ts +55 -0
  30. package/generated/resource.d.ts +33 -0
  31. package/generated/socket.d.ts +25 -0
  32. package/generated/sound.d.ts +28 -0
  33. package/generated/sprite.d.ts +23 -0
  34. package/generated/sys.d.ts +37 -0
  35. package/generated/tilemap.d.ts +24 -0
  36. package/generated/timer.d.ts +12 -0
  37. package/generated/vmath.d.ts +63 -0
  38. package/generated/webview.d.ts +15 -0
  39. package/generated/window.d.ts +28 -0
  40. package/generated/zlib.d.ts +9 -0
  41. package/index.d.ts +63 -0
  42. package/package.json +46 -0
  43. package/scripts/doc-source.ts +100 -0
  44. package/scripts/fidelity-audit.ts +311 -0
  45. package/scripts/fidelity-baseline.json +282 -0
  46. package/scripts/materialize-version.ts +51 -0
  47. package/scripts/regen.ts +294 -0
  48. package/scripts/sync-api-docs.ts +375 -0
  49. package/src/api-doc.ts +168 -0
  50. package/src/core-types.ts +121 -0
  51. package/src/emit-dts.ts +754 -0
  52. package/src/emit-messages.ts +148 -0
  53. package/src/go-overloads.d.ts +35 -0
  54. package/src/index.ts +24 -0
  55. package/src/lifecycle.ts +81 -0
  56. package/src/msg-overloads.d.ts +21 -0
  57. package/src/publish-dts.ts +33 -0
  58. package/src/script-api.ts +95 -0
@@ -0,0 +1,84 @@
1
+ {
2
+ "targets": [
3
+ {
4
+ "id": "defold-1.12.4",
5
+ "default": true,
6
+ "fixturesDir": "fixtures",
7
+ "generatedDir": "generated",
8
+ "coreTypesImport": "../src/core-types",
9
+ "source": null,
10
+ "modules": [
11
+ { "namespace": "b2d", "fixture": "b2d_doc.json", "outFile": "b2d.d.ts" },
12
+ { "namespace": "buffer", "fixture": "buffer_doc.json", "outFile": "buffer.d.ts" },
13
+ { "namespace": "camera", "fixture": "camera_doc.json", "outFile": "camera.d.ts" },
14
+ {
15
+ "namespace": "collectionfactory",
16
+ "fixture": "collectionfactory_doc.json",
17
+ "outFile": "collectionfactory.d.ts"
18
+ },
19
+ {
20
+ "namespace": "collectionproxy",
21
+ "fixture": "collectionproxy_doc.json",
22
+ "outFile": "collectionproxy.d.ts"
23
+ },
24
+ { "namespace": "crash", "fixture": "crash_doc.json", "outFile": "crash.d.ts" },
25
+ { "namespace": "factory", "fixture": "factory_doc.json", "outFile": "factory.d.ts" },
26
+ {
27
+ "namespace": "go",
28
+ "fixture": "go_doc.json",
29
+ "outFile": "go.d.ts",
30
+ "skipFunctions": ["get", "set"]
31
+ },
32
+ { "namespace": "graphics", "fixture": "graphics_doc.json", "outFile": "graphics.d.ts" },
33
+ { "namespace": "gui", "fixture": "gui_doc.json", "outFile": "gui.d.ts" },
34
+ { "namespace": "http", "fixture": "http_doc.json", "outFile": "http.d.ts" },
35
+ { "namespace": "iac", "fixture": "iac_doc.json", "outFile": "iac.d.ts" },
36
+ { "namespace": "iap", "fixture": "iap_doc.json", "outFile": "iap.d.ts" },
37
+ { "namespace": "image", "fixture": "image_doc.json", "outFile": "image.d.ts" },
38
+ { "namespace": "json", "fixture": "json_doc.json", "outFile": "json.d.ts" },
39
+ { "namespace": "label", "fixture": "label_doc.json", "outFile": "label.d.ts" },
40
+ {
41
+ "namespace": "liveupdate",
42
+ "fixture": "liveupdate_doc.json",
43
+ "outFile": "liveupdate.d.ts"
44
+ },
45
+ { "namespace": "model", "fixture": "model_doc.json", "outFile": "model.d.ts" },
46
+ {
47
+ "namespace": "msg",
48
+ "fixture": "msg_doc.json",
49
+ "outFile": "msg.d.ts",
50
+ "skipFunctions": ["post"]
51
+ },
52
+ {
53
+ "namespace": "particlefx",
54
+ "fixture": "particlefx_doc.json",
55
+ "outFile": "particlefx.d.ts"
56
+ },
57
+ { "namespace": "physics", "fixture": "physics_doc.json", "outFile": "physics.d.ts" },
58
+ { "namespace": "profiler", "fixture": "profiler_doc.json", "outFile": "profiler.d.ts" },
59
+ { "namespace": "push", "fixture": "push_doc.json", "outFile": "push.d.ts" },
60
+ { "namespace": "render", "fixture": "render_doc.json", "outFile": "render.d.ts" },
61
+ { "namespace": "resource", "fixture": "resource_doc.json", "outFile": "resource.d.ts" },
62
+ { "namespace": "socket", "fixture": "socket_doc.json", "outFile": "socket.d.ts" },
63
+ { "namespace": "sound", "fixture": "sound_doc.json", "outFile": "sound.d.ts" },
64
+ { "namespace": "sprite", "fixture": "sprite_doc.json", "outFile": "sprite.d.ts" },
65
+ { "namespace": "sys", "fixture": "sys_doc.json", "outFile": "sys.d.ts" },
66
+ { "namespace": "tilemap", "fixture": "tilemap_doc.json", "outFile": "tilemap.d.ts" },
67
+ { "namespace": "timer", "fixture": "timer_doc.json", "outFile": "timer.d.ts" },
68
+ { "namespace": "vmath", "fixture": "vmath_doc.json", "outFile": "vmath.d.ts" },
69
+ { "namespace": "webview", "fixture": "webview_doc.json", "outFile": "webview.d.ts" },
70
+ { "namespace": "window", "fixture": "window_doc.json", "outFile": "window.d.ts" },
71
+ { "namespace": "zlib", "fixture": "zlib_doc.json", "outFile": "zlib.d.ts" }
72
+ ]
73
+ },
74
+ {
75
+ "id": "defold-1.9.8",
76
+ "default": false,
77
+ "fixturesDir": "fixtures/defold-1.9.8",
78
+ "generatedDir": "generated/versions/defold-1.9.8",
79
+ "coreTypesImport": "../../../src/core-types",
80
+ "source": { "kind": "ref-doc", "version": "1.9.8" },
81
+ "modules": [{ "namespace": "label", "fixture": "label_doc.json", "outFile": "label.d.ts" }]
82
+ }
83
+ ]
84
+ }
@@ -0,0 +1,13 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Opaque, Url } from "../src/core-types";
3
+
4
+ declare global {
5
+ namespace b2d {
6
+ type b2Body = Opaque<"b2Body">;
7
+ type b2World = Opaque<"b2World">;
8
+ function get_body(url: string | Hash | Url): Opaque<"b2Body">;
9
+ function get_world(): Opaque<"b2World">;
10
+ }
11
+ }
12
+
13
+ export {};
@@ -0,0 +1,25 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Opaque } from "../src/core-types";
3
+
4
+ declare global {
5
+ namespace buffer {
6
+ const VALUE_TYPE_FLOAT32: number & { readonly __brand: "buffer.VALUE_TYPE_FLOAT32" };
7
+ const VALUE_TYPE_INT16: number & { readonly __brand: "buffer.VALUE_TYPE_INT16" };
8
+ const VALUE_TYPE_INT32: number & { readonly __brand: "buffer.VALUE_TYPE_INT32" };
9
+ const VALUE_TYPE_INT64: number & { readonly __brand: "buffer.VALUE_TYPE_INT64" };
10
+ const VALUE_TYPE_INT8: number & { readonly __brand: "buffer.VALUE_TYPE_INT8" };
11
+ const VALUE_TYPE_UINT16: number & { readonly __brand: "buffer.VALUE_TYPE_UINT16" };
12
+ const VALUE_TYPE_UINT32: number & { readonly __brand: "buffer.VALUE_TYPE_UINT32" };
13
+ const VALUE_TYPE_UINT64: number & { readonly __brand: "buffer.VALUE_TYPE_UINT64" };
14
+ const VALUE_TYPE_UINT8: number & { readonly __brand: "buffer.VALUE_TYPE_UINT8" };
15
+ function copy_buffer(dst: Opaque<"buffer">, dstoffset: number, src: Opaque<"buffer">, srcoffset: number, count: number): void;
16
+ function copy_stream(dst: Opaque<"bufferstream">, dstoffset: number, src: Opaque<"bufferstream">, srcoffset: number, count: number): void;
17
+ function create(element_count: number, declaration: { name?: Hash | string; type?: Opaque<"constant">; count?: number }): Opaque<"buffer">;
18
+ function get_bytes(buffer: Opaque<"buffer">, stream_name: Hash): string;
19
+ function get_metadata(buf: Opaque<"buffer">, metadata_name: Hash | string): LuaMultiReturn<[number[] | unknown, Opaque<"constant"> | unknown]>;
20
+ function get_stream(buffer: Opaque<"buffer">, stream_name: Hash | string): Opaque<"bufferstream">;
21
+ function set_metadata(buf: Opaque<"buffer">, metadata_name: Hash | string, values: number[], value_type: Opaque<"constant">): void;
22
+ }
23
+ }
24
+
25
+ export {};
@@ -0,0 +1,42 @@
1
+ import type { Hash, Matrix4, Vector3, Vector4 } from "../src/core-types";
2
+
3
+ declare global {
4
+ interface BuiltinMessages {
5
+ acquire_input_focus: Record<string, never>;
6
+ animation_done: { current_tile: number; id: Hash };
7
+ apply_force: { force: Vector3; position: Vector3 };
8
+ async_load: Record<string, never>;
9
+ clear_color: { color: Vector4 };
10
+ collision_response: { other_id: Hash; other_position: Vector3; other_group: Hash; own_group: Hash };
11
+ contact_point_response: { position: Vector3; normal: Vector3; relative_velocity: Vector3; distance: number; applied_impulse: number; life_time: number; mass: number; other_mass: number; other_id: Hash; other_position: Vector3; other_group: Hash; own_group: Hash };
12
+ disable: Record<string, never>;
13
+ draw_debug_text: { position: Vector3; text: string; color: Vector4 };
14
+ draw_line: { start_point: Vector3; end_point: Vector3; color: Vector4 };
15
+ enable: Record<string, never>;
16
+ final: Record<string, never>;
17
+ init: Record<string, never>;
18
+ layout_changed: { id: Hash; previous_id: Hash };
19
+ load: Record<string, never>;
20
+ model_animation_done: { animation_id: Hash; playback: number };
21
+ play_animation: { id: Hash };
22
+ play_sound: { delay?: number; gain?: number; play_id?: number };
23
+ proxy_loaded: Record<string, never>;
24
+ proxy_unloaded: Record<string, never>;
25
+ ray_cast_missed: { group: Hash; request_id: number };
26
+ ray_cast_response: { fraction: number; position: Vector3; normal: Vector3; id: Hash; group: Hash; request_id: number };
27
+ release_input_focus: Record<string, never>;
28
+ set_gain: { gain: number };
29
+ set_parent: { parent_id?: Hash; keep_world_transform?: 0 | 1 };
30
+ set_time_step: { factor: number; mode: number };
31
+ set_view_projection: { id: Hash; view: Matrix4; projection: Matrix4 };
32
+ sound_done: { play_id: number };
33
+ sound_stopped: { play_id: number };
34
+ stop_sound: Record<string, never>;
35
+ trigger_response: { other_id: Hash; enter: boolean; other_group: Hash; own_group: Hash };
36
+ unload: Record<string, never>;
37
+ window_resized: { height: number; width: number };
38
+ }
39
+ type BuiltinMessageId = keyof BuiltinMessages;
40
+ }
41
+
42
+ export {};
@@ -0,0 +1,7 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ namespace camera {
4
+ }
5
+ }
6
+
7
+ export {};
@@ -0,0 +1,17 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Opaque, Quaternion, Url, Vector3 } from "../src/core-types";
3
+
4
+ declare global {
5
+ namespace collectionfactory {
6
+ const STATUS_LOADED: number & { readonly __brand: "collectionfactory.STATUS_LOADED" };
7
+ const STATUS_LOADING: number & { readonly __brand: "collectionfactory.STATUS_LOADING" };
8
+ const STATUS_UNLOADED: number & { readonly __brand: "collectionfactory.STATUS_UNLOADED" };
9
+ function create(url: string | Hash | Url, position?: Vector3, rotation?: Quaternion, properties?: Record<string | number, unknown>, scale?: number | Vector3): Record<string | number, unknown>;
10
+ function get_status(url?: string | Hash | Url): Opaque<"constant">;
11
+ function load(url?: string | Hash | Url, complete_function?: (self: unknown, url: unknown, result: unknown) => void): void;
12
+ function set_prototype(url?: string | Hash | Url, prototype?: string): void;
13
+ function unload(url?: string | Hash | Url): void;
14
+ }
15
+ }
16
+
17
+ export {};
@@ -0,0 +1,14 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Url } from "../src/core-types";
3
+
4
+ declare global {
5
+ namespace collectionproxy {
6
+ const RESULT_ALREADY_LOADED: number & { readonly __brand: "collectionproxy.RESULT_ALREADY_LOADED" };
7
+ const RESULT_LOADING: number & { readonly __brand: "collectionproxy.RESULT_LOADING" };
8
+ const RESULT_NOT_EXCLUDED: number & { readonly __brand: "collectionproxy.RESULT_NOT_EXCLUDED" };
9
+ function get_resources(collectionproxy: Url): Record<string | number, unknown>;
10
+ function set_collection(url?: string | Hash | Url, prototype?: string): LuaMultiReturn<[boolean, number]>;
11
+ }
12
+ }
13
+
14
+ export {};
@@ -0,0 +1,31 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ namespace crash {
4
+ const SYSFIELD_ANDROID_BUILD_FINGERPRINT: number & { readonly __brand: "crash.SYSFIELD_ANDROID_BUILD_FINGERPRINT" };
5
+ const SYSFIELD_DEVICE_LANGUAGE: number & { readonly __brand: "crash.SYSFIELD_DEVICE_LANGUAGE" };
6
+ const SYSFIELD_DEVICE_MODEL: number & { readonly __brand: "crash.SYSFIELD_DEVICE_MODEL" };
7
+ const SYSFIELD_ENGINE_HASH: number & { readonly __brand: "crash.SYSFIELD_ENGINE_HASH" };
8
+ const SYSFIELD_ENGINE_VERSION: number & { readonly __brand: "crash.SYSFIELD_ENGINE_VERSION" };
9
+ const SYSFIELD_LANGUAGE: number & { readonly __brand: "crash.SYSFIELD_LANGUAGE" };
10
+ const SYSFIELD_MANUFACTURER: number & { readonly __brand: "crash.SYSFIELD_MANUFACTURER" };
11
+ const SYSFIELD_MAX: number & { readonly __brand: "crash.SYSFIELD_MAX" };
12
+ const SYSFIELD_SYSTEM_NAME: number & { readonly __brand: "crash.SYSFIELD_SYSTEM_NAME" };
13
+ const SYSFIELD_SYSTEM_VERSION: number & { readonly __brand: "crash.SYSFIELD_SYSTEM_VERSION" };
14
+ const SYSFIELD_TERRITORY: number & { readonly __brand: "crash.SYSFIELD_TERRITORY" };
15
+ const USERFIELD_MAX: number & { readonly __brand: "crash.USERFIELD_MAX" };
16
+ const USERFIELD_SIZE: number & { readonly __brand: "crash.USERFIELD_SIZE" };
17
+ function get_backtrace(handle: number): Record<string | number, unknown>;
18
+ function get_extra_data(handle: number): string;
19
+ function get_modules(handle: number): Record<string | number, unknown>;
20
+ function get_signum(handle: number): number;
21
+ function get_sys_field(handle: number, index: number): string | unknown;
22
+ function get_user_field(handle: number, index: number): string;
23
+ function load_previous(): number | unknown;
24
+ function release(handle: number): void;
25
+ function set_file_path(path: string): void;
26
+ function set_user_field(index: number, value: string): void;
27
+ function write_dump(): void;
28
+ }
29
+ }
30
+
31
+ export {};
@@ -0,0 +1,17 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Opaque, Quaternion, Url, Vector3 } from "../src/core-types";
3
+
4
+ declare global {
5
+ namespace factory {
6
+ const STATUS_LOADED: number & { readonly __brand: "factory.STATUS_LOADED" };
7
+ const STATUS_LOADING: number & { readonly __brand: "factory.STATUS_LOADING" };
8
+ const STATUS_UNLOADED: number & { readonly __brand: "factory.STATUS_UNLOADED" };
9
+ function create(url: string | Hash | Url, position?: Vector3, rotation?: Quaternion, properties?: Record<string | number, unknown>, scale?: number | Vector3): Hash;
10
+ function get_status(url?: string | Hash | Url): Opaque<"constant">;
11
+ function load(url?: string | Hash | Url, complete_function?: (self: unknown, url: unknown, result: unknown) => void): void;
12
+ function set_prototype(url?: string | Hash | Url, prototype?: string): void;
13
+ function unload(url?: string | Hash | Url): void;
14
+ }
15
+ }
16
+
17
+ export {};
@@ -0,0 +1,96 @@
1
+ /** @noSelfInFile */
2
+ import type { Hash, Matrix4, Opaque, Quaternion, Url, Vector, Vector3, Vector4 } from "../src/core-types";
3
+
4
+ declare global {
5
+ namespace go {
6
+ export const EASING_INBACK: number & { readonly __brand: "go.EASING_INBACK" };
7
+ export const EASING_INBOUNCE: number & { readonly __brand: "go.EASING_INBOUNCE" };
8
+ export const EASING_INCIRC: number & { readonly __brand: "go.EASING_INCIRC" };
9
+ export const EASING_INCUBIC: number & { readonly __brand: "go.EASING_INCUBIC" };
10
+ export const EASING_INELASTIC: number & { readonly __brand: "go.EASING_INELASTIC" };
11
+ export const EASING_INEXPO: number & { readonly __brand: "go.EASING_INEXPO" };
12
+ export const EASING_INOUTBACK: number & { readonly __brand: "go.EASING_INOUTBACK" };
13
+ export const EASING_INOUTBOUNCE: number & { readonly __brand: "go.EASING_INOUTBOUNCE" };
14
+ export const EASING_INOUTCIRC: number & { readonly __brand: "go.EASING_INOUTCIRC" };
15
+ export const EASING_INOUTCUBIC: number & { readonly __brand: "go.EASING_INOUTCUBIC" };
16
+ export const EASING_INOUTELASTIC: number & { readonly __brand: "go.EASING_INOUTELASTIC" };
17
+ export const EASING_INOUTEXPO: number & { readonly __brand: "go.EASING_INOUTEXPO" };
18
+ export const EASING_INOUTQUAD: number & { readonly __brand: "go.EASING_INOUTQUAD" };
19
+ export const EASING_INOUTQUART: number & { readonly __brand: "go.EASING_INOUTQUART" };
20
+ export const EASING_INOUTQUINT: number & { readonly __brand: "go.EASING_INOUTQUINT" };
21
+ export const EASING_INOUTSINE: number & { readonly __brand: "go.EASING_INOUTSINE" };
22
+ export const EASING_INQUAD: number & { readonly __brand: "go.EASING_INQUAD" };
23
+ export const EASING_INQUART: number & { readonly __brand: "go.EASING_INQUART" };
24
+ export const EASING_INQUINT: number & { readonly __brand: "go.EASING_INQUINT" };
25
+ export const EASING_INSINE: number & { readonly __brand: "go.EASING_INSINE" };
26
+ export const EASING_LINEAR: number & { readonly __brand: "go.EASING_LINEAR" };
27
+ export const EASING_OUTBACK: number & { readonly __brand: "go.EASING_OUTBACK" };
28
+ export const EASING_OUTBOUNCE: number & { readonly __brand: "go.EASING_OUTBOUNCE" };
29
+ export const EASING_OUTCIRC: number & { readonly __brand: "go.EASING_OUTCIRC" };
30
+ export const EASING_OUTCUBIC: number & { readonly __brand: "go.EASING_OUTCUBIC" };
31
+ export const EASING_OUTELASTIC: number & { readonly __brand: "go.EASING_OUTELASTIC" };
32
+ export const EASING_OUTEXPO: number & { readonly __brand: "go.EASING_OUTEXPO" };
33
+ export const EASING_OUTINBACK: number & { readonly __brand: "go.EASING_OUTINBACK" };
34
+ export const EASING_OUTINBOUNCE: number & { readonly __brand: "go.EASING_OUTINBOUNCE" };
35
+ export const EASING_OUTINCIRC: number & { readonly __brand: "go.EASING_OUTINCIRC" };
36
+ export const EASING_OUTINCUBIC: number & { readonly __brand: "go.EASING_OUTINCUBIC" };
37
+ export const EASING_OUTINELASTIC: number & { readonly __brand: "go.EASING_OUTINELASTIC" };
38
+ export const EASING_OUTINEXPO: number & { readonly __brand: "go.EASING_OUTINEXPO" };
39
+ export const EASING_OUTINQUAD: number & { readonly __brand: "go.EASING_OUTINQUAD" };
40
+ export const EASING_OUTINQUART: number & { readonly __brand: "go.EASING_OUTINQUART" };
41
+ export const EASING_OUTINQUINT: number & { readonly __brand: "go.EASING_OUTINQUINT" };
42
+ export const EASING_OUTINSINE: number & { readonly __brand: "go.EASING_OUTINSINE" };
43
+ export const EASING_OUTQUAD: number & { readonly __brand: "go.EASING_OUTQUAD" };
44
+ export const EASING_OUTQUART: number & { readonly __brand: "go.EASING_OUTQUART" };
45
+ export const EASING_OUTQUINT: number & { readonly __brand: "go.EASING_OUTQUINT" };
46
+ export const EASING_OUTSINE: number & { readonly __brand: "go.EASING_OUTSINE" };
47
+ export const PLAYBACK_LOOP_BACKWARD: number & { readonly __brand: "go.PLAYBACK_LOOP_BACKWARD" };
48
+ export const PLAYBACK_LOOP_FORWARD: number & { readonly __brand: "go.PLAYBACK_LOOP_FORWARD" };
49
+ export const PLAYBACK_LOOP_PINGPONG: number & { readonly __brand: "go.PLAYBACK_LOOP_PINGPONG" };
50
+ export const PLAYBACK_NONE: number & { readonly __brand: "go.PLAYBACK_NONE" };
51
+ export const PLAYBACK_ONCE_BACKWARD: number & { readonly __brand: "go.PLAYBACK_ONCE_BACKWARD" };
52
+ export const PLAYBACK_ONCE_FORWARD: number & { readonly __brand: "go.PLAYBACK_ONCE_FORWARD" };
53
+ export const PLAYBACK_ONCE_PINGPONG: number & { readonly __brand: "go.PLAYBACK_ONCE_PINGPONG" };
54
+ export function animate(url: string | Hash | Url, property: 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" }, to: number | Vector3 | Vector4 | Quaternion, easing: Vector | number & { readonly __brand: "go.EASING_INBACK" } | number & { readonly __brand: "go.EASING_INBOUNCE" } | number & { readonly __brand: "go.EASING_INCIRC" } | number & { readonly __brand: "go.EASING_INCUBIC" } | number & { readonly __brand: "go.EASING_INELASTIC" } | number & { readonly __brand: "go.EASING_INEXPO" } | number & { readonly __brand: "go.EASING_INOUTBACK" } | number & { readonly __brand: "go.EASING_INOUTBOUNCE" } | number & { readonly __brand: "go.EASING_INOUTCIRC" } | number & { readonly __brand: "go.EASING_INOUTCUBIC" } | number & { readonly __brand: "go.EASING_INOUTELASTIC" } | number & { readonly __brand: "go.EASING_INOUTEXPO" } | number & { readonly __brand: "go.EASING_INOUTQUAD" } | number & { readonly __brand: "go.EASING_INOUTQUART" } | number & { readonly __brand: "go.EASING_INOUTQUINT" } | number & { readonly __brand: "go.EASING_INOUTSINE" } | number & { readonly __brand: "go.EASING_INQUAD" } | number & { readonly __brand: "go.EASING_INQUART" } | number & { readonly __brand: "go.EASING_INQUINT" } | number & { readonly __brand: "go.EASING_INSINE" } | number & { readonly __brand: "go.EASING_LINEAR" } | number & { readonly __brand: "go.EASING_OUTBACK" } | number & { readonly __brand: "go.EASING_OUTBOUNCE" } | number & { readonly __brand: "go.EASING_OUTCIRC" } | number & { readonly __brand: "go.EASING_OUTCUBIC" } | number & { readonly __brand: "go.EASING_OUTELASTIC" } | number & { readonly __brand: "go.EASING_OUTEXPO" } | number & { readonly __brand: "go.EASING_OUTINBACK" } | number & { readonly __brand: "go.EASING_OUTINBOUNCE" } | number & { readonly __brand: "go.EASING_OUTINCIRC" } | number & { readonly __brand: "go.EASING_OUTINCUBIC" } | number & { readonly __brand: "go.EASING_OUTINELASTIC" } | number & { readonly __brand: "go.EASING_OUTINEXPO" } | number & { readonly __brand: "go.EASING_OUTINQUAD" } | number & { readonly __brand: "go.EASING_OUTINQUART" } | number & { readonly __brand: "go.EASING_OUTINQUINT" } | number & { readonly __brand: "go.EASING_OUTINSINE" } | number & { readonly __brand: "go.EASING_OUTQUAD" } | number & { readonly __brand: "go.EASING_OUTQUART" } | number & { readonly __brand: "go.EASING_OUTQUINT" } | number & { readonly __brand: "go.EASING_OUTSINE" }, duration: number, delay?: number, complete_function?: (self: unknown, url: unknown, property: unknown) => void): void;
55
+ export function cancel_animations(url: string | Hash | Url, property?: string | Hash): void;
56
+ function _delete(id?: string | Hash | Url | (string | Hash | Url)[], recursive?: boolean): void;
57
+ export function exists(url: string | Hash | Url): boolean;
58
+ export function final(self: Opaque<"userdata">): void;
59
+ export function fixed_update(self: Opaque<"userdata">, dt: number): void;
60
+ export function get_id(path?: string): Hash;
61
+ export function get_parent(id?: string | Hash | Url): Hash | unknown;
62
+ export function get_position(id?: string | Hash | Url): Vector3;
63
+ export function get_rotation(id?: string | Hash | Url): Quaternion;
64
+ export function get_scale(id?: string | Hash | Url): Vector3;
65
+ export function get_scale_uniform(id?: string | Hash | Url): number;
66
+ export function get_world_position(id?: string | Hash | Url): Vector3;
67
+ export function get_world_rotation(id?: string | Hash | Url): Quaternion;
68
+ export function get_world_scale(id?: string | Hash | Url): Vector3;
69
+ export function get_world_scale_uniform(id?: string | Hash | Url): number;
70
+ export function get_world_transform(id?: string | Hash | Url): Matrix4;
71
+ export function init(self: Opaque<"userdata">): void;
72
+ export function late_update(self: Opaque<"userdata">, dt: number): void;
73
+ export function on_input(self: Opaque<"userdata">, action_id: Hash, action: Record<string | number, unknown>): boolean | unknown;
74
+ export function on_message(self: Opaque<"userdata">, message_id: Hash, message: Record<string | number, unknown>, sender: Url): void;
75
+ export function on_reload(self: Opaque<"userdata">): void;
76
+ export function property(name: string, value: number | Hash | Url | Vector3 | Vector4 | Quaternion | Opaque<"resource"> | boolean): void;
77
+ export function set_parent(id?: string | Hash | Url, parent_id?: string | Hash | Url, keep_world_transform?: boolean): void;
78
+ export function set_position(position: Vector3, id?: string | Hash | Url): void;
79
+ export function set_rotation(rotation: Quaternion, id?: string | Hash | Url): void;
80
+ export function set_scale(scale: number | Vector3, id?: string | Hash | Url): void;
81
+ export function set_scale_xy(scale: number | Vector3, id?: string | Hash | Url): void;
82
+ export function update(self: Opaque<"userdata">, dt: number): void;
83
+ export function update_world_transform(id?: string | Hash | Url): void;
84
+ export function world_to_local_position(position: Vector3, url: string | Hash | Url): Vector3;
85
+ export function world_to_local_transform(transformation: Matrix4, url: string | Hash | Url): Matrix4;
86
+ export { _delete as delete };
87
+ export interface properties {
88
+ euler: Vector3;
89
+ position: Vector3;
90
+ rotation: Quaternion;
91
+ scale: number;
92
+ }
93
+ }
94
+ }
95
+
96
+ export {};
@@ -0,0 +1,115 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ namespace graphics {
4
+ const BLEND_FACTOR_CONSTANT_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_CONSTANT_ALPHA" };
5
+ const BLEND_FACTOR_CONSTANT_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_CONSTANT_COLOR" };
6
+ const BLEND_FACTOR_DST_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_DST_ALPHA" };
7
+ const BLEND_FACTOR_DST_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_DST_COLOR" };
8
+ const BLEND_FACTOR_ONE: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE" };
9
+ const BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA" };
10
+ const BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR" };
11
+ const BLEND_FACTOR_ONE_MINUS_DST_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_DST_ALPHA" };
12
+ const BLEND_FACTOR_ONE_MINUS_DST_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_DST_COLOR" };
13
+ const BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA" };
14
+ const BLEND_FACTOR_ONE_MINUS_SRC_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_ONE_MINUS_SRC_COLOR" };
15
+ const BLEND_FACTOR_SRC_ALPHA: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_ALPHA" };
16
+ const BLEND_FACTOR_SRC_ALPHA_SATURATE: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_ALPHA_SATURATE" };
17
+ const BLEND_FACTOR_SRC_COLOR: number & { readonly __brand: "graphics.BLEND_FACTOR_SRC_COLOR" };
18
+ const BLEND_FACTOR_ZERO: number & { readonly __brand: "graphics.BLEND_FACTOR_ZERO" };
19
+ const BUFFER_TYPE_COLOR0_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR0_BIT" };
20
+ const BUFFER_TYPE_COLOR1_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR1_BIT" };
21
+ const BUFFER_TYPE_COLOR2_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR2_BIT" };
22
+ const BUFFER_TYPE_COLOR3_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_COLOR3_BIT" };
23
+ const BUFFER_TYPE_DEPTH_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_DEPTH_BIT" };
24
+ const BUFFER_TYPE_STENCIL_BIT: number & { readonly __brand: "graphics.BUFFER_TYPE_STENCIL_BIT" };
25
+ const COMPARE_FUNC_ALWAYS: number & { readonly __brand: "graphics.COMPARE_FUNC_ALWAYS" };
26
+ const COMPARE_FUNC_EQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_EQUAL" };
27
+ const COMPARE_FUNC_GEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_GEQUAL" };
28
+ const COMPARE_FUNC_GREATER: number & { readonly __brand: "graphics.COMPARE_FUNC_GREATER" };
29
+ const COMPARE_FUNC_LEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_LEQUAL" };
30
+ const COMPARE_FUNC_LESS: number & { readonly __brand: "graphics.COMPARE_FUNC_LESS" };
31
+ const COMPARE_FUNC_NEVER: number & { readonly __brand: "graphics.COMPARE_FUNC_NEVER" };
32
+ const COMPARE_FUNC_NOTEQUAL: number & { readonly __brand: "graphics.COMPARE_FUNC_NOTEQUAL" };
33
+ const COMPRESSION_TYPE_BASIS_ETC1S: number & { readonly __brand: "graphics.COMPRESSION_TYPE_BASIS_ETC1S" };
34
+ const COMPRESSION_TYPE_BASIS_UASTC: number & { readonly __brand: "graphics.COMPRESSION_TYPE_BASIS_UASTC" };
35
+ const COMPRESSION_TYPE_DEFAULT: number & { readonly __brand: "graphics.COMPRESSION_TYPE_DEFAULT" };
36
+ const COMPRESSION_TYPE_WEBP: number & { readonly __brand: "graphics.COMPRESSION_TYPE_WEBP" };
37
+ const COMPRESSION_TYPE_WEBP_LOSSY: number & { readonly __brand: "graphics.COMPRESSION_TYPE_WEBP_LOSSY" };
38
+ const FACE_TYPE_BACK: number & { readonly __brand: "graphics.FACE_TYPE_BACK" };
39
+ const FACE_TYPE_FRONT: number & { readonly __brand: "graphics.FACE_TYPE_FRONT" };
40
+ const FACE_TYPE_FRONT_AND_BACK: number & { readonly __brand: "graphics.FACE_TYPE_FRONT_AND_BACK" };
41
+ const STATE_ALPHA_TEST: number & { readonly __brand: "graphics.STATE_ALPHA_TEST" };
42
+ const STATE_ALPHA_TEST_SUPPORTED: number & { readonly __brand: "graphics.STATE_ALPHA_TEST_SUPPORTED" };
43
+ const STATE_BLEND: number & { readonly __brand: "graphics.STATE_BLEND" };
44
+ const STATE_CULL_FACE: number & { readonly __brand: "graphics.STATE_CULL_FACE" };
45
+ const STATE_DEPTH_TEST: number & { readonly __brand: "graphics.STATE_DEPTH_TEST" };
46
+ const STATE_POLYGON_OFFSET_FILL: number & { readonly __brand: "graphics.STATE_POLYGON_OFFSET_FILL" };
47
+ const STATE_SCISSOR_TEST: number & { readonly __brand: "graphics.STATE_SCISSOR_TEST" };
48
+ const STATE_STENCIL_TEST: number & { readonly __brand: "graphics.STATE_STENCIL_TEST" };
49
+ const STENCIL_OP_DECR: number & { readonly __brand: "graphics.STENCIL_OP_DECR" };
50
+ const STENCIL_OP_DECR_WRAP: number & { readonly __brand: "graphics.STENCIL_OP_DECR_WRAP" };
51
+ const STENCIL_OP_INCR: number & { readonly __brand: "graphics.STENCIL_OP_INCR" };
52
+ const STENCIL_OP_INCR_WRAP: number & { readonly __brand: "graphics.STENCIL_OP_INCR_WRAP" };
53
+ const STENCIL_OP_INVERT: number & { readonly __brand: "graphics.STENCIL_OP_INVERT" };
54
+ const STENCIL_OP_KEEP: number & { readonly __brand: "graphics.STENCIL_OP_KEEP" };
55
+ const STENCIL_OP_REPLACE: number & { readonly __brand: "graphics.STENCIL_OP_REPLACE" };
56
+ const STENCIL_OP_ZERO: number & { readonly __brand: "graphics.STENCIL_OP_ZERO" };
57
+ const TEXTURE_FILTER_DEFAULT: number & { readonly __brand: "graphics.TEXTURE_FILTER_DEFAULT" };
58
+ const TEXTURE_FILTER_LINEAR: number & { readonly __brand: "graphics.TEXTURE_FILTER_LINEAR" };
59
+ const TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR: number & { readonly __brand: "graphics.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR" };
60
+ const TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST: number & { readonly __brand: "graphics.TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST" };
61
+ const TEXTURE_FILTER_NEAREST: number & { readonly __brand: "graphics.TEXTURE_FILTER_NEAREST" };
62
+ const TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR: number & { readonly __brand: "graphics.TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR" };
63
+ const TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST: number & { readonly __brand: "graphics.TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST" };
64
+ const TEXTURE_FORMAT_BGRA8U: number & { readonly __brand: "graphics.TEXTURE_FORMAT_BGRA8U" };
65
+ const TEXTURE_FORMAT_DEPTH: number & { readonly __brand: "graphics.TEXTURE_FORMAT_DEPTH" };
66
+ const TEXTURE_FORMAT_LUMINANCE: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE" };
67
+ const TEXTURE_FORMAT_LUMINANCE_ALPHA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_LUMINANCE_ALPHA" };
68
+ const TEXTURE_FORMAT_R_BC4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_BC4" };
69
+ const TEXTURE_FORMAT_R_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R_ETC2" };
70
+ const TEXTURE_FORMAT_R16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R16F" };
71
+ const TEXTURE_FORMAT_R32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32F" };
72
+ const TEXTURE_FORMAT_R32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_R32UI" };
73
+ const TEXTURE_FORMAT_RG_BC5: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_BC5" };
74
+ const TEXTURE_FORMAT_RG_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG_ETC2" };
75
+ const TEXTURE_FORMAT_RG16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG16F" };
76
+ const TEXTURE_FORMAT_RG32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RG32F" };
77
+ const TEXTURE_FORMAT_RGB: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB" };
78
+ const TEXTURE_FORMAT_RGB_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_16BPP" };
79
+ const TEXTURE_FORMAT_RGB_BC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_BC1" };
80
+ const TEXTURE_FORMAT_RGB_ETC1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_ETC1" };
81
+ const TEXTURE_FORMAT_RGB_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1" };
82
+ const TEXTURE_FORMAT_RGB_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1" };
83
+ const TEXTURE_FORMAT_RGB16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB16F" };
84
+ const TEXTURE_FORMAT_RGB32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGB32F" };
85
+ const TEXTURE_FORMAT_RGBA: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA" };
86
+ const TEXTURE_FORMAT_RGBA_16BPP: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_16BPP" };
87
+ const TEXTURE_FORMAT_RGBA_ASTC_4X4: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ASTC_4X4" };
88
+ const TEXTURE_FORMAT_RGBA_BC3: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC3" };
89
+ const TEXTURE_FORMAT_RGBA_BC7: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_BC7" };
90
+ const TEXTURE_FORMAT_RGBA_ETC2: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_ETC2" };
91
+ const TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1" };
92
+ const TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1" };
93
+ const TEXTURE_FORMAT_RGBA16F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA16F" };
94
+ const TEXTURE_FORMAT_RGBA32F: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32F" };
95
+ const TEXTURE_FORMAT_RGBA32UI: number & { readonly __brand: "graphics.TEXTURE_FORMAT_RGBA32UI" };
96
+ const TEXTURE_FORMAT_STENCIL: number & { readonly __brand: "graphics.TEXTURE_FORMAT_STENCIL" };
97
+ const TEXTURE_TYPE_2D: number & { readonly __brand: "graphics.TEXTURE_TYPE_2D" };
98
+ const TEXTURE_TYPE_2D_ARRAY: number & { readonly __brand: "graphics.TEXTURE_TYPE_2D_ARRAY" };
99
+ const TEXTURE_TYPE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_3D" };
100
+ const TEXTURE_TYPE_CUBE_MAP: number & { readonly __brand: "graphics.TEXTURE_TYPE_CUBE_MAP" };
101
+ const TEXTURE_TYPE_IMAGE_2D: number & { readonly __brand: "graphics.TEXTURE_TYPE_IMAGE_2D" };
102
+ const TEXTURE_TYPE_IMAGE_3D: number & { readonly __brand: "graphics.TEXTURE_TYPE_IMAGE_3D" };
103
+ const TEXTURE_USAGE_FLAG_COLOR: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_COLOR" };
104
+ const TEXTURE_USAGE_FLAG_INPUT: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_INPUT" };
105
+ const TEXTURE_USAGE_FLAG_MEMORYLESS: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_MEMORYLESS" };
106
+ const TEXTURE_USAGE_FLAG_SAMPLE: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_SAMPLE" };
107
+ const TEXTURE_USAGE_FLAG_STORAGE: number & { readonly __brand: "graphics.TEXTURE_USAGE_FLAG_STORAGE" };
108
+ const TEXTURE_WRAP_CLAMP_TO_BORDER: number & { readonly __brand: "graphics.TEXTURE_WRAP_CLAMP_TO_BORDER" };
109
+ const TEXTURE_WRAP_CLAMP_TO_EDGE: number & { readonly __brand: "graphics.TEXTURE_WRAP_CLAMP_TO_EDGE" };
110
+ const TEXTURE_WRAP_MIRRORED_REPEAT: number & { readonly __brand: "graphics.TEXTURE_WRAP_MIRRORED_REPEAT" };
111
+ const TEXTURE_WRAP_REPEAT: number & { readonly __brand: "graphics.TEXTURE_WRAP_REPEAT" };
112
+ }
113
+ }
114
+
115
+ export {};