@ray-js/robot-map-sdk 0.0.3-beta-19 → 0.0.3-beta-20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application/MapApplication.js +1 -1
- package/dist/components/Base/Zone.js +1 -1
- package/dist/components/ChargingStation/index.js +1 -1
- package/dist/components/Controls/Divider.js +1 -1
- package/dist/components/Controls/Spot.js +1 -1
- package/dist/components/Controls/VirtualWall.js +1 -1
- package/dist/components/Robot/index.js +1 -1
- package/dist/components/RoomInfo/RoomProperty.js +1 -1
- package/dist/components/RoomInfo/RoomSelectionIndicator.js +1 -1
- package/dist/constant/config.js +1 -1
- package/dist/constant/methods.js +1 -1
- package/dist/index.d.ts +67 -2
- package/dist/index.js +1 -1
- package/dist/index.rjs.js +1 -1
- package/dist/managers/CustomElementsManager.js +1 -1
- package/dist/managers/MapManager.js +1 -1
- package/dist/utils/algorithm.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist-app/assets/{index-DFAEtWgf.js → index-CMaxpPPD.js} +1 -1
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.C1hdwNGd.js → app.DP1O8BNS.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.BXv7BdiO.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.D7RLqunb.js → VPLocalSearchBox.UpWCcVfL.js} +1 -1
- package/dist-docs/assets/chunks/{theme.Bgk1r3C0.js → theme.uu9-XYwr.js} +2 -2
- package/dist-docs/assets/{guide_getting-started.md.8wgboX-g.js → guide_getting-started.md.u5zOtdU6.js} +1 -1
- package/dist-docs/assets/{reference_config.md.DKXC2aOe.js → reference_config.md.zb-n1yzx.js} +2 -2
- package/dist-docs/assets/{reference_config.md.DKXC2aOe.lean.js → reference_config.md.zb-n1yzx.lean.js} +1 -1
- package/dist-docs/assets/{reference_methods.md.Cw2UFl8i.js → reference_methods.md.D1VYgciC.js} +10 -4
- package/dist-docs/assets/{reference_methods.md.Cw2UFl8i.lean.js → reference_methods.md.D1VYgciC.lean.js} +1 -1
- package/dist-docs/assets/{reference_types.md.CteNuaxc.js → reference_types.md.g_JJ8gNY.js} +74 -15
- package/dist-docs/assets/{reference_types.md.CteNuaxc.lean.js → reference_types.md.g_JJ8gNY.lean.js} +1 -1
- package/dist-docs/assets/{reference_utils.md.DU5CMWXW.js → reference_utils.md.C5spobZN.js} +6 -2
- package/dist-docs/assets/reference_utils.md.C5spobZN.lean.js +1 -0
- package/dist-docs/guide/advanced-usage.html +3 -3
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/reference/callbacks.html +3 -3
- package/dist-docs/reference/config.html +5 -5
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +13 -7
- package/dist-docs/reference/runtime.html +3 -3
- package/dist-docs/reference/types.html +77 -18
- package/dist-docs/reference/utils.html +9 -5
- package/package.json +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.BNXBBbhn.js +0 -1
- package/dist-docs/assets/reference_utils.md.DU5CMWXW.lean.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.8wgboX-g.lean.js → guide_getting-started.md.u5zOtdU6.lean.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,c as r,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":
|
|
1
|
+
import{_ as e,c as r,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":1760953780000}'),i={name:"reference/config.md"};function l(a,o,s,c,d,h){return t(),r("div",null,[...o[0]||(o[0]=[n("",782)])])}const u=e(i,[["render",l]]);export{g as __pageData,u as default};
|
package/dist-docs/assets/{reference_methods.md.Cw2UFl8i.js → reference_methods.md.D1VYgciC.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":
|
|
1
|
+
import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":1760953780000}'),e={name:"reference/methods.md"};function p(h,s,l,k,o,r){return t(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="地图方法" tabindex="-1">地图方法 <a class="header-anchor" href="#地图方法" aria-label="Permalink to "地图方法""></a></h1><p>了解 RobotMap 提供的 API 方法。</p><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to "使用示例""></a></h2><p>通过 <code>onMapReady</code> 回调获得 <code>MapApi</code> 实例,该实例包含所有可调用的地图方法。这些方法让你可以主动控制地图行为、查询数据和执行各种操作。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { MapApi } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@ray-js/robot-map'</span></span>
|
|
2
2
|
<span class="line"></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> mapApi</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> useRef</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MapApi</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
|
@@ -21,7 +21,7 @@ import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g
|
|
|
21
21
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他属性</span></span>
|
|
22
22
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /></span></span>
|
|
23
23
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
|
24
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>注意所有地图方法都是异步的Promise,需要使用 <code>await</code> 或 <code>then</code> 来获取结果。</p></div><h2 id="areroomsadjacent" tabindex="-1">areRoomsAdjacent() <a class="header-anchor" href="#areroomsadjacent" aria-label="Permalink to "areRoomsAdjacent()""></a></h2><p>判断指定的房间是否相邻(连通)。</p><p>判定阈值由 <code>config.map.adjacencyThreshold</code> 配置决定。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> areRoomsAdjacent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">roomIds</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>roomIds</code>: <code>number[]</code> - 要检测的房间ID数组</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#boolean"><code>Promise<boolean></code></a></p><h2 id="resetpanzoom" tabindex="-1">resetPanZoom() <a class="header-anchor" href="#resetpanzoom" aria-label="Permalink to "resetPanZoom()""></a></h2><p>重置地图的平移和缩放状态到初始位置。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> resetPanZoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">void</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <code>Promise<void></code></p><h2 id="getforbiddensweepzones" tabindex="-1">getForbiddenSweepZones() <a class="header-anchor" href="#getforbiddensweepzones" aria-label="Permalink to "getForbiddenSweepZones()""></a></h2><p>获取当前地图上所有禁扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenSweepZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise<ZoneParam[]></code></a></p><h2 id="getforbiddenmopzones" tabindex="-1">getForbiddenMopZones() <a class="header-anchor" href="#getforbiddenmopzones" aria-label="Permalink to "getForbiddenMopZones()""></a></h2><p>获取当前地图上所有禁拖区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenMopZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise<ZoneParam[]></code></a></p><h2 id="getcleanzones" tabindex="-1">getCleanZones() <a class="header-anchor" href="#getcleanzones" aria-label="Permalink to "getCleanZones()""></a></h2><p>获取当前地图上所有清扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getCleanZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise<ZoneParam[]></code></a></p><h2 id="getvirtualwalls" tabindex="-1">getVirtualWalls() <a class="header-anchor" href="#getvirtualwalls" aria-label="Permalink to "getVirtualWalls()""></a></h2><p>获取当前地图上所有虚拟墙数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getVirtualWalls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#virtualwallparam"><code>Promise<VirtualWallParam[]></code></a></p><h2 id="getspots" tabindex="-1">getSpots() <a class="header-anchor" href="#getspots" aria-label="Permalink to "getSpots()""></a></h2><p>获取当前地图上所有定点清扫数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getSpots</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#spotparam"><code>Promise<SpotParam[]></code></a></p><h2 id="geteffectivedividerpoints" tabindex="-1">getEffectiveDividerPoints() <a class="header-anchor" href="#geteffectivedividerpoints" aria-label="Permalink to "getEffectiveDividerPoints()""></a></h2><p>获取分割线有效端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getEffectiveDividerPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[] | null></code></a> | <code>null</code></p><h2 id="getdividerendpoints" tabindex="-1">getDividerEndPoints() <a class="header-anchor" href="#getdividerendpoints" aria-label="Permalink to "getDividerEndPoints()""></a></h2><p>获取分割线端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getDividerEndPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Point[]</code></a> | <code>null</code></p><h2 id="getviewportcenterpoint" tabindex="-1">getViewportCenterPoint() <a class="header-anchor" href="#getviewportcenterpoint" aria-label="Permalink to "getViewportCenterPoint()""></a></h2><p>获取当前视口中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getViewportCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[]></code></a> | <code>null</code></p><h2 id="getmapcenterpoint" tabindex="-1">getMapCenterPoint() <a class="header-anchor" href="#getmapcenterpoint" aria-label="Permalink to "getMapCenterPoint()""></a></h2><p>获取地图中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getMapCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[]></code></a> | <code>null</code></p><h2 id="getwallpointsbyviewportcenter" tabindex="-1">getWallPointsByViewportCenter() <a class="header-anchor" href="#getwallpointsbyviewportcenter" aria-label="Permalink to "getWallPointsByViewportCenter()""></a></h2><p>基于视口中心生成虚拟墙端点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getWallPointsByViewportCenter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">options</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
24
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>注意所有地图方法都是异步的Promise,需要使用 <code>await</code> 或 <code>then</code> 来获取结果。</p></div><h2 id="areroomsadjacent" tabindex="-1">areRoomsAdjacent() <a class="header-anchor" href="#areroomsadjacent" aria-label="Permalink to "areRoomsAdjacent()""></a></h2><p>判断指定的房间是否相邻(连通)。</p><p>判定阈值由 <code>config.map.adjacencyThreshold</code> 配置决定。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> areRoomsAdjacent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">roomIds</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>roomIds</code>: <code>number[]</code> - 要检测的房间ID数组</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#boolean"><code>Promise<boolean></code></a></p><h2 id="getforbiddensweepzones" tabindex="-1">getForbiddenSweepZones() <a class="header-anchor" href="#getforbiddensweepzones" aria-label="Permalink to "getForbiddenSweepZones()""></a></h2><p>获取当前地图上所有禁扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenSweepZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise<ZoneParam[]></code></a></p><h2 id="getforbiddenmopzones" tabindex="-1">getForbiddenMopZones() <a class="header-anchor" href="#getforbiddenmopzones" aria-label="Permalink to "getForbiddenMopZones()""></a></h2><p>获取当前地图上所有禁拖区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getForbiddenMopZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise<ZoneParam[]></code></a></p><h2 id="getcleanzones" tabindex="-1">getCleanZones() <a class="header-anchor" href="#getcleanzones" aria-label="Permalink to "getCleanZones()""></a></h2><p>获取当前地图上所有清扫区域数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getCleanZones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#zoneparam"><code>Promise<ZoneParam[]></code></a></p><h2 id="getvirtualwalls" tabindex="-1">getVirtualWalls() <a class="header-anchor" href="#getvirtualwalls" aria-label="Permalink to "getVirtualWalls()""></a></h2><p>获取当前地图上所有虚拟墙数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getVirtualWalls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#virtualwallparam"><code>Promise<VirtualWallParam[]></code></a></p><h2 id="getspots" tabindex="-1">getSpots() <a class="header-anchor" href="#getspots" aria-label="Permalink to "getSpots()""></a></h2><p>获取当前地图上所有定点清扫数据。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getSpots</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#spotparam"><code>Promise<SpotParam[]></code></a></p><h2 id="geteffectivedividerpoints" tabindex="-1">getEffectiveDividerPoints() <a class="header-anchor" href="#geteffectivedividerpoints" aria-label="Permalink to "getEffectiveDividerPoints()""></a></h2><p>获取分割线有效端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getEffectiveDividerPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[] | null></code></a> | <code>null</code></p><h2 id="getdividerendpoints" tabindex="-1">getDividerEndPoints() <a class="header-anchor" href="#getdividerendpoints" aria-label="Permalink to "getDividerEndPoints()""></a></h2><p>获取分割线端点。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getDividerEndPoints</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Point[]</code></a> | <code>null</code></p><h2 id="getviewportcenterpoint" tabindex="-1">getViewportCenterPoint() <a class="header-anchor" href="#getviewportcenterpoint" aria-label="Permalink to "getViewportCenterPoint()""></a></h2><p>获取当前视口中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getViewportCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[]></code></a> | <code>null</code></p><h2 id="getmapcenterpoint" tabindex="-1">getMapCenterPoint() <a class="header-anchor" href="#getmapcenterpoint" aria-label="Permalink to "getMapCenterPoint()""></a></h2><p>获取地图中心点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getMapCenterPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[]></code></a> | <code>null</code></p><h2 id="getwallpointsbyviewportcenter" tabindex="-1">getWallPointsByViewportCenter() <a class="header-anchor" href="#getwallpointsbyviewportcenter" aria-label="Permalink to "getWallPointsByViewportCenter()""></a></h2><p>基于视口中心生成虚拟墙端点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getWallPointsByViewportCenter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">options</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
25
25
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
26
26
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> direction</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Direction</span></span>
|
|
27
27
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> offsetX</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
@@ -41,7 +41,13 @@ import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g
|
|
|
41
41
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>options</code> - 配置选项</li><li><code>options.size</code>: <code>number</code> - 区域大小,单位米,默认使用配置中的最小尺寸</li><li><code>options.offsetX</code>: <code>number</code> - X方向像素偏移,支持负数,默认为 0</li><li><code>options.offsetY</code>: <code>number</code> - Y方向像素偏移,支持负数,默认为 0</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[]></code></a></p><h2 id="getspotpointbyviewportcenter" tabindex="-1">getSpotPointByViewportCenter() <a class="header-anchor" href="#getspotpointbyviewportcenter" aria-label="Permalink to "getSpotPointByViewportCenter()""></a></h2><p>基于视口中心生成定点清扫的点坐标。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getSpotPointByViewportCenter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">options</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
42
42
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> offsetX</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
43
43
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> offsetY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
44
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>options</code> - 配置选项</li><li><code>options.size</code>: <code>number</code> - 区域大小,单位米,默认使用配置中的最小尺寸</li><li><code>options.offsetX</code>: <code>number</code> - X方向像素偏移,支持负数,默认为 0</li><li><code>options.offsetY</code>: <code>number</code> - Y方向像素偏移,支持负数,默认为 0</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[]></code></a></p><h2 id="
|
|
44
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>options</code> - 配置选项</li><li><code>options.size</code>: <code>number</code> - 区域大小,单位米,默认使用配置中的最小尺寸</li><li><code>options.offsetX</code>: <code>number</code> - X方向像素偏移,支持负数,默认为 0</li><li><code>options.offsetY</code>: <code>number</code> - Y方向像素偏移,支持负数,默认为 0</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#point"><code>Promise<Point[]></code></a></p><h2 id="ispointinanyroom" tabindex="-1">isPointInAnyRoom() <a class="header-anchor" href="#ispointinanyroom" aria-label="Permalink to "isPointInAnyRoom()""></a></h2><p>判断一个点是否在任意房间内。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>需要传入基于原点坐标系的点</p></div><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> isPointInAnyRoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">RoomData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#point"><code>Point</code></a> - 待检测的点坐标(原点坐标系)</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#roomdata"><code>Promise<RoomData | null></code></a> - 如果点在某个房间内,返回该房间的 RoomData;否则返回 null</p><p><strong>示例</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 判断一个点是否在房间内</span></span>
|
|
45
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> roomData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> mapApi.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">isPointInAnyRoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">100</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">200</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span></span>
|
|
46
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (roomData) {</span></span>
|
|
47
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`点在房间 \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">roomData</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">name</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">} 内\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
|
48
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
49
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'点不在任何房间内'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
|
50
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="resetpanzoom" tabindex="-1">resetPanZoom() <a class="header-anchor" href="#resetpanzoom" aria-label="Permalink to "resetPanZoom()""></a></h2><p>重置地图的平移和缩放状态到初始位置。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> resetPanZoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">void</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <code>Promise<void></code></p><h2 id="snapshot" tabindex="-1">snapshot() <a class="header-anchor" href="#snapshot" aria-label="Permalink to "snapshot()""></a></h2><p>当前地图截图。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> snapshot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>返回值</strong>: <a href="/reference/types.html#string"><code>Promise<string></code></a></p><h2 id="snapshotbydata" tabindex="-1">snapshotByData() <a class="header-anchor" href="#snapshotbydata" aria-label="Permalink to "snapshotByData()""></a></h2><p>根据指定的地图数据进行截图。</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>静态配置会沿用当前地图的配置。</p></div><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> snapshotByData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
|
45
51
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> data</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
46
52
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> map</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
47
53
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> path</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
@@ -53,4 +59,4 @@ import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g
|
|
|
53
59
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> detectedObjects</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]</span></span>
|
|
54
60
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
55
61
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> runtime</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DeepPartialRuntimeConfig</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
56
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>data</code> - 地图数据对象</li><li><code>data.map</code>: <code>string</code> - 地图字符串数据</li><li><code>data.path</code>: <code>string</code> - 可选的路径数据</li><li><code>data.roomProperties</code>: <code>RoomProperty[]</code> - 可选的房间属性数据</li><li><code>data.customElements</code>: <code>CustomElementParam[]</code> - 可选的自定义元素数据</li><li><code>data.forbiddenSweepZones</code>: <code>ZoneParam[]</code> - 可选的禁扫区域数据</li><li><code>data.forbiddenMopZones</code>: <code>ZoneParam[]</code> - 可选的禁拖区域数据</li><li><code>data.virtualWalls</code>: <code>VirtualWallParam[]</code> - 可选的虚拟墙数据</li><li><code>data.detectedObjects</code>: <code>DetectedObjectParam[]</code> - 可选的检测物体数据</li><li><code>runtime</code> - 可选的运行时配置</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#string"><code>Promise<string></code></a></p>`,
|
|
62
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Promise</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>data</code> - 地图数据对象</li><li><code>data.map</code>: <code>string</code> - 地图字符串数据</li><li><code>data.path</code>: <code>string</code> - 可选的路径数据</li><li><code>data.roomProperties</code>: <code>RoomProperty[]</code> - 可选的房间属性数据</li><li><code>data.customElements</code>: <code>CustomElementParam[]</code> - 可选的自定义元素数据</li><li><code>data.forbiddenSweepZones</code>: <code>ZoneParam[]</code> - 可选的禁扫区域数据</li><li><code>data.forbiddenMopZones</code>: <code>ZoneParam[]</code> - 可选的禁拖区域数据</li><li><code>data.virtualWalls</code>: <code>VirtualWallParam[]</code> - 可选的虚拟墙数据</li><li><code>data.detectedObjects</code>: <code>DetectedObjectParam[]</code> - 可选的检测物体数据</li><li><code>runtime</code> - 可选的运行时配置</li></ul><p><strong>返回值</strong>: <a href="/reference/types.html#string"><code>Promise<string></code></a></p>`,121)])])}const c=i(e,[["render",p]]);export{g as __pageData,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":
|
|
1
|
+
import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"地图方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/methods.md","filePath":"reference/methods.md","lastUpdated":1760953780000}'),e={name:"reference/methods.md"};function p(h,s,l,k,o,r){return t(),a("div",null,[...s[0]||(s[0]=[n("",121)])])}const c=i(e,[["render",p]]);export{g as __pageData,c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":
|
|
1
|
+
import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1760953780000}'),l={name:"reference/types.md"};function h(t,s,k,e,r,d){return n(),a("div",null,[...s[0]||(s[0]=[p(`<h1 id="类型定义" tabindex="-1">类型定义 <a class="header-anchor" href="#类型定义" aria-label="Permalink to "类型定义""></a></h1><p>了解 RobotMap 支持的各种数据类型和格式。</p><h2 id="point" tabindex="-1">Point <a class="header-anchor" href="#point" aria-label="Permalink to "Point {#point}""></a></h2><p>坐标点类型。</p><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** X坐标 */</span></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> x</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** Y坐标 */</span></span>
|
|
@@ -74,28 +74,85 @@ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y
|
|
|
74
74
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> centerPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span></span>
|
|
75
75
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 索引 */</span></span>
|
|
76
76
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> index</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
77
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="
|
|
77
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="imagecustomelementparam" tabindex="-1">ImageCustomElementParam <a class="header-anchor" href="#imagecustomelementparam" aria-label="Permalink to "ImageCustomElementParam {#imagecustomelementparam}""></a></h2><p>自定义元素参数类型。</p><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ImageCustomElementParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
78
78
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 元素ID */</span></span>
|
|
79
79
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
80
80
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 元素类型 */</span></span>
|
|
81
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'image'</span
|
|
81
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'image'</span></span>
|
|
82
82
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** X坐标 */</span></span>
|
|
83
83
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> x</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
84
84
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** Y坐标 */</span></span>
|
|
85
85
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> y</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
86
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 旋转角度 */</span></span>
|
|
87
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> rotation</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
88
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 透明度 */</span></span>
|
|
89
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> opacity</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
90
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 是否可交互 */</span></span>
|
|
91
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> interactive</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
|
|
92
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 自定义数据 */</span></span>
|
|
93
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> customData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">any</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
|
94
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 尺寸是否固定 */</span></span>
|
|
95
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> sizeFixed</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
|
|
96
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 图片资源路径 */</span></span>
|
|
97
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> src</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
98
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 图片宽度(必需 - 图片需要明确尺寸) */</span></span>
|
|
99
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
100
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 图片高度(必需 - 图片需要明确尺寸) */</span></span>
|
|
101
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> height</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
102
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="gifcustomelementparam" tabindex="-1">GifCustomElementParam <a class="header-anchor" href="#gifcustomelementparam" aria-label="Permalink to "GifCustomElementParam {#gifcustomelementparam}""></a></h2><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> GifCustomElementParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
103
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 元素ID */</span></span>
|
|
104
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
105
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 元素类型 */</span></span>
|
|
106
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'gif'</span></span>
|
|
107
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** X坐标 */</span></span>
|
|
108
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> x</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
109
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** Y坐标 */</span></span>
|
|
110
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> y</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
111
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 旋转角度 */</span></span>
|
|
112
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> rotation</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
113
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 透明度 */</span></span>
|
|
114
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> opacity</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
115
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 是否可交互 */</span></span>
|
|
116
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> interactive</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
|
|
117
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 自定义数据 */</span></span>
|
|
118
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> customData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">any</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
|
119
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 尺寸是否固定 */</span></span>
|
|
120
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> sizeFixed</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
|
|
121
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** GIF资源路径 */</span></span>
|
|
122
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> src</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
123
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** GIF宽度(必需 - GIF 需要明确尺寸) */</span></span>
|
|
124
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
125
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** GIF高度(必需 - GIF 需要明确尺寸) */</span></span>
|
|
126
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> height</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
127
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="htmlcustomelementparam" tabindex="-1">HtmlCustomElementParam <a class="header-anchor" href="#htmlcustomelementparam" aria-label="Permalink to "HtmlCustomElementParam {#htmlcustomelementparam}""></a></h2><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> HtmlCustomElementParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
128
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 元素ID */</span></span>
|
|
129
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
130
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 元素类型 */</span></span>
|
|
131
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'html'</span></span>
|
|
132
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** X坐标 */</span></span>
|
|
133
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> x</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
134
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** Y坐标 */</span></span>
|
|
135
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> y</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
136
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 旋转角度 */</span></span>
|
|
137
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> rotation</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
138
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 透明度 */</span></span>
|
|
139
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> opacity</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
140
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 是否可交互 */</span></span>
|
|
141
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> interactive</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
|
|
142
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 自定义数据 */</span></span>
|
|
143
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> customData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">any</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
|
144
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 尺寸是否固定 */</span></span>
|
|
145
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> sizeFixed</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
|
|
146
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** HTML内容 */</span></span>
|
|
147
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> htmlContent</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
86
148
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 宽度 */</span></span>
|
|
87
149
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
88
150
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 高度 */</span></span>
|
|
89
151
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> height</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
90
|
-
<span class="line"><span style="--shiki-light:#
|
|
91
|
-
<span class="line"><span style="--shiki-light:#
|
|
92
|
-
<span class="line"><span style="--shiki-light:#
|
|
93
|
-
<span class="line"><span style="--shiki-light:#
|
|
94
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 颜色 */</span></span>
|
|
95
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> color</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
96
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 是否可交互 */</span></span>
|
|
97
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> interactive</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span></span>
|
|
98
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="detectedobjectparam" tabindex="-1">DetectedObjectParam <a class="header-anchor" href="#detectedobjectparam" aria-label="Permalink to "DetectedObjectParam {#detectedobjectparam}""></a></h2><p>检测物体参数类型。</p><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
152
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="customelementparam" tabindex="-1">CustomElementParam <a class="header-anchor" href="#customelementparam" aria-label="Permalink to "CustomElementParam {#customelementparam}""></a></h2><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> CustomElementParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span></span>
|
|
153
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ImageCustomElementParam</span></span>
|
|
154
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> GifCustomElementParam</span></span>
|
|
155
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> HtmlCustomElementParam</span></span></code></pre></div><h2 id="detectedobjectparam" tabindex="-1">DetectedObjectParam <a class="header-anchor" href="#detectedobjectparam" aria-label="Permalink to "DetectedObjectParam {#detectedobjectparam}""></a></h2><p>检测物体参数类型。</p><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">type</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
99
156
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 物体ID */</span></span>
|
|
100
157
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span></span>
|
|
101
158
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 图片源 */</span></span>
|
|
@@ -105,7 +162,9 @@ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y
|
|
|
105
162
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** Y坐标 */</span></span>
|
|
106
163
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> y</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
107
164
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 宽度 */</span></span>
|
|
108
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"
|
|
165
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> width</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
109
166
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 高度 */</span></span>
|
|
110
|
-
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> height</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"
|
|
111
|
-
<span class="line"><span style="--shiki-light:#
|
|
167
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> height</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span></span>
|
|
168
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> /** 自定义数据 */</span></span>
|
|
169
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> customData</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">any</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
|
170
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,41)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};
|
package/dist-docs/assets/{reference_types.md.CteNuaxc.lean.js → reference_types.md.g_JJ8gNY.lean.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":
|
|
1
|
+
import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const y=JSON.parse('{"title":"类型定义","description":"","frontmatter":{},"headers":[],"relativePath":"reference/types.md","filePath":"reference/types.md","lastUpdated":1760953780000}'),l={name:"reference/types.md"};function h(t,s,k,e,r,d){return n(),a("div",null,[...s[0]||(s[0]=[p("",41)])])}const F=i(l,[["render",h]]);export{y as __pageData,F as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as a,o as t,ag as
|
|
1
|
+
import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"工具方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/utils.md","filePath":"reference/utils.md","lastUpdated":1760932663000}'),e={name:"reference/utils.md"};function p(l,s,h,k,r,o){return t(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="工具方法" tabindex="-1">工具方法 <a class="header-anchor" href="#工具方法" aria-label="Permalink to "工具方法""></a></h1><p>了解 RobotMap 提供的工具方法。</p><h2 id="decoderoomproperties" tabindex="-1">decodeRoomProperties <a class="header-anchor" href="#decoderoomproperties" aria-label="Permalink to "decodeRoomProperties""></a></h2><p>解析点阵协议的地图房间数据并转换为 <code>RobotMap</code> 所需的格式。</p><p><strong>类型</strong></p><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> decodeRoomProperties</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> map</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> reservedStrHandler</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">reservedStr</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Partial</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">RoomProperty</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>,</span></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomProperty</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]</span></span></code></pre></div><p><strong>参数</strong></p><ul><li><code>map</code>: 点阵协议的地图数据</li><li><code>reservedStrHandler</code>: 处理预留字段的回调</li></ul><p><strong>返回值</strong></p><ul><li><a href="/reference/types.html#roomproperty"><code>RoomProperty[]</code></a>: 转换后的房间属性数组</li></ul><p><strong>示例</strong></p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { decodeRoomProperties } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@ray-js/robot-map'</span></span>
|
|
@@ -9,4 +9,8 @@ import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.DRADY2L-.js";const g
|
|
|
9
9
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> roomProperties</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> decodeRoomProperties</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(map)</span></span>
|
|
10
10
|
<span class="line"></span>
|
|
11
11
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> roomProperties</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{roomProperties} /></span></span>
|
|
12
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div
|
|
12
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="offsetpointstoavoidoverlap" tabindex="-1">offsetPointsToAvoidOverlap <a class="header-anchor" href="#offsetpointstoavoidoverlap" aria-label="Permalink to "offsetPointsToAvoidOverlap""></a></h2><p>对点位数组进行偏移,避免与已存在的点位数组重叠。</p><p><strong>类型</strong></p><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> offsetPointsToAvoidOverlap</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
|
13
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> points</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[],</span></span>
|
|
14
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> existingPointsArray</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[][],</span></span>
|
|
15
|
+
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> maxAttempts</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">?:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
16
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[]</span></span></code></pre></div><p><strong>参数</strong></p><ul><li><code>points</code>: 需要偏移的点位数组</li><li><code>existingPointsArray</code>: 已存在的点位数组</li><li><code>maxAttempts</code>: 最大尝试次数,默认20次(最多偏移100个单位)</li></ul><p><strong>返回值</strong></p><ul><li><code>Point[]</code>: 偏移后的点位数组</li></ul>`,20)])])}const c=i(e,[["render",p]]);export{g as __pageData,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"工具方法","description":"","frontmatter":{},"headers":[],"relativePath":"reference/utils.md","filePath":"reference/utils.md","lastUpdated":1760932663000}'),e={name:"reference/utils.md"};function p(l,s,h,k,r,o){return t(),a("div",null,[...s[0]||(s[0]=[n("",20)])])}const c=i(e,[["render",p]]);export{g as __pageData,c as default};
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/assets/style.CN_tJoU2.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/assets/app.
|
|
12
|
+
<script type="module" src="/assets/app.DP1O8BNS.js"></script>
|
|
13
13
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/assets/chunks/theme.uu9-XYwr.js">
|
|
15
15
|
<link rel="modulepreload" href="/assets/chunks/framework.DRADY2L-.js">
|
|
16
16
|
<link rel="modulepreload" href="/assets/guide_advanced-usage.md.CUkMfTh6.lean.js">
|
|
17
17
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /></span></span>
|
|
544
544
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
|
545
545
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="截图" tabindex="-1">截图 <a class="header-anchor" href="#截图" aria-label="Permalink to "截图""></a></h2></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><div class="edit-info" data-v-e257564d><!----><div class="last-updated" data-v-e257564d><p class="VPLastUpdated" data-v-e257564d data-v-e98dd255>最后更新于: <time datetime="2025-10-16T08:43:09.000Z" data-v-e98dd255></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/guide/getting-started.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>快速开始</span><!--]--></a></div><div class="pager" data-v-e257564d><!----></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
546
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"CUkMfTh6\",\"guide_concepts.md\":\"CAoYwZmS\",\"guide_getting-started.md\":\"
|
|
546
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"CUkMfTh6\",\"guide_concepts.md\":\"CAoYwZmS\",\"guide_getting-started.md\":\"u5zOtdU6\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"-S6uhkXO\",\"reference_config.md\":\"zb-n1yzx\",\"reference_data.md\":\"B8JfrRhl\",\"reference_methods.md\":\"D1VYgciC\",\"reference_runtime.md\":\"UJkdf65W\",\"reference_types.md\":\"g_JJ8gNY\",\"reference_utils.md\":\"C5spobZN\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,5],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
547
547
|
|
|
548
548
|
</body>
|
|
549
549
|
</html>
|