@ray-js/robot-map-sdk 0.0.9 → 0.0.11
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/bin/docs-server.js +195 -0
- package/dist/index.d.ts +355 -3818
- package/dist-docs/404.html +3 -3
- package/dist-docs/assets/{app.BJnAJzet.js → app.3-ianRvb.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.l5uunL9n.js +1 -0
- package/dist-docs/assets/chunks/BitmapFont.C8awBCd1.js +4 -0
- package/dist-docs/assets/chunks/BufferResource.C5TLxka4.js +155 -0
- package/dist-docs/assets/chunks/CanvasRenderer.DyglCOE2.js +1 -0
- package/dist-docs/assets/chunks/RenderTargetSystem._cMCUdmu.js +172 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.D9iYIKMO.js → VPLocalSearchBox.DYzATQt_.js} +2 -2
- package/dist-docs/assets/chunks/WebGLRenderer.C_pauwH4.js +156 -0
- package/dist-docs/assets/chunks/WebGPURenderer.DuRPdsh5.js +41 -0
- package/dist-docs/assets/chunks/browserAll.BebatlLr.js +14 -0
- package/dist-docs/assets/chunks/framework.CBLqO2Q1.js +18 -0
- package/dist-docs/assets/chunks/index.DR0yN-kU.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.Dn4kNa0x.js +4 -0
- package/dist-docs/assets/chunks/vanilla-picker.B6E6ObS_.js +8 -0
- package/dist-docs/assets/chunks/webworkerAll.BAL0vGum.js +56 -0
- package/dist-docs/assets/doubleBed.CzextF6m.png +0 -0
- package/dist-docs/assets/{guide_advanced-usage.md.BPrKHNKt.js → guide_advanced-usage.md.COVLyRkA.js} +96 -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.Zvm4buzY.js → guide_getting-started.md.DzTPTYGC.js} +2 -2
- package/dist-docs/assets/guide_getting-started.md.DzTPTYGC.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.530AI9zE.js → plans_2026-03-04-detected-objects-visibility-design.md.Dqboot5W.js} +1 -1
- package/dist-docs/assets/{plans_2026-03-04-detected-objects-visibility-design.md.530AI9zE.lean.js → plans_2026-03-04-detected-objects-visibility-design.md.Dqboot5W.lean.js} +1 -1
- package/dist-docs/assets/{plans_2026-03-04-show-detected-objects-implementation-plan.md.foeG7qiK.js → plans_2026-03-04-show-detected-objects-implementation-plan.md.CDWwQtWj.js} +1 -1
- package/dist-docs/assets/{plans_2026-03-04-show-detected-objects-implementation-plan.md.foeG7qiK.lean.js → plans_2026-03-04-show-detected-objects-implementation-plan.md.CDWwQtWj.lean.js} +1 -1
- 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_bugs_2026-03-11-docs-server-bin-clean-bugfix.md.GGWCjkok.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-11-docs-server-bin-clean-bugfix.md.GGWCjkok.lean.js +1 -0
- package/dist-docs/assets/{records_plans_2026-03-02-furniture-feature-plan.md.DkXKivuL.js → records_plans_2026-03-02-furniture-feature-plan.md.CqSsyNDo.js} +1 -1
- package/dist-docs/assets/{records_plans_2026-03-02-furniture-feature-plan.md.DkXKivuL.lean.js → records_plans_2026-03-02-furniture-feature-plan.md.CqSsyNDo.lean.js} +1 -1
- 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.CwvDSJWk.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.CK4ueBig.js → reference_config.md.DHynhVxG.js} +1 -1
- package/dist-docs/assets/{reference_config.md.CK4ueBig.lean.js → reference_config.md.DHynhVxG.lean.js} +1 -1
- 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.CL2sjTJ7.js → reference_methods.md.eH-UCMbE.js} +23 -3
- package/dist-docs/assets/reference_methods.md.eH-UCMbE.lean.js +1 -0
- package/dist-docs/assets/{reference_runtime.md.aDpGKfHs.js → reference_runtime.md.BEy8BhSZ.js} +2 -2
- package/dist-docs/assets/reference_runtime.md.BEy8BhSZ.lean.js +1 -0
- package/dist-docs/assets/{reference_types.md.D2IglsHQ.js → reference_types.md.hikiO8Cq.js} +20 -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 +102 -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 +7 -7
- package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +7 -7
- 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/bugs/2026-03-11-docs-server-bin-clean-bugfix.html +25 -0
- package/dist-docs/records/plans/2026-03-02-furniture-feature-plan.html +7 -7
- 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 +7 -7
- package/dist-docs/reference/data.html +44 -8
- package/dist-docs/reference/methods.html +29 -9
- package/dist-docs/reference/runtime.html +8 -8
- package/dist-docs/reference/types.html +26 -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.HZmZuAtg.js +0 -1
- package/dist-docs/assets/chunks/framework.DRADY2L-.js +0 -18
- package/dist-docs/assets/chunks/theme.D78lSkQK.js +0 -2
- package/dist-docs/assets/guide_advanced-usage.md.BPrKHNKt.lean.js +0 -1
- package/dist-docs/assets/guide_getting-started.md.Zvm4buzY.lean.js +0 -1
- package/dist-docs/assets/reference_callbacks.md.CwvDSJWk.lean.js +0 -1
- package/dist-docs/assets/reference_data.md.DciSLVC8.lean.js +0 -1
- package/dist-docs/assets/reference_methods.md.CL2sjTJ7.lean.js +0 -1
- package/dist-docs/assets/reference_runtime.md.aDpGKfHs.lean.js +0 -1
- package/dist-docs/assets/reference_types.md.D2IglsHQ.lean.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +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 { FurnitureConfig as FurnitureConfig_2 } from '..';
|
|
19
|
-
import { FurnitureManager } from '../managers/FurnitureManager';
|
|
20
|
-
import { Graphics } from 'pixi.js';
|
|
21
|
-
import { HeatmapManager } from '../managers/HeatmapManager';
|
|
22
|
-
import { Interaction } from './Interaction';
|
|
23
|
-
import { MapCallbacks as MapCallbacks_2 } from '..';
|
|
24
|
-
import { MapData } from '@ray-js/robot-protocol';
|
|
25
|
-
import { MapHeader } from '@ray-js/robot-protocol';
|
|
26
|
-
import { MapManager } from '../managers/MapManager';
|
|
27
|
-
import { MapState as MapState_2 } from '..';
|
|
28
|
-
import { MeasurementUnit as MeasurementUnit_2 } from '..';
|
|
29
|
-
import { ParsedRasterMapData as ParsedRasterMapData_2 } from '@ray-js/robot-protocol';
|
|
30
|
-
import { PathData } from '@ray-js/robot-protocol';
|
|
31
|
-
import { PathManager } from '../managers/PathManager';
|
|
32
|
-
import { Point as Point_2 } from '..';
|
|
33
3
|
import { Rectangle } from 'pixi.js';
|
|
34
|
-
import { RingConfig as RingConfig_2 } from '..';
|
|
35
|
-
import { RoomData as RoomData_2 } from '..';
|
|
36
|
-
import { RoomManager } from '../managers/RoomManager';
|
|
37
|
-
import { RuntimeConfig as RuntimeConfig_2 } from '..';
|
|
38
4
|
import { SPECIAL_ROOM_IDS } from '@ray-js/robot-protocol';
|
|
39
5
|
import { SpecialRoomId } from '@ray-js/robot-protocol';
|
|
40
|
-
import { Sprite } from 'pixi.js';
|
|
41
|
-
import { StructuredMapDataSource } from '@ray-js/robot-protocol';
|
|
42
6
|
import { TextStyleFontWeight } from 'pixi.js';
|
|
43
|
-
import { Texture } from 'pixi.js';
|
|
44
|
-
import { Ticker } from 'pixi.js';
|
|
45
|
-
import { ViewportContainer as ViewportContainer_2 } from './ViewportContainer';
|
|
46
7
|
|
|
47
8
|
/**
|
|
48
9
|
* 地图静态配置
|
|
@@ -575,89 +536,6 @@ export declare type AppConfig = {
|
|
|
575
536
|
}
|
|
576
537
|
}
|
|
577
538
|
|
|
578
|
-
/**
|
|
579
|
-
* AppContainer 同时作为应用的主容器和层级管理器
|
|
580
|
-
* 管理所有地图相关的层级和组件
|
|
581
|
-
*/
|
|
582
|
-
declare class AppContainer extends Container {
|
|
583
|
-
private appService;
|
|
584
|
-
private layers;
|
|
585
|
-
private mapRotation;
|
|
586
|
-
private backgroundGraphics;
|
|
587
|
-
private lastBackgroundState;
|
|
588
|
-
constructor(appService: AppService);
|
|
589
|
-
/**
|
|
590
|
-
* 初始化所有预定义的层级
|
|
591
|
-
*/
|
|
592
|
-
private initializeLayers;
|
|
593
|
-
/**
|
|
594
|
-
* 获取指定名称的层容器
|
|
595
|
-
* @param name 层名称
|
|
596
|
-
* @returns 对应的容器,如果不存在则返回undefined
|
|
597
|
-
*/
|
|
598
|
-
getLayer(name: LayerName): Container | undefined;
|
|
599
|
-
/**
|
|
600
|
-
* 向指定层添加元素
|
|
601
|
-
* @param name 层名称
|
|
602
|
-
* @param element 要添加的元素
|
|
603
|
-
* @param zIndex 可选的元素z索引
|
|
604
|
-
* @returns 是否添加成功
|
|
605
|
-
*/
|
|
606
|
-
addToLayer(name: LayerName, element: Container, zIndex?: number): boolean;
|
|
607
|
-
/**
|
|
608
|
-
* 从指定层移除元素
|
|
609
|
-
* @param name 层名称
|
|
610
|
-
* @param element 要移除的元素
|
|
611
|
-
* @returns 是否移除成功
|
|
612
|
-
*/
|
|
613
|
-
removeFromLayer(name: LayerName, element: Container): boolean;
|
|
614
|
-
/**
|
|
615
|
-
* 清空指定层的所有内容
|
|
616
|
-
* @param name 层名称
|
|
617
|
-
* @returns 是否清空成功
|
|
618
|
-
*/
|
|
619
|
-
clearLayer(name: LayerName): boolean;
|
|
620
|
-
/**
|
|
621
|
-
* 设置指定层的可见性
|
|
622
|
-
* @param name 层名称
|
|
623
|
-
* @param visible 是否可见
|
|
624
|
-
* @returns 是否设置成功
|
|
625
|
-
*/
|
|
626
|
-
setLayerVisibility(name: LayerName, visible: boolean): boolean;
|
|
627
|
-
/**
|
|
628
|
-
* 获取指定层的可见性
|
|
629
|
-
* @param name 层名称
|
|
630
|
-
* @returns 层的可见性状态,不存在则返回false
|
|
631
|
-
*/
|
|
632
|
-
getLayerVisibility(name: LayerName): boolean;
|
|
633
|
-
/**
|
|
634
|
-
* 设置地图旋转角度
|
|
635
|
-
* @param angle 旋转角度(度数)
|
|
636
|
-
*/
|
|
637
|
-
setMapRotation(angle: number): void;
|
|
638
|
-
/**
|
|
639
|
-
* 获取当前地图旋转角度
|
|
640
|
-
* @returns 旋转角度(度数)
|
|
641
|
-
*/
|
|
642
|
-
getMapRotation(): number;
|
|
643
|
-
/**
|
|
644
|
-
* 获取当前地图旋转弧度
|
|
645
|
-
* @returns 旋转角度(弧度)
|
|
646
|
-
*/
|
|
647
|
-
getMapRotationRadians(): number;
|
|
648
|
-
/**
|
|
649
|
-
* 获取用于截图的完整边界
|
|
650
|
-
* 会合并所有可见图层的局部边界,确保截图能覆盖所有内容(包括超出初始地图范围的禁区等)
|
|
651
|
-
*/
|
|
652
|
-
getSnapshotBounds(): Rectangle;
|
|
653
|
-
/**
|
|
654
|
-
* 更新截图背景(主渲染器显示版本)
|
|
655
|
-
* @param color 背景颜色
|
|
656
|
-
* @param visible 是否可见
|
|
657
|
-
*/
|
|
658
|
-
updateBackground(color: ColorSource, visible: boolean): void;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
539
|
/**
|
|
662
540
|
* 应用程序选项配置
|
|
663
541
|
* 包含事件回调、配置和运行时状态
|
|
@@ -671,426 +549,6 @@ export declare type AppOptions = {
|
|
|
671
549
|
runtime: DeepPartialRuntimeConfig
|
|
672
550
|
}
|
|
673
551
|
|
|
674
|
-
declare class AppService {
|
|
675
|
-
private app;
|
|
676
|
-
constructor(app: MapApplication);
|
|
677
|
-
getApp(): MapApplication;
|
|
678
|
-
getConfig(): AppConfig;
|
|
679
|
-
/**
|
|
680
|
-
* 获取调试模式
|
|
681
|
-
* @returns 是否为调试模式
|
|
682
|
-
*/
|
|
683
|
-
getDebuggerMode(): boolean;
|
|
684
|
-
getRoomData(roomId: number): RoomData_2 | undefined;
|
|
685
|
-
/**
|
|
686
|
-
* 将米转换为像素(委托给 MapApplication)
|
|
687
|
-
*/
|
|
688
|
-
metersToPixels(meters: number): number;
|
|
689
|
-
/**
|
|
690
|
-
* 将像素转换为米(委托给 MapApplication)
|
|
691
|
-
*/
|
|
692
|
-
pixelsToMeters(pixels: number): number;
|
|
693
|
-
/**
|
|
694
|
-
* 将米转换为配置的单位
|
|
695
|
-
* @param meters - 米数值
|
|
696
|
-
* @returns 转换后的数值
|
|
697
|
-
*/
|
|
698
|
-
metersToDisplayUnit(meters: number): number;
|
|
699
|
-
get ticker(): Ticker;
|
|
700
|
-
get mapState(): MapState_2 | null;
|
|
701
|
-
get isMapDrawn(): boolean;
|
|
702
|
-
get config(): AppConfig;
|
|
703
|
-
get gloalConfig(): {
|
|
704
|
-
containerTop: string;
|
|
705
|
-
containerLeft: string;
|
|
706
|
-
containerWidth: string;
|
|
707
|
-
containerHeight: string;
|
|
708
|
-
backgroundColor?: ColorSource;
|
|
709
|
-
backgroundGradient?: BackgroundGradient_2;
|
|
710
|
-
backgroundImage?: BackgroundImage_2;
|
|
711
|
-
backgroundAlpha: number;
|
|
712
|
-
performanceMode: boolean;
|
|
713
|
-
resolution: number;
|
|
714
|
-
enableLogger: boolean;
|
|
715
|
-
};
|
|
716
|
-
get mapConfig(): {
|
|
717
|
-
autoPaddingVerticalPercent: number;
|
|
718
|
-
autoPaddingHorizontalPercent: number;
|
|
719
|
-
adjacencyThreshold: number;
|
|
720
|
-
originChangeAutoFitThreshold: number;
|
|
721
|
-
sizeChangeAutoFitThreshold: number;
|
|
722
|
-
obstacleColor: ColorSource;
|
|
723
|
-
freeColor: ColorSource;
|
|
724
|
-
autoFitOffset?: {
|
|
725
|
-
x: number;
|
|
726
|
-
y: number;
|
|
727
|
-
};
|
|
728
|
-
};
|
|
729
|
-
get roomConfig(): {
|
|
730
|
-
colors: {
|
|
731
|
-
sortBy: "index" | "area";
|
|
732
|
-
strategy: "priority" | "balanced";
|
|
733
|
-
active: string[];
|
|
734
|
-
inactive: string[];
|
|
735
|
-
normal?: string[];
|
|
736
|
-
name: string[];
|
|
737
|
-
nameInactive?: string[];
|
|
738
|
-
nameNormal?: string[];
|
|
739
|
-
propertyTheme: string[];
|
|
740
|
-
propertyThemeInactive?: string[];
|
|
741
|
-
propertyThemeNormal?: string[];
|
|
742
|
-
selectionIndicatorBackground: string[];
|
|
743
|
-
selectionIndicatorIcon: string[];
|
|
744
|
-
NO_ROOM_DATA: string;
|
|
745
|
-
ROOM_GAP: string;
|
|
746
|
-
OBSTACLE_ROOM: string;
|
|
747
|
-
UNKNOWN_ROOM: string;
|
|
748
|
-
VERSION0_ROOM: string;
|
|
749
|
-
};
|
|
750
|
-
nameLabel: {
|
|
751
|
-
fontSize: number;
|
|
752
|
-
fontFamily: string;
|
|
753
|
-
fontWeight: TextStyleFontWeight;
|
|
754
|
-
};
|
|
755
|
-
type: {
|
|
756
|
-
assets: string[];
|
|
757
|
-
iconSize: number;
|
|
758
|
-
gap: number;
|
|
759
|
-
position: "left" | "right";
|
|
760
|
-
container: {
|
|
761
|
-
visible: boolean;
|
|
762
|
-
size: number;
|
|
763
|
-
borderRadius: number;
|
|
764
|
-
};
|
|
765
|
-
};
|
|
766
|
-
property: {
|
|
767
|
-
displayOrders: ("cleanMode" | "suction" | "cistern" | "cleanTimes" | string)[];
|
|
768
|
-
iconWidth: number;
|
|
769
|
-
iconHeight: number;
|
|
770
|
-
foldable: boolean;
|
|
771
|
-
offsetX: number;
|
|
772
|
-
offsetY: number;
|
|
773
|
-
iconGap: number;
|
|
774
|
-
container: {
|
|
775
|
-
backgroundColor: ColorSource;
|
|
776
|
-
paddingVertical: number;
|
|
777
|
-
paddingHorizontal: number;
|
|
778
|
-
borderRadius: number;
|
|
779
|
-
tailHeight: number;
|
|
780
|
-
tailWidth: number;
|
|
781
|
-
};
|
|
782
|
-
suction: {
|
|
783
|
-
assets: string[];
|
|
784
|
-
};
|
|
785
|
-
cistern: {
|
|
786
|
-
assets: string[];
|
|
787
|
-
};
|
|
788
|
-
cleanMode: {
|
|
789
|
-
assets: string[];
|
|
790
|
-
};
|
|
791
|
-
cleanTimes: {
|
|
792
|
-
assets: string[];
|
|
793
|
-
};
|
|
794
|
-
cleanOrder: {
|
|
795
|
-
color: ColorSource | "auto";
|
|
796
|
-
fontFamily: string;
|
|
797
|
-
fontWeight: TextStyleFontWeight;
|
|
798
|
-
fontSize: number;
|
|
799
|
-
gapRight: number;
|
|
800
|
-
};
|
|
801
|
-
customAssets?: Record<string, string[]>;
|
|
802
|
-
};
|
|
803
|
-
selectionIndicator: {
|
|
804
|
-
iconSrc: string;
|
|
805
|
-
iconWidth: number;
|
|
806
|
-
iconHeight: number;
|
|
807
|
-
containerWidth: number;
|
|
808
|
-
containerHeight: number;
|
|
809
|
-
strokeWidth: number;
|
|
810
|
-
strokeColor: ColorSource | "auto";
|
|
811
|
-
borderRadius: number;
|
|
812
|
-
offsetX: number;
|
|
813
|
-
offsetY: number;
|
|
814
|
-
tailHeight: number;
|
|
815
|
-
tailWidth: number;
|
|
816
|
-
};
|
|
817
|
-
floorType: {
|
|
818
|
-
assets: string[];
|
|
819
|
-
opacity: number;
|
|
820
|
-
scale: number;
|
|
821
|
-
};
|
|
822
|
-
enableElasticScale: boolean;
|
|
823
|
-
elasticMinScale: number;
|
|
824
|
-
elasticMaxScale: number;
|
|
825
|
-
};
|
|
826
|
-
get heatMapConfig(): {
|
|
827
|
-
cellSize: number;
|
|
828
|
-
maxDistance: number;
|
|
829
|
-
smoothIterations: number;
|
|
830
|
-
heatmapAlpha: number;
|
|
831
|
-
useGradient: boolean;
|
|
832
|
-
colorGradients: [ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource];
|
|
833
|
-
};
|
|
834
|
-
get pathConfig(): {
|
|
835
|
-
lineWidthFixed: boolean;
|
|
836
|
-
incrementalThreshold: number;
|
|
837
|
-
commonPath: {
|
|
838
|
-
visible: boolean;
|
|
839
|
-
color: ColorSource;
|
|
840
|
-
width: number;
|
|
841
|
-
};
|
|
842
|
-
transitionPath: {
|
|
843
|
-
visible: boolean;
|
|
844
|
-
color: ColorSource;
|
|
845
|
-
width: number;
|
|
846
|
-
};
|
|
847
|
-
chargePath: {
|
|
848
|
-
visible: boolean;
|
|
849
|
-
color: ColorSource;
|
|
850
|
-
width: number;
|
|
851
|
-
};
|
|
852
|
-
mopPath: {
|
|
853
|
-
lineVisible: boolean;
|
|
854
|
-
lineColor: ColorSource;
|
|
855
|
-
lineWidth: number;
|
|
856
|
-
trackVisible: boolean;
|
|
857
|
-
trackColor: ColorSource;
|
|
858
|
-
trackAlpha: number;
|
|
859
|
-
trackWidth: number;
|
|
860
|
-
};
|
|
861
|
-
};
|
|
862
|
-
get carpetConfig(): {
|
|
863
|
-
src: string;
|
|
864
|
-
opacity: number;
|
|
865
|
-
scale: number;
|
|
866
|
-
material?: {
|
|
867
|
-
type: number;
|
|
868
|
-
src: string;
|
|
869
|
-
opacity: number;
|
|
870
|
-
scale: number;
|
|
871
|
-
}[];
|
|
872
|
-
enableEdit?: boolean;
|
|
873
|
-
};
|
|
874
|
-
get robotConfig(): {
|
|
875
|
-
icon: {
|
|
876
|
-
sizeFixed: boolean;
|
|
877
|
-
width: number;
|
|
878
|
-
height: number;
|
|
879
|
-
src: string;
|
|
880
|
-
};
|
|
881
|
-
speed: number;
|
|
882
|
-
rotationCorrection: number;
|
|
883
|
-
sleepAnimation: {
|
|
884
|
-
jsonSrc: string;
|
|
885
|
-
imageSrc: string;
|
|
886
|
-
framePrefix: string;
|
|
887
|
-
width: number;
|
|
888
|
-
height: number;
|
|
889
|
-
sizeFixed: boolean;
|
|
890
|
-
frameCount: number;
|
|
891
|
-
offsetX: number;
|
|
892
|
-
offsetY: number;
|
|
893
|
-
};
|
|
894
|
-
pulseCircle: {
|
|
895
|
-
size: number;
|
|
896
|
-
color: ColorSource;
|
|
897
|
-
strokeWidth: number;
|
|
898
|
-
strokeColor: ColorSource;
|
|
899
|
-
duration: number;
|
|
900
|
-
sizeFixed: boolean;
|
|
901
|
-
minScale: number;
|
|
902
|
-
maxScale: number;
|
|
903
|
-
minAlpha: number;
|
|
904
|
-
maxAlpha: number;
|
|
905
|
-
};
|
|
906
|
-
ring: RingConfig_2;
|
|
907
|
-
};
|
|
908
|
-
get chargingStationConfig(): {
|
|
909
|
-
icon: {
|
|
910
|
-
sizeFixed: boolean;
|
|
911
|
-
width: number;
|
|
912
|
-
height: number;
|
|
913
|
-
src: string;
|
|
914
|
-
};
|
|
915
|
-
rotationCorrection: number;
|
|
916
|
-
ring: RingConfig_2;
|
|
917
|
-
};
|
|
918
|
-
get interactionConfig(): {
|
|
919
|
-
zoomRange: {
|
|
920
|
-
min: number;
|
|
921
|
-
max: number;
|
|
922
|
-
};
|
|
923
|
-
fitMinScale: number;
|
|
924
|
-
fitMaxScale: number;
|
|
925
|
-
enable: boolean;
|
|
926
|
-
enableDoubleTapZoom: boolean;
|
|
927
|
-
enableRobotClick?: boolean;
|
|
928
|
-
enableChargingStationClick?: boolean;
|
|
929
|
-
};
|
|
930
|
-
get controlsConfig(): ControlsConfig_2;
|
|
931
|
-
get furnitureConfig(): FurnitureConfig_2;
|
|
932
|
-
get dividerConfig(): DividerConfig_2;
|
|
933
|
-
get detectedObjectConfig(): {
|
|
934
|
-
height: number;
|
|
935
|
-
width: number;
|
|
936
|
-
interactive: boolean;
|
|
937
|
-
anchor: Point_2;
|
|
938
|
-
};
|
|
939
|
-
get snapshotConfig(): {
|
|
940
|
-
format: "png" | "jpg" | "webp";
|
|
941
|
-
quality: number;
|
|
942
|
-
antialias: boolean;
|
|
943
|
-
resolution: number;
|
|
944
|
-
};
|
|
945
|
-
get appContainer(): AppContainer_2;
|
|
946
|
-
get interaction(): Interaction;
|
|
947
|
-
get viewportContainer(): ViewportContainer_2;
|
|
948
|
-
get mapManager(): MapManager;
|
|
949
|
-
get pathManager(): PathManager;
|
|
950
|
-
get heatmapManager(): HeatmapManager;
|
|
951
|
-
get controlsManager(): ControlsManager;
|
|
952
|
-
get detectedObjectManager(): DetectedObjectManager;
|
|
953
|
-
get customElementsManager(): CustomElementsManager;
|
|
954
|
-
get roomsManager(): RoomManager;
|
|
955
|
-
get editControlManager(): EditControlManager;
|
|
956
|
-
get furnitureManager(): FurnitureManager;
|
|
957
|
-
get runtime(): RuntimeConfig_2;
|
|
958
|
-
get runtimeSnapshot(): {
|
|
959
|
-
readonly dividingRoomId: number;
|
|
960
|
-
readonly enableRoomSelection: boolean;
|
|
961
|
-
readonly enableInteraction: boolean;
|
|
962
|
-
readonly enableMapClickCapture: boolean;
|
|
963
|
-
readonly editingForbiddenSweepZoneIds: readonly string[];
|
|
964
|
-
readonly editingForbiddenMopZoneIds: readonly string[];
|
|
965
|
-
readonly editingCleanZoneIds: readonly string[];
|
|
966
|
-
readonly editingVirtualWallIds: readonly string[];
|
|
967
|
-
readonly editingSpotIds: readonly string[];
|
|
968
|
-
readonly editingWayPointIds: readonly string[];
|
|
969
|
-
readonly editingCarpetIds: readonly string[];
|
|
970
|
-
readonly editingFurnitureIds: readonly string[];
|
|
971
|
-
readonly mapRotation: number;
|
|
972
|
-
readonly roomPropertyFoldIds: readonly number[];
|
|
973
|
-
readonly roomSelectionMode: "checkmark" | "order";
|
|
974
|
-
readonly showRoomName: boolean;
|
|
975
|
-
readonly showRoomType: boolean;
|
|
976
|
-
readonly unit: MeasurementUnit_2;
|
|
977
|
-
readonly unitLabel: string;
|
|
978
|
-
readonly showRoomProperty: boolean;
|
|
979
|
-
readonly showRoomOrder: boolean;
|
|
980
|
-
readonly showPath: boolean;
|
|
981
|
-
readonly showRobot: boolean;
|
|
982
|
-
readonly showChargingStation: boolean;
|
|
983
|
-
readonly showRoomFloorType: boolean;
|
|
984
|
-
readonly showCarpet: boolean;
|
|
985
|
-
readonly showDetectedObjects: boolean;
|
|
986
|
-
readonly selectRoomIds: readonly number[];
|
|
987
|
-
readonly showChargingStationRing: boolean;
|
|
988
|
-
readonly showRobotRing: boolean;
|
|
989
|
-
readonly showRobotSleepAnimation: boolean;
|
|
990
|
-
readonly showRobotPulseCircle: boolean;
|
|
991
|
-
readonly selectedCarpetIds: readonly string[];
|
|
992
|
-
};
|
|
993
|
-
/**
|
|
994
|
-
* 检查是否启用交互
|
|
995
|
-
* 供其他组件使用,用于判断是否应该响应交互事件
|
|
996
|
-
* @returns 是否启用交互
|
|
997
|
-
*/
|
|
998
|
-
isInteractionEnabled(): boolean;
|
|
999
|
-
/**
|
|
1000
|
-
* 修复浮点数精度误差
|
|
1001
|
-
* @param value 数字、点或点数组
|
|
1002
|
-
* @param precision 保留小数位数,默认 2
|
|
1003
|
-
*/
|
|
1004
|
-
fixPrecision<T>(value: T, precision?: number): T;
|
|
1005
|
-
get events(): MapCallbacks_2 | undefined;
|
|
1006
|
-
get baseScale(): number;
|
|
1007
|
-
get currentScale(): number;
|
|
1008
|
-
get emitter(): Emitter< {
|
|
1009
|
-
antiScale: number;
|
|
1010
|
-
gestureHijackStart: FederatedPointerEvent;
|
|
1011
|
-
gestureHijackPointerMove: FederatedPointerEvent;
|
|
1012
|
-
gestureHijackPointerUp: FederatedPointerEvent;
|
|
1013
|
-
gestureHijackCancel: void;
|
|
1014
|
-
gestureHijackEnd: void;
|
|
1015
|
-
suppressMapClick: void;
|
|
1016
|
-
robotPositionUpdate: {
|
|
1017
|
-
x: number;
|
|
1018
|
-
y: number;
|
|
1019
|
-
pathType?: string;
|
|
1020
|
-
};
|
|
1021
|
-
robotAnimationComplete: void;
|
|
1022
|
-
pathSegmentComplete: {
|
|
1023
|
-
fromX: number;
|
|
1024
|
-
fromY: number;
|
|
1025
|
-
toX: number;
|
|
1026
|
-
toY: number;
|
|
1027
|
-
pathType?: string;
|
|
1028
|
-
};
|
|
1029
|
-
mapRotationUpdate: number;
|
|
1030
|
-
}>;
|
|
1031
|
-
/**
|
|
1032
|
-
* 获取充电桩位置(机器坐标系)
|
|
1033
|
-
* @returns 充电桩位置坐标,如果地图未初始化则返回 null
|
|
1034
|
-
*/
|
|
1035
|
-
getChargerPosition(): {
|
|
1036
|
-
x: number;
|
|
1037
|
-
y: number;
|
|
1038
|
-
} | null;
|
|
1039
|
-
/**
|
|
1040
|
-
* 获取机器人当前位置(机器坐标系)
|
|
1041
|
-
* @returns 机器人位置坐标,如果路径未绘制或机器人位置不可用则返回 null
|
|
1042
|
-
*/
|
|
1043
|
-
getRobotPosition(): {
|
|
1044
|
-
x: number;
|
|
1045
|
-
y: number;
|
|
1046
|
-
} | null;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* 背景组件
|
|
1051
|
-
* 支持纯色背景、渐变背景和图片背景
|
|
1052
|
-
* 优先级:图片背景 > 渐变背景 > 纯色背景
|
|
1053
|
-
*/
|
|
1054
|
-
declare class Background extends Container {
|
|
1055
|
-
private graphics;
|
|
1056
|
-
private sprite;
|
|
1057
|
-
private viewportBounds;
|
|
1058
|
-
private lastConfig;
|
|
1059
|
-
private onImageLoaded?;
|
|
1060
|
-
constructor(config: AppConfig['global'], viewportBounds: {
|
|
1061
|
-
width: number;
|
|
1062
|
-
height: number;
|
|
1063
|
-
}, onImageLoaded?: () => void);
|
|
1064
|
-
/**
|
|
1065
|
-
* 渲染背景(根据优先级)
|
|
1066
|
-
*/
|
|
1067
|
-
private render;
|
|
1068
|
-
/**
|
|
1069
|
-
* 清空背景内容
|
|
1070
|
-
*/
|
|
1071
|
-
private clear;
|
|
1072
|
-
/**
|
|
1073
|
-
* 渲染纯色背景
|
|
1074
|
-
*/
|
|
1075
|
-
private renderSolidColor;
|
|
1076
|
-
/**
|
|
1077
|
-
* 渲染渐变背景
|
|
1078
|
-
*/
|
|
1079
|
-
private renderGradient;
|
|
1080
|
-
/**
|
|
1081
|
-
* 渲染图片背景
|
|
1082
|
-
*/
|
|
1083
|
-
private renderImage;
|
|
1084
|
-
/**
|
|
1085
|
-
* 动态更新背景配置
|
|
1086
|
-
*/
|
|
1087
|
-
update(config: AppConfig['global']): Promise<void>;
|
|
1088
|
-
/**
|
|
1089
|
-
* 销毁组件
|
|
1090
|
-
*/
|
|
1091
|
-
destroy(): void;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
552
|
/**
|
|
1095
553
|
* 渐变背景配置
|
|
1096
554
|
*/
|
|
@@ -1129,50 +587,6 @@ export declare type BackgroundImage = {
|
|
|
1129
587
|
repeat?: boolean
|
|
1130
588
|
}
|
|
1131
589
|
|
|
1132
|
-
declare abstract class BaseControlButton<T extends BaseControlButtonOptions = BaseControlButtonOptions> extends FixedSizeContainer {
|
|
1133
|
-
protected appService: AppService;
|
|
1134
|
-
protected background: Graphics;
|
|
1135
|
-
protected icon: EnhancedSprite;
|
|
1136
|
-
protected options: T;
|
|
1137
|
-
constructor(appService: AppService, options: T);
|
|
1138
|
-
/**
|
|
1139
|
-
* 抽象方法:子类需要实现具体的事件监听逻辑
|
|
1140
|
-
*/
|
|
1141
|
-
protected abstract setupEvents(): void;
|
|
1142
|
-
/**
|
|
1143
|
-
* 设置点击热区
|
|
1144
|
-
*/
|
|
1145
|
-
private setupHitArea;
|
|
1146
|
-
/**
|
|
1147
|
-
* 渲染按钮
|
|
1148
|
-
*/
|
|
1149
|
-
private render;
|
|
1150
|
-
/**
|
|
1151
|
-
* 渲染背景
|
|
1152
|
-
*/
|
|
1153
|
-
protected renderBackground(): void;
|
|
1154
|
-
/**
|
|
1155
|
-
* 渲染图标
|
|
1156
|
-
*/
|
|
1157
|
-
protected renderIcon(): Promise<void>;
|
|
1158
|
-
/**
|
|
1159
|
-
* 销毁组件
|
|
1160
|
-
*/
|
|
1161
|
-
destroy(): void;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
declare type BaseControlButtonOptions = {
|
|
1165
|
-
iconAlias: string;
|
|
1166
|
-
backgroundColor: ColorSource;
|
|
1167
|
-
config?: {
|
|
1168
|
-
iconWrapperWidth: number;
|
|
1169
|
-
iconWrapperHeight: number;
|
|
1170
|
-
iconWrapperBorderRadius: number;
|
|
1171
|
-
iconWidth: number;
|
|
1172
|
-
iconHeight: number;
|
|
1173
|
-
};
|
|
1174
|
-
};
|
|
1175
|
-
|
|
1176
590
|
/**
|
|
1177
591
|
* 基础自定义元素参数(所有类型共享)
|
|
1178
592
|
*/
|
|
@@ -1256,97 +670,18 @@ export declare type Bounds = {
|
|
|
1256
670
|
maxY: number
|
|
1257
671
|
}
|
|
1258
672
|
|
|
1259
|
-
declare class Carpet extends Container {
|
|
1260
|
-
private appService;
|
|
1261
|
-
private carpetSprite;
|
|
1262
|
-
private carpetMask;
|
|
1263
|
-
constructor(appService: AppService);
|
|
1264
|
-
/**
|
|
1265
|
-
* 创建地毯纹理覆盖(栅格数据)
|
|
1266
|
-
* @param carpetPixels 地毯像素数据
|
|
1267
|
-
* @param mapWidth 地图宽度
|
|
1268
|
-
*/
|
|
1269
|
-
createCarpetFromRasterData(carpetPixels: Uint32Array, mapWidth: number): Promise<void>;
|
|
1270
|
-
/**
|
|
1271
|
-
* 创建地毯的Graphics作为mask
|
|
1272
|
-
* @param carpetPixels 地毯像素数据
|
|
1273
|
-
* @param mapWidth 地图宽度
|
|
1274
|
-
* @returns Graphics对象
|
|
1275
|
-
*/
|
|
1276
|
-
private createCarpetGraphics;
|
|
1277
|
-
/**
|
|
1278
|
-
* 清除地毯
|
|
1279
|
-
*/
|
|
1280
|
-
clearCarpet(): void;
|
|
1281
|
-
/**
|
|
1282
|
-
* 创建地毯纹理覆盖(结构化数据)
|
|
1283
|
-
* @param carpetData 结构化地毯数据数组
|
|
1284
|
-
*/
|
|
1285
|
-
createCarpetFromStructuredData(carpetData: Array<{
|
|
1286
|
-
coordinates: number[];
|
|
1287
|
-
}>): Promise<void>;
|
|
1288
|
-
/**
|
|
1289
|
-
* 创建地毯的Graphics作为mask(结构化数据)
|
|
1290
|
-
* @param carpetData 结构化地毯数据数组
|
|
1291
|
-
* @returns Graphics对象
|
|
1292
|
-
*/
|
|
1293
|
-
private createCarpetGraphicsFromStructuredData;
|
|
1294
|
-
/**
|
|
1295
|
-
* 销毁时清理资源
|
|
1296
|
-
*/
|
|
1297
|
-
destroy(): void;
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
673
|
/** 地毯配置 */
|
|
1301
674
|
export declare type CarpetConfig = BaseZoneConfig & {
|
|
1302
675
|
/** 是否开启自由旋转模式 */
|
|
1303
676
|
enableFreeRotate: boolean
|
|
1304
677
|
}
|
|
1305
678
|
|
|
1306
|
-
declare type CarpetOptions = {
|
|
1307
|
-
appService: AppService;
|
|
1308
|
-
carpetData: CustomCarpetParam;
|
|
1309
|
-
textureMap: Map<number, Texture>;
|
|
1310
|
-
events?: CustomCarpetEvents;
|
|
1311
|
-
};
|
|
1312
|
-
|
|
1313
|
-
declare class ChargingStation extends Container {
|
|
1314
|
-
private appService;
|
|
1315
|
-
chargingStation: ChargingStationIcon;
|
|
1316
|
-
ring: Ring;
|
|
1317
|
-
private unsubscribeFns;
|
|
1318
|
-
private clickHandler?;
|
|
1319
|
-
constructor(appService: AppService);
|
|
1320
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
1321
|
-
/**
|
|
1322
|
-
* 初始化点击处理器状态
|
|
1323
|
-
* 根据静态配置启用充电桩点击交互
|
|
1324
|
-
*/
|
|
1325
|
-
private initClickInteraction;
|
|
1326
|
-
destroy(): void;
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
declare class ChargingStationIcon extends EnhancedSprite {
|
|
1330
|
-
protected appService: AppService;
|
|
1331
|
-
constructor(appService: AppService);
|
|
1332
|
-
initializeSprite(): Promise<void>;
|
|
1333
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
679
|
/** 组件属性类型 */
|
|
1337
680
|
export declare type ComponentPropsApp = {
|
|
1338
681
|
/** 地图应用实例 */
|
|
1339
|
-
app:
|
|
682
|
+
app: MapApplicationInstance
|
|
1340
683
|
}
|
|
1341
684
|
|
|
1342
|
-
/** 组件类型定义 */
|
|
1343
|
-
declare type Components = {
|
|
1344
|
-
viewportContainer: ViewportContainer;
|
|
1345
|
-
background: Background;
|
|
1346
|
-
appContainer: AppContainer;
|
|
1347
|
-
interaction: Interaction_2;
|
|
1348
|
-
};
|
|
1349
|
-
|
|
1350
685
|
/** 控制层内可排序元素 */
|
|
1351
686
|
export declare type ControlRenderItem =
|
|
1352
687
|
| 'forbiddenSweepZone'
|
|
@@ -1408,496 +743,20 @@ export declare type ControlsConfig = {
|
|
|
1408
743
|
wayPoint: WayPointConfig
|
|
1409
744
|
}
|
|
1410
745
|
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
/**
|
|
1424
|
-
|
|
1425
|
-
*/
|
|
1426
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
1427
|
-
updateRenderOrder(): void;
|
|
1428
|
-
private initializeControlContainers;
|
|
1429
|
-
private applyRenderOrder;
|
|
1430
|
-
private addToControlLayer;
|
|
1431
|
-
/**
|
|
1432
|
-
* 绘制扫地禁区
|
|
1433
|
-
*/
|
|
1434
|
-
drawForbiddenSweepZones(zones: ZoneParam[]): void;
|
|
1435
|
-
/**
|
|
1436
|
-
* 获取所有扫地禁区数据
|
|
1437
|
-
*/
|
|
1438
|
-
getForbiddenSweepZones(): ZoneParam[];
|
|
1439
|
-
/**
|
|
1440
|
-
* 清除所有扫地禁区
|
|
1441
|
-
*/
|
|
1442
|
-
clearAllForbiddenSweepZones(): void;
|
|
1443
|
-
/**
|
|
1444
|
-
* 绘制拖地禁区
|
|
1445
|
-
*/
|
|
1446
|
-
drawForbiddenMopZones(zones: ZoneParam[]): void;
|
|
1447
|
-
/**
|
|
1448
|
-
* 获取所有拖地禁区数据
|
|
1449
|
-
*/
|
|
1450
|
-
getForbiddenMopZones(): ZoneParam[];
|
|
1451
|
-
/**
|
|
1452
|
-
* 清除所有拖地禁区
|
|
1453
|
-
*/
|
|
1454
|
-
clearAllForbiddenMopZones(): void;
|
|
1455
|
-
/**
|
|
1456
|
-
* 绘制清扫区域
|
|
1457
|
-
*/
|
|
1458
|
-
drawCleanZones(zones: ZoneParam[]): void;
|
|
1459
|
-
/**
|
|
1460
|
-
* 获取所有清扫区域数据
|
|
1461
|
-
*/
|
|
1462
|
-
getCleanZones(): ZoneParam[];
|
|
1463
|
-
/**
|
|
1464
|
-
* 清除所有清扫区域
|
|
1465
|
-
*/
|
|
1466
|
-
clearAllCleanZones(): void;
|
|
1467
|
-
/**
|
|
1468
|
-
* 绘制虚拟墙
|
|
1469
|
-
*/
|
|
1470
|
-
drawVirtualWalls(walls: VirtualWallParam[]): void;
|
|
1471
|
-
/**
|
|
1472
|
-
* 获取所有虚拟墙数据
|
|
1473
|
-
*/
|
|
1474
|
-
getVirtualWalls(): VirtualWallParam[];
|
|
1475
|
-
/**
|
|
1476
|
-
* 清除所有虚拟墙
|
|
1477
|
-
*/
|
|
1478
|
-
clearAllVirtualWalls(): void;
|
|
1479
|
-
/**
|
|
1480
|
-
* 绘制定点清扫
|
|
1481
|
-
*/
|
|
1482
|
-
drawSpots(spots: SpotParam[]): void;
|
|
1483
|
-
/**
|
|
1484
|
-
* 获取所有定点清扫数据
|
|
1485
|
-
*/
|
|
1486
|
-
getSpots(): SpotParam[];
|
|
1487
|
-
/**
|
|
1488
|
-
* 清除所有定点清扫
|
|
1489
|
-
*/
|
|
1490
|
-
clearAllSpots(): void;
|
|
1491
|
-
/**
|
|
1492
|
-
* 通用的绘制区域方法
|
|
1493
|
-
*/
|
|
1494
|
-
private drawZones;
|
|
1495
|
-
/**
|
|
1496
|
-
* 添加新区域到 controls 子容器
|
|
1497
|
-
*/
|
|
1498
|
-
private addNewZone;
|
|
1499
|
-
/**
|
|
1500
|
-
* 移除区域
|
|
1501
|
-
*/
|
|
1502
|
-
private removeZone;
|
|
1503
|
-
/**
|
|
1504
|
-
* 获取区域数据
|
|
1505
|
-
*/
|
|
1506
|
-
private getZonesData;
|
|
1507
|
-
/**
|
|
1508
|
-
* 清除所有区域
|
|
1509
|
-
*/
|
|
1510
|
-
private clearAllZones;
|
|
1511
|
-
/**
|
|
1512
|
-
* 更新区域编辑状态
|
|
1513
|
-
*/
|
|
1514
|
-
private updateZonesEditState;
|
|
1515
|
-
/**
|
|
1516
|
-
* 更新虚拟墙编辑状态
|
|
1517
|
-
*/
|
|
1518
|
-
private updateVirtualWallsEditState;
|
|
1519
|
-
/**
|
|
1520
|
-
* 比较两个区域数据是否相等
|
|
1521
|
-
*/
|
|
1522
|
-
private isZoneDataEqual;
|
|
1523
|
-
/**
|
|
1524
|
-
* 获取虚拟墙数据
|
|
1525
|
-
*/
|
|
1526
|
-
private getWallsData;
|
|
1527
|
-
/**
|
|
1528
|
-
* 清除所有虚拟墙
|
|
1529
|
-
*/
|
|
1530
|
-
private clearAllWalls;
|
|
1531
|
-
/**
|
|
1532
|
-
* 比较两个虚拟墙是否相同
|
|
1533
|
-
*/
|
|
1534
|
-
private isWallDataEqual;
|
|
1535
|
-
/**
|
|
1536
|
-
* 添加新定点清扫到 controls 子容器
|
|
1537
|
-
*/
|
|
1538
|
-
private addNewSpot;
|
|
1539
|
-
/**
|
|
1540
|
-
* 移除定点清扫
|
|
1541
|
-
*/
|
|
1542
|
-
private removeSpot;
|
|
1543
|
-
/**
|
|
1544
|
-
* 获取定点清扫数据
|
|
1545
|
-
*/
|
|
1546
|
-
private getSpotsData;
|
|
1547
|
-
/**
|
|
1548
|
-
* 清除所有定点清扫
|
|
1549
|
-
*/
|
|
1550
|
-
private clearAllSpotsInternal;
|
|
1551
|
-
/**
|
|
1552
|
-
* 更新定点清扫编辑状态
|
|
1553
|
-
*/
|
|
1554
|
-
private updateSpotsEditState;
|
|
1555
|
-
/**
|
|
1556
|
-
* 比较两个定点清扫数据是否相等
|
|
1557
|
-
*/
|
|
1558
|
-
private isSpotDataEqual;
|
|
1559
|
-
/**
|
|
1560
|
-
* 绘制途径点
|
|
1561
|
-
* @param wayPoints 途径点数组
|
|
1562
|
-
*/
|
|
1563
|
-
drawWayPoints(wayPoints: WayPointParam[]): void;
|
|
1564
|
-
/**
|
|
1565
|
-
* 清除所有途径点
|
|
1566
|
-
*/
|
|
1567
|
-
clearAllWayPoints(): void;
|
|
1568
|
-
/**
|
|
1569
|
-
* 获取所有途径点数据
|
|
1570
|
-
*/
|
|
1571
|
-
getWayPoints(): WayPointParam[];
|
|
1572
|
-
/**
|
|
1573
|
-
* 添加新途径点到 controls 子容器
|
|
1574
|
-
*/
|
|
1575
|
-
private addNewWayPoint;
|
|
1576
|
-
/**
|
|
1577
|
-
* 移除途径点
|
|
1578
|
-
*/
|
|
1579
|
-
private removeWayPoint;
|
|
1580
|
-
/**
|
|
1581
|
-
* 获取途径点数据
|
|
1582
|
-
*/
|
|
1583
|
-
private getWayPointsData;
|
|
1584
|
-
/**
|
|
1585
|
-
* 清除所有途径点
|
|
1586
|
-
*/
|
|
1587
|
-
private clearAllWayPointsInternal;
|
|
1588
|
-
/**
|
|
1589
|
-
* 更新途径点编辑状态
|
|
1590
|
-
*/
|
|
1591
|
-
private updateWayPointsEditState;
|
|
1592
|
-
/**
|
|
1593
|
-
* 比较两个途径点数据是否相等
|
|
1594
|
-
*/
|
|
1595
|
-
private isWayPointDataEqual;
|
|
1596
|
-
/**
|
|
1597
|
-
* 处理分割房间ID变化
|
|
1598
|
-
*/
|
|
1599
|
-
private handleDividingRoomIdChange;
|
|
1600
|
-
/**
|
|
1601
|
-
* 获取房间几何信息
|
|
1602
|
-
*/
|
|
1603
|
-
private getRoomGeometry;
|
|
1604
|
-
/**
|
|
1605
|
-
* 创建默认分割线
|
|
1606
|
-
*/
|
|
1607
|
-
private createDefaultDivider;
|
|
1608
|
-
/**
|
|
1609
|
-
* 清除分割线
|
|
1610
|
-
*/
|
|
1611
|
-
private clearDivider;
|
|
1612
|
-
/**
|
|
1613
|
-
* 获取分割线数据
|
|
1614
|
-
*/
|
|
1615
|
-
getDividerEndPoints(): Point[] | null;
|
|
1616
|
-
/**
|
|
1617
|
-
* 获取分割线有效端点
|
|
1618
|
-
*/
|
|
1619
|
-
getEffectiveDividerPoints(): Point[] | null;
|
|
1620
|
-
/**
|
|
1621
|
-
* 处理单位变化
|
|
1622
|
-
* 当 unit 或 unitLabel 改变时,刷新所有显示尺寸的组件
|
|
1623
|
-
*/
|
|
1624
|
-
private handleUnitChange;
|
|
1625
|
-
/**
|
|
1626
|
-
* 销毁管理器
|
|
1627
|
-
*/
|
|
1628
|
-
destroy(): void;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
declare class CustomCarpet extends Container {
|
|
1632
|
-
private carpetData;
|
|
1633
|
-
private carpetConfig;
|
|
1634
|
-
private controlsConfig;
|
|
1635
|
-
private carpetEvents;
|
|
1636
|
-
private appService;
|
|
1637
|
-
private controlFill;
|
|
1638
|
-
private editControlLayer;
|
|
1639
|
-
private clickHandler;
|
|
1640
|
-
private maskContainer;
|
|
1641
|
-
private maskGraphics;
|
|
1642
|
-
private texture;
|
|
1643
|
-
private textureMap;
|
|
1644
|
-
private tilingSprite;
|
|
1645
|
-
private initialZonePoints;
|
|
1646
|
-
private unsubscribeFns;
|
|
1647
|
-
constructor(options: CarpetOptions);
|
|
1648
|
-
/**
|
|
1649
|
-
* 处理地毯数据(点集合)
|
|
1650
|
-
*/
|
|
1651
|
-
private processCarpetData;
|
|
1652
|
-
/**
|
|
1653
|
-
* 获取控制元素配置
|
|
1654
|
-
*/
|
|
1655
|
-
private getControlsConfig;
|
|
1656
|
-
/**
|
|
1657
|
-
* 获取当前编辑状态(是否在 editingCarpetIds 中)
|
|
1658
|
-
*/
|
|
1659
|
-
private isEditingEnabled;
|
|
1660
|
-
/**
|
|
1661
|
-
* 获取当前选中状态(是否在 selectedCarpetIds 中)
|
|
1662
|
-
*/
|
|
1663
|
-
private isSelected;
|
|
1664
|
-
/**
|
|
1665
|
-
* 是否应该显示编辑框(在 editingCarpetIds 或 selectedCarpetIds 中)
|
|
1666
|
-
*/
|
|
1667
|
-
private shouldShowEditControl;
|
|
1668
|
-
/**
|
|
1669
|
-
* 初始化组件
|
|
1670
|
-
*/
|
|
1671
|
-
private initializeComponents;
|
|
1672
|
-
/**
|
|
1673
|
-
* 创建遮罩容器(用于地毯纹理)
|
|
1674
|
-
*/
|
|
1675
|
-
private createMaskContainer;
|
|
1676
|
-
/**
|
|
1677
|
-
* 创建控制填充组件
|
|
1678
|
-
*/
|
|
1679
|
-
private createControlFill;
|
|
1680
|
-
/**
|
|
1681
|
-
* 创建编辑控制层(通过 EditControlManager)
|
|
1682
|
-
*/
|
|
1683
|
-
private createEditControlLayer;
|
|
1684
|
-
/**
|
|
1685
|
-
* 设置点击处理器(用于非编辑状态下的点击)
|
|
1686
|
-
*/
|
|
1687
|
-
private setupClickHandler;
|
|
1688
|
-
/**
|
|
1689
|
-
* 设置 enableRoomSelection 监听器
|
|
1690
|
-
*/
|
|
1691
|
-
private setupEnableRoomSelectionListener;
|
|
1692
|
-
/**
|
|
1693
|
-
* 检查是否启用了房间选择模式
|
|
1694
|
-
*/
|
|
1695
|
-
private isRoomSelectionEnabled;
|
|
1696
|
-
/**
|
|
1697
|
-
* 更新点击处理器状态
|
|
1698
|
-
*/
|
|
1699
|
-
private updateClickHandlerState;
|
|
1700
|
-
/**
|
|
1701
|
-
* 计算地毯边界
|
|
1702
|
-
*/
|
|
1703
|
-
private calculateBounds;
|
|
1704
|
-
/**
|
|
1705
|
-
* 计算自定义形状的外接矩形点集
|
|
1706
|
-
*/
|
|
1707
|
-
private calculateBoundingRectanglePoints;
|
|
1708
|
-
/**
|
|
1709
|
-
* 更新遮罩形状
|
|
1710
|
-
*/
|
|
1711
|
-
private updateMaskShape;
|
|
1712
|
-
/**
|
|
1713
|
-
* 异步加载地毯纹理
|
|
1714
|
-
*/
|
|
1715
|
-
private loadTexture;
|
|
1716
|
-
/**
|
|
1717
|
-
* 创建平铺纹理精灵
|
|
1718
|
-
*/
|
|
1719
|
-
private createTilingSprite;
|
|
1720
|
-
/**
|
|
1721
|
-
* 更新平铺纹理位置和大小
|
|
1722
|
-
*/
|
|
1723
|
-
private updateTilingSprite;
|
|
1724
|
-
/**
|
|
1725
|
-
* 处理拖拽开始
|
|
1726
|
-
*/
|
|
1727
|
-
private handleDragStart;
|
|
1728
|
-
/**
|
|
1729
|
-
* 处理拖拽移动
|
|
1730
|
-
*/
|
|
1731
|
-
private handleDragMove;
|
|
1732
|
-
private handleDragEnd;
|
|
1733
|
-
private handleMoveStart;
|
|
1734
|
-
/**
|
|
1735
|
-
* 处理移动过程
|
|
1736
|
-
*/
|
|
1737
|
-
private handleMove;
|
|
1738
|
-
/**
|
|
1739
|
-
* 处理移动结束
|
|
1740
|
-
*/
|
|
1741
|
-
private handleMoveEnd;
|
|
1742
|
-
/**
|
|
1743
|
-
* 应用平移变换(拖拽和移动的公共方法)
|
|
1744
|
-
*/
|
|
1745
|
-
private applyTranslation;
|
|
1746
|
-
/**
|
|
1747
|
-
* 处理旋转开始
|
|
1748
|
-
*/
|
|
1749
|
-
private handleRotationStart;
|
|
1750
|
-
/**
|
|
1751
|
-
* 处理旋转移动
|
|
1752
|
-
*/
|
|
1753
|
-
private handleRotationMove;
|
|
1754
|
-
/**
|
|
1755
|
-
* 处理旋转结束
|
|
1756
|
-
*/
|
|
1757
|
-
private handleRotationEnd;
|
|
1758
|
-
/**
|
|
1759
|
-
* 处理缩放开始
|
|
1760
|
-
*/
|
|
1761
|
-
private handleScaleStart;
|
|
1762
|
-
/**
|
|
1763
|
-
* 处理缩放移动
|
|
1764
|
-
*/
|
|
1765
|
-
private handleScaleMove;
|
|
1766
|
-
/**
|
|
1767
|
-
* 处理水平缩放移动
|
|
1768
|
-
*/
|
|
1769
|
-
private handleScaleMoveHorizontal;
|
|
1770
|
-
/**
|
|
1771
|
-
* 处理垂直缩放移动
|
|
1772
|
-
*/
|
|
1773
|
-
private handleScaleMoveVertical;
|
|
1774
|
-
/**
|
|
1775
|
-
* 处理缩放结束
|
|
1776
|
-
*/
|
|
1777
|
-
private handleScaleEnd;
|
|
1778
|
-
/**
|
|
1779
|
-
* 处理删除操作
|
|
1780
|
-
*/
|
|
1781
|
-
private handleDelete;
|
|
1782
|
-
/**
|
|
1783
|
-
* 处理点击事件
|
|
1784
|
-
*/
|
|
1785
|
-
private handleClick;
|
|
1786
|
-
/**
|
|
1787
|
-
* 处理点集更新
|
|
1788
|
-
*/
|
|
1789
|
-
private handlePointsUpdate;
|
|
1790
|
-
/**
|
|
1791
|
-
* 绘制地毯
|
|
1792
|
-
*/
|
|
1793
|
-
private drawCarpet;
|
|
1794
|
-
/**
|
|
1795
|
-
* 更新编辑状态(公共方法)
|
|
1796
|
-
*/
|
|
1797
|
-
updateEditState(): void;
|
|
1798
|
-
/**
|
|
1799
|
-
* 更新地毯数据
|
|
1800
|
-
*/
|
|
1801
|
-
updateCarpetData(newData: CustomCarpetParam): void;
|
|
1802
|
-
/**
|
|
1803
|
-
* 获取当前地毯数据
|
|
1804
|
-
*/
|
|
1805
|
-
getCarpetData(): CustomCarpetParam;
|
|
1806
|
-
/**
|
|
1807
|
-
* 刷新显示(用于单位变化等场景)
|
|
1808
|
-
*/
|
|
1809
|
-
refreshDisplay(): void;
|
|
1810
|
-
/**
|
|
1811
|
-
* 销毁组件
|
|
1812
|
-
*/
|
|
1813
|
-
destroy(): void;
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
declare type CustomCarpetEvents = {
|
|
1817
|
-
onRemove?: (id: string) => void;
|
|
1818
|
-
onUpdate?: (zone: CustomCarpetParam) => void;
|
|
1819
|
-
onClick?: (zone: CustomCarpetParam) => void;
|
|
1820
|
-
};
|
|
1821
|
-
|
|
1822
|
-
declare class CustomCarpetManager {
|
|
1823
|
-
private appService;
|
|
1824
|
-
private customCarpetMap;
|
|
1825
|
-
private unsubscribeFns;
|
|
1826
|
-
private textureMap;
|
|
1827
|
-
private texturesLoaded;
|
|
1828
|
-
private texturesLoadingPromise;
|
|
1829
|
-
constructor(appService: AppService);
|
|
1830
|
-
/**
|
|
1831
|
-
* 加载材质纹理
|
|
1832
|
-
* 如果已经加载过,直接返回已完成的 Promise
|
|
1833
|
-
* 如果正在加载,返回正在进行的 Promise
|
|
1834
|
-
* 如果未加载,开始加载并返回 Promise
|
|
1835
|
-
*/
|
|
1836
|
-
loadTextures(): Promise<void>;
|
|
1837
|
-
/**
|
|
1838
|
-
* 内部方法:实际加载纹理
|
|
1839
|
-
*/
|
|
1840
|
-
private _loadTextures;
|
|
1841
|
-
/**
|
|
1842
|
-
* 根据地图原点更新所有自定义地毯位置
|
|
1843
|
-
*/
|
|
1844
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
1845
|
-
/**
|
|
1846
|
-
* 绘制自定义地毯
|
|
1847
|
-
*/
|
|
1848
|
-
drawCustomCarpets(carpets: CustomCarpetParam[]): Promise<void>;
|
|
1849
|
-
/**
|
|
1850
|
-
* 获取所有自定义地毯数据
|
|
1851
|
-
*/
|
|
1852
|
-
getCustomCarpets(): CustomCarpetParam[];
|
|
1853
|
-
/**
|
|
1854
|
-
* 根据 ID 获取自定义地毯
|
|
1855
|
-
*/
|
|
1856
|
-
getCustomCarpetById(id: string): CustomCarpet | undefined;
|
|
1857
|
-
/**
|
|
1858
|
-
* 清除所有自定义地毯
|
|
1859
|
-
*/
|
|
1860
|
-
clearAllCustomCarpets(): void;
|
|
1861
|
-
/**
|
|
1862
|
-
* 添加新自定义地毯到 LAYER_CUSTOM_CARPET
|
|
1863
|
-
*/
|
|
1864
|
-
private addNewCustomCarpet;
|
|
1865
|
-
/**
|
|
1866
|
-
* 移除自定义地毯
|
|
1867
|
-
*/
|
|
1868
|
-
private removeCustomCarpet;
|
|
1869
|
-
/**
|
|
1870
|
-
* 更新自定义地毯编辑状态
|
|
1871
|
-
*/
|
|
1872
|
-
private updateCarpetsEditState;
|
|
1873
|
-
/**
|
|
1874
|
-
* 比较两个地毯数据是否相等
|
|
1875
|
-
*/
|
|
1876
|
-
private isCarpetDataEqual;
|
|
1877
|
-
/**
|
|
1878
|
-
* 刷新显示(单位变化时调用)
|
|
1879
|
-
*/
|
|
1880
|
-
refreshDisplay(): void;
|
|
1881
|
-
/**
|
|
1882
|
-
* 销毁管理器
|
|
1883
|
-
*/
|
|
1884
|
-
destroy(): void;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
/** 自定义地毯参数 */
|
|
1888
|
-
export declare type CustomCarpetParam = {
|
|
1889
|
-
/** 地毯ID */
|
|
1890
|
-
id: string
|
|
1891
|
-
/** 地毯材质 */
|
|
1892
|
-
type: number
|
|
1893
|
-
/** 点集合(用于矩形和圆形) */
|
|
1894
|
-
points?: Point[]
|
|
1895
|
-
|
|
1896
|
-
/** 形状 */
|
|
1897
|
-
shape: 'rectangle' | 'round' | 'custom'
|
|
1898
|
-
|
|
1899
|
-
/** 自定义数据 */
|
|
1900
|
-
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>
|
|
1901
760
|
}
|
|
1902
761
|
|
|
1903
762
|
/**
|
|
@@ -1908,62 +767,6 @@ export declare type CustomElementParam =
|
|
|
1908
767
|
| GifCustomElementParam
|
|
1909
768
|
| HtmlCustomElementParam
|
|
1910
769
|
|
|
1911
|
-
declare class CustomElementsManager_2 {
|
|
1912
|
-
private appService;
|
|
1913
|
-
private customElementsMap;
|
|
1914
|
-
private gifTicker;
|
|
1915
|
-
private gifElements;
|
|
1916
|
-
constructor(appService: AppService);
|
|
1917
|
-
/**
|
|
1918
|
-
* 根据地图原点更新所有自定义元素位置
|
|
1919
|
-
*/
|
|
1920
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
1921
|
-
/**
|
|
1922
|
-
* 绘制自定义元素
|
|
1923
|
-
*/
|
|
1924
|
-
drawCustomElements(elements: CustomElementParam[]): Promise<void>;
|
|
1925
|
-
/**
|
|
1926
|
-
* 清除所有自定义元素
|
|
1927
|
-
*/
|
|
1928
|
-
clearAllCustomElements(): void;
|
|
1929
|
-
/**
|
|
1930
|
-
* 添加新的自定义元素
|
|
1931
|
-
*/
|
|
1932
|
-
private addNewCustomElement;
|
|
1933
|
-
/**
|
|
1934
|
-
* 移除自定义元素
|
|
1935
|
-
*/
|
|
1936
|
-
private removeCustomElement;
|
|
1937
|
-
/**
|
|
1938
|
-
* 检查数据是否相同(类型安全的辅助方法)
|
|
1939
|
-
*/
|
|
1940
|
-
private isSameData;
|
|
1941
|
-
/**
|
|
1942
|
-
* 更新元素数据(类型安全的辅助方法)
|
|
1943
|
-
*/
|
|
1944
|
-
private updateElementData;
|
|
1945
|
-
/**
|
|
1946
|
-
* 更新 GIF Ticker 状态
|
|
1947
|
-
*/
|
|
1948
|
-
private updateGifTicker;
|
|
1949
|
-
/**
|
|
1950
|
-
* 启动 GIF Ticker
|
|
1951
|
-
*/
|
|
1952
|
-
private startGifTicker;
|
|
1953
|
-
/**
|
|
1954
|
-
* 停止 GIF Ticker
|
|
1955
|
-
*/
|
|
1956
|
-
private stopGifTicker;
|
|
1957
|
-
/**
|
|
1958
|
-
* 渲染 GIF 容器
|
|
1959
|
-
*/
|
|
1960
|
-
private renderGifContainer;
|
|
1961
|
-
/**
|
|
1962
|
-
* 销毁管理器
|
|
1963
|
-
*/
|
|
1964
|
-
destroy(): void;
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
770
|
/**
|
|
1968
771
|
* 解析结构化协议的地图房间属性
|
|
1969
772
|
* @param map 地图数据
|
|
@@ -1989,38 +792,6 @@ export declare type DeepPartialAppConfig = DeepPartial<AppConfig>
|
|
|
1989
792
|
/** 深度可选的运行时配置类型 */
|
|
1990
793
|
export declare type DeepPartialRuntimeConfig = DeepPartial<RuntimeConfig>
|
|
1991
794
|
|
|
1992
|
-
declare class DetectedObjectManager_2 {
|
|
1993
|
-
private appService;
|
|
1994
|
-
private detectedObjectMap;
|
|
1995
|
-
private unsubscribeShowDetectedObjects;
|
|
1996
|
-
constructor(appService: AppService);
|
|
1997
|
-
/**
|
|
1998
|
-
* 根据地图原点更新所有检测物体位置
|
|
1999
|
-
*/
|
|
2000
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2001
|
-
/**
|
|
2002
|
-
* 绘制检测物体
|
|
2003
|
-
*/
|
|
2004
|
-
drawDetectedObjects(objects: DetectedObjectParam[]): Promise<void>;
|
|
2005
|
-
private applyLayerVisibility;
|
|
2006
|
-
/**
|
|
2007
|
-
* 清除所有检测物体
|
|
2008
|
-
*/
|
|
2009
|
-
clearAllDetectedObjects(): void;
|
|
2010
|
-
/**
|
|
2011
|
-
* 添加新的检测物体
|
|
2012
|
-
*/
|
|
2013
|
-
private addNewDetectedObject;
|
|
2014
|
-
/**
|
|
2015
|
-
* 移除检测物体
|
|
2016
|
-
*/
|
|
2017
|
-
private removeDetectedObject;
|
|
2018
|
-
/**
|
|
2019
|
-
* 销毁管理器
|
|
2020
|
-
*/
|
|
2021
|
-
destroy(): void;
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
795
|
/**
|
|
2025
796
|
* 检测物体参数
|
|
2026
797
|
*/
|
|
@@ -2073,1720 +844,315 @@ export declare type DividerConfig = {
|
|
|
2073
844
|
defaultDirection: Direction
|
|
2074
845
|
}
|
|
2075
846
|
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
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
|
+
}
|
|
2097
894
|
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
onScaleMoveVertical?: (newPoints?: Point[]) => void;
|
|
2108
|
-
onScaleEnd?: () => void;
|
|
2109
|
-
onMoveStart?: () => void;
|
|
2110
|
-
onMoveMove?: (event: FederatedPointerEvent) => void;
|
|
2111
|
-
onMoveEnd?: () => void;
|
|
2112
|
-
onClick?: () => void;
|
|
2113
|
-
onPointsUpdate?: (newPoints: Point[]) => void;
|
|
2114
|
-
};
|
|
895
|
+
/** 家具参数 */
|
|
896
|
+
export declare type FurnitureParam = {
|
|
897
|
+
/** 家具ID */
|
|
898
|
+
id: string
|
|
899
|
+
/** 家具类型编号,匹配 config.furniture.assets 中的 type */
|
|
900
|
+
furnitureType: number
|
|
901
|
+
/** 四个顶点坐标 (顺时针: 左上→右上→右下→左下) */
|
|
902
|
+
points: Point[]
|
|
903
|
+
}
|
|
2115
904
|
|
|
2116
905
|
/**
|
|
2117
|
-
*
|
|
2118
|
-
*
|
|
906
|
+
* GIF 类型自定义元素参数
|
|
907
|
+
* 保持现有逻辑
|
|
2119
908
|
*/
|
|
2120
|
-
declare
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
private rotationCache;
|
|
2130
|
-
private outlineBorder;
|
|
2131
|
-
private moveLine;
|
|
2132
|
-
private sizeText;
|
|
2133
|
-
private controlButtons;
|
|
2134
|
-
private deleteButton;
|
|
2135
|
-
private rotateButton;
|
|
2136
|
-
private scaleButton;
|
|
2137
|
-
private moveButton;
|
|
2138
|
-
private horizontalScaleButton;
|
|
2139
|
-
private verticalScaleButton;
|
|
2140
|
-
private horizontalScaleInitialPosition;
|
|
2141
|
-
private verticalScaleInitialPosition;
|
|
2142
|
-
private clickHandler;
|
|
2143
|
-
private throttledUpdateOutline;
|
|
2144
|
-
constructor(appService: AppService, options: EditControlLayerOptions);
|
|
2145
|
-
/**
|
|
2146
|
-
* 初始化组件
|
|
2147
|
-
*/
|
|
2148
|
-
private initializeComponents;
|
|
2149
|
-
/**
|
|
2150
|
-
* 创建轮廓边框
|
|
2151
|
-
*/
|
|
2152
|
-
private createOutlineBorder;
|
|
2153
|
-
/**
|
|
2154
|
-
* 创建移动按钮延长线
|
|
2155
|
-
*/
|
|
2156
|
-
private createMoveLine;
|
|
2157
|
-
/**
|
|
2158
|
-
* 创建尺寸文本
|
|
2159
|
-
*/
|
|
2160
|
-
private createSizeText;
|
|
2161
|
-
private createDeleteButton;
|
|
2162
|
-
private createRotateButton;
|
|
2163
|
-
private onClickRotateButton;
|
|
2164
|
-
private createScaleButton;
|
|
2165
|
-
private createHorizontalScaleButton;
|
|
2166
|
-
private createVerticalScaleButton;
|
|
2167
|
-
private createMoveButton;
|
|
2168
|
-
/**
|
|
2169
|
-
* 创建并添加按钮到容器
|
|
2170
|
-
*/
|
|
2171
|
-
private createAndAddButton;
|
|
2172
|
-
/**
|
|
2173
|
-
* 创建控制按钮
|
|
2174
|
-
*/
|
|
2175
|
-
private createControlButtons;
|
|
2176
|
-
/**
|
|
2177
|
-
* 计算轮廓边框的点
|
|
2178
|
-
*/
|
|
2179
|
-
private calculateOutlinePoints;
|
|
2180
|
-
/**
|
|
2181
|
-
* 计算移动按钮的位置(在 MOVE 点的延长线上)
|
|
2182
|
-
* 使用角平分线算法计算按钮位置,使其位于 MOVE、SCALE、REMOVE 三个点形成的角的角平分线上
|
|
2183
|
-
*/
|
|
2184
|
-
private calculateMoveButtonPosition;
|
|
2185
|
-
/**
|
|
2186
|
-
* 计算移动按钮延长线的点
|
|
2187
|
-
* 返回从 MOVE 点到移动按钮位置的线段
|
|
2188
|
-
*/
|
|
2189
|
-
private calculateMoveLinePoints;
|
|
2190
|
-
/**
|
|
2191
|
-
* 计算区域尺寸文本(宽x高格式)
|
|
2192
|
-
*/
|
|
2193
|
-
private calculateSizeText;
|
|
2194
|
-
/**
|
|
2195
|
-
* 计算边的中点
|
|
2196
|
-
*/
|
|
2197
|
-
private getEdgeCenter;
|
|
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
|
|
2198
918
|
/**
|
|
2199
|
-
*
|
|
2200
|
-
*
|
|
2201
|
-
*
|
|
2202
|
-
*
|
|
2203
|
-
*
|
|
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} 表示右下角
|
|
2204
926
|
*/
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
/**
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
/**
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
/**
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
/**
|
|
2266
|
-
* 处理内部缩放移动
|
|
2267
|
-
* @param deltaX X 方向的偏移量
|
|
2268
|
-
* @param deltaY Y 方向的偏移量
|
|
2269
|
-
* @returns 计算后的新点集,如果无法缩放则返回 null
|
|
2270
|
-
*/
|
|
2271
|
-
private handleInternalScaleMove;
|
|
2272
|
-
/**
|
|
2273
|
-
* 重置缩放状态
|
|
2274
|
-
*/
|
|
2275
|
-
private resetScaleState;
|
|
2276
|
-
/**
|
|
2277
|
-
* 处理内部水平缩放移动
|
|
2278
|
-
* @param deltaX X 方向的偏移量
|
|
2279
|
-
* @param deltaY Y 方向的偏移量
|
|
2280
|
-
* @returns 计算后的新点集,如果无法缩放则返回 null
|
|
2281
|
-
*/
|
|
2282
|
-
private handleInternalHorizontalScaleMove;
|
|
2283
|
-
/**
|
|
2284
|
-
* 处理内部垂直缩放移动
|
|
2285
|
-
* @param deltaX X 方向的偏移量
|
|
2286
|
-
* @param deltaY Y 方向的偏移量
|
|
2287
|
-
* @returns 计算后的新点集,如果无法缩放则返回 null
|
|
2288
|
-
*/
|
|
2289
|
-
private handleInternalVerticalScaleMove;
|
|
2290
|
-
/**
|
|
2291
|
-
* 根据缩放比例计算新的点集
|
|
2292
|
-
*/
|
|
2293
|
-
private calculatePointsFromScale;
|
|
2294
|
-
/**
|
|
2295
|
-
* 初始化旋转计算缓存
|
|
2296
|
-
*/
|
|
2297
|
-
private initializeRotationCache;
|
|
2298
|
-
/**
|
|
2299
|
-
* 处理内部旋转移动
|
|
2300
|
-
* 优化:基于初始点集和累计角度计算,避免累积误差
|
|
2301
|
-
* @returns 计算后的新点集,如果无法旋转则返回 null
|
|
2302
|
-
*/
|
|
2303
|
-
private handleInternalRotationMove;
|
|
2304
|
-
/**
|
|
2305
|
-
* 重置旋转状态
|
|
2306
|
-
*/
|
|
2307
|
-
private resetRotationState;
|
|
2308
|
-
/**
|
|
2309
|
-
* 计算旋转中心(用于点击旋转)
|
|
2310
|
-
*/
|
|
2311
|
-
private calculateRotationCenter;
|
|
2312
|
-
/**
|
|
2313
|
-
* 更新编辑状态
|
|
2314
|
-
* @param options 控制各个元素显示/隐藏的选项
|
|
2315
|
-
*/
|
|
2316
|
-
updateEditState({ showRotateButton, showScaleButton, showRadialScaleButton, showDeleteButton, showMoveButton, showBorder, showSizeText, borderStyle, }: {
|
|
2317
|
-
showRotateButton?: boolean;
|
|
2318
|
-
showScaleButton?: boolean;
|
|
2319
|
-
showRadialScaleButton?: boolean;
|
|
2320
|
-
showDeleteButton?: boolean;
|
|
2321
|
-
showMoveButton?: boolean;
|
|
2322
|
-
showBorder?: boolean;
|
|
2323
|
-
showSizeText?: boolean;
|
|
2324
|
-
borderStyle?: {
|
|
2325
|
-
isDashed: boolean;
|
|
2326
|
-
dashArray?: [number, number];
|
|
2327
|
-
};
|
|
2328
|
-
}): void;
|
|
2329
|
-
/**
|
|
2330
|
-
* 获取操作状态
|
|
2331
|
-
*/
|
|
2332
|
-
getOperationState(): OperationState;
|
|
2333
|
-
/**
|
|
2334
|
-
* 停止所有操作
|
|
2335
|
-
*/
|
|
2336
|
-
stopAllOperations(): void;
|
|
2337
|
-
/**
|
|
2338
|
-
* 获取控制按钮容器(供外部添加额外按钮)
|
|
2339
|
-
*/
|
|
2340
|
-
getControlButtonsContainer(): Container;
|
|
2341
|
-
/**
|
|
2342
|
-
* 获取移动按钮(供外部调用)
|
|
2343
|
-
*/
|
|
2344
|
-
getMoveButton(): MoveControlButton | null;
|
|
2345
|
-
/**
|
|
2346
|
-
* 计算指定边的中点位置
|
|
2347
|
-
* @param startIndex 起始点索引
|
|
2348
|
-
* @param endIndex 结束点索引
|
|
2349
|
-
*/
|
|
2350
|
-
calculateEdgeMidpoint(startIndex: number, endIndex: number): Point;
|
|
2351
|
-
/**
|
|
2352
|
-
* 销毁组件
|
|
2353
|
-
*/
|
|
2354
|
-
destroy(): void;
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
declare type EditControlLayerOptions = {
|
|
2358
|
-
config: EditControlConfig;
|
|
2359
|
-
zonePoints: Point[];
|
|
2360
|
-
events?: EditControlEvents;
|
|
2361
|
-
minSize?: number;
|
|
2362
|
-
};
|
|
2363
|
-
|
|
2364
|
-
/**
|
|
2365
|
-
* 编辑控制管理器
|
|
2366
|
-
* 统一管理所有编辑控制层,将它们放在最顶层以确保始终可见
|
|
2367
|
-
*/
|
|
2368
|
-
declare class EditControlManager_2 {
|
|
2369
|
-
private appService;
|
|
2370
|
-
private editControlLayers;
|
|
2371
|
-
constructor(appService: AppService);
|
|
2372
|
-
/**
|
|
2373
|
-
* 注册编辑控制层
|
|
2374
|
-
* @param id 组件唯一标识(如 Zone ID、Carpet ID)
|
|
2375
|
-
* @param options 编辑控制层配置
|
|
2376
|
-
* @returns 创建的 EditControlLayer 实例
|
|
2377
|
-
*/
|
|
2378
|
-
registerEditControl(id: string | number, options: EditControlLayerOptions): EditControlLayer;
|
|
2379
|
-
/**
|
|
2380
|
-
* 注销编辑控制层
|
|
2381
|
-
* @param id 组件唯一标识
|
|
2382
|
-
*/
|
|
2383
|
-
unregisterEditControl(id: string | number): void;
|
|
2384
|
-
/**
|
|
2385
|
-
* 获取编辑控制层
|
|
2386
|
-
* @param id 组件唯一标识
|
|
2387
|
-
* @returns EditControlLayer 实例,如果不存在则返回 undefined
|
|
2388
|
-
*/
|
|
2389
|
-
getEditControl(id: string | number): EditControlLayer | undefined;
|
|
2390
|
-
/**
|
|
2391
|
-
* 更新编辑控制层状态
|
|
2392
|
-
* @param id 组件唯一标识
|
|
2393
|
-
* @param options 控制各个元素显示/隐藏的选项
|
|
2394
|
-
*/
|
|
2395
|
-
updateEditState(id: string | number, options: {
|
|
2396
|
-
showRotateButton?: boolean;
|
|
2397
|
-
showScaleButton?: boolean;
|
|
2398
|
-
showRadialScaleButton?: boolean;
|
|
2399
|
-
showDeleteButton?: boolean;
|
|
2400
|
-
showMoveButton?: boolean;
|
|
2401
|
-
showBorder?: boolean;
|
|
2402
|
-
showSizeText?: boolean;
|
|
2403
|
-
borderStyle?: {
|
|
2404
|
-
isDashed: boolean;
|
|
2405
|
-
dashArray?: [number, number];
|
|
2406
|
-
};
|
|
2407
|
-
}): void;
|
|
2408
|
-
/**
|
|
2409
|
-
* 清空所有编辑控制层
|
|
2410
|
-
*/
|
|
2411
|
-
clearAll(): void;
|
|
2412
|
-
/**
|
|
2413
|
-
* 获取所有编辑控制层
|
|
2414
|
-
* @returns 所有编辑控制层的数组
|
|
2415
|
-
*/
|
|
2416
|
-
getAllEditControls(): EditControlLayer[];
|
|
2417
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2418
|
-
/**
|
|
2419
|
-
* 检查是否存在编辑控制层
|
|
2420
|
-
* @param id 组件唯一标识
|
|
2421
|
-
* @returns 是否存在
|
|
2422
|
-
*/
|
|
2423
|
-
hasEditControl(id: string | number): boolean;
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
/**
|
|
2427
|
-
* 固定大小动画精灵基类
|
|
2428
|
-
* 基于 EnhancedSprite 扩展,支持帧动画播放
|
|
2429
|
-
*
|
|
2430
|
-
* 两种模式:
|
|
2431
|
-
* 1. sizeFixed: true - 固定屏幕像素大小,不受地图缩放影响
|
|
2432
|
-
* 2. sizeFixed: false - 以地图scale=1为基准,跟随地图缩放
|
|
2433
|
-
*/
|
|
2434
|
-
declare class EnhancedAnimatedSprite extends AnimatedSprite {
|
|
2435
|
-
protected appService: AppService;
|
|
2436
|
-
private throttledUpdateScale;
|
|
2437
|
-
private fixedWidth;
|
|
2438
|
-
private fixedHeight;
|
|
2439
|
-
private isFixedSizeSet;
|
|
2440
|
-
private sizeFixed;
|
|
2441
|
-
private baselineScale;
|
|
2442
|
-
private static animationTicker;
|
|
2443
|
-
private static animatedSprites;
|
|
2444
|
-
constructor(appService: AppService, textures?: Texture[]);
|
|
2445
|
-
/**
|
|
2446
|
-
* 设置固定的屏幕像素大小
|
|
2447
|
-
* @param width 屏幕上显示的固定宽度(像素)
|
|
2448
|
-
* @param height 屏幕上显示的固定高度(像素)
|
|
2449
|
-
*/
|
|
2450
|
-
setFixedSize(width: number, height: number): void;
|
|
2451
|
-
/**
|
|
2452
|
-
* 设置是否启用固定大小模式
|
|
2453
|
-
* @param enabled 是否启用固定大小模式
|
|
2454
|
-
*/
|
|
2455
|
-
setSizeFixed(enabled: boolean): void;
|
|
2456
|
-
/**
|
|
2457
|
-
* 重写 width setter,确保使用固定大小逻辑
|
|
2458
|
-
*/
|
|
2459
|
-
set width(value: number);
|
|
2460
|
-
/**
|
|
2461
|
-
* 重写 height setter,确保使用固定大小逻辑
|
|
2462
|
-
*/
|
|
2463
|
-
set height(value: number);
|
|
2464
|
-
/**
|
|
2465
|
-
* 重写 width getter,返回固定宽度
|
|
2466
|
-
*/
|
|
2467
|
-
get width(): number;
|
|
2468
|
-
/**
|
|
2469
|
-
* 重写 height getter,返回固定高度
|
|
2470
|
-
*/
|
|
2471
|
-
get height(): number;
|
|
2472
|
-
/**
|
|
2473
|
-
* 注册缩放事件监听
|
|
2474
|
-
*/
|
|
2475
|
-
private registerScaleListener;
|
|
2476
|
-
/**
|
|
2477
|
-
* 应用大小(统一处理两种模式)
|
|
2478
|
-
*/
|
|
2479
|
-
private applySize;
|
|
2480
|
-
/**
|
|
2481
|
-
* 更新元素缩放,以保持正确大小
|
|
2482
|
-
*/
|
|
2483
|
-
protected updateScale(scale: number): void;
|
|
2484
|
-
/**
|
|
2485
|
-
* 静态方法:加载动画纹理
|
|
2486
|
-
* @param jsonSrc 动画JSON资源路径
|
|
2487
|
-
* @param imageSrc 动画图片资源路径
|
|
2488
|
-
* @param framePrefix 帧名称前缀,例如 "sleep_"
|
|
2489
|
-
* @param frameCount 帧数量
|
|
2490
|
-
* @returns Promise<Texture[]> 纹理数组
|
|
2491
|
-
*/
|
|
2492
|
-
static loadAnimationTextures(jsonSrc: string, imageSrc: string, framePrefix?: string, frameCount?: number): Promise<Texture[]>;
|
|
2493
|
-
/**
|
|
2494
|
-
* 设置动画配置
|
|
2495
|
-
* @param iconConfig 图标配置
|
|
2496
|
-
*/
|
|
2497
|
-
setupAnimation(iconConfig: IconConfig): void;
|
|
2498
|
-
/**
|
|
2499
|
-
* 通用绘制方法
|
|
2500
|
-
* @param params 绘制参数
|
|
2501
|
-
* @param visibilityCondition 可选的可见性条件函数
|
|
2502
|
-
*/
|
|
2503
|
-
draw(params: IconPoint, visibilityCondition?: () => boolean): void;
|
|
2504
|
-
/**
|
|
2505
|
-
* 开始播放动画
|
|
2506
|
-
*/
|
|
2507
|
-
play(): void;
|
|
2508
|
-
/**
|
|
2509
|
-
* 停止播放动画
|
|
2510
|
-
*/
|
|
2511
|
-
stop(): void;
|
|
2512
|
-
/**
|
|
2513
|
-
* 重写 textures setter,在设置新纹理后重新应用固定大小
|
|
2514
|
-
*/
|
|
2515
|
-
set textures(value: Texture[]);
|
|
2516
|
-
/**
|
|
2517
|
-
* 重写 textures getter
|
|
2518
|
-
*/
|
|
2519
|
-
get textures(): Texture[];
|
|
2520
|
-
/**
|
|
2521
|
-
* 启动动画 Ticker
|
|
2522
|
-
*/
|
|
2523
|
-
private static startAnimationTicker;
|
|
2524
|
-
/**
|
|
2525
|
-
* 更新动画 Ticker 状态
|
|
2526
|
-
*/
|
|
2527
|
-
private static updateAnimationTicker;
|
|
2528
|
-
/**
|
|
2529
|
-
* 停止动画 Ticker
|
|
2530
|
-
*/
|
|
2531
|
-
private static stopAnimationTicker;
|
|
2532
|
-
/**
|
|
2533
|
-
* 更新所有动画
|
|
2534
|
-
*/
|
|
2535
|
-
private static updateAnimations;
|
|
2536
|
-
/**
|
|
2537
|
-
* 组件销毁时清理资源
|
|
2538
|
-
*/
|
|
2539
|
-
destroy(options?: {
|
|
2540
|
-
children?: boolean;
|
|
2541
|
-
texture?: boolean;
|
|
2542
|
-
baseTexture?: boolean;
|
|
2543
|
-
}): void;
|
|
2544
|
-
}
|
|
2545
|
-
|
|
2546
|
-
/**
|
|
2547
|
-
* 固定大小精灵基类
|
|
2548
|
-
* 用于创建在地图缩放时保持固定视觉大小的精灵元素
|
|
2549
|
-
*
|
|
2550
|
-
* 两种模式:
|
|
2551
|
-
* 1. sizeFixed: true - 固定屏幕像素大小,不受地图缩放影响
|
|
2552
|
-
* 2. sizeFixed: false - 以地图scale=1为基准,跟随地图缩放
|
|
2553
|
-
*/
|
|
2554
|
-
declare class EnhancedSprite extends Sprite {
|
|
2555
|
-
protected appService: AppService;
|
|
2556
|
-
private throttledUpdateScale;
|
|
2557
|
-
private fixedWidth;
|
|
2558
|
-
private fixedHeight;
|
|
2559
|
-
private isFixedSizeSet;
|
|
2560
|
-
private sizeFixed;
|
|
2561
|
-
private baselineScale;
|
|
2562
|
-
constructor(appService: AppService, texture?: Texture);
|
|
2563
|
-
/**
|
|
2564
|
-
* 设置固定的屏幕像素大小
|
|
2565
|
-
* @param width 屏幕上显示的固定宽度(像素)
|
|
2566
|
-
* @param height 屏幕上显示的固定高度(像素)
|
|
2567
|
-
*/
|
|
2568
|
-
setFixedSize(width: number, height: number): void;
|
|
2569
|
-
/**
|
|
2570
|
-
* 设置是否启用固定大小模式
|
|
2571
|
-
* @param enabled 是否启用固定大小模式
|
|
2572
|
-
*/
|
|
2573
|
-
setSizeFixed(enabled: boolean): void;
|
|
2574
|
-
/**
|
|
2575
|
-
* 重写 width setter,确保使用固定大小逻辑
|
|
2576
|
-
*/
|
|
2577
|
-
set width(value: number);
|
|
2578
|
-
/**
|
|
2579
|
-
* 重写 height setter,确保使用固定大小逻辑
|
|
2580
|
-
*/
|
|
2581
|
-
set height(value: number);
|
|
2582
|
-
/**
|
|
2583
|
-
* 重写 width getter,返回固定宽度
|
|
2584
|
-
*/
|
|
2585
|
-
get width(): number;
|
|
2586
|
-
/**
|
|
2587
|
-
* 重写 height getter,返回固定高度
|
|
2588
|
-
*/
|
|
2589
|
-
get height(): number;
|
|
2590
|
-
/**
|
|
2591
|
-
* 注册缩放事件监听
|
|
2592
|
-
*/
|
|
2593
|
-
private registerScaleListener;
|
|
2594
|
-
/**
|
|
2595
|
-
* 应用大小(统一处理两种模式)
|
|
2596
|
-
*/
|
|
2597
|
-
private applySize;
|
|
2598
|
-
/**
|
|
2599
|
-
* 更新元素缩放,以保持正确大小
|
|
2600
|
-
*/
|
|
2601
|
-
protected updateScale(scale: number): void;
|
|
2602
|
-
/**
|
|
2603
|
-
* 异步加载纹理并设置大小
|
|
2604
|
-
* @param assetKey 资源键名 或 资源src
|
|
2605
|
-
* @param iconConfig 图标配置(需要包含sizeFixed属性)
|
|
2606
|
-
*/
|
|
2607
|
-
loadTextureAndSetSize(src: string, iconConfig: IconConfig): Promise<void>;
|
|
2608
|
-
/**
|
|
2609
|
-
* 通用绘制方法
|
|
2610
|
-
* @param params 绘制参数
|
|
2611
|
-
* @param visibilityCondition 可选的可见性条件函数
|
|
2612
|
-
*/
|
|
2613
|
-
draw(params: IconPoint, visibilityCondition?: () => boolean): void;
|
|
2614
|
-
/**
|
|
2615
|
-
* 重写 texture setter,在设置新纹理后重新应用固定大小
|
|
2616
|
-
*/
|
|
2617
|
-
set texture(value: Texture);
|
|
2618
|
-
/**
|
|
2619
|
-
* 重写 texture getter
|
|
2620
|
-
*/
|
|
2621
|
-
get texture(): Texture;
|
|
2622
|
-
/**
|
|
2623
|
-
* 组件销毁时清理资源
|
|
2624
|
-
*/
|
|
2625
|
-
destroy(options?: {
|
|
2626
|
-
children?: boolean;
|
|
2627
|
-
texture?: boolean;
|
|
2628
|
-
baseTexture?: boolean;
|
|
2629
|
-
}): void;
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
/**
|
|
2633
|
-
* 固定大小元素基类
|
|
2634
|
-
* 用于创建在地图缩放时保持固定视觉大小的元素
|
|
2635
|
-
*/
|
|
2636
|
-
declare class FixedSizeContainer extends Container {
|
|
2637
|
-
protected appService: AppService;
|
|
2638
|
-
private throttledUpdateScale;
|
|
2639
|
-
constructor(appService: AppService);
|
|
2640
|
-
/**
|
|
2641
|
-
* 注册缩放事件监听
|
|
2642
|
-
*/
|
|
2643
|
-
private registerScaleListener;
|
|
2644
|
-
/**
|
|
2645
|
-
* 更新元素缩放,以保持固定大小
|
|
2646
|
-
*/
|
|
2647
|
-
protected updateScale(scale: number): void;
|
|
2648
|
-
/**
|
|
2649
|
-
* 组件销毁时清理资源
|
|
2650
|
-
*/
|
|
2651
|
-
destroy(options?: {
|
|
2652
|
-
children?: boolean;
|
|
2653
|
-
texture?: boolean;
|
|
2654
|
-
baseTexture?: boolean;
|
|
2655
|
-
}): void;
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
declare class Free extends Graphics {
|
|
2659
|
-
private appService;
|
|
2660
|
-
constructor(appService: AppService);
|
|
2661
|
-
/**
|
|
2662
|
-
* 绘制结构化自由区域数据
|
|
2663
|
-
* @param free 自由区域数据数组
|
|
2664
|
-
*/
|
|
2665
|
-
draw(free: {
|
|
2666
|
-
coordinates: number[];
|
|
2667
|
-
}[]): void;
|
|
2668
|
-
destroy(options?: DestroyOptions | boolean): void;
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
/** 家具素材配置 */
|
|
2672
|
-
export declare type FurnitureAsset = {
|
|
2673
|
-
/** 家具类型编号,匹配 FurnitureParam.furnitureType */
|
|
2674
|
-
type: number
|
|
2675
|
-
/** 图片 URL */
|
|
2676
|
-
src: string
|
|
2677
|
-
/** 默认宽度 (米,用于生成初始 points,内部根据 resolution 转换为像素) */
|
|
2678
|
-
width: number
|
|
2679
|
-
/** 默认高度 (米,用于生成初始 points,内部根据 resolution 转换为像素) */
|
|
2680
|
-
height: number
|
|
2681
|
-
}
|
|
2682
|
-
|
|
2683
|
-
/** 家具配置 */
|
|
2684
|
-
export declare type FurnitureConfig = {
|
|
2685
|
-
/** 家具素材列表 */
|
|
2686
|
-
assets: FurnitureAsset[]
|
|
2687
|
-
/** 全局透明度 (0-1, 默认 1) */
|
|
2688
|
-
opacity: number
|
|
2689
|
-
/** 图标容器填充颜色 */
|
|
2690
|
-
iconWrapperFillColor: ColorSource
|
|
2691
|
-
/** 轮廓偏移 */
|
|
2692
|
-
outlineOffset: number
|
|
2693
|
-
/** 轮廓描边颜色 */
|
|
2694
|
-
outlineStrokeColor: ColorSource
|
|
2695
|
-
/** 轮廓描边宽度 */
|
|
2696
|
-
outlineStrokeWidth: number
|
|
2697
|
-
/** 轮廓填充颜色 */
|
|
2698
|
-
outlineFillColor: ColorSource
|
|
2699
|
-
/** 轮廓是否虚线 */
|
|
2700
|
-
outlineDashed: boolean
|
|
2701
|
-
/** 轮廓虚线数组 */
|
|
2702
|
-
outlineDashArray: [number, number]
|
|
2703
|
-
/** 是否显示尺寸文本 */
|
|
2704
|
-
showSizeText: boolean
|
|
2705
|
-
/** 文本颜色 */
|
|
2706
|
-
textColor: ColorSource
|
|
2707
|
-
/** 文本位置 */
|
|
2708
|
-
textPosition: 'top' | 'right' | 'bottom' | 'left'
|
|
2709
|
-
/** 文本偏移 */
|
|
2710
|
-
textOffset: number
|
|
2711
|
-
/** 缩放按钮允许的最小缩放倍数 (相对初始尺寸, 默认 0.5; 设为 0 表示不限制最小) */
|
|
2712
|
-
minScaleRatio: number
|
|
2713
|
-
/** 缩放按钮允许的最大缩放倍数 (相对初始尺寸, 默认 2; 设为 Infinity 表示不限制最大) */
|
|
2714
|
-
maxScaleRatio: number
|
|
2715
|
-
/** 点击旋转方向: 'cw' 顺时针 | 'ccw' 逆时针 (默认 'cw') */
|
|
2716
|
-
rotateDirection: 'cw' | 'ccw'
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
declare class FurnitureManager_2 {
|
|
2720
|
-
private appService;
|
|
2721
|
-
private furnitureMap;
|
|
2722
|
-
private unsubscribeFns;
|
|
2723
|
-
constructor(appService: AppService);
|
|
2724
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2725
|
-
drawFurnitures(items: FurnitureParam[]): Promise<void>;
|
|
2726
|
-
private addFurniture;
|
|
2727
|
-
private removeFurniture;
|
|
2728
|
-
private clearAll;
|
|
2729
|
-
private updateEditState;
|
|
2730
|
-
private isDataEqual;
|
|
2731
|
-
destroy(): void;
|
|
2732
|
-
}
|
|
2733
|
-
|
|
2734
|
-
/** 家具参数 */
|
|
2735
|
-
export declare type FurnitureParam = {
|
|
2736
|
-
/** 家具ID */
|
|
2737
|
-
id: string
|
|
2738
|
-
/** 家具类型编号,匹配 config.furniture.assets 中的 type */
|
|
2739
|
-
furnitureType: number
|
|
2740
|
-
/** 四个顶点坐标 (顺时针: 左上→右上→右下→左下) */
|
|
2741
|
-
points: Point[]
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
/**
|
|
2745
|
-
* GIF 类型自定义元素参数
|
|
2746
|
-
* 保持现有逻辑
|
|
2747
|
-
*/
|
|
2748
|
-
export declare type GifCustomElementParam = BaseCustomElementParam & {
|
|
2749
|
-
/** 元素类型 */
|
|
2750
|
-
type: 'gif'
|
|
2751
|
-
/** GIF资源路径 */
|
|
2752
|
-
src: string
|
|
2753
|
-
/** GIF宽度(必需 - GIF 需要明确尺寸) */
|
|
2754
|
-
width: number
|
|
2755
|
-
/** GIF高度(必需 - GIF 需要明确尺寸) */
|
|
2756
|
-
height: number
|
|
2757
|
-
/**
|
|
2758
|
-
* 锚点位置
|
|
2759
|
-
*
|
|
2760
|
-
* 定义GIF的锚点位置,用于控制GIF相对于坐标点的对齐方式
|
|
2761
|
-
* - {x: 0, y: 0} 表示左上角
|
|
2762
|
-
* - {x: 0.5, y: 0.5} 表示中心点(默认)
|
|
2763
|
-
* - {x: 0.5, y: 1} 表示底部中心(适用于气泡图标)
|
|
2764
|
-
* - {x: 1, y: 1} 表示右下角
|
|
2765
|
-
*/
|
|
2766
|
-
anchor?: Point
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
declare class Heatmap extends Container {
|
|
2770
|
-
private appService;
|
|
2771
|
-
colorGradients: Array<string>;
|
|
2772
|
-
cellSize: number;
|
|
2773
|
-
constructor(appService: AppService);
|
|
2774
|
-
/**
|
|
2775
|
-
* 绘制热力图
|
|
2776
|
-
* @param grid 处理好的热力数据 每个网格的信号强度 和 坐标
|
|
2777
|
-
* @param useGradient 是否使用渐变绘制
|
|
2778
|
-
*/
|
|
2779
|
-
draw(grid: Array<Array<{
|
|
2780
|
-
x: number;
|
|
2781
|
-
y: number;
|
|
2782
|
-
signal: number;
|
|
2783
|
-
hasPoint: boolean;
|
|
2784
|
-
}>>, heatmapAlpha?: number): void;
|
|
2785
|
-
/**
|
|
2786
|
-
* 裁剪热力图 仅显示房间区域
|
|
2787
|
-
* 根据roomFill图层的子元素 组合Graphics生成大Graphics裁剪
|
|
2788
|
-
* @param heatmap 热力图mesh
|
|
2789
|
-
*/
|
|
2790
|
-
private croppingHeatmap;
|
|
2791
|
-
/**
|
|
2792
|
-
* 网格绘制热力图 我网格模式
|
|
2793
|
-
* @param grid 处理好的热力数据 每个网格的信号强度 和 坐标
|
|
2794
|
-
* @returns 网格热力图mesh
|
|
2795
|
-
*/
|
|
2796
|
-
private gridDrawing;
|
|
2797
|
-
/**
|
|
2798
|
-
* 渐变绘制热力图
|
|
2799
|
-
* @param grid 处理好的热力数据 每个网格的信号强度 和 坐标
|
|
2800
|
-
* @returns 渐变热力图mesh
|
|
2801
|
-
*/
|
|
2802
|
-
private gradientDrawing;
|
|
2803
|
-
/**
|
|
2804
|
-
* 更新位置
|
|
2805
|
-
* @param x
|
|
2806
|
-
* @param y
|
|
2807
|
-
*/
|
|
2808
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2809
|
-
/**
|
|
2810
|
-
* 销毁热力图
|
|
2811
|
-
*/
|
|
2812
|
-
destroy(): void;
|
|
2813
|
-
}
|
|
2814
|
-
|
|
2815
|
-
declare class HeatmapManager_2 {
|
|
2816
|
-
private appService;
|
|
2817
|
-
heatmap: Heatmap;
|
|
2818
|
-
pointsTopLeftOrigin: HeatmapPoint[];
|
|
2819
|
-
signalGrid: Array<Array<{
|
|
2820
|
-
x: number;
|
|
2821
|
-
y: number;
|
|
2822
|
-
signal: number;
|
|
2823
|
-
hasPoint: boolean;
|
|
2824
|
-
}>>;
|
|
2825
|
-
cellSize: number;
|
|
2826
|
-
maxDistance: number;
|
|
2827
|
-
smoothIterations: number;
|
|
2828
|
-
heatmapAlpha: number;
|
|
2829
|
-
isHeatmapDrawn: boolean;
|
|
2830
|
-
private loadTimer;
|
|
2831
|
-
constructor(appService: AppService);
|
|
2832
|
-
/**
|
|
2833
|
-
* 绘制热力图
|
|
2834
|
-
* @param mapData 地图数据
|
|
2835
|
-
* @param heatmapPoints 热力图点
|
|
2836
|
-
* @returns
|
|
2837
|
-
*/
|
|
2838
|
-
private pendingPoints;
|
|
2839
|
-
/**
|
|
2840
|
-
* 绘制热力图
|
|
2841
|
-
* @param mapData 地图数据
|
|
2842
|
-
* @param heatmapPoints 热力图点
|
|
2843
|
-
* @returns
|
|
2844
|
-
*/
|
|
2845
|
-
draw(heatmapPoints: HeatmapPoint[]): void;
|
|
2846
|
-
/**
|
|
2847
|
-
* 地图加载完成回调
|
|
2848
|
-
*/
|
|
2849
|
-
onMapLoaded(): void;
|
|
2850
|
-
/**
|
|
2851
|
-
* 插值计算信号网格
|
|
2852
|
-
* @param pointsTopLeftOrigin 热力图路径点
|
|
2853
|
-
* @returns 信号网格
|
|
2854
|
-
*/
|
|
2855
|
-
calculateInterpolatedSignal(pointsTopLeftOrigin: HeatmapPoint[]): {
|
|
2856
|
-
x: number;
|
|
2857
|
-
y: number;
|
|
2858
|
-
signal: number;
|
|
2859
|
-
hasPoint: boolean;
|
|
2860
|
-
}[][];
|
|
2861
|
-
/**
|
|
2862
|
-
* 更新热力图位置
|
|
2863
|
-
* @param x
|
|
2864
|
-
* @param y
|
|
2865
|
-
*/
|
|
2866
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
2867
|
-
/**
|
|
2868
|
-
* 销毁热力图
|
|
2869
|
-
*/
|
|
2870
|
-
destroy(): void;
|
|
2871
|
-
}
|
|
2872
|
-
|
|
2873
|
-
/** 热力图点 */
|
|
2874
|
-
export declare type HeatmapPoint = Point & {
|
|
2875
|
-
/** 信号强度 */
|
|
2876
|
-
signal: number
|
|
2877
|
-
}
|
|
2878
|
-
|
|
2879
|
-
/**
|
|
2880
|
-
* HTML 类型自定义元素参数
|
|
2881
|
-
* 支持动态尺寸
|
|
2882
|
-
*/
|
|
2883
|
-
export declare type HtmlCustomElementParam = BaseCustomElementParam & {
|
|
2884
|
-
/** 元素类型 */
|
|
2885
|
-
type: 'html'
|
|
2886
|
-
/** HTML内容 */
|
|
2887
|
-
htmlContent: string
|
|
2888
|
-
/** 宽度 */
|
|
2889
|
-
width?: number
|
|
2890
|
-
/** 高度 */
|
|
2891
|
-
height?: number
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
/** 图标配置 */
|
|
2895
|
-
export declare type IconConfig = IconSize & {
|
|
2896
|
-
/** 尺寸是否固定 */
|
|
2897
|
-
sizeFixed?: boolean
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
/**
|
|
2901
|
-
* 图标坐标点
|
|
2902
|
-
* 包含位置和可选的旋转角度
|
|
2903
|
-
*/
|
|
2904
|
-
export declare type IconPoint = Point & {
|
|
2905
|
-
/** 旋转角度(度) */
|
|
2906
|
-
rotation?: number
|
|
2907
|
-
}
|
|
2908
|
-
|
|
2909
|
-
/** 图标尺寸 */
|
|
2910
|
-
export declare type IconSize = {
|
|
2911
|
-
/** 宽度 */
|
|
2912
|
-
width: number
|
|
2913
|
-
/** 高度 */
|
|
2914
|
-
height: number
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
|
-
/**
|
|
2918
|
-
* Image 类型自定义元素参数
|
|
2919
|
-
* 保持现有逻辑
|
|
2920
|
-
*/
|
|
2921
|
-
export declare type ImageCustomElementParam = BaseCustomElementParam & {
|
|
2922
|
-
/** 元素类型 */
|
|
2923
|
-
type: 'image'
|
|
2924
|
-
/** 图片资源路径 */
|
|
2925
|
-
src: string
|
|
2926
|
-
/** 图片宽度(必需 - 图片需要明确尺寸) */
|
|
2927
|
-
width: number
|
|
2928
|
-
/** 图片高度(必需 - 图片需要明确尺寸) */
|
|
2929
|
-
height: number
|
|
2930
|
-
/**
|
|
2931
|
-
* 锚点位置
|
|
2932
|
-
*
|
|
2933
|
-
* 定义图片的锚点位置,用于控制图片相对于坐标点的对齐方式
|
|
2934
|
-
* - {x: 0, y: 0} 表示左上角
|
|
2935
|
-
* - {x: 0.5, y: 0.5} 表示中心点(默认)
|
|
2936
|
-
* - {x: 0.5, y: 1} 表示底部中心(适用于气泡图标)
|
|
2937
|
-
* - {x: 1, y: 1} 表示右下角
|
|
2938
|
-
*/
|
|
2939
|
-
anchor?: Point
|
|
2940
|
-
}
|
|
2941
|
-
|
|
2942
|
-
/* Excluded from this release type: InstanceEvents */
|
|
2943
|
-
|
|
2944
|
-
declare class Interaction_2 extends Container {
|
|
2945
|
-
private appService;
|
|
2946
|
-
dragStart: {
|
|
2947
|
-
x: number;
|
|
2948
|
-
y: number;
|
|
2949
|
-
} | null;
|
|
2950
|
-
initialTouchDistance: number | null;
|
|
2951
|
-
initialScale: {
|
|
2952
|
-
x: number;
|
|
2953
|
-
y: number;
|
|
2954
|
-
} | null;
|
|
2955
|
-
activeTouches: Map<number, {
|
|
2956
|
-
x: number;
|
|
2957
|
-
y: number;
|
|
2958
|
-
}>;
|
|
2959
|
-
firstTouchId: number | null;
|
|
2960
|
-
secondTouchId: number | null;
|
|
2961
|
-
taintedPointers: Set<number>;
|
|
2962
|
-
zoomFactor: number;
|
|
2963
|
-
scaleMin: number;
|
|
2964
|
-
scaleMax: number;
|
|
2965
|
-
originalPosition: {
|
|
2966
|
-
x: number;
|
|
2967
|
-
y: number;
|
|
2968
|
-
};
|
|
2969
|
-
targetPosition: {
|
|
2970
|
-
x: number;
|
|
2971
|
-
y: number;
|
|
2972
|
-
};
|
|
2973
|
-
centerPosition: {
|
|
2974
|
-
x: number;
|
|
2975
|
-
y: number;
|
|
2976
|
-
};
|
|
2977
|
-
originalScale: {
|
|
2978
|
-
x: number;
|
|
2979
|
-
y: number;
|
|
2980
|
-
};
|
|
2981
|
-
targetScale: {
|
|
2982
|
-
x: number;
|
|
2983
|
-
y: number;
|
|
2984
|
-
};
|
|
2985
|
-
defaultScale: {
|
|
2986
|
-
x: number;
|
|
2987
|
-
y: number;
|
|
2988
|
-
};
|
|
2989
|
-
transitionDuration: number;
|
|
2990
|
-
transitionStartTime: number | null;
|
|
2991
|
-
initialPinchCenter: Point | null;
|
|
2992
|
-
isGestureValid: boolean;
|
|
2993
|
-
lastTapTime: number;
|
|
2994
|
-
doubleTapDelay: number;
|
|
2995
|
-
doubleTapZoomFactor: number;
|
|
2996
|
-
lastTapPosition: Point | null;
|
|
2997
|
-
tapDistanceThreshold: number;
|
|
2998
|
-
tapDetectionEnabled: boolean;
|
|
2999
|
-
private mapClickStartPosition;
|
|
3000
|
-
private mapClickStartTime;
|
|
3001
|
-
private readonly mapClickTimeThreshold;
|
|
3002
|
-
private readonly mapClickMoveThreshold;
|
|
3003
|
-
private shouldSuppressMapClick;
|
|
3004
|
-
private isGestureHijacked;
|
|
3005
|
-
private hijackedPointerId;
|
|
3006
|
-
private isHijackPaused;
|
|
3007
|
-
private interactionGraphics;
|
|
3008
|
-
private viewportBounds;
|
|
3009
|
-
private boundResetAnimation;
|
|
3010
|
-
private debouncedStopWheelRender;
|
|
3011
|
-
private debouncedLogWheelScale;
|
|
3012
|
-
private interactionState;
|
|
3013
|
-
private throttledAntiScale;
|
|
3014
|
-
private unsubscribeEnableInteraction;
|
|
3015
|
-
constructor(appService: AppService);
|
|
3016
|
-
/**
|
|
3017
|
-
* 更新交互模式
|
|
3018
|
-
* @param enabled 是否启用交互
|
|
3019
|
-
*/
|
|
3020
|
-
private updateInteractionMode;
|
|
3021
|
-
setupInteraction(): void;
|
|
3022
|
-
/**
|
|
3023
|
-
* 处理全局取消或失去焦点事件
|
|
3024
|
-
*/
|
|
3025
|
-
private handleGlobalCancel;
|
|
3026
|
-
resetPan(targetPosition: {
|
|
3027
|
-
x: number;
|
|
3028
|
-
y: number;
|
|
3029
|
-
}): void;
|
|
3030
|
-
/**
|
|
3031
|
-
* 设置地图的位置和缩放,可选择是否使用动画过渡
|
|
3032
|
-
* @param options 缩放和位置选项
|
|
3033
|
-
* @param animate 是否使用动画,默认为 true
|
|
3034
|
-
*/
|
|
3035
|
-
setPanZoom({ targetPosition, targetScale, setCenter, setScale, }?: {
|
|
3036
|
-
targetPosition?: {
|
|
3037
|
-
x: number;
|
|
3038
|
-
y: number;
|
|
3039
|
-
};
|
|
3040
|
-
targetScale?: {
|
|
3041
|
-
x: number;
|
|
3042
|
-
y: number;
|
|
3043
|
-
};
|
|
3044
|
-
setCenter?: boolean;
|
|
3045
|
-
setScale?: boolean;
|
|
3046
|
-
}, animate?: boolean): void;
|
|
3047
|
-
clearTouches(): void;
|
|
3048
|
-
/**
|
|
3049
|
-
* 检查事件监听器状态 - 调试用
|
|
3050
|
-
*/
|
|
3051
|
-
checkEventListeners(): {
|
|
3052
|
-
wheel: number;
|
|
3053
|
-
pointerdown: number;
|
|
3054
|
-
pointerup: number;
|
|
3055
|
-
pointerupoutside: number;
|
|
3056
|
-
pointermove: number;
|
|
3057
|
-
};
|
|
3058
|
-
/**
|
|
3059
|
-
* 销毁时清理事件监听
|
|
3060
|
-
*/
|
|
3061
|
-
destroy(): void;
|
|
3062
|
-
/**
|
|
3063
|
-
* 处理抑制地图点击事件
|
|
3064
|
-
*/
|
|
3065
|
-
private handleSuppressMapClick;
|
|
3066
|
-
/**
|
|
3067
|
-
* 处理手势劫持
|
|
3068
|
-
*/
|
|
3069
|
-
private handleGestureHijacked;
|
|
3070
|
-
/**
|
|
3071
|
-
* 退出手势劫持模式
|
|
3072
|
-
*/
|
|
3073
|
-
private exitGestureHijacked;
|
|
3074
|
-
/**
|
|
3075
|
-
* 强制结束当前正在进行的手势交互
|
|
3076
|
-
*/
|
|
3077
|
-
forceEndGesture(): void;
|
|
3078
|
-
/**
|
|
3079
|
-
* 暂停手势劫持(双指模式)
|
|
3080
|
-
*/
|
|
3081
|
-
private pauseGestureHijack;
|
|
3082
|
-
/**
|
|
3083
|
-
* 恢复手势劫持(回到单指模式)
|
|
3084
|
-
*/
|
|
3085
|
-
private resumeGestureHijack;
|
|
3086
|
-
private antiScale;
|
|
3087
|
-
private resetAnimation;
|
|
3088
|
-
private onWheel;
|
|
3089
|
-
private onPointerDown;
|
|
3090
|
-
private onPointerUp;
|
|
3091
|
-
private detectDoubleTap;
|
|
3092
|
-
private detectMapClick;
|
|
3093
|
-
private handleDoubleTap;
|
|
3094
|
-
private onPointerMove;
|
|
3095
|
-
private applyPan;
|
|
3096
|
-
private applyPinchZoom;
|
|
3097
|
-
private setInitialScaleAndDistance;
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
declare type LayerName = (typeof LAYERS)[number];
|
|
3101
|
-
|
|
3102
|
-
declare const LAYERS: string[];
|
|
3103
|
-
|
|
3104
|
-
/** 管理器类型定义 */
|
|
3105
|
-
declare type Managers = {
|
|
3106
|
-
mapManager: MapManager_2;
|
|
3107
|
-
heatmapManager: HeatmapManager_2;
|
|
3108
|
-
pathManager: PathManager_2;
|
|
3109
|
-
controlsManager: ControlsManager_2;
|
|
3110
|
-
detectedObjectManager: DetectedObjectManager_2;
|
|
3111
|
-
customElementsManager: CustomElementsManager_2;
|
|
3112
|
-
roomsManager: RoomManager_2;
|
|
3113
|
-
customCarpetManager: CustomCarpetManager;
|
|
3114
|
-
furnitureManager: FurnitureManager_2;
|
|
3115
|
-
editControlManager: EditControlManager_2;
|
|
3116
|
-
};
|
|
3117
|
-
|
|
3118
|
-
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"];
|
|
3119
|
-
|
|
3120
|
-
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"];
|
|
3121
|
-
|
|
3122
|
-
/**
|
|
3123
|
-
* 地图 API 接口定义
|
|
3124
|
-
*
|
|
3125
|
-
* 这个接口定义了所有可供调用的地图操作方法。
|
|
3126
|
-
*
|
|
3127
|
-
* 通过onMapReady回调获得的 `mapApi` 对象实现了这个接口。
|
|
3128
|
-
*
|
|
3129
|
-
*/
|
|
3130
|
-
export declare interface MapApi {
|
|
3131
|
-
/** 地图是否绘制完成 */
|
|
3132
|
-
isMapDrawn: boolean;
|
|
3133
|
-
/**
|
|
3134
|
-
* 重置地图的平移和缩放状态
|
|
3135
|
-
*
|
|
3136
|
-
* 将地图的缩放和平移状态重置到初始位置,使地图完整显示在视口中。
|
|
3137
|
-
*/
|
|
3138
|
-
resetPanZoom(): void;
|
|
3139
|
-
/**
|
|
3140
|
-
* 强制结束当前正在进行的手势交互
|
|
3141
|
-
*
|
|
3142
|
-
* 当小程序侧检测到 touchend 或其他需要强制结束手势的情况时调用。
|
|
3143
|
-
*/
|
|
3144
|
-
forceEndGesture(): void;
|
|
3145
|
-
/**
|
|
3146
|
-
* 更新运行时配置
|
|
3147
|
-
*
|
|
3148
|
-
* 动态更新地图应用的运行时配置,如显示设置、交互模式等。
|
|
3149
|
-
*
|
|
3150
|
-
* @param runtime - 要更新的运行时配置
|
|
3151
|
-
*/
|
|
3152
|
-
updateRuntime(runtime: DeepPartialRuntimeConfig): void;
|
|
3153
|
-
/**
|
|
3154
|
-
* 动态更新静态配置
|
|
3155
|
-
*
|
|
3156
|
-
* 支持增量更新配置对象,配置变化会自动通知订阅的组件进行重绘。
|
|
3157
|
-
* 主要用于主题切换、颜色调整等场景。
|
|
3158
|
-
*
|
|
3159
|
-
* @param partialConfig - 部分配置对象,支持深度增量更新
|
|
3160
|
-
*
|
|
3161
|
-
* @example
|
|
3162
|
-
* ```typescript
|
|
3163
|
-
* // 切换背景颜色
|
|
3164
|
-
* mapApp.updateConfig({
|
|
3165
|
-
* global: { backgroundColor: '#1a1a1a' }
|
|
3166
|
-
* })
|
|
3167
|
-
*
|
|
3168
|
-
* // 切换房间颜色主题
|
|
3169
|
-
* mapApp.updateConfig({
|
|
3170
|
-
* room: {
|
|
3171
|
-
* colors: {
|
|
3172
|
-
* active: ['#ff6b6b', '#4ecdc4', '#45b7d1', '#ffa07a'],
|
|
3173
|
-
* inactive: ['#ffcccb', '#b4f8c8', '#a0e7e5', '#ffdab9'],
|
|
3174
|
-
* }
|
|
3175
|
-
* }
|
|
3176
|
-
* })
|
|
3177
|
-
*
|
|
3178
|
-
* // 更新路径样式
|
|
3179
|
-
* mapApp.updateConfig({
|
|
3180
|
-
* path: {
|
|
3181
|
-
* commonPath: { color: '#00ff00', width: 0.8 }
|
|
3182
|
-
* }
|
|
3183
|
-
* })
|
|
3184
|
-
* ```
|
|
3185
|
-
*/
|
|
3186
|
-
updateConfig(partialConfig: DeepPartial<AppConfig>): void;
|
|
3187
|
-
/**
|
|
3188
|
-
* 更新运行时配置
|
|
3189
|
-
*
|
|
3190
|
-
* 动态更新地图应用的运行时配置,如显示设置、交互模式等。
|
|
3191
|
-
*
|
|
3192
|
-
* @param runtime - 要更新的运行时配置
|
|
3193
|
-
*/
|
|
3194
|
-
updateRuntime(runtime: DeepPartialRuntimeConfig): void;
|
|
3195
|
-
/**
|
|
3196
|
-
* 动态更新静态配置
|
|
3197
|
-
*
|
|
3198
|
-
* 支持增量更新配置对象,配置变化会自动通知订阅的组件进行重绘。
|
|
3199
|
-
* 主要用于主题切换、颜色调整等场景。
|
|
3200
|
-
*
|
|
3201
|
-
* @param partialConfig - 部分配置对象,支持深度增量更新
|
|
3202
|
-
*
|
|
3203
|
-
* @example
|
|
3204
|
-
* ```typescript
|
|
3205
|
-
* // 切换背景颜色
|
|
3206
|
-
* mapApp.updateConfig({
|
|
3207
|
-
* global: { backgroundColor: '#1a1a1a' }
|
|
3208
|
-
* })
|
|
3209
|
-
*
|
|
3210
|
-
* // 切换房间颜色主题
|
|
3211
|
-
* mapApp.updateConfig({
|
|
3212
|
-
* room: {
|
|
3213
|
-
* colors: {
|
|
3214
|
-
* active: ['#ff6b6b', '#4ecdc4', '#45b7d1', '#ffa07a'],
|
|
3215
|
-
* inactive: ['#ffcccb', '#b4f8c8', '#a0e7e5', '#ffdab9'],
|
|
3216
|
-
* }
|
|
3217
|
-
* }
|
|
3218
|
-
* })
|
|
3219
|
-
*
|
|
3220
|
-
* // 更新路径样式
|
|
3221
|
-
* mapApp.updateConfig({
|
|
3222
|
-
* path: {
|
|
3223
|
-
* commonPath: { color: '#00ff00', width: 0.8 }
|
|
3224
|
-
* }
|
|
3225
|
-
* })
|
|
3226
|
-
* ```
|
|
3227
|
-
*/
|
|
3228
|
-
updateConfig(partialConfig: DeepPartial<AppConfig>): void;
|
|
3229
|
-
/**
|
|
3230
|
-
* 获取当前地图上所有禁扫区域数据
|
|
3231
|
-
*
|
|
3232
|
-
* @returns 区域数据数组
|
|
3233
|
-
*/
|
|
3234
|
-
getForbiddenSweepZones(): ZoneParam[];
|
|
3235
|
-
/**
|
|
3236
|
-
* 获取当前地图上所有禁拖区域数据
|
|
3237
|
-
*
|
|
3238
|
-
* @returns 区域数据数组
|
|
3239
|
-
*/
|
|
3240
|
-
getForbiddenMopZones(): ZoneParam[];
|
|
3241
|
-
/**
|
|
3242
|
-
* 获取当前地图上所有清扫区域数据
|
|
3243
|
-
*
|
|
3244
|
-
* @returns 区域数据数组
|
|
3245
|
-
*/
|
|
3246
|
-
getCleanZones(): ZoneParam[];
|
|
3247
|
-
/**
|
|
3248
|
-
* 获取当前地图上所有自定义地毯数据
|
|
3249
|
-
*
|
|
3250
|
-
* @returns 地毯数据数组
|
|
3251
|
-
*/
|
|
3252
|
-
getCustomCarpets(): CustomCarpetParam[];
|
|
3253
|
-
/**
|
|
3254
|
-
* 获取当前地图上所有虚拟墙数据
|
|
3255
|
-
*
|
|
3256
|
-
* @returns 虚拟墙数据数组
|
|
3257
|
-
*/
|
|
3258
|
-
getVirtualWalls(): VirtualWallParam[];
|
|
3259
|
-
/**
|
|
3260
|
-
* 获取当前地图上所有定点清扫数据
|
|
3261
|
-
*
|
|
3262
|
-
* @returns 定点清扫数据数组
|
|
3263
|
-
*/
|
|
3264
|
-
getSpots(): SpotParam[];
|
|
3265
|
-
/**
|
|
3266
|
-
* 获取分割线有效端点
|
|
3267
|
-
* @returns 分割线有效端点
|
|
3268
|
-
*/
|
|
3269
|
-
getEffectiveDividerPoints(): Point[] | null;
|
|
3270
|
-
/**
|
|
3271
|
-
* 获取分割线端点
|
|
3272
|
-
* @returns 分割线端点
|
|
3273
|
-
*/
|
|
3274
|
-
getDividerEndPoints(): Point[] | null;
|
|
3275
|
-
/**
|
|
3276
|
-
* 获取当前视口中心点坐标
|
|
3277
|
-
*
|
|
3278
|
-
* 返回当前视口中心点在地图坐标系中的位置,坐标相对于地图原点。
|
|
3279
|
-
* 该坐标可以直接用于创建禁区、虚拟墙等控制元素。
|
|
3280
|
-
*
|
|
3281
|
-
* @returns 视口中心的相对坐标,如果地图未初始化则返回 null
|
|
3282
|
-
*/
|
|
3283
|
-
getViewportCenterPoint(): Point | null;
|
|
3284
|
-
/**
|
|
3285
|
-
* 获取地图中心点坐标
|
|
3286
|
-
*
|
|
3287
|
-
* 返回地图包围盒中心点在地图坐标系中的位置,坐标相对于地图原点。
|
|
3288
|
-
* 该坐标基于地图边界计算,可以直接用于创建控制元素。
|
|
3289
|
-
*
|
|
3290
|
-
* @returns 地图中心的相对坐标,如果地图未初始化则返回 null
|
|
3291
|
-
*/
|
|
3292
|
-
getMapCenterPoint(): Point | null;
|
|
3293
|
-
/**
|
|
3294
|
-
* 基于视口中心生成虚拟墙端点坐标
|
|
3295
|
-
*
|
|
3296
|
-
* 根据当前视口中心位置生成虚拟墙的两个端点坐标,支持自定义长度、方向和偏移。
|
|
3297
|
-
*
|
|
3298
|
-
* @param options - 配置选项
|
|
3299
|
-
* @param options.width - 虚拟墙长度,单位米,默认使用配置中的最小宽度
|
|
3300
|
-
* @param options.direction - 虚拟墙方向,'horizontal' 或 'vertical',默认为 'horizontal'
|
|
3301
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3302
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3303
|
-
* @returns 虚拟墙的两个端点坐标数组
|
|
3304
|
-
*/
|
|
3305
|
-
getWallPointsByViewportCenter(options?: {
|
|
3306
|
-
width?: number;
|
|
3307
|
-
direction?: Direction;
|
|
3308
|
-
offsetX?: number;
|
|
3309
|
-
offsetY?: number;
|
|
3310
|
-
}): Point[];
|
|
3311
|
-
/**
|
|
3312
|
-
* 基于视口中心生成禁扫区域顶点坐标
|
|
3313
|
-
*
|
|
3314
|
-
* 根据当前视口中心位置生成禁扫区域的四个顶点坐标。
|
|
3315
|
-
*
|
|
3316
|
-
* @param options - 配置选项
|
|
3317
|
-
* @param options.size - 区域大小,单位米,默认使用配置中的最小尺寸
|
|
3318
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3319
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3320
|
-
* @returns 禁扫区域的四个顶点坐标数组
|
|
3321
|
-
*/
|
|
3322
|
-
getForbiddenSweepZonePointsByViewportCenter(options?: {
|
|
3323
|
-
size?: number;
|
|
3324
|
-
offsetX?: number;
|
|
3325
|
-
offsetY?: number;
|
|
3326
|
-
}): Point[];
|
|
3327
|
-
/**
|
|
3328
|
-
* 基于视口中心生成禁拖区域顶点坐标
|
|
3329
|
-
*
|
|
3330
|
-
* 根据当前视口中心位置生成禁拖区域的四个顶点坐标。
|
|
3331
|
-
*
|
|
3332
|
-
* @param options - 配置选项
|
|
3333
|
-
* @param options.size - 区域大小,单位米,默认使用配置中的最小尺寸
|
|
3334
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3335
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3336
|
-
* @returns 禁拖区域的四个顶点坐标数组
|
|
3337
|
-
*/
|
|
3338
|
-
getForbiddenMopZonePointsByViewportCenter(options?: {
|
|
3339
|
-
size?: number;
|
|
3340
|
-
offsetX?: number;
|
|
3341
|
-
offsetY?: number;
|
|
3342
|
-
}): Point[];
|
|
3343
|
-
/**
|
|
3344
|
-
* 基于视口中心生成清扫区域顶点坐标
|
|
3345
|
-
*
|
|
3346
|
-
* 根据当前视口中心位置生成清扫区域的四个顶点坐标。
|
|
3347
|
-
*
|
|
3348
|
-
* @param options - 配置选项
|
|
3349
|
-
* @param options.size - 区域大小,单位米,默认使用配置中的最小尺寸
|
|
3350
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3351
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3352
|
-
* @returns 清扫区域的四个顶点坐标数组
|
|
3353
|
-
*/
|
|
3354
|
-
getCleanZonePointsByViewportCenter(options?: {
|
|
3355
|
-
size?: number;
|
|
3356
|
-
offsetX?: number;
|
|
3357
|
-
offsetY?: number;
|
|
3358
|
-
}): Point[];
|
|
3359
|
-
/**
|
|
3360
|
-
* 绘制家具
|
|
3361
|
-
*
|
|
3362
|
-
* 通过 diff 机制驱动家具的增删改:
|
|
3363
|
-
* - 新 ID 会被添加
|
|
3364
|
-
* - 已有 ID 的数据变化会被更新
|
|
3365
|
-
* - 不在列表中的已有 ID 会被移除
|
|
3366
|
-
* - 传入空数组即清空所有家具
|
|
3367
|
-
*
|
|
3368
|
-
* @param items - 家具数据数组
|
|
3369
|
-
*/
|
|
3370
|
-
drawFurnitures(items: FurnitureParam[]): void;
|
|
3371
|
-
/**
|
|
3372
|
-
* 基于视口中心生成家具顶点坐标
|
|
3373
|
-
*
|
|
3374
|
-
* 根据当前视口中心位置和指定的家具类型,生成家具的四个顶点坐标。
|
|
3375
|
-
* 初始尺寸来源于 config.furniture.assets 中对应类型的 width/height。
|
|
3376
|
-
*
|
|
3377
|
-
* @param options - 配置选项
|
|
3378
|
-
* @param options.furnitureType - 家具类型编号,匹配 config.furniture.assets 中的 type
|
|
3379
|
-
* @param options.offsetX - X方向像素偏移,默认为 0
|
|
3380
|
-
* @param options.offsetY - Y方向像素偏移,默认为 0
|
|
3381
|
-
* @returns 家具的四个顶点坐标数组
|
|
3382
|
-
*/
|
|
3383
|
-
getFurniturePointsByViewportCenter(options?: {
|
|
3384
|
-
furnitureType?: number;
|
|
3385
|
-
offsetX?: number;
|
|
3386
|
-
offsetY?: number;
|
|
3387
|
-
}): Point[];
|
|
3388
|
-
/**
|
|
3389
|
-
* 基于视口中心生成定点清扫的点坐标
|
|
3390
|
-
*
|
|
3391
|
-
* 根据当前视口中心位置生成定点清扫的坐标点。
|
|
3392
|
-
*
|
|
3393
|
-
* @param options - 配置选项
|
|
3394
|
-
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
3395
|
-
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
3396
|
-
* @returns 定点清扫的坐标点
|
|
3397
|
-
*/
|
|
3398
|
-
getSpotPointByViewportCenter(options?: {
|
|
3399
|
-
offsetX?: number;
|
|
3400
|
-
offsetY?: number;
|
|
3401
|
-
}): Point;
|
|
3402
|
-
/**
|
|
3403
|
-
* 判断指定的房间是否相邻(连通)
|
|
3404
|
-
*
|
|
3405
|
-
* 支持结构化地图和点阵地图两种协议。对于多个房间,使用连通性算法判断:
|
|
3406
|
-
* 只要房间之间能通过相邻关系连接起来,就认为它们是相邻的。
|
|
3407
|
-
* 例如:房间A和B相邻,房间B和C相邻,则认为A、B、C三个房间都相邻。
|
|
3408
|
-
*
|
|
3409
|
-
* @param roomIds - 要检测的房间ID数组
|
|
3410
|
-
* @returns 是否所有指定的房间都相邻(连通)
|
|
3411
|
-
*/
|
|
3412
|
-
areRoomsAdjacent(roomIds: number[]): boolean;
|
|
3413
|
-
/**
|
|
3414
|
-
* 判断一个点是否与充电桩或机器人距离小于阈值。
|
|
3415
|
-
*
|
|
3416
|
-
* @param points - 点坐标数组
|
|
3417
|
-
* @param thresholdMeters - 阈值距离,单位米
|
|
3418
|
-
* @param options - 配置选项
|
|
3419
|
-
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
3420
|
-
* @param options.checkRobot - 是否检查与机器人的距离,默认为 false
|
|
3421
|
-
* @returns 是否在判定范围内(true 表示过近,false 表示距离足够)
|
|
3422
|
-
*/
|
|
3423
|
-
isNearChargerOrRobot(points: Point[], thresholdMeters: number, options?: {
|
|
3424
|
-
checkCharger?: boolean;
|
|
3425
|
-
checkRobot?: boolean;
|
|
3426
|
-
}): boolean;
|
|
3427
|
-
/**
|
|
3428
|
-
* 判断一个点是否在任意房间内
|
|
3429
|
-
*
|
|
3430
|
-
* 接受机器坐标系的点(相对于origin的坐标),遍历所有房间,
|
|
3431
|
-
* 判断该点是否在某个房间内。支持结构化地图和点阵地图两种协议。
|
|
3432
|
-
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
3433
|
-
*
|
|
3434
|
-
* @param point - 待检测的点坐标(机器坐标系,与Zone、VirtualWall等使用相同的坐标系)
|
|
3435
|
-
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
3436
|
-
*/
|
|
3437
|
-
isPointInAnyRoom(point: Point): RoomData | null;
|
|
3438
|
-
/**
|
|
3439
|
-
* 判断墙体(线段)是否与任意房间有交集
|
|
3440
|
-
*
|
|
3441
|
-
* 接受机器坐标系的墙体端点(相对于origin的坐标),遍历所有房间,
|
|
3442
|
-
* 判断墙体是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
3443
|
-
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
3444
|
-
*
|
|
3445
|
-
* @param points - 墙体的两个端点坐标(机器坐标系,与VirtualWall等使用相同的坐标系)
|
|
3446
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
3447
|
-
*/
|
|
3448
|
-
isWallIntersectsAnyRoom(points: [Point, Point]): boolean;
|
|
3449
|
-
/**
|
|
3450
|
-
* 判断区域(矩形)是否与任意房间有交集
|
|
3451
|
-
*
|
|
3452
|
-
* 接受机器坐标系的区域顶点(相对于origin的坐标),遍历所有房间,
|
|
3453
|
-
* 判断区域是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
3454
|
-
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
3455
|
-
*
|
|
3456
|
-
* @param points - 区域的四个顶点坐标(机器坐标系,与Zone等使用相同的坐标系)
|
|
3457
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
3458
|
-
*/
|
|
3459
|
-
isZoneIntersectsAnyRoom(points: [Point, Point, Point, Point]): boolean;
|
|
3460
|
-
/**
|
|
3461
|
-
* 地图截图
|
|
3462
|
-
*
|
|
3463
|
-
* 将当前地图状态导出为图片。截图过程中会自动添加一个临时的背景层,
|
|
3464
|
-
* 确保禁区等半透明元素在截图中能够正确显示颜色。
|
|
3465
|
-
*
|
|
3466
|
-
* @param options - 截图配置选项
|
|
3467
|
-
* @param options.backgroundColor - 指定截图时的背景颜色。若不指定,将默认使用 `global.config.backgroundColor`。支持颜色字符串、十六进制数值或 RGB 数组。
|
|
3468
|
-
* @returns Promise<string> Base64 格式的图片数据 (Data URL)
|
|
3469
|
-
*/
|
|
3470
|
-
snapshot(options?: {
|
|
3471
|
-
backgroundColor?: ColorSource;
|
|
3472
|
-
}): Promise<string>;
|
|
927
|
+
anchor?: Point
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/** 热力图点 */
|
|
931
|
+
export declare type HeatmapPoint = Point & {
|
|
932
|
+
/** 信号强度 */
|
|
933
|
+
signal: number
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* HTML 类型自定义元素参数
|
|
938
|
+
* 支持动态尺寸
|
|
939
|
+
*/
|
|
940
|
+
export declare type HtmlCustomElementParam = BaseCustomElementParam & {
|
|
941
|
+
/** 元素类型 */
|
|
942
|
+
type: 'html'
|
|
943
|
+
/** HTML内容 */
|
|
944
|
+
htmlContent: string
|
|
945
|
+
/** 宽度 */
|
|
946
|
+
width?: number
|
|
947
|
+
/** 高度 */
|
|
948
|
+
height?: number
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/** 图标配置 */
|
|
952
|
+
export declare type IconConfig = IconSize & {
|
|
953
|
+
/** 尺寸是否固定 */
|
|
954
|
+
sizeFixed?: boolean
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* 图标坐标点
|
|
959
|
+
* 包含位置和可选的旋转角度
|
|
960
|
+
*/
|
|
961
|
+
export declare type IconPoint = Point & {
|
|
962
|
+
/** 旋转角度(度) */
|
|
963
|
+
rotation?: number
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/** 图标尺寸 */
|
|
967
|
+
export declare type IconSize = {
|
|
968
|
+
/** 宽度 */
|
|
969
|
+
width: number
|
|
970
|
+
/** 高度 */
|
|
971
|
+
height: number
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Image 类型自定义元素参数
|
|
976
|
+
* 保持现有逻辑
|
|
977
|
+
*/
|
|
978
|
+
export declare type ImageCustomElementParam = BaseCustomElementParam & {
|
|
979
|
+
/** 元素类型 */
|
|
980
|
+
type: 'image'
|
|
981
|
+
/** 图片资源路径 */
|
|
982
|
+
src: string
|
|
983
|
+
/** 图片宽度(必需 - 图片需要明确尺寸) */
|
|
984
|
+
width: number
|
|
985
|
+
/** 图片高度(必需 - 图片需要明确尺寸) */
|
|
986
|
+
height: number
|
|
3473
987
|
/**
|
|
3474
|
-
*
|
|
3475
|
-
*
|
|
3476
|
-
* 基于提供的地图、路径、区域等数据生成截图,通常用于多地图管理界面的缩略图预览。
|
|
3477
|
-
* 此方法会创建一个临时的离屏渲染实例,不会影响当前正在运行的地图显示状态。
|
|
988
|
+
* 锚点位置
|
|
3478
989
|
*
|
|
3479
|
-
*
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3482
|
-
*
|
|
3483
|
-
*
|
|
3484
|
-
* @param data.forbiddenSweepZones - 可选的禁扫区域数组
|
|
3485
|
-
* @param data.forbiddenMopZones - 可选的禁拖区域数组
|
|
3486
|
-
* @param data.virtualWalls - 可选的虚拟墙数组
|
|
3487
|
-
* @param data.detectedObjects - 可选的 AI 物体检测数据数组
|
|
3488
|
-
* @param data.furnitures - 可选的家具数据数组
|
|
3489
|
-
* @param runtime - 可选的运行时配置 (如是否显示机器人、充电桩等状态)
|
|
3490
|
-
* @param options - 截图配置选项
|
|
3491
|
-
* @param options.backgroundColor - 指定生成截图时的背景颜色。若不指定,将默认使用 `global.config.backgroundColor`。
|
|
3492
|
-
* @returns Promise<string> Base64 格式的图片数据 (Data URL)
|
|
990
|
+
* 定义图片的锚点位置,用于控制图片相对于坐标点的对齐方式
|
|
991
|
+
* - {x: 0, y: 0} 表示左上角
|
|
992
|
+
* - {x: 0.5, y: 0.5} 表示中心点(默认)
|
|
993
|
+
* - {x: 0.5, y: 1} 表示底部中心(适用于气泡图标)
|
|
994
|
+
* - {x: 1, y: 1} 表示右下角
|
|
3493
995
|
*/
|
|
3494
|
-
|
|
3495
|
-
map: string;
|
|
3496
|
-
path?: string;
|
|
3497
|
-
roomProperties?: RoomProperty[];
|
|
3498
|
-
customElements?: CustomElementParam[];
|
|
3499
|
-
forbiddenSweepZones?: ZoneParam[];
|
|
3500
|
-
forbiddenMopZones?: ZoneParam[];
|
|
3501
|
-
virtualWalls?: VirtualWallParam[];
|
|
3502
|
-
detectedObjects?: DetectedObjectParam[];
|
|
3503
|
-
furnitures?: FurnitureParam[];
|
|
3504
|
-
}, runtime?: DeepPartialRuntimeConfig, options?: {
|
|
3505
|
-
backgroundColor?: ColorSource;
|
|
3506
|
-
}): Promise<string>;
|
|
996
|
+
anchor?: Point
|
|
3507
997
|
}
|
|
3508
998
|
|
|
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"];
|
|
1000
|
+
|
|
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"];
|
|
1002
|
+
|
|
3509
1003
|
/**
|
|
3510
|
-
*
|
|
1004
|
+
* 地图 API 接口定义
|
|
1005
|
+
*
|
|
1006
|
+
* 这个接口定义了所有可供调用的地图操作方法。
|
|
1007
|
+
*
|
|
1008
|
+
* 通过onMapReady回调获得的 `mapApi` 对象实现了这个接口。
|
|
3511
1009
|
*
|
|
3512
|
-
* 地图应用的核心类,继承自 PIXI.Application,提供完整的地图渲染、交互和管理功能。
|
|
3513
|
-
* 支持扫地机器人地图的显示、路径绘制、房间管理、控制元素(禁区、虚拟墙等)等功能。
|
|
3514
1010
|
*/
|
|
3515
|
-
declare
|
|
3516
|
-
/** 地图状态对象 */
|
|
3517
|
-
mapState: MapState | null;
|
|
3518
|
-
/* Excluded from this release type: components */
|
|
3519
|
-
/* Excluded from this release type: managers */
|
|
3520
|
-
/* Excluded from this release type: config */
|
|
3521
|
-
/* Excluded from this release type: runtime */
|
|
3522
|
-
/* Excluded from this release type: appService */
|
|
3523
|
-
/* Excluded from this release type: scaleMin */
|
|
3524
|
-
/* Excluded from this release type: scaleMax */
|
|
3525
|
-
/* Excluded from this release type: events */
|
|
3526
|
-
/* Excluded from this release type: instanceKey */
|
|
3527
|
-
/* Excluded from this release type: containerElement */
|
|
3528
|
-
/* Excluded from this release type: emitter */
|
|
3529
|
-
/* Excluded from this release type: tickerState */
|
|
3530
|
-
private pendingAsyncRender;
|
|
3531
|
-
private isFirstMapDraw;
|
|
1011
|
+
export declare interface MapApi {
|
|
3532
1012
|
/** 地图是否绘制完成 */
|
|
3533
1013
|
isMapDrawn: boolean;
|
|
3534
|
-
/* Excluded from this release type: __constructor */
|
|
3535
1014
|
/**
|
|
3536
|
-
*
|
|
3537
|
-
*
|
|
3538
|
-
* 设置应用配置、运行时参数、事件处理器,并初始化所有必要的组件和管理器。
|
|
3539
|
-
*
|
|
3540
|
-
* @param options - 初始化选项,包含PIXI应用选项和地图应用选项
|
|
3541
|
-
* @param options.resizeTo - 画布大小调整目标元素
|
|
3542
|
-
* @param options.events - 事件回调
|
|
3543
|
-
* @param options.config - 静态配置
|
|
3544
|
-
* @param options.runtime - 运行时
|
|
3545
|
-
* @returns Promise<void>
|
|
1015
|
+
* 重置地图的平移和缩放状态
|
|
3546
1016
|
*
|
|
1017
|
+
* 将地图的缩放和平移状态重置到初始位置,使地图完整显示在视口中。
|
|
3547
1018
|
*/
|
|
3548
|
-
|
|
1019
|
+
resetPanZoom(): void;
|
|
3549
1020
|
/**
|
|
3550
|
-
*
|
|
3551
|
-
*
|
|
3552
|
-
* 根据结构化的地图数据源绘制地图,包括房间、障碍物、充电桩等元素。
|
|
3553
|
-
*
|
|
3554
|
-
* @param mapData - 结构化地图数据源
|
|
3555
|
-
* @returns Promise<void>
|
|
1021
|
+
* 强制结束当前正在进行的手势交互
|
|
3556
1022
|
*
|
|
1023
|
+
* 当小程序侧检测到 touchend 或其他需要强制结束手势的情况时调用。
|
|
3557
1024
|
*/
|
|
3558
|
-
|
|
1025
|
+
forceEndGesture(): void;
|
|
3559
1026
|
/**
|
|
3560
|
-
*
|
|
3561
|
-
*
|
|
3562
|
-
* 根据点阵地图数据绘制地图,支持点阵格式的地图数据。
|
|
1027
|
+
* 更新运行时配置
|
|
3563
1028
|
*
|
|
3564
|
-
*
|
|
3565
|
-
* @param rasterMapData.mapHeader - 地图头部信息,包含分辨率、原点等
|
|
3566
|
-
* @param rasterMapData.mapData - 地图像素数据
|
|
3567
|
-
* @returns Promise<void>
|
|
1029
|
+
* 动态更新地图应用的运行时配置,如显示设置、交互模式等。
|
|
3568
1030
|
*
|
|
1031
|
+
* @param runtime - 要更新的运行时配置
|
|
3569
1032
|
*/
|
|
3570
|
-
|
|
3571
|
-
mapHeader: MapHeader;
|
|
3572
|
-
mapData: MapData;
|
|
3573
|
-
}): Promise<void>;
|
|
1033
|
+
updateRuntime(runtime: DeepPartialRuntimeConfig): void;
|
|
3574
1034
|
/**
|
|
3575
|
-
*
|
|
3576
|
-
*
|
|
3577
|
-
* 根据路径数据绘制机器人的移动轨迹,包括普通路径、充电路径等不同类型。
|
|
3578
|
-
*
|
|
3579
|
-
* @param pathData - 路径数据对象
|
|
3580
|
-
* @returns void
|
|
1035
|
+
* 动态更新静态配置
|
|
3581
1036
|
*
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
/**
|
|
3585
|
-
* 绘制房间属性信息
|
|
1037
|
+
* 支持增量更新配置对象,配置变化会自动通知订阅的组件进行重绘。
|
|
1038
|
+
* 主要用于主题切换、颜色调整等场景。
|
|
3586
1039
|
*
|
|
3587
|
-
*
|
|
1040
|
+
* @param partialConfig - 部分配置对象,支持深度增量更新
|
|
3588
1041
|
*
|
|
3589
|
-
* @
|
|
3590
|
-
*
|
|
1042
|
+
* @example
|
|
1043
|
+
* ```typescript
|
|
1044
|
+
* // 切换背景颜色
|
|
1045
|
+
* mapApp.updateConfig({
|
|
1046
|
+
* global: { backgroundColor: '#1a1a1a' }
|
|
1047
|
+
* })
|
|
3591
1048
|
*
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
*
|
|
3596
|
-
*
|
|
3597
|
-
*
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
* 绘制家具
|
|
3602
|
-
* @param items - 家具参数数组
|
|
3603
|
-
*/
|
|
3604
|
-
drawFurnitures(items: FurnitureParam[]): Promise<void>;
|
|
3605
|
-
/**
|
|
3606
|
-
* 绘制热力图
|
|
3607
|
-
* @param param - 绘制参数
|
|
3608
|
-
* @returns void
|
|
1049
|
+
* // 切换房间颜色主题
|
|
1050
|
+
* mapApp.updateConfig({
|
|
1051
|
+
* room: {
|
|
1052
|
+
* colors: {
|
|
1053
|
+
* active: ['#ff6b6b', '#4ecdc4', '#45b7d1', '#ffa07a'],
|
|
1054
|
+
* inactive: ['#ffcccb', '#b4f8c8', '#a0e7e5', '#ffdab9'],
|
|
1055
|
+
* }
|
|
1056
|
+
* }
|
|
1057
|
+
* })
|
|
3609
1058
|
*
|
|
1059
|
+
* // 更新路径样式
|
|
1060
|
+
* mapApp.updateConfig({
|
|
1061
|
+
* path: {
|
|
1062
|
+
* commonPath: { color: '#00ff00', width: 0.8 }
|
|
1063
|
+
* }
|
|
1064
|
+
* })
|
|
1065
|
+
* ```
|
|
3610
1066
|
*/
|
|
3611
|
-
|
|
3612
|
-
/**
|
|
3613
|
-
* 绘制禁扫区域
|
|
3614
|
-
* @param zones - 禁扫区域参数数组
|
|
3615
|
-
*/
|
|
3616
|
-
drawForbiddenSweepZones(zones: ZoneParam[]): void;
|
|
3617
|
-
/**
|
|
3618
|
-
* 绘制禁拖区域
|
|
3619
|
-
* @param zones - 禁拖区域参数数组
|
|
3620
|
-
*/
|
|
3621
|
-
drawForbiddenMopZones(zones: ZoneParam[]): void;
|
|
3622
|
-
/**
|
|
3623
|
-
* 绘制清扫区域
|
|
3624
|
-
* @param zones - 清扫区域参数数组
|
|
3625
|
-
*/
|
|
3626
|
-
drawCleanZones(zones: ZoneParam[]): void;
|
|
3627
|
-
/**
|
|
3628
|
-
* 绘制虚拟墙
|
|
3629
|
-
* @param walls - 虚拟墙参数数组
|
|
3630
|
-
*/
|
|
3631
|
-
drawVirtualWalls(walls: VirtualWallParam[]): void;
|
|
3632
|
-
/**
|
|
3633
|
-
* 绘制定点清扫点
|
|
3634
|
-
* @param spots - 定点清扫参数数组
|
|
3635
|
-
*/
|
|
3636
|
-
drawSpots(spots: SpotParam[]): void;
|
|
3637
|
-
/**
|
|
3638
|
-
* 绘制途径点
|
|
3639
|
-
* @param wayPoints - 途径点参数数组
|
|
3640
|
-
*/
|
|
3641
|
-
drawWayPoints(wayPoints: WayPointParam[]): void;
|
|
3642
|
-
/**
|
|
3643
|
-
* 绘制检测到的物体
|
|
3644
|
-
* @param objects - 检测物体参数数组
|
|
3645
|
-
*/
|
|
3646
|
-
drawDetectedObjects(objects: DetectedObjectParam[]): Promise<void>;
|
|
3647
|
-
/**
|
|
3648
|
-
* 绘制自定义地毯
|
|
3649
|
-
* @param customCarpet - 自定义地毯参数数组
|
|
3650
|
-
*/
|
|
3651
|
-
drawCustomCarpet(customCarpet: CustomCarpetParam[]): void;
|
|
3652
|
-
/**
|
|
3653
|
-
* 绘制自定义元素
|
|
3654
|
-
* @param elements - 自定义元素参数数组
|
|
3655
|
-
*/
|
|
3656
|
-
drawCustomElements(elements: CustomElementParam[]): Promise<void>;
|
|
1067
|
+
updateConfig(partialConfig: DeepPartial<AppConfig>): void;
|
|
3657
1068
|
/**
|
|
3658
|
-
*
|
|
1069
|
+
* 更新运行时配置
|
|
3659
1070
|
*
|
|
3660
|
-
*
|
|
3661
|
-
*/
|
|
3662
|
-
getForbiddenSweepZones(): ZoneParam[];
|
|
3663
|
-
/**
|
|
3664
|
-
* 获取当前地图上所有禁拖区域数据
|
|
1071
|
+
* 动态更新地图应用的运行时配置,如显示设置、交互模式等。
|
|
3665
1072
|
*
|
|
3666
|
-
* @
|
|
1073
|
+
* @param runtime - 要更新的运行时配置
|
|
3667
1074
|
*/
|
|
3668
|
-
|
|
1075
|
+
updateRuntime(runtime: DeepPartialRuntimeConfig): void;
|
|
3669
1076
|
/**
|
|
3670
|
-
*
|
|
1077
|
+
* 动态更新静态配置
|
|
3671
1078
|
*
|
|
3672
|
-
*
|
|
3673
|
-
|
|
3674
|
-
getCleanZones(): ZoneParam[];
|
|
3675
|
-
/**
|
|
3676
|
-
* 获取当前地图上所有虚拟墙数据
|
|
1079
|
+
* 支持增量更新配置对象,配置变化会自动通知订阅的组件进行重绘。
|
|
1080
|
+
* 主要用于主题切换、颜色调整等场景。
|
|
3677
1081
|
*
|
|
3678
|
-
* @
|
|
3679
|
-
*/
|
|
3680
|
-
getVirtualWalls(): VirtualWallParam[];
|
|
3681
|
-
/**
|
|
3682
|
-
* 获取当前地图上所有定点清扫数据
|
|
1082
|
+
* @param partialConfig - 部分配置对象,支持深度增量更新
|
|
3683
1083
|
*
|
|
3684
|
-
* @
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
*
|
|
1084
|
+
* @example
|
|
1085
|
+
* ```typescript
|
|
1086
|
+
* // 切换背景颜色
|
|
1087
|
+
* mapApp.updateConfig({
|
|
1088
|
+
* global: { backgroundColor: '#1a1a1a' }
|
|
1089
|
+
* })
|
|
3689
1090
|
*
|
|
3690
|
-
*
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
*
|
|
3695
|
-
*
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
* 获取当前地图上所有自定义地毯数据
|
|
3700
|
-
* @returns 地毯数据数组
|
|
3701
|
-
*/
|
|
3702
|
-
getCustomCarpets(): CustomCarpetParam[];
|
|
3703
|
-
/**
|
|
3704
|
-
* 获取分割线端点
|
|
3705
|
-
* @returns 分割线端点
|
|
1091
|
+
* // 切换房间颜色主题
|
|
1092
|
+
* mapApp.updateConfig({
|
|
1093
|
+
* room: {
|
|
1094
|
+
* colors: {
|
|
1095
|
+
* active: ['#ff6b6b', '#4ecdc4', '#45b7d1', '#ffa07a'],
|
|
1096
|
+
* inactive: ['#ffcccb', '#b4f8c8', '#a0e7e5', '#ffdab9'],
|
|
1097
|
+
* }
|
|
1098
|
+
* }
|
|
1099
|
+
* })
|
|
3706
1100
|
*
|
|
1101
|
+
* // 更新路径样式
|
|
1102
|
+
* mapApp.updateConfig({
|
|
1103
|
+
* path: {
|
|
1104
|
+
* commonPath: { color: '#00ff00', width: 0.8 }
|
|
1105
|
+
* }
|
|
1106
|
+
* })
|
|
1107
|
+
* ```
|
|
3707
1108
|
*/
|
|
3708
|
-
|
|
1109
|
+
updateConfig(partialConfig: DeepPartial<AppConfig>): void;
|
|
3709
1110
|
/**
|
|
3710
|
-
*
|
|
1111
|
+
* 获取当前地图上所有禁扫区域数据
|
|
3711
1112
|
*
|
|
3712
|
-
*
|
|
1113
|
+
* @returns 区域数据数组
|
|
3713
1114
|
*/
|
|
3714
|
-
|
|
1115
|
+
getForbiddenSweepZones(): ZoneParam[];
|
|
3715
1116
|
/**
|
|
3716
|
-
*
|
|
1117
|
+
* 获取当前地图上所有禁拖区域数据
|
|
3717
1118
|
*
|
|
3718
|
-
*
|
|
3719
|
-
*/
|
|
3720
|
-
forceEndGesture(): void;
|
|
3721
|
-
/**
|
|
3722
|
-
* 将地图适配到视图中,居中并缩放
|
|
3723
|
-
* @param mapBounds 地图边界信息
|
|
3724
|
-
* @param animate 是否使用动画过渡,默认为 false
|
|
3725
|
-
*/
|
|
3726
|
-
fitMapToView(mapBounds: Bounds, animate?: boolean): void;
|
|
3727
|
-
/* Excluded from this release type: calculateRotatedBounds */
|
|
3728
|
-
/**
|
|
3729
|
-
* 获取视口边界(供 Interaction 等组件使用)
|
|
1119
|
+
* @returns 区域数据数组
|
|
3730
1120
|
*/
|
|
3731
|
-
|
|
3732
|
-
x: number;
|
|
3733
|
-
y: number;
|
|
3734
|
-
width: number;
|
|
3735
|
-
height: number;
|
|
3736
|
-
};
|
|
1121
|
+
getForbiddenMopZones(): ZoneParam[];
|
|
3737
1122
|
/**
|
|
3738
|
-
*
|
|
3739
|
-
*
|
|
3740
|
-
* 动态更新地图应用的运行时配置,如显示设置、交互模式等。
|
|
1123
|
+
* 获取当前地图上所有清扫区域数据
|
|
3741
1124
|
*
|
|
3742
|
-
* @
|
|
1125
|
+
* @returns 区域数据数组
|
|
3743
1126
|
*/
|
|
3744
|
-
|
|
1127
|
+
getCleanZones(): ZoneParam[];
|
|
3745
1128
|
/**
|
|
3746
|
-
*
|
|
3747
|
-
*
|
|
3748
|
-
* 支持增量更新配置对象,配置变化会自动通知订阅的组件进行重绘。
|
|
3749
|
-
* 主要用于主题切换、颜色调整等场景。
|
|
1129
|
+
* 获取当前地图上所有自定义地毯数据
|
|
3750
1130
|
*
|
|
3751
|
-
* @
|
|
1131
|
+
* @returns 地毯数据数组
|
|
3752
1132
|
*/
|
|
3753
|
-
|
|
1133
|
+
getCustomCarpets(): CustomCarpetParam[];
|
|
3754
1134
|
/**
|
|
3755
|
-
*
|
|
3756
|
-
*
|
|
3757
|
-
* 根据地图分辨率将米单位转换为像素单位。
|
|
1135
|
+
* 获取当前地图上所有虚拟墙数据
|
|
3758
1136
|
*
|
|
3759
|
-
* @
|
|
3760
|
-
* @returns 像素值
|
|
1137
|
+
* @returns 虚拟墙数据数组
|
|
3761
1138
|
*/
|
|
3762
|
-
|
|
1139
|
+
getVirtualWalls(): VirtualWallParam[];
|
|
3763
1140
|
/**
|
|
3764
|
-
*
|
|
3765
|
-
*
|
|
3766
|
-
* 根据地图分辨率将像素单位转换为米单位。
|
|
1141
|
+
* 获取当前地图上所有定点清扫数据
|
|
3767
1142
|
*
|
|
3768
|
-
* @
|
|
3769
|
-
* @returns 米数值
|
|
1143
|
+
* @returns 定点清扫数据数组
|
|
3770
1144
|
*/
|
|
3771
|
-
|
|
1145
|
+
getSpots(): SpotParam[];
|
|
3772
1146
|
/**
|
|
3773
|
-
*
|
|
3774
|
-
*
|
|
3775
|
-
* 基础尺寸是基于 scale=1 的标准尺寸,需要根据当前缩放级别进行调整。
|
|
3776
|
-
*
|
|
3777
|
-
* @param baseSize - 基础尺寸
|
|
3778
|
-
* @param currentScale - 当前缩放级别,不传则自动获取
|
|
3779
|
-
* @returns 固定显示尺寸
|
|
1147
|
+
* 获取分割线有效端点
|
|
1148
|
+
* @returns 分割线有效端点
|
|
3780
1149
|
*/
|
|
3781
|
-
|
|
1150
|
+
getEffectiveDividerPoints(): Point[] | null;
|
|
3782
1151
|
/**
|
|
3783
|
-
*
|
|
3784
|
-
*
|
|
3785
|
-
* @param fixedSize - 固定显示尺寸
|
|
3786
|
-
* @param currentScale - 当前缩放级别,不传则自动获取
|
|
3787
|
-
* @returns 基础尺寸
|
|
1152
|
+
* 获取分割线端点
|
|
1153
|
+
* @returns 分割线端点
|
|
3788
1154
|
*/
|
|
3789
|
-
|
|
1155
|
+
getDividerEndPoints(): Point[] | null;
|
|
3790
1156
|
/**
|
|
3791
1157
|
* 获取当前视口中心点坐标
|
|
3792
1158
|
*
|
|
@@ -3871,6 +1237,35 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3871
1237
|
offsetX?: number;
|
|
3872
1238
|
offsetY?: number;
|
|
3873
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[];
|
|
3874
1269
|
/**
|
|
3875
1270
|
* 基于视口中心生成定点清扫的点坐标
|
|
3876
1271
|
*
|
|
@@ -3885,14 +1280,6 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3885
1280
|
offsetX?: number;
|
|
3886
1281
|
offsetY?: number;
|
|
3887
1282
|
}): Point;
|
|
3888
|
-
/**
|
|
3889
|
-
* 基于视口中心生成家具顶点坐标
|
|
3890
|
-
*/
|
|
3891
|
-
getFurniturePointsByViewportCenter(options?: {
|
|
3892
|
-
furnitureType?: number;
|
|
3893
|
-
offsetX?: number;
|
|
3894
|
-
offsetY?: number;
|
|
3895
|
-
}): Point[];
|
|
3896
1283
|
/**
|
|
3897
1284
|
* 判断指定的房间是否相邻(连通)
|
|
3898
1285
|
*
|
|
@@ -3902,9 +1289,22 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3902
1289
|
*
|
|
3903
1290
|
* @param roomIds - 要检测的房间ID数组
|
|
3904
1291
|
* @returns 是否所有指定的房间都相邻(连通)
|
|
3905
|
-
*
|
|
3906
1292
|
*/
|
|
3907
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;
|
|
3908
1308
|
/**
|
|
3909
1309
|
* 判断一个点是否在任意房间内
|
|
3910
1310
|
*
|
|
@@ -3914,7 +1314,6 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3914
1314
|
*
|
|
3915
1315
|
* @param point - 待检测的点坐标(机器坐标系,与Zone、VirtualWall等使用相同的坐标系)
|
|
3916
1316
|
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
3917
|
-
*
|
|
3918
1317
|
*/
|
|
3919
1318
|
isPointInAnyRoom(point: Point): RoomData | null;
|
|
3920
1319
|
/**
|
|
@@ -3926,9 +1325,8 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3926
1325
|
*
|
|
3927
1326
|
* @param points - 墙体的两个端点坐标(机器坐标系,与VirtualWall等使用相同的坐标系)
|
|
3928
1327
|
* @returns 如果有交集返回 true,否则返回 false
|
|
3929
|
-
*
|
|
3930
1328
|
*/
|
|
3931
|
-
isWallIntersectsAnyRoom(points: Point
|
|
1329
|
+
isWallIntersectsAnyRoom(points: [Point, Point]): boolean;
|
|
3932
1330
|
/**
|
|
3933
1331
|
* 判断区域(矩形)是否与任意房间有交集
|
|
3934
1332
|
*
|
|
@@ -3938,61 +1336,43 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
3938
1336
|
*
|
|
3939
1337
|
* @param points - 区域的四个顶点坐标(机器坐标系,与Zone等使用相同的坐标系)
|
|
3940
1338
|
* @returns 如果有交集返回 true,否则返回 false
|
|
3941
|
-
*
|
|
3942
|
-
*/
|
|
3943
|
-
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
3944
|
-
/**
|
|
3945
|
-
* 判断点、墙体或区域是否距离充电桩或机器人位置过近
|
|
3946
|
-
*
|
|
3947
|
-
* 根据给定的坐标集合(点1个、墙体2个点或区域4个点)和判定阈值,
|
|
3948
|
-
* 计算其与充电桩和/或机器人位置的最小距离,判断是否在阈值范围内。
|
|
3949
|
-
*
|
|
3950
|
-
* @param points - 点(1个)、墙体(2个点)或区域(4个点)的坐标集合(机器坐标系)
|
|
3951
|
-
* @param thresholdMeters - 判定阈值,单位为米
|
|
3952
|
-
* @param options - 配置选项
|
|
3953
|
-
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
3954
|
-
* @param options.checkRobot - 是否检查与机器人的距离,默认为 false
|
|
3955
|
-
* @returns 是否在判定范围内(true 表示过近,false 表示距离足够)
|
|
3956
|
-
*
|
|
3957
1339
|
*/
|
|
3958
|
-
|
|
3959
|
-
checkCharger?: boolean;
|
|
3960
|
-
checkRobot?: boolean;
|
|
3961
|
-
}): boolean;
|
|
1340
|
+
isZoneIntersectsAnyRoom(points: [Point, Point, Point, Point]): boolean;
|
|
3962
1341
|
/**
|
|
3963
1342
|
* 地图截图
|
|
3964
1343
|
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
1344
|
+
* 将当前地图状态导出为图片。截图过程中会自动添加一个临时的背景层,
|
|
1345
|
+
* 确保禁区等半透明元素在截图中能够正确显示颜色。
|
|
3967
1346
|
*
|
|
3968
1347
|
* @param options - 截图配置选项
|
|
3969
1348
|
* @param options.backgroundColor - 指定截图时的背景颜色。若不指定,将默认使用 `global.config.backgroundColor`。支持颜色字符串、十六进制数值或 RGB 数组。
|
|
3970
1349
|
* @returns Promise<string> Base64 格式的图片数据 (Data URL)
|
|
3971
|
-
*
|
|
3972
1350
|
*/
|
|
3973
1351
|
snapshot(options?: {
|
|
3974
1352
|
backgroundColor?: ColorSource;
|
|
3975
1353
|
}): Promise<string>;
|
|
3976
1354
|
/**
|
|
3977
|
-
*
|
|
3978
|
-
*
|
|
3979
|
-
* 基于提供的地图数据生成截图,主要用于多地图场景或预览功能。
|
|
3980
|
-
* 不会影响当前地图的显示状态。
|
|
3981
|
-
*
|
|
3982
|
-
* @param data - 地图数据对象
|
|
3983
|
-
* @param data.map - 地图字符串数据
|
|
3984
|
-
* @param data.path - 可选的路径数据
|
|
3985
|
-
* @param data.roomProperties - 可选的房间属性数据
|
|
3986
|
-
* @param data.customElements - 可选的自定义元素数据
|
|
3987
|
-
* @param data.forbiddenSweepZones - 可选的禁扫区域数据
|
|
3988
|
-
* @param data.forbiddenMopZones - 可选的禁拖区域数据
|
|
3989
|
-
* @param data.virtualWalls - 可选的虚拟墙数据
|
|
3990
|
-
* @param data.detectedObjects - 可选的检测物体数据
|
|
3991
|
-
* @param runtime - 可选的运行时配置
|
|
3992
|
-
* @returns Promise<string> Base64 格式的图片数据
|
|
1355
|
+
* 使用自定义地图数据生成截图
|
|
3993
1356
|
*
|
|
1357
|
+
* 基于提供的地图、路径、区域等数据生成截图,通常用于多地图管理界面的缩略图预览。
|
|
1358
|
+
* 此方法会创建一个临时的离屏渲染实例,不会影响当前正在运行的地图显示状态。
|
|
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)
|
|
3994
1374
|
*/
|
|
3995
|
-
snapshotByData(
|
|
1375
|
+
snapshotByData(data: {
|
|
3996
1376
|
map: string;
|
|
3997
1377
|
path?: string;
|
|
3998
1378
|
roomProperties?: RoomProperty[];
|
|
@@ -4005,40 +1385,24 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
4005
1385
|
}, runtime?: DeepPartialRuntimeConfig, options?: {
|
|
4006
1386
|
backgroundColor?: ColorSource;
|
|
4007
1387
|
}): Promise<string>;
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
private initializeInteraction;
|
|
4027
|
-
/**
|
|
4028
|
-
* 智能 Ticker 管理 - 延迟停止渲染
|
|
4029
|
-
*/
|
|
4030
|
-
private scheduleStopRender;
|
|
4031
|
-
/**
|
|
4032
|
-
* 通用的Zone点生成逻辑
|
|
4033
|
-
*/
|
|
4034
|
-
private generateZonePoints;
|
|
4035
|
-
/**
|
|
4036
|
-
* 预加载应用所需的资源
|
|
4037
|
-
*/
|
|
4038
|
-
private preloadAssets;
|
|
4039
|
-
/* Excluded from this release type: setupMapRotationListener */
|
|
4040
|
-
/* Excluded from this release type: applyMapRotation */
|
|
4041
|
-
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
|
|
4042
1406
|
}
|
|
4043
1407
|
|
|
4044
1408
|
/**
|
|
@@ -4420,143 +1784,6 @@ export declare type MapDataSource = {
|
|
|
4420
1784
|
version: string
|
|
4421
1785
|
}
|
|
4422
1786
|
|
|
4423
|
-
declare class MapManager_2 {
|
|
4424
|
-
private appService;
|
|
4425
|
-
obstacle: Obstacle;
|
|
4426
|
-
free: Free;
|
|
4427
|
-
roomFill: RoomFill;
|
|
4428
|
-
carpet: Carpet;
|
|
4429
|
-
chargingStation: ChargingStation;
|
|
4430
|
-
mapBounds: Bounds;
|
|
4431
|
-
private lastMapId;
|
|
4432
|
-
private lastOrigin;
|
|
4433
|
-
private lastSize;
|
|
4434
|
-
private lastStatus;
|
|
4435
|
-
private roomGeometryMap;
|
|
4436
|
-
private rasterRoomPixelsMap;
|
|
4437
|
-
private fourColorCache;
|
|
4438
|
-
private carpetData;
|
|
4439
|
-
private unsubscribeFns;
|
|
4440
|
-
constructor(appService: AppService);
|
|
4441
|
-
/**
|
|
4442
|
-
* 处理结构化地图数据(房间形状、障碍物等)
|
|
4443
|
-
*/
|
|
4444
|
-
drawMap(mapData: StructuredMapDataSource): Promise<boolean>;
|
|
4445
|
-
/**
|
|
4446
|
-
* 处理栅格地图数据
|
|
4447
|
-
* @param mapPointsStr 栅格数据字符串
|
|
4448
|
-
* @param width 地图宽度
|
|
4449
|
-
* @param height 地图高度
|
|
4450
|
-
* @param charger 充电桩信息
|
|
4451
|
-
*/
|
|
4452
|
-
drawRasterMap(rasterData: ParsedRasterMapData_2, mapState: MapState): Promise<boolean>;
|
|
4453
|
-
/**
|
|
4454
|
-
* 重置几何数据和边界
|
|
4455
|
-
*/
|
|
4456
|
-
private resetGeometryData;
|
|
4457
|
-
/**
|
|
4458
|
-
* 判断是否需要触发fitMapToView
|
|
4459
|
-
* @param currentMapId 当前地图ID
|
|
4460
|
-
* @param currentStatus 当前地图状态
|
|
4461
|
-
* @param currentOrigin 当前地图原点
|
|
4462
|
-
* @returns 是否需要触发fitMapToView
|
|
4463
|
-
*/
|
|
4464
|
-
private shouldFitMapToView;
|
|
4465
|
-
/**
|
|
4466
|
-
* 将栅格数据转换为结构化数据格式
|
|
4467
|
-
* @param carpetPixels 地毯像素数据
|
|
4468
|
-
* @param mapWidth 地图宽度
|
|
4469
|
-
* @returns 结构化地毯数据数组
|
|
4470
|
-
*/
|
|
4471
|
-
private convertRasterToStructuredData;
|
|
4472
|
-
/**
|
|
4473
|
-
* 更新地毯显示
|
|
4474
|
-
* 类似于RoomFloorType的模式,根据当前状态决定是否重建地毯
|
|
4475
|
-
*/
|
|
4476
|
-
private createCarpet;
|
|
4477
|
-
/**
|
|
4478
|
-
* 处理房间几何数据,计算所有需要的几何信息
|
|
4479
|
-
* 返回所有房间的几何数据(包括正常房间和未知房间)
|
|
4480
|
-
*/
|
|
4481
|
-
private processRoomsGeometry;
|
|
4482
|
-
/**
|
|
4483
|
-
* 合并所有图层的边界
|
|
4484
|
-
*/
|
|
4485
|
-
private mergeLayerBounds;
|
|
4486
|
-
/**
|
|
4487
|
-
* 根据ID查找房间几何信息
|
|
4488
|
-
*/
|
|
4489
|
-
getRoomById(id: number): Room | undefined;
|
|
4490
|
-
/**
|
|
4491
|
-
* 获取所有房间的几何信息
|
|
4492
|
-
*/
|
|
4493
|
-
getAllRooms(): Room[];
|
|
4494
|
-
/**
|
|
4495
|
-
* 判断墙体(线段)是否与任意房间有交集
|
|
4496
|
-
* @param points 墙体的两个端点坐标(机器坐标系)
|
|
4497
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
4498
|
-
*/
|
|
4499
|
-
isWallIntersectsAnyRoom(points: Point[]): boolean;
|
|
4500
|
-
/**
|
|
4501
|
-
* 判断区域(矩形)是否与任意房间有交集
|
|
4502
|
-
* @param points 区域的四个顶点坐标(机器坐标系)
|
|
4503
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
4504
|
-
*/
|
|
4505
|
-
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
4506
|
-
/**
|
|
4507
|
-
* 判断指定的房间是否相邻(连通)
|
|
4508
|
-
* @param roomIds 要检测的房间ID数组
|
|
4509
|
-
* @returns 是否所有指定的房间都相邻(连通)
|
|
4510
|
-
*/
|
|
4511
|
-
areRoomsAdjacent(roomIds: number[]): boolean;
|
|
4512
|
-
/* Excluded from this release type: areStructuredRoomsAdjacentInternal */
|
|
4513
|
-
/* Excluded from this release type: areRasterRoomsAdjacentInternal */
|
|
4514
|
-
/**
|
|
4515
|
-
* 判断一个点是否在任意房间内
|
|
4516
|
-
* @param point 待检测的点坐标(机器坐标系)
|
|
4517
|
-
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
4518
|
-
*/
|
|
4519
|
-
isPointInAnyRoom(point: Point): RoomData | null;
|
|
4520
|
-
/* Excluded from this release type: isPointInAnyRoomStructuredInternal */
|
|
4521
|
-
/* Excluded from this release type: isPointInAnyRoomRasterInternal */
|
|
4522
|
-
/**
|
|
4523
|
-
* 清空地图组件
|
|
4524
|
-
*/
|
|
4525
|
-
private clearComponents;
|
|
4526
|
-
/**
|
|
4527
|
-
* 处理栅格数据,统一处理排序和颜色分配
|
|
4528
|
-
* @param rasterData 原始栅格数据
|
|
4529
|
-
* @returns 处理后的栅格数据,包含排序和颜色信息
|
|
4530
|
-
*/
|
|
4531
|
-
private processRasterData;
|
|
4532
|
-
/**
|
|
4533
|
-
* 为栅格地图生成房间几何信息供 RoomManager 使用
|
|
4534
|
-
* @param rasterData 解析后的栅格数据
|
|
4535
|
-
*/
|
|
4536
|
-
private generateRoomGeometryFromRaster;
|
|
4537
|
-
/**
|
|
4538
|
-
* 获取点阵房间的像素数据
|
|
4539
|
-
* @param roomId 房间ID
|
|
4540
|
-
* @returns 像素索引数组,如果不存在则返回 undefined
|
|
4541
|
-
*/
|
|
4542
|
-
getRasterRoomPixels(roomId: number): Uint32Array | undefined;
|
|
4543
|
-
/**
|
|
4544
|
-
* 验证颜色配置
|
|
4545
|
-
* @private
|
|
4546
|
-
*/
|
|
4547
|
-
private validateColorConfig;
|
|
4548
|
-
/**
|
|
4549
|
-
* 使用四色算法分配房间颜色
|
|
4550
|
-
* @param roomData 房间数据数组
|
|
4551
|
-
* @param colorCount 可用颜色数量
|
|
4552
|
-
* @param mapType 地图类型
|
|
4553
|
-
* @returns 房间ID到颜色索引的映射
|
|
4554
|
-
* @private
|
|
4555
|
-
*/
|
|
4556
|
-
private assignColorsUsingFourColorAlgorithm;
|
|
4557
|
-
destroy(): void;
|
|
4558
|
-
}
|
|
4559
|
-
|
|
4560
1787
|
/**
|
|
4561
1788
|
* 地图状态对象
|
|
4562
1789
|
*
|
|
@@ -4578,106 +1805,26 @@ export declare type MapState = {
|
|
|
4578
1805
|
/** 充电桩坐标 */
|
|
4579
1806
|
charger: Point
|
|
4580
1807
|
/** 充电桩方向 */
|
|
4581
|
-
chargerDirection: number
|
|
4582
|
-
/**
|
|
4583
|
-
* 地图协议版本号
|
|
4584
|
-
*/
|
|
4585
|
-
version?: number
|
|
4586
|
-
/**
|
|
4587
|
-
* 地图类型
|
|
4588
|
-
* - 'structured': 结构化地图(基于轮廓点)
|
|
4589
|
-
* - 'raster': 点阵地图(基于像素)
|
|
4590
|
-
*/
|
|
4591
|
-
mapType?: MapType
|
|
4592
|
-
}
|
|
4593
|
-
|
|
4594
|
-
/**
|
|
4595
|
-
* 地图类型
|
|
4596
|
-
*/
|
|
4597
|
-
export declare type MapType = 'structured' | 'raster'
|
|
4598
|
-
|
|
4599
|
-
/** 测量单位 */
|
|
4600
|
-
export declare type MeasurementUnit = 'meter' | 'feet' | 'centimeter'
|
|
4601
|
-
|
|
4602
|
-
declare class MoveControlButton extends BaseControlButton<MoveControlButtonOptions> {
|
|
4603
|
-
protected appService: AppService;
|
|
4604
|
-
private isMoving;
|
|
4605
|
-
private dragStartPosition;
|
|
4606
|
-
constructor(appService: AppService, options: MoveControlButtonOptions);
|
|
4607
|
-
/**
|
|
4608
|
-
* 设置移动事件监听
|
|
4609
|
-
*/
|
|
4610
|
-
private setupMoveEventListeners;
|
|
4611
|
-
/**
|
|
4612
|
-
* 清理移动事件监听
|
|
4613
|
-
*/
|
|
4614
|
-
private cleanupMoveEventListeners;
|
|
4615
|
-
/**
|
|
4616
|
-
* 设置手势事件监听
|
|
4617
|
-
*/
|
|
4618
|
-
protected setupEvents(): void;
|
|
4619
|
-
/**
|
|
4620
|
-
* 处理指针按下事件(开始移动)
|
|
4621
|
-
*/
|
|
4622
|
-
private handlePointerDown;
|
|
4623
|
-
/**
|
|
4624
|
-
* 开始移动
|
|
4625
|
-
*/
|
|
4626
|
-
private startMoving;
|
|
4627
|
-
/**
|
|
4628
|
-
* 处理移动过程中的指针移动
|
|
4629
|
-
*/
|
|
4630
|
-
private handleMovePointerMove;
|
|
4631
|
-
/**
|
|
4632
|
-
* 处理移动结束
|
|
4633
|
-
*/
|
|
4634
|
-
private handleMovePointerUp;
|
|
4635
|
-
/**
|
|
4636
|
-
* 处理移动取消(多点触控干扰)
|
|
4637
|
-
*/
|
|
4638
|
-
private handleMoveCancel;
|
|
4639
|
-
/**
|
|
4640
|
-
* 获取是否正在移动
|
|
4641
|
-
*/
|
|
4642
|
-
isCurrentlyMoving(): boolean;
|
|
4643
|
-
/**
|
|
4644
|
-
* 获取拖拽开始位置
|
|
4645
|
-
*/
|
|
4646
|
-
getDragStartPosition(): Point | null;
|
|
1808
|
+
chargerDirection: number
|
|
4647
1809
|
/**
|
|
4648
|
-
*
|
|
1810
|
+
* 地图协议版本号
|
|
4649
1811
|
*/
|
|
4650
|
-
|
|
1812
|
+
version?: number
|
|
4651
1813
|
/**
|
|
4652
|
-
*
|
|
1814
|
+
* 地图类型
|
|
1815
|
+
* - 'structured': 结构化地图(基于轮廓点)
|
|
1816
|
+
* - 'raster': 点阵地图(基于像素)
|
|
4653
1817
|
*/
|
|
4654
|
-
|
|
1818
|
+
mapType?: MapType
|
|
4655
1819
|
}
|
|
4656
1820
|
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
};
|
|
1821
|
+
/**
|
|
1822
|
+
* 地图类型
|
|
1823
|
+
*/
|
|
1824
|
+
export declare type MapType = 'structured' | 'raster'
|
|
4662
1825
|
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
constructor(appService: AppService);
|
|
4666
|
-
/**
|
|
4667
|
-
* 绘制结构化障碍物数据
|
|
4668
|
-
* @param obstacles 障碍物数据数组
|
|
4669
|
-
*/
|
|
4670
|
-
draw(obstacles: {
|
|
4671
|
-
coordinates: number[];
|
|
4672
|
-
}[]): void;
|
|
4673
|
-
/**
|
|
4674
|
-
* 绘制栅格障碍物数据
|
|
4675
|
-
* @param obstacleIndices 障碍物像素点索引数组
|
|
4676
|
-
* @param width 地图宽度
|
|
4677
|
-
*/
|
|
4678
|
-
drawRaster(obstacleIndices: Uint32Array, width: number): void;
|
|
4679
|
-
destroy(options?: DestroyOptions | boolean): void;
|
|
4680
|
-
}
|
|
1826
|
+
/** 测量单位 */
|
|
1827
|
+
export declare type MeasurementUnit = 'meter' | 'feet' | 'centimeter'
|
|
4681
1828
|
|
|
4682
1829
|
/**
|
|
4683
1830
|
* 对点位进行偏移,避免与已存在的点位重叠
|
|
@@ -4688,14 +1835,6 @@ declare class Obstacle extends Graphics {
|
|
|
4688
1835
|
*/
|
|
4689
1836
|
export declare const offsetPointsToAvoidOverlap: (points: Point[], existingPointsArray: Point[][], maxAttempts?: number) => Point[];
|
|
4690
1837
|
|
|
4691
|
-
declare type OperationState = {
|
|
4692
|
-
isDragging: boolean;
|
|
4693
|
-
isScaling: boolean;
|
|
4694
|
-
isRotating: boolean;
|
|
4695
|
-
isMoving: boolean;
|
|
4696
|
-
hasAnyOperation: boolean;
|
|
4697
|
-
};
|
|
4698
|
-
|
|
4699
1838
|
/**
|
|
4700
1839
|
* 解析后的点阵地图数据
|
|
4701
1840
|
*/
|
|
@@ -4714,135 +1853,6 @@ export declare type ParsedRasterMapData = {
|
|
|
4714
1853
|
totalPixels: number
|
|
4715
1854
|
}
|
|
4716
1855
|
|
|
4717
|
-
declare class Path extends Container {
|
|
4718
|
-
private appService;
|
|
4719
|
-
private commonPath;
|
|
4720
|
-
private chargePath;
|
|
4721
|
-
private transitionsPath;
|
|
4722
|
-
private mopPath;
|
|
4723
|
-
private mopPathTrack;
|
|
4724
|
-
private mopPathTrackContainer;
|
|
4725
|
-
private debugPoints;
|
|
4726
|
-
private pathData;
|
|
4727
|
-
private lastPointCount;
|
|
4728
|
-
private lastDrawnPosition;
|
|
4729
|
-
private isRealTimeDrawing;
|
|
4730
|
-
private throttledUpdateLineWidth;
|
|
4731
|
-
private throttledHandleRobotPosition;
|
|
4732
|
-
private unsubscribeFns;
|
|
4733
|
-
constructor(appService: AppService);
|
|
4734
|
-
/**
|
|
4735
|
-
* 注册事件监听
|
|
4736
|
-
*/
|
|
4737
|
-
private registerEventListeners;
|
|
4738
|
-
/**
|
|
4739
|
-
* 处理机器人动画完成事件
|
|
4740
|
-
*/
|
|
4741
|
-
private handleRobotAnimationComplete;
|
|
4742
|
-
/**
|
|
4743
|
-
* 实际处理机器人位置更新的方法
|
|
4744
|
-
*/
|
|
4745
|
-
private handleRobotPositionUpdate;
|
|
4746
|
-
/**
|
|
4747
|
-
* 更新线宽以响应缩放变化
|
|
4748
|
-
*/
|
|
4749
|
-
private updateLineWidth;
|
|
4750
|
-
/**
|
|
4751
|
-
* 重新绘制路径,应用适当的线宽
|
|
4752
|
-
* @param pathData 路径数据
|
|
4753
|
-
*/
|
|
4754
|
-
private redrawPaths;
|
|
4755
|
-
/**
|
|
4756
|
-
* 设置各类路径的样式
|
|
4757
|
-
*/
|
|
4758
|
-
private setupPathStyles;
|
|
4759
|
-
/**
|
|
4760
|
-
* 绘制路径线段
|
|
4761
|
-
* @param pathPoints 路径点数组
|
|
4762
|
-
*/
|
|
4763
|
-
private drawPathSegments;
|
|
4764
|
-
/**
|
|
4765
|
-
* 调试模式下绘制路径点方块
|
|
4766
|
-
* @param pathPoints 路径点数组
|
|
4767
|
-
*/
|
|
4768
|
-
private drawDebugPoints;
|
|
4769
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
4770
|
-
/**
|
|
4771
|
-
* 全量绘制路径
|
|
4772
|
-
* @param pathData 路径数据
|
|
4773
|
-
*/
|
|
4774
|
-
drawFull(pathData: PathData): void;
|
|
4775
|
-
/**
|
|
4776
|
-
* 增量绘制路径(启用实时绘制模式)
|
|
4777
|
-
* @param pathData 路径数据
|
|
4778
|
-
*/
|
|
4779
|
-
drawIncremental(pathData: PathData): void;
|
|
4780
|
-
/**
|
|
4781
|
-
* 直接绘制新增的路径段(用于速度为0的情况)
|
|
4782
|
-
* @param newPoints 新增的路径点
|
|
4783
|
-
* @param lastCount 上次绘制的点数
|
|
4784
|
-
* @param allPoints 所有路径点(新数据)
|
|
4785
|
-
* @param oldPoints 旧的路径点数据(用于获取连接点)
|
|
4786
|
-
*/
|
|
4787
|
-
private drawNewPathSegments;
|
|
4788
|
-
/**
|
|
4789
|
-
* 停止实时绘制模式
|
|
4790
|
-
*/
|
|
4791
|
-
stopRealTimeDrawing(): void;
|
|
4792
|
-
/**
|
|
4793
|
-
* 清除所有路径数据
|
|
4794
|
-
*/
|
|
4795
|
-
clear(): void;
|
|
4796
|
-
destroy(options?: {
|
|
4797
|
-
children?: boolean;
|
|
4798
|
-
texture?: boolean;
|
|
4799
|
-
baseTexture?: boolean;
|
|
4800
|
-
}): void;
|
|
4801
|
-
}
|
|
4802
|
-
|
|
4803
|
-
declare class PathManager_2 {
|
|
4804
|
-
private appService;
|
|
4805
|
-
path: Path;
|
|
4806
|
-
robot: Robot;
|
|
4807
|
-
private unsubscribeFns;
|
|
4808
|
-
private lastDrawnPathData;
|
|
4809
|
-
constructor(appService: AppService);
|
|
4810
|
-
/**
|
|
4811
|
-
* 绘制路径和机器人
|
|
4812
|
-
*/
|
|
4813
|
-
draw(pathData: PathData): void;
|
|
4814
|
-
/**
|
|
4815
|
-
* 判断是否应该使用增量绘制
|
|
4816
|
-
*/
|
|
4817
|
-
private shouldUseIncrementalDraw;
|
|
4818
|
-
/**
|
|
4819
|
-
* 全量绘制模式:完整绘制路径和机器人(初始绘制和不满足增量条件时使用)
|
|
4820
|
-
*/
|
|
4821
|
-
private fullDraw;
|
|
4822
|
-
/**
|
|
4823
|
-
* 转换PathPoint为RobotPoint
|
|
4824
|
-
*/
|
|
4825
|
-
private convertToRobotPoint;
|
|
4826
|
-
/**
|
|
4827
|
-
* 处理机器人移动到指定点
|
|
4828
|
-
*/
|
|
4829
|
-
private moveRobotToPoint;
|
|
4830
|
-
/**
|
|
4831
|
-
* 增量绘制模式:只绘制新增部分,机器人平滑动画到新位置
|
|
4832
|
-
*/
|
|
4833
|
-
private incrementalDraw;
|
|
4834
|
-
/**
|
|
4835
|
-
* 批量处理机器人动画队列(用于快速跳转)
|
|
4836
|
-
*/
|
|
4837
|
-
batchProcessRobotQueue(jumpToLatest?: boolean): void;
|
|
4838
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
4839
|
-
/**
|
|
4840
|
-
* 清除路径和机器人数据
|
|
4841
|
-
*/
|
|
4842
|
-
clear(): void;
|
|
4843
|
-
destroy(): void;
|
|
4844
|
-
}
|
|
4845
|
-
|
|
4846
1856
|
/**
|
|
4847
1857
|
* 路径状态对象
|
|
4848
1858
|
* 描述机器人路径的状态信息
|
|
@@ -4890,55 +1900,6 @@ export declare type ProcessedRasterData = {
|
|
|
4890
1900
|
totalPixels: number
|
|
4891
1901
|
}
|
|
4892
1902
|
|
|
4893
|
-
declare class PulseCircle extends Graphics {
|
|
4894
|
-
private appService;
|
|
4895
|
-
private currentPosition;
|
|
4896
|
-
private animationStartTime;
|
|
4897
|
-
private isAnimating;
|
|
4898
|
-
constructor(appService: AppService);
|
|
4899
|
-
/**
|
|
4900
|
-
* 设置反向缩放监听,保持描边宽度固定
|
|
4901
|
-
*/
|
|
4902
|
-
private setupAntiScaleListener;
|
|
4903
|
-
/**
|
|
4904
|
-
* 反向缩放事件处理
|
|
4905
|
-
*/
|
|
4906
|
-
private handleScaleChange;
|
|
4907
|
-
/**
|
|
4908
|
-
* 绘制脉冲圆圈
|
|
4909
|
-
* @param position 圆圈中心位置
|
|
4910
|
-
*/
|
|
4911
|
-
draw(position: Point): void;
|
|
4912
|
-
/**
|
|
4913
|
-
* 启动呼吸动画
|
|
4914
|
-
*/
|
|
4915
|
-
private startAnimation;
|
|
4916
|
-
/**
|
|
4917
|
-
* 停止呼吸动画
|
|
4918
|
-
*/
|
|
4919
|
-
private stopAnimation;
|
|
4920
|
-
/**
|
|
4921
|
-
* 动画更新函数
|
|
4922
|
-
*/
|
|
4923
|
-
private updateAnimation;
|
|
4924
|
-
/**
|
|
4925
|
-
* 重新绘制(当配置变化或缩放变化时调用)
|
|
4926
|
-
*/
|
|
4927
|
-
redraw(): void;
|
|
4928
|
-
/**
|
|
4929
|
-
* 清除脉冲圆圈
|
|
4930
|
-
*/
|
|
4931
|
-
clearCircle(): void;
|
|
4932
|
-
/**
|
|
4933
|
-
* 完全停止并清除
|
|
4934
|
-
*/
|
|
4935
|
-
remove(): void;
|
|
4936
|
-
/**
|
|
4937
|
-
* 销毁组件
|
|
4938
|
-
*/
|
|
4939
|
-
destroy(): void;
|
|
4940
|
-
}
|
|
4941
|
-
|
|
4942
1903
|
/**
|
|
4943
1904
|
* 点阵房间数据
|
|
4944
1905
|
*/
|
|
@@ -4955,38 +1916,6 @@ export declare type RasterRoomData = {
|
|
|
4955
1916
|
colorIndex?: number
|
|
4956
1917
|
}
|
|
4957
1918
|
|
|
4958
|
-
declare class Ring extends Graphics {
|
|
4959
|
-
private appService;
|
|
4960
|
-
private currentPosition;
|
|
4961
|
-
private config;
|
|
4962
|
-
constructor(appService: AppService, options: RingOptions);
|
|
4963
|
-
/**
|
|
4964
|
-
* 设置反向缩放监听,保持描边宽度固定
|
|
4965
|
-
*/
|
|
4966
|
-
private setupAntiScaleListener;
|
|
4967
|
-
/**
|
|
4968
|
-
* 反向缩放事件处理
|
|
4969
|
-
*/
|
|
4970
|
-
private handleScaleChange;
|
|
4971
|
-
/**
|
|
4972
|
-
* 绘制预警圈
|
|
4973
|
-
* @param position 充电桩位置信息
|
|
4974
|
-
*/
|
|
4975
|
-
draw(position: Point): void;
|
|
4976
|
-
/**
|
|
4977
|
-
* 绘制虚线圆形
|
|
4978
|
-
*/
|
|
4979
|
-
private drawDashedCircle;
|
|
4980
|
-
/**
|
|
4981
|
-
* 重新绘制(当配置变化时调用)
|
|
4982
|
-
*/
|
|
4983
|
-
redraw(): void;
|
|
4984
|
-
/**
|
|
4985
|
-
* 销毁组件
|
|
4986
|
-
*/
|
|
4987
|
-
destroy(): void;
|
|
4988
|
-
}
|
|
4989
|
-
|
|
4990
1919
|
/** 预警圈配置 */
|
|
4991
1920
|
export declare type RingConfig = {
|
|
4992
1921
|
/** 大小(米) */
|
|
@@ -5003,103 +1932,6 @@ export declare type RingConfig = {
|
|
|
5003
1932
|
strokeDashArray: [number, number]
|
|
5004
1933
|
}
|
|
5005
1934
|
|
|
5006
|
-
declare type RingOptions = {
|
|
5007
|
-
config: RingConfig;
|
|
5008
|
-
};
|
|
5009
|
-
|
|
5010
|
-
declare class Robot extends Container {
|
|
5011
|
-
private appService;
|
|
5012
|
-
robot: RobotIcon;
|
|
5013
|
-
ring: Ring;
|
|
5014
|
-
pulseCircle: PulseCircle;
|
|
5015
|
-
sleepAnimation: SleepAnimation | null;
|
|
5016
|
-
private unsubscribeFns;
|
|
5017
|
-
private clickHandler?;
|
|
5018
|
-
private targetPosition;
|
|
5019
|
-
private targetRotation;
|
|
5020
|
-
private isMoving;
|
|
5021
|
-
private pathQueue;
|
|
5022
|
-
private lastPosition;
|
|
5023
|
-
private currentPathType;
|
|
5024
|
-
private lastUpdateTime;
|
|
5025
|
-
private isCleared;
|
|
5026
|
-
constructor(appService: AppService);
|
|
5027
|
-
/**
|
|
5028
|
-
* 异步初始化睡眠动画
|
|
5029
|
-
*/
|
|
5030
|
-
private initializeSleepAnimation;
|
|
5031
|
-
updatePositionByOrigin(x: number, y: number): void;
|
|
5032
|
-
/**
|
|
5033
|
-
* 立即绘制到指定位置(无动画)
|
|
5034
|
-
*/
|
|
5035
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
5036
|
-
/**
|
|
5037
|
-
* 初始化点击处理器状态
|
|
5038
|
-
* 根据配置启用机器人点击交互
|
|
5039
|
-
*/
|
|
5040
|
-
private initClickInteraction;
|
|
5041
|
-
/**
|
|
5042
|
-
* 获取机器人当前位置(相对坐标系)
|
|
5043
|
-
* @returns 机器人当前位置,如果尚未绘制则返回 null
|
|
5044
|
-
*/
|
|
5045
|
-
getCurrentPosition(): {
|
|
5046
|
-
x: number;
|
|
5047
|
-
y: number;
|
|
5048
|
-
} | null;
|
|
5049
|
-
/**
|
|
5050
|
-
* 添加移动目标到队列(带动画)
|
|
5051
|
-
*/
|
|
5052
|
-
moveTo(point: RobotPoint): void;
|
|
5053
|
-
/**
|
|
5054
|
-
* 批量处理队列(快速跳转)
|
|
5055
|
-
*/
|
|
5056
|
-
batchProcessQueue(jumpToLatest?: boolean): void;
|
|
5057
|
-
/**
|
|
5058
|
-
* 处理队列中的下一个路径点
|
|
5059
|
-
*/
|
|
5060
|
-
private processNextPathPoint;
|
|
5061
|
-
/**
|
|
5062
|
-
* 动画更新循环
|
|
5063
|
-
*/
|
|
5064
|
-
private update;
|
|
5065
|
-
/**
|
|
5066
|
-
* 启动机器人动画渲染(只控制 Ticker start/stop,不 add/remove)
|
|
5067
|
-
*/
|
|
5068
|
-
private startRobotAnimation;
|
|
5069
|
-
/**
|
|
5070
|
-
* 重写 visible setter,确保睡眠动画能响应机器人可见性变化
|
|
5071
|
-
*/
|
|
5072
|
-
set visible(value: boolean);
|
|
5073
|
-
/**
|
|
5074
|
-
* 重写 visible getter
|
|
5075
|
-
*/
|
|
5076
|
-
get visible(): boolean;
|
|
5077
|
-
/**
|
|
5078
|
-
* 停止机器人动画渲染(只控制 Ticker start/stop,不 add/remove)
|
|
5079
|
-
*/
|
|
5080
|
-
private stopRobotAnimation;
|
|
5081
|
-
/**
|
|
5082
|
-
* 清除机器人动画状态
|
|
5083
|
-
*/
|
|
5084
|
-
remove(): void;
|
|
5085
|
-
/**
|
|
5086
|
-
* 清除机器人显示(隐藏所有子组件)
|
|
5087
|
-
*/
|
|
5088
|
-
clear(): void;
|
|
5089
|
-
destroy(options?: {
|
|
5090
|
-
children?: boolean;
|
|
5091
|
-
texture?: boolean;
|
|
5092
|
-
baseTexture?: boolean;
|
|
5093
|
-
}): void;
|
|
5094
|
-
}
|
|
5095
|
-
|
|
5096
|
-
declare class RobotIcon extends EnhancedSprite {
|
|
5097
|
-
protected appService: AppService;
|
|
5098
|
-
constructor(appService: AppService);
|
|
5099
|
-
initializeSprite(): Promise<void>;
|
|
5100
|
-
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
5101
|
-
}
|
|
5102
|
-
|
|
5103
1935
|
/** 机器人点 */
|
|
5104
1936
|
export declare type RobotPoint = IconPoint & {
|
|
5105
1937
|
/** 点类型 */
|
|
@@ -5142,196 +1974,6 @@ export declare type RoomData = RoomProperty & {
|
|
|
5142
1974
|
colorIndex?: number
|
|
5143
1975
|
}
|
|
5144
1976
|
|
|
5145
|
-
declare class RoomFill extends Container {
|
|
5146
|
-
private appService;
|
|
5147
|
-
private roomGraphicsMap;
|
|
5148
|
-
private roomContextMap;
|
|
5149
|
-
private roomClickHandlerMap;
|
|
5150
|
-
private unsubscribeFns;
|
|
5151
|
-
private mapWidth;
|
|
5152
|
-
private rasterRoomDataMap;
|
|
5153
|
-
private structuredRoomGeometry;
|
|
5154
|
-
constructor(appService: AppService);
|
|
5155
|
-
/**
|
|
5156
|
-
* 绘制结构化协议地图房间
|
|
5157
|
-
* @param rooms 房间数据
|
|
5158
|
-
*/
|
|
5159
|
-
draw(rooms: Room[]): void;
|
|
5160
|
-
/**
|
|
5161
|
-
* 绘制栅格房间数据
|
|
5162
|
-
* @param processedData 处理后的栅格数据,包含排序和颜色信息
|
|
5163
|
-
*/
|
|
5164
|
-
drawRaster(processedData: ProcessedRasterData): void;
|
|
5165
|
-
/**
|
|
5166
|
-
* 绘制栅格房间(统一方法,处理数字房间和特殊房间)
|
|
5167
|
-
*/
|
|
5168
|
-
private drawRasterRoom;
|
|
5169
|
-
/**
|
|
5170
|
-
* 分批绘制像素点
|
|
5171
|
-
*/
|
|
5172
|
-
private drawPixelPointsInBatches;
|
|
5173
|
-
/**
|
|
5174
|
-
* 处理房间点击事件
|
|
5175
|
-
*/
|
|
5176
|
-
private handleRoomClick;
|
|
5177
|
-
/**
|
|
5178
|
-
* 根据选中的房间ID数组设置房间状态
|
|
5179
|
-
* @param selectRoomIds 选中的房间ID数组
|
|
5180
|
-
*/
|
|
5181
|
-
setRoomStateBySelectIds(selectRoomIds: readonly number[]): void;
|
|
5182
|
-
/**
|
|
5183
|
-
* 切换单个房间的状态
|
|
5184
|
-
* @param roomId 房间ID
|
|
5185
|
-
* @param isActive 是否为激活状态
|
|
5186
|
-
*/
|
|
5187
|
-
setRoomState(roomId: number | SpecialRoomId, isActive: boolean): void;
|
|
5188
|
-
/**
|
|
5189
|
-
* 设置所有房间为同一状态
|
|
5190
|
-
* @param isActive 是否为激活状态
|
|
5191
|
-
*/
|
|
5192
|
-
setAllRoomsState(isActive: boolean): void;
|
|
5193
|
-
/**
|
|
5194
|
-
* 获取数字房间的Graphics映射(用于地板材质创建)
|
|
5195
|
-
* @returns 房间ID到Graphics的映射
|
|
5196
|
-
*/
|
|
5197
|
-
getRoomGraphicsMap(): Map<number, Graphics>;
|
|
5198
|
-
/**
|
|
5199
|
-
* 获取栅格房间数据(用于精确碰撞检测)
|
|
5200
|
-
* @param roomId 房间ID
|
|
5201
|
-
* @returns 栅格房间数据或null
|
|
5202
|
-
*/
|
|
5203
|
-
getRasterRoomData(roomId: number | SpecialRoomId): RasterRoomData | null;
|
|
5204
|
-
/**
|
|
5205
|
-
* 获取地图宽度(用于像素索引转换)
|
|
5206
|
-
*/
|
|
5207
|
-
getMapWidth(): number;
|
|
5208
|
-
/**
|
|
5209
|
-
* 判断墙体(线段)是否与任意房间有交集
|
|
5210
|
-
* @param points 墙体的两个端点坐标(机器坐标系)
|
|
5211
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
5212
|
-
*/
|
|
5213
|
-
isWallIntersectsAnyRoom(points: Point[]): boolean;
|
|
5214
|
-
/**
|
|
5215
|
-
* 判断区域(矩形)是否与任意房间有交集
|
|
5216
|
-
* @param points 区域的四个顶点坐标(机器坐标系)
|
|
5217
|
-
* @returns 如果有交集返回 true,否则返回 false
|
|
5218
|
-
*/
|
|
5219
|
-
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
5220
|
-
/**
|
|
5221
|
-
* 栅格地图:判断线段是否与任意房间有交集
|
|
5222
|
-
*/
|
|
5223
|
-
private isWallIntersectsAnyRoomRaster;
|
|
5224
|
-
/**
|
|
5225
|
-
* 结构化地图:判断线段是否与任意房间有交集
|
|
5226
|
-
*/
|
|
5227
|
-
private isWallIntersectsAnyRoomStructured;
|
|
5228
|
-
/**
|
|
5229
|
-
* 栅格地图:判断矩形是否与任意房间有交集
|
|
5230
|
-
* 优化方案:先检查4条边,如果都失败再检查包含关系
|
|
5231
|
-
*/
|
|
5232
|
-
private isZoneIntersectsAnyRoomRaster;
|
|
5233
|
-
/**
|
|
5234
|
-
* 结构化地图:判断矩形是否与任意房间有交集
|
|
5235
|
-
*/
|
|
5236
|
-
private isZoneIntersectsAnyRoomStructured;
|
|
5237
|
-
/**
|
|
5238
|
-
* 获取线段覆盖的像素点索引
|
|
5239
|
-
*/
|
|
5240
|
-
private getLinePixels;
|
|
5241
|
-
/**
|
|
5242
|
-
* 获取矩形覆盖的像素点索引
|
|
5243
|
-
*/
|
|
5244
|
-
private getZonePixels;
|
|
5245
|
-
/**
|
|
5246
|
-
* 刷新所有房间的颜色(不重新计算几何)
|
|
5247
|
-
*/
|
|
5248
|
-
private refreshRoomColors;
|
|
5249
|
-
/**
|
|
5250
|
-
* 清除所有房间
|
|
5251
|
-
*/
|
|
5252
|
-
clearRooms(): void;
|
|
5253
|
-
/**
|
|
5254
|
-
* 销毁时清理资源
|
|
5255
|
-
*/
|
|
5256
|
-
destroy(): void;
|
|
5257
|
-
}
|
|
5258
|
-
|
|
5259
|
-
declare class RoomManager_2 {
|
|
5260
|
-
private appService;
|
|
5261
|
-
private unsubscribeFns;
|
|
5262
|
-
private roomInfoContainer;
|
|
5263
|
-
private roomInfoMap;
|
|
5264
|
-
private roomDisplayMap;
|
|
5265
|
-
private roomFloorType;
|
|
5266
|
-
constructor(appService: AppService);
|
|
5267
|
-
/**
|
|
5268
|
-
* 设置房间属性数据(房间名称、清洁模式等)
|
|
5269
|
-
* 一次性获取并存储所有必要的显示数据
|
|
5270
|
-
*/
|
|
5271
|
-
drawRoomProperty(properties: RoomProperty[]): Promise<boolean>;
|
|
5272
|
-
/**
|
|
5273
|
-
* 更新房间信息显示
|
|
5274
|
-
* 直接使用已存储的完整显示数据
|
|
5275
|
-
*/
|
|
5276
|
-
private updateRoomInfoDisplay;
|
|
5277
|
-
/**
|
|
5278
|
-
* 创建单个房间的信息组件
|
|
5279
|
-
*/
|
|
5280
|
-
private createRoomInfo;
|
|
5281
|
-
/**
|
|
5282
|
-
* 更新特定房间的名称
|
|
5283
|
-
*/
|
|
5284
|
-
updateRoomName(roomId: number, name: string): void;
|
|
5285
|
-
/**
|
|
5286
|
-
* 更新特定房间的类型
|
|
5287
|
-
*/
|
|
5288
|
-
updateRoomType(roomId: number, type: number | null): Promise<void>;
|
|
5289
|
-
/**
|
|
5290
|
-
* 更新特定房间的位置
|
|
5291
|
-
*/
|
|
5292
|
-
updateRoomPosition(roomId: number, centerPoint: Point): void;
|
|
5293
|
-
/**
|
|
5294
|
-
* 清除所有房间信息
|
|
5295
|
-
*/
|
|
5296
|
-
private clearRoomInfos;
|
|
5297
|
-
/**
|
|
5298
|
-
* 根据ID查找房间显示数据
|
|
5299
|
-
*/
|
|
5300
|
-
getRoomPropertyById(id: number): RoomData | undefined;
|
|
5301
|
-
/**
|
|
5302
|
-
* 当房间几何数据更新时,刷新房间信息显示
|
|
5303
|
-
* 这个方法由 MapManager 在房间几何数据更新后调用
|
|
5304
|
-
*/
|
|
5305
|
-
refresh(): Promise<void>;
|
|
5306
|
-
/**
|
|
5307
|
-
* 更新所有房间属性的可见性
|
|
5308
|
-
*/
|
|
5309
|
-
private updateAllRoomPropertyVisibility;
|
|
5310
|
-
/**
|
|
5311
|
-
* 更新所有房间名称的可见性
|
|
5312
|
-
*/
|
|
5313
|
-
private updateAllRoomNameVisibility;
|
|
5314
|
-
/**
|
|
5315
|
-
* 更新所有房间类型图标的可见性
|
|
5316
|
-
*/
|
|
5317
|
-
private updateAllRoomTypeVisibility;
|
|
5318
|
-
/**
|
|
5319
|
-
* 更新所有房间选择指示器的可见性
|
|
5320
|
-
*/
|
|
5321
|
-
private updateAllRoomSelectionIndicatorVisibility;
|
|
5322
|
-
/**
|
|
5323
|
-
* 刷新所有房间颜色
|
|
5324
|
-
*/
|
|
5325
|
-
private refreshAllRoomColors;
|
|
5326
|
-
/**
|
|
5327
|
-
* 更新地板材质
|
|
5328
|
-
* 在房间几何数据或属性数据更新后调用
|
|
5329
|
-
*/
|
|
5330
|
-
private updateFloorTypes;
|
|
5331
|
-
clear(): void;
|
|
5332
|
-
destroy(): void;
|
|
5333
|
-
}
|
|
5334
|
-
|
|
5335
1977
|
/**
|
|
5336
1978
|
* 房间属性信息
|
|
5337
1979
|
*/
|
|
@@ -5453,71 +2095,6 @@ export declare type RuntimeConfig = {
|
|
|
5453
2095
|
selectedCarpetIds: string[]
|
|
5454
2096
|
}
|
|
5455
2097
|
|
|
5456
|
-
/**
|
|
5457
|
-
* 机器人睡眠动画组件
|
|
5458
|
-
* TODO
|
|
5459
|
-
* 暂时不开放这个组件,得找到合适的动画
|
|
5460
|
-
* 基于 FixedSizeAnimatedSprite,显示机器人睡眠状态的动画效果
|
|
5461
|
-
*/
|
|
5462
|
-
declare class SleepAnimation extends EnhancedAnimatedSprite {
|
|
5463
|
-
protected appService: AppService;
|
|
5464
|
-
private unsubscribeFns;
|
|
5465
|
-
private throttledUpdateOffset;
|
|
5466
|
-
private fixedOffsetX;
|
|
5467
|
-
private fixedOffsetY;
|
|
5468
|
-
constructor(appService: AppService, textures: Texture[]);
|
|
5469
|
-
/**
|
|
5470
|
-
* 静态创建方法
|
|
5471
|
-
*/
|
|
5472
|
-
static create(appService: AppService): Promise<SleepAnimation>;
|
|
5473
|
-
/**
|
|
5474
|
-
* 初始化睡眠动画
|
|
5475
|
-
*/
|
|
5476
|
-
private initializeAnimation;
|
|
5477
|
-
/**
|
|
5478
|
-
* 判断是否应该显示睡眠动画
|
|
5479
|
-
* 显示条件:
|
|
5480
|
-
* 1. 配置中启用睡眠动画
|
|
5481
|
-
* 2. 机器人容器可见
|
|
5482
|
-
* 3. 机器人图标已经绘制(有位置信息)
|
|
5483
|
-
*/
|
|
5484
|
-
private shouldShow;
|
|
5485
|
-
/**
|
|
5486
|
-
* 更新可见性状态
|
|
5487
|
-
*/
|
|
5488
|
-
private updateVisibility;
|
|
5489
|
-
/**
|
|
5490
|
-
* 更新偏移量以保持固定大小
|
|
5491
|
-
* @param _scale 当前地图缩放比例
|
|
5492
|
-
*/
|
|
5493
|
-
private updateOffset;
|
|
5494
|
-
/**
|
|
5495
|
-
* 绘制睡眠动画
|
|
5496
|
-
* @param params 绘制参数
|
|
5497
|
-
*/
|
|
5498
|
-
draw(params: IconPoint): void;
|
|
5499
|
-
/**
|
|
5500
|
-
* 当机器人图标可见性变化时调用
|
|
5501
|
-
*/
|
|
5502
|
-
onRobotVisibilityChanged(): void;
|
|
5503
|
-
/**
|
|
5504
|
-
* 重写 visible setter,确保动画播放状态与可见性同步
|
|
5505
|
-
*/
|
|
5506
|
-
set visible(value: boolean);
|
|
5507
|
-
/**
|
|
5508
|
-
* 重写 visible getter
|
|
5509
|
-
*/
|
|
5510
|
-
get visible(): boolean;
|
|
5511
|
-
/**
|
|
5512
|
-
* 组件销毁时清理资源
|
|
5513
|
-
*/
|
|
5514
|
-
destroy(options?: {
|
|
5515
|
-
children?: boolean;
|
|
5516
|
-
texture?: boolean;
|
|
5517
|
-
baseTexture?: boolean;
|
|
5518
|
-
}): void;
|
|
5519
|
-
}
|
|
5520
|
-
|
|
5521
2098
|
/** 定点清扫配置 */
|
|
5522
2099
|
export declare type SpotConfig = {
|
|
5523
2100
|
/** 图标资源路径 */
|
|
@@ -5575,46 +2152,6 @@ export declare type SpotParam = {
|
|
|
5575
2152
|
point: Point
|
|
5576
2153
|
}
|
|
5577
2154
|
|
|
5578
|
-
declare class ViewportContainer extends Container {
|
|
5579
|
-
private viewportBounds;
|
|
5580
|
-
private maskGraphics;
|
|
5581
|
-
private containerElement;
|
|
5582
|
-
constructor(config: AppConfig, containerElement?: HTMLElement | Window);
|
|
5583
|
-
/**
|
|
5584
|
-
* 计算视口边界
|
|
5585
|
-
*/
|
|
5586
|
-
private calculateViewportBounds;
|
|
5587
|
-
/**
|
|
5588
|
-
* 获取容器尺寸
|
|
5589
|
-
*/
|
|
5590
|
-
private getContainerSize;
|
|
5591
|
-
/**
|
|
5592
|
-
* 创建遮罩限制内容在视口内
|
|
5593
|
-
*/
|
|
5594
|
-
private createMask;
|
|
5595
|
-
/**
|
|
5596
|
-
* 解析尺寸参数
|
|
5597
|
-
*/
|
|
5598
|
-
private parseSize;
|
|
5599
|
-
/**
|
|
5600
|
-
* 获取视口边界
|
|
5601
|
-
*/
|
|
5602
|
-
getViewportBounds(): {
|
|
5603
|
-
x: number;
|
|
5604
|
-
y: number;
|
|
5605
|
-
width: number;
|
|
5606
|
-
height: number;
|
|
5607
|
-
};
|
|
5608
|
-
/**
|
|
5609
|
-
* 更新视口配置
|
|
5610
|
-
*/
|
|
5611
|
-
updateViewport(config: AppConfig): void;
|
|
5612
|
-
/**
|
|
5613
|
-
* 添加内容到视口容器
|
|
5614
|
-
*/
|
|
5615
|
-
addContent(content: Container): void;
|
|
5616
|
-
}
|
|
5617
|
-
|
|
5618
2155
|
/** 虚拟墙配置 */
|
|
5619
2156
|
export declare type VirtualWallConfig = {
|
|
5620
2157
|
/** 图标容器填充颜色 */
|