@defold-typescript/library-types 0.18.1
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 +52 -0
- package/README.md +78 -0
- package/api-doc/boom.boom.json +26 -0
- package/api-doc/bridge.bridge.json +1653 -0
- package/api-doc/bzAnim.bzLibrary.json +156 -0
- package/api-doc/defcon.console.json +109 -0
- package/api-doc/defmath.defmath.json +1381 -0
- package/api-doc/defsave.defsave.json +175 -0
- package/api-doc/deftest.deftest.json +71 -0
- package/api-doc/dicebag.dicebag.json +323 -0
- package/api-doc/event.event.json +238 -0
- package/api-doc/gooey.gooey.json +963 -0
- package/api-doc/immutable.immutable.json +63 -0
- package/api-doc/in.accelerometer.json +281 -0
- package/api-doc/in.button.json +148 -0
- package/api-doc/in.cursor.json +203 -0
- package/api-doc/in.gesture.json +206 -0
- package/api-doc/in.keyboard.json +45 -0
- package/api-doc/in.mapper.json +141 -0
- package/api-doc/in.onscreen.json +265 -0
- package/api-doc/in.state.json +195 -0
- package/api-doc/in.textbox.json +213 -0
- package/api-doc/in.triggers.json +1260 -0
- package/api-doc/lang.lang.json +411 -0
- package/api-doc/log.log.json +50 -0
- package/api-doc/metrics.fps.json +88 -0
- package/api-doc/metrics.mem.json +80 -0
- package/api-doc/monarch.monarch.json +1065 -0
- package/api-doc/monarch.transitions.easings.json +206 -0
- package/api-doc/monarch.transitions.gui.json +445 -0
- package/api-doc/nakama.engine.defold.json +165 -0
- package/api-doc/nakama.nakama.json +6574 -0
- package/api-doc/nakama.util.log.json +25 -0
- package/api-doc/narrator.narrator.json +150 -0
- package/api-doc/orthographic.camera.json +1019 -0
- package/api-doc/persist.persist.json +142 -0
- package/api-doc/platypus.platypus.json +631 -0
- package/api-doc/proto.proto.json +355 -0
- package/api-doc/rendy.rendy.json +408 -0
- package/api-doc/richtext.color.json +219 -0
- package/api-doc/richtext.richtext.json +382 -0
- package/api-doc/richtext.tags.json +67 -0
- package/api-doc/saver.saver.json +553 -0
- package/api-doc/saver.storage.json +174 -0
- package/api-doc/squid.squid.json +660 -0
- package/api-doc/starly.starly.json +488 -0
- package/api-doc/tweener.tweener.json +419 -0
- package/api-doc/yagames.yagames.json +1465 -0
- package/api-doc/zzfx.api.json +85 -0
- package/generated/boom.boom.d.ts +1585 -0
- package/generated/bridge.bridge.d.ts +533 -0
- package/generated/bzAnim.bzLibrary.d.ts +93 -0
- package/generated/defcon.console.d.ts +24 -0
- package/generated/defmath.defmath.d.ts +194 -0
- package/generated/defsave.defsave.d.ts +31 -0
- package/generated/deftest.deftest.d.ts +47 -0
- package/generated/dicebag.dicebag.d.ts +90 -0
- package/generated/event.event.d.ts +54 -0
- package/generated/gooey.gooey.d.ts +261 -0
- package/generated/immutable.immutable.d.ts +13 -0
- package/generated/in.accelerometer.d.ts +37 -0
- package/generated/in.button.d.ts +20 -0
- package/generated/in.cursor.d.ts +33 -0
- package/generated/in.gesture.d.ts +64 -0
- package/generated/in.keyboard.d.ts +18 -0
- package/generated/in.mapper.d.ts +23 -0
- package/generated/in.onscreen.d.ts +58 -0
- package/generated/in.state.d.ts +34 -0
- package/generated/in.textbox.d.ts +26 -0
- package/generated/in.triggers.d.ts +180 -0
- package/generated/lang.lang.d.ts +33 -0
- package/generated/log.log.d.ts +40 -0
- package/generated/metrics.fps.d.ts +16 -0
- package/generated/metrics.mem.d.ts +16 -0
- package/generated/monarch.monarch.d.ts +412 -0
- package/generated/monarch.transitions.easings.d.ts +65 -0
- package/generated/monarch.transitions.gui.d.ts +197 -0
- package/generated/nakama.engine.defold.d.ts +24 -0
- package/generated/nakama.nakama.d.ts +594 -0
- package/generated/nakama.util.log.d.ts +10 -0
- package/generated/narrator.narrator.d.ts +66 -0
- package/generated/orthographic.camera.d.ts +308 -0
- package/generated/persist.persist.d.ts +34 -0
- package/generated/platypus.platypus.d.ts +76 -0
- package/generated/proto.proto.d.ts +36 -0
- package/generated/rendy.rendy.d.ts +184 -0
- package/generated/richtext.color.d.ts +33 -0
- package/generated/richtext.richtext.d.ts +126 -0
- package/generated/richtext.tags.d.ts +12 -0
- package/generated/saver.saver.d.ts +44 -0
- package/generated/saver.storage.d.ts +16 -0
- package/generated/squid.squid.d.ts +106 -0
- package/generated/starly.starly.d.ts +148 -0
- package/generated/tweener.tweener.d.ts +151 -0
- package/generated/yagames.yagames.d.ts +279 -0
- package/generated/zzfx.api.d.ts +20 -0
- package/library-classification.json +726 -0
- package/library-targets.json +291 -0
- package/package.json +180 -0
- package/scripts/extract-api-doc.ts +418 -0
- package/scripts/sync-library-types.ts +542 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.accelerometer' {
|
|
8
|
+
type AccelerometerInstance = {
|
|
9
|
+
reset: () => void;
|
|
10
|
+
calibrate: () => void;
|
|
11
|
+
on_input: (action: { acc_x: number; acc_y: number; acc_z: number }) => void;
|
|
12
|
+
calibrated: () => Vector3;
|
|
13
|
+
adjusted: () => Vector3;
|
|
14
|
+
average: () => Vector3;
|
|
15
|
+
zero: () => Vector3;
|
|
16
|
+
latest: () => Vector3;
|
|
17
|
+
on_window_resized: (width: number, height: number) => void;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export function create(samplecount?: number): AccelerometerInstance;
|
|
21
|
+
export function reset(instance?: AccelerometerInstance): void;
|
|
22
|
+
export function calibrate(instance?: AccelerometerInstance): void;
|
|
23
|
+
export function on_input(
|
|
24
|
+
action: { acc_x: number; acc_y: number; acc_z: number },
|
|
25
|
+
instance?: AccelerometerInstance,
|
|
26
|
+
): void;
|
|
27
|
+
export function calibrated(instance?: AccelerometerInstance): Vector3;
|
|
28
|
+
export function adjusted(instance?: AccelerometerInstance): Vector3;
|
|
29
|
+
export function average(instance?: AccelerometerInstance): Vector3;
|
|
30
|
+
export function zero(instance?: AccelerometerInstance): Vector3;
|
|
31
|
+
export function latest(instance?: AccelerometerInstance): Vector3;
|
|
32
|
+
export function on_window_resized(
|
|
33
|
+
width: number,
|
|
34
|
+
height: number,
|
|
35
|
+
instance?: AccelerometerInstance,
|
|
36
|
+
): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.button' {
|
|
8
|
+
export const TOUCH: Hash;
|
|
9
|
+
|
|
10
|
+
export function acquire(): void;
|
|
11
|
+
export function release(): void;
|
|
12
|
+
export function register(
|
|
13
|
+
node_or_string: Opaque<"node"> | string,
|
|
14
|
+
callback: () => void,
|
|
15
|
+
): Opaque<"node">;
|
|
16
|
+
export function unregister(node_or_string?: Opaque<"node"> | string): void;
|
|
17
|
+
export function dump(): void;
|
|
18
|
+
export function effect(node: Opaque<"node">, initial_scale: Vector3): void;
|
|
19
|
+
export function on_input(action_id: Hash, action: {}): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.cursor' {
|
|
8
|
+
export const OVER: Hash;
|
|
9
|
+
export const OUT: Hash;
|
|
10
|
+
export const PRESSED: Hash;
|
|
11
|
+
export const RELEASED: Hash;
|
|
12
|
+
export const DRAG: Hash;
|
|
13
|
+
export const DRAG_END: Hash;
|
|
14
|
+
export const DRAG_START: Hash;
|
|
15
|
+
export const CLICKED: Hash;
|
|
16
|
+
export const RESET: Hash;
|
|
17
|
+
export const START_DRAGGING: Hash;
|
|
18
|
+
export const DRAG_MODE_HORIZONTAL: Hash;
|
|
19
|
+
export const DRAG_MODE_VERTICAL: Hash;
|
|
20
|
+
export const DRAG_MODE_FREE: Hash;
|
|
21
|
+
|
|
22
|
+
type ListenerFunction = (message_id: Hash | string, message: {}) => boolean;
|
|
23
|
+
|
|
24
|
+
export function trigger(message_id: Hash | string, message: {}): boolean;
|
|
25
|
+
export function listen(
|
|
26
|
+
cursor_url: Url,
|
|
27
|
+
message_id: Hash,
|
|
28
|
+
fn: ListenerFunction,
|
|
29
|
+
): void;
|
|
30
|
+
export function init(): void;
|
|
31
|
+
export function final(): void;
|
|
32
|
+
export function reset(cursor_url?: Url): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.gesture' {
|
|
8
|
+
type GestureInstance = {
|
|
9
|
+
on_input(action_id: Hash, action: {}): DetectedGestures;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type DetectedGestures = {
|
|
13
|
+
tap?: { position: { x: number; y: number } };
|
|
14
|
+
double_tap?: { position: { x: number; y: number } };
|
|
15
|
+
long_press?: { position: { x: number; y: number }; time: number };
|
|
16
|
+
repeated?: boolean;
|
|
17
|
+
swipe_left?: boolean;
|
|
18
|
+
swipe_right?: boolean;
|
|
19
|
+
swipe_up?: boolean;
|
|
20
|
+
swipe_down?: boolean;
|
|
21
|
+
swipe?: {
|
|
22
|
+
from: { x: number; y: number };
|
|
23
|
+
to: { x: number; y: number };
|
|
24
|
+
time: number;
|
|
25
|
+
};
|
|
26
|
+
two_finger?: {
|
|
27
|
+
tap?: boolean;
|
|
28
|
+
double_tap?: boolean;
|
|
29
|
+
long_press?: boolean;
|
|
30
|
+
repeated?: boolean;
|
|
31
|
+
swipe_left?: boolean;
|
|
32
|
+
swipe_right?: boolean;
|
|
33
|
+
swipe_up?: boolean;
|
|
34
|
+
swipe_down?: boolean;
|
|
35
|
+
pinch?: { center: { x: number; y: number }; ratio: number };
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const SETTINGS: {
|
|
40
|
+
action_id: Hash;
|
|
41
|
+
tap_threshold: number;
|
|
42
|
+
double_tap_interval: number;
|
|
43
|
+
swipe_threshold: number;
|
|
44
|
+
swipe_time: number;
|
|
45
|
+
long_press_time: number;
|
|
46
|
+
multi_touch: boolean;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export function create(settings?: {
|
|
50
|
+
action_id?: string;
|
|
51
|
+
tap_threshold?: number;
|
|
52
|
+
double_tap_interval?: number;
|
|
53
|
+
swipe_threshold?: number;
|
|
54
|
+
swipe_time?: number;
|
|
55
|
+
long_press_time?: number;
|
|
56
|
+
multi_touch?: boolean;
|
|
57
|
+
}): GestureInstance;
|
|
58
|
+
|
|
59
|
+
export function on_input(
|
|
60
|
+
this: any,
|
|
61
|
+
action_id: Hash,
|
|
62
|
+
action: {},
|
|
63
|
+
): DetectedGestures;
|
|
64
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.keyboard' {
|
|
8
|
+
export const KEYBOARD_INPUT: Hash;
|
|
9
|
+
|
|
10
|
+
type KeyboardTypes =
|
|
11
|
+
| typeof gui.KEYBOARD_TYPE_DEFAULT
|
|
12
|
+
| typeof gui.KEYBOARD_TYPE_EMAIL
|
|
13
|
+
| typeof gui.KEYBOARD_TYPE_NUMBER_PAD
|
|
14
|
+
| typeof gui.KEYBOARD_TYPE_PASSWORD;
|
|
15
|
+
|
|
16
|
+
export function show(keyboard_type?: KeyboardTypes): void;
|
|
17
|
+
export function hide(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is a definition stub with incomplete or untested signatures.
|
|
5
|
+
* Contributions to improve the accuracy of these types are welcome.
|
|
6
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
7
|
+
* @noResolution
|
|
8
|
+
*/
|
|
9
|
+
declare module 'in.mapper' {
|
|
10
|
+
export function bind(
|
|
11
|
+
trigger: {},
|
|
12
|
+
action: {},
|
|
13
|
+
player?: any,
|
|
14
|
+
gamepad?: any,
|
|
15
|
+
): unknown;
|
|
16
|
+
export function unbind(trigger: {}, player?: any): void;
|
|
17
|
+
export function unbind_all(player?: any): void;
|
|
18
|
+
export function on_input(
|
|
19
|
+
trigger: {},
|
|
20
|
+
player?: any,
|
|
21
|
+
gamepad?: any,
|
|
22
|
+
): {} | undefined;
|
|
23
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.onscreen' {
|
|
8
|
+
export const BUTTON: Hash;
|
|
9
|
+
export const ANALOG: Hash;
|
|
10
|
+
export const BUTTON_PRESSED: Hash;
|
|
11
|
+
export const BUTTON_RELEASED: Hash;
|
|
12
|
+
export const ANALOG_PRESSED: Hash;
|
|
13
|
+
export const ANALOG_RELEASED: Hash;
|
|
14
|
+
export const ANALOG_MOVED: Hash;
|
|
15
|
+
export const ANALOG_LEFT: Hash;
|
|
16
|
+
export const ANALOG_RIGHT: Hash;
|
|
17
|
+
export const ANALOG_UP: Hash;
|
|
18
|
+
export const ANALOG_DOWN: Hash;
|
|
19
|
+
|
|
20
|
+
type OnscreenInstance = {
|
|
21
|
+
reset: () => void;
|
|
22
|
+
register_button: (
|
|
23
|
+
node: Opaque<"node">,
|
|
24
|
+
settings: {} | undefined,
|
|
25
|
+
fn: (action: Hash, node: Opaque<"node">, touch: {}) => void,
|
|
26
|
+
) => void;
|
|
27
|
+
register_analog: (
|
|
28
|
+
node: Opaque<"node">,
|
|
29
|
+
settings: { radius?: number; threshold?: number } | undefined,
|
|
30
|
+
fn: (action: Hash, node: Opaque<"node">, touch: {}) => void,
|
|
31
|
+
) => void;
|
|
32
|
+
on_input: (action_id: Hash, action: {}) => boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function create(config?: { touch: Hash }): OnscreenInstance;
|
|
36
|
+
|
|
37
|
+
export function reset(instance?: OnscreenInstance): void;
|
|
38
|
+
|
|
39
|
+
export function register_button(
|
|
40
|
+
node: Opaque<"node">,
|
|
41
|
+
settings: {} | undefined,
|
|
42
|
+
fn: (action: Hash, node: Opaque<"node">, touch: {}) => void,
|
|
43
|
+
instance?: OnscreenInstance,
|
|
44
|
+
): void;
|
|
45
|
+
|
|
46
|
+
export function register_analog(
|
|
47
|
+
node: Opaque<"node">,
|
|
48
|
+
settings: { radius?: number; threshold?: number } | undefined,
|
|
49
|
+
fn: (action: Hash, node: Opaque<"node">, touch: {}) => void,
|
|
50
|
+
instance?: OnscreenInstance,
|
|
51
|
+
): void;
|
|
52
|
+
|
|
53
|
+
export function on_input(
|
|
54
|
+
action_id: Hash,
|
|
55
|
+
action: {},
|
|
56
|
+
instance?: OnscreenInstance,
|
|
57
|
+
): boolean;
|
|
58
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.state' {
|
|
8
|
+
type StateInstance = {
|
|
9
|
+
acquire: () => void;
|
|
10
|
+
release: (url?: Url) => void;
|
|
11
|
+
is_pressed: (action_id: Hash | string) => boolean;
|
|
12
|
+
on_input: (action_id: Hash | string, action: {}) => void;
|
|
13
|
+
clear: () => void;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function create(): StateInstance;
|
|
17
|
+
export function acquire(url: Url, instance?: StateInstance): void;
|
|
18
|
+
export function release(url: Url, instance?: StateInstance): void;
|
|
19
|
+
export function is_pressed(
|
|
20
|
+
action_id: Hash | string,
|
|
21
|
+
instance?: StateInstance,
|
|
22
|
+
): boolean;
|
|
23
|
+
export function update(
|
|
24
|
+
action_id: Hash | string,
|
|
25
|
+
action: {},
|
|
26
|
+
instance?: StateInstance,
|
|
27
|
+
): void;
|
|
28
|
+
export function on_input(
|
|
29
|
+
action_id: Hash | string,
|
|
30
|
+
action: {},
|
|
31
|
+
instance?: StateInstance,
|
|
32
|
+
): void;
|
|
33
|
+
export function clear(instance?: StateInstance): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.textbox' {
|
|
8
|
+
export const TOUCH: Hash;
|
|
9
|
+
export const TYPE: Hash;
|
|
10
|
+
export const BACKSPACE: Hash;
|
|
11
|
+
|
|
12
|
+
export function acquire(): void;
|
|
13
|
+
export function release(): void;
|
|
14
|
+
export function register(
|
|
15
|
+
box_node_or_string: Opaque<"node"> | string,
|
|
16
|
+
text_node_or_string: Opaque<"node"> | string,
|
|
17
|
+
is_masked?: boolean,
|
|
18
|
+
): Opaque<"node">;
|
|
19
|
+
export function unregister(node_or_string?: Opaque<"node"> | string): void;
|
|
20
|
+
export function effect(node: Opaque<"node">, scale: { x: number; y: number }): void;
|
|
21
|
+
export function text(
|
|
22
|
+
node_or_string: Opaque<"node"> | string,
|
|
23
|
+
text?: string,
|
|
24
|
+
): string | undefined;
|
|
25
|
+
export function on_input(action_id: Hash, action: {}): boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-input|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'in.triggers' {
|
|
8
|
+
export const KEY_SPACE: Hash;
|
|
9
|
+
export const KEY_EXCLAIM: Hash;
|
|
10
|
+
export const KEY_QUOTEDBL: Hash;
|
|
11
|
+
export const KEY_HASH: Hash;
|
|
12
|
+
export const KEY_DOLLAR: Hash;
|
|
13
|
+
export const KEY_AMPERSAND: Hash;
|
|
14
|
+
export const KEY_QUOTE: Hash;
|
|
15
|
+
export const KEY_LPAREN: Hash;
|
|
16
|
+
export const KEY_RPAREN: Hash;
|
|
17
|
+
export const KEY_ASTERISK: Hash;
|
|
18
|
+
export const KEY_PLUS: Hash;
|
|
19
|
+
export const KEY_COMMA: Hash;
|
|
20
|
+
export const KEY_MINUS: Hash;
|
|
21
|
+
export const KEY_PERIOD: Hash;
|
|
22
|
+
export const KEY_SLASH: Hash;
|
|
23
|
+
export const KEY_0: Hash;
|
|
24
|
+
export const KEY_1: Hash;
|
|
25
|
+
export const KEY_2: Hash;
|
|
26
|
+
export const KEY_3: Hash;
|
|
27
|
+
export const KEY_4: Hash;
|
|
28
|
+
export const KEY_5: Hash;
|
|
29
|
+
export const KEY_6: Hash;
|
|
30
|
+
export const KEY_7: Hash;
|
|
31
|
+
export const KEY_8: Hash;
|
|
32
|
+
export const KEY_9: Hash;
|
|
33
|
+
export const KEY_COLON: Hash;
|
|
34
|
+
export const KEY_SEMICOLON: Hash;
|
|
35
|
+
export const KEY_LESS: Hash;
|
|
36
|
+
export const KEY_EQUALS: Hash;
|
|
37
|
+
export const KEY_GREATER: Hash;
|
|
38
|
+
export const KEY_QUESTION: Hash;
|
|
39
|
+
export const KEY_AT: Hash;
|
|
40
|
+
export const KEY_A: Hash;
|
|
41
|
+
export const KEY_B: Hash;
|
|
42
|
+
export const KEY_C: Hash;
|
|
43
|
+
export const KEY_D: Hash;
|
|
44
|
+
export const KEY_E: Hash;
|
|
45
|
+
export const KEY_F: Hash;
|
|
46
|
+
export const KEY_G: Hash;
|
|
47
|
+
export const KEY_H: Hash;
|
|
48
|
+
export const KEY_I: Hash;
|
|
49
|
+
export const KEY_J: Hash;
|
|
50
|
+
export const KEY_K: Hash;
|
|
51
|
+
export const KEY_L: Hash;
|
|
52
|
+
export const KEY_M: Hash;
|
|
53
|
+
export const KEY_N: Hash;
|
|
54
|
+
export const KEY_O: Hash;
|
|
55
|
+
export const KEY_P: Hash;
|
|
56
|
+
export const KEY_Q: Hash;
|
|
57
|
+
export const KEY_R: Hash;
|
|
58
|
+
export const KEY_S: Hash;
|
|
59
|
+
export const KEY_T: Hash;
|
|
60
|
+
export const KEY_U: Hash;
|
|
61
|
+
export const KEY_V: Hash;
|
|
62
|
+
export const KEY_W: Hash;
|
|
63
|
+
export const KEY_X: Hash;
|
|
64
|
+
export const KEY_Y: Hash;
|
|
65
|
+
export const KEY_Z: Hash;
|
|
66
|
+
export const KEY_LBRACKET: Hash;
|
|
67
|
+
export const KEY_RBRACKET: Hash;
|
|
68
|
+
export const KEY_BACKSLASH: Hash;
|
|
69
|
+
export const KEY_CARET: Hash;
|
|
70
|
+
export const KEY_UNDERSCORE: Hash;
|
|
71
|
+
export const KEY_BACKQUOTE: Hash;
|
|
72
|
+
export const KEY_LBRACE: Hash;
|
|
73
|
+
export const KEY_RBRACE: Hash;
|
|
74
|
+
export const KEY_PIPE: Hash;
|
|
75
|
+
export const KEY_TILDE: Hash;
|
|
76
|
+
export const KEY_ESC: Hash;
|
|
77
|
+
export const KEY_F1: Hash;
|
|
78
|
+
export const KEY_F2: Hash;
|
|
79
|
+
export const KEY_F3: Hash;
|
|
80
|
+
export const KEY_F4: Hash;
|
|
81
|
+
export const KEY_F5: Hash;
|
|
82
|
+
export const KEY_F6: Hash;
|
|
83
|
+
export const KEY_F7: Hash;
|
|
84
|
+
export const KEY_F8: Hash;
|
|
85
|
+
export const KEY_F9: Hash;
|
|
86
|
+
export const KEY_F10: Hash;
|
|
87
|
+
export const KEY_F11: Hash;
|
|
88
|
+
export const KEY_F12: Hash;
|
|
89
|
+
export const KEY_UP: Hash;
|
|
90
|
+
export const KEY_DOWN: Hash;
|
|
91
|
+
export const KEY_LEFT: Hash;
|
|
92
|
+
export const KEY_RIGHT: Hash;
|
|
93
|
+
export const KEY_LSHIFT: Hash;
|
|
94
|
+
export const KEY_RSHIFT: Hash;
|
|
95
|
+
export const KEY_LCTRL: Hash;
|
|
96
|
+
export const KEY_RCTRL: Hash;
|
|
97
|
+
export const KEY_LALT: Hash;
|
|
98
|
+
export const KEY_RALT: Hash;
|
|
99
|
+
export const KEY_TAB: Hash;
|
|
100
|
+
export const KEY_ENTER: Hash;
|
|
101
|
+
export const KEY_BACKSPACE: Hash;
|
|
102
|
+
export const KEY_INSERT: Hash;
|
|
103
|
+
export const KEY_DEL: Hash;
|
|
104
|
+
export const KEY_PAGEUP: Hash;
|
|
105
|
+
export const KEY_PAGEDOWN: Hash;
|
|
106
|
+
export const KEY_HOME: Hash;
|
|
107
|
+
export const KEY_END: Hash;
|
|
108
|
+
export const KEY_KP_0: Hash;
|
|
109
|
+
export const KEY_KP_1: Hash;
|
|
110
|
+
export const KEY_KP_2: Hash;
|
|
111
|
+
export const KEY_KP_3: Hash;
|
|
112
|
+
export const KEY_KP_4: Hash;
|
|
113
|
+
export const KEY_KP_5: Hash;
|
|
114
|
+
export const KEY_KP_6: Hash;
|
|
115
|
+
export const KEY_KP_7: Hash;
|
|
116
|
+
export const KEY_KP_8: Hash;
|
|
117
|
+
export const KEY_KP_9: Hash;
|
|
118
|
+
export const KEY_KP_DIVIDE: Hash;
|
|
119
|
+
export const KEY_KP_MULTIPLY: Hash;
|
|
120
|
+
export const KEY_KP_SUBTRACT: Hash;
|
|
121
|
+
export const KEY_KP_ADD: Hash;
|
|
122
|
+
export const KEY_KP_DECIMAL: Hash;
|
|
123
|
+
export const KEY_KP_EQUAL: Hash;
|
|
124
|
+
export const KEY_KP_ENTER: Hash;
|
|
125
|
+
export const KEY_KP_NUM_LOCK: Hash;
|
|
126
|
+
export const KEY_CAPS_LOCK: Hash;
|
|
127
|
+
export const KEY_SCROLL_LOCK: Hash;
|
|
128
|
+
export const KEY_PAUSE: Hash;
|
|
129
|
+
export const KEY_LSUPER: Hash;
|
|
130
|
+
export const KEY_RSUPER: Hash;
|
|
131
|
+
export const KEY_MENU: Hash;
|
|
132
|
+
export const KEY_BACK: Hash;
|
|
133
|
+
export const MOUSE_WHEEL_UP: Hash;
|
|
134
|
+
export const MOUSE_WHEEL_DOWN: Hash;
|
|
135
|
+
export const MOUSE_BUTTON_LEFT: Hash;
|
|
136
|
+
export const MOUSE_BUTTON_MIDDLE: Hash;
|
|
137
|
+
export const MOUSE_BUTTON_RIGHT: Hash;
|
|
138
|
+
export const MOUSE_BUTTON_1: Hash;
|
|
139
|
+
export const MOUSE_BUTTON_2: Hash;
|
|
140
|
+
export const MOUSE_BUTTON_3: Hash;
|
|
141
|
+
export const MOUSE_BUTTON_4: Hash;
|
|
142
|
+
export const MOUSE_BUTTON_5: Hash;
|
|
143
|
+
export const MOUSE_BUTTON_6: Hash;
|
|
144
|
+
export const MOUSE_BUTTON_7: Hash;
|
|
145
|
+
export const MOUSE_BUTTON_8: Hash;
|
|
146
|
+
export const GAMEPAD_LSTICK_LEFT: Hash;
|
|
147
|
+
export const GAMEPAD_LSTICK_RIGHT: Hash;
|
|
148
|
+
export const GAMEPAD_LSTICK_DOWN: Hash;
|
|
149
|
+
export const GAMEPAD_LSTICK_UP: Hash;
|
|
150
|
+
export const GAMEPAD_LSTICK_CLICK: Hash;
|
|
151
|
+
export const GAMEPAD_LTRIGGER: Hash;
|
|
152
|
+
export const GAMEPAD_LSHOULDER: Hash;
|
|
153
|
+
export const GAMEPAD_LPAD_LEFT: Hash;
|
|
154
|
+
export const GAMEPAD_LPAD_RIGHT: Hash;
|
|
155
|
+
export const GAMEPAD_LPAD_DOWN: Hash;
|
|
156
|
+
export const GAMEPAD_LPAD_UP: Hash;
|
|
157
|
+
export const GAMEPAD_RSTICK_LEFT: Hash;
|
|
158
|
+
export const GAMEPAD_RSTICK_RIGHT: Hash;
|
|
159
|
+
export const GAMEPAD_RSTICK_DOWN: Hash;
|
|
160
|
+
export const GAMEPAD_RSTICK_UP: Hash;
|
|
161
|
+
export const GAMEPAD_RSTICK_CLICK: Hash;
|
|
162
|
+
export const GAMEPAD_RTRIGGER: Hash;
|
|
163
|
+
export const GAMEPAD_RSHOULDER: Hash;
|
|
164
|
+
export const GAMEPAD_RPAD_LEFT: Hash;
|
|
165
|
+
export const GAMEPAD_RPAD_RIGHT: Hash;
|
|
166
|
+
export const GAMEPAD_RPAD_DOWN: Hash;
|
|
167
|
+
export const GAMEPAD_RPAD_UP: Hash;
|
|
168
|
+
export const GAMEPAD_START: Hash;
|
|
169
|
+
export const GAMEPAD_BACK: Hash;
|
|
170
|
+
export const GAMEPAD_GUIDE: Hash;
|
|
171
|
+
export const GAMEPAD_CONNECTED: Hash;
|
|
172
|
+
export const GAMEPAD_DISCONNECTED: Hash;
|
|
173
|
+
export const TOUCH_MULTI: Hash;
|
|
174
|
+
export const TEXT: Hash;
|
|
175
|
+
export const MARKED_TEXT: Hash;
|
|
176
|
+
|
|
177
|
+
export function is_key(action_id: Hash): boolean;
|
|
178
|
+
export function is_mouse(action_id: Hash): boolean;
|
|
179
|
+
export function is_gamepad(action_id: Hash): boolean;
|
|
180
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link https://github.com/Insality/defold-lang|Github Source}
|
|
7
|
+
* @see {@link https://github.com/Insality/defold-lang/blob/main/API_REFERENCE.md|API Reference}
|
|
8
|
+
* @example `import * as lang from 'lang.lang'`
|
|
9
|
+
* @noResolution
|
|
10
|
+
*/
|
|
11
|
+
declare module 'lang.lang' {
|
|
12
|
+
interface LoggerInstance {
|
|
13
|
+
trace(this: any, message: string, data?: {}): void;
|
|
14
|
+
debug(this: any, message: string, data?: {}): void;
|
|
15
|
+
info(this: any, message: string, data?: {}): void;
|
|
16
|
+
warn(this: any, message: string, data?: {}): void;
|
|
17
|
+
error(this: any, message: string, data?: {}): void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function init(): void;
|
|
21
|
+
export function set_lang(lang_id?: string): void;
|
|
22
|
+
export function get_lang(): string;
|
|
23
|
+
export function get_langs(): string[];
|
|
24
|
+
export function set_next_lang(): void;
|
|
25
|
+
export function get_next_lang(): string;
|
|
26
|
+
export function is_exist(text_id: string): boolean;
|
|
27
|
+
export function txt(text_id: string): string;
|
|
28
|
+
export function txp(text_id: string, ...params: any[]): string;
|
|
29
|
+
export function txr(text_id: string): string;
|
|
30
|
+
export function set_logger(logger_instance: LoggerInstance): void;
|
|
31
|
+
export function set_logger(remove_logger_instance: undefined): void;
|
|
32
|
+
export function reset_state(): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Context logger with performance metrics for Defold
|
|
5
|
+
* @see {@link https://github.com/Insality/defold-log|Github Source}
|
|
6
|
+
* @noResolution
|
|
7
|
+
*/
|
|
8
|
+
declare module 'log.log' {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new logger instance with an optional forced log level for debugging purposes.
|
|
11
|
+
*/
|
|
12
|
+
export function get_logger(
|
|
13
|
+
this: void,
|
|
14
|
+
logger_name: string,
|
|
15
|
+
force_logger_level_in_debug?: 'FATAL' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'TRACE',
|
|
16
|
+
): LoggerInstance;
|
|
17
|
+
|
|
18
|
+
class LoggerInstance {
|
|
19
|
+
/**
|
|
20
|
+
* Log a message at the TRACE level. Trace is typically used to log the start and end of functions or specific events. While it's not recommended to pass data to trace due to potential memory allocation, sometimes it can be useful for in-depth debugging.
|
|
21
|
+
*/
|
|
22
|
+
trace(this: any, message: string, data?: {}): void;
|
|
23
|
+
/**
|
|
24
|
+
* Log a message at the DEBUG level. Debug is suitable for detailed system information that could be helpful during development to track down unexpected behavior.
|
|
25
|
+
*/
|
|
26
|
+
debug(this: any, message: string, data?: {}): void;
|
|
27
|
+
/**
|
|
28
|
+
* Log a message at the INFO level. Info is used for general system information under normal operation.
|
|
29
|
+
*/
|
|
30
|
+
info(this: any, message: string, data?: {}): void;
|
|
31
|
+
/**
|
|
32
|
+
* Log a message at the WARN level. Warn is intended for potentially harmful situations that could require attention.
|
|
33
|
+
*/
|
|
34
|
+
warn(this: any, message: string, data?: {}): void;
|
|
35
|
+
/**
|
|
36
|
+
* Log a message at the ERROR level. Error indicates serious issues that have occurred and should be addressed immediately.
|
|
37
|
+
*/
|
|
38
|
+
error(this: any, message: string, data?: {}): void;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-metrics|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'metrics.fps' {
|
|
8
|
+
/** @noSelf */
|
|
9
|
+
export interface Metrics {
|
|
10
|
+
fps: () => number;
|
|
11
|
+
update: () => void;
|
|
12
|
+
draw: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function create(samples?: number, format?: string, position?: string, color?: string): Metrics;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/britzl/defold-metrics|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'metrics.mem' {
|
|
8
|
+
/** @noSelf */
|
|
9
|
+
export interface Metrics {
|
|
10
|
+
mem: () => number;
|
|
11
|
+
update: () => void;
|
|
12
|
+
draw: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function create(format?: string, position?: string, color?: string): Metrics;
|
|
16
|
+
}
|