Skip to content

Commit 82b8b9d

Browse files
author
ranpeng
committed
feat: joystick/keyboard 新增探测器
1 parent b87da82 commit 82b8b9d

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

plugin/joystick/joystick.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export interface JoystickOutputData {
126126
*
127127
* @example new Joystick({})
128128
*/
129-
class Joystick {
129+
declare class Joystick {
130130
constructor(params: JoystickConfig);
131131
/**
132132
* 监听摇杆事件

plugin/joystick/joystick.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/joystick/joystick_en.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export interface JoystickOutputData {
124124
*
125125
* @example new Joystick({})
126126
*/
127-
class Joystick {
127+
declare class Joystick {
128128
constructor(params: JoystickConfig);
129129
/**
130130
* This API is used to listen on joystick events.

plugin/keyboard/keyboard.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export interface OnTouchEventResponse {
1616
}
1717

1818
export interface KeyboardConfig {
19+
/**
20+
* 摇杆挂载节点,默认 TCGSDK init 参数传入的 mount 节点
21+
*/
22+
zone?: HTMLElement;
1923
/**
2024
* 自动发送键盘数据 默认值 true
2125
*/
@@ -36,6 +40,7 @@ export interface KeyboardConfig {
3640
}
3741

3842
/**
43+
* @class
3944
*
4045
* 虚拟键盘
4146
*
@@ -59,7 +64,7 @@ export interface KeyboardConfig {
5964
* @example
6065
* new Keyboard({});
6166
*/
62-
class Keyboard {
67+
declare class Keyboard {
6368
constructor(params: KeyboardConfig);
6469
/**
6570
* 显示虚拟键盘

plugin/keyboard/keyboard.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/keyboard/keyboard_en.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
export type TouchType = 'touchstart' | 'touchend' | 'touchcancel';
22

33
export interface OnTouchEventResponse {
4+
/**
5+
* The keyboard mount node. Default value: TCGSDK init param `mount`.
6+
*/
7+
zone?: HTMLElement;
48
/**
59
* The event type, which is read-only. Valid values: `touchstart`, `touchend`, `touchcancel`.
610
*/
@@ -47,7 +51,7 @@ export interface KeyboardConfig {
4751
* @param {Function} [params.onTouchEvent] - Keyboard OnTouchEventResponse
4852
*
4953
* @description
50-
* 关于OnTouchEventResponse,具体如下
54+
* OnTouchEventResponse
5155
*
5256
* | Name | Type | Description |
5357
* | ------- | ---------- | --------------------------------------------------------------- |
@@ -58,7 +62,7 @@ export interface KeyboardConfig {
5862
* @example
5963
* new Keyboard({});
6064
*/
61-
class Keyboard {
65+
declare class Keyboard {
6266
constructor(params: KeyboardConfig);
6367
/**
6468
* This API is used to display the virtual keyboard.

0 commit comments

Comments
 (0)