@ray-js/robot-map-sdk 0.0.3-beta-29 → 0.0.3-beta-31
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/dist/constant/methods.js +1 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.rjs.js +1 -1
- package/dist-app/assets/{index-DzPBlBnJ.js → index-BaElVzkI.js} +1 -1
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.DnWk-0qr.js → app.CHzOuMqd.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.CkniOGzf.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.DN19noSA.js → VPLocalSearchBox.RyqwBZ1o.js} +1 -1
- package/dist-docs/assets/chunks/{theme.DKfzhPgP.js → theme.Hh-LLTjN.js} +2 -2
- package/dist-docs/assets/{guide_getting-started.md.gh3KjEpv.js → guide_getting-started.md.D_6aYZ_A.js} +1 -1
- package/dist-docs/assets/{reference_methods.md.D1VYgciC.js → reference_methods.md.CO0IvYMn.js} +39 -3
- package/dist-docs/assets/reference_methods.md.CO0IvYMn.lean.js +1 -0
- package/dist-docs/guide/advanced-usage.html +3 -3
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/reference/callbacks.html +3 -3
- package/dist-docs/reference/config.html +3 -3
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +42 -6
- package/dist-docs/reference/runtime.html +3 -3
- package/dist-docs/reference/types.html +3 -3
- package/dist-docs/reference/utils.html +3 -3
- package/package.json +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.89n39Eer.js +0 -1
- package/dist-docs/assets/reference_methods.md.D1VYgciC.lean.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.gh3KjEpv.lean.js → guide_getting-started.md.D_6aYZ_A.lean.js} +0 -0
package/dist/constant/methods.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getSpots","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isPointInAnyRoom","resetPanZoom","snapshot","snapshotByData"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateSpot","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickSpot","onClickDetectedObject","onClickCustomElement"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
|
|
1
|
+
const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getSpots","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isNearChargerOrRobot","isPointInAnyRoom","resetPanZoom","snapshot","snapshotByData"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateSpot","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickSpot","onClickDetectedObject","onClickCustomElement"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
|
package/dist/index.d.ts
CHANGED
|
@@ -1448,7 +1448,7 @@ declare type Managers = {
|
|
|
1448
1448
|
roomsManager: RoomManager;
|
|
1449
1449
|
};
|
|
1450
1450
|
|
|
1451
|
-
export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isPointInAnyRoom", "resetPanZoom", "snapshot", "snapshotByData"];
|
|
1451
|
+
export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "resetPanZoom", "snapshot", "snapshotByData"];
|
|
1452
1452
|
|
|
1453
1453
|
export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateSpot", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickSpot", "onClickDetectedObject", "onClickCustomElement"];
|
|
1454
1454
|
|
|
@@ -1616,6 +1616,20 @@ export declare interface MapApi {
|
|
|
1616
1616
|
* @returns 是否所有指定的房间都相邻(连通)
|
|
1617
1617
|
*/
|
|
1618
1618
|
areRoomsAdjacent(roomIds: number[]): boolean;
|
|
1619
|
+
/**
|
|
1620
|
+
* 判断一个点是否与充电桩或机器人距离小于阈值。
|
|
1621
|
+
*
|
|
1622
|
+
* @param points - 点坐标数组
|
|
1623
|
+
* @param thresholdMeters - 阈值距离,单位米
|
|
1624
|
+
* @param options - 配置选项
|
|
1625
|
+
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
1626
|
+
* @param options.checkRobot - 是否检查与机器人的距离,默认为 false
|
|
1627
|
+
* @returns 是否在判定范围内(true 表示过近,false 表示距离足够)
|
|
1628
|
+
*/
|
|
1629
|
+
isNearChargerOrRobot(points: Point[], thresholdMeters: number, options?: {
|
|
1630
|
+
checkCharger?: boolean;
|
|
1631
|
+
checkRobot?: boolean;
|
|
1632
|
+
}): boolean;
|
|
1619
1633
|
/**
|
|
1620
1634
|
* 判断一个点是否在任意房间内
|
|
1621
1635
|
*
|
|
@@ -2021,6 +2035,25 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
2021
2035
|
*
|
|
2022
2036
|
*/
|
|
2023
2037
|
isPointInAnyRoom(point: Point): RoomData | null;
|
|
2038
|
+
/**
|
|
2039
|
+
* 判断点、墙体或区域是否距离充电桩或机器人位置过近
|
|
2040
|
+
*
|
|
2041
|
+
* 根据给定的坐标集合(点1个、墙体2个点或区域4个点)和判定阈值,
|
|
2042
|
+
* 计算其与充电桩和/或机器人位置的最小距离,判断是否在阈值范围内。
|
|
2043
|
+
*
|
|
2044
|
+
* @param points - 点(1个)、墙体(2个点)或区域(4个点)的坐标集合(原点坐标系)
|
|
2045
|
+
* @param thresholdMeters - 判定阈值,单位为米
|
|
2046
|
+
* @param options - 配置选项
|
|
2047
|
+
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
2048
|
+
* @param options.checkRobot - 是否检查与机器人的距离,默认为 false
|
|
2049
|
+
* @returns 是否在判定范围内(true 表示过近,false 表示距离足够)
|
|
2050
|
+
*
|
|
2051
|
+
*/
|
|
2052
|
+
isNearChargerOrRobot(points: Point[], thresholdMeters: number, options?: {
|
|
2053
|
+
checkCharger?: boolean;
|
|
2054
|
+
checkRobot?: boolean;
|
|
2055
|
+
}): boolean;
|
|
2056
|
+
/* Excluded from this release type: calculateMinDistanceToGeometry */
|
|
2024
2057
|
/* Excluded from this release type: isPointInAnyRoomStructuredInternal */
|
|
2025
2058
|
/* Excluded from this release type: isPointInAnyRoomRasterInternal */
|
|
2026
2059
|
/* Excluded from this release type: areStructuredRoomsAdjacentInternal */
|
|
@@ -2546,6 +2579,7 @@ declare class Path extends Container {
|
|
|
2546
2579
|
private chargePath;
|
|
2547
2580
|
private transitionsPath;
|
|
2548
2581
|
private mopPath;
|
|
2582
|
+
private debugPoints;
|
|
2549
2583
|
private pathData;
|
|
2550
2584
|
private lastPointCount;
|
|
2551
2585
|
private lastDrawnPosition;
|
|
@@ -2583,6 +2617,11 @@ declare class Path extends Container {
|
|
|
2583
2617
|
* @param pathPoints 路径点数组
|
|
2584
2618
|
*/
|
|
2585
2619
|
private drawPathSegments;
|
|
2620
|
+
/**
|
|
2621
|
+
* 调试模式下绘制路径点方块
|
|
2622
|
+
* @param pathPoints 路径点数组
|
|
2623
|
+
*/
|
|
2624
|
+
private drawDebugPoints;
|
|
2586
2625
|
updatePositionByOrigin(x: number, y: number): void;
|
|
2587
2626
|
/**
|
|
2588
2627
|
* 全量绘制路径
|
|
@@ -2787,6 +2826,14 @@ declare class Robot extends Container {
|
|
|
2787
2826
|
* 立即绘制到指定位置(无动画)
|
|
2788
2827
|
*/
|
|
2789
2828
|
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
2829
|
+
/**
|
|
2830
|
+
* 获取机器人当前位置(相对坐标系)
|
|
2831
|
+
* @returns 机器人当前位置,如果尚未绘制则返回 null
|
|
2832
|
+
*/
|
|
2833
|
+
getCurrentPosition(): {
|
|
2834
|
+
x: number;
|
|
2835
|
+
y: number;
|
|
2836
|
+
} | null;
|
|
2790
2837
|
/**
|
|
2791
2838
|
* 添加移动目标到队列(带动画)
|
|
2792
2839
|
*/
|