@defold-typescript/types 0.24.0 → 0.26.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 (41) hide show
  1. package/api-availability.json +333 -306
  2. package/api-signatures.json +47 -46
  3. package/api-targets.json +66 -2
  4. package/generated/collectionproxy.d.ts +22 -0
  5. package/generated/editor-vm/http.d.ts +56 -0
  6. package/generated/editor-vm/image.d.ts +48 -0
  7. package/generated/editor-vm/json.d.ts +10 -0
  8. package/generated/editor-vm/localization.d.ts +42 -0
  9. package/generated/editor-vm/tilemap_tiles.d.ts +80 -0
  10. package/generated/editor-vm/zip.d.ts +10 -0
  11. package/generated/editor-vm/zlib.d.ts +24 -0
  12. package/generated/editor.d.ts +1111 -0
  13. package/generated/go.d.ts +22 -22
  14. package/generated/gui.d.ts +35 -6
  15. package/generated/kinds/editor-script.d.ts +14 -0
  16. package/generated/kinds/gui-script.d.ts +1 -0
  17. package/generated/kinds/render-script.d.ts +1 -0
  18. package/generated/kinds/script.d.ts +1 -0
  19. package/generated/material.d.ts +4 -0
  20. package/generated/versions/defold-1.12.4/go.d.ts +22 -22
  21. package/generated/versions/defold-1.12.4/gui.d.ts +43 -43
  22. package/index.d.ts +9 -0
  23. package/package.json +9 -1
  24. package/scripts/import-defold-release.ts +10 -0
  25. package/scripts/materialize-version.ts +54 -13
  26. package/scripts/regen.ts +425 -42
  27. package/scripts/sync-api-docs.ts +86 -9
  28. package/src/api-availability.ts +0 -0
  29. package/src/core-types.ts +15 -1
  30. package/src/editor-overloads.d.ts +33 -0
  31. package/src/editor-vm-globals.d.ts +200 -0
  32. package/src/editor-vm-types.ts +44 -0
  33. package/src/editor.ts +117 -16
  34. package/src/emit-dts.ts +298 -79
  35. package/src/engine-globals.d.ts +2 -2
  36. package/src/go-overloads.d.ts +6 -6
  37. package/src/index.ts +15 -0
  38. package/src/msg-overloads.d.ts +3 -3
  39. package/src/scene-addresses.d.ts +62 -0
  40. package/src/url-parameters.ts +174 -0
  41. package/url-parameters.json +285 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "versions": {
3
- "1.13.0": {
3
+ "1.13.1": {
4
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\">;",
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\">;",
@@ -369,6 +369,7 @@
369
369
  "collectionproxy\u0000CONSTANT\u0000collectionproxy.RESULT_LOADING\u0000": "const RESULT_LOADING: number & { readonly __brand: \"collectionproxy.RESULT_LOADING\" };",
370
370
  "collectionproxy\u0000CONSTANT\u0000collectionproxy.RESULT_NOT_EXCLUDED\u0000": "const RESULT_NOT_EXCLUDED: number & { readonly __brand: \"collectionproxy.RESULT_NOT_EXCLUDED\" };",
371
371
  "collectionproxy\u0000FUNCTION\u0000collectionproxy.get_resources\u0000[{\"types\":[\"url\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_resources(collectionproxy: Url): Hash[];",
372
+ "collectionproxy\u0000FUNCTION\u0000collectionproxy.load\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"nil\",\"table\"],\"isOptional\":false},{\"types\":[\"function(self, message_id, message, sender)\"],\"isOptional\":false}]->[]": "function load(url: string | Hash | Url, options: Record<string | number, unknown> | undefined, callback: (self: unknown, message_id: unknown, message: unknown, sender: unknown) => void): void;",
372
373
  "collectionproxy\u0000FUNCTION\u0000collectionproxy.set_collection\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"nil\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"boolean\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]": "function set_collection(url?: string | Hash | Url, prototype?: string): LuaMultiReturn<[boolean, number]>;",
373
374
  "compute\u0000FUNCTION\u0000compute.get_constants\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_constants(path: Hash | string): { name: Hash; type: number; value: Vector4 | Matrix4 }[];",
374
375
  "compute\u0000FUNCTION\u0000compute.get_samplers\u0000[{\"types\":[\"hash\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_samplers(path: Hash | string): { name: Hash; u_wrap: number; v_wrap: number; min_filter: number; mag_filter: number; max_anisotropy: number }[];",
@@ -462,29 +463,29 @@
462
463
  "go\u0000CONSTANT\u0000go.PLAYBACK_ONCE_PINGPONG\u0000": "const PLAYBACK_ONCE_PINGPONG: number & { readonly __brand: \"go.PLAYBACK_ONCE_PINGPONG\" };",
463
464
  "go\u0000FUNCTION\u0000final\u0000[{\"types\":[\"userdata\"],\"isOptional\":false}]->[]": "function final(self: Opaque<\"userdata\">): void;",
464
465
  "go\u0000FUNCTION\u0000fixed_update\u0000[{\"types\":[\"userdata\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function fixed_update(self: Opaque<\"userdata\">, dt: number): void;",
465
- "go\u0000FUNCTION\u0000go.animate\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"go.PLAYBACK_LOOP_BACKWARD\",\"go.PLAYBACK_LOOP_FORWARD\",\"go.PLAYBACK_LOOP_PINGPONG\",\"go.PLAYBACK_ONCE_BACKWARD\",\"go.PLAYBACK_ONCE_FORWARD\",\"go.PLAYBACK_ONCE_PINGPONG\"],\"isOptional\":false},{\"types\":[\"number\",\"quaternion\",\"vector3\",\"vector4\"],\"isOptional\":false},{\"types\":[\"go.EASING_INBACK\",\"go.EASING_INBOUNCE\",\"go.EASING_INCIRC\",\"go.EASING_INCUBIC\",\"go.EASING_INELASTIC\",\"go.EASING_INEXPO\",\"go.EASING_INOUTBACK\",\"go.EASING_INOUTBOUNCE\",\"go.EASING_INOUTCIRC\",\"go.EASING_INOUTCUBIC\",\"go.EASING_INOUTELASTIC\",\"go.EASING_INOUTEXPO\",\"go.EASING_INOUTQUAD\",\"go.EASING_INOUTQUART\",\"go.EASING_INOUTQUINT\",\"go.EASING_INOUTSINE\",\"go.EASING_INQUAD\",\"go.EASING_INQUART\",\"go.EASING_INQUINT\",\"go.EASING_INSINE\",\"go.EASING_LINEAR\",\"go.EASING_OUTBACK\",\"go.EASING_OUTBOUNCE\",\"go.EASING_OUTCIRC\",\"go.EASING_OUTCUBIC\",\"go.EASING_OUTELASTIC\",\"go.EASING_OUTEXPO\",\"go.EASING_OUTINBACK\",\"go.EASING_OUTINBOUNCE\",\"go.EASING_OUTINCIRC\",\"go.EASING_OUTINCUBIC\",\"go.EASING_OUTINELASTIC\",\"go.EASING_OUTINEXPO\",\"go.EASING_OUTINQUAD\",\"go.EASING_OUTINQUART\",\"go.EASING_OUTINQUINT\",\"go.EASING_OUTINSINE\",\"go.EASING_OUTQUAD\",\"go.EASING_OUTQUART\",\"go.EASING_OUTQUINT\",\"go.EASING_OUTSINE\",\"vector\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":true},{\"types\":[\"function(self, url, property)\"],\"isOptional\":true}]->[]": "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;",
466
- "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url: string | Hash | Url, property?: string | Hash): void;",
467
- "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"hash\",\"string\",\"table\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: string | Hash | Url | (string | Hash | Url)[], recursive?: boolean): void;",
468
- "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: string | Hash | Url): boolean;",
466
+ "go\u0000FUNCTION\u0000go.animate\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"go.PLAYBACK_LOOP_BACKWARD\",\"go.PLAYBACK_LOOP_FORWARD\",\"go.PLAYBACK_LOOP_PINGPONG\",\"go.PLAYBACK_ONCE_BACKWARD\",\"go.PLAYBACK_ONCE_FORWARD\",\"go.PLAYBACK_ONCE_PINGPONG\"],\"isOptional\":false},{\"types\":[\"number\",\"quaternion\",\"vector3\",\"vector4\"],\"isOptional\":false},{\"types\":[\"go.EASING_INBACK\",\"go.EASING_INBOUNCE\",\"go.EASING_INCIRC\",\"go.EASING_INCUBIC\",\"go.EASING_INELASTIC\",\"go.EASING_INEXPO\",\"go.EASING_INOUTBACK\",\"go.EASING_INOUTBOUNCE\",\"go.EASING_INOUTCIRC\",\"go.EASING_INOUTCUBIC\",\"go.EASING_INOUTELASTIC\",\"go.EASING_INOUTEXPO\",\"go.EASING_INOUTQUAD\",\"go.EASING_INOUTQUART\",\"go.EASING_INOUTQUINT\",\"go.EASING_INOUTSINE\",\"go.EASING_INQUAD\",\"go.EASING_INQUART\",\"go.EASING_INQUINT\",\"go.EASING_INSINE\",\"go.EASING_LINEAR\",\"go.EASING_OUTBACK\",\"go.EASING_OUTBOUNCE\",\"go.EASING_OUTCIRC\",\"go.EASING_OUTCUBIC\",\"go.EASING_OUTELASTIC\",\"go.EASING_OUTEXPO\",\"go.EASING_OUTINBACK\",\"go.EASING_OUTINBOUNCE\",\"go.EASING_OUTINCIRC\",\"go.EASING_OUTINCUBIC\",\"go.EASING_OUTINELASTIC\",\"go.EASING_OUTINEXPO\",\"go.EASING_OUTINQUAD\",\"go.EASING_OUTINQUART\",\"go.EASING_OUTINQUINT\",\"go.EASING_OUTINSINE\",\"go.EASING_OUTQUAD\",\"go.EASING_OUTQUART\",\"go.EASING_OUTQUINT\",\"go.EASING_OUTSINE\",\"vector\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":true},{\"types\":[\"function(self, url, property)\"],\"isOptional\":true}]->[]": "function animate(url: SceneAddress | 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;",
467
+ "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url: SceneAddress | Hash | Url, property?: string | Hash): void;",
468
+ "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"hash\",\"string\",\"table\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: SceneGameObjectAddress | Hash | Url | (SceneGameObjectAddress | Hash | Url)[], recursive?: boolean): void;",
469
+ "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: SceneGameObjectAddress | Hash | Url): boolean;",
469
470
  "go\u0000FUNCTION\u0000go.get_id\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"hash\"],\"isOptional\":false}]": "function get_id(path?: string): Hash;",
470
- "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: string | Hash | Url): Hash | undefined;",
471
- "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_position(id?: string | Hash | Url): Vector3;",
472
- "go\u0000FUNCTION\u0000go.get_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_rotation(id?: string | Hash | Url): Quaternion;",
473
- "go\u0000FUNCTION\u0000go.get_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_scale(id?: string | Hash | Url): Vector3;",
474
- "go\u0000FUNCTION\u0000go.get_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_scale_uniform(id?: string | Hash | Url): number;",
475
- "go\u0000FUNCTION\u0000go.get_world_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_position(id?: string | Hash | Url): Vector3;",
476
- "go\u0000FUNCTION\u0000go.get_world_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_world_rotation(id?: string | Hash | Url): Quaternion;",
477
- "go\u0000FUNCTION\u0000go.get_world_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_scale(id?: string | Hash | Url): Vector3;",
478
- "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: string | Hash | Url): number;",
479
- "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: string | Hash | Url): Matrix4;",
480
- "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: string | Hash | Url, parent_id?: string | Hash | Url, keep_world_transform?: boolean): void;",
481
- "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: string | Hash | Url): void;",
482
- "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"quaternion\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: string | Hash | Url): void;",
483
- "go\u0000FUNCTION\u0000go.set_scale\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale(scale: number | Vector3, id?: string | Hash | Url): void;",
484
- "go\u0000FUNCTION\u0000go.set_scale_xy\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale_xy(scale: number | Vector3, id?: string | Hash | Url): void;",
485
- "go\u0000FUNCTION\u0000go.update_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function update_world_transform(id?: string | Hash | Url): void;",
486
- "go\u0000FUNCTION\u0000go.world_to_local_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function world_to_local_position(position: Vector3, url: string | Hash | Url): Vector3;",
487
- "go\u0000FUNCTION\u0000go.world_to_local_transform\u0000[{\"types\":[\"matrix4\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function world_to_local_transform(transformation: Matrix4, url: string | Hash | Url): Matrix4;",
471
+ "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: SceneGameObjectAddress | Hash | Url): Hash | undefined;",
472
+ "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
473
+ "go\u0000FUNCTION\u0000go.get_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_rotation(id?: SceneGameObjectAddress | Hash | Url): Quaternion;",
474
+ "go\u0000FUNCTION\u0000go.get_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_scale(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
475
+ "go\u0000FUNCTION\u0000go.get_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
476
+ "go\u0000FUNCTION\u0000go.get_world_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
477
+ "go\u0000FUNCTION\u0000go.get_world_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_world_rotation(id?: SceneGameObjectAddress | Hash | Url): Quaternion;",
478
+ "go\u0000FUNCTION\u0000go.get_world_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_scale(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
479
+ "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
480
+ "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: SceneGameObjectAddress | Hash | Url): Matrix4;",
481
+ "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: SceneGameObjectAddress | Hash | Url, parent_id?: SceneGameObjectAddress | Hash | Url, keep_world_transform?: boolean): void;",
482
+ "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
483
+ "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"quaternion\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: SceneGameObjectAddress | Hash | Url): void;",
484
+ "go\u0000FUNCTION\u0000go.set_scale\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale(scale: number | Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
485
+ "go\u0000FUNCTION\u0000go.set_scale_xy\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale_xy(scale: number | Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
486
+ "go\u0000FUNCTION\u0000go.update_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function update_world_transform(id?: SceneGameObjectAddress | Hash | Url): void;",
487
+ "go\u0000FUNCTION\u0000go.world_to_local_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function world_to_local_position(position: Vector3, url: SceneGameObjectAddress | Hash | Url): Vector3;",
488
+ "go\u0000FUNCTION\u0000go.world_to_local_transform\u0000[{\"types\":[\"matrix4\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function world_to_local_transform(transformation: Matrix4, url: SceneGameObjectAddress | Hash | Url): Matrix4;",
488
489
  "go\u0000FUNCTION\u0000init\u0000[{\"types\":[\"userdata\"],\"isOptional\":false}]->[]": "function init(self: Opaque<\"userdata\">): void;",
489
490
  "go\u0000FUNCTION\u0000late_update\u0000[{\"types\":[\"userdata\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function late_update(self: Opaque<\"userdata\">, dt: number): void;",
490
491
  "go\u0000FUNCTION\u0000on_input\u0000[{\"types\":[\"userdata\"],\"isOptional\":false},{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":false}]->[{\"types\":[\"boolean\",\"nil\"],\"isOptional\":false}]": "function on_input(self: Opaque<\"userdata\">, action_id: Hash, action: { value?: number; pressed?: boolean; released?: boolean; repeated?: boolean; x?: number; y?: number; screen_x?: number; screen_y?: number; dx?: number; dy?: number; screen_dx?: number; screen_dy?: number; gamepad?: number; gamepad_axis?: Vector3; touch?: { id?: number; pressed?: boolean; released?: boolean; tap_count?: number; x?: number; y?: number; dx?: number; dy?: number; acc_x?: number; acc_y?: number; acc_z?: number }[]; text?: string }): boolean | undefined;",
@@ -797,7 +798,7 @@
797
798
  "gui\u0000FUNCTION\u0000gui.reset_material\u0000[{\"types\":[\"node\"],\"isOptional\":false}]->[]": "function reset_material(node: Opaque<\"node\">): void;",
798
799
  "gui\u0000FUNCTION\u0000gui.reset_nodes\u0000[]->[]": "function reset_nodes(): void;",
799
800
  "gui\u0000FUNCTION\u0000gui.screen_to_local\u0000[{\"types\":[\"node\"],\"isOptional\":false},{\"types\":[\"vector3\"],\"isOptional\":false}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function screen_to_local(node: Opaque<\"node\">, screen_position: Vector3): Vector3;",
800
- "gui\u0000FUNCTION\u0000gui.set\u0000[{\"types\":[\"node\",\"url\"],\"isOptional\":false},{\"types\":[\"constant\",\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"number\",\"quaternion\",\"vector3\",\"vector4\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "function set(node: Opaque<\"node\"> | Url, property: string | Hash | Opaque<\"constant\">, value: number | Vector4 | Vector3 | Quaternion, options?: { index?: number; key?: Hash }): void;",
801
+ "gui\u0000FUNCTION\u0000gui.set\u0000[{\"types\":[\"node\",\"url\"],\"isOptional\":false},{\"types\":[\"constant\",\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"nil\",\"number\",\"quaternion\",\"vector3\",\"vector4\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "function set(node: Opaque<\"node\"> | Url, property: string | Hash | Opaque<\"constant\">, value?: number | Vector4 | Vector3 | Quaternion, options?: { index?: number; key?: Hash }): void;",
801
802
  "gui\u0000FUNCTION\u0000gui.set_adjust_mode\u0000[{\"types\":[\"node\"],\"isOptional\":false},{\"types\":[\"constant\"],\"isOptional\":false}]->[]": "function set_adjust_mode(node: Opaque<\"node\">, adjust_mode: Opaque<\"constant\">): void;",
802
803
  "gui\u0000FUNCTION\u0000gui.set_alpha\u0000[{\"types\":[\"node\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function set_alpha(node: Opaque<\"node\">, alpha: number): void;",
803
804
  "gui\u0000FUNCTION\u0000gui.set_blend_mode\u0000[{\"types\":[\"node\"],\"isOptional\":false},{\"types\":[\"constant\"],\"isOptional\":false}]->[]": "function set_blend_mode(node: Opaque<\"node\">, blend_mode: Opaque<\"constant\">): void;",
@@ -1502,29 +1503,29 @@
1502
1503
  "go\u0000CONSTANT\u0000go.PLAYBACK_ONCE_PINGPONG\u0000": "const PLAYBACK_ONCE_PINGPONG: number & { readonly __brand: \"go.PLAYBACK_ONCE_PINGPONG\" };",
1503
1504
  "go\u0000FUNCTION\u0000final\u0000[{\"types\":[\"userdata\"],\"isOptional\":false}]->[]": "function final(self: Opaque<\"userdata\">): void;",
1504
1505
  "go\u0000FUNCTION\u0000fixed_update\u0000[{\"types\":[\"userdata\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function fixed_update(self: Opaque<\"userdata\">, dt: number): void;",
1505
- "go\u0000FUNCTION\u0000go.animate\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"go.PLAYBACK_LOOP_BACKWARD\",\"go.PLAYBACK_LOOP_FORWARD\",\"go.PLAYBACK_LOOP_PINGPONG\",\"go.PLAYBACK_ONCE_BACKWARD\",\"go.PLAYBACK_ONCE_FORWARD\",\"go.PLAYBACK_ONCE_PINGPONG\"],\"isOptional\":false},{\"types\":[\"number\",\"quaternion\",\"vector3\",\"vector4\"],\"isOptional\":false},{\"types\":[\"go.EASING_INBACK\",\"go.EASING_INBOUNCE\",\"go.EASING_INCIRC\",\"go.EASING_INCUBIC\",\"go.EASING_INELASTIC\",\"go.EASING_INEXPO\",\"go.EASING_INOUTBACK\",\"go.EASING_INOUTBOUNCE\",\"go.EASING_INOUTCIRC\",\"go.EASING_INOUTCUBIC\",\"go.EASING_INOUTELASTIC\",\"go.EASING_INOUTEXPO\",\"go.EASING_INOUTQUAD\",\"go.EASING_INOUTQUART\",\"go.EASING_INOUTQUINT\",\"go.EASING_INOUTSINE\",\"go.EASING_INQUAD\",\"go.EASING_INQUART\",\"go.EASING_INQUINT\",\"go.EASING_INSINE\",\"go.EASING_LINEAR\",\"go.EASING_OUTBACK\",\"go.EASING_OUTBOUNCE\",\"go.EASING_OUTCIRC\",\"go.EASING_OUTCUBIC\",\"go.EASING_OUTELASTIC\",\"go.EASING_OUTEXPO\",\"go.EASING_OUTINBACK\",\"go.EASING_OUTINBOUNCE\",\"go.EASING_OUTINCIRC\",\"go.EASING_OUTINCUBIC\",\"go.EASING_OUTINELASTIC\",\"go.EASING_OUTINEXPO\",\"go.EASING_OUTINQUAD\",\"go.EASING_OUTINQUART\",\"go.EASING_OUTINQUINT\",\"go.EASING_OUTINSINE\",\"go.EASING_OUTQUAD\",\"go.EASING_OUTQUART\",\"go.EASING_OUTQUINT\",\"go.EASING_OUTSINE\",\"vector\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":true},{\"types\":[\"function(self, url, property)\"],\"isOptional\":true}]->[]": "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;",
1506
- "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url: string | Hash | Url, property?: string | Hash): void;",
1507
- "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"hash\",\"string\",\"table\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: string | Hash | Url | (string | Hash | Url)[], recursive?: boolean): void;",
1508
- "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: string | Hash | Url): boolean;",
1506
+ "go\u0000FUNCTION\u0000go.animate\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":false},{\"types\":[\"go.PLAYBACK_LOOP_BACKWARD\",\"go.PLAYBACK_LOOP_FORWARD\",\"go.PLAYBACK_LOOP_PINGPONG\",\"go.PLAYBACK_ONCE_BACKWARD\",\"go.PLAYBACK_ONCE_FORWARD\",\"go.PLAYBACK_ONCE_PINGPONG\"],\"isOptional\":false},{\"types\":[\"number\",\"quaternion\",\"vector3\",\"vector4\"],\"isOptional\":false},{\"types\":[\"go.EASING_INBACK\",\"go.EASING_INBOUNCE\",\"go.EASING_INCIRC\",\"go.EASING_INCUBIC\",\"go.EASING_INELASTIC\",\"go.EASING_INEXPO\",\"go.EASING_INOUTBACK\",\"go.EASING_INOUTBOUNCE\",\"go.EASING_INOUTCIRC\",\"go.EASING_INOUTCUBIC\",\"go.EASING_INOUTELASTIC\",\"go.EASING_INOUTEXPO\",\"go.EASING_INOUTQUAD\",\"go.EASING_INOUTQUART\",\"go.EASING_INOUTQUINT\",\"go.EASING_INOUTSINE\",\"go.EASING_INQUAD\",\"go.EASING_INQUART\",\"go.EASING_INQUINT\",\"go.EASING_INSINE\",\"go.EASING_LINEAR\",\"go.EASING_OUTBACK\",\"go.EASING_OUTBOUNCE\",\"go.EASING_OUTCIRC\",\"go.EASING_OUTCUBIC\",\"go.EASING_OUTELASTIC\",\"go.EASING_OUTEXPO\",\"go.EASING_OUTINBACK\",\"go.EASING_OUTINBOUNCE\",\"go.EASING_OUTINCIRC\",\"go.EASING_OUTINCUBIC\",\"go.EASING_OUTINELASTIC\",\"go.EASING_OUTINEXPO\",\"go.EASING_OUTINQUAD\",\"go.EASING_OUTINQUART\",\"go.EASING_OUTINQUINT\",\"go.EASING_OUTINSINE\",\"go.EASING_OUTQUAD\",\"go.EASING_OUTQUART\",\"go.EASING_OUTQUINT\",\"go.EASING_OUTSINE\",\"vector\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":true},{\"types\":[\"function(self, url, property)\"],\"isOptional\":true}]->[]": "function animate(url: SceneAddress | 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;",
1507
+ "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url: SceneAddress | Hash | Url, property?: string | Hash): void;",
1508
+ "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"hash\",\"string\",\"table\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: SceneGameObjectAddress | Hash | Url | (SceneGameObjectAddress | Hash | Url)[], recursive?: boolean): void;",
1509
+ "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: SceneGameObjectAddress | Hash | Url): boolean;",
1509
1510
  "go\u0000FUNCTION\u0000go.get_id\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"hash\"],\"isOptional\":false}]": "function get_id(path?: string): Hash;",
1510
- "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: string | Hash | Url): Hash | undefined;",
1511
- "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_position(id?: string | Hash | Url): Vector3;",
1512
- "go\u0000FUNCTION\u0000go.get_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_rotation(id?: string | Hash | Url): Quaternion;",
1513
- "go\u0000FUNCTION\u0000go.get_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_scale(id?: string | Hash | Url): Vector3;",
1514
- "go\u0000FUNCTION\u0000go.get_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_scale_uniform(id?: string | Hash | Url): number;",
1515
- "go\u0000FUNCTION\u0000go.get_world_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_position(id?: string | Hash | Url): Vector3;",
1516
- "go\u0000FUNCTION\u0000go.get_world_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_world_rotation(id?: string | Hash | Url): Quaternion;",
1517
- "go\u0000FUNCTION\u0000go.get_world_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_scale(id?: string | Hash | Url): Vector3;",
1518
- "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: string | Hash | Url): number;",
1519
- "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: string | Hash | Url): Matrix4;",
1520
- "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: string | Hash | Url, parent_id?: string | Hash | Url, keep_world_transform?: boolean): void;",
1521
- "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: string | Hash | Url): void;",
1522
- "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"quaternion\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: string | Hash | Url): void;",
1523
- "go\u0000FUNCTION\u0000go.set_scale\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale(scale: number | Vector3, id?: string | Hash | Url): void;",
1524
- "go\u0000FUNCTION\u0000go.set_scale_xy\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale_xy(scale: number | Vector3, id?: string | Hash | Url): void;",
1525
- "go\u0000FUNCTION\u0000go.update_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function update_world_transform(id?: string | Hash | Url): void;",
1526
- "go\u0000FUNCTION\u0000go.world_to_local_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function world_to_local_position(position: Vector3, url: string | Hash | Url): Vector3;",
1527
- "go\u0000FUNCTION\u0000go.world_to_local_transform\u0000[{\"types\":[\"matrix4\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function world_to_local_transform(transformation: Matrix4, url: string | Hash | Url): Matrix4;",
1511
+ "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: SceneGameObjectAddress | Hash | Url): Hash | undefined;",
1512
+ "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
1513
+ "go\u0000FUNCTION\u0000go.get_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_rotation(id?: SceneGameObjectAddress | Hash | Url): Quaternion;",
1514
+ "go\u0000FUNCTION\u0000go.get_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_scale(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
1515
+ "go\u0000FUNCTION\u0000go.get_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
1516
+ "go\u0000FUNCTION\u0000go.get_world_position\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
1517
+ "go\u0000FUNCTION\u0000go.get_world_rotation\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"quaternion\"],\"isOptional\":false}]": "function get_world_rotation(id?: SceneGameObjectAddress | Hash | Url): Quaternion;",
1518
+ "go\u0000FUNCTION\u0000go.get_world_scale\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function get_world_scale(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
1519
+ "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
1520
+ "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: SceneGameObjectAddress | Hash | Url): Matrix4;",
1521
+ "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: SceneGameObjectAddress | Hash | Url, parent_id?: SceneGameObjectAddress | Hash | Url, keep_world_transform?: boolean): void;",
1522
+ "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
1523
+ "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"quaternion\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: SceneGameObjectAddress | Hash | Url): void;",
1524
+ "go\u0000FUNCTION\u0000go.set_scale\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale(scale: number | Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
1525
+ "go\u0000FUNCTION\u0000go.set_scale_xy\u0000[{\"types\":[\"number\",\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function set_scale_xy(scale: number | Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
1526
+ "go\u0000FUNCTION\u0000go.update_world_transform\u0000[{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":true}]->[]": "function update_world_transform(id?: SceneGameObjectAddress | Hash | Url): void;",
1527
+ "go\u0000FUNCTION\u0000go.world_to_local_position\u0000[{\"types\":[\"vector3\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"vector3\"],\"isOptional\":false}]": "function world_to_local_position(position: Vector3, url: SceneGameObjectAddress | Hash | Url): Vector3;",
1528
+ "go\u0000FUNCTION\u0000go.world_to_local_transform\u0000[{\"types\":[\"matrix4\"],\"isOptional\":false},{\"types\":[\"hash\",\"string\",\"url\"],\"isOptional\":false}]->[{\"types\":[\"matrix4\"],\"isOptional\":false}]": "function world_to_local_transform(transformation: Matrix4, url: SceneGameObjectAddress | Hash | Url): Matrix4;",
1528
1529
  "go\u0000FUNCTION\u0000init\u0000[{\"types\":[\"userdata\"],\"isOptional\":false}]->[]": "function init(self: Opaque<\"userdata\">): void;",
1529
1530
  "go\u0000FUNCTION\u0000late_update\u0000[{\"types\":[\"userdata\"],\"isOptional\":false},{\"types\":[\"number\"],\"isOptional\":false}]->[]": "function late_update(self: Opaque<\"userdata\">, dt: number): void;",
1530
1531
  "go\u0000FUNCTION\u0000on_input\u0000[{\"types\":[\"userdata\"],\"isOptional\":false},{\"types\":[\"hash\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":false}]->[{\"types\":[\"boolean\",\"nil\"],\"isOptional\":false}]": "function on_input(self: Opaque<\"userdata\">, action_id: Hash, action: { value?: number; pressed?: boolean; released?: boolean; repeated?: boolean; x?: number; y?: number; screen_x?: number; screen_y?: number; dx?: number; dy?: number; screen_dx?: number; screen_dy?: number; gamepad?: number; gamepad_axis?: Vector3; touch?: { id?: number; pressed?: boolean; released?: boolean; tap_count?: number; x?: number; y?: number; dx?: number; dy?: number; acc_x?: number; acc_y?: number; acc_z?: number }[]; text?: string }): boolean | undefined;",
package/api-targets.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "targets": [
3
3
  {
4
- "id": "defold-1.13.0",
4
+ "id": "defold-1.13.1",
5
5
  "default": true,
6
- "fixturesDir": "fixtures/defold-1.13.0",
6
+ "fixturesDir": "fixtures/defold-1.13.1",
7
7
  "generatedDir": "generated",
8
8
  "coreTypesImport": "../src/core-types",
9
9
  "source": null,
@@ -242,6 +242,70 @@
242
242
  "outFile": "zlib.d.ts"
243
243
  }
244
244
  ],
245
+ "editorModules": [
246
+ {
247
+ "namespace": "editor",
248
+ "fixture": "editor_doc.json",
249
+ "outFile": "editor.d.ts",
250
+ "mapType": "editor",
251
+ "skipFunctions": [
252
+ "command",
253
+ "http.",
254
+ "image.",
255
+ "json.",
256
+ "localization.",
257
+ "pprint",
258
+ "tilemap.",
259
+ "zip.",
260
+ "zlib."
261
+ ]
262
+ },
263
+ {
264
+ "namespace": "http",
265
+ "fixture": "editor_http_doc.json",
266
+ "outFile": "editor-vm/http.d.ts",
267
+ "mapType": "editor",
268
+ "skipFunctions": ["server.local_url", "server.port", "server.route", "server.url"]
269
+ },
270
+ {
271
+ "namespace": "image",
272
+ "fixture": "editor_image_doc.json",
273
+ "outFile": "editor-vm/image.d.ts",
274
+ "mapType": "editor"
275
+ },
276
+ {
277
+ "namespace": "json",
278
+ "fixture": "editor_json_doc.json",
279
+ "outFile": "editor-vm/json.d.ts",
280
+ "mapType": "editor",
281
+ "skipFunctions": ["decode", "encode"]
282
+ },
283
+ {
284
+ "namespace": "localization",
285
+ "fixture": "editor_localization_doc.json",
286
+ "outFile": "editor-vm/localization.d.ts",
287
+ "mapType": "editor"
288
+ },
289
+ {
290
+ "namespace": "zip",
291
+ "fixture": "editor_zip_doc.json",
292
+ "outFile": "editor-vm/zip.d.ts",
293
+ "mapType": "editor",
294
+ "skipFunctions": ["METHOD.", "ON_CONFLICT.", "pack", "unpack"]
295
+ },
296
+ {
297
+ "namespace": "zlib",
298
+ "fixture": "editor_zlib_doc.json",
299
+ "outFile": "editor-vm/zlib.d.ts",
300
+ "mapType": "editor"
301
+ },
302
+ {
303
+ "namespace": "tilemap.tiles",
304
+ "fixture": "editor_tilemap_tiles_doc.json",
305
+ "outFile": "editor-vm/tilemap_tiles.d.ts",
306
+ "mapType": "editor"
307
+ }
308
+ ],
245
309
  "luaStdlib": [
246
310
  {
247
311
  "namespace": "base",
@@ -41,6 +41,28 @@ declare global {
41
41
  * ```
42
42
  */
43
43
  function get_resources(collectionproxy: Url): Hash[];
44
+ /**
45
+ * Loads the collection referenced by a collection proxy. The proxy is also
46
+ * initialized and the callback receives `proxy_loading`, `proxy_ready`, or
47
+ * `proxy_error` messages.
48
+ *
49
+ * @param url - the collection proxy component
50
+ * @param options - options table, currently unused
51
+ * @param callback - callback
52
+ * @example
53
+ * ```ts
54
+ * collectionproxy.load("#proxy", undefined, (self, message_id, message, sender) => {
55
+ * if (message_id === hash("proxy_ready")) {
56
+ * print("proxy is ready");
57
+ * } else if (message_id === hash("proxy_loading")) {
58
+ * print("progress", message.progress);
59
+ * } else if (message_id === hash("proxy_error")) {
60
+ * print("error", message.code);
61
+ * }
62
+ * });
63
+ * ```
64
+ */
65
+ function load(url: string | Hash | Url, options: Record<string | number, unknown> | undefined, callback: (self: unknown, message_id: unknown, message: unknown, sender: unknown) => void): void;
44
66
  /**
45
67
  * The collection should be loaded by the collection proxy.
46
68
  * Setting the collection to "nil" will revert it back to the original collection.
@@ -0,0 +1,56 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Editor scripting documentation
5
+ */
6
+ namespace http {
7
+ /**
8
+ * Perform an HTTP request
9
+ *
10
+ * @param url - request URL
11
+ * @param opts - Additional request options, a table with the following keys:`method string`request method, defaults to `"GET"``headers table`request headers, a table with string keys and values`body string`request body`as string`response body converter, either `"string"` or `"json"`; mutually exclusive with `path``path string`destination file path, resolved against project root if relative; mutually exclusive with `as`
12
+ * @returns HTTP response, a table with the following keys:`status integer`response code`headers table`response headers, a table where each key is a lower-cased string, and each value is either a string or an array of strings if the header was repeated`body string, any, nil`response body, present only when `as` option was provided, either a string or a parsed json value`path string, nil`resolved absolute destination path, present only after a successful response was written when the `path` option was provided
13
+ */
14
+ function request(url: string, opts?: Record<string | number, unknown>): Record<string | number, unknown>;
15
+ namespace server {
16
+ /**
17
+ * Create HTTP response that will stream the content of a file defined by the path
18
+ *
19
+ * @param path - External file path, resolved against project root if relative
20
+ * @param status - HTTP status code, an integer, default 200
21
+ * @param headers - HTTP response headers, a table from lower-case header names to header values
22
+ * @returns HTTP response value, userdata
23
+ */
24
+ function external_file_response(path: string, status?: number, headers?: unknown): unknown;
25
+ /**
26
+ * Create HTTP response with a JSON value
27
+ *
28
+ * @param value - Any Lua value that may be represented as JSON
29
+ * @param status - HTTP status code, an integer, default 200
30
+ * @param headers - HTTP response headers, a table from lower-case header names to header values
31
+ * @returns HTTP response value, userdata
32
+ */
33
+ function json_response(value: unknown, status?: number, headers?: unknown): unknown;
34
+ /**
35
+ * Create HTTP response that will stream the content of a resource defined by the resource path
36
+ *
37
+ * @param resource_path - Resource path (starting with `/`)
38
+ * @param status - HTTP status code, an integer, default 200
39
+ * @param headers - HTTP response headers, a table from lower-case header names to header values
40
+ * @returns HTTP response value, userdata
41
+ */
42
+ function resource_response(resource_path: string, status?: number, headers?: unknown): unknown;
43
+ /**
44
+ * Create HTTP response
45
+ *
46
+ * @param status - HTTP status code, an integer, default 200
47
+ * @param headers - HTTP response headers, a table from lower-case header names to header values
48
+ * @param body - HTTP response body
49
+ * @returns HTTP response value, userdata
50
+ */
51
+ function response(status?: number, headers?: unknown, body?: string): unknown;
52
+ }
53
+ }
54
+ }
55
+
56
+ export {};
@@ -0,0 +1,48 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Editor scripting documentation
5
+ */
6
+ namespace image {
7
+ /**
8
+ * Load an image file for reading
9
+ *
10
+ * @param path - External file path, resolved against project root if relative
11
+ * @returns image userdata
12
+ */
13
+ function load_file(path: string): unknown;
14
+ /**
15
+ * Return the color of a pixel from a loaded image.
16
+ * Coordinates are 1-based, with `1, 1` at the top-left corner.
17
+ *
18
+ * @param image - image userdata returned by `image.load_file()`
19
+ * @param x - 1-based horizontal pixel coordinate
20
+ * @param y - 1-based vertical pixel coordinate
21
+ */
22
+ function pixel(image: unknown, x: number, y: number): LuaMultiReturn<[number, number, number, number]>;
23
+ /**
24
+ * Iterate over pixels in a loaded image.
25
+ * The iterator returns pixels row by row from top-left to bottom-right. Coordinates are 1-based.
26
+ *
27
+ * @param image - image userdata returned by `image.load_file()`
28
+ * @returns iterator function returning `x, y, r, g, b, a` for each pixel
29
+ * @example
30
+ * ```lua
31
+ * local img = image.load_file("assets/source.png")
32
+ * local width, height = image.size(img)
33
+ * for x, y, r, g, b, a in image.pixels(img) do
34
+ * print(x, y, r, g, b, a)
35
+ * end
36
+ * ```
37
+ */
38
+ function pixels(image: unknown): (...args: unknown[]) => unknown;
39
+ /**
40
+ * Return the width and height of a loaded image.
41
+ *
42
+ * @param image - image userdata returned by `image.load_file()`
43
+ */
44
+ function size(image: unknown): LuaMultiReturn<[number, number]>;
45
+ }
46
+ }
47
+
48
+ export {};
@@ -0,0 +1,10 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Editor scripting documentation
5
+ */
6
+ namespace json {
7
+ }
8
+ }
9
+
10
+ export {};
@@ -0,0 +1,42 @@
1
+ /** @noSelfInFile */
2
+ import type { Opaque } from "../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Editor scripting documentation
7
+ */
8
+ namespace localization {
9
+ /**
10
+ * Create a message pattern that renders a list with the "and" conjunction (for example: a, b, and c) once it is stringified
11
+ *
12
+ * @param items - ] array of values; each value may be `nil`, `boolean`, `number`, `string`, or another `message` instance
13
+ * @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
14
+ */
15
+ function and_list(items: unknown[]): Opaque<"message">;
16
+ /**
17
+ * Create a message pattern that concatenates values (similar to `table.concat`) and performs the actual concatenation when stringified
18
+ *
19
+ * @param items - ] array of values; each value may be `nil`, `boolean`, `number`, `string`, or another `message` instance
20
+ * @param separator - optional separator inserted between values; defaults to an empty string
21
+ * @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
22
+ */
23
+ function concat(items: unknown[], separator?: boolean | number | string | Opaque<"message">): Opaque<"message">;
24
+ /**
25
+ * Create a message pattern for a localization key defined in an `.editor_localization` file; the actual localization happens when the returned value is stringified
26
+ *
27
+ * @param key - localization key defined in an `.editor_localization` file
28
+ * @param vars - optional table with variables to be substituted in the localized string that uses ICU Message Format syntax; keys must be strings; values must be either `nil`, `boolean`, `number`, `string`, or another `message` instance
29
+ * @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
30
+ */
31
+ function message(key: string, vars?: Record<string | number, unknown>): Opaque<"message">;
32
+ /**
33
+ * Create a message pattern that renders a list with the "or" conjunction (for example: a, b, or c) once it is stringified
34
+ *
35
+ * @param items - ] array of values; each value may be `nil`, `boolean`, `number`, `string`, or another `message` instance
36
+ * @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
37
+ */
38
+ function or_list(items: unknown[]): Opaque<"message">;
39
+ }
40
+ }
41
+
42
+ export {};
@@ -0,0 +1,80 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Editor scripting documentation
5
+ */
6
+ namespace tilemap.tiles {
7
+ /**
8
+ * Remove all tiles
9
+ *
10
+ * @param tiles - unbounded 2d grid of tiles
11
+ * @returns unbounded 2d grid of tiles
12
+ */
13
+ export function clear(tiles: unknown): unknown;
14
+ /**
15
+ * Get full information from a tile at a particular coordinate
16
+ *
17
+ * @param tiles - unbounded 2d grid of tiles
18
+ * @param x - x coordinate of a tile
19
+ * @param y - y coordinate of a tile
20
+ * @returns full tile information table with the following keys:`index integer`1-indexed tile index of a tilemap's tilesource`h_flip boolean`horizontal flip`v_flip boolean`vertical flip`rotate_90 boolean`whether the tile is rotated 90 degrees clockwise
21
+ */
22
+ export function get_info(tiles: unknown, x: number, y: number): Record<string | number, unknown>;
23
+ /**
24
+ * Get a tile index at a particular coordinate
25
+ *
26
+ * @param tiles - unbounded 2d grid of tiles
27
+ * @param x - x coordinate of a tile
28
+ * @param y - y coordinate of a tile
29
+ * @returns 1-indexed tile index of a tilemap's tilesource
30
+ */
31
+ export function get_tile(tiles: unknown, x: number, y: number): number;
32
+ /**
33
+ * Create an iterator over all tiles in a tiles data structure
34
+ * When iterating using for loop, each iteration returns x, y and tile index of a tile in a tile map
35
+ *
36
+ * @param tiles - unbounded 2d grid of tiles
37
+ * @returns iterator
38
+ * @example
39
+ * ```lua
40
+ * Iterate over all tiles in a tile map:
41
+ * local layers = editor.get("/level.tilemap", "layers")
42
+ * for i = 1, #layers do
43
+ * local tiles = editor.get(layers[i], "tiles")
44
+ * for x, y, i in tilemap.tiles.iterator(tiles) do
45
+ * print(x, y, i)
46
+ * end
47
+ * end
48
+ * ```
49
+ */
50
+ export function iterator(tiles: unknown): (...args: unknown[]) => unknown;
51
+ /**
52
+ * Create a new unbounded 2d grid data structure for storing tilemap layer tiles
53
+ *
54
+ * @returns unbounded 2d grid of tiles
55
+ */
56
+ function _new(): unknown;
57
+ /**
58
+ * Remove a tile at a particular coordinate
59
+ *
60
+ * @param tiles - unbounded 2d grid of tiles
61
+ * @param x - x coordinate of a tile
62
+ * @param y - y coordinate of a tile
63
+ * @returns unbounded 2d grid of tiles
64
+ */
65
+ export function remove(tiles: unknown, x: number, y: number): unknown;
66
+ /**
67
+ * Set a tile at a particular coordinate
68
+ *
69
+ * @param tiles - unbounded 2d grid of tiles
70
+ * @param x - x coordinate of a tile
71
+ * @param y - y coordinate of a tile
72
+ * @param tile_or_info - Either 1-indexed tile index of a tilemap's tilesource or full tile information table with the following keys:`index integer`1-indexed tile index of a tilemap's tilesource`h_flip boolean`horizontal flip`v_flip boolean`vertical flip`rotate_90 boolean`whether the tile is rotated 90 degrees clockwise
73
+ * @returns unbounded 2d grid of tiles
74
+ */
75
+ export function set(tiles: unknown, x: number, y: number, tile_or_info: number | Record<string | number, unknown>): unknown;
76
+ export { _new as new };
77
+ }
78
+ }
79
+
80
+ export {};
@@ -0,0 +1,10 @@
1
+ /** @noSelfInFile */
2
+ declare global {
3
+ /**
4
+ * Editor scripting documentation
5
+ */
6
+ namespace zip {
7
+ }
8
+ }
9
+
10
+ export {};