ms-types 0.4.1 → 0.4.3
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/package.json
CHANGED
package/types/node.d.ts
CHANGED
|
@@ -104,28 +104,6 @@ declare interface NodeInfo {
|
|
|
104
104
|
* 节点是否可接收事件 用于判断是否显示在屏幕上
|
|
105
105
|
*/
|
|
106
106
|
hittable(): boolean;
|
|
107
|
-
/**
|
|
108
|
-
* 无障碍点击
|
|
109
|
-
*/
|
|
110
|
-
tap(): boolean;
|
|
111
|
-
/**
|
|
112
|
-
* 无障碍双击
|
|
113
|
-
*/
|
|
114
|
-
doubleTap(): boolean;
|
|
115
|
-
/**
|
|
116
|
-
* 无障碍长按
|
|
117
|
-
* @param duration 长按持续时间
|
|
118
|
-
*/
|
|
119
|
-
press(duration: number): boolean;
|
|
120
|
-
/**
|
|
121
|
-
* 无障碍滑动
|
|
122
|
-
* @param direction 滑动方向
|
|
123
|
-
* @param velocity 滑动速度 默认为 default
|
|
124
|
-
*/
|
|
125
|
-
swipe(
|
|
126
|
-
direction: "up" | "down" | "left" | "right",
|
|
127
|
-
velocity?: "default" | "fast" | "slow"
|
|
128
|
-
): boolean;
|
|
129
107
|
/**
|
|
130
108
|
* 获取父节点
|
|
131
109
|
*/
|
package/types/yolo.d.ts
CHANGED
|
@@ -47,6 +47,22 @@ declare namespace yolo {
|
|
|
47
47
|
*/
|
|
48
48
|
classId: number;
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* 加载YOLO模型
|
|
52
|
+
* @param paramPath ncnn模型的param文件的绝对路径
|
|
53
|
+
* @param binPath ncnn模型的bin文件绝对路径
|
|
54
|
+
* @param nc 模型的标签数量,可在标签集data.yaml中看到
|
|
55
|
+
* @param version 模型版本,默认11, 支持 8 11 26
|
|
56
|
+
* @returns 加载成功返回模型ID字符串,失败返回null
|
|
57
|
+
* @example
|
|
58
|
+
* const modelId = yolo.load("yolov8n.param", "yolov8n.bin", 80)
|
|
59
|
+
*/
|
|
60
|
+
function load(
|
|
61
|
+
paramPath: string,
|
|
62
|
+
binPath: string,
|
|
63
|
+
nc: number,
|
|
64
|
+
version?: number
|
|
65
|
+
): string | null;
|
|
50
66
|
/**
|
|
51
67
|
* 加载YOLOv11模型 (兼容 yolov8 模型)
|
|
52
68
|
* @param paramPath ncnn模型的param文件的绝对路径
|
|
@@ -50,6 +50,23 @@ declare namespace $YOLO {
|
|
|
50
50
|
classId: 数字;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* 加载YOLO模型
|
|
55
|
+
* @param ncnn模型的param文件路径 ncnn模型的param文件的绝对路径
|
|
56
|
+
* @param ncnn模型的bin文件路径 ncnn模型的bin文件绝对路径
|
|
57
|
+
* @param 标签数量 模型的标签数量,可在标签集data.yaml中看到
|
|
58
|
+
* @param 模型版本 模型版本,默认11, 支持 8 11 26
|
|
59
|
+
* @returns 加载成功返回模型ID字符串,失败返回null
|
|
60
|
+
* @example
|
|
61
|
+
* const 模型ID = $YOLO.加载模型("yolov8n.param", "yolov8n.bin", 80)
|
|
62
|
+
*/
|
|
63
|
+
function 加载模型(
|
|
64
|
+
ncnn模型的param文件路径: 字符串,
|
|
65
|
+
ncnn模型的bin文件路径: 字符串,
|
|
66
|
+
标签数量: 数字,
|
|
67
|
+
模型版本?: 数字
|
|
68
|
+
): 字符串 | null;
|
|
69
|
+
|
|
53
70
|
/**
|
|
54
71
|
* 加载YOLOv11模型 (兼容 yolov8 模型)
|
|
55
72
|
* @param ncnn模型的param文件路径
|
|
@@ -102,28 +102,6 @@ declare interface $节点信息 {
|
|
|
102
102
|
* 节点是否可接收事件 用于判断是否显示在屏幕上
|
|
103
103
|
*/
|
|
104
104
|
hittable(): 布尔值;
|
|
105
|
-
/**
|
|
106
|
-
* 无障碍点击
|
|
107
|
-
*/
|
|
108
|
-
tap(): 布尔值;
|
|
109
|
-
/**
|
|
110
|
-
* 无障碍双击
|
|
111
|
-
*/
|
|
112
|
-
doubleTap(): 布尔值;
|
|
113
|
-
/**
|
|
114
|
-
* 无障碍长按
|
|
115
|
-
* @param duration 长按持续时间
|
|
116
|
-
*/
|
|
117
|
-
press(duration: 数字): 布尔值;
|
|
118
|
-
/**
|
|
119
|
-
* 无障碍滑动
|
|
120
|
-
* @param direction 滑动方向
|
|
121
|
-
* @param velocity 滑动速度 默认为 default
|
|
122
|
-
*/
|
|
123
|
-
swipe(
|
|
124
|
-
direction: "up" | "down" | "left" | "right",
|
|
125
|
-
velocity?: "default" | "fast" | "slow"
|
|
126
|
-
): 布尔值;
|
|
127
105
|
/**
|
|
128
106
|
* 获取父节点
|
|
129
107
|
*/
|