@ray-js/robot-map-sdk 0.0.9-beta.4 → 0.0.10
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 +240 -3532
- package/dist/index.rjs.js +1 -1
- package/dist-app/assets/doubleBed-CzextF6m.png +0 -0
- package/dist-app/assets/{index-BkxuL7Hr.js → index-BzBtiwcY.js} +1 -1
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +3 -3
- package/dist-docs/assets/{app.DA8bJ57k.js → app.Dqj628zE.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.5wY6DA9h.js +1 -0
- package/dist-docs/assets/chunks/BitmapFont.BXsyt1Ko.js +4 -0
- package/dist-docs/assets/chunks/BufferResource.8pzc1eMm.js +155 -0
- package/dist-docs/assets/chunks/CanvasRenderer.DpOhlsYI.js +1 -0
- package/dist-docs/assets/chunks/RenderTargetSystem.CWKFKvEe.js +172 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.CV8Ea17T.js → VPLocalSearchBox.D1fbUxUi.js} +2 -2
- package/dist-docs/assets/chunks/WebGLRenderer.BlPSqrND.js +156 -0
- package/dist-docs/assets/chunks/WebGPURenderer.szL5hbKh.js +41 -0
- package/dist-docs/assets/chunks/browserAll.BxwMP9Gg.js +14 -0
- package/dist-docs/assets/chunks/framework.CBLqO2Q1.js +18 -0
- package/dist-docs/assets/chunks/index.nS-neZH_.js +744 -0
- package/dist-docs/assets/chunks/json-editor-vue.CBQvp8j1.js +3882 -0
- package/dist-docs/assets/chunks/mapValues.D2X8cRgC.js +1 -0
- package/dist-docs/assets/chunks/theme.B9FcKggM.js +4 -0
- package/dist-docs/assets/chunks/vanilla-picker.B6E6ObS_.js +8 -0
- package/dist-docs/assets/chunks/webworkerAll.BXgPGAoF.js +56 -0
- package/dist-docs/assets/doubleBed.CzextF6m.png +0 -0
- package/dist-docs/assets/{guide_advanced-usage.md.BQuNyTwG.js → guide_advanced-usage.md.COVLyRkA.js} +174 -3
- package/dist-docs/assets/guide_advanced-usage.md.COVLyRkA.lean.js +1 -0
- package/dist-docs/assets/{guide_concepts.md.DBFk-g-l.js → guide_concepts.md.CJ87tk-r.js} +1 -1
- package/dist-docs/assets/{guide_concepts.md.DBFk-g-l.lean.js → guide_concepts.md.CJ87tk-r.lean.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.DKybtQ2T.js → guide_getting-started.md.B8rkVqGP.js} +2 -2
- package/dist-docs/assets/guide_getting-started.md.B8rkVqGP.lean.js +1 -0
- package/dist-docs/assets/{guide_mcp.md.1UIpY4E0.js → guide_mcp.md.CabCiX8Z.js} +1 -1
- package/dist-docs/assets/{guide_mcp.md.1UIpY4E0.lean.js → guide_mcp.md.CabCiX8Z.lean.js} +1 -1
- package/dist-docs/assets/{index.md.Sm6vD2Gl.js → index.md.wTsFvv0N.js} +1 -1
- package/dist-docs/assets/{index.md.Sm6vD2Gl.lean.js → index.md.wTsFvv0N.lean.js} +1 -1
- package/dist-docs/assets/plans_2026-03-04-detected-objects-visibility-design.md.Dqboot5W.js +1 -0
- package/dist-docs/assets/plans_2026-03-04-detected-objects-visibility-design.md.Dqboot5W.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-04-show-detected-objects-implementation-plan.md.CDWwQtWj.js +34 -0
- package/dist-docs/assets/plans_2026-03-04-show-detected-objects-implementation-plan.md.CDWwQtWj.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-debug-design.md.BZibn7uw.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-debug-design.md.BZibn7uw.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-design.md.BVmEzCbR.js +8 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-design.md.BVmEzCbR.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-implementation-plan.md.S2f1zs9-.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-implementation-plan.md.S2f1zs9-.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-design.md.mqeNaYgg.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-design.md.mqeNaYgg.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-implementation-plan.md.BXG1UWFt.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-implementation-plan.md.BXG1UWFt.lean.js +1 -0
- package/dist-docs/assets/{records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BT3816jW.js → records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BbQpA41Y.js} +1 -1
- package/dist-docs/assets/{records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BT3816jW.lean.js → records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BbQpA41Y.lean.js} +1 -1
- package/dist-docs/assets/records_bugs_2026-03-10-events-drawer-toolbar-scroll-bugfix.md.DbHxPv4D.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-events-drawer-toolbar-scroll-bugfix.md.DbHxPv4D.lean.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-initial-render-layout-bugfix.md.w7--2hvH.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-initial-render-layout-bugfix.md.w7--2hvH.lean.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-wheel-scroll-leak-bugfix.md.B6gIem2P.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-wheel-scroll-leak-bugfix.md.B6gIem2P.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-02-furniture-feature-plan.md.CqSsyNDo.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-02-furniture-feature-plan.md.CqSsyNDo.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-events-console-plan.md.CfHLEHcc.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-events-console-plan.md.CfHLEHcc.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-last-successful-combo-cache-plan.md.Z2RoK239.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-last-successful-combo-cache-plan.md.Z2RoK239.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-parsed-view-plan.md.S9jPz75o.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-parsed-view-plan.md.S9jPz75o.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-playground-refactor-plan.md.BuILlmcV.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-playground-refactor-plan.md.BuILlmcV.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-playground-plan.md.CQAR-T7p.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-playground-plan.md.CQAR-T7p.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-runtime-controls-plan.md.DSVD-qCa.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-runtime-controls-plan.md.DSVD-qCa.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-implementation.md.FnB5Cx6R.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-implementation.md.FnB5Cx6R.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-plan.md.BBfaeRrq.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-plan.md.BBfaeRrq.lean.js +1 -0
- package/dist-docs/assets/{reference_callbacks.md.CZ8IiuH-.js → reference_callbacks.md.BIwuGR3s.js} +16 -2
- package/dist-docs/assets/reference_callbacks.md.BIwuGR3s.lean.js +1 -0
- package/dist-docs/assets/{reference_config.md.B0jHOsqG.js → reference_config.md.DHynhVxG.js} +24 -3
- package/dist-docs/assets/reference_config.md.DHynhVxG.lean.js +1 -0
- package/dist-docs/assets/{reference_data.md.DciSLVC8.js → reference_data.md.B_XpUFrn.js} +38 -2
- package/dist-docs/assets/reference_data.md.B_XpUFrn.lean.js +1 -0
- package/dist-docs/assets/{reference_methods.md.CEJFnJJg.js → reference_methods.md.eH-UCMbE.js} +29 -4
- package/dist-docs/assets/reference_methods.md.eH-UCMbE.lean.js +1 -0
- package/dist-docs/assets/{reference_runtime.md.BnT09w_m.js → reference_runtime.md.BEy8BhSZ.js} +3 -2
- package/dist-docs/assets/reference_runtime.md.BEy8BhSZ.lean.js +1 -0
- package/dist-docs/assets/{reference_types.md.CL_VFfB8.js → reference_types.md.hikiO8Cq.js} +27 -3
- package/dist-docs/assets/reference_types.md.hikiO8Cq.lean.js +1 -0
- package/dist-docs/assets/{reference_utils.md.CSshxnp0.js → reference_utils.md.Dy6XKVWh.js} +1 -1
- package/dist-docs/assets/{reference_utils.md.CSshxnp0.lean.js → reference_utils.md.Dy6XKVWh.lean.js} +1 -1
- package/dist-docs/assets/robot.CSiuukeH.png +0 -0
- package/dist-docs/assets/simulator_index.md.CF95Y_c9.js +1 -0
- package/dist-docs/assets/simulator_index.md.CF95Y_c9.lean.js +1 -0
- package/dist-docs/assets/sleep.CRKZ3XeQ.png +0 -0
- package/dist-docs/assets/sleep.C_YKDk6M.json +879 -0
- package/dist-docs/assets/{style.CN_tJoU2.css → style.DrlDtCux.css} +1 -1
- package/dist-docs/guide/advanced-usage.html +180 -9
- package/dist-docs/guide/concepts.html +7 -7
- package/dist-docs/guide/getting-started.html +7 -7
- package/dist-docs/guide/mcp.html +7 -7
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +7 -7
- package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +25 -0
- package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +58 -0
- package/dist-docs/plans/2026-03-10-simulator-debug-design.html +25 -0
- package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +32 -0
- package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +25 -0
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +25 -0
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +25 -0
- package/dist-docs/records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.html +7 -7
- package/dist-docs/records/bugs/2026-03-10-events-drawer-toolbar-scroll-bugfix.html +25 -0
- package/dist-docs/records/bugs/2026-03-10-simulator-initial-render-layout-bugfix.html +25 -0
- package/dist-docs/records/bugs/2026-03-10-simulator-wheel-scroll-leak-bugfix.html +25 -0
- package/dist-docs/records/plans/2026-03-02-furniture-feature-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-events-console-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-last-successful-combo-cache-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-map-parsed-view-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-map-playground-refactor-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-playground-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-runtime-controls-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-implementation.html +25 -0
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-plan.html +25 -0
- package/dist-docs/reference/callbacks.html +22 -8
- package/dist-docs/reference/config.html +30 -9
- package/dist-docs/reference/data.html +44 -8
- package/dist-docs/reference/methods.html +35 -10
- package/dist-docs/reference/runtime.html +9 -8
- package/dist-docs/reference/types.html +33 -9
- package/dist-docs/reference/utils.html +7 -7
- package/dist-docs/simulator/index.html +25 -0
- package/package.json +8 -4
- package/dist-docs/assets/chunks/@localSearchIndexroot.BjDx3m2d.js +0 -1
- package/dist-docs/assets/chunks/framework.DRADY2L-.js +0 -18
- package/dist-docs/assets/chunks/theme.DFdH6FXp.js +0 -2
- package/dist-docs/assets/guide_advanced-usage.md.BQuNyTwG.lean.js +0 -1
- package/dist-docs/assets/guide_getting-started.md.DKybtQ2T.lean.js +0 -1
- package/dist-docs/assets/reference_callbacks.md.CZ8IiuH-.lean.js +0 -1
- package/dist-docs/assets/reference_config.md.B0jHOsqG.lean.js +0 -1
- package/dist-docs/assets/reference_data.md.DciSLVC8.lean.js +0 -1
- package/dist-docs/assets/reference_methods.md.CEJFnJJg.lean.js +0 -1
- package/dist-docs/assets/reference_runtime.md.BnT09w_m.lean.js +0 -1
- package/dist-docs/assets/reference_types.md.CL_VFfB8.lean.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,46 +1,9 @@
|
|
|
1
|
-
import { AnimatedSprite } from 'pixi.js';
|
|
2
|
-
import { AppContainer as AppContainer_2 } from './AppContainer';
|
|
3
|
-
import { Application } from 'pixi.js';
|
|
4
1
|
import { ApplicationOptions } from 'pixi.js';
|
|
5
|
-
import { BackgroundGradient as BackgroundGradient_2 } from '..';
|
|
6
|
-
import { BackgroundImage as BackgroundImage_2 } from '..';
|
|
7
2
|
import { ColorSource } from 'pixi.js';
|
|
8
|
-
import { Container } from 'pixi.js';
|
|
9
|
-
import { ControlsConfig as ControlsConfig_2 } from '..';
|
|
10
|
-
import { ControlsManager } from '../managers/ControlsManager';
|
|
11
|
-
import { CustomElementsManager } from '../managers/CustomElementsManager';
|
|
12
|
-
import { DestroyOptions } from 'pixi.js';
|
|
13
|
-
import { DetectedObjectManager } from '../managers/DetectedObjectManager';
|
|
14
|
-
import { DividerConfig as DividerConfig_2 } from '..';
|
|
15
|
-
import { EditControlManager } from '../managers/EditControlManager';
|
|
16
|
-
import { Emitter } from 'mitt';
|
|
17
|
-
import { FederatedPointerEvent } from 'pixi.js';
|
|
18
|
-
import { Graphics } from 'pixi.js';
|
|
19
|
-
import { HeatmapManager } from '../managers/HeatmapManager';
|
|
20
|
-
import { Interaction } from './Interaction';
|
|
21
|
-
import { MapCallbacks as MapCallbacks_2 } from '..';
|
|
22
|
-
import { MapData } from '@ray-js/robot-protocol';
|
|
23
|
-
import { MapHeader } from '@ray-js/robot-protocol';
|
|
24
|
-
import { MapManager } from '../managers/MapManager';
|
|
25
|
-
import { MapState as MapState_2 } from '..';
|
|
26
|
-
import { MeasurementUnit as MeasurementUnit_2 } from '..';
|
|
27
|
-
import { ParsedRasterMapData as ParsedRasterMapData_2 } from '@ray-js/robot-protocol';
|
|
28
|
-
import { PathData } from '@ray-js/robot-protocol';
|
|
29
|
-
import { PathManager } from '../managers/PathManager';
|
|
30
|
-
import { Point as Point_2 } from '..';
|
|
31
3
|
import { Rectangle } from 'pixi.js';
|
|
32
|
-
import { RingConfig as RingConfig_2 } from '..';
|
|
33
|
-
import { RoomData as RoomData_2 } from '..';
|
|
34
|
-
import { RoomManager } from '../managers/RoomManager';
|
|
35
|
-
import { RuntimeConfig as RuntimeConfig_2 } from '..';
|
|
36
4
|
import { SPECIAL_ROOM_IDS } from '@ray-js/robot-protocol';
|
|
37
5
|
import { SpecialRoomId } from '@ray-js/robot-protocol';
|
|
38
|
-
import { Sprite } from 'pixi.js';
|
|
39
|
-
import { StructuredMapDataSource } from '@ray-js/robot-protocol';
|
|
40
6
|
import { TextStyleFontWeight } from 'pixi.js';
|
|
41
|
-
import { Texture } from 'pixi.js';
|
|
42
|
-
import { Ticker } from 'pixi.js';
|
|
43
|
-
import { ViewportContainer as ViewportContainer_2 } from './ViewportContainer';
|
|
44
7
|
|
|
45
8
|
/**
|
|
46
9
|
* 地图静态配置
|
|
@@ -536,6 +499,9 @@ export declare type AppConfig = {
|
|
|
536
499
|
/** 控制元素配置 */
|
|
537
500
|
controls: ControlsConfig
|
|
538
501
|
|
|
502
|
+
/** 家具配置 */
|
|
503
|
+
furniture: FurnitureConfig
|
|
504
|
+
|
|
539
505
|
/** 分割线配置 */
|
|
540
506
|
divider: DividerConfig
|
|
541
507
|
|
|
@@ -570,89 +536,6 @@ export declare type AppConfig = {
|
|
|
570
536
|
}
|
|
571
537
|
}
|
|
572
538
|
|
|
573
|
-
/**
|
|
574
|
-
* AppContainer 同时作为应用的主容器和层级管理器
|
|
575
|
-
* 管理所有地图相关的层级和组件
|
|
576
|
-
*/
|
|
577
|
-
declare class AppContainer extends Container {
|
|
578
|
-
private appService;
|
|
579
|
-
private layers;
|
|
580
|
-
private mapRotation;
|
|
581
|
-
private backgroundGraphics;
|
|
582
|
-
private lastBackgroundState;
|
|
583
|
-
constructor(appService: AppService);
|
|
584
|
-
/**
|
|
585
|
-
* 初始化所有预定义的层级
|
|
586
|
-
*/
|
|
587
|
-
private initializeLayers;
|
|
588
|
-
/**
|
|
589
|
-
* 获取指定名称的层容器
|
|
590
|
-
* @param name 层名称
|
|
591
|
-
* @returns 对应的容器,如果不存在则返回undefined
|
|
592
|
-
*/
|
|
593
|
-
getLayer(name: LayerName): Container | undefined;
|
|
594
|
-
/**
|
|
595
|
-
* 向指定层添加元素
|
|
596
|
-
* @param name 层名称
|
|
597
|
-
* @param element 要添加的元素
|
|
598
|
-
* @param zIndex 可选的元素z索引
|
|
599
|
-
* @returns 是否添加成功
|
|
600
|
-
*/
|
|
601
|
-
addToLayer(name: LayerName, element: Container, zIndex?: number): boolean;
|
|
602
|
-
/**
|
|
603
|
-
* 从指定层移除元素
|
|
604
|
-
* @param name 层名称
|
|
605
|
-
* @param element 要移除的元素
|
|
606
|
-
* @returns 是否移除成功
|
|
607
|
-
*/
|
|
608
|
-
removeFromLayer(name: LayerName, element: Container): boolean;
|
|
609
|
-
/**
|
|
610
|
-
* 清空指定层的所有内容
|
|
611
|
-
* @param name 层名称
|
|
612
|
-
* @returns 是否清空成功
|
|
613
|
-
*/
|
|
614
|
-
clearLayer(name: LayerName): boolean;
|
|
615
|
-
/**
|
|
616
|
-
* 设置指定层的可见性
|
|
617
|
-
* @param name 层名称
|
|
618
|
-
* @param visible 是否可见
|
|
619
|
-
* @returns 是否设置成功
|
|
620
|
-
*/
|
|
621
|
-
setLayerVisibility(name: LayerName, visible: boolean): boolean;
|
|
622
|
-
/**
|
|
623
|
-
* 获取指定层的可见性
|
|
624
|
-
* @param name 层名称
|
|
625
|
-
* @returns 层的可见性状态,不存在则返回false
|
|
626
|
-
*/
|
|
627
|
-
getLayerVisibility(name: LayerName): boolean;
|
|
628
|
-
/**
|
|
629
|
-
* 设置地图旋转角度
|
|
630
|
-
* @param angle 旋转角度(度数)
|
|
631
|
-
*/
|
|
632
|
-
setMapRotation(angle: number): void;
|
|
633
|
-
/**
|
|
634
|
-
* 获取当前地图旋转角度
|
|
635
|
-
* @returns 旋转角度(度数)
|
|
636
|
-
*/
|
|
637
|
-
getMapRotation(): number;
|
|
638
|
-
/**
|
|
639
|
-
* 获取当前地图旋转弧度
|
|
640
|
-
* @returns 旋转角度(弧度)
|
|
641
|
-
*/
|
|
642
|
-
getMapRotationRadians(): number;
|
|
643
|
-
/**
|
|
644
|
-
* 获取用于截图的完整边界
|
|
645
|
-
* 会合并所有可见图层的局部边界,确保截图能覆盖所有内容(包括超出初始地图范围的禁区等)
|
|
646
|
-
*/
|
|
647
|
-
getSnapshotBounds(): Rectangle;
|
|
648
|
-
/**
|
|
649
|
-
* 更新截图背景(主渲染器显示版本)
|
|
650
|
-
* @param color 背景颜色
|
|
651
|
-
* @param visible 是否可见
|
|
652
|
-
*/
|
|
653
|
-
updateBackground(color: ColorSource, visible: boolean): void;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
539
|
/**
|
|
657
540
|
* 应用程序选项配置
|
|
658
541
|
* 包含事件回调、配置和运行时状态
|
|
@@ -666,422 +549,6 @@ export declare type AppOptions = {
|
|
|
666
549
|
runtime: DeepPartialRuntimeConfig
|
|
667
550
|
}
|
|
668
551
|
|
|
669
|
-
declare class AppService {
|
|
670
|
-
private app;
|
|
671
|
-
constructor(app: MapApplication);
|
|
672
|
-
getApp(): MapApplication;
|
|
673
|
-
getConfig(): AppConfig;
|
|
674
|
-
/**
|
|
675
|
-
* 获取调试模式
|
|
676
|
-
* @returns 是否为调试模式
|
|
677
|
-
*/
|
|
678
|
-
getDebuggerMode(): boolean;
|
|
679
|
-
getRoomData(roomId: number): RoomData_2 | undefined;
|
|
680
|
-
/**
|
|
681
|
-
* 将米转换为像素(委托给 MapApplication)
|
|
682
|
-
*/
|
|
683
|
-
metersToPixels(meters: number): number;
|
|
684
|
-
/**
|
|
685
|
-
* 将像素转换为米(委托给 MapApplication)
|
|
686
|
-
*/
|
|
687
|
-
pixelsToMeters(pixels: number): number;
|
|
688
|
-
/**
|
|
689
|
-
* 将米转换为配置的单位
|
|
690
|
-
* @param meters - 米数值
|
|
691
|
-
* @returns 转换后的数值
|
|
692
|
-
*/
|
|
693
|
-
metersToDisplayUnit(meters: number): number;
|
|
694
|
-
get ticker(): Ticker;
|
|
695
|
-
get mapState(): MapState_2 | null;
|
|
696
|
-
get isMapDrawn(): boolean;
|
|
697
|
-
get config(): AppConfig;
|
|
698
|
-
get gloalConfig(): {
|
|
699
|
-
containerTop: string;
|
|
700
|
-
containerLeft: string;
|
|
701
|
-
containerWidth: string;
|
|
702
|
-
containerHeight: string;
|
|
703
|
-
backgroundColor?: ColorSource;
|
|
704
|
-
backgroundGradient?: BackgroundGradient_2;
|
|
705
|
-
backgroundImage?: BackgroundImage_2;
|
|
706
|
-
backgroundAlpha: number;
|
|
707
|
-
performanceMode: boolean;
|
|
708
|
-
resolution: number;
|
|
709
|
-
enableLogger: boolean;
|
|
710
|
-
};
|
|
711
|
-
get mapConfig(): {
|
|
712
|
-
autoPaddingVerticalPercent: number;
|
|
713
|
-
autoPaddingHorizontalPercent: number;
|
|
714
|
-
adjacencyThreshold: number;
|
|
715
|
-
originChangeAutoFitThreshold: number;
|
|
716
|
-
sizeChangeAutoFitThreshold: number;
|
|
717
|
-
obstacleColor: ColorSource;
|
|
718
|
-
freeColor: ColorSource;
|
|
719
|
-
autoFitOffset?: {
|
|
720
|
-
x: number;
|
|
721
|
-
y: number;
|
|
722
|
-
};
|
|
723
|
-
};
|
|
724
|
-
get roomConfig(): {
|
|
725
|
-
colors: {
|
|
726
|
-
sortBy: "index" | "area";
|
|
727
|
-
strategy: "priority" | "balanced";
|
|
728
|
-
active: string[];
|
|
729
|
-
inactive: string[];
|
|
730
|
-
normal?: string[];
|
|
731
|
-
name: string[];
|
|
732
|
-
nameInactive?: string[];
|
|
733
|
-
nameNormal?: string[];
|
|
734
|
-
propertyTheme: string[];
|
|
735
|
-
propertyThemeInactive?: string[];
|
|
736
|
-
propertyThemeNormal?: string[];
|
|
737
|
-
selectionIndicatorBackground: string[];
|
|
738
|
-
selectionIndicatorIcon: string[];
|
|
739
|
-
NO_ROOM_DATA: string;
|
|
740
|
-
ROOM_GAP: string;
|
|
741
|
-
OBSTACLE_ROOM: string;
|
|
742
|
-
UNKNOWN_ROOM: string;
|
|
743
|
-
VERSION0_ROOM: string;
|
|
744
|
-
};
|
|
745
|
-
nameLabel: {
|
|
746
|
-
fontSize: number;
|
|
747
|
-
fontFamily: string;
|
|
748
|
-
fontWeight: TextStyleFontWeight;
|
|
749
|
-
};
|
|
750
|
-
type: {
|
|
751
|
-
assets: string[];
|
|
752
|
-
iconSize: number;
|
|
753
|
-
gap: number;
|
|
754
|
-
position: "left" | "right";
|
|
755
|
-
container: {
|
|
756
|
-
visible: boolean;
|
|
757
|
-
size: number;
|
|
758
|
-
borderRadius: number;
|
|
759
|
-
};
|
|
760
|
-
};
|
|
761
|
-
property: {
|
|
762
|
-
displayOrders: ("cleanMode" | "suction" | "cistern" | "cleanTimes" | string)[];
|
|
763
|
-
iconWidth: number;
|
|
764
|
-
iconHeight: number;
|
|
765
|
-
foldable: boolean;
|
|
766
|
-
offsetX: number;
|
|
767
|
-
offsetY: number;
|
|
768
|
-
iconGap: number;
|
|
769
|
-
container: {
|
|
770
|
-
backgroundColor: ColorSource;
|
|
771
|
-
paddingVertical: number;
|
|
772
|
-
paddingHorizontal: number;
|
|
773
|
-
borderRadius: number;
|
|
774
|
-
tailHeight: number;
|
|
775
|
-
tailWidth: number;
|
|
776
|
-
};
|
|
777
|
-
suction: {
|
|
778
|
-
assets: string[];
|
|
779
|
-
};
|
|
780
|
-
cistern: {
|
|
781
|
-
assets: string[];
|
|
782
|
-
};
|
|
783
|
-
cleanMode: {
|
|
784
|
-
assets: string[];
|
|
785
|
-
};
|
|
786
|
-
cleanTimes: {
|
|
787
|
-
assets: string[];
|
|
788
|
-
};
|
|
789
|
-
cleanOrder: {
|
|
790
|
-
color: ColorSource | "auto";
|
|
791
|
-
fontFamily: string;
|
|
792
|
-
fontWeight: TextStyleFontWeight;
|
|
793
|
-
fontSize: number;
|
|
794
|
-
gapRight: number;
|
|
795
|
-
};
|
|
796
|
-
customAssets?: Record<string, string[]>;
|
|
797
|
-
};
|
|
798
|
-
selectionIndicator: {
|
|
799
|
-
iconSrc: string;
|
|
800
|
-
iconWidth: number;
|
|
801
|
-
iconHeight: number;
|
|
802
|
-
containerWidth: number;
|
|
803
|
-
containerHeight: number;
|
|
804
|
-
strokeWidth: number;
|
|
805
|
-
strokeColor: ColorSource | "auto";
|
|
806
|
-
borderRadius: number;
|
|
807
|
-
offsetX: number;
|
|
808
|
-
offsetY: number;
|
|
809
|
-
tailHeight: number;
|
|
810
|
-
tailWidth: number;
|
|
811
|
-
};
|
|
812
|
-
floorType: {
|
|
813
|
-
assets: string[];
|
|
814
|
-
opacity: number;
|
|
815
|
-
scale: number;
|
|
816
|
-
};
|
|
817
|
-
enableElasticScale: boolean;
|
|
818
|
-
elasticMinScale: number;
|
|
819
|
-
elasticMaxScale: number;
|
|
820
|
-
};
|
|
821
|
-
get heatMapConfig(): {
|
|
822
|
-
cellSize: number;
|
|
823
|
-
maxDistance: number;
|
|
824
|
-
smoothIterations: number;
|
|
825
|
-
heatmapAlpha: number;
|
|
826
|
-
useGradient: boolean;
|
|
827
|
-
colorGradients: [ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource];
|
|
828
|
-
};
|
|
829
|
-
get pathConfig(): {
|
|
830
|
-
lineWidthFixed: boolean;
|
|
831
|
-
incrementalThreshold: number;
|
|
832
|
-
commonPath: {
|
|
833
|
-
visible: boolean;
|
|
834
|
-
color: ColorSource;
|
|
835
|
-
width: number;
|
|
836
|
-
};
|
|
837
|
-
transitionPath: {
|
|
838
|
-
visible: boolean;
|
|
839
|
-
color: ColorSource;
|
|
840
|
-
width: number;
|
|
841
|
-
};
|
|
842
|
-
chargePath: {
|
|
843
|
-
visible: boolean;
|
|
844
|
-
color: ColorSource;
|
|
845
|
-
width: number;
|
|
846
|
-
};
|
|
847
|
-
mopPath: {
|
|
848
|
-
lineVisible: boolean;
|
|
849
|
-
lineColor: ColorSource;
|
|
850
|
-
lineWidth: number;
|
|
851
|
-
trackVisible: boolean;
|
|
852
|
-
trackColor: ColorSource;
|
|
853
|
-
trackAlpha: number;
|
|
854
|
-
trackWidth: number;
|
|
855
|
-
};
|
|
856
|
-
};
|
|
857
|
-
get carpetConfig(): {
|
|
858
|
-
src: string;
|
|
859
|
-
opacity: number;
|
|
860
|
-
scale: number;
|
|
861
|
-
material?: {
|
|
862
|
-
type: number;
|
|
863
|
-
src: string;
|
|
864
|
-
opacity: number;
|
|
865
|
-
scale: number;
|
|
866
|
-
}[];
|
|
867
|
-
enableEdit?: boolean;
|
|
868
|
-
};
|
|
869
|
-
get robotConfig(): {
|
|
870
|
-
icon: {
|
|
871
|
-
sizeFixed: boolean;
|
|
872
|
-
width: number;
|
|
873
|
-
height: number;
|
|
874
|
-
src: string;
|
|
875
|
-
};
|
|
876
|
-
speed: number;
|
|
877
|
-
rotationCorrection: number;
|
|
878
|
-
sleepAnimation: {
|
|
879
|
-
jsonSrc: string;
|
|
880
|
-
imageSrc: string;
|
|
881
|
-
framePrefix: string;
|
|
882
|
-
width: number;
|
|
883
|
-
height: number;
|
|
884
|
-
sizeFixed: boolean;
|
|
885
|
-
frameCount: number;
|
|
886
|
-
offsetX: number;
|
|
887
|
-
offsetY: number;
|
|
888
|
-
};
|
|
889
|
-
pulseCircle: {
|
|
890
|
-
size: number;
|
|
891
|
-
color: ColorSource;
|
|
892
|
-
strokeWidth: number;
|
|
893
|
-
strokeColor: ColorSource;
|
|
894
|
-
duration: number;
|
|
895
|
-
sizeFixed: boolean;
|
|
896
|
-
minScale: number;
|
|
897
|
-
maxScale: number;
|
|
898
|
-
minAlpha: number;
|
|
899
|
-
maxAlpha: number;
|
|
900
|
-
};
|
|
901
|
-
ring: RingConfig_2;
|
|
902
|
-
};
|
|
903
|
-
get chargingStationConfig(): {
|
|
904
|
-
icon: {
|
|
905
|
-
sizeFixed: boolean;
|
|
906
|
-
width: number;
|
|
907
|
-
height: number;
|
|
908
|
-
src: string;
|
|
909
|
-
};
|
|
910
|
-
rotationCorrection: number;
|
|
911
|
-
ring: RingConfig_2;
|
|
912
|
-
};
|
|
913
|
-
get interactionConfig(): {
|
|
914
|
-
zoomRange: {
|
|
915
|
-
min: number;
|
|
916
|
-
max: number;
|
|
917
|
-
};
|
|
918
|
-
fitMinScale: number;
|
|
919
|
-
fitMaxScale: number;
|
|
920
|
-
enable: boolean;
|
|
921
|
-
enableDoubleTapZoom: boolean;
|
|
922
|
-
enableRobotClick?: boolean;
|
|
923
|
-
enableChargingStationClick?: boolean;
|
|
924
|
-
};
|
|
925
|
-
get controlsConfig(): ControlsConfig_2;
|
|
926
|
-
get dividerConfig(): DividerConfig_2;
|
|
927
|
-
get detectedObjectConfig(): {
|
|
928
|
-
height: number;
|
|
929
|
-
width: number;
|
|
930
|
-
interactive: boolean;
|
|
931
|
-
anchor: Point_2;
|
|
932
|
-
};
|
|
933
|
-
get snapshotConfig(): {
|
|
934
|
-
format: "png" | "jpg" | "webp";
|
|
935
|
-
quality: number;
|
|
936
|
-
antialias: boolean;
|
|
937
|
-
resolution: number;
|
|
938
|
-
};
|
|
939
|
-
get appContainer(): AppContainer_2;
|
|
940
|
-
get interaction(): Interaction;
|
|
941
|
-
get viewportContainer(): ViewportContainer_2;
|
|
942
|
-
get mapManager(): MapManager;
|
|
943
|
-
get pathManager(): PathManager;
|
|
944
|
-
get heatmapManager(): HeatmapManager;
|
|
945
|
-
get controlsManager(): ControlsManager;
|
|
946
|
-
get detectedObjectManager(): DetectedObjectManager;
|
|
947
|
-
get customElementsManager(): CustomElementsManager;
|
|
948
|
-
get roomsManager(): RoomManager;
|
|
949
|
-
get editControlManager(): EditControlManager;
|
|
950
|
-
get runtime(): RuntimeConfig_2;
|
|
951
|
-
get runtimeSnapshot(): {
|
|
952
|
-
readonly dividingRoomId: number;
|
|
953
|
-
readonly enableRoomSelection: boolean;
|
|
954
|
-
readonly enableInteraction: boolean;
|
|
955
|
-
readonly enableMapClickCapture: boolean;
|
|
956
|
-
readonly editingForbiddenSweepZoneIds: readonly string[];
|
|
957
|
-
readonly editingForbiddenMopZoneIds: readonly string[];
|
|
958
|
-
readonly editingCleanZoneIds: readonly string[];
|
|
959
|
-
readonly editingVirtualWallIds: readonly string[];
|
|
960
|
-
readonly editingSpotIds: readonly string[];
|
|
961
|
-
readonly editingWayPointIds: readonly string[];
|
|
962
|
-
readonly editingCarpetIds: readonly string[];
|
|
963
|
-
readonly mapRotation: number;
|
|
964
|
-
readonly roomPropertyFoldIds: readonly number[];
|
|
965
|
-
readonly roomSelectionMode: "checkmark" | "order";
|
|
966
|
-
readonly showRoomName: boolean;
|
|
967
|
-
readonly showRoomType: boolean;
|
|
968
|
-
readonly unit: MeasurementUnit_2;
|
|
969
|
-
readonly unitLabel: string;
|
|
970
|
-
readonly showRoomProperty: boolean;
|
|
971
|
-
readonly showRoomOrder: boolean;
|
|
972
|
-
readonly showPath: boolean;
|
|
973
|
-
readonly showRobot: boolean;
|
|
974
|
-
readonly showChargingStation: boolean;
|
|
975
|
-
readonly showRoomFloorType: boolean;
|
|
976
|
-
readonly showCarpet: boolean;
|
|
977
|
-
readonly selectRoomIds: readonly number[];
|
|
978
|
-
readonly showChargingStationRing: boolean;
|
|
979
|
-
readonly showRobotRing: boolean;
|
|
980
|
-
readonly showRobotSleepAnimation: boolean;
|
|
981
|
-
readonly showRobotPulseCircle: boolean;
|
|
982
|
-
readonly selectedCarpetIds: readonly string[];
|
|
983
|
-
};
|
|
984
|
-
/**
|
|
985
|
-
* 检查是否启用交互
|
|
986
|
-
* 供其他组件使用,用于判断是否应该响应交互事件
|
|
987
|
-
* @returns 是否启用交互
|
|
988
|
-
*/
|
|
989
|
-
isInteractionEnabled(): boolean;
|
|
990
|
-
/**
|
|
991
|
-
* 修复浮点数精度误差
|
|
992
|
-
* @param value 数字、点或点数组
|
|
993
|
-
* @param precision 保留小数位数,默认 2
|
|
994
|
-
*/
|
|
995
|
-
fixPrecision<T>(value: T, precision?: number): T;
|
|
996
|
-
get events(): MapCallbacks_2 | undefined;
|
|
997
|
-
get baseScale(): number;
|
|
998
|
-
get currentScale(): number;
|
|
999
|
-
get emitter(): Emitter< {
|
|
1000
|
-
antiScale: number;
|
|
1001
|
-
gestureHijackStart: FederatedPointerEvent;
|
|
1002
|
-
gestureHijackPointerMove: FederatedPointerEvent;
|
|
1003
|
-
gestureHijackPointerUp: FederatedPointerEvent;
|
|
1004
|
-
gestureHijackCancel: void;
|
|
1005
|
-
gestureHijackEnd: void;
|
|
1006
|
-
suppressMapClick: void;
|
|
1007
|
-
robotPositionUpdate: {
|
|
1008
|
-
x: number;
|
|
1009
|
-
y: number;
|
|
1010
|
-
pathType?: string;
|
|
1011
|
-
};
|
|
1012
|
-
robotAnimationComplete: void;
|
|
1013
|
-
pathSegmentComplete: {
|
|
1014
|
-
fromX: number;
|
|
1015
|
-
fromY: number;
|
|
1016
|
-
toX: number;
|
|
1017
|
-
toY: number;
|
|
1018
|
-
pathType?: string;
|
|
1019
|
-
};
|
|
1020
|
-
mapRotationUpdate: number;
|
|
1021
|
-
}>;
|
|
1022
|
-
/**
|
|
1023
|
-
* 获取充电桩位置(机器坐标系)
|
|
1024
|
-
* @returns 充电桩位置坐标,如果地图未初始化则返回 null
|
|
1025
|
-
*/
|
|
1026
|
-
getChargerPosition(): {
|
|
1027
|
-
x: number;
|
|
1028
|
-
y: number;
|
|
1029
|
-
} | null;
|
|
1030
|
-
/**
|
|
1031
|
-
* 获取机器人当前位置(机器坐标系)
|
|
1032
|
-
* @returns 机器人位置坐标,如果路径未绘制或机器人位置不可用则返回 null
|
|
1033
|
-
*/
|
|
1034
|
-
getRobotPosition(): {
|
|
1035
|
-
x: number;
|
|
1036
|
-
y: number;
|
|
1037
|
-
} | null;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
/**
|
|
1041
|
-
* 背景组件
|
|
1042
|
-
* 支持纯色背景、渐变背景和图片背景
|
|
1043
|
-
* 优先级:图片背景 > 渐变背景 > 纯色背景
|
|
1044
|
-
*/
|
|
1045
|
-
declare class Background extends Container {
|
|
1046
|
-
private graphics;
|
|
1047
|
-
private sprite;
|
|
1048
|
-
private viewportBounds;
|
|
1049
|
-
private lastConfig;
|
|
1050
|
-
private onImageLoaded?;
|
|
1051
|
-
constructor(config: AppConfig['global'], viewportBounds: {
|
|
1052
|
-
width: number;
|
|
1053
|
-
height: number;
|
|
1054
|
-
}, onImageLoaded?: () => void);
|
|
1055
|
-
/**
|
|
1056
|
-
* 渲染背景(根据优先级)
|
|
1057
|
-
*/
|
|
1058
|
-
private render;
|
|
1059
|
-
/**
|
|
1060
|
-
* 清空背景内容
|
|
1061
|
-
*/
|
|
1062
|
-
private clear;
|
|
1063
|
-
/**
|
|
1064
|
-
* 渲染纯色背景
|
|
1065
|
-
*/
|
|
1066
|
-
private renderSolidColor;
|
|
1067
|
-
/**
|
|
1068
|
-
* 渲染渐变背景
|
|
1069
|
-
*/
|
|
1070
|
-
private renderGradient;
|
|
1071
|
-
/**
|
|
1072
|
-
* 渲染图片背景
|
|
1073
|
-
*/
|
|
1074
|
-
private renderImage;
|
|
1075
|
-
/**
|
|
1076
|
-
* 动态更新背景配置
|
|
1077
|
-
*/
|
|
1078
|
-
update(config: AppConfig['global']): Promise<void>;
|
|
1079
|
-
/**
|
|
1080
|
-
* 销毁组件
|
|
1081
|
-
*/
|
|
1082
|
-
destroy(): void;
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
552
|
/**
|
|
1086
553
|
* 渐变背景配置
|
|
1087
554
|
*/
|
|
@@ -1120,50 +587,6 @@ export declare type BackgroundImage = {
|
|
|
1120
587
|
repeat?: boolean
|
|
1121
588
|
}
|
|
1122
589
|
|
|
1123
|
-
declare abstract class BaseControlButton<T extends BaseControlButtonOptions = BaseControlButtonOptions> extends FixedSizeContainer {
|
|
1124
|
-
protected appService: AppService;
|
|
1125
|
-
protected background: Graphics;
|
|
1126
|
-
protected icon: EnhancedSprite;
|
|
1127
|
-
protected options: T;
|
|
1128
|
-
constructor(appService: AppService, options: T);
|
|
1129
|
-
/**
|
|
1130
|
-
* 抽象方法:子类需要实现具体的事件监听逻辑
|
|
1131
|
-
*/
|
|
1132
|
-
protected abstract setupEvents(): void;
|
|
1133
|
-
/**
|
|
1134
|
-
* 设置点击热区
|
|
1135
|
-
*/
|
|
1136
|
-
private setupHitArea;
|
|
1137
|
-
/**
|
|
1138
|
-
* 渲染按钮
|
|
1139
|
-
*/
|
|
1140
|
-
private render;
|
|
1141
|
-
/**
|
|
1142
|
-
* 渲染背景
|
|
1143
|
-
*/
|
|
1144
|
-
protected renderBackground(): void;
|
|
1145
|
-
/**
|
|
1146
|
-
* 渲染图标
|
|
1147
|
-
*/
|
|
1148
|
-
protected renderIcon(): Promise<void>;
|
|
1149
|
-
/**
|
|
1150
|
-
* 销毁组件
|
|
1151
|
-
*/
|
|
1152
|
-
destroy(): void;
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
declare type BaseControlButtonOptions = {
|
|
1156
|
-
iconAlias: string;
|
|
1157
|
-
backgroundColor: ColorSource;
|
|
1158
|
-
config?: {
|
|
1159
|
-
iconWrapperWidth: number;
|
|
1160
|
-
iconWrapperHeight: number;
|
|
1161
|
-
iconWrapperBorderRadius: number;
|
|
1162
|
-
iconWidth: number;
|
|
1163
|
-
iconHeight: number;
|
|
1164
|
-
};
|
|
1165
|
-
};
|
|
1166
|
-
|
|
1167
590
|
/**
|
|
1168
591
|
* 基础自定义元素参数(所有类型共享)
|
|
1169
592
|
*/
|
|
@@ -1247,96 +670,27 @@ export declare type Bounds = {
|
|
|
1247
670
|
maxY: number
|
|
1248
671
|
}
|
|
1249
672
|
|
|
1250
|
-
declare class Carpet extends Container {
|
|
1251
|
-
private appService;
|
|
1252
|
-
private carpetSprite;
|
|
1253
|
-
private carpetMask;
|
|
1254
|
-
constructor(appService: AppService);
|
|
1255
|
-
/**
|
|
1256
|
-
* 创建地毯纹理覆盖(栅格数据)
|
|
1257
|
-
* @param carpetPixels 地毯像素数据
|
|
1258
|
-
* @param mapWidth 地图宽度
|
|
1259
|
-
*/
|
|
1260
|
-
createCarpetFromRasterData(carpetPixels: Uint32Array, mapWidth: number): Promise<void>;
|
|
1261
|
-
/**
|
|
1262
|
-
* 创建地毯的Graphics作为mask
|
|
1263
|
-
* @param carpetPixels 地毯像素数据
|
|
1264
|
-
* @param mapWidth 地图宽度
|
|
1265
|
-
* @returns Graphics对象
|
|
1266
|
-
*/
|
|
1267
|
-
private createCarpetGraphics;
|
|
1268
|
-
/**
|
|
1269
|
-
* 清除地毯
|
|
1270
|
-
*/
|
|
1271
|
-
clearCarpet(): void;
|
|
1272
|
-
/**
|
|
1273
|
-
* 创建地毯纹理覆盖(结构化数据)
|
|
1274
|
-
* @param carpetData 结构化地毯数据数组
|
|
1275
|
-
*/
|
|
1276
|
-
createCarpetFromStructuredData(carpetData: Array<{
|
|
1277
|
-
coordinates: number[];
|
|
1278
|
-
}>): Promise<void>;
|
|
1279
|
-
/**
|
|
1280
|
-
* 创建地毯的Graphics作为mask(结构化数据)
|
|
1281
|
-
* @param carpetData 结构化地毯数据数组
|
|
1282
|
-
* @returns Graphics对象
|
|
1283
|
-
*/
|
|
1284
|
-
private createCarpetGraphicsFromStructuredData;
|
|
1285
|
-
/**
|
|
1286
|
-
* 销毁时清理资源
|
|
1287
|
-
*/
|
|
1288
|
-
destroy(): void;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
673
|
/** 地毯配置 */
|
|
1292
674
|
export declare type CarpetConfig = BaseZoneConfig & {
|
|
1293
675
|
/** 是否开启自由旋转模式 */
|
|
1294
676
|
enableFreeRotate: boolean
|
|
1295
677
|
}
|
|
1296
678
|
|
|
1297
|
-
declare type CarpetOptions = {
|
|
1298
|
-
appService: AppService;
|
|
1299
|
-
carpetData: CustomCarpetParam;
|
|
1300
|
-
textureMap: Map<number, Texture>;
|
|
1301
|
-
events?: CustomCarpetEvents;
|
|
1302
|
-
};
|
|
1303
|
-
|
|
1304
|
-
declare class ChargingStation extends Container {
|
|
1305
|
-
private appService;
|
|
1306
|
-
chargingStation: ChargingStationIcon;
|
|
1307
|
-
ring: Ring;
|
|
1308
|
-
private unsubscribeFns;
|
|
1309
|
-
private clickHandler?;
|
|
1310
|
-
constructor(appService: AppService);
|
|
1311
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
1312
|
-
/**
|
|
1313
|
-
* 初始化点击处理器状态
|
|
1314
|
-
* 根据静态配置启用充电桩点击交互
|
|
1315
|
-
*/
|
|
1316
|
-
private initClickInteraction;
|
|
1317
|
-
destroy(): void;
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
declare class ChargingStationIcon extends EnhancedSprite {
|
|
1321
|
-
protected appService: AppService;
|
|
1322
|
-
constructor(appService: AppService);
|
|
1323
|
-
initializeSprite(): Promise<void>;
|
|
1324
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
679
|
/** 组件属性类型 */
|
|
1328
680
|
export declare type ComponentPropsApp = {
|
|
1329
681
|
/** 地图应用实例 */
|
|
1330
|
-
app:
|
|
682
|
+
app: MapApplicationInstance
|
|
1331
683
|
}
|
|
1332
684
|
|
|
1333
|
-
/**
|
|
1334
|
-
declare type
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
685
|
+
/** 控制层内可排序元素 */
|
|
686
|
+
export declare type ControlRenderItem =
|
|
687
|
+
| 'forbiddenSweepZone'
|
|
688
|
+
| 'forbiddenMopZone'
|
|
689
|
+
| 'cleanZone'
|
|
690
|
+
| 'virtualWall'
|
|
691
|
+
| 'spot'
|
|
692
|
+
| 'wayPoint'
|
|
693
|
+
| 'divider'
|
|
1340
694
|
|
|
1341
695
|
/**
|
|
1342
696
|
* 控制元素配置
|
|
@@ -1372,6 +726,8 @@ export declare type ControlsConfig = {
|
|
|
1372
726
|
textFontFamily: string
|
|
1373
727
|
/** 文本字体粗细 */
|
|
1374
728
|
textFontWeight: TextStyleFontWeight
|
|
729
|
+
/** 控制层内部渲染顺序(从下到上) */
|
|
730
|
+
renderOrder: ControlRenderItem[]
|
|
1375
731
|
/** 禁扫区域配置 */
|
|
1376
732
|
forbiddenSweepZone: ZoneConfig
|
|
1377
733
|
/** 禁拖区域配置 */
|
|
@@ -1387,491 +743,20 @@ export declare type ControlsConfig = {
|
|
|
1387
743
|
wayPoint: WayPointConfig
|
|
1388
744
|
}
|
|
1389
745
|
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
1405
|
-
/**
|
|
1406
|
-
* 绘制扫地禁区
|
|
1407
|
-
*/
|
|
1408
|
-
drawForbiddenSweepZones(zones: ZoneParam[]): void;
|
|
1409
|
-
/**
|
|
1410
|
-
* 获取所有扫地禁区数据
|
|
1411
|
-
*/
|
|
1412
|
-
getForbiddenSweepZones(): ZoneParam[];
|
|
1413
|
-
/**
|
|
1414
|
-
* 清除所有扫地禁区
|
|
1415
|
-
*/
|
|
1416
|
-
clearAllForbiddenSweepZones(): void;
|
|
1417
|
-
/**
|
|
1418
|
-
* 绘制拖地禁区
|
|
1419
|
-
*/
|
|
1420
|
-
drawForbiddenMopZones(zones: ZoneParam[]): void;
|
|
1421
|
-
/**
|
|
1422
|
-
* 获取所有拖地禁区数据
|
|
1423
|
-
*/
|
|
1424
|
-
getForbiddenMopZones(): ZoneParam[];
|
|
1425
|
-
/**
|
|
1426
|
-
* 清除所有拖地禁区
|
|
1427
|
-
*/
|
|
1428
|
-
clearAllForbiddenMopZones(): void;
|
|
1429
|
-
/**
|
|
1430
|
-
* 绘制清扫区域
|
|
1431
|
-
*/
|
|
1432
|
-
drawCleanZones(zones: ZoneParam[]): void;
|
|
1433
|
-
/**
|
|
1434
|
-
* 获取所有清扫区域数据
|
|
1435
|
-
*/
|
|
1436
|
-
getCleanZones(): ZoneParam[];
|
|
1437
|
-
/**
|
|
1438
|
-
* 清除所有清扫区域
|
|
1439
|
-
*/
|
|
1440
|
-
clearAllCleanZones(): void;
|
|
1441
|
-
/**
|
|
1442
|
-
* 绘制虚拟墙
|
|
1443
|
-
*/
|
|
1444
|
-
drawVirtualWalls(walls: VirtualWallParam[]): void;
|
|
1445
|
-
/**
|
|
1446
|
-
* 获取所有虚拟墙数据
|
|
1447
|
-
*/
|
|
1448
|
-
getVirtualWalls(): VirtualWallParam[];
|
|
1449
|
-
/**
|
|
1450
|
-
* 清除所有虚拟墙
|
|
1451
|
-
*/
|
|
1452
|
-
clearAllVirtualWalls(): void;
|
|
1453
|
-
/**
|
|
1454
|
-
* 绘制定点清扫
|
|
1455
|
-
*/
|
|
1456
|
-
drawSpots(spots: SpotParam[]): void;
|
|
1457
|
-
/**
|
|
1458
|
-
* 获取所有定点清扫数据
|
|
1459
|
-
*/
|
|
1460
|
-
getSpots(): SpotParam[];
|
|
1461
|
-
/**
|
|
1462
|
-
* 清除所有定点清扫
|
|
1463
|
-
*/
|
|
1464
|
-
clearAllSpots(): void;
|
|
1465
|
-
/**
|
|
1466
|
-
* 通用的绘制区域方法
|
|
1467
|
-
*/
|
|
1468
|
-
private drawZones;
|
|
1469
|
-
/**
|
|
1470
|
-
* 添加新区域到 LAYER_CONTROLS
|
|
1471
|
-
*/
|
|
1472
|
-
private addNewZone;
|
|
1473
|
-
/**
|
|
1474
|
-
* 移除区域
|
|
1475
|
-
*/
|
|
1476
|
-
private removeZone;
|
|
1477
|
-
/**
|
|
1478
|
-
* 获取区域数据
|
|
1479
|
-
*/
|
|
1480
|
-
private getZonesData;
|
|
1481
|
-
/**
|
|
1482
|
-
* 清除所有区域
|
|
1483
|
-
*/
|
|
1484
|
-
private clearAllZones;
|
|
1485
|
-
/**
|
|
1486
|
-
* 更新区域编辑状态
|
|
1487
|
-
*/
|
|
1488
|
-
private updateZonesEditState;
|
|
1489
|
-
/**
|
|
1490
|
-
* 更新虚拟墙编辑状态
|
|
1491
|
-
*/
|
|
1492
|
-
private updateVirtualWallsEditState;
|
|
1493
|
-
/**
|
|
1494
|
-
* 比较两个区域数据是否相等
|
|
1495
|
-
*/
|
|
1496
|
-
private isZoneDataEqual;
|
|
1497
|
-
/**
|
|
1498
|
-
* 获取虚拟墙数据
|
|
1499
|
-
*/
|
|
1500
|
-
private getWallsData;
|
|
1501
|
-
/**
|
|
1502
|
-
* 清除所有虚拟墙
|
|
1503
|
-
*/
|
|
1504
|
-
private clearAllWalls;
|
|
1505
|
-
/**
|
|
1506
|
-
* 比较两个虚拟墙是否相同
|
|
1507
|
-
*/
|
|
1508
|
-
private isWallDataEqual;
|
|
1509
|
-
/**
|
|
1510
|
-
* 添加新定点清扫到 LAYER_CONTROLS
|
|
1511
|
-
*/
|
|
1512
|
-
private addNewSpot;
|
|
1513
|
-
/**
|
|
1514
|
-
* 移除定点清扫
|
|
1515
|
-
*/
|
|
1516
|
-
private removeSpot;
|
|
1517
|
-
/**
|
|
1518
|
-
* 获取定点清扫数据
|
|
1519
|
-
*/
|
|
1520
|
-
private getSpotsData;
|
|
1521
|
-
/**
|
|
1522
|
-
* 清除所有定点清扫
|
|
1523
|
-
*/
|
|
1524
|
-
private clearAllSpotsInternal;
|
|
1525
|
-
/**
|
|
1526
|
-
* 更新定点清扫编辑状态
|
|
1527
|
-
*/
|
|
1528
|
-
private updateSpotsEditState;
|
|
1529
|
-
/**
|
|
1530
|
-
* 比较两个定点清扫数据是否相等
|
|
1531
|
-
*/
|
|
1532
|
-
private isSpotDataEqual;
|
|
1533
|
-
/**
|
|
1534
|
-
* 绘制途径点
|
|
1535
|
-
* @param wayPoints 途径点数组
|
|
1536
|
-
*/
|
|
1537
|
-
drawWayPoints(wayPoints: WayPointParam[]): void;
|
|
1538
|
-
/**
|
|
1539
|
-
* 清除所有途径点
|
|
1540
|
-
*/
|
|
1541
|
-
clearAllWayPoints(): void;
|
|
1542
|
-
/**
|
|
1543
|
-
* 获取所有途径点数据
|
|
1544
|
-
*/
|
|
1545
|
-
getWayPoints(): WayPointParam[];
|
|
1546
|
-
/**
|
|
1547
|
-
* 添加新途径点到 LAYER_CONTROLS
|
|
1548
|
-
*/
|
|
1549
|
-
private addNewWayPoint;
|
|
1550
|
-
/**
|
|
1551
|
-
* 移除途径点
|
|
1552
|
-
*/
|
|
1553
|
-
private removeWayPoint;
|
|
1554
|
-
/**
|
|
1555
|
-
* 获取途径点数据
|
|
1556
|
-
*/
|
|
1557
|
-
private getWayPointsData;
|
|
1558
|
-
/**
|
|
1559
|
-
* 清除所有途径点
|
|
1560
|
-
*/
|
|
1561
|
-
private clearAllWayPointsInternal;
|
|
1562
|
-
/**
|
|
1563
|
-
* 更新途径点编辑状态
|
|
1564
|
-
*/
|
|
1565
|
-
private updateWayPointsEditState;
|
|
1566
|
-
/**
|
|
1567
|
-
* 比较两个途径点数据是否相等
|
|
1568
|
-
*/
|
|
1569
|
-
private isWayPointDataEqual;
|
|
1570
|
-
/**
|
|
1571
|
-
* 处理分割房间ID变化
|
|
1572
|
-
*/
|
|
1573
|
-
private handleDividingRoomIdChange;
|
|
1574
|
-
/**
|
|
1575
|
-
* 获取房间几何信息
|
|
1576
|
-
*/
|
|
1577
|
-
private getRoomGeometry;
|
|
1578
|
-
/**
|
|
1579
|
-
* 创建默认分割线
|
|
1580
|
-
*/
|
|
1581
|
-
private createDefaultDivider;
|
|
1582
|
-
/**
|
|
1583
|
-
* 清除分割线
|
|
1584
|
-
*/
|
|
1585
|
-
private clearDivider;
|
|
1586
|
-
/**
|
|
1587
|
-
* 获取分割线数据
|
|
1588
|
-
*/
|
|
1589
|
-
getDividerEndPoints(): Point[] | null;
|
|
1590
|
-
/**
|
|
1591
|
-
* 获取分割线有效端点
|
|
1592
|
-
*/
|
|
1593
|
-
getEffectiveDividerPoints(): Point[] | null;
|
|
1594
|
-
/**
|
|
1595
|
-
* 处理单位变化
|
|
1596
|
-
* 当 unit 或 unitLabel 改变时,刷新所有显示尺寸的组件
|
|
1597
|
-
*/
|
|
1598
|
-
private handleUnitChange;
|
|
1599
|
-
/**
|
|
1600
|
-
* 销毁管理器
|
|
1601
|
-
*/
|
|
1602
|
-
destroy(): void;
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
declare class CustomCarpet extends Container {
|
|
1606
|
-
private carpetData;
|
|
1607
|
-
private carpetConfig;
|
|
1608
|
-
private controlsConfig;
|
|
1609
|
-
private carpetEvents;
|
|
1610
|
-
private appService;
|
|
1611
|
-
private controlFill;
|
|
1612
|
-
private editControlLayer;
|
|
1613
|
-
private clickHandler;
|
|
1614
|
-
private maskContainer;
|
|
1615
|
-
private maskGraphics;
|
|
1616
|
-
private texture;
|
|
1617
|
-
private textureMap;
|
|
1618
|
-
private tilingSprite;
|
|
1619
|
-
private initialZonePoints;
|
|
1620
|
-
private unsubscribeFns;
|
|
1621
|
-
constructor(options: CarpetOptions);
|
|
1622
|
-
/**
|
|
1623
|
-
* 处理地毯数据(点集合)
|
|
1624
|
-
*/
|
|
1625
|
-
private processCarpetData;
|
|
1626
|
-
/**
|
|
1627
|
-
* 获取控制元素配置
|
|
1628
|
-
*/
|
|
1629
|
-
private getControlsConfig;
|
|
1630
|
-
/**
|
|
1631
|
-
* 获取当前编辑状态(是否在 editingCarpetIds 中)
|
|
1632
|
-
*/
|
|
1633
|
-
private isEditingEnabled;
|
|
1634
|
-
/**
|
|
1635
|
-
* 获取当前选中状态(是否在 selectedCarpetIds 中)
|
|
1636
|
-
*/
|
|
1637
|
-
private isSelected;
|
|
1638
|
-
/**
|
|
1639
|
-
* 是否应该显示编辑框(在 editingCarpetIds 或 selectedCarpetIds 中)
|
|
1640
|
-
*/
|
|
1641
|
-
private shouldShowEditControl;
|
|
1642
|
-
/**
|
|
1643
|
-
* 初始化组件
|
|
1644
|
-
*/
|
|
1645
|
-
private initializeComponents;
|
|
1646
|
-
/**
|
|
1647
|
-
* 创建遮罩容器(用于地毯纹理)
|
|
1648
|
-
*/
|
|
1649
|
-
private createMaskContainer;
|
|
1650
|
-
/**
|
|
1651
|
-
* 创建控制填充组件
|
|
1652
|
-
*/
|
|
1653
|
-
private createControlFill;
|
|
1654
|
-
/**
|
|
1655
|
-
* 创建编辑控制层(通过 EditControlManager)
|
|
1656
|
-
*/
|
|
1657
|
-
private createEditControlLayer;
|
|
1658
|
-
/**
|
|
1659
|
-
* 设置点击处理器(用于非编辑状态下的点击)
|
|
1660
|
-
*/
|
|
1661
|
-
private setupClickHandler;
|
|
1662
|
-
/**
|
|
1663
|
-
* 设置 enableRoomSelection 监听器
|
|
1664
|
-
*/
|
|
1665
|
-
private setupEnableRoomSelectionListener;
|
|
1666
|
-
/**
|
|
1667
|
-
* 检查是否启用了房间选择模式
|
|
1668
|
-
*/
|
|
1669
|
-
private isRoomSelectionEnabled;
|
|
1670
|
-
/**
|
|
1671
|
-
* 更新点击处理器状态
|
|
1672
|
-
*/
|
|
1673
|
-
private updateClickHandlerState;
|
|
1674
|
-
/**
|
|
1675
|
-
* 计算地毯边界
|
|
1676
|
-
*/
|
|
1677
|
-
private calculateBounds;
|
|
1678
|
-
/**
|
|
1679
|
-
* 计算自定义形状的外接矩形点集
|
|
1680
|
-
*/
|
|
1681
|
-
private calculateBoundingRectanglePoints;
|
|
1682
|
-
/**
|
|
1683
|
-
* 更新遮罩形状
|
|
1684
|
-
*/
|
|
1685
|
-
private updateMaskShape;
|
|
1686
|
-
/**
|
|
1687
|
-
* 异步加载地毯纹理
|
|
1688
|
-
*/
|
|
1689
|
-
private loadTexture;
|
|
1690
|
-
/**
|
|
1691
|
-
* 创建平铺纹理精灵
|
|
1692
|
-
*/
|
|
1693
|
-
private createTilingSprite;
|
|
1694
|
-
/**
|
|
1695
|
-
* 更新平铺纹理位置和大小
|
|
1696
|
-
*/
|
|
1697
|
-
private updateTilingSprite;
|
|
1698
|
-
/**
|
|
1699
|
-
* 处理拖拽开始
|
|
1700
|
-
*/
|
|
1701
|
-
private handleDragStart;
|
|
1702
|
-
/**
|
|
1703
|
-
* 处理拖拽移动
|
|
1704
|
-
*/
|
|
1705
|
-
private handleDragMove;
|
|
1706
|
-
private handleDragEnd;
|
|
1707
|
-
private handleMoveStart;
|
|
1708
|
-
/**
|
|
1709
|
-
* 处理移动过程
|
|
1710
|
-
*/
|
|
1711
|
-
private handleMove;
|
|
1712
|
-
/**
|
|
1713
|
-
* 处理移动结束
|
|
1714
|
-
*/
|
|
1715
|
-
private handleMoveEnd;
|
|
1716
|
-
/**
|
|
1717
|
-
* 应用平移变换(拖拽和移动的公共方法)
|
|
1718
|
-
*/
|
|
1719
|
-
private applyTranslation;
|
|
1720
|
-
/**
|
|
1721
|
-
* 处理旋转开始
|
|
1722
|
-
*/
|
|
1723
|
-
private handleRotationStart;
|
|
1724
|
-
/**
|
|
1725
|
-
* 处理旋转移动
|
|
1726
|
-
*/
|
|
1727
|
-
private handleRotationMove;
|
|
1728
|
-
/**
|
|
1729
|
-
* 处理旋转结束
|
|
1730
|
-
*/
|
|
1731
|
-
private handleRotationEnd;
|
|
1732
|
-
/**
|
|
1733
|
-
* 处理缩放开始
|
|
1734
|
-
*/
|
|
1735
|
-
private handleScaleStart;
|
|
1736
|
-
/**
|
|
1737
|
-
* 处理缩放移动
|
|
1738
|
-
*/
|
|
1739
|
-
private handleScaleMove;
|
|
1740
|
-
/**
|
|
1741
|
-
* 处理水平缩放移动
|
|
1742
|
-
*/
|
|
1743
|
-
private handleScaleMoveHorizontal;
|
|
1744
|
-
/**
|
|
1745
|
-
* 处理垂直缩放移动
|
|
1746
|
-
*/
|
|
1747
|
-
private handleScaleMoveVertical;
|
|
1748
|
-
/**
|
|
1749
|
-
* 处理缩放结束
|
|
1750
|
-
*/
|
|
1751
|
-
private handleScaleEnd;
|
|
1752
|
-
/**
|
|
1753
|
-
* 处理删除操作
|
|
1754
|
-
*/
|
|
1755
|
-
private handleDelete;
|
|
1756
|
-
/**
|
|
1757
|
-
* 处理点击事件
|
|
1758
|
-
*/
|
|
1759
|
-
private handleClick;
|
|
1760
|
-
/**
|
|
1761
|
-
* 处理点集更新
|
|
1762
|
-
*/
|
|
1763
|
-
private handlePointsUpdate;
|
|
1764
|
-
/**
|
|
1765
|
-
* 绘制地毯
|
|
1766
|
-
*/
|
|
1767
|
-
private drawCarpet;
|
|
1768
|
-
/**
|
|
1769
|
-
* 更新编辑状态(公共方法)
|
|
1770
|
-
*/
|
|
1771
|
-
updateEditState(): void;
|
|
1772
|
-
/**
|
|
1773
|
-
* 更新地毯数据
|
|
1774
|
-
*/
|
|
1775
|
-
updateCarpetData(newData: CustomCarpetParam): void;
|
|
1776
|
-
/**
|
|
1777
|
-
* 获取当前地毯数据
|
|
1778
|
-
*/
|
|
1779
|
-
getCarpetData(): CustomCarpetParam;
|
|
1780
|
-
/**
|
|
1781
|
-
* 刷新显示(用于单位变化等场景)
|
|
1782
|
-
*/
|
|
1783
|
-
refreshDisplay(): void;
|
|
1784
|
-
/**
|
|
1785
|
-
* 销毁组件
|
|
1786
|
-
*/
|
|
1787
|
-
destroy(): void;
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
declare type CustomCarpetEvents = {
|
|
1791
|
-
onRemove?: (id: string) => void;
|
|
1792
|
-
onUpdate?: (zone: CustomCarpetParam) => void;
|
|
1793
|
-
onClick?: (zone: CustomCarpetParam) => void;
|
|
1794
|
-
};
|
|
1795
|
-
|
|
1796
|
-
declare class CustomCarpetManager {
|
|
1797
|
-
private appService;
|
|
1798
|
-
private customCarpetMap;
|
|
1799
|
-
private unsubscribeFns;
|
|
1800
|
-
private textureMap;
|
|
1801
|
-
private texturesLoaded;
|
|
1802
|
-
private texturesLoadingPromise;
|
|
1803
|
-
constructor(appService: AppService);
|
|
1804
|
-
/**
|
|
1805
|
-
* 加载材质纹理
|
|
1806
|
-
* 如果已经加载过,直接返回已完成的 Promise
|
|
1807
|
-
* 如果正在加载,返回正在进行的 Promise
|
|
1808
|
-
* 如果未加载,开始加载并返回 Promise
|
|
1809
|
-
*/
|
|
1810
|
-
loadTextures(): Promise<void>;
|
|
1811
|
-
/**
|
|
1812
|
-
* 内部方法:实际加载纹理
|
|
1813
|
-
*/
|
|
1814
|
-
private _loadTextures;
|
|
1815
|
-
/**
|
|
1816
|
-
* 根据地图原点更新所有自定义地毯位置
|
|
1817
|
-
*/
|
|
1818
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
1819
|
-
/**
|
|
1820
|
-
* 绘制自定义地毯
|
|
1821
|
-
*/
|
|
1822
|
-
drawCustomCarpets(carpets: CustomCarpetParam[]): Promise<void>;
|
|
1823
|
-
/**
|
|
1824
|
-
* 获取所有自定义地毯数据
|
|
1825
|
-
*/
|
|
1826
|
-
getCustomCarpets(): CustomCarpetParam[];
|
|
1827
|
-
/**
|
|
1828
|
-
* 根据 ID 获取自定义地毯
|
|
1829
|
-
*/
|
|
1830
|
-
getCustomCarpetById(id: string): CustomCarpet | undefined;
|
|
1831
|
-
/**
|
|
1832
|
-
* 清除所有自定义地毯
|
|
1833
|
-
*/
|
|
1834
|
-
clearAllCustomCarpets(): void;
|
|
1835
|
-
/**
|
|
1836
|
-
* 添加新自定义地毯到 LAYER_CUSTOM_CARPET
|
|
1837
|
-
*/
|
|
1838
|
-
private addNewCustomCarpet;
|
|
1839
|
-
/**
|
|
1840
|
-
* 移除自定义地毯
|
|
1841
|
-
*/
|
|
1842
|
-
private removeCustomCarpet;
|
|
1843
|
-
/**
|
|
1844
|
-
* 更新自定义地毯编辑状态
|
|
1845
|
-
*/
|
|
1846
|
-
private updateCarpetsEditState;
|
|
1847
|
-
/**
|
|
1848
|
-
* 比较两个地毯数据是否相等
|
|
1849
|
-
*/
|
|
1850
|
-
private isCarpetDataEqual;
|
|
1851
|
-
/**
|
|
1852
|
-
* 刷新显示(单位变化时调用)
|
|
1853
|
-
*/
|
|
1854
|
-
refreshDisplay(): void;
|
|
1855
|
-
/**
|
|
1856
|
-
* 销毁管理器
|
|
1857
|
-
*/
|
|
1858
|
-
destroy(): void;
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
/** 自定义地毯参数 */
|
|
1862
|
-
export declare type CustomCarpetParam = {
|
|
1863
|
-
/** 地毯ID */
|
|
1864
|
-
id: string
|
|
1865
|
-
/** 地毯材质 */
|
|
1866
|
-
type: number
|
|
1867
|
-
/** 点集合(用于矩形和圆形) */
|
|
1868
|
-
points?: Point[]
|
|
1869
|
-
|
|
1870
|
-
/** 形状 */
|
|
1871
|
-
shape: 'rectangle' | 'round' | 'custom'
|
|
1872
|
-
|
|
1873
|
-
/** 自定义数据 */
|
|
1874
|
-
customData?: Record<string, any>
|
|
746
|
+
/** 自定义地毯参数 */
|
|
747
|
+
export declare type CustomCarpetParam = {
|
|
748
|
+
/** 地毯ID */
|
|
749
|
+
id: string
|
|
750
|
+
/** 地毯材质 */
|
|
751
|
+
type: number
|
|
752
|
+
/** 点集合(用于矩形和圆形) */
|
|
753
|
+
points?: Point[]
|
|
754
|
+
|
|
755
|
+
/** 形状 */
|
|
756
|
+
shape: 'rectangle' | 'round' | 'custom'
|
|
757
|
+
|
|
758
|
+
/** 自定义数据 */
|
|
759
|
+
customData?: Record<string, any>
|
|
1875
760
|
}
|
|
1876
761
|
|
|
1877
762
|
/**
|
|
@@ -1882,62 +767,6 @@ export declare type CustomElementParam =
|
|
|
1882
767
|
| GifCustomElementParam
|
|
1883
768
|
| HtmlCustomElementParam
|
|
1884
769
|
|
|
1885
|
-
declare class CustomElementsManager_2 {
|
|
1886
|
-
private appService;
|
|
1887
|
-
private customElementsMap;
|
|
1888
|
-
private gifTicker;
|
|
1889
|
-
private gifElements;
|
|
1890
|
-
constructor(appService: AppService);
|
|
1891
|
-
/**
|
|
1892
|
-
* 根据地图原点更新所有自定义元素位置
|
|
1893
|
-
*/
|
|
1894
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
1895
|
-
/**
|
|
1896
|
-
* 绘制自定义元素
|
|
1897
|
-
*/
|
|
1898
|
-
drawCustomElements(elements: CustomElementParam[]): Promise<void>;
|
|
1899
|
-
/**
|
|
1900
|
-
* 清除所有自定义元素
|
|
1901
|
-
*/
|
|
1902
|
-
clearAllCustomElements(): void;
|
|
1903
|
-
/**
|
|
1904
|
-
* 添加新的自定义元素
|
|
1905
|
-
*/
|
|
1906
|
-
private addNewCustomElement;
|
|
1907
|
-
/**
|
|
1908
|
-
* 移除自定义元素
|
|
1909
|
-
*/
|
|
1910
|
-
private removeCustomElement;
|
|
1911
|
-
/**
|
|
1912
|
-
* 检查数据是否相同(类型安全的辅助方法)
|
|
1913
|
-
*/
|
|
1914
|
-
private isSameData;
|
|
1915
|
-
/**
|
|
1916
|
-
* 更新元素数据(类型安全的辅助方法)
|
|
1917
|
-
*/
|
|
1918
|
-
private updateElementData;
|
|
1919
|
-
/**
|
|
1920
|
-
* 更新 GIF Ticker 状态
|
|
1921
|
-
*/
|
|
1922
|
-
private updateGifTicker;
|
|
1923
|
-
/**
|
|
1924
|
-
* 启动 GIF Ticker
|
|
1925
|
-
*/
|
|
1926
|
-
private startGifTicker;
|
|
1927
|
-
/**
|
|
1928
|
-
* 停止 GIF Ticker
|
|
1929
|
-
*/
|
|
1930
|
-
private stopGifTicker;
|
|
1931
|
-
/**
|
|
1932
|
-
* 渲染 GIF 容器
|
|
1933
|
-
*/
|
|
1934
|
-
private renderGifContainer;
|
|
1935
|
-
/**
|
|
1936
|
-
* 销毁管理器
|
|
1937
|
-
*/
|
|
1938
|
-
destroy(): void;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
770
|
/**
|
|
1942
771
|
* 解析结构化协议的地图房间属性
|
|
1943
772
|
* @param map 地图数据
|
|
@@ -1963,36 +792,6 @@ export declare type DeepPartialAppConfig = DeepPartial<AppConfig>
|
|
|
1963
792
|
/** 深度可选的运行时配置类型 */
|
|
1964
793
|
export declare type DeepPartialRuntimeConfig = DeepPartial<RuntimeConfig>
|
|
1965
794
|
|
|
1966
|
-
declare class DetectedObjectManager_2 {
|
|
1967
|
-
private appService;
|
|
1968
|
-
private detectedObjectMap;
|
|
1969
|
-
constructor(appService: AppService);
|
|
1970
|
-
/**
|
|
1971
|
-
* 根据地图原点更新所有检测物体位置
|
|
1972
|
-
*/
|
|
1973
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
1974
|
-
/**
|
|
1975
|
-
* 绘制检测物体
|
|
1976
|
-
*/
|
|
1977
|
-
drawDetectedObjects(objects: DetectedObjectParam[]): Promise<void>;
|
|
1978
|
-
/**
|
|
1979
|
-
* 清除所有检测物体
|
|
1980
|
-
*/
|
|
1981
|
-
clearAllDetectedObjects(): void;
|
|
1982
|
-
/**
|
|
1983
|
-
* 添加新的检测物体
|
|
1984
|
-
*/
|
|
1985
|
-
private addNewDetectedObject;
|
|
1986
|
-
/**
|
|
1987
|
-
* 移除检测物体
|
|
1988
|
-
*/
|
|
1989
|
-
private removeDetectedObject;
|
|
1990
|
-
/**
|
|
1991
|
-
* 销毁管理器
|
|
1992
|
-
*/
|
|
1993
|
-
destroy(): void;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
795
|
/**
|
|
1997
796
|
* 检测物体参数
|
|
1998
797
|
*/
|
|
@@ -2045,730 +844,89 @@ export declare type DividerConfig = {
|
|
|
2045
844
|
defaultDirection: Direction
|
|
2046
845
|
}
|
|
2047
846
|
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
847
|
+
/** 家具素材配置 */
|
|
848
|
+
export declare type FurnitureAsset = {
|
|
849
|
+
/** 家具类型编号,匹配 FurnitureParam.furnitureType */
|
|
850
|
+
type: number
|
|
851
|
+
/** 图片 URL */
|
|
852
|
+
src: string
|
|
853
|
+
/** 默认宽度 (米,用于生成初始 points,内部根据 resolution 转换为像素) */
|
|
854
|
+
width: number
|
|
855
|
+
/** 默认高度 (米,用于生成初始 points,内部根据 resolution 转换为像素) */
|
|
856
|
+
height: number
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/** 家具配置 */
|
|
860
|
+
export declare type FurnitureConfig = {
|
|
861
|
+
/** 家具素材列表 */
|
|
862
|
+
assets: FurnitureAsset[]
|
|
863
|
+
/** 全局透明度 (0-1, 默认 1) */
|
|
864
|
+
opacity: number
|
|
865
|
+
/** 图标容器填充颜色 */
|
|
866
|
+
iconWrapperFillColor: ColorSource
|
|
867
|
+
/** 轮廓偏移 */
|
|
868
|
+
outlineOffset: number
|
|
869
|
+
/** 轮廓描边颜色 */
|
|
870
|
+
outlineStrokeColor: ColorSource
|
|
871
|
+
/** 轮廓描边宽度 */
|
|
872
|
+
outlineStrokeWidth: number
|
|
873
|
+
/** 轮廓填充颜色 */
|
|
874
|
+
outlineFillColor: ColorSource
|
|
875
|
+
/** 轮廓是否虚线 */
|
|
876
|
+
outlineDashed: boolean
|
|
877
|
+
/** 轮廓虚线数组 */
|
|
878
|
+
outlineDashArray: [number, number]
|
|
879
|
+
/** 是否显示尺寸文本 */
|
|
880
|
+
showSizeText: boolean
|
|
881
|
+
/** 文本颜色 */
|
|
882
|
+
textColor: ColorSource
|
|
883
|
+
/** 文本位置 */
|
|
884
|
+
textPosition: 'top' | 'right' | 'bottom' | 'left'
|
|
885
|
+
/** 文本偏移 */
|
|
886
|
+
textOffset: number
|
|
887
|
+
/** 缩放按钮允许的最小缩放倍数 (相对初始尺寸, 默认 0.5; 设为 0 表示不限制最小) */
|
|
888
|
+
minScaleRatio: number
|
|
889
|
+
/** 缩放按钮允许的最大缩放倍数 (相对初始尺寸, 默认 2; 设为 Infinity 表示不限制最大) */
|
|
890
|
+
maxScaleRatio: number
|
|
891
|
+
/** 点击旋转方向: 'cw' 顺时针 | 'ccw' 逆时针 (默认 'cw') */
|
|
892
|
+
rotateDirection: 'cw' | 'ccw'
|
|
893
|
+
}
|
|
2069
894
|
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
onScaleMoveVertical?: (newPoints?: Point[]) => void;
|
|
2080
|
-
onScaleEnd?: () => void;
|
|
2081
|
-
onMoveStart?: () => void;
|
|
2082
|
-
onMoveMove?: (event: FederatedPointerEvent) => void;
|
|
2083
|
-
onMoveEnd?: () => void;
|
|
2084
|
-
onClick?: () => void;
|
|
2085
|
-
onPointsUpdate?: (newPoints: Point[]) => void;
|
|
2086
|
-
};
|
|
895
|
+
/** 家具参数 */
|
|
896
|
+
export declare type FurnitureParam = {
|
|
897
|
+
/** 家具ID */
|
|
898
|
+
id: string
|
|
899
|
+
/** 家具类型编号,匹配 config.furniture.assets 中的 type */
|
|
900
|
+
furnitureType: number
|
|
901
|
+
/** 四个顶点坐标 (顺时针: 左上→右上→右下→左下) */
|
|
902
|
+
points: Point[]
|
|
903
|
+
}
|
|
2087
904
|
|
|
2088
905
|
/**
|
|
2089
|
-
*
|
|
2090
|
-
*
|
|
906
|
+
* GIF 类型自定义元素参数
|
|
907
|
+
* 保持现有逻辑
|
|
2091
908
|
*/
|
|
2092
|
-
declare
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
private rotationCache;
|
|
2102
|
-
private outlineBorder;
|
|
2103
|
-
private moveLine;
|
|
2104
|
-
private sizeText;
|
|
2105
|
-
private controlButtons;
|
|
2106
|
-
private deleteButton;
|
|
2107
|
-
private rotateButton;
|
|
2108
|
-
private scaleButton;
|
|
2109
|
-
private moveButton;
|
|
2110
|
-
private horizontalScaleButton;
|
|
2111
|
-
private verticalScaleButton;
|
|
2112
|
-
private horizontalScaleInitialPosition;
|
|
2113
|
-
private verticalScaleInitialPosition;
|
|
2114
|
-
private clickHandler;
|
|
2115
|
-
private throttledUpdateOutline;
|
|
2116
|
-
constructor(appService: AppService, options: EditControlLayerOptions);
|
|
2117
|
-
/**
|
|
2118
|
-
* 初始化组件
|
|
2119
|
-
*/
|
|
2120
|
-
private initializeComponents;
|
|
2121
|
-
/**
|
|
2122
|
-
* 创建轮廓边框
|
|
2123
|
-
*/
|
|
2124
|
-
private createOutlineBorder;
|
|
2125
|
-
/**
|
|
2126
|
-
* 创建移动按钮延长线
|
|
2127
|
-
*/
|
|
2128
|
-
private createMoveLine;
|
|
2129
|
-
/**
|
|
2130
|
-
* 创建尺寸文本
|
|
2131
|
-
*/
|
|
2132
|
-
private createSizeText;
|
|
2133
|
-
private createDeleteButton;
|
|
2134
|
-
private createRotateButton;
|
|
2135
|
-
private onClickRotateButton;
|
|
2136
|
-
private createScaleButton;
|
|
2137
|
-
private createHorizontalScaleButton;
|
|
2138
|
-
private createVerticalScaleButton;
|
|
2139
|
-
private createMoveButton;
|
|
2140
|
-
/**
|
|
2141
|
-
* 创建并添加按钮到容器
|
|
2142
|
-
*/
|
|
2143
|
-
private createAndAddButton;
|
|
2144
|
-
/**
|
|
2145
|
-
* 创建控制按钮
|
|
2146
|
-
*/
|
|
2147
|
-
private createControlButtons;
|
|
2148
|
-
/**
|
|
2149
|
-
* 计算轮廓边框的点
|
|
2150
|
-
*/
|
|
2151
|
-
private calculateOutlinePoints;
|
|
2152
|
-
/**
|
|
2153
|
-
* 计算移动按钮的位置(在 MOVE 点的延长线上)
|
|
2154
|
-
* 使用角平分线算法计算按钮位置,使其位于 MOVE、SCALE、REMOVE 三个点形成的角的角平分线上
|
|
2155
|
-
*/
|
|
2156
|
-
private calculateMoveButtonPosition;
|
|
2157
|
-
/**
|
|
2158
|
-
* 计算移动按钮延长线的点
|
|
2159
|
-
* 返回从 MOVE 点到移动按钮位置的线段
|
|
2160
|
-
*/
|
|
2161
|
-
private calculateMoveLinePoints;
|
|
2162
|
-
/**
|
|
2163
|
-
* 计算区域尺寸文本(宽x高格式)
|
|
2164
|
-
*/
|
|
2165
|
-
private calculateSizeText;
|
|
2166
|
-
/**
|
|
2167
|
-
* 计算边的中点
|
|
2168
|
-
*/
|
|
2169
|
-
private getEdgeCenter;
|
|
2170
|
-
/**
|
|
2171
|
-
* 计算垂直于边的偏移方向
|
|
2172
|
-
* @param start 边的起点
|
|
2173
|
-
* @param end 边的终点
|
|
2174
|
-
* @param offset 偏移距离
|
|
2175
|
-
* @param reverseNormal 是否反转法向量方向(用于 bottom case)
|
|
2176
|
-
*/
|
|
2177
|
-
private calculatePerpendicularOffset;
|
|
2178
|
-
/**
|
|
2179
|
-
* 计算尺寸文本位置(基于textPosition)
|
|
2180
|
-
*/
|
|
2181
|
-
private calculateSizeTextPosition;
|
|
2182
|
-
/**
|
|
2183
|
-
* 计算尺寸文本旋转角度(与对应边平行)
|
|
2184
|
-
*/
|
|
2185
|
-
private calculateSizeTextRotation;
|
|
2186
|
-
/**
|
|
2187
|
-
* 计算水平缩放按钮旋转角度(与右侧边平行)
|
|
2188
|
-
*/
|
|
2189
|
-
private calculateHorizontalScaleButtonRotation;
|
|
2190
|
-
/**
|
|
2191
|
-
* 计算垂直缩放按钮旋转角度(与底边平行)
|
|
2192
|
-
*/
|
|
2193
|
-
private calculateVerticalScaleButtonRotation;
|
|
2194
|
-
/**
|
|
2195
|
-
* 更新点集(公共方法)
|
|
2196
|
-
* @param points 点集
|
|
2197
|
-
* @param updateText 是否更新文本
|
|
2198
|
-
*/
|
|
2199
|
-
updatePoints(points: Point[], updateText?: boolean): void;
|
|
2200
|
-
/**
|
|
2201
|
-
* 更新轮廓边框
|
|
2202
|
-
*/
|
|
2203
|
-
updateOutlineBorder(): void;
|
|
2204
|
-
/**
|
|
2205
|
-
* 更新移动按钮延长线
|
|
2206
|
-
*/
|
|
2207
|
-
updateMoveLine(): void;
|
|
2208
|
-
/**
|
|
2209
|
-
* 更新尺寸文本
|
|
2210
|
-
* @param updateText 是否更新文本内容
|
|
2211
|
-
*/
|
|
2212
|
-
updateSizeText(updateText?: boolean): void;
|
|
2213
|
-
/**
|
|
2214
|
-
* 更新尺寸文本位置
|
|
2215
|
-
*/
|
|
2216
|
-
updateSizeTextPosition(): void;
|
|
2217
|
-
/**
|
|
2218
|
-
* 更新控制按钮位置
|
|
2219
|
-
*/
|
|
2220
|
-
updateControlButtonsPosition(): void;
|
|
2221
|
-
/**
|
|
2222
|
-
* 设置点击处理器
|
|
2223
|
-
*/
|
|
2224
|
-
private setupClickHandler;
|
|
2225
|
-
/**
|
|
2226
|
-
* 注册缩放事件监听
|
|
2227
|
-
*/
|
|
2228
|
-
private registerScaleListener;
|
|
909
|
+
export declare type GifCustomElementParam = BaseCustomElementParam & {
|
|
910
|
+
/** 元素类型 */
|
|
911
|
+
type: 'gif'
|
|
912
|
+
/** GIF资源路径 */
|
|
913
|
+
src: string
|
|
914
|
+
/** GIF宽度(必需 - GIF 需要明确尺寸) */
|
|
915
|
+
width: number
|
|
916
|
+
/** GIF高度(必需 - GIF 需要明确尺寸) */
|
|
917
|
+
height: number
|
|
2229
918
|
/**
|
|
2230
|
-
*
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
*
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
/**
|
|
2238
|
-
* 处理内部缩放移动
|
|
2239
|
-
* @param deltaX X 方向的偏移量
|
|
2240
|
-
* @param deltaY Y 方向的偏移量
|
|
2241
|
-
* @returns 计算后的新点集,如果无法缩放则返回 null
|
|
2242
|
-
*/
|
|
2243
|
-
private handleInternalScaleMove;
|
|
2244
|
-
/**
|
|
2245
|
-
* 重置缩放状态
|
|
2246
|
-
*/
|
|
2247
|
-
private resetScaleState;
|
|
2248
|
-
/**
|
|
2249
|
-
* 处理内部水平缩放移动
|
|
2250
|
-
* @param deltaX X 方向的偏移量
|
|
2251
|
-
* @param deltaY Y 方向的偏移量
|
|
2252
|
-
* @returns 计算后的新点集,如果无法缩放则返回 null
|
|
2253
|
-
*/
|
|
2254
|
-
private handleInternalHorizontalScaleMove;
|
|
2255
|
-
/**
|
|
2256
|
-
* 处理内部垂直缩放移动
|
|
2257
|
-
* @param deltaX X 方向的偏移量
|
|
2258
|
-
* @param deltaY Y 方向的偏移量
|
|
2259
|
-
* @returns 计算后的新点集,如果无法缩放则返回 null
|
|
2260
|
-
*/
|
|
2261
|
-
private handleInternalVerticalScaleMove;
|
|
2262
|
-
/**
|
|
2263
|
-
* 根据缩放比例计算新的点集
|
|
2264
|
-
*/
|
|
2265
|
-
private calculatePointsFromScale;
|
|
2266
|
-
/**
|
|
2267
|
-
* 初始化旋转计算缓存
|
|
2268
|
-
*/
|
|
2269
|
-
private initializeRotationCache;
|
|
2270
|
-
/**
|
|
2271
|
-
* 处理内部旋转移动
|
|
2272
|
-
* 优化:基于初始点集和累计角度计算,避免累积误差
|
|
2273
|
-
* @returns 计算后的新点集,如果无法旋转则返回 null
|
|
2274
|
-
*/
|
|
2275
|
-
private handleInternalRotationMove;
|
|
2276
|
-
/**
|
|
2277
|
-
* 重置旋转状态
|
|
2278
|
-
*/
|
|
2279
|
-
private resetRotationState;
|
|
2280
|
-
/**
|
|
2281
|
-
* 计算旋转中心(用于点击旋转)
|
|
2282
|
-
*/
|
|
2283
|
-
private calculateRotationCenter;
|
|
2284
|
-
/**
|
|
2285
|
-
* 更新编辑状态
|
|
2286
|
-
* @param options 控制各个元素显示/隐藏的选项
|
|
2287
|
-
*/
|
|
2288
|
-
updateEditState({ showRotateButton, showScaleButton, showRadialScaleButton, showDeleteButton, showMoveButton, showBorder, showSizeText, borderStyle, }: {
|
|
2289
|
-
showRotateButton?: boolean;
|
|
2290
|
-
showScaleButton?: boolean;
|
|
2291
|
-
showRadialScaleButton?: boolean;
|
|
2292
|
-
showDeleteButton?: boolean;
|
|
2293
|
-
showMoveButton?: boolean;
|
|
2294
|
-
showBorder?: boolean;
|
|
2295
|
-
showSizeText?: boolean;
|
|
2296
|
-
borderStyle?: {
|
|
2297
|
-
isDashed: boolean;
|
|
2298
|
-
dashArray?: [number, number];
|
|
2299
|
-
};
|
|
2300
|
-
}): void;
|
|
2301
|
-
/**
|
|
2302
|
-
* 获取操作状态
|
|
2303
|
-
*/
|
|
2304
|
-
getOperationState(): OperationState;
|
|
2305
|
-
/**
|
|
2306
|
-
* 停止所有操作
|
|
2307
|
-
*/
|
|
2308
|
-
stopAllOperations(): void;
|
|
2309
|
-
/**
|
|
2310
|
-
* 获取控制按钮容器(供外部添加额外按钮)
|
|
2311
|
-
*/
|
|
2312
|
-
getControlButtonsContainer(): Container;
|
|
2313
|
-
/**
|
|
2314
|
-
* 获取移动按钮(供外部调用)
|
|
2315
|
-
*/
|
|
2316
|
-
getMoveButton(): MoveControlButton | null;
|
|
2317
|
-
/**
|
|
2318
|
-
* 计算指定边的中点位置
|
|
2319
|
-
* @param startIndex 起始点索引
|
|
2320
|
-
* @param endIndex 结束点索引
|
|
2321
|
-
*/
|
|
2322
|
-
calculateEdgeMidpoint(startIndex: number, endIndex: number): Point;
|
|
2323
|
-
/**
|
|
2324
|
-
* 销毁组件
|
|
2325
|
-
*/
|
|
2326
|
-
destroy(): void;
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
declare type EditControlLayerOptions = {
|
|
2330
|
-
config: EditControlConfig;
|
|
2331
|
-
zonePoints: Point[];
|
|
2332
|
-
events?: EditControlEvents;
|
|
2333
|
-
minSize?: number;
|
|
2334
|
-
};
|
|
2335
|
-
|
|
2336
|
-
/**
|
|
2337
|
-
* 编辑控制管理器
|
|
2338
|
-
* 统一管理所有编辑控制层,将它们放在最顶层以确保始终可见
|
|
2339
|
-
*/
|
|
2340
|
-
declare class EditControlManager_2 {
|
|
2341
|
-
private appService;
|
|
2342
|
-
private editControlLayers;
|
|
2343
|
-
constructor(appService: AppService);
|
|
2344
|
-
/**
|
|
2345
|
-
* 注册编辑控制层
|
|
2346
|
-
* @param id 组件唯一标识(如 Zone ID、Carpet ID)
|
|
2347
|
-
* @param options 编辑控制层配置
|
|
2348
|
-
* @returns 创建的 EditControlLayer 实例
|
|
2349
|
-
*/
|
|
2350
|
-
registerEditControl(id: string | number, options: EditControlLayerOptions): EditControlLayer;
|
|
2351
|
-
/**
|
|
2352
|
-
* 注销编辑控制层
|
|
2353
|
-
* @param id 组件唯一标识
|
|
2354
|
-
*/
|
|
2355
|
-
unregisterEditControl(id: string | number): void;
|
|
2356
|
-
/**
|
|
2357
|
-
* 获取编辑控制层
|
|
2358
|
-
* @param id 组件唯一标识
|
|
2359
|
-
* @returns EditControlLayer 实例,如果不存在则返回 undefined
|
|
2360
|
-
*/
|
|
2361
|
-
getEditControl(id: string | number): EditControlLayer | undefined;
|
|
2362
|
-
/**
|
|
2363
|
-
* 更新编辑控制层状态
|
|
2364
|
-
* @param id 组件唯一标识
|
|
2365
|
-
* @param options 控制各个元素显示/隐藏的选项
|
|
2366
|
-
*/
|
|
2367
|
-
updateEditState(id: string | number, options: {
|
|
2368
|
-
showRotateButton?: boolean;
|
|
2369
|
-
showScaleButton?: boolean;
|
|
2370
|
-
showRadialScaleButton?: boolean;
|
|
2371
|
-
showDeleteButton?: boolean;
|
|
2372
|
-
showMoveButton?: boolean;
|
|
2373
|
-
showBorder?: boolean;
|
|
2374
|
-
showSizeText?: boolean;
|
|
2375
|
-
borderStyle?: {
|
|
2376
|
-
isDashed: boolean;
|
|
2377
|
-
dashArray?: [number, number];
|
|
2378
|
-
};
|
|
2379
|
-
}): void;
|
|
2380
|
-
/**
|
|
2381
|
-
* 清空所有编辑控制层
|
|
2382
|
-
*/
|
|
2383
|
-
clearAll(): void;
|
|
2384
|
-
/**
|
|
2385
|
-
* 获取所有编辑控制层
|
|
2386
|
-
* @returns 所有编辑控制层的数组
|
|
2387
|
-
*/
|
|
2388
|
-
getAllEditControls(): EditControlLayer[];
|
|
2389
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2390
|
-
/**
|
|
2391
|
-
* 检查是否存在编辑控制层
|
|
2392
|
-
* @param id 组件唯一标识
|
|
2393
|
-
* @returns 是否存在
|
|
2394
|
-
*/
|
|
2395
|
-
hasEditControl(id: string | number): boolean;
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
|
-
/**
|
|
2399
|
-
* 固定大小动画精灵基类
|
|
2400
|
-
* 基于 EnhancedSprite 扩展,支持帧动画播放
|
|
2401
|
-
*
|
|
2402
|
-
* 两种模式:
|
|
2403
|
-
* 1. sizeFixed: true - 固定屏幕像素大小,不受地图缩放影响
|
|
2404
|
-
* 2. sizeFixed: false - 以地图scale=1为基准,跟随地图缩放
|
|
2405
|
-
*/
|
|
2406
|
-
declare class EnhancedAnimatedSprite extends AnimatedSprite {
|
|
2407
|
-
protected appService: AppService;
|
|
2408
|
-
private throttledUpdateScale;
|
|
2409
|
-
private fixedWidth;
|
|
2410
|
-
private fixedHeight;
|
|
2411
|
-
private isFixedSizeSet;
|
|
2412
|
-
private sizeFixed;
|
|
2413
|
-
private baselineScale;
|
|
2414
|
-
private static animationTicker;
|
|
2415
|
-
private static animatedSprites;
|
|
2416
|
-
constructor(appService: AppService, textures?: Texture[]);
|
|
2417
|
-
/**
|
|
2418
|
-
* 设置固定的屏幕像素大小
|
|
2419
|
-
* @param width 屏幕上显示的固定宽度(像素)
|
|
2420
|
-
* @param height 屏幕上显示的固定高度(像素)
|
|
2421
|
-
*/
|
|
2422
|
-
setFixedSize(width: number, height: number): void;
|
|
2423
|
-
/**
|
|
2424
|
-
* 设置是否启用固定大小模式
|
|
2425
|
-
* @param enabled 是否启用固定大小模式
|
|
2426
|
-
*/
|
|
2427
|
-
setSizeFixed(enabled: boolean): void;
|
|
2428
|
-
/**
|
|
2429
|
-
* 重写 width setter,确保使用固定大小逻辑
|
|
2430
|
-
*/
|
|
2431
|
-
set width(value: number);
|
|
2432
|
-
/**
|
|
2433
|
-
* 重写 height setter,确保使用固定大小逻辑
|
|
2434
|
-
*/
|
|
2435
|
-
set height(value: number);
|
|
2436
|
-
/**
|
|
2437
|
-
* 重写 width getter,返回固定宽度
|
|
2438
|
-
*/
|
|
2439
|
-
get width(): number;
|
|
2440
|
-
/**
|
|
2441
|
-
* 重写 height getter,返回固定高度
|
|
2442
|
-
*/
|
|
2443
|
-
get height(): number;
|
|
2444
|
-
/**
|
|
2445
|
-
* 注册缩放事件监听
|
|
2446
|
-
*/
|
|
2447
|
-
private registerScaleListener;
|
|
2448
|
-
/**
|
|
2449
|
-
* 应用大小(统一处理两种模式)
|
|
2450
|
-
*/
|
|
2451
|
-
private applySize;
|
|
2452
|
-
/**
|
|
2453
|
-
* 更新元素缩放,以保持正确大小
|
|
2454
|
-
*/
|
|
2455
|
-
protected updateScale(scale: number): void;
|
|
2456
|
-
/**
|
|
2457
|
-
* 静态方法:加载动画纹理
|
|
2458
|
-
* @param jsonSrc 动画JSON资源路径
|
|
2459
|
-
* @param imageSrc 动画图片资源路径
|
|
2460
|
-
* @param framePrefix 帧名称前缀,例如 "sleep_"
|
|
2461
|
-
* @param frameCount 帧数量
|
|
2462
|
-
* @returns Promise<Texture[]> 纹理数组
|
|
2463
|
-
*/
|
|
2464
|
-
static loadAnimationTextures(jsonSrc: string, imageSrc: string, framePrefix?: string, frameCount?: number): Promise<Texture[]>;
|
|
2465
|
-
/**
|
|
2466
|
-
* 设置动画配置
|
|
2467
|
-
* @param iconConfig 图标配置
|
|
2468
|
-
*/
|
|
2469
|
-
setupAnimation(iconConfig: IconConfig): void;
|
|
2470
|
-
/**
|
|
2471
|
-
* 通用绘制方法
|
|
2472
|
-
* @param params 绘制参数
|
|
2473
|
-
* @param visibilityCondition 可选的可见性条件函数
|
|
2474
|
-
*/
|
|
2475
|
-
draw(params: IconPoint, visibilityCondition?: () => boolean): void;
|
|
2476
|
-
/**
|
|
2477
|
-
* 开始播放动画
|
|
2478
|
-
*/
|
|
2479
|
-
play(): void;
|
|
2480
|
-
/**
|
|
2481
|
-
* 停止播放动画
|
|
2482
|
-
*/
|
|
2483
|
-
stop(): void;
|
|
2484
|
-
/**
|
|
2485
|
-
* 重写 textures setter,在设置新纹理后重新应用固定大小
|
|
2486
|
-
*/
|
|
2487
|
-
set textures(value: Texture[]);
|
|
2488
|
-
/**
|
|
2489
|
-
* 重写 textures getter
|
|
2490
|
-
*/
|
|
2491
|
-
get textures(): Texture[];
|
|
2492
|
-
/**
|
|
2493
|
-
* 启动动画 Ticker
|
|
2494
|
-
*/
|
|
2495
|
-
private static startAnimationTicker;
|
|
2496
|
-
/**
|
|
2497
|
-
* 更新动画 Ticker 状态
|
|
2498
|
-
*/
|
|
2499
|
-
private static updateAnimationTicker;
|
|
2500
|
-
/**
|
|
2501
|
-
* 停止动画 Ticker
|
|
2502
|
-
*/
|
|
2503
|
-
private static stopAnimationTicker;
|
|
2504
|
-
/**
|
|
2505
|
-
* 更新所有动画
|
|
2506
|
-
*/
|
|
2507
|
-
private static updateAnimations;
|
|
2508
|
-
/**
|
|
2509
|
-
* 组件销毁时清理资源
|
|
2510
|
-
*/
|
|
2511
|
-
destroy(options?: {
|
|
2512
|
-
children?: boolean;
|
|
2513
|
-
texture?: boolean;
|
|
2514
|
-
baseTexture?: boolean;
|
|
2515
|
-
}): void;
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
/**
|
|
2519
|
-
* 固定大小精灵基类
|
|
2520
|
-
* 用于创建在地图缩放时保持固定视觉大小的精灵元素
|
|
2521
|
-
*
|
|
2522
|
-
* 两种模式:
|
|
2523
|
-
* 1. sizeFixed: true - 固定屏幕像素大小,不受地图缩放影响
|
|
2524
|
-
* 2. sizeFixed: false - 以地图scale=1为基准,跟随地图缩放
|
|
2525
|
-
*/
|
|
2526
|
-
declare class EnhancedSprite extends Sprite {
|
|
2527
|
-
protected appService: AppService;
|
|
2528
|
-
private throttledUpdateScale;
|
|
2529
|
-
private fixedWidth;
|
|
2530
|
-
private fixedHeight;
|
|
2531
|
-
private isFixedSizeSet;
|
|
2532
|
-
private sizeFixed;
|
|
2533
|
-
private baselineScale;
|
|
2534
|
-
constructor(appService: AppService, texture?: Texture);
|
|
2535
|
-
/**
|
|
2536
|
-
* 设置固定的屏幕像素大小
|
|
2537
|
-
* @param width 屏幕上显示的固定宽度(像素)
|
|
2538
|
-
* @param height 屏幕上显示的固定高度(像素)
|
|
2539
|
-
*/
|
|
2540
|
-
setFixedSize(width: number, height: number): void;
|
|
2541
|
-
/**
|
|
2542
|
-
* 设置是否启用固定大小模式
|
|
2543
|
-
* @param enabled 是否启用固定大小模式
|
|
2544
|
-
*/
|
|
2545
|
-
setSizeFixed(enabled: boolean): void;
|
|
2546
|
-
/**
|
|
2547
|
-
* 重写 width setter,确保使用固定大小逻辑
|
|
2548
|
-
*/
|
|
2549
|
-
set width(value: number);
|
|
2550
|
-
/**
|
|
2551
|
-
* 重写 height setter,确保使用固定大小逻辑
|
|
2552
|
-
*/
|
|
2553
|
-
set height(value: number);
|
|
2554
|
-
/**
|
|
2555
|
-
* 重写 width getter,返回固定宽度
|
|
2556
|
-
*/
|
|
2557
|
-
get width(): number;
|
|
2558
|
-
/**
|
|
2559
|
-
* 重写 height getter,返回固定高度
|
|
2560
|
-
*/
|
|
2561
|
-
get height(): number;
|
|
2562
|
-
/**
|
|
2563
|
-
* 注册缩放事件监听
|
|
2564
|
-
*/
|
|
2565
|
-
private registerScaleListener;
|
|
2566
|
-
/**
|
|
2567
|
-
* 应用大小(统一处理两种模式)
|
|
2568
|
-
*/
|
|
2569
|
-
private applySize;
|
|
2570
|
-
/**
|
|
2571
|
-
* 更新元素缩放,以保持正确大小
|
|
2572
|
-
*/
|
|
2573
|
-
protected updateScale(scale: number): void;
|
|
2574
|
-
/**
|
|
2575
|
-
* 异步加载纹理并设置大小
|
|
2576
|
-
* @param assetKey 资源键名 或 资源src
|
|
2577
|
-
* @param iconConfig 图标配置(需要包含sizeFixed属性)
|
|
2578
|
-
*/
|
|
2579
|
-
loadTextureAndSetSize(src: string, iconConfig: IconConfig): Promise<void>;
|
|
2580
|
-
/**
|
|
2581
|
-
* 通用绘制方法
|
|
2582
|
-
* @param params 绘制参数
|
|
2583
|
-
* @param visibilityCondition 可选的可见性条件函数
|
|
2584
|
-
*/
|
|
2585
|
-
draw(params: IconPoint, visibilityCondition?: () => boolean): void;
|
|
2586
|
-
/**
|
|
2587
|
-
* 重写 texture setter,在设置新纹理后重新应用固定大小
|
|
2588
|
-
*/
|
|
2589
|
-
set texture(value: Texture);
|
|
2590
|
-
/**
|
|
2591
|
-
* 重写 texture getter
|
|
2592
|
-
*/
|
|
2593
|
-
get texture(): Texture;
|
|
2594
|
-
/**
|
|
2595
|
-
* 组件销毁时清理资源
|
|
2596
|
-
*/
|
|
2597
|
-
destroy(options?: {
|
|
2598
|
-
children?: boolean;
|
|
2599
|
-
texture?: boolean;
|
|
2600
|
-
baseTexture?: boolean;
|
|
2601
|
-
}): void;
|
|
2602
|
-
}
|
|
2603
|
-
|
|
2604
|
-
/**
|
|
2605
|
-
* 固定大小元素基类
|
|
2606
|
-
* 用于创建在地图缩放时保持固定视觉大小的元素
|
|
2607
|
-
*/
|
|
2608
|
-
declare class FixedSizeContainer extends Container {
|
|
2609
|
-
protected appService: AppService;
|
|
2610
|
-
private throttledUpdateScale;
|
|
2611
|
-
constructor(appService: AppService);
|
|
2612
|
-
/**
|
|
2613
|
-
* 注册缩放事件监听
|
|
2614
|
-
*/
|
|
2615
|
-
private registerScaleListener;
|
|
2616
|
-
/**
|
|
2617
|
-
* 更新元素缩放,以保持固定大小
|
|
2618
|
-
*/
|
|
2619
|
-
protected updateScale(scale: number): void;
|
|
2620
|
-
/**
|
|
2621
|
-
* 组件销毁时清理资源
|
|
2622
|
-
*/
|
|
2623
|
-
destroy(options?: {
|
|
2624
|
-
children?: boolean;
|
|
2625
|
-
texture?: boolean;
|
|
2626
|
-
baseTexture?: boolean;
|
|
2627
|
-
}): void;
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2630
|
-
declare class Free extends Graphics {
|
|
2631
|
-
private appService;
|
|
2632
|
-
constructor(appService: AppService);
|
|
2633
|
-
/**
|
|
2634
|
-
* 绘制结构化自由区域数据
|
|
2635
|
-
* @param free 自由区域数据数组
|
|
2636
|
-
*/
|
|
2637
|
-
draw(free: {
|
|
2638
|
-
coordinates: number[];
|
|
2639
|
-
}[]): void;
|
|
2640
|
-
destroy(options?: DestroyOptions | boolean): void;
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
/**
|
|
2644
|
-
* GIF 类型自定义元素参数
|
|
2645
|
-
* 保持现有逻辑
|
|
2646
|
-
*/
|
|
2647
|
-
export declare type GifCustomElementParam = BaseCustomElementParam & {
|
|
2648
|
-
/** 元素类型 */
|
|
2649
|
-
type: 'gif'
|
|
2650
|
-
/** GIF资源路径 */
|
|
2651
|
-
src: string
|
|
2652
|
-
/** GIF宽度(必需 - GIF 需要明确尺寸) */
|
|
2653
|
-
width: number
|
|
2654
|
-
/** GIF高度(必需 - GIF 需要明确尺寸) */
|
|
2655
|
-
height: number
|
|
2656
|
-
/**
|
|
2657
|
-
* 锚点位置
|
|
2658
|
-
*
|
|
2659
|
-
* 定义GIF的锚点位置,用于控制GIF相对于坐标点的对齐方式
|
|
2660
|
-
* - {x: 0, y: 0} 表示左上角
|
|
2661
|
-
* - {x: 0.5, y: 0.5} 表示中心点(默认)
|
|
2662
|
-
* - {x: 0.5, y: 1} 表示底部中心(适用于气泡图标)
|
|
2663
|
-
* - {x: 1, y: 1} 表示右下角
|
|
919
|
+
* 锚点位置
|
|
920
|
+
*
|
|
921
|
+
* 定义GIF的锚点位置,用于控制GIF相对于坐标点的对齐方式
|
|
922
|
+
* - {x: 0, y: 0} 表示左上角
|
|
923
|
+
* - {x: 0.5, y: 0.5} 表示中心点(默认)
|
|
924
|
+
* - {x: 0.5, y: 1} 表示底部中心(适用于气泡图标)
|
|
925
|
+
* - {x: 1, y: 1} 表示右下角
|
|
2664
926
|
*/
|
|
2665
927
|
anchor?: Point
|
|
2666
928
|
}
|
|
2667
929
|
|
|
2668
|
-
declare class Heatmap extends Container {
|
|
2669
|
-
private appService;
|
|
2670
|
-
colorGradients: Array<string>;
|
|
2671
|
-
cellSize: number;
|
|
2672
|
-
constructor(appService: AppService);
|
|
2673
|
-
/**
|
|
2674
|
-
* 绘制热力图
|
|
2675
|
-
* @param grid 处理好的热力数据 每个网格的信号强度 和 坐标
|
|
2676
|
-
* @param useGradient 是否使用渐变绘制
|
|
2677
|
-
*/
|
|
2678
|
-
draw(grid: Array<Array<{
|
|
2679
|
-
x: number;
|
|
2680
|
-
y: number;
|
|
2681
|
-
signal: number;
|
|
2682
|
-
hasPoint: boolean;
|
|
2683
|
-
}>>, heatmapAlpha?: number): void;
|
|
2684
|
-
/**
|
|
2685
|
-
* 裁剪热力图 仅显示房间区域
|
|
2686
|
-
* 根据roomFill图层的子元素 组合Graphics生成大Graphics裁剪
|
|
2687
|
-
* @param heatmap 热力图mesh
|
|
2688
|
-
*/
|
|
2689
|
-
private croppingHeatmap;
|
|
2690
|
-
/**
|
|
2691
|
-
* 网格绘制热力图 我网格模式
|
|
2692
|
-
* @param grid 处理好的热力数据 每个网格的信号强度 和 坐标
|
|
2693
|
-
* @returns 网格热力图mesh
|
|
2694
|
-
*/
|
|
2695
|
-
private gridDrawing;
|
|
2696
|
-
/**
|
|
2697
|
-
* 渐变绘制热力图
|
|
2698
|
-
* @param grid 处理好的热力数据 每个网格的信号强度 和 坐标
|
|
2699
|
-
* @returns 渐变热力图mesh
|
|
2700
|
-
*/
|
|
2701
|
-
private gradientDrawing;
|
|
2702
|
-
/**
|
|
2703
|
-
* 更新位置
|
|
2704
|
-
* @param x
|
|
2705
|
-
* @param y
|
|
2706
|
-
*/
|
|
2707
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2708
|
-
/**
|
|
2709
|
-
* 销毁热力图
|
|
2710
|
-
*/
|
|
2711
|
-
destroy(): void;
|
|
2712
|
-
}
|
|
2713
|
-
|
|
2714
|
-
declare class HeatmapManager_2 {
|
|
2715
|
-
private appService;
|
|
2716
|
-
heatmap: Heatmap;
|
|
2717
|
-
pointsTopLeftOrigin: HeatmapPoint[];
|
|
2718
|
-
signalGrid: Array<Array<{
|
|
2719
|
-
x: number;
|
|
2720
|
-
y: number;
|
|
2721
|
-
signal: number;
|
|
2722
|
-
hasPoint: boolean;
|
|
2723
|
-
}>>;
|
|
2724
|
-
cellSize: number;
|
|
2725
|
-
maxDistance: number;
|
|
2726
|
-
smoothIterations: number;
|
|
2727
|
-
heatmapAlpha: number;
|
|
2728
|
-
isHeatmapDrawn: boolean;
|
|
2729
|
-
private loadTimer;
|
|
2730
|
-
constructor(appService: AppService);
|
|
2731
|
-
/**
|
|
2732
|
-
* 绘制热力图
|
|
2733
|
-
* @param mapData 地图数据
|
|
2734
|
-
* @param heatmapPoints 热力图点
|
|
2735
|
-
* @returns
|
|
2736
|
-
*/
|
|
2737
|
-
private pendingPoints;
|
|
2738
|
-
/**
|
|
2739
|
-
* 绘制热力图
|
|
2740
|
-
* @param mapData 地图数据
|
|
2741
|
-
* @param heatmapPoints 热力图点
|
|
2742
|
-
* @returns
|
|
2743
|
-
*/
|
|
2744
|
-
draw(heatmapPoints: HeatmapPoint[]): void;
|
|
2745
|
-
/**
|
|
2746
|
-
* 地图加载完成回调
|
|
2747
|
-
*/
|
|
2748
|
-
onMapLoaded(): void;
|
|
2749
|
-
/**
|
|
2750
|
-
* 插值计算信号网格
|
|
2751
|
-
* @param pointsTopLeftOrigin 热力图路径点
|
|
2752
|
-
* @returns 信号网格
|
|
2753
|
-
*/
|
|
2754
|
-
calculateInterpolatedSignal(pointsTopLeftOrigin: HeatmapPoint[]): {
|
|
2755
|
-
x: number;
|
|
2756
|
-
y: number;
|
|
2757
|
-
signal: number;
|
|
2758
|
-
hasPoint: boolean;
|
|
2759
|
-
}[][];
|
|
2760
|
-
/**
|
|
2761
|
-
* 更新热力图位置
|
|
2762
|
-
* @param x
|
|
2763
|
-
* @param y
|
|
2764
|
-
*/
|
|
2765
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2766
|
-
/**
|
|
2767
|
-
* 销毁热力图
|
|
2768
|
-
*/
|
|
2769
|
-
destroy(): void;
|
|
2770
|
-
}
|
|
2771
|
-
|
|
2772
930
|
/** 热力图点 */
|
|
2773
931
|
export declare type HeatmapPoint = Point & {
|
|
2774
932
|
/** 信号强度 */
|
|
@@ -2838,184 +996,9 @@ export declare type ImageCustomElementParam = BaseCustomElementParam & {
|
|
|
2838
996
|
anchor?: Point
|
|
2839
997
|
}
|
|
2840
998
|
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
declare class Interaction_2 extends Container {
|
|
2844
|
-
private appService;
|
|
2845
|
-
dragStart: {
|
|
2846
|
-
x: number;
|
|
2847
|
-
y: number;
|
|
2848
|
-
} | null;
|
|
2849
|
-
initialTouchDistance: number | null;
|
|
2850
|
-
initialScale: {
|
|
2851
|
-
x: number;
|
|
2852
|
-
y: number;
|
|
2853
|
-
} | null;
|
|
2854
|
-
activeTouches: Map<number, {
|
|
2855
|
-
x: number;
|
|
2856
|
-
y: number;
|
|
2857
|
-
}>;
|
|
2858
|
-
firstTouchId: number | null;
|
|
2859
|
-
secondTouchId: number | null;
|
|
2860
|
-
taintedPointers: Set<number>;
|
|
2861
|
-
zoomFactor: number;
|
|
2862
|
-
scaleMin: number;
|
|
2863
|
-
scaleMax: number;
|
|
2864
|
-
originalPosition: {
|
|
2865
|
-
x: number;
|
|
2866
|
-
y: number;
|
|
2867
|
-
};
|
|
2868
|
-
targetPosition: {
|
|
2869
|
-
x: number;
|
|
2870
|
-
y: number;
|
|
2871
|
-
};
|
|
2872
|
-
centerPosition: {
|
|
2873
|
-
x: number;
|
|
2874
|
-
y: number;
|
|
2875
|
-
};
|
|
2876
|
-
originalScale: {
|
|
2877
|
-
x: number;
|
|
2878
|
-
y: number;
|
|
2879
|
-
};
|
|
2880
|
-
targetScale: {
|
|
2881
|
-
x: number;
|
|
2882
|
-
y: number;
|
|
2883
|
-
};
|
|
2884
|
-
defaultScale: {
|
|
2885
|
-
x: number;
|
|
2886
|
-
y: number;
|
|
2887
|
-
};
|
|
2888
|
-
transitionDuration: number;
|
|
2889
|
-
transitionStartTime: number | null;
|
|
2890
|
-
initialPinchCenter: Point | null;
|
|
2891
|
-
isGestureValid: boolean;
|
|
2892
|
-
lastTapTime: number;
|
|
2893
|
-
doubleTapDelay: number;
|
|
2894
|
-
doubleTapZoomFactor: number;
|
|
2895
|
-
lastTapPosition: Point | null;
|
|
2896
|
-
tapDistanceThreshold: number;
|
|
2897
|
-
tapDetectionEnabled: boolean;
|
|
2898
|
-
private mapClickStartPosition;
|
|
2899
|
-
private mapClickStartTime;
|
|
2900
|
-
private readonly mapClickTimeThreshold;
|
|
2901
|
-
private readonly mapClickMoveThreshold;
|
|
2902
|
-
private shouldSuppressMapClick;
|
|
2903
|
-
private isGestureHijacked;
|
|
2904
|
-
private hijackedPointerId;
|
|
2905
|
-
private isHijackPaused;
|
|
2906
|
-
private interactionGraphics;
|
|
2907
|
-
private viewportBounds;
|
|
2908
|
-
private boundResetAnimation;
|
|
2909
|
-
private debouncedStopWheelRender;
|
|
2910
|
-
private debouncedLogWheelScale;
|
|
2911
|
-
private interactionState;
|
|
2912
|
-
private throttledAntiScale;
|
|
2913
|
-
private unsubscribeEnableInteraction;
|
|
2914
|
-
constructor(appService: AppService);
|
|
2915
|
-
/**
|
|
2916
|
-
* 更新交互模式
|
|
2917
|
-
* @param enabled 是否启用交互
|
|
2918
|
-
*/
|
|
2919
|
-
private updateInteractionMode;
|
|
2920
|
-
setupInteraction(): void;
|
|
2921
|
-
/**
|
|
2922
|
-
* 处理全局取消或失去焦点事件
|
|
2923
|
-
*/
|
|
2924
|
-
private handleGlobalCancel;
|
|
2925
|
-
resetPan(targetPosition: {
|
|
2926
|
-
x: number;
|
|
2927
|
-
y: number;
|
|
2928
|
-
}): void;
|
|
2929
|
-
/**
|
|
2930
|
-
* 设置地图的位置和缩放,可选择是否使用动画过渡
|
|
2931
|
-
* @param options 缩放和位置选项
|
|
2932
|
-
* @param animate 是否使用动画,默认为 true
|
|
2933
|
-
*/
|
|
2934
|
-
setPanZoom({ targetPosition, targetScale, setCenter, setScale, }?: {
|
|
2935
|
-
targetPosition?: {
|
|
2936
|
-
x: number;
|
|
2937
|
-
y: number;
|
|
2938
|
-
};
|
|
2939
|
-
targetScale?: {
|
|
2940
|
-
x: number;
|
|
2941
|
-
y: number;
|
|
2942
|
-
};
|
|
2943
|
-
setCenter?: boolean;
|
|
2944
|
-
setScale?: boolean;
|
|
2945
|
-
}, animate?: boolean): void;
|
|
2946
|
-
clearTouches(): void;
|
|
2947
|
-
/**
|
|
2948
|
-
* 检查事件监听器状态 - 调试用
|
|
2949
|
-
*/
|
|
2950
|
-
checkEventListeners(): {
|
|
2951
|
-
wheel: number;
|
|
2952
|
-
pointerdown: number;
|
|
2953
|
-
pointerup: number;
|
|
2954
|
-
pointerupoutside: number;
|
|
2955
|
-
pointermove: number;
|
|
2956
|
-
};
|
|
2957
|
-
/**
|
|
2958
|
-
* 销毁时清理事件监听
|
|
2959
|
-
*/
|
|
2960
|
-
destroy(): void;
|
|
2961
|
-
/**
|
|
2962
|
-
* 处理抑制地图点击事件
|
|
2963
|
-
*/
|
|
2964
|
-
private handleSuppressMapClick;
|
|
2965
|
-
/**
|
|
2966
|
-
* 处理手势劫持
|
|
2967
|
-
*/
|
|
2968
|
-
private handleGestureHijacked;
|
|
2969
|
-
/**
|
|
2970
|
-
* 退出手势劫持模式
|
|
2971
|
-
*/
|
|
2972
|
-
private exitGestureHijacked;
|
|
2973
|
-
/**
|
|
2974
|
-
* 强制结束当前正在进行的手势交互
|
|
2975
|
-
*/
|
|
2976
|
-
forceEndGesture(): void;
|
|
2977
|
-
/**
|
|
2978
|
-
* 暂停手势劫持(双指模式)
|
|
2979
|
-
*/
|
|
2980
|
-
private pauseGestureHijack;
|
|
2981
|
-
/**
|
|
2982
|
-
* 恢复手势劫持(回到单指模式)
|
|
2983
|
-
*/
|
|
2984
|
-
private resumeGestureHijack;
|
|
2985
|
-
private antiScale;
|
|
2986
|
-
private resetAnimation;
|
|
2987
|
-
private onWheel;
|
|
2988
|
-
private onPointerDown;
|
|
2989
|
-
private onPointerUp;
|
|
2990
|
-
private detectDoubleTap;
|
|
2991
|
-
private detectMapClick;
|
|
2992
|
-
private handleDoubleTap;
|
|
2993
|
-
private onPointerMove;
|
|
2994
|
-
private applyPan;
|
|
2995
|
-
private applyPinchZoom;
|
|
2996
|
-
private setInitialScaleAndDistance;
|
|
2997
|
-
}
|
|
2998
|
-
|
|
2999
|
-
declare type LayerName = (typeof LAYERS)[number];
|
|
3000
|
-
|
|
3001
|
-
declare const LAYERS: string[];
|
|
3002
|
-
|
|
3003
|
-
/** 管理器类型定义 */
|
|
3004
|
-
declare type Managers = {
|
|
3005
|
-
mapManager: MapManager_2;
|
|
3006
|
-
heatmapManager: HeatmapManager_2;
|
|
3007
|
-
pathManager: PathManager_2;
|
|
3008
|
-
controlsManager: ControlsManager_2;
|
|
3009
|
-
detectedObjectManager: DetectedObjectManager_2;
|
|
3010
|
-
customElementsManager: CustomElementsManager_2;
|
|
3011
|
-
roomsManager: RoomManager_2;
|
|
3012
|
-
customCarpetManager: CustomCarpetManager;
|
|
3013
|
-
editControlManager: EditControlManager_2;
|
|
3014
|
-
};
|
|
999
|
+
export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "isWallIntersectsAnyRoom", "isZoneIntersectsAnyRoom", "resetPanZoom", "snapshot", "snapshotByData", "getCustomCarpets", "forceEndGesture", "getFurniturePointsByViewportCenter"];
|
|
3015
1000
|
|
|
3016
|
-
export declare const
|
|
3017
|
-
|
|
3018
|
-
export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateSpot", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickSpot", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap", "onClickCarpet", "onDeleteCarpet", "onUpdateCustomCarpet", "onDeleteCustomCarpet", "onGestureStart", "onGestureEnd", "onClickRobot", "onClickChargingStation"];
|
|
1001
|
+
export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateSpot", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickSpot", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap", "onClickCarpet", "onDeleteCarpet", "onUpdateCustomCarpet", "onDeleteCustomCarpet", "onGestureStart", "onGestureEnd", "onClickRobot", "onClickChargingStation", "onRemoveFurniture", "onUpdateFurniture", "onClickFurniture"];
|
|
3019
1002
|
|
|
3020
1003
|
/**
|
|
3021
1004
|
* 地图 API 接口定义
|
|
@@ -3116,406 +1099,14 @@ export declare interface MapApi {
|
|
|
3116
1099
|
* })
|
|
3117
1100
|
*
|
|
3118
1101
|
* // 更新路径样式
|
|
3119
|
-
* mapApp.updateConfig({
|
|
3120
|
-
* path: {
|
|
3121
|
-
* commonPath: { color: '#00ff00', width: 0.8 }
|
|
3122
|
-
* }
|
|
3123
|
-
* })
|
|
3124
|
-
* ```
|
|
3125
|
-
*/
|
|
3126
|
-
updateConfig(partialConfig: DeepPartial<AppConfig>): void;
|
|
3127
|
-
/**
|
|
3128
|
-
* 获取当前地图上所有禁扫区域数据
|
|
3129
|
-
*
|
|
3130
|
-
* @returns 区域数据数组
|
|
3131
|
-
*/
|
|
3132
|
-
getForbiddenSweepZones(): ZoneParam[];
|
|
3133
|
-
/**
|
|
3134
|
-
* 获取当前地图上所有禁拖区域数据
|
|
3135
|
-
*
|
|
3136
|
-
* @returns 区域数据数组
|
|
3137
|
-
*/
|
|
3138
|
-
getForbiddenMopZones(): ZoneParam[];
|
|
3139
|
-
/**
|
|
3140
|
-
* 获取当前地图上所有清扫区域数据
|
|
3141
|
-
*
|
|
3142
|
-
* @returns 区域数据数组
|
|
3143
|
-
*/
|
|
3144
|
-
getCleanZones(): ZoneParam[];
|
|
3145
|
-
/**
|
|
3146
|
-
* 获取当前地图上所有自定义地毯数据
|
|
3147
|
-
*
|
|
3148
|
-
* @returns 地毯数据数组
|
|
3149
|
-
*/
|
|
3150
|
-
getCustomCarpets(): CustomCarpetParam[];
|
|
3151
|
-
/**
|
|
3152
|
-
* 获取当前地图上所有虚拟墙数据
|
|
3153
|
-
*
|
|
3154
|
-
* @returns 虚拟墙数据数组
|
|
3155
|
-
*/
|
|
3156
|
-
getVirtualWalls(): VirtualWallParam[];
|
|
3157
|
-
/**
|
|
3158
|
-
* 获取当前地图上所有定点清扫数据
|
|
3159
|
-
*
|
|
3160
|
-
* @returns 定点清扫数据数组
|
|
3161
|
-
*/
|
|
3162
|
-
getSpots(): SpotParam[];
|
|
3163
|
-
/**
|
|
3164
|
-
* 获取分割线有效端点
|
|
3165
|
-
* @returns 分割线有效端点
|
|
3166
|
-
*/
|
|
3167
|
-
getEffectiveDividerPoints(): Point[] | null;
|
|
3168
|
-
/**
|
|
3169
|
-
* 获取分割线端点
|
|
3170
|
-
* @returns 分割线端点
|
|
3171
|
-
*/
|
|
3172
|
-
getDividerEndPoints(): Point[] | null;
|
|
3173
|
-
/**
|
|
3174
|
-
* 获取当前视口中心点坐标
|
|
3175
|
-
*
|
|
3176
|
-
* 返回当前视口中心点在地图坐标系中的位置,坐标相对于地图原点。
|
|
3177
|
-
* 该坐标可以直接用于创建禁区、虚拟墙等控制元素。
|
|
3178
|
-
*
|
|
3179
|
-
* @returns 视口中心的相对坐标,如果地图未初始化则返回 null
|
|
3180
|
-
*/
|
|
3181
|
-
getViewportCenterPoint(): Point | null;
|
|
3182
|
-
/**
|
|
3183
|
-
* 获取地图中心点坐标
|
|
3184
|
-
*
|
|
3185
|
-
* 返回地图包围盒中心点在地图坐标系中的位置,坐标相对于地图原点。
|
|
3186
|
-
* 该坐标基于地图边界计算,可以直接用于创建控制元素。
|
|
3187
|
-
*
|
|
3188
|
-
* @returns 地图中心的相对坐标,如果地图未初始化则返回 null
|
|
3189
|
-
*/
|
|
3190
|
-
getMapCenterPoint(): Point | null;
|
|
3191
|
-
/**
|
|
3192
|
-
* 基于视口中心生成虚拟墙端点坐标
|
|
3193
|
-
*
|
|
3194
|
-
* 根据当前视口中心位置生成虚拟墙的两个端点坐标,支持自定义长度、方向和偏移。
|
|
3195
|
-
*
|
|
3196
|
-
* @param options - 配置选项
|
|
3197
|
-
* @param options.width - 虚拟墙长度,单位米,默认使用配置中的最小宽度
|
|
3198
|
-
* @param options.direction - 虚拟墙方向,'horizontal' 或 'vertical',默认为 'horizontal'
|
|
3199
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3200
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3201
|
-
* @returns 虚拟墙的两个端点坐标数组
|
|
3202
|
-
*/
|
|
3203
|
-
getWallPointsByViewportCenter(options?: {
|
|
3204
|
-
width?: number;
|
|
3205
|
-
direction?: Direction;
|
|
3206
|
-
offsetX?: number;
|
|
3207
|
-
offsetY?: number;
|
|
3208
|
-
}): Point[];
|
|
3209
|
-
/**
|
|
3210
|
-
* 基于视口中心生成禁扫区域顶点坐标
|
|
3211
|
-
*
|
|
3212
|
-
* 根据当前视口中心位置生成禁扫区域的四个顶点坐标。
|
|
3213
|
-
*
|
|
3214
|
-
* @param options - 配置选项
|
|
3215
|
-
* @param options.size - 区域大小,单位米,默认使用配置中的最小尺寸
|
|
3216
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3217
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3218
|
-
* @returns 禁扫区域的四个顶点坐标数组
|
|
3219
|
-
*/
|
|
3220
|
-
getForbiddenSweepZonePointsByViewportCenter(options?: {
|
|
3221
|
-
size?: number;
|
|
3222
|
-
offsetX?: number;
|
|
3223
|
-
offsetY?: number;
|
|
3224
|
-
}): Point[];
|
|
3225
|
-
/**
|
|
3226
|
-
* 基于视口中心生成禁拖区域顶点坐标
|
|
3227
|
-
*
|
|
3228
|
-
* 根据当前视口中心位置生成禁拖区域的四个顶点坐标。
|
|
3229
|
-
*
|
|
3230
|
-
* @param options - 配置选项
|
|
3231
|
-
* @param options.size - 区域大小,单位米,默认使用配置中的最小尺寸
|
|
3232
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3233
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3234
|
-
* @returns 禁拖区域的四个顶点坐标数组
|
|
3235
|
-
*/
|
|
3236
|
-
getForbiddenMopZonePointsByViewportCenter(options?: {
|
|
3237
|
-
size?: number;
|
|
3238
|
-
offsetX?: number;
|
|
3239
|
-
offsetY?: number;
|
|
3240
|
-
}): Point[];
|
|
3241
|
-
/**
|
|
3242
|
-
* 基于视口中心生成清扫区域顶点坐标
|
|
3243
|
-
*
|
|
3244
|
-
* 根据当前视口中心位置生成清扫区域的四个顶点坐标。
|
|
3245
|
-
*
|
|
3246
|
-
* @param options - 配置选项
|
|
3247
|
-
* @param options.size - 区域大小,单位米,默认使用配置中的最小尺寸
|
|
3248
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3249
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3250
|
-
* @returns 清扫区域的四个顶点坐标数组
|
|
3251
|
-
*/
|
|
3252
|
-
getCleanZonePointsByViewportCenter(options?: {
|
|
3253
|
-
size?: number;
|
|
3254
|
-
offsetX?: number;
|
|
3255
|
-
offsetY?: number;
|
|
3256
|
-
}): Point[];
|
|
3257
|
-
/**
|
|
3258
|
-
* 基于视口中心生成定点清扫的点坐标
|
|
3259
|
-
*
|
|
3260
|
-
* 根据当前视口中心位置生成定点清扫的坐标点。
|
|
3261
|
-
*
|
|
3262
|
-
* @param options - 配置选项
|
|
3263
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3264
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3265
|
-
* @returns 定点清扫的坐标点
|
|
3266
|
-
*/
|
|
3267
|
-
getSpotPointByViewportCenter(options?: {
|
|
3268
|
-
offsetX?: number;
|
|
3269
|
-
offsetY?: number;
|
|
3270
|
-
}): Point;
|
|
3271
|
-
/**
|
|
3272
|
-
* 判断指定的房间是否相邻(连通)
|
|
3273
|
-
*
|
|
3274
|
-
* 支持结构化地图和点阵地图两种协议。对于多个房间,使用连通性算法判断:
|
|
3275
|
-
* 只要房间之间能通过相邻关系连接起来,就认为它们是相邻的。
|
|
3276
|
-
* 例如:房间A和B相邻,房间B和C相邻,则认为A、B、C三个房间都相邻。
|
|
3277
|
-
*
|
|
3278
|
-
* @param roomIds - 要检测的房间ID数组
|
|
3279
|
-
* @returns 是否所有指定的房间都相邻(连通)
|
|
3280
|
-
*/
|
|
3281
|
-
areRoomsAdjacent(roomIds: number[]): boolean;
|
|
3282
|
-
/**
|
|
3283
|
-
* 判断一个点是否与充电桩或机器人距离小于阈值。
|
|
3284
|
-
*
|
|
3285
|
-
* @param points - 点坐标数组
|
|
3286
|
-
* @param thresholdMeters - 阈值距离,单位米
|
|
3287
|
-
* @param options - 配置选项
|
|
3288
|
-
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
3289
|
-
* @param options.checkRobot - 是否检查与机器人的距离,默认为 false
|
|
3290
|
-
* @returns 是否在判定范围内(true 表示过近,false 表示距离足够)
|
|
3291
|
-
*/
|
|
3292
|
-
isNearChargerOrRobot(points: Point[], thresholdMeters: number, options?: {
|
|
3293
|
-
checkCharger?: boolean;
|
|
3294
|
-
checkRobot?: boolean;
|
|
3295
|
-
}): boolean;
|
|
3296
|
-
/**
|
|
3297
|
-
* 判断一个点是否在任意房间内
|
|
3298
|
-
*
|
|
3299
|
-
* 接受机器坐标系的点(相对于origin的坐标),遍历所有房间,
|
|
3300
|
-
* 判断该点是否在某个房间内。支持结构化地图和点阵地图两种协议。
|
|
3301
|
-
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
3302
|
-
*
|
|
3303
|
-
* @param point - 待检测的点坐标(机器坐标系,与Zone、VirtualWall等使用相同的坐标系)
|
|
3304
|
-
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
3305
|
-
*/
|
|
3306
|
-
isPointInAnyRoom(point: Point): RoomData | null;
|
|
3307
|
-
/**
|
|
3308
|
-
* 判断墙体(线段)是否与任意房间有交集
|
|
3309
|
-
*
|
|
3310
|
-
* 接受机器坐标系的墙体端点(相对于origin的坐标),遍历所有房间,
|
|
3311
|
-
* 判断墙体是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
3312
|
-
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
3313
|
-
*
|
|
3314
|
-
* @param points - 墙体的两个端点坐标(机器坐标系,与VirtualWall等使用相同的坐标系)
|
|
3315
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
3316
|
-
*/
|
|
3317
|
-
isWallIntersectsAnyRoom(points: [Point, Point]): boolean;
|
|
3318
|
-
/**
|
|
3319
|
-
* 判断区域(矩形)是否与任意房间有交集
|
|
3320
|
-
*
|
|
3321
|
-
* 接受机器坐标系的区域顶点(相对于origin的坐标),遍历所有房间,
|
|
3322
|
-
* 判断区域是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
3323
|
-
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
3324
|
-
*
|
|
3325
|
-
* @param points - 区域的四个顶点坐标(机器坐标系,与Zone等使用相同的坐标系)
|
|
3326
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
3327
|
-
*/
|
|
3328
|
-
isZoneIntersectsAnyRoom(points: [Point, Point, Point, Point]): boolean;
|
|
3329
|
-
/**
|
|
3330
|
-
* 地图截图
|
|
3331
|
-
*
|
|
3332
|
-
* 将当前地图状态导出为图片。截图过程中会自动添加一个临时的背景层,
|
|
3333
|
-
* 确保禁区等半透明元素在截图中能够正确显示颜色。
|
|
3334
|
-
*
|
|
3335
|
-
* @param options - 截图配置选项
|
|
3336
|
-
* @param options.backgroundColor - 指定截图时的背景颜色。若不指定,将默认使用 `global.config.backgroundColor`。支持颜色字符串、十六进制数值或 RGB 数组。
|
|
3337
|
-
* @returns Promise<string> Base64 格式的图片数据 (Data URL)
|
|
3338
|
-
*/
|
|
3339
|
-
snapshot(options?: {
|
|
3340
|
-
backgroundColor?: ColorSource;
|
|
3341
|
-
}): Promise<string>;
|
|
3342
|
-
/**
|
|
3343
|
-
* 使用自定义地图数据生成截图
|
|
3344
|
-
*
|
|
3345
|
-
* 基于提供的地图、路径、区域等数据生成截图,通常用于多地图管理界面的缩略图预览。
|
|
3346
|
-
* 此方法会创建一个临时的离屏渲染实例,不会影响当前正在运行的地图显示状态。
|
|
3347
|
-
*
|
|
3348
|
-
* @param data - 包含地图、路径、区域等完整状态的数据对象
|
|
3349
|
-
* @param data.map - 地图原始字符串数据 (支持结构化协议和栅格协议)
|
|
3350
|
-
* @param data.path - 可选的路径协议字符串
|
|
3351
|
-
* @param data.roomProperties - 可选的房间属性数据数组
|
|
3352
|
-
* @param data.customElements - 可选的自定义元素数组
|
|
3353
|
-
* @param data.forbiddenSweepZones - 可选的禁扫区域数组
|
|
3354
|
-
* @param data.forbiddenMopZones - 可选的禁拖区域数组
|
|
3355
|
-
* @param data.virtualWalls - 可选的虚拟墙数组
|
|
3356
|
-
* @param data.detectedObjects - 可选的 AI 物体检测数据数组
|
|
3357
|
-
* @param runtime - 可选的运行时配置 (如是否显示机器人、充电桩等状态)
|
|
3358
|
-
* @param options - 截图配置选项
|
|
3359
|
-
* @param options.backgroundColor - 指定生成截图时的背景颜色。若不指定,将默认使用 `global.config.backgroundColor`。
|
|
3360
|
-
* @returns Promise<string> Base64 格式的图片数据 (Data URL)
|
|
3361
|
-
*/
|
|
3362
|
-
snapshotByData(data: {
|
|
3363
|
-
map: string;
|
|
3364
|
-
path?: string;
|
|
3365
|
-
roomProperties?: RoomProperty[];
|
|
3366
|
-
customElements?: CustomElementParam[];
|
|
3367
|
-
forbiddenSweepZones?: ZoneParam[];
|
|
3368
|
-
forbiddenMopZones?: ZoneParam[];
|
|
3369
|
-
virtualWalls?: VirtualWallParam[];
|
|
3370
|
-
detectedObjects?: DetectedObjectParam[];
|
|
3371
|
-
}, runtime?: DeepPartialRuntimeConfig, options?: {
|
|
3372
|
-
backgroundColor?: ColorSource;
|
|
3373
|
-
}): Promise<string>;
|
|
3374
|
-
}
|
|
3375
|
-
|
|
3376
|
-
/**
|
|
3377
|
-
* 地图应用核心类
|
|
3378
|
-
*
|
|
3379
|
-
* 地图应用的核心类,继承自 PIXI.Application,提供完整的地图渲染、交互和管理功能。
|
|
3380
|
-
* 支持扫地机器人地图的显示、路径绘制、房间管理、控制元素(禁区、虚拟墙等)等功能。
|
|
3381
|
-
*/
|
|
3382
|
-
declare class MapApplication extends Application implements MapApi {
|
|
3383
|
-
/** 地图状态对象 */
|
|
3384
|
-
mapState: MapState | null;
|
|
3385
|
-
/* Excluded from this release type: components */
|
|
3386
|
-
/* Excluded from this release type: managers */
|
|
3387
|
-
/* Excluded from this release type: config */
|
|
3388
|
-
/* Excluded from this release type: runtime */
|
|
3389
|
-
/* Excluded from this release type: appService */
|
|
3390
|
-
/* Excluded from this release type: scaleMin */
|
|
3391
|
-
/* Excluded from this release type: scaleMax */
|
|
3392
|
-
/* Excluded from this release type: events */
|
|
3393
|
-
/* Excluded from this release type: instanceKey */
|
|
3394
|
-
/* Excluded from this release type: containerElement */
|
|
3395
|
-
/* Excluded from this release type: emitter */
|
|
3396
|
-
/* Excluded from this release type: tickerState */
|
|
3397
|
-
private pendingAsyncRender;
|
|
3398
|
-
private isFirstMapDraw;
|
|
3399
|
-
/** 地图是否绘制完成 */
|
|
3400
|
-
isMapDrawn: boolean;
|
|
3401
|
-
/* Excluded from this release type: __constructor */
|
|
3402
|
-
/**
|
|
3403
|
-
* 初始化地图应用
|
|
3404
|
-
*
|
|
3405
|
-
* 设置应用配置、运行时参数、事件处理器,并初始化所有必要的组件和管理器。
|
|
3406
|
-
*
|
|
3407
|
-
* @param options - 初始化选项,包含PIXI应用选项和地图应用选项
|
|
3408
|
-
* @param options.resizeTo - 画布大小调整目标元素
|
|
3409
|
-
* @param options.events - 事件回调
|
|
3410
|
-
* @param options.config - 静态配置
|
|
3411
|
-
* @param options.runtime - 运行时
|
|
3412
|
-
* @returns Promise<void>
|
|
3413
|
-
*
|
|
3414
|
-
*/
|
|
3415
|
-
initialize(options: Partial<ApplicationOptions> & AppOptions): Promise<void>;
|
|
3416
|
-
/**
|
|
3417
|
-
* 绘制结构化地图数据
|
|
3418
|
-
*
|
|
3419
|
-
* 根据结构化的地图数据源绘制地图,包括房间、障碍物、充电桩等元素。
|
|
3420
|
-
*
|
|
3421
|
-
* @param mapData - 结构化地图数据源
|
|
3422
|
-
* @returns Promise<void>
|
|
3423
|
-
*
|
|
3424
|
-
*/
|
|
3425
|
-
drawMap(mapData: StructuredMapDataSource): Promise<void>;
|
|
3426
|
-
/**
|
|
3427
|
-
* 绘制栅格地图数据
|
|
3428
|
-
*
|
|
3429
|
-
* 根据点阵地图数据绘制地图,支持点阵格式的地图数据。
|
|
3430
|
-
*
|
|
3431
|
-
* @param rasterMapData - 栅格地图数据对象
|
|
3432
|
-
* @param rasterMapData.mapHeader - 地图头部信息,包含分辨率、原点等
|
|
3433
|
-
* @param rasterMapData.mapData - 地图像素数据
|
|
3434
|
-
* @returns Promise<void>
|
|
3435
|
-
*
|
|
3436
|
-
*/
|
|
3437
|
-
drawRasterMap(rasterMapData: {
|
|
3438
|
-
mapHeader: MapHeader;
|
|
3439
|
-
mapData: MapData;
|
|
3440
|
-
}): Promise<void>;
|
|
3441
|
-
/**
|
|
3442
|
-
* 绘制机器人路径
|
|
3443
|
-
*
|
|
3444
|
-
* 根据路径数据绘制机器人的移动轨迹,包括普通路径、充电路径等不同类型。
|
|
3445
|
-
*
|
|
3446
|
-
* @param pathData - 路径数据对象
|
|
3447
|
-
* @returns void
|
|
3448
|
-
*
|
|
3449
|
-
*/
|
|
3450
|
-
drawPath(pathData: PathData): void;
|
|
3451
|
-
/**
|
|
3452
|
-
* 绘制房间属性信息
|
|
3453
|
-
*
|
|
3454
|
-
* 绘制房间的详细属性信息,如吸力、水量、清扫次数等。
|
|
3455
|
-
*
|
|
3456
|
-
* @param roomInfos - 房间属性信息数组
|
|
3457
|
-
* @returns void
|
|
3458
|
-
*
|
|
3459
|
-
*/
|
|
3460
|
-
drawRoomProperty(roomInfos: RoomProperty[]): Promise<void>;
|
|
3461
|
-
/**
|
|
3462
|
-
* 绘制自定义地毯
|
|
3463
|
-
* @param carpets 自定义地毯数组
|
|
3464
|
-
* @returns void
|
|
3465
|
-
*/
|
|
3466
|
-
drawCustomCarpets(carpets: CustomCarpetParam[]): Promise<void>;
|
|
3467
|
-
/**
|
|
3468
|
-
* 绘制热力图
|
|
3469
|
-
* @param param - 绘制参数
|
|
3470
|
-
* @returns void
|
|
3471
|
-
*
|
|
3472
|
-
*/
|
|
3473
|
-
drawHeatmap(heatmapPoints: HeatmapPoint[]): void;
|
|
3474
|
-
/**
|
|
3475
|
-
* 绘制禁扫区域
|
|
3476
|
-
* @param zones - 禁扫区域参数数组
|
|
3477
|
-
*/
|
|
3478
|
-
drawForbiddenSweepZones(zones: ZoneParam[]): void;
|
|
3479
|
-
/**
|
|
3480
|
-
* 绘制禁拖区域
|
|
3481
|
-
* @param zones - 禁拖区域参数数组
|
|
3482
|
-
*/
|
|
3483
|
-
drawForbiddenMopZones(zones: ZoneParam[]): void;
|
|
3484
|
-
/**
|
|
3485
|
-
* 绘制清扫区域
|
|
3486
|
-
* @param zones - 清扫区域参数数组
|
|
3487
|
-
*/
|
|
3488
|
-
drawCleanZones(zones: ZoneParam[]): void;
|
|
3489
|
-
/**
|
|
3490
|
-
* 绘制虚拟墙
|
|
3491
|
-
* @param walls - 虚拟墙参数数组
|
|
3492
|
-
*/
|
|
3493
|
-
drawVirtualWalls(walls: VirtualWallParam[]): void;
|
|
3494
|
-
/**
|
|
3495
|
-
* 绘制定点清扫点
|
|
3496
|
-
* @param spots - 定点清扫参数数组
|
|
3497
|
-
*/
|
|
3498
|
-
drawSpots(spots: SpotParam[]): void;
|
|
3499
|
-
/**
|
|
3500
|
-
* 绘制途径点
|
|
3501
|
-
* @param wayPoints - 途径点参数数组
|
|
3502
|
-
*/
|
|
3503
|
-
drawWayPoints(wayPoints: WayPointParam[]): void;
|
|
3504
|
-
/**
|
|
3505
|
-
* 绘制检测到的物体
|
|
3506
|
-
* @param objects - 检测物体参数数组
|
|
3507
|
-
*/
|
|
3508
|
-
drawDetectedObjects(objects: DetectedObjectParam[]): Promise<void>;
|
|
3509
|
-
/**
|
|
3510
|
-
* 绘制自定义地毯
|
|
3511
|
-
* @param customCarpet - 自定义地毯参数数组
|
|
3512
|
-
*/
|
|
3513
|
-
drawCustomCarpet(customCarpet: CustomCarpetParam[]): void;
|
|
3514
|
-
/**
|
|
3515
|
-
* 绘制自定义元素
|
|
3516
|
-
* @param elements - 自定义元素参数数组
|
|
1102
|
+
* mapApp.updateConfig({
|
|
1103
|
+
* path: {
|
|
1104
|
+
* commonPath: { color: '#00ff00', width: 0.8 }
|
|
1105
|
+
* }
|
|
1106
|
+
* })
|
|
1107
|
+
* ```
|
|
3517
1108
|
*/
|
|
3518
|
-
|
|
1109
|
+
updateConfig(partialConfig: DeepPartial<AppConfig>): void;
|
|
3519
1110
|
/**
|
|
3520
1111
|
* 获取当前地图上所有禁扫区域数据
|
|
3521
1112
|
*
|
|
@@ -3534,6 +1125,12 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3534
1125
|
* @returns 区域数据数组
|
|
3535
1126
|
*/
|
|
3536
1127
|
getCleanZones(): ZoneParam[];
|
|
1128
|
+
/**
|
|
1129
|
+
* 获取当前地图上所有自定义地毯数据
|
|
1130
|
+
*
|
|
1131
|
+
* @returns 地毯数据数组
|
|
1132
|
+
*/
|
|
1133
|
+
getCustomCarpets(): CustomCarpetParam[];
|
|
3537
1134
|
/**
|
|
3538
1135
|
* 获取当前地图上所有虚拟墙数据
|
|
3539
1136
|
*
|
|
@@ -3546,109 +1143,16 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3546
1143
|
* @returns 定点清扫数据数组
|
|
3547
1144
|
*/
|
|
3548
1145
|
getSpots(): SpotParam[];
|
|
3549
|
-
/**
|
|
3550
|
-
* 获取当前地图上所有途径点数据
|
|
3551
|
-
*
|
|
3552
|
-
* @returns 途径点数据数组
|
|
3553
|
-
*/
|
|
3554
|
-
getWayPoints(): WayPointParam[];
|
|
3555
1146
|
/**
|
|
3556
1147
|
* 获取分割线有效端点
|
|
3557
1148
|
* @returns 分割线有效端点
|
|
3558
1149
|
*/
|
|
3559
1150
|
getEffectiveDividerPoints(): Point[] | null;
|
|
3560
|
-
/**
|
|
3561
|
-
* 获取当前地图上所有自定义地毯数据
|
|
3562
|
-
* @returns 地毯数据数组
|
|
3563
|
-
*/
|
|
3564
|
-
getCustomCarpets(): CustomCarpetParam[];
|
|
3565
1151
|
/**
|
|
3566
1152
|
* 获取分割线端点
|
|
3567
1153
|
* @returns 分割线端点
|
|
3568
|
-
*
|
|
3569
1154
|
*/
|
|
3570
1155
|
getDividerEndPoints(): Point[] | null;
|
|
3571
|
-
/**
|
|
3572
|
-
* 重置地图的平移和缩放状态
|
|
3573
|
-
*
|
|
3574
|
-
* 将地图的缩放和平移状态重置到初始位置,使地图完整显示在视口中。
|
|
3575
|
-
*/
|
|
3576
|
-
resetPanZoom(): void;
|
|
3577
|
-
/**
|
|
3578
|
-
* 强制结束当前正在进行的手势交互
|
|
3579
|
-
*
|
|
3580
|
-
* 当小程序侧检测到 touchend 或其他需要强制结束手势的情况时调用。
|
|
3581
|
-
*/
|
|
3582
|
-
forceEndGesture(): void;
|
|
3583
|
-
/**
|
|
3584
|
-
* 将地图适配到视图中,居中并缩放
|
|
3585
|
-
* @param mapBounds 地图边界信息
|
|
3586
|
-
* @param animate 是否使用动画过渡,默认为 false
|
|
3587
|
-
*/
|
|
3588
|
-
fitMapToView(mapBounds: Bounds, animate?: boolean): void;
|
|
3589
|
-
/* Excluded from this release type: calculateRotatedBounds */
|
|
3590
|
-
/**
|
|
3591
|
-
* 获取视口边界(供 Interaction 等组件使用)
|
|
3592
|
-
*/
|
|
3593
|
-
getViewportBounds(): {
|
|
3594
|
-
x: number;
|
|
3595
|
-
y: number;
|
|
3596
|
-
width: number;
|
|
3597
|
-
height: number;
|
|
3598
|
-
};
|
|
3599
|
-
/**
|
|
3600
|
-
* 更新运行时配置
|
|
3601
|
-
*
|
|
3602
|
-
* 动态更新地图应用的运行时配置,如显示设置、交互模式等。
|
|
3603
|
-
*
|
|
3604
|
-
* @param runtime - 要更新的运行时配置
|
|
3605
|
-
*/
|
|
3606
|
-
updateRuntime(runtime: DeepPartialRuntimeConfig): void;
|
|
3607
|
-
/**
|
|
3608
|
-
* 动态更新静态配置
|
|
3609
|
-
*
|
|
3610
|
-
* 支持增量更新配置对象,配置变化会自动通知订阅的组件进行重绘。
|
|
3611
|
-
* 主要用于主题切换、颜色调整等场景。
|
|
3612
|
-
*
|
|
3613
|
-
* @param partialConfig - 部分配置对象,支持深度增量更新
|
|
3614
|
-
*/
|
|
3615
|
-
updateConfig(partialConfig: DeepPartial<AppConfig>): void;
|
|
3616
|
-
/**
|
|
3617
|
-
* 将米转换为像素
|
|
3618
|
-
*
|
|
3619
|
-
* 根据地图分辨率将米单位转换为像素单位。
|
|
3620
|
-
*
|
|
3621
|
-
* @param meters - 米数值
|
|
3622
|
-
* @returns 像素值
|
|
3623
|
-
*/
|
|
3624
|
-
metersToPixels(meters: number): number;
|
|
3625
|
-
/**
|
|
3626
|
-
* 将像素转换为米
|
|
3627
|
-
*
|
|
3628
|
-
* 根据地图分辨率将像素单位转换为米单位。
|
|
3629
|
-
*
|
|
3630
|
-
* @param pixels - 像素值
|
|
3631
|
-
* @returns 米数值
|
|
3632
|
-
*/
|
|
3633
|
-
pixelsToMeters(pixels: number): number;
|
|
3634
|
-
/**
|
|
3635
|
-
* 将基础尺寸转换为固定显示尺寸(不受缩放影响)
|
|
3636
|
-
*
|
|
3637
|
-
* 基础尺寸是基于 scale=1 的标准尺寸,需要根据当前缩放级别进行调整。
|
|
3638
|
-
*
|
|
3639
|
-
* @param baseSize - 基础尺寸
|
|
3640
|
-
* @param currentScale - 当前缩放级别,不传则自动获取
|
|
3641
|
-
* @returns 固定显示尺寸
|
|
3642
|
-
*/
|
|
3643
|
-
toFixedSize(baseSize: number, currentScale?: number): number;
|
|
3644
|
-
/**
|
|
3645
|
-
* 将固定显示尺寸转换为基础尺寸(反向转换)
|
|
3646
|
-
*
|
|
3647
|
-
* @param fixedSize - 固定显示尺寸
|
|
3648
|
-
* @param currentScale - 当前缩放级别,不传则自动获取
|
|
3649
|
-
* @returns 基础尺寸
|
|
3650
|
-
*/
|
|
3651
|
-
fromFixedSize(fixedSize: number, currentScale?: number): number;
|
|
3652
1156
|
/**
|
|
3653
1157
|
* 获取当前视口中心点坐标
|
|
3654
1158
|
*
|
|
@@ -3733,6 +1237,35 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3733
1237
|
offsetX?: number;
|
|
3734
1238
|
offsetY?: number;
|
|
3735
1239
|
}): Point[];
|
|
1240
|
+
/**
|
|
1241
|
+
* 绘制家具
|
|
1242
|
+
*
|
|
1243
|
+
* 通过 diff 机制驱动家具的增删改:
|
|
1244
|
+
* - 新 ID 会被添加
|
|
1245
|
+
* - 已有 ID 的数据变化会被更新
|
|
1246
|
+
* - 不在列表中的已有 ID 会被移除
|
|
1247
|
+
* - 传入空数组即清空所有家具
|
|
1248
|
+
*
|
|
1249
|
+
* @param items - 家具数据数组
|
|
1250
|
+
*/
|
|
1251
|
+
drawFurnitures(items: FurnitureParam[]): void;
|
|
1252
|
+
/**
|
|
1253
|
+
* 基于视口中心生成家具顶点坐标
|
|
1254
|
+
*
|
|
1255
|
+
* 根据当前视口中心位置和指定的家具类型,生成家具的四个顶点坐标。
|
|
1256
|
+
* 初始尺寸来源于 config.furniture.assets 中对应类型的 width/height。
|
|
1257
|
+
*
|
|
1258
|
+
* @param options - 配置选项
|
|
1259
|
+
* @param options.furnitureType - 家具类型编号,匹配 config.furniture.assets 中的 type
|
|
1260
|
+
* @param options.offsetX - X方向像素偏移,默认为 0
|
|
1261
|
+
* @param options.offsetY - Y方向像素偏移,默认为 0
|
|
1262
|
+
* @returns 家具的四个顶点坐标数组
|
|
1263
|
+
*/
|
|
1264
|
+
getFurniturePointsByViewportCenter(options?: {
|
|
1265
|
+
furnitureType?: number;
|
|
1266
|
+
offsetX?: number;
|
|
1267
|
+
offsetY?: number;
|
|
1268
|
+
}): Point[];
|
|
3736
1269
|
/**
|
|
3737
1270
|
* 基于视口中心生成定点清扫的点坐标
|
|
3738
1271
|
*
|
|
@@ -3756,9 +1289,22 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3756
1289
|
*
|
|
3757
1290
|
* @param roomIds - 要检测的房间ID数组
|
|
3758
1291
|
* @returns 是否所有指定的房间都相邻(连通)
|
|
3759
|
-
*
|
|
3760
1292
|
*/
|
|
3761
1293
|
areRoomsAdjacent(roomIds: number[]): boolean;
|
|
1294
|
+
/**
|
|
1295
|
+
* 判断一个点是否与充电桩或机器人距离小于阈值。
|
|
1296
|
+
*
|
|
1297
|
+
* @param points - 点坐标数组
|
|
1298
|
+
* @param thresholdMeters - 阈值距离,单位米
|
|
1299
|
+
* @param options - 配置选项
|
|
1300
|
+
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
1301
|
+
* @param options.checkRobot - 是否检查与机器人的距离,默认为 false
|
|
1302
|
+
* @returns 是否在判定范围内(true 表示过近,false 表示距离足够)
|
|
1303
|
+
*/
|
|
1304
|
+
isNearChargerOrRobot(points: Point[], thresholdMeters: number, options?: {
|
|
1305
|
+
checkCharger?: boolean;
|
|
1306
|
+
checkRobot?: boolean;
|
|
1307
|
+
}): boolean;
|
|
3762
1308
|
/**
|
|
3763
1309
|
* 判断一个点是否在任意房间内
|
|
3764
1310
|
*
|
|
@@ -3768,7 +1314,6 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3768
1314
|
*
|
|
3769
1315
|
* @param point - 待检测的点坐标(机器坐标系,与Zone、VirtualWall等使用相同的坐标系)
|
|
3770
1316
|
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
3771
|
-
*
|
|
3772
1317
|
*/
|
|
3773
1318
|
isPointInAnyRoom(point: Point): RoomData | null;
|
|
3774
1319
|
/**
|
|
@@ -3780,9 +1325,8 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3780
1325
|
*
|
|
3781
1326
|
* @param points - 墙体的两个端点坐标(机器坐标系,与VirtualWall等使用相同的坐标系)
|
|
3782
1327
|
* @returns 如果有交集返回 true,否则返回 false
|
|
3783
|
-
*
|
|
3784
1328
|
*/
|
|
3785
|
-
isWallIntersectsAnyRoom(points: Point
|
|
1329
|
+
isWallIntersectsAnyRoom(points: [Point, Point]): boolean;
|
|
3786
1330
|
/**
|
|
3787
1331
|
* 判断区域(矩形)是否与任意房间有交集
|
|
3788
1332
|
*
|
|
@@ -3792,61 +1336,43 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3792
1336
|
*
|
|
3793
1337
|
* @param points - 区域的四个顶点坐标(机器坐标系,与Zone等使用相同的坐标系)
|
|
3794
1338
|
* @returns 如果有交集返回 true,否则返回 false
|
|
3795
|
-
*
|
|
3796
|
-
*/
|
|
3797
|
-
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
3798
|
-
/**
|
|
3799
|
-
* 判断点、墙体或区域是否距离充电桩或机器人位置过近
|
|
3800
|
-
*
|
|
3801
|
-
* 根据给定的坐标集合(点1个、墙体2个点或区域4个点)和判定阈值,
|
|
3802
|
-
* 计算其与充电桩和/或机器人位置的最小距离,判断是否在阈值范围内。
|
|
3803
|
-
*
|
|
3804
|
-
* @param points - 点(1个)、墙体(2个点)或区域(4个点)的坐标集合(机器坐标系)
|
|
3805
|
-
* @param thresholdMeters - 判定阈值,单位为米
|
|
3806
|
-
* @param options - 配置选项
|
|
3807
|
-
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
3808
|
-
* @param options.checkRobot - 是否检查与机器人的距离,默认为 false
|
|
3809
|
-
* @returns 是否在判定范围内(true 表示过近,false 表示距离足够)
|
|
3810
|
-
*
|
|
3811
1339
|
*/
|
|
3812
|
-
|
|
3813
|
-
checkCharger?: boolean;
|
|
3814
|
-
checkRobot?: boolean;
|
|
3815
|
-
}): boolean;
|
|
1340
|
+
isZoneIntersectsAnyRoom(points: [Point, Point, Point, Point]): boolean;
|
|
3816
1341
|
/**
|
|
3817
1342
|
* 地图截图
|
|
3818
1343
|
*
|
|
3819
|
-
*
|
|
3820
|
-
*
|
|
1344
|
+
* 将当前地图状态导出为图片。截图过程中会自动添加一个临时的背景层,
|
|
1345
|
+
* 确保禁区等半透明元素在截图中能够正确显示颜色。
|
|
3821
1346
|
*
|
|
3822
1347
|
* @param options - 截图配置选项
|
|
3823
1348
|
* @param options.backgroundColor - 指定截图时的背景颜色。若不指定,将默认使用 `global.config.backgroundColor`。支持颜色字符串、十六进制数值或 RGB 数组。
|
|
3824
1349
|
* @returns Promise<string> Base64 格式的图片数据 (Data URL)
|
|
3825
|
-
*
|
|
3826
1350
|
*/
|
|
3827
1351
|
snapshot(options?: {
|
|
3828
1352
|
backgroundColor?: ColorSource;
|
|
3829
1353
|
}): Promise<string>;
|
|
3830
1354
|
/**
|
|
3831
|
-
*
|
|
3832
|
-
*
|
|
3833
|
-
*
|
|
3834
|
-
*
|
|
3835
|
-
*
|
|
3836
|
-
* @param data - 地图数据对象
|
|
3837
|
-
* @param data.map - 地图字符串数据
|
|
3838
|
-
* @param data.path - 可选的路径数据
|
|
3839
|
-
* @param data.roomProperties - 可选的房间属性数据
|
|
3840
|
-
* @param data.customElements - 可选的自定义元素数据
|
|
3841
|
-
* @param data.forbiddenSweepZones - 可选的禁扫区域数据
|
|
3842
|
-
* @param data.forbiddenMopZones - 可选的禁拖区域数据
|
|
3843
|
-
* @param data.virtualWalls - 可选的虚拟墙数据
|
|
3844
|
-
* @param data.detectedObjects - 可选的检测物体数据
|
|
3845
|
-
* @param runtime - 可选的运行时配置
|
|
3846
|
-
* @returns Promise<string> Base64 格式的图片数据
|
|
1355
|
+
* 使用自定义地图数据生成截图
|
|
1356
|
+
*
|
|
1357
|
+
* 基于提供的地图、路径、区域等数据生成截图,通常用于多地图管理界面的缩略图预览。
|
|
1358
|
+
* 此方法会创建一个临时的离屏渲染实例,不会影响当前正在运行的地图显示状态。
|
|
3847
1359
|
*
|
|
1360
|
+
* @param data - 包含地图、路径、区域等完整状态的数据对象
|
|
1361
|
+
* @param data.map - 地图原始字符串数据 (支持结构化协议和栅格协议)
|
|
1362
|
+
* @param data.path - 可选的路径协议字符串
|
|
1363
|
+
* @param data.roomProperties - 可选的房间属性数据数组
|
|
1364
|
+
* @param data.customElements - 可选的自定义元素数组
|
|
1365
|
+
* @param data.forbiddenSweepZones - 可选的禁扫区域数组
|
|
1366
|
+
* @param data.forbiddenMopZones - 可选的禁拖区域数组
|
|
1367
|
+
* @param data.virtualWalls - 可选的虚拟墙数组
|
|
1368
|
+
* @param data.detectedObjects - 可选的 AI 物体检测数据数组
|
|
1369
|
+
* @param data.furnitures - 可选的家具数据数组
|
|
1370
|
+
* @param runtime - 可选的运行时配置 (如是否显示机器人、充电桩等状态)
|
|
1371
|
+
* @param options - 截图配置选项
|
|
1372
|
+
* @param options.backgroundColor - 指定生成截图时的背景颜色。若不指定,将默认使用 `global.config.backgroundColor`。
|
|
1373
|
+
* @returns Promise<string> Base64 格式的图片数据 (Data URL)
|
|
3848
1374
|
*/
|
|
3849
|
-
snapshotByData(
|
|
1375
|
+
snapshotByData(data: {
|
|
3850
1376
|
map: string;
|
|
3851
1377
|
path?: string;
|
|
3852
1378
|
roomProperties?: RoomProperty[];
|
|
@@ -3855,43 +1381,28 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3855
1381
|
forbiddenMopZones?: ZoneParam[];
|
|
3856
1382
|
virtualWalls?: VirtualWallParam[];
|
|
3857
1383
|
detectedObjects?: DetectedObjectParam[];
|
|
1384
|
+
furnitures?: FurnitureParam[];
|
|
3858
1385
|
}, runtime?: DeepPartialRuntimeConfig, options?: {
|
|
3859
1386
|
backgroundColor?: ColorSource;
|
|
3860
1387
|
}): Promise<string>;
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
private initializeInteraction;
|
|
3880
|
-
/**
|
|
3881
|
-
* 智能 Ticker 管理 - 延迟停止渲染
|
|
3882
|
-
*/
|
|
3883
|
-
private scheduleStopRender;
|
|
3884
|
-
/**
|
|
3885
|
-
* 通用的Zone点生成逻辑
|
|
3886
|
-
*/
|
|
3887
|
-
private generateZonePoints;
|
|
3888
|
-
/**
|
|
3889
|
-
* 预加载应用所需的资源
|
|
3890
|
-
*/
|
|
3891
|
-
private preloadAssets;
|
|
3892
|
-
/* Excluded from this release type: setupMapRotationListener */
|
|
3893
|
-
/* Excluded from this release type: applyMapRotation */
|
|
3894
|
-
private onVisibilityChange;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* MapApplication 实例公开能力(供宿主应用与调试工具使用)
|
|
1392
|
+
*/
|
|
1393
|
+
export declare type MapApplicationInstance = {
|
|
1394
|
+
canvas: HTMLCanvasElement
|
|
1395
|
+
runtime: RuntimeConfig
|
|
1396
|
+
events?: AppOptions['events']
|
|
1397
|
+
initialize: (
|
|
1398
|
+
options: Partial<ApplicationOptions> & AppOptions,
|
|
1399
|
+
) => Promise<void>
|
|
1400
|
+
destroy: () => void
|
|
1401
|
+
drawMap: (mapData: unknown) => Promise<void>
|
|
1402
|
+
drawRasterMap: (mapData: unknown) => Promise<void>
|
|
1403
|
+
drawPath: (pathData: unknown) => void
|
|
1404
|
+
drawRoomProperty: (roomData: unknown[]) => Promise<void>
|
|
1405
|
+
updateRuntime: (runtime: DeepPartialRuntimeConfig) => void
|
|
3895
1406
|
}
|
|
3896
1407
|
|
|
3897
1408
|
/**
|
|
@@ -4179,6 +1690,26 @@ export declare interface MapCallbacks {
|
|
|
4179
1690
|
*
|
|
4180
1691
|
*/
|
|
4181
1692
|
onUpdateCustomCarpet?: (carpet: CustomCarpetParam) => void;
|
|
1693
|
+
/**
|
|
1694
|
+
* 点击家具删除按钮的回调
|
|
1695
|
+
*
|
|
1696
|
+
* @param id - 被删除的家具ID
|
|
1697
|
+
*/
|
|
1698
|
+
onRemoveFurniture?: (id: string) => void;
|
|
1699
|
+
/**
|
|
1700
|
+
* 更新家具的回调
|
|
1701
|
+
*
|
|
1702
|
+
* 当用户操作家具(如拖拽、缩放、旋转)后触发。
|
|
1703
|
+
*
|
|
1704
|
+
* @param furniture - 更新后的家具数据
|
|
1705
|
+
*/
|
|
1706
|
+
onUpdateFurniture?: (furniture: FurnitureParam) => void;
|
|
1707
|
+
/**
|
|
1708
|
+
* 点击家具回调
|
|
1709
|
+
*
|
|
1710
|
+
* @param furniture - 被点击的家具数据
|
|
1711
|
+
*/
|
|
1712
|
+
onClickFurniture?: (furniture: FurnitureParam) => void;
|
|
4182
1713
|
onGestureStart?: () => void;
|
|
4183
1714
|
/**
|
|
4184
1715
|
* 手势交互结束回调
|
|
@@ -4253,143 +1784,6 @@ export declare type MapDataSource = {
|
|
|
4253
1784
|
version: string
|
|
4254
1785
|
}
|
|
4255
1786
|
|
|
4256
|
-
declare class MapManager_2 {
|
|
4257
|
-
private appService;
|
|
4258
|
-
obstacle: Obstacle;
|
|
4259
|
-
free: Free;
|
|
4260
|
-
roomFill: RoomFill;
|
|
4261
|
-
carpet: Carpet;
|
|
4262
|
-
chargingStation: ChargingStation;
|
|
4263
|
-
mapBounds: Bounds;
|
|
4264
|
-
private lastMapId;
|
|
4265
|
-
private lastOrigin;
|
|
4266
|
-
private lastSize;
|
|
4267
|
-
private lastStatus;
|
|
4268
|
-
private roomGeometryMap;
|
|
4269
|
-
private rasterRoomPixelsMap;
|
|
4270
|
-
private fourColorCache;
|
|
4271
|
-
private carpetData;
|
|
4272
|
-
private unsubscribeFns;
|
|
4273
|
-
constructor(appService: AppService);
|
|
4274
|
-
/**
|
|
4275
|
-
* 处理结构化地图数据(房间形状、障碍物等)
|
|
4276
|
-
*/
|
|
4277
|
-
drawMap(mapData: StructuredMapDataSource): Promise<boolean>;
|
|
4278
|
-
/**
|
|
4279
|
-
* 处理栅格地图数据
|
|
4280
|
-
* @param mapPointsStr 栅格数据字符串
|
|
4281
|
-
* @param width 地图宽度
|
|
4282
|
-
* @param height 地图高度
|
|
4283
|
-
* @param charger 充电桩信息
|
|
4284
|
-
*/
|
|
4285
|
-
drawRasterMap(rasterData: ParsedRasterMapData_2, mapState: MapState): Promise<boolean>;
|
|
4286
|
-
/**
|
|
4287
|
-
* 重置几何数据和边界
|
|
4288
|
-
*/
|
|
4289
|
-
private resetGeometryData;
|
|
4290
|
-
/**
|
|
4291
|
-
* 判断是否需要触发fitMapToView
|
|
4292
|
-
* @param currentMapId 当前地图ID
|
|
4293
|
-
* @param currentStatus 当前地图状态
|
|
4294
|
-
* @param currentOrigin 当前地图原点
|
|
4295
|
-
* @returns 是否需要触发fitMapToView
|
|
4296
|
-
*/
|
|
4297
|
-
private shouldFitMapToView;
|
|
4298
|
-
/**
|
|
4299
|
-
* 将栅格数据转换为结构化数据格式
|
|
4300
|
-
* @param carpetPixels 地毯像素数据
|
|
4301
|
-
* @param mapWidth 地图宽度
|
|
4302
|
-
* @returns 结构化地毯数据数组
|
|
4303
|
-
*/
|
|
4304
|
-
private convertRasterToStructuredData;
|
|
4305
|
-
/**
|
|
4306
|
-
* 更新地毯显示
|
|
4307
|
-
* 类似于RoomFloorType的模式,根据当前状态决定是否重建地毯
|
|
4308
|
-
*/
|
|
4309
|
-
private createCarpet;
|
|
4310
|
-
/**
|
|
4311
|
-
* 处理房间几何数据,计算所有需要的几何信息
|
|
4312
|
-
* 返回所有房间的几何数据(包括正常房间和未知房间)
|
|
4313
|
-
*/
|
|
4314
|
-
private processRoomsGeometry;
|
|
4315
|
-
/**
|
|
4316
|
-
* 合并所有图层的边界
|
|
4317
|
-
*/
|
|
4318
|
-
private mergeLayerBounds;
|
|
4319
|
-
/**
|
|
4320
|
-
* 根据ID查找房间几何信息
|
|
4321
|
-
*/
|
|
4322
|
-
getRoomById(id: number): Room | undefined;
|
|
4323
|
-
/**
|
|
4324
|
-
* 获取所有房间的几何信息
|
|
4325
|
-
*/
|
|
4326
|
-
getAllRooms(): Room[];
|
|
4327
|
-
/**
|
|
4328
|
-
* 判断墙体(线段)是否与任意房间有交集
|
|
4329
|
-
* @param points 墙体的两个端点坐标(机器坐标系)
|
|
4330
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
4331
|
-
*/
|
|
4332
|
-
isWallIntersectsAnyRoom(points: Point[]): boolean;
|
|
4333
|
-
/**
|
|
4334
|
-
* 判断区域(矩形)是否与任意房间有交集
|
|
4335
|
-
* @param points 区域的四个顶点坐标(机器坐标系)
|
|
4336
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
4337
|
-
*/
|
|
4338
|
-
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
4339
|
-
/**
|
|
4340
|
-
* 判断指定的房间是否相邻(连通)
|
|
4341
|
-
* @param roomIds 要检测的房间ID数组
|
|
4342
|
-
* @returns 是否所有指定的房间都相邻(连通)
|
|
4343
|
-
*/
|
|
4344
|
-
areRoomsAdjacent(roomIds: number[]): boolean;
|
|
4345
|
-
/* Excluded from this release type: areStructuredRoomsAdjacentInternal */
|
|
4346
|
-
/* Excluded from this release type: areRasterRoomsAdjacentInternal */
|
|
4347
|
-
/**
|
|
4348
|
-
* 判断一个点是否在任意房间内
|
|
4349
|
-
* @param point 待检测的点坐标(机器坐标系)
|
|
4350
|
-
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
4351
|
-
*/
|
|
4352
|
-
isPointInAnyRoom(point: Point): RoomData | null;
|
|
4353
|
-
/* Excluded from this release type: isPointInAnyRoomStructuredInternal */
|
|
4354
|
-
/* Excluded from this release type: isPointInAnyRoomRasterInternal */
|
|
4355
|
-
/**
|
|
4356
|
-
* 清空地图组件
|
|
4357
|
-
*/
|
|
4358
|
-
private clearComponents;
|
|
4359
|
-
/**
|
|
4360
|
-
* 处理栅格数据,统一处理排序和颜色分配
|
|
4361
|
-
* @param rasterData 原始栅格数据
|
|
4362
|
-
* @returns 处理后的栅格数据,包含排序和颜色信息
|
|
4363
|
-
*/
|
|
4364
|
-
private processRasterData;
|
|
4365
|
-
/**
|
|
4366
|
-
* 为栅格地图生成房间几何信息供 RoomManager 使用
|
|
4367
|
-
* @param rasterData 解析后的栅格数据
|
|
4368
|
-
*/
|
|
4369
|
-
private generateRoomGeometryFromRaster;
|
|
4370
|
-
/**
|
|
4371
|
-
* 获取点阵房间的像素数据
|
|
4372
|
-
* @param roomId 房间ID
|
|
4373
|
-
* @returns 像素索引数组,如果不存在则返回 undefined
|
|
4374
|
-
*/
|
|
4375
|
-
getRasterRoomPixels(roomId: number): Uint32Array | undefined;
|
|
4376
|
-
/**
|
|
4377
|
-
* 验证颜色配置
|
|
4378
|
-
* @private
|
|
4379
|
-
*/
|
|
4380
|
-
private validateColorConfig;
|
|
4381
|
-
/**
|
|
4382
|
-
* 使用四色算法分配房间颜色
|
|
4383
|
-
* @param roomData 房间数据数组
|
|
4384
|
-
* @param colorCount 可用颜色数量
|
|
4385
|
-
* @param mapType 地图类型
|
|
4386
|
-
* @returns 房间ID到颜色索引的映射
|
|
4387
|
-
* @private
|
|
4388
|
-
*/
|
|
4389
|
-
private assignColorsUsingFourColorAlgorithm;
|
|
4390
|
-
destroy(): void;
|
|
4391
|
-
}
|
|
4392
|
-
|
|
4393
1787
|
/**
|
|
4394
1788
|
* 地图状态对象
|
|
4395
1789
|
*
|
|
@@ -4411,106 +1805,26 @@ export declare type MapState = {
|
|
|
4411
1805
|
/** 充电桩坐标 */
|
|
4412
1806
|
charger: Point
|
|
4413
1807
|
/** 充电桩方向 */
|
|
4414
|
-
chargerDirection: number
|
|
4415
|
-
/**
|
|
4416
|
-
* 地图协议版本号
|
|
4417
|
-
*/
|
|
4418
|
-
version?: number
|
|
4419
|
-
/**
|
|
4420
|
-
* 地图类型
|
|
4421
|
-
* - 'structured': 结构化地图(基于轮廓点)
|
|
4422
|
-
* - 'raster': 点阵地图(基于像素)
|
|
4423
|
-
*/
|
|
4424
|
-
mapType?: MapType
|
|
4425
|
-
}
|
|
4426
|
-
|
|
4427
|
-
/**
|
|
4428
|
-
* 地图类型
|
|
4429
|
-
*/
|
|
4430
|
-
export declare type MapType = 'structured' | 'raster'
|
|
4431
|
-
|
|
4432
|
-
/** 测量单位 */
|
|
4433
|
-
export declare type MeasurementUnit = 'meter' | 'feet' | 'centimeter'
|
|
4434
|
-
|
|
4435
|
-
declare class MoveControlButton extends BaseControlButton<MoveControlButtonOptions> {
|
|
4436
|
-
protected appService: AppService;
|
|
4437
|
-
private isMoving;
|
|
4438
|
-
private dragStartPosition;
|
|
4439
|
-
constructor(appService: AppService, options: MoveControlButtonOptions);
|
|
4440
|
-
/**
|
|
4441
|
-
* 设置移动事件监听
|
|
4442
|
-
*/
|
|
4443
|
-
private setupMoveEventListeners;
|
|
4444
|
-
/**
|
|
4445
|
-
* 清理移动事件监听
|
|
4446
|
-
*/
|
|
4447
|
-
private cleanupMoveEventListeners;
|
|
4448
|
-
/**
|
|
4449
|
-
* 设置手势事件监听
|
|
4450
|
-
*/
|
|
4451
|
-
protected setupEvents(): void;
|
|
4452
|
-
/**
|
|
4453
|
-
* 处理指针按下事件(开始移动)
|
|
4454
|
-
*/
|
|
4455
|
-
private handlePointerDown;
|
|
4456
|
-
/**
|
|
4457
|
-
* 开始移动
|
|
4458
|
-
*/
|
|
4459
|
-
private startMoving;
|
|
4460
|
-
/**
|
|
4461
|
-
* 处理移动过程中的指针移动
|
|
4462
|
-
*/
|
|
4463
|
-
private handleMovePointerMove;
|
|
4464
|
-
/**
|
|
4465
|
-
* 处理移动结束
|
|
4466
|
-
*/
|
|
4467
|
-
private handleMovePointerUp;
|
|
4468
|
-
/**
|
|
4469
|
-
* 处理移动取消(多点触控干扰)
|
|
4470
|
-
*/
|
|
4471
|
-
private handleMoveCancel;
|
|
4472
|
-
/**
|
|
4473
|
-
* 获取是否正在移动
|
|
4474
|
-
*/
|
|
4475
|
-
isCurrentlyMoving(): boolean;
|
|
4476
|
-
/**
|
|
4477
|
-
* 获取拖拽开始位置
|
|
4478
|
-
*/
|
|
4479
|
-
getDragStartPosition(): Point | null;
|
|
1808
|
+
chargerDirection: number
|
|
4480
1809
|
/**
|
|
4481
|
-
*
|
|
1810
|
+
* 地图协议版本号
|
|
4482
1811
|
*/
|
|
4483
|
-
|
|
1812
|
+
version?: number
|
|
4484
1813
|
/**
|
|
4485
|
-
*
|
|
1814
|
+
* 地图类型
|
|
1815
|
+
* - 'structured': 结构化地图(基于轮廓点)
|
|
1816
|
+
* - 'raster': 点阵地图(基于像素)
|
|
4486
1817
|
*/
|
|
4487
|
-
|
|
1818
|
+
mapType?: MapType
|
|
4488
1819
|
}
|
|
4489
1820
|
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
};
|
|
1821
|
+
/**
|
|
1822
|
+
* 地图类型
|
|
1823
|
+
*/
|
|
1824
|
+
export declare type MapType = 'structured' | 'raster'
|
|
4495
1825
|
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
constructor(appService: AppService);
|
|
4499
|
-
/**
|
|
4500
|
-
* 绘制结构化障碍物数据
|
|
4501
|
-
* @param obstacles 障碍物数据数组
|
|
4502
|
-
*/
|
|
4503
|
-
draw(obstacles: {
|
|
4504
|
-
coordinates: number[];
|
|
4505
|
-
}[]): void;
|
|
4506
|
-
/**
|
|
4507
|
-
* 绘制栅格障碍物数据
|
|
4508
|
-
* @param obstacleIndices 障碍物像素点索引数组
|
|
4509
|
-
* @param width 地图宽度
|
|
4510
|
-
*/
|
|
4511
|
-
drawRaster(obstacleIndices: Uint32Array, width: number): void;
|
|
4512
|
-
destroy(options?: DestroyOptions | boolean): void;
|
|
4513
|
-
}
|
|
1826
|
+
/** 测量单位 */
|
|
1827
|
+
export declare type MeasurementUnit = 'meter' | 'feet' | 'centimeter'
|
|
4514
1828
|
|
|
4515
1829
|
/**
|
|
4516
1830
|
* 对点位进行偏移,避免与已存在的点位重叠
|
|
@@ -4521,14 +1835,6 @@ declare class Obstacle extends Graphics {
|
|
|
4521
1835
|
*/
|
|
4522
1836
|
export declare const offsetPointsToAvoidOverlap: (points: Point[], existingPointsArray: Point[][], maxAttempts?: number) => Point[];
|
|
4523
1837
|
|
|
4524
|
-
declare type OperationState = {
|
|
4525
|
-
isDragging: boolean;
|
|
4526
|
-
isScaling: boolean;
|
|
4527
|
-
isRotating: boolean;
|
|
4528
|
-
isMoving: boolean;
|
|
4529
|
-
hasAnyOperation: boolean;
|
|
4530
|
-
};
|
|
4531
|
-
|
|
4532
1838
|
/**
|
|
4533
1839
|
* 解析后的点阵地图数据
|
|
4534
1840
|
*/
|
|
@@ -4547,135 +1853,6 @@ export declare type ParsedRasterMapData = {
|
|
|
4547
1853
|
totalPixels: number
|
|
4548
1854
|
}
|
|
4549
1855
|
|
|
4550
|
-
declare class Path extends Container {
|
|
4551
|
-
private appService;
|
|
4552
|
-
private commonPath;
|
|
4553
|
-
private chargePath;
|
|
4554
|
-
private transitionsPath;
|
|
4555
|
-
private mopPath;
|
|
4556
|
-
private mopPathTrack;
|
|
4557
|
-
private mopPathTrackContainer;
|
|
4558
|
-
private debugPoints;
|
|
4559
|
-
private pathData;
|
|
4560
|
-
private lastPointCount;
|
|
4561
|
-
private lastDrawnPosition;
|
|
4562
|
-
private isRealTimeDrawing;
|
|
4563
|
-
private throttledUpdateLineWidth;
|
|
4564
|
-
private throttledHandleRobotPosition;
|
|
4565
|
-
private unsubscribeFns;
|
|
4566
|
-
constructor(appService: AppService);
|
|
4567
|
-
/**
|
|
4568
|
-
* 注册事件监听
|
|
4569
|
-
*/
|
|
4570
|
-
private registerEventListeners;
|
|
4571
|
-
/**
|
|
4572
|
-
* 处理机器人动画完成事件
|
|
4573
|
-
*/
|
|
4574
|
-
private handleRobotAnimationComplete;
|
|
4575
|
-
/**
|
|
4576
|
-
* 实际处理机器人位置更新的方法
|
|
4577
|
-
*/
|
|
4578
|
-
private handleRobotPositionUpdate;
|
|
4579
|
-
/**
|
|
4580
|
-
* 更新线宽以响应缩放变化
|
|
4581
|
-
*/
|
|
4582
|
-
private updateLineWidth;
|
|
4583
|
-
/**
|
|
4584
|
-
* 重新绘制路径,应用适当的线宽
|
|
4585
|
-
* @param pathData 路径数据
|
|
4586
|
-
*/
|
|
4587
|
-
private redrawPaths;
|
|
4588
|
-
/**
|
|
4589
|
-
* 设置各类路径的样式
|
|
4590
|
-
*/
|
|
4591
|
-
private setupPathStyles;
|
|
4592
|
-
/**
|
|
4593
|
-
* 绘制路径线段
|
|
4594
|
-
* @param pathPoints 路径点数组
|
|
4595
|
-
*/
|
|
4596
|
-
private drawPathSegments;
|
|
4597
|
-
/**
|
|
4598
|
-
* 调试模式下绘制路径点方块
|
|
4599
|
-
* @param pathPoints 路径点数组
|
|
4600
|
-
*/
|
|
4601
|
-
private drawDebugPoints;
|
|
4602
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
4603
|
-
/**
|
|
4604
|
-
* 全量绘制路径
|
|
4605
|
-
* @param pathData 路径数据
|
|
4606
|
-
*/
|
|
4607
|
-
drawFull(pathData: PathData): void;
|
|
4608
|
-
/**
|
|
4609
|
-
* 增量绘制路径(启用实时绘制模式)
|
|
4610
|
-
* @param pathData 路径数据
|
|
4611
|
-
*/
|
|
4612
|
-
drawIncremental(pathData: PathData): void;
|
|
4613
|
-
/**
|
|
4614
|
-
* 直接绘制新增的路径段(用于速度为0的情况)
|
|
4615
|
-
* @param newPoints 新增的路径点
|
|
4616
|
-
* @param lastCount 上次绘制的点数
|
|
4617
|
-
* @param allPoints 所有路径点(新数据)
|
|
4618
|
-
* @param oldPoints 旧的路径点数据(用于获取连接点)
|
|
4619
|
-
*/
|
|
4620
|
-
private drawNewPathSegments;
|
|
4621
|
-
/**
|
|
4622
|
-
* 停止实时绘制模式
|
|
4623
|
-
*/
|
|
4624
|
-
stopRealTimeDrawing(): void;
|
|
4625
|
-
/**
|
|
4626
|
-
* 清除所有路径数据
|
|
4627
|
-
*/
|
|
4628
|
-
clear(): void;
|
|
4629
|
-
destroy(options?: {
|
|
4630
|
-
children?: boolean;
|
|
4631
|
-
texture?: boolean;
|
|
4632
|
-
baseTexture?: boolean;
|
|
4633
|
-
}): void;
|
|
4634
|
-
}
|
|
4635
|
-
|
|
4636
|
-
declare class PathManager_2 {
|
|
4637
|
-
private appService;
|
|
4638
|
-
path: Path;
|
|
4639
|
-
robot: Robot;
|
|
4640
|
-
private unsubscribeFns;
|
|
4641
|
-
private lastDrawnPathData;
|
|
4642
|
-
constructor(appService: AppService);
|
|
4643
|
-
/**
|
|
4644
|
-
* 绘制路径和机器人
|
|
4645
|
-
*/
|
|
4646
|
-
draw(pathData: PathData): void;
|
|
4647
|
-
/**
|
|
4648
|
-
* 判断是否应该使用增量绘制
|
|
4649
|
-
*/
|
|
4650
|
-
private shouldUseIncrementalDraw;
|
|
4651
|
-
/**
|
|
4652
|
-
* 全量绘制模式:完整绘制路径和机器人(初始绘制和不满足增量条件时使用)
|
|
4653
|
-
*/
|
|
4654
|
-
private fullDraw;
|
|
4655
|
-
/**
|
|
4656
|
-
* 转换PathPoint为RobotPoint
|
|
4657
|
-
*/
|
|
4658
|
-
private convertToRobotPoint;
|
|
4659
|
-
/**
|
|
4660
|
-
* 处理机器人移动到指定点
|
|
4661
|
-
*/
|
|
4662
|
-
private moveRobotToPoint;
|
|
4663
|
-
/**
|
|
4664
|
-
* 增量绘制模式:只绘制新增部分,机器人平滑动画到新位置
|
|
4665
|
-
*/
|
|
4666
|
-
private incrementalDraw;
|
|
4667
|
-
/**
|
|
4668
|
-
* 批量处理机器人动画队列(用于快速跳转)
|
|
4669
|
-
*/
|
|
4670
|
-
batchProcessRobotQueue(jumpToLatest?: boolean): void;
|
|
4671
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
4672
|
-
/**
|
|
4673
|
-
* 清除路径和机器人数据
|
|
4674
|
-
*/
|
|
4675
|
-
clear(): void;
|
|
4676
|
-
destroy(): void;
|
|
4677
|
-
}
|
|
4678
|
-
|
|
4679
1856
|
/**
|
|
4680
1857
|
* 路径状态对象
|
|
4681
1858
|
* 描述机器人路径的状态信息
|
|
@@ -4723,55 +1900,6 @@ export declare type ProcessedRasterData = {
|
|
|
4723
1900
|
totalPixels: number
|
|
4724
1901
|
}
|
|
4725
1902
|
|
|
4726
|
-
declare class PulseCircle extends Graphics {
|
|
4727
|
-
private appService;
|
|
4728
|
-
private currentPosition;
|
|
4729
|
-
private animationStartTime;
|
|
4730
|
-
private isAnimating;
|
|
4731
|
-
constructor(appService: AppService);
|
|
4732
|
-
/**
|
|
4733
|
-
* 设置反向缩放监听,保持描边宽度固定
|
|
4734
|
-
*/
|
|
4735
|
-
private setupAntiScaleListener;
|
|
4736
|
-
/**
|
|
4737
|
-
* 反向缩放事件处理
|
|
4738
|
-
*/
|
|
4739
|
-
private handleScaleChange;
|
|
4740
|
-
/**
|
|
4741
|
-
* 绘制脉冲圆圈
|
|
4742
|
-
* @param position 圆圈中心位置
|
|
4743
|
-
*/
|
|
4744
|
-
draw(position: Point): void;
|
|
4745
|
-
/**
|
|
4746
|
-
* 启动呼吸动画
|
|
4747
|
-
*/
|
|
4748
|
-
private startAnimation;
|
|
4749
|
-
/**
|
|
4750
|
-
* 停止呼吸动画
|
|
4751
|
-
*/
|
|
4752
|
-
private stopAnimation;
|
|
4753
|
-
/**
|
|
4754
|
-
* 动画更新函数
|
|
4755
|
-
*/
|
|
4756
|
-
private updateAnimation;
|
|
4757
|
-
/**
|
|
4758
|
-
* 重新绘制(当配置变化或缩放变化时调用)
|
|
4759
|
-
*/
|
|
4760
|
-
redraw(): void;
|
|
4761
|
-
/**
|
|
4762
|
-
* 清除脉冲圆圈
|
|
4763
|
-
*/
|
|
4764
|
-
clearCircle(): void;
|
|
4765
|
-
/**
|
|
4766
|
-
* 完全停止并清除
|
|
4767
|
-
*/
|
|
4768
|
-
remove(): void;
|
|
4769
|
-
/**
|
|
4770
|
-
* 销毁组件
|
|
4771
|
-
*/
|
|
4772
|
-
destroy(): void;
|
|
4773
|
-
}
|
|
4774
|
-
|
|
4775
1903
|
/**
|
|
4776
1904
|
* 点阵房间数据
|
|
4777
1905
|
*/
|
|
@@ -4788,38 +1916,6 @@ export declare type RasterRoomData = {
|
|
|
4788
1916
|
colorIndex?: number
|
|
4789
1917
|
}
|
|
4790
1918
|
|
|
4791
|
-
declare class Ring extends Graphics {
|
|
4792
|
-
private appService;
|
|
4793
|
-
private currentPosition;
|
|
4794
|
-
private config;
|
|
4795
|
-
constructor(appService: AppService, options: RingOptions);
|
|
4796
|
-
/**
|
|
4797
|
-
* 设置反向缩放监听,保持描边宽度固定
|
|
4798
|
-
*/
|
|
4799
|
-
private setupAntiScaleListener;
|
|
4800
|
-
/**
|
|
4801
|
-
* 反向缩放事件处理
|
|
4802
|
-
*/
|
|
4803
|
-
private handleScaleChange;
|
|
4804
|
-
/**
|
|
4805
|
-
* 绘制预警圈
|
|
4806
|
-
* @param position 充电桩位置信息
|
|
4807
|
-
*/
|
|
4808
|
-
draw(position: Point): void;
|
|
4809
|
-
/**
|
|
4810
|
-
* 绘制虚线圆形
|
|
4811
|
-
*/
|
|
4812
|
-
private drawDashedCircle;
|
|
4813
|
-
/**
|
|
4814
|
-
* 重新绘制(当配置变化时调用)
|
|
4815
|
-
*/
|
|
4816
|
-
redraw(): void;
|
|
4817
|
-
/**
|
|
4818
|
-
* 销毁组件
|
|
4819
|
-
*/
|
|
4820
|
-
destroy(): void;
|
|
4821
|
-
}
|
|
4822
|
-
|
|
4823
1919
|
/** 预警圈配置 */
|
|
4824
1920
|
export declare type RingConfig = {
|
|
4825
1921
|
/** 大小(米) */
|
|
@@ -4836,103 +1932,6 @@ export declare type RingConfig = {
|
|
|
4836
1932
|
strokeDashArray: [number, number]
|
|
4837
1933
|
}
|
|
4838
1934
|
|
|
4839
|
-
declare type RingOptions = {
|
|
4840
|
-
config: RingConfig;
|
|
4841
|
-
};
|
|
4842
|
-
|
|
4843
|
-
declare class Robot extends Container {
|
|
4844
|
-
private appService;
|
|
4845
|
-
robot: RobotIcon;
|
|
4846
|
-
ring: Ring;
|
|
4847
|
-
pulseCircle: PulseCircle;
|
|
4848
|
-
sleepAnimation: SleepAnimation | null;
|
|
4849
|
-
private unsubscribeFns;
|
|
4850
|
-
private clickHandler?;
|
|
4851
|
-
private targetPosition;
|
|
4852
|
-
private targetRotation;
|
|
4853
|
-
private isMoving;
|
|
4854
|
-
private pathQueue;
|
|
4855
|
-
private lastPosition;
|
|
4856
|
-
private currentPathType;
|
|
4857
|
-
private lastUpdateTime;
|
|
4858
|
-
private isCleared;
|
|
4859
|
-
constructor(appService: AppService);
|
|
4860
|
-
/**
|
|
4861
|
-
* 异步初始化睡眠动画
|
|
4862
|
-
*/
|
|
4863
|
-
private initializeSleepAnimation;
|
|
4864
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
4865
|
-
/**
|
|
4866
|
-
* 立即绘制到指定位置(无动画)
|
|
4867
|
-
*/
|
|
4868
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
4869
|
-
/**
|
|
4870
|
-
* 初始化点击处理器状态
|
|
4871
|
-
* 根据配置启用机器人点击交互
|
|
4872
|
-
*/
|
|
4873
|
-
private initClickInteraction;
|
|
4874
|
-
/**
|
|
4875
|
-
* 获取机器人当前位置(相对坐标系)
|
|
4876
|
-
* @returns 机器人当前位置,如果尚未绘制则返回 null
|
|
4877
|
-
*/
|
|
4878
|
-
getCurrentPosition(): {
|
|
4879
|
-
x: number;
|
|
4880
|
-
y: number;
|
|
4881
|
-
} | null;
|
|
4882
|
-
/**
|
|
4883
|
-
* 添加移动目标到队列(带动画)
|
|
4884
|
-
*/
|
|
4885
|
-
moveTo(point: RobotPoint): void;
|
|
4886
|
-
/**
|
|
4887
|
-
* 批量处理队列(快速跳转)
|
|
4888
|
-
*/
|
|
4889
|
-
batchProcessQueue(jumpToLatest?: boolean): void;
|
|
4890
|
-
/**
|
|
4891
|
-
* 处理队列中的下一个路径点
|
|
4892
|
-
*/
|
|
4893
|
-
private processNextPathPoint;
|
|
4894
|
-
/**
|
|
4895
|
-
* 动画更新循环
|
|
4896
|
-
*/
|
|
4897
|
-
private update;
|
|
4898
|
-
/**
|
|
4899
|
-
* 启动机器人动画渲染(只控制 Ticker start/stop,不 add/remove)
|
|
4900
|
-
*/
|
|
4901
|
-
private startRobotAnimation;
|
|
4902
|
-
/**
|
|
4903
|
-
* 重写 visible setter,确保睡眠动画能响应机器人可见性变化
|
|
4904
|
-
*/
|
|
4905
|
-
set visible(value: boolean);
|
|
4906
|
-
/**
|
|
4907
|
-
* 重写 visible getter
|
|
4908
|
-
*/
|
|
4909
|
-
get visible(): boolean;
|
|
4910
|
-
/**
|
|
4911
|
-
* 停止机器人动画渲染(只控制 Ticker start/stop,不 add/remove)
|
|
4912
|
-
*/
|
|
4913
|
-
private stopRobotAnimation;
|
|
4914
|
-
/**
|
|
4915
|
-
* 清除机器人动画状态
|
|
4916
|
-
*/
|
|
4917
|
-
remove(): void;
|
|
4918
|
-
/**
|
|
4919
|
-
* 清除机器人显示(隐藏所有子组件)
|
|
4920
|
-
*/
|
|
4921
|
-
clear(): void;
|
|
4922
|
-
destroy(options?: {
|
|
4923
|
-
children?: boolean;
|
|
4924
|
-
texture?: boolean;
|
|
4925
|
-
baseTexture?: boolean;
|
|
4926
|
-
}): void;
|
|
4927
|
-
}
|
|
4928
|
-
|
|
4929
|
-
declare class RobotIcon extends EnhancedSprite {
|
|
4930
|
-
protected appService: AppService;
|
|
4931
|
-
constructor(appService: AppService);
|
|
4932
|
-
initializeSprite(): Promise<void>;
|
|
4933
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
4934
|
-
}
|
|
4935
|
-
|
|
4936
1935
|
/** 机器人点 */
|
|
4937
1936
|
export declare type RobotPoint = IconPoint & {
|
|
4938
1937
|
/** 点类型 */
|
|
@@ -4975,196 +1974,6 @@ export declare type RoomData = RoomProperty & {
|
|
|
4975
1974
|
colorIndex?: number
|
|
4976
1975
|
}
|
|
4977
1976
|
|
|
4978
|
-
declare class RoomFill extends Container {
|
|
4979
|
-
private appService;
|
|
4980
|
-
private roomGraphicsMap;
|
|
4981
|
-
private roomContextMap;
|
|
4982
|
-
private roomClickHandlerMap;
|
|
4983
|
-
private unsubscribeFns;
|
|
4984
|
-
private mapWidth;
|
|
4985
|
-
private rasterRoomDataMap;
|
|
4986
|
-
private structuredRoomGeometry;
|
|
4987
|
-
constructor(appService: AppService);
|
|
4988
|
-
/**
|
|
4989
|
-
* 绘制结构化协议地图房间
|
|
4990
|
-
* @param rooms 房间数据
|
|
4991
|
-
*/
|
|
4992
|
-
draw(rooms: Room[]): void;
|
|
4993
|
-
/**
|
|
4994
|
-
* 绘制栅格房间数据
|
|
4995
|
-
* @param processedData 处理后的栅格数据,包含排序和颜色信息
|
|
4996
|
-
*/
|
|
4997
|
-
drawRaster(processedData: ProcessedRasterData): void;
|
|
4998
|
-
/**
|
|
4999
|
-
* 绘制栅格房间(统一方法,处理数字房间和特殊房间)
|
|
5000
|
-
*/
|
|
5001
|
-
private drawRasterRoom;
|
|
5002
|
-
/**
|
|
5003
|
-
* 分批绘制像素点
|
|
5004
|
-
*/
|
|
5005
|
-
private drawPixelPointsInBatches;
|
|
5006
|
-
/**
|
|
5007
|
-
* 处理房间点击事件
|
|
5008
|
-
*/
|
|
5009
|
-
private handleRoomClick;
|
|
5010
|
-
/**
|
|
5011
|
-
* 根据选中的房间ID数组设置房间状态
|
|
5012
|
-
* @param selectRoomIds 选中的房间ID数组
|
|
5013
|
-
*/
|
|
5014
|
-
setRoomStateBySelectIds(selectRoomIds: readonly number[]): void;
|
|
5015
|
-
/**
|
|
5016
|
-
* 切换单个房间的状态
|
|
5017
|
-
* @param roomId 房间ID
|
|
5018
|
-
* @param isActive 是否为激活状态
|
|
5019
|
-
*/
|
|
5020
|
-
setRoomState(roomId: number | SpecialRoomId, isActive: boolean): void;
|
|
5021
|
-
/**
|
|
5022
|
-
* 设置所有房间为同一状态
|
|
5023
|
-
* @param isActive 是否为激活状态
|
|
5024
|
-
*/
|
|
5025
|
-
setAllRoomsState(isActive: boolean): void;
|
|
5026
|
-
/**
|
|
5027
|
-
* 获取数字房间的Graphics映射(用于地板材质创建)
|
|
5028
|
-
* @returns 房间ID到Graphics的映射
|
|
5029
|
-
*/
|
|
5030
|
-
getRoomGraphicsMap(): Map<number, Graphics>;
|
|
5031
|
-
/**
|
|
5032
|
-
* 获取栅格房间数据(用于精确碰撞检测)
|
|
5033
|
-
* @param roomId 房间ID
|
|
5034
|
-
* @returns 栅格房间数据或null
|
|
5035
|
-
*/
|
|
5036
|
-
getRasterRoomData(roomId: number | SpecialRoomId): RasterRoomData | null;
|
|
5037
|
-
/**
|
|
5038
|
-
* 获取地图宽度(用于像素索引转换)
|
|
5039
|
-
*/
|
|
5040
|
-
getMapWidth(): number;
|
|
5041
|
-
/**
|
|
5042
|
-
* 判断墙体(线段)是否与任意房间有交集
|
|
5043
|
-
* @param points 墙体的两个端点坐标(机器坐标系)
|
|
5044
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
5045
|
-
*/
|
|
5046
|
-
isWallIntersectsAnyRoom(points: Point[]): boolean;
|
|
5047
|
-
/**
|
|
5048
|
-
* 判断区域(矩形)是否与任意房间有交集
|
|
5049
|
-
* @param points 区域的四个顶点坐标(机器坐标系)
|
|
5050
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
5051
|
-
*/
|
|
5052
|
-
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
5053
|
-
/**
|
|
5054
|
-
* 栅格地图:判断线段是否与任意房间有交集
|
|
5055
|
-
*/
|
|
5056
|
-
private isWallIntersectsAnyRoomRaster;
|
|
5057
|
-
/**
|
|
5058
|
-
* 结构化地图:判断线段是否与任意房间有交集
|
|
5059
|
-
*/
|
|
5060
|
-
private isWallIntersectsAnyRoomStructured;
|
|
5061
|
-
/**
|
|
5062
|
-
* 栅格地图:判断矩形是否与任意房间有交集
|
|
5063
|
-
* 优化方案:先检查4条边,如果都失败再检查包含关系
|
|
5064
|
-
*/
|
|
5065
|
-
private isZoneIntersectsAnyRoomRaster;
|
|
5066
|
-
/**
|
|
5067
|
-
* 结构化地图:判断矩形是否与任意房间有交集
|
|
5068
|
-
*/
|
|
5069
|
-
private isZoneIntersectsAnyRoomStructured;
|
|
5070
|
-
/**
|
|
5071
|
-
* 获取线段覆盖的像素点索引
|
|
5072
|
-
*/
|
|
5073
|
-
private getLinePixels;
|
|
5074
|
-
/**
|
|
5075
|
-
* 获取矩形覆盖的像素点索引
|
|
5076
|
-
*/
|
|
5077
|
-
private getZonePixels;
|
|
5078
|
-
/**
|
|
5079
|
-
* 刷新所有房间的颜色(不重新计算几何)
|
|
5080
|
-
*/
|
|
5081
|
-
private refreshRoomColors;
|
|
5082
|
-
/**
|
|
5083
|
-
* 清除所有房间
|
|
5084
|
-
*/
|
|
5085
|
-
clearRooms(): void;
|
|
5086
|
-
/**
|
|
5087
|
-
* 销毁时清理资源
|
|
5088
|
-
*/
|
|
5089
|
-
destroy(): void;
|
|
5090
|
-
}
|
|
5091
|
-
|
|
5092
|
-
declare class RoomManager_2 {
|
|
5093
|
-
private appService;
|
|
5094
|
-
private unsubscribeFns;
|
|
5095
|
-
private roomInfoContainer;
|
|
5096
|
-
private roomInfoMap;
|
|
5097
|
-
private roomDisplayMap;
|
|
5098
|
-
private roomFloorType;
|
|
5099
|
-
constructor(appService: AppService);
|
|
5100
|
-
/**
|
|
5101
|
-
* 设置房间属性数据(房间名称、清洁模式等)
|
|
5102
|
-
* 一次性获取并存储所有必要的显示数据
|
|
5103
|
-
*/
|
|
5104
|
-
drawRoomProperty(properties: RoomProperty[]): Promise<boolean>;
|
|
5105
|
-
/**
|
|
5106
|
-
* 更新房间信息显示
|
|
5107
|
-
* 直接使用已存储的完整显示数据
|
|
5108
|
-
*/
|
|
5109
|
-
private updateRoomInfoDisplay;
|
|
5110
|
-
/**
|
|
5111
|
-
* 创建单个房间的信息组件
|
|
5112
|
-
*/
|
|
5113
|
-
private createRoomInfo;
|
|
5114
|
-
/**
|
|
5115
|
-
* 更新特定房间的名称
|
|
5116
|
-
*/
|
|
5117
|
-
updateRoomName(roomId: number, name: string): void;
|
|
5118
|
-
/**
|
|
5119
|
-
* 更新特定房间的类型
|
|
5120
|
-
*/
|
|
5121
|
-
updateRoomType(roomId: number, type: number | null): Promise<void>;
|
|
5122
|
-
/**
|
|
5123
|
-
* 更新特定房间的位置
|
|
5124
|
-
*/
|
|
5125
|
-
updateRoomPosition(roomId: number, centerPoint: Point): void;
|
|
5126
|
-
/**
|
|
5127
|
-
* 清除所有房间信息
|
|
5128
|
-
*/
|
|
5129
|
-
private clearRoomInfos;
|
|
5130
|
-
/**
|
|
5131
|
-
* 根据ID查找房间显示数据
|
|
5132
|
-
*/
|
|
5133
|
-
getRoomPropertyById(id: number): RoomData | undefined;
|
|
5134
|
-
/**
|
|
5135
|
-
* 当房间几何数据更新时,刷新房间信息显示
|
|
5136
|
-
* 这个方法由 MapManager 在房间几何数据更新后调用
|
|
5137
|
-
*/
|
|
5138
|
-
refresh(): Promise<void>;
|
|
5139
|
-
/**
|
|
5140
|
-
* 更新所有房间属性的可见性
|
|
5141
|
-
*/
|
|
5142
|
-
private updateAllRoomPropertyVisibility;
|
|
5143
|
-
/**
|
|
5144
|
-
* 更新所有房间名称的可见性
|
|
5145
|
-
*/
|
|
5146
|
-
private updateAllRoomNameVisibility;
|
|
5147
|
-
/**
|
|
5148
|
-
* 更新所有房间类型图标的可见性
|
|
5149
|
-
*/
|
|
5150
|
-
private updateAllRoomTypeVisibility;
|
|
5151
|
-
/**
|
|
5152
|
-
* 更新所有房间选择指示器的可见性
|
|
5153
|
-
*/
|
|
5154
|
-
private updateAllRoomSelectionIndicatorVisibility;
|
|
5155
|
-
/**
|
|
5156
|
-
* 刷新所有房间颜色
|
|
5157
|
-
*/
|
|
5158
|
-
private refreshAllRoomColors;
|
|
5159
|
-
/**
|
|
5160
|
-
* 更新地板材质
|
|
5161
|
-
* 在房间几何数据或属性数据更新后调用
|
|
5162
|
-
*/
|
|
5163
|
-
private updateFloorTypes;
|
|
5164
|
-
clear(): void;
|
|
5165
|
-
destroy(): void;
|
|
5166
|
-
}
|
|
5167
|
-
|
|
5168
1977
|
/**
|
|
5169
1978
|
* 房间属性信息
|
|
5170
1979
|
*/
|
|
@@ -5240,6 +2049,8 @@ export declare type RuntimeConfig = {
|
|
|
5240
2049
|
editingWayPointIds: string[]
|
|
5241
2050
|
/** 正在编辑的地毯ID列表 */
|
|
5242
2051
|
editingCarpetIds: string[]
|
|
2052
|
+
/** 正在编辑的家具ID列表 */
|
|
2053
|
+
editingFurnitureIds: string[]
|
|
5243
2054
|
/** 地图旋转角度(度) */
|
|
5244
2055
|
mapRotation: number
|
|
5245
2056
|
/** 房间属性折叠的房间ID列表 */
|
|
@@ -5268,6 +2079,8 @@ export declare type RuntimeConfig = {
|
|
|
5268
2079
|
showRoomFloorType: boolean
|
|
5269
2080
|
/** 是否显示地毯 */
|
|
5270
2081
|
showCarpet: boolean
|
|
2082
|
+
/** 是否显示 AI 检测物体 */
|
|
2083
|
+
showDetectedObjects: boolean
|
|
5271
2084
|
/** 选中的房间ID列表 */
|
|
5272
2085
|
selectRoomIds: number[]
|
|
5273
2086
|
/** 是否显示充电桩预警圈 */
|
|
@@ -5282,71 +2095,6 @@ export declare type RuntimeConfig = {
|
|
|
5282
2095
|
selectedCarpetIds: string[]
|
|
5283
2096
|
}
|
|
5284
2097
|
|
|
5285
|
-
/**
|
|
5286
|
-
* 机器人睡眠动画组件
|
|
5287
|
-
* TODO
|
|
5288
|
-
* 暂时不开放这个组件,得找到合适的动画
|
|
5289
|
-
* 基于 FixedSizeAnimatedSprite,显示机器人睡眠状态的动画效果
|
|
5290
|
-
*/
|
|
5291
|
-
declare class SleepAnimation extends EnhancedAnimatedSprite {
|
|
5292
|
-
protected appService: AppService;
|
|
5293
|
-
private unsubscribeFns;
|
|
5294
|
-
private throttledUpdateOffset;
|
|
5295
|
-
private fixedOffsetX;
|
|
5296
|
-
private fixedOffsetY;
|
|
5297
|
-
constructor(appService: AppService, textures: Texture[]);
|
|
5298
|
-
/**
|
|
5299
|
-
* 静态创建方法
|
|
5300
|
-
*/
|
|
5301
|
-
static create(appService: AppService): Promise<SleepAnimation>;
|
|
5302
|
-
/**
|
|
5303
|
-
* 初始化睡眠动画
|
|
5304
|
-
*/
|
|
5305
|
-
private initializeAnimation;
|
|
5306
|
-
/**
|
|
5307
|
-
* 判断是否应该显示睡眠动画
|
|
5308
|
-
* 显示条件:
|
|
5309
|
-
* 1. 配置中启用睡眠动画
|
|
5310
|
-
* 2. 机器人容器可见
|
|
5311
|
-
* 3. 机器人图标已经绘制(有位置信息)
|
|
5312
|
-
*/
|
|
5313
|
-
private shouldShow;
|
|
5314
|
-
/**
|
|
5315
|
-
* 更新可见性状态
|
|
5316
|
-
*/
|
|
5317
|
-
private updateVisibility;
|
|
5318
|
-
/**
|
|
5319
|
-
* 更新偏移量以保持固定大小
|
|
5320
|
-
* @param _scale 当前地图缩放比例
|
|
5321
|
-
*/
|
|
5322
|
-
private updateOffset;
|
|
5323
|
-
/**
|
|
5324
|
-
* 绘制睡眠动画
|
|
5325
|
-
* @param params 绘制参数
|
|
5326
|
-
*/
|
|
5327
|
-
draw(params: IconPoint): void;
|
|
5328
|
-
/**
|
|
5329
|
-
* 当机器人图标可见性变化时调用
|
|
5330
|
-
*/
|
|
5331
|
-
onRobotVisibilityChanged(): void;
|
|
5332
|
-
/**
|
|
5333
|
-
* 重写 visible setter,确保动画播放状态与可见性同步
|
|
5334
|
-
*/
|
|
5335
|
-
set visible(value: boolean);
|
|
5336
|
-
/**
|
|
5337
|
-
* 重写 visible getter
|
|
5338
|
-
*/
|
|
5339
|
-
get visible(): boolean;
|
|
5340
|
-
/**
|
|
5341
|
-
* 组件销毁时清理资源
|
|
5342
|
-
*/
|
|
5343
|
-
destroy(options?: {
|
|
5344
|
-
children?: boolean;
|
|
5345
|
-
texture?: boolean;
|
|
5346
|
-
baseTexture?: boolean;
|
|
5347
|
-
}): void;
|
|
5348
|
-
}
|
|
5349
|
-
|
|
5350
2098
|
/** 定点清扫配置 */
|
|
5351
2099
|
export declare type SpotConfig = {
|
|
5352
2100
|
/** 图标资源路径 */
|
|
@@ -5404,46 +2152,6 @@ export declare type SpotParam = {
|
|
|
5404
2152
|
point: Point
|
|
5405
2153
|
}
|
|
5406
2154
|
|
|
5407
|
-
declare class ViewportContainer extends Container {
|
|
5408
|
-
private viewportBounds;
|
|
5409
|
-
private maskGraphics;
|
|
5410
|
-
private containerElement;
|
|
5411
|
-
constructor(config: AppConfig, containerElement?: HTMLElement | Window);
|
|
5412
|
-
/**
|
|
5413
|
-
* 计算视口边界
|
|
5414
|
-
*/
|
|
5415
|
-
private calculateViewportBounds;
|
|
5416
|
-
/**
|
|
5417
|
-
* 获取容器尺寸
|
|
5418
|
-
*/
|
|
5419
|
-
private getContainerSize;
|
|
5420
|
-
/**
|
|
5421
|
-
* 创建遮罩限制内容在视口内
|
|
5422
|
-
*/
|
|
5423
|
-
private createMask;
|
|
5424
|
-
/**
|
|
5425
|
-
* 解析尺寸参数
|
|
5426
|
-
*/
|
|
5427
|
-
private parseSize;
|
|
5428
|
-
/**
|
|
5429
|
-
* 获取视口边界
|
|
5430
|
-
*/
|
|
5431
|
-
getViewportBounds(): {
|
|
5432
|
-
x: number;
|
|
5433
|
-
y: number;
|
|
5434
|
-
width: number;
|
|
5435
|
-
height: number;
|
|
5436
|
-
};
|
|
5437
|
-
/**
|
|
5438
|
-
* 更新视口配置
|
|
5439
|
-
*/
|
|
5440
|
-
updateViewport(config: AppConfig): void;
|
|
5441
|
-
/**
|
|
5442
|
-
* 添加内容到视口容器
|
|
5443
|
-
*/
|
|
5444
|
-
addContent(content: Container): void;
|
|
5445
|
-
}
|
|
5446
|
-
|
|
5447
2155
|
/** 虚拟墙配置 */
|
|
5448
2156
|
export declare type VirtualWallConfig = {
|
|
5449
2157
|
/** 图标容器填充颜色 */
|