@defold-typescript/library-types 0.23.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +2 -3
- package/api-doc/boom.json +3872 -0
- package/api-doc/bridge.json +10 -5
- package/api-doc/bzAnim.json +338 -0
- package/api-doc/checkpoint.json +127 -0
- package/api-doc/decore.json +1 -1
- package/api-doc/defcon.json +150 -0
- package/api-doc/{defmath.defmath.json → defmath.json} +6 -46
- package/api-doc/defsave.json +518 -0
- package/api-doc/deftest.json +745 -0
- package/api-doc/{dicebag.dicebag.json → dicebag.json} +19 -1
- package/api-doc/druid.json +90 -92
- package/api-doc/event.json +16 -16
- package/api-doc/gooey.json +2050 -0
- package/api-doc/in.accelerometer.json +75 -1
- package/api-doc/in.button.json +17 -10
- package/api-doc/in.cursor.json +26 -0
- package/api-doc/in.gesture.json +401 -6
- package/api-doc/in.keyboard.json +2 -0
- package/api-doc/in.mapper.json +12 -8
- package/api-doc/in.onscreen.json +61 -5
- package/api-doc/in.state.json +61 -13
- package/api-doc/in.textbox.json +23 -12
- package/api-doc/in.triggers.json +336 -0
- package/api-doc/lang.json +5 -5
- package/api-doc/log.json +1 -1
- package/api-doc/metrics.fps.json +61 -2
- package/api-doc/metrics.mem.json +61 -2
- package/api-doc/monarch.monarch.json +249 -7
- package/api-doc/monarch.transitions.easings.json +19 -26
- package/api-doc/monarch.transitions.gui.json +782 -79
- package/api-doc/nakama.engine.defold.json +31 -18
- package/api-doc/{nakama.nakama.json → nakama.json} +4752 -2554
- package/api-doc/nakama.session.json +315 -0
- package/api-doc/nakama.socket.json +3356 -0
- package/api-doc/nakama.util.log.json +32 -4
- package/api-doc/narrator.json +1 -1
- package/api-doc/openapi/nakama.nakama.json +7680 -0
- package/api-doc/orthographic.camera.json +96 -98
- package/api-doc/orthographic.json +602 -0
- package/api-doc/panthera.json +1183 -0
- package/api-doc/{persist.persist.json → persist.json} +26 -1
- package/api-doc/{platypus.platypus.json → platypus.json} +68 -14
- package/api-doc/{rendy.rendy.json → rendy.json} +46 -99
- package/api-doc/richtext.color.json +77 -0
- package/api-doc/richtext.richtext.json +375 -5
- package/api-doc/saver.saver.json +2 -1
- package/api-doc/saver.storage.json +2 -1
- package/api-doc/shutter.json +551 -0
- package/api-doc/{yagames.yagames.json → yagames.json} +784 -189
- package/api-doc/{zzfx.api.json → zzfx.json} +9 -9
- package/authored-targets.json +433 -0
- package/generated/{boom.boom.d.ts → boom.d.ts} +14 -0
- package/generated/bridge.d.ts +5 -5
- package/generated/{bzAnim.bzLibrary.d.ts → bzAnim.d.ts} +6 -0
- package/generated/checkpoint.d.ts +62 -0
- package/generated/decore.d.ts +1 -1
- package/generated/defcon.d.ts +43 -0
- package/generated/{defmath.defmath.d.ts → defmath.d.ts} +3 -2
- package/generated/defsave.d.ts +144 -0
- package/generated/{dicebag.dicebag.d.ts → dicebag.d.ts} +25 -0
- package/generated/druid.d.ts +81 -79
- package/generated/event.d.ts +15 -15
- package/generated/{gooey.gooey.d.ts → gooey.d.ts} +61 -6
- package/generated/in.onscreen.d.ts +5 -0
- package/generated/in.textbox.d.ts +4 -0
- package/generated/lang.d.ts +5 -5
- package/generated/log.d.ts +1 -1
- package/generated/metrics.fps.d.ts +19 -1
- package/generated/metrics.mem.d.ts +19 -1
- package/generated/monarch.monarch.d.ts +44 -1
- package/generated/monarch.transitions.easings.d.ts +0 -1
- package/generated/monarch.transitions.gui.d.ts +96 -12
- package/generated/nakama.d.ts +1158 -0
- package/generated/nakama.engine.defold.d.ts +3 -1
- package/generated/nakama.session.d.ts +95 -0
- package/generated/nakama.socket.d.ts +706 -0
- package/generated/nakama.util.log.d.ts +6 -0
- package/generated/narrator.d.ts +1 -1
- package/generated/openapi/nakama.nakama.d.ts +884 -0
- package/generated/orthographic.camera.d.ts +24 -38
- package/generated/orthographic.d.ts +155 -0
- package/generated/panthera.d.ts +170 -0
- package/generated/{persist.persist.d.ts → persist.d.ts} +3 -0
- package/generated/{platypus.platypus.d.ts → platypus.d.ts} +9 -0
- package/generated/proto.d.ts +4 -4
- package/generated/{rendy.rendy.d.ts → rendy.d.ts} +33 -80
- package/generated/richtext.color.d.ts +15 -0
- package/generated/saver.saver.d.ts +2 -0
- package/generated/saver.storage.d.ts +2 -0
- package/generated/shutter.d.ts +183 -0
- package/generated/{yagames.yagames.d.ts → yagames.d.ts} +151 -29
- package/generated/{zzfx.api.d.ts → zzfx.d.ts} +7 -0
- package/library-classification.json +0 -156
- package/library-targets.json +1 -218
- package/luals-targets.json +56 -3
- package/openapi-targets.json +17 -0
- package/package.json +7 -57
- package/scripts/__snapshots__/parse-luals.test.ts.snap +164 -10
- package/scripts/apply-luals-overrides.ts +39 -7
- package/scripts/authored-parity.ts +718 -0
- package/scripts/emit-library-dts.ts +94 -17
- package/scripts/extract-api-doc.ts +214 -42
- package/scripts/fidelity-floor.ts +178 -0
- package/scripts/import-upstream-docs.ts +125 -0
- package/scripts/lower-api-doc.ts +21 -3
- package/scripts/luals-fidelity.ts +16 -11
- package/scripts/map-luals-types.ts +52 -21
- package/scripts/parse-lua-surface.ts +187 -0
- package/scripts/parse-luals.ts +50 -4
- package/scripts/parse-markdown-api.ts +247 -0
- package/scripts/parse-openapi-api.ts +313 -0
- package/scripts/sync-authored-types.ts +249 -0
- package/scripts/sync-library-types.ts +99 -3
- package/scripts/sync-luals-types.ts +14 -1
- package/scripts/sync-markdown-types.ts +761 -0
- package/scripts/sync-openapi-types.ts +308 -0
- package/scripts/sync-script-api-types.ts +16 -17
- package/api-doc/boom.boom.json +0 -26
- package/api-doc/bzAnim.bzLibrary.json +0 -156
- package/api-doc/defcon.console.json +0 -109
- package/api-doc/defsave.defsave.json +0 -175
- package/api-doc/deftest.deftest.json +0 -71
- package/api-doc/gooey.gooey.json +0 -963
- package/api-doc/starly.starly.json +0 -488
- package/generated/defcon.console.d.ts +0 -24
- package/generated/defsave.defsave.d.ts +0 -31
- package/generated/nakama.nakama.d.ts +0 -594
- package/generated/starly.starly.d.ts +0 -148
- /package/generated/{deftest.deftest.d.ts → deftest.d.ts} +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/Klaleus/defold-shutter|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
* @example `import * as shutter from 'shutter.shutter'`
|
|
7
|
+
*/
|
|
8
|
+
declare module 'shutter.shutter' {
|
|
9
|
+
/**
|
|
10
|
+
* One camera's state, created by the shutter.script game object in its `init` and
|
|
11
|
+
* removed again in its `final`. The first eight properties mirror the script's
|
|
12
|
+
* `go.property()` declarations; the rest are recalculated every frame and should be
|
|
13
|
+
* read rather than written.
|
|
14
|
+
*/
|
|
15
|
+
interface ShutterCamera {
|
|
16
|
+
/** One of `center_behavior`, `expand_behavior` or `stretch_behavior`. */
|
|
17
|
+
behavior: Hash;
|
|
18
|
+
viewport_x: number;
|
|
19
|
+
viewport_y: number;
|
|
20
|
+
viewport_width: number;
|
|
21
|
+
viewport_height: number;
|
|
22
|
+
near: number;
|
|
23
|
+
far: number;
|
|
24
|
+
zoom: number;
|
|
25
|
+
/** Viewport left edge after the window scale and any letterboxing margin. */
|
|
26
|
+
viewport_x_adjusted: number;
|
|
27
|
+
/** Viewport bottom edge after the window scale and any pillarboxing margin. */
|
|
28
|
+
viewport_y_adjusted: number;
|
|
29
|
+
viewport_width_adjusted: number;
|
|
30
|
+
viewport_height_adjusted: number;
|
|
31
|
+
view: Matrix4;
|
|
32
|
+
projection: Matrix4;
|
|
33
|
+
/** Where the shaken object sat before the shake began, and `nil` while no shake
|
|
34
|
+
* is running. `cancel_shake` restores the object to it. */
|
|
35
|
+
shake_origin?: Vector3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Every live camera, keyed by the id of the game object it lives on. The
|
|
40
|
+
* shutter.script file writes to it; read from it rather than manipulating it
|
|
41
|
+
* directly.
|
|
42
|
+
*/
|
|
43
|
+
const camera_table: LuaMap<Hash, ShutterCamera>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Keeps the projection fixed and shrinks the viewport to preserve the display
|
|
47
|
+
* ratio, letterboxing or pillarboxing the remainder.
|
|
48
|
+
*/
|
|
49
|
+
const center_behavior: Hash;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Keeps the viewport filling the window and widens the projection as the window
|
|
53
|
+
* grows, showing more of the game world rather than scaling it.
|
|
54
|
+
*/
|
|
55
|
+
const expand_behavior: Hash;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Keeps both the viewport and the projection filling the window, so the game world
|
|
59
|
+
* distorts with the window ratio.
|
|
60
|
+
*/
|
|
61
|
+
const stretch_behavior: Hash;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Installs a camera's viewport, view matrix and projection matrix into the render
|
|
65
|
+
* context. Call it from a render script before drawing the world.
|
|
66
|
+
* @param object The game object the camera lives on.
|
|
67
|
+
* @returns The camera's frustum, for passing to `render.draw`.
|
|
68
|
+
*/
|
|
69
|
+
function activate(object: Hash): Matrix4;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Restores the viewport and matrices Defold's GUI system expects, sized to the
|
|
73
|
+
* current window. Call it before drawing GUI.
|
|
74
|
+
* @returns The frustum matching the restored matrices.
|
|
75
|
+
*/
|
|
76
|
+
function deactivate(): Matrix4;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Recalculates a camera's viewport, view matrix and projection matrix immediately.
|
|
80
|
+
* The shutter.script game object already does this once per frame; call it directly
|
|
81
|
+
* only after changing a camera property mid-frame.
|
|
82
|
+
* @param object The game object the camera lives on.
|
|
83
|
+
*/
|
|
84
|
+
function force_update(object: Hash): void;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Calculates the camera's viewport in window coordinates, scaled from the
|
|
88
|
+
* game.project display size and, under center behavior, shrunk and centered to
|
|
89
|
+
* preserve the display ratio.
|
|
90
|
+
* @param object The game object the camera lives on.
|
|
91
|
+
* @returns The viewport's x, y, width and height.
|
|
92
|
+
*/
|
|
93
|
+
function get_viewport(object: Hash): LuaMultiReturn<[number, number, number, number]>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Calculates the camera's view matrix from the inverse of its game object's world
|
|
97
|
+
* transform.
|
|
98
|
+
* @param object The game object the camera lives on.
|
|
99
|
+
*/
|
|
100
|
+
function get_view(object: Hash): Matrix4;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Calculates the camera's orthographic projection matrix, sized from the display
|
|
104
|
+
* under center and stretch behavior and from the window under expand behavior.
|
|
105
|
+
* @param object The game object the camera lives on.
|
|
106
|
+
*/
|
|
107
|
+
function get_projection(object: Hash): Matrix4;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns the camera's frustum, the product of its last calculated projection and
|
|
111
|
+
* view matrices.
|
|
112
|
+
* @param object The game object the camera lives on.
|
|
113
|
+
*/
|
|
114
|
+
function get_frustum(object: Hash): Matrix4;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Converts a screen distance into the world distance an object must travel to cover
|
|
118
|
+
* it, accounting for the camera's zoom and, under center and stretch behavior, for
|
|
119
|
+
* the viewport no longer mapping to physical screen coordinates.
|
|
120
|
+
* @param object The game object the camera lives on.
|
|
121
|
+
* @param distance The screen distance to convert.
|
|
122
|
+
* @param absolute Skip rotating the result by the camera's rotation.
|
|
123
|
+
*/
|
|
124
|
+
function get_distance(object: Hash, distance: Vector3, absolute?: boolean): Vector3;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Starts a camera shake animation, cancelling and restarting any shake already
|
|
128
|
+
* running on this camera.
|
|
129
|
+
* @param object The game object the camera lives on.
|
|
130
|
+
* @param parent Shake the camera object's parent instead of the camera itself.
|
|
131
|
+
* @param count How many times to displace the camera before stopping.
|
|
132
|
+
* @param duration Seconds each displacement takes.
|
|
133
|
+
* @param radius How far each displacement moves the camera.
|
|
134
|
+
* @param duration_scalar Multiplies the duration after each displacement. Defaults to 1.
|
|
135
|
+
* @param radius_scalar Multiplies the radius after each displacement. Defaults to 1.
|
|
136
|
+
*/
|
|
137
|
+
function shake(
|
|
138
|
+
object: Hash,
|
|
139
|
+
parent: boolean,
|
|
140
|
+
count: number,
|
|
141
|
+
duration: number,
|
|
142
|
+
radius: number,
|
|
143
|
+
duration_scalar?: number,
|
|
144
|
+
radius_scalar?: number,
|
|
145
|
+
): void;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Stops a running camera shake and returns the shaken object to where it started.
|
|
149
|
+
* Does nothing if no shake is running.
|
|
150
|
+
* @param object The game object the camera lives on.
|
|
151
|
+
* @param parent Whether the shake was started against the camera object's parent.
|
|
152
|
+
*/
|
|
153
|
+
function cancel_shake(object: Hash, parent?: boolean): void;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Converts a screen position to its world position through the inverse of the
|
|
157
|
+
* camera's frustum.
|
|
158
|
+
* @param object The game object the camera lives on.
|
|
159
|
+
* @param x The screen position's x coordinate.
|
|
160
|
+
* @param y The screen position's y coordinate.
|
|
161
|
+
* @param visible Return `nil` instead when the position falls outside the camera's view.
|
|
162
|
+
* @returns The world position, or `nil` if `visible` filtered it out.
|
|
163
|
+
*/
|
|
164
|
+
function screen_to_world(
|
|
165
|
+
object: Hash,
|
|
166
|
+
x: number,
|
|
167
|
+
y: number,
|
|
168
|
+
visible?: boolean,
|
|
169
|
+
): Vector3 | undefined;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Converts a world position to its screen position through the camera's frustum.
|
|
173
|
+
* @param object The game object the camera lives on.
|
|
174
|
+
* @param position The world position to convert.
|
|
175
|
+
* @param visible Return `nil` instead when the position falls outside the camera's view.
|
|
176
|
+
* @returns The screen position, or `nil` if `visible` filtered it out.
|
|
177
|
+
*/
|
|
178
|
+
function world_to_screen(
|
|
179
|
+
object: Hash,
|
|
180
|
+
position: Vector3,
|
|
181
|
+
visible?: boolean,
|
|
182
|
+
): Vector3 | undefined;
|
|
183
|
+
}
|
|
@@ -29,7 +29,21 @@ declare module 'yagames.yagames' {
|
|
|
29
29
|
}
|
|
30
30
|
export function adv_show_rewarded_video(callbacks: RewardedCallbacks): void;
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
export interface StickyBannerStatus {
|
|
33
|
+
stickyAdvIsShowing: boolean;
|
|
34
|
+
reason?: "ADV_IS_NOT_CONNECTED" | "UNKNOWN";
|
|
35
|
+
}
|
|
36
|
+
export type StickyBannerCallback = (ctx: Context, err?: string, result?: StickyBannerStatus) => void;
|
|
37
|
+
export function adv_get_banner_adv_status(callback: StickyBannerCallback): void;
|
|
38
|
+
|
|
39
|
+
export function adv_show_banner_adv(callback?: StickyBannerCallback): void;
|
|
40
|
+
|
|
41
|
+
export type StickyBannerHideCallback = (ctx: Context, err?: string, result?: {
|
|
42
|
+
stickyAdvIsShowing: boolean;
|
|
43
|
+
}) => void;
|
|
44
|
+
export function adv_hide_banner_adv(callback?: StickyBannerHideCallback): void;
|
|
45
|
+
|
|
46
|
+
//* Authentication + Player
|
|
33
47
|
|
|
34
48
|
export function auth_open_auth_dialog(callback: ApiCallback): void;
|
|
35
49
|
|
|
@@ -50,7 +64,7 @@ declare module 'yagames.yagames' {
|
|
|
50
64
|
export function player_get_stats(keys: Array<string> | undefined, callback: ApiCallback): void;
|
|
51
65
|
|
|
52
66
|
/**
|
|
53
|
-
* @deprecated Use `
|
|
67
|
+
* @deprecated Use `player_get_unique_id` instead.
|
|
54
68
|
*/
|
|
55
69
|
export function player_get_id(): string;
|
|
56
70
|
|
|
@@ -66,6 +80,24 @@ declare module 'yagames.yagames' {
|
|
|
66
80
|
|
|
67
81
|
export function player_get_photo(size: 'small' | 'medium' | 'large'): string;
|
|
68
82
|
|
|
83
|
+
export function player_get_paying_status(): 'paying' | 'partially_paying' | 'not_paying' | 'unknown';
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Upstream types the result as "table or nil" and publishes no field list for the
|
|
87
|
+
* SDK's `_personalInfo` object, so the shape stays open rather than invented.
|
|
88
|
+
*/
|
|
89
|
+
export type PlayerPersonalInfo = Record<string, unknown>;
|
|
90
|
+
export function player_get_personal_info(): PlayerPersonalInfo | undefined;
|
|
91
|
+
|
|
92
|
+
export function player_get_signature(): string | undefined;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use `player_is_authorized` instead.
|
|
96
|
+
*/
|
|
97
|
+
export function player_get_mode(): 'lite' | '';
|
|
98
|
+
|
|
99
|
+
export function player_is_authorized(): boolean;
|
|
100
|
+
|
|
69
101
|
//* In-Game Purchases
|
|
70
102
|
|
|
71
103
|
export function payments_init(options: { signed?: boolean } | undefined, callback: ApiCallback): void;
|
|
@@ -101,12 +133,19 @@ declare module 'yagames.yagames' {
|
|
|
101
133
|
priceValue: string;
|
|
102
134
|
priceCurrencyCode: string;
|
|
103
135
|
}>) => void;
|
|
104
|
-
export
|
|
136
|
+
export interface PaymentsCatalogOptions {
|
|
137
|
+
getPriceCurrencyImage?: 'medium' | 'small' | 'svg';
|
|
138
|
+
}
|
|
139
|
+
export function payments_get_catalog(options: PaymentsCatalogOptions | undefined, callback: PaymentsCatalogCallback): void;
|
|
105
140
|
|
|
106
141
|
export function payments_consume_purchase(purchase_token: string, callback: ApiCallback): void;
|
|
107
142
|
|
|
108
143
|
//* Leaderboards
|
|
109
144
|
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated The leaderboards subsystem no longer needs initializing; the other
|
|
147
|
+
* `leaderboards_*` functions work without it.
|
|
148
|
+
*/
|
|
110
149
|
export function leaderboards_init(callback: ApiCallback): void;
|
|
111
150
|
|
|
112
151
|
export type LeaderboardsDescriptionCallback = (ctx: Context, err?: string, data?: {
|
|
@@ -177,6 +216,33 @@ declare module 'yagames.yagames' {
|
|
|
177
216
|
|
|
178
217
|
export function leaderboards_set_score(leaderboard_name: string, score: number, extra_data: string, callback: ApiCallback): void;
|
|
179
218
|
|
|
219
|
+
//* Features
|
|
220
|
+
|
|
221
|
+
export function features_loadingapi_ready(): void;
|
|
222
|
+
|
|
223
|
+
export function features_gameplayapi_start(): void;
|
|
224
|
+
|
|
225
|
+
export function features_gameplayapi_stop(): void;
|
|
226
|
+
|
|
227
|
+
export interface GamesApiGame {
|
|
228
|
+
appID: string;
|
|
229
|
+
title: string;
|
|
230
|
+
url: string;
|
|
231
|
+
coverURL: string;
|
|
232
|
+
iconURL: string;
|
|
233
|
+
}
|
|
234
|
+
export type GamesApiAllGamesCallback = (ctx: Context, err?: string, result?: {
|
|
235
|
+
games: Array<GamesApiGame>;
|
|
236
|
+
developerURL: string;
|
|
237
|
+
}) => void;
|
|
238
|
+
export function features_gamesapi_get_all_games(callback: GamesApiAllGamesCallback): void;
|
|
239
|
+
|
|
240
|
+
export type GamesApiGameByIdCallback = (ctx: Context, err?: string, result?: {
|
|
241
|
+
isAvailable: boolean;
|
|
242
|
+
game?: GamesApiGame;
|
|
243
|
+
}) => void;
|
|
244
|
+
export function features_gamesapi_get_game_by_id(app_id: number, callback: GamesApiGameByIdCallback): void;
|
|
245
|
+
|
|
180
246
|
//* Feedback
|
|
181
247
|
|
|
182
248
|
export type FeedbackCanReviewCallback = (ctx: Context, err?: string, data?: {
|
|
@@ -204,6 +270,8 @@ declare module 'yagames.yagames' {
|
|
|
204
270
|
|
|
205
271
|
export function device_info_is_tablet(): boolean;
|
|
206
272
|
|
|
273
|
+
export function device_info_is_tv(): boolean;
|
|
274
|
+
|
|
207
275
|
//* Environment
|
|
208
276
|
|
|
209
277
|
export interface EnvironmentResults {
|
|
@@ -229,6 +297,18 @@ declare module 'yagames.yagames' {
|
|
|
229
297
|
|
|
230
298
|
export function screen_fullscreen_exit(callback?: ApiCallback): void;
|
|
231
299
|
|
|
300
|
+
//* Shortcuts
|
|
301
|
+
|
|
302
|
+
export type ShortcutCanShowCallback = (ctx: Context, err?: string, result?: {
|
|
303
|
+
canShow: boolean;
|
|
304
|
+
}) => void;
|
|
305
|
+
export function shortcut_can_show_prompt(callback: ShortcutCanShowCallback): void;
|
|
306
|
+
|
|
307
|
+
export type ShortcutShowPromptCallback = (ctx: Context, err?: string, result?: {
|
|
308
|
+
outcome: string;
|
|
309
|
+
}) => void;
|
|
310
|
+
export function shortcut_show_prompt(callback?: ShortcutShowPromptCallback): void;
|
|
311
|
+
|
|
232
312
|
//* Safe Storage
|
|
233
313
|
|
|
234
314
|
export function storage_init(callback: ApiCallback): void;
|
|
@@ -245,35 +325,77 @@ declare module 'yagames.yagames' {
|
|
|
245
325
|
|
|
246
326
|
export function storage_length(): number;
|
|
247
327
|
|
|
248
|
-
//*
|
|
328
|
+
//* Remote Config
|
|
329
|
+
|
|
330
|
+
export interface FlagsClientFeature {
|
|
331
|
+
name: string;
|
|
332
|
+
value: string;
|
|
333
|
+
}
|
|
334
|
+
export interface FlagsOptions {
|
|
335
|
+
defaultFlags?: Record<string, string>;
|
|
336
|
+
clientFeatures?: Array<FlagsClientFeature>;
|
|
337
|
+
}
|
|
338
|
+
export type FlagsCallback = (ctx: Context, err?: string, flags?: Record<string, string>) => void;
|
|
339
|
+
export function flags_get(options: FlagsOptions | undefined, callback: FlagsCallback): void;
|
|
340
|
+
|
|
341
|
+
//* Events
|
|
249
342
|
|
|
250
|
-
export function
|
|
343
|
+
export function event_on(event_name: string, listener: ApiCallback): void;
|
|
251
344
|
|
|
252
|
-
export
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
345
|
+
export function event_off(event_name: string, listener: ApiCallback): void;
|
|
346
|
+
|
|
347
|
+
export function event_dispatch(event_name: string): void;
|
|
348
|
+
|
|
349
|
+
//* Multiplayer Sessions
|
|
350
|
+
|
|
351
|
+
export interface MultiplayerSessionsMetaRange {
|
|
352
|
+
min: number;
|
|
353
|
+
max: number;
|
|
257
354
|
}
|
|
258
|
-
export
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
export
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
355
|
+
export interface MultiplayerSessionsMeta {
|
|
356
|
+
meta1?: MultiplayerSessionsMetaRange;
|
|
357
|
+
meta2?: MultiplayerSessionsMetaRange;
|
|
358
|
+
meta3?: MultiplayerSessionsMetaRange;
|
|
359
|
+
}
|
|
360
|
+
export interface MultiplayerSessionsInitOptions {
|
|
361
|
+
count: number;
|
|
362
|
+
isEventBased: boolean;
|
|
363
|
+
maxOpponentTurnTime?: number;
|
|
364
|
+
meta: MultiplayerSessionsMeta;
|
|
365
|
+
}
|
|
366
|
+
export interface MultiplayerSessionEvent {
|
|
367
|
+
id: string;
|
|
368
|
+
payload: Record<string, unknown>;
|
|
369
|
+
time: number;
|
|
370
|
+
}
|
|
371
|
+
export interface MultiplayerSession {
|
|
372
|
+
id: string;
|
|
373
|
+
meta1?: number;
|
|
374
|
+
meta2?: number;
|
|
375
|
+
meta3?: number;
|
|
376
|
+
player: {
|
|
377
|
+
avatar: string;
|
|
378
|
+
name: string;
|
|
379
|
+
}
|
|
380
|
+
timeline: Array<MultiplayerSessionEvent>;
|
|
381
|
+
}
|
|
382
|
+
export type MultiplayerSessionsInitCallback = (ctx: Context, err?: string, result?: Array<MultiplayerSession>) => void;
|
|
383
|
+
export function multiplayer_sessions_init(options: MultiplayerSessionsInitOptions, callback: MultiplayerSessionsInitCallback): void;
|
|
268
384
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
export
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
385
|
+
export function multiplayer_sessions_commit(data: Record<string, unknown>): void;
|
|
386
|
+
|
|
387
|
+
export interface MultiplayerSessionsPushMeta {
|
|
388
|
+
meta1?: number;
|
|
389
|
+
meta2?: number;
|
|
390
|
+
meta3?: number;
|
|
391
|
+
}
|
|
392
|
+
export function multiplayer_sessions_push(data: MultiplayerSessionsPushMeta): void;
|
|
393
|
+
|
|
394
|
+
//* Miscellaneous
|
|
395
|
+
|
|
396
|
+
export type AvailableMethodCallback = (ctx: Context, err?: string, result?: boolean) => void;
|
|
397
|
+
export function is_available_method(name: string, callback: AvailableMethodCallback): void;
|
|
398
|
+
|
|
399
|
+
export function server_time(): number;
|
|
278
400
|
|
|
279
401
|
}
|
|
@@ -10,11 +10,18 @@ type ZzFXSample = LuaUserdata & {
|
|
|
10
10
|
* @noResolution
|
|
11
11
|
*/
|
|
12
12
|
declare module 'zzfx.api' {
|
|
13
|
+
/**
|
|
14
|
+
* Build a sample from a ZzFX parameter list and play it in one call.
|
|
15
|
+
* @see {@link https://killedbyapixel.github.io/ZzFX/|the ZzFX sound designer}
|
|
16
|
+
*/
|
|
13
17
|
export function play(...args: number[]): void;
|
|
14
18
|
|
|
19
|
+
/** Set the sample rate used to render subsequent samples. Defaults to 44100. */
|
|
15
20
|
export function samplerate(rate: number): void;
|
|
16
21
|
|
|
22
|
+
/** Play a sample previously returned by {@link build_sample}. */
|
|
17
23
|
export function play_sample(sample: ZzFXSample): void;
|
|
18
24
|
|
|
25
|
+
/** Build a reusable sample from a ZzFX parameter list, without playing it. */
|
|
19
26
|
export function build_sample(...args: number[]): ZzFXSample;
|
|
20
27
|
}
|
|
@@ -27,20 +27,6 @@
|
|
|
27
27
|
"lua_script_instance"
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
|
-
{
|
|
31
|
-
"dir": "boom",
|
|
32
|
-
"classification": "already-vendored",
|
|
33
|
-
"modules": [
|
|
34
|
-
"boom.boom"
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"dir": "bzAnim",
|
|
39
|
-
"classification": "already-vendored",
|
|
40
|
-
"modules": [
|
|
41
|
-
"bzAnim.bzAnim"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
30
|
{
|
|
45
31
|
"dir": "def-setv",
|
|
46
32
|
"classification": "native",
|
|
@@ -62,20 +48,6 @@
|
|
|
62
48
|
"taptic_engine"
|
|
63
49
|
]
|
|
64
50
|
},
|
|
65
|
-
{
|
|
66
|
-
"dir": "defcon",
|
|
67
|
-
"classification": "already-vendored",
|
|
68
|
-
"modules": [
|
|
69
|
-
"defcon.console"
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"dir": "defmath",
|
|
74
|
-
"classification": "already-vendored",
|
|
75
|
-
"modules": [
|
|
76
|
-
"defmath.defmath"
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
51
|
{
|
|
80
52
|
"dir": "defold-apkx",
|
|
81
53
|
"classification": "native",
|
|
@@ -118,22 +90,6 @@
|
|
|
118
90
|
"imagepicker"
|
|
119
91
|
]
|
|
120
92
|
},
|
|
121
|
-
{
|
|
122
|
-
"dir": "defold-input",
|
|
123
|
-
"classification": "already-vendored",
|
|
124
|
-
"modules": [
|
|
125
|
-
"in.accelerometer",
|
|
126
|
-
"in.button",
|
|
127
|
-
"in.cursor",
|
|
128
|
-
"in.gesture",
|
|
129
|
-
"in.keyboard",
|
|
130
|
-
"in.mapper",
|
|
131
|
-
"in.onscreen",
|
|
132
|
-
"in.state",
|
|
133
|
-
"in.textbox",
|
|
134
|
-
"in.triggers"
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
93
|
{
|
|
138
94
|
"dir": "defold-lfs",
|
|
139
95
|
"classification": "native",
|
|
@@ -148,21 +104,6 @@
|
|
|
148
104
|
"lldebugger.debug"
|
|
149
105
|
]
|
|
150
106
|
},
|
|
151
|
-
{
|
|
152
|
-
"dir": "defold-metrics",
|
|
153
|
-
"classification": "already-vendored",
|
|
154
|
-
"modules": [
|
|
155
|
-
"metrics.fps",
|
|
156
|
-
"metrics.mem"
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"dir": "defold-orthographic",
|
|
161
|
-
"classification": "already-vendored",
|
|
162
|
-
"modules": [
|
|
163
|
-
"orthographic.camera"
|
|
164
|
-
]
|
|
165
|
-
},
|
|
166
107
|
{
|
|
167
108
|
"dir": "defold-playable-ads",
|
|
168
109
|
"classification": "native",
|
|
@@ -191,15 +132,6 @@
|
|
|
191
132
|
"rnd"
|
|
192
133
|
]
|
|
193
134
|
},
|
|
194
|
-
{
|
|
195
|
-
"dir": "defold-richtext",
|
|
196
|
-
"classification": "already-vendored",
|
|
197
|
-
"modules": [
|
|
198
|
-
"richtext.color",
|
|
199
|
-
"richtext.richtext",
|
|
200
|
-
"richtext.tags"
|
|
201
|
-
]
|
|
202
|
-
},
|
|
203
135
|
{
|
|
204
136
|
"dir": "defold-scene3d",
|
|
205
137
|
"classification": "native",
|
|
@@ -277,13 +209,6 @@
|
|
|
277
209
|
"xmath"
|
|
278
210
|
]
|
|
279
211
|
},
|
|
280
|
-
{
|
|
281
|
-
"dir": "defold-yagames",
|
|
282
|
-
"classification": "already-vendored",
|
|
283
|
-
"modules": [
|
|
284
|
-
"yagames.yagames"
|
|
285
|
-
]
|
|
286
|
-
},
|
|
287
212
|
{
|
|
288
213
|
"dir": "defold-yametrica",
|
|
289
214
|
"classification": "native",
|
|
@@ -305,13 +230,6 @@
|
|
|
305
230
|
"zstd"
|
|
306
231
|
]
|
|
307
232
|
},
|
|
308
|
-
{
|
|
309
|
-
"dir": "defold-zzfx",
|
|
310
|
-
"classification": "already-vendored",
|
|
311
|
-
"modules": [
|
|
312
|
-
"zzfx.api"
|
|
313
|
-
]
|
|
314
|
-
},
|
|
315
233
|
{
|
|
316
234
|
"dir": "defos",
|
|
317
235
|
"classification": "native",
|
|
@@ -319,27 +237,6 @@
|
|
|
319
237
|
"defos"
|
|
320
238
|
]
|
|
321
239
|
},
|
|
322
|
-
{
|
|
323
|
-
"dir": "defsave",
|
|
324
|
-
"classification": "already-vendored",
|
|
325
|
-
"modules": [
|
|
326
|
-
"defsave.defsave"
|
|
327
|
-
]
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"dir": "deftest",
|
|
331
|
-
"classification": "already-vendored",
|
|
332
|
-
"modules": [
|
|
333
|
-
"deftest.deftest"
|
|
334
|
-
]
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
"dir": "dicebag",
|
|
338
|
-
"classification": "already-vendored",
|
|
339
|
-
"modules": [
|
|
340
|
-
"dicebag.dicebag"
|
|
341
|
-
]
|
|
342
|
-
},
|
|
343
240
|
{
|
|
344
241
|
"dir": "drawpixels",
|
|
345
242
|
"classification": "native",
|
|
@@ -591,65 +488,12 @@
|
|
|
591
488
|
"classification": "native",
|
|
592
489
|
"modules": []
|
|
593
490
|
},
|
|
594
|
-
{
|
|
595
|
-
"dir": "gooey",
|
|
596
|
-
"classification": "already-vendored",
|
|
597
|
-
"modules": [
|
|
598
|
-
"gooey.gooey"
|
|
599
|
-
]
|
|
600
|
-
},
|
|
601
491
|
{
|
|
602
492
|
"dir": "jstodef",
|
|
603
493
|
"classification": "native",
|
|
604
494
|
"modules": [
|
|
605
495
|
"jstodef"
|
|
606
496
|
]
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
"dir": "library-defold-persist",
|
|
610
|
-
"classification": "already-vendored",
|
|
611
|
-
"modules": [
|
|
612
|
-
"persist.persist"
|
|
613
|
-
]
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
"dir": "library-defold-rendy",
|
|
617
|
-
"classification": "already-vendored",
|
|
618
|
-
"modules": [
|
|
619
|
-
"rendy.rendy"
|
|
620
|
-
]
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
"dir": "monarch",
|
|
624
|
-
"classification": "already-vendored",
|
|
625
|
-
"modules": [
|
|
626
|
-
"monarch.monarch",
|
|
627
|
-
"monarch.transitions.easings",
|
|
628
|
-
"monarch.transitions.gui"
|
|
629
|
-
]
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"dir": "nakama-defold",
|
|
633
|
-
"classification": "already-vendored",
|
|
634
|
-
"modules": [
|
|
635
|
-
"nakama.engine.defold",
|
|
636
|
-
"nakama.nakama",
|
|
637
|
-
"nakama.util.log"
|
|
638
|
-
]
|
|
639
|
-
},
|
|
640
|
-
{
|
|
641
|
-
"dir": "platypus",
|
|
642
|
-
"classification": "already-vendored",
|
|
643
|
-
"modules": [
|
|
644
|
-
"platypus.platypus"
|
|
645
|
-
]
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
"dir": "starly",
|
|
649
|
-
"classification": "already-vendored",
|
|
650
|
-
"modules": [
|
|
651
|
-
"starly.starly"
|
|
652
|
-
]
|
|
653
497
|
}
|
|
654
498
|
]
|
|
655
499
|
}
|