@ray-js/robot-map-sdk 0.0.3-beta-14 → 0.0.3-beta-15
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/README.md +2 -49
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.Bw1eNHxj.js → app.D8xBQf4O.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.DB7O_MhQ.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.B5zBqowg.js → VPLocalSearchBox.BYPVcgMQ.js} +1 -1
- package/dist-docs/assets/chunks/{theme.Bmfe0KSS.js → theme.C9MT_4iu.js} +2 -2
- package/dist-docs/assets/{guide_getting-started.md.DyB23Sov.js → guide_getting-started.md.cP-vLJIe.js} +1 -1
- package/dist-docs/guide/advanced-usage.html +3 -3
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/reference/callbacks.html +3 -3
- package/dist-docs/reference/config.html +3 -3
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +3 -3
- package/dist-docs/reference/runtime.html +3 -3
- package/dist-docs/reference/types.html +3 -3
- package/dist-docs/reference/utils.html +3 -3
- package/package.json +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.9KGOFfRq.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.DyB23Sov.lean.js → guide_getting-started.md.cP-vLJIe.lean.js} +0 -0
package/README.md
CHANGED
|
@@ -1,52 +1,5 @@
|
|
|
1
1
|
# Robot Map SDK
|
|
2
2
|
|
|
3
|
-
A high-performance 2D
|
|
3
|
+
A high-performance 2D robot vacuum cleaner map SDK based on PIXI.js.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
yarn add @ray-js/robot-map-sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## develop
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
yarn dev
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## build
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
yarn build
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Quick Start
|
|
24
|
-
|
|
25
|
-
```typescript
|
|
26
|
-
import { MapApplication } from '@ray-js/robot-map-sdk'
|
|
27
|
-
|
|
28
|
-
// Create map application instance
|
|
29
|
-
const mapApp = new MapApplication()
|
|
30
|
-
|
|
31
|
-
// Initialize
|
|
32
|
-
await mapApp.initialize({
|
|
33
|
-
resizeTo: containerElement,
|
|
34
|
-
config: {
|
|
35
|
-
global: {
|
|
36
|
-
backgroundColor: 0xffffff,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
runtime: {
|
|
40
|
-
enableRoomSelection: true,
|
|
41
|
-
showRoomName: true,
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
// Draw map
|
|
46
|
-
const rasterData = decodeMap(mapString)
|
|
47
|
-
await mapApp.drawRasterMap(rasterData)
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## API Documentation
|
|
51
|
-
|
|
52
|
-
For detailed API documentation, please refer to the generated documentation site.
|
|
5
|
+
This SDK does not need to be imported separately, please use the [Robot Vacuum Map Component](https://developer.tuya.com/material/library_oHEKLjj0/component?code=RobotMap) directly.
|
package/dist-docs/404.html
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
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.D8xBQf4O.js"></script>
|
|
13
13
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
14
|
<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>
|
|
15
15
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="app"></div>
|
|
19
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"CUkMfTh6\",\"guide_concepts.md\":\"GEw3xVjc\",\"guide_getting-started.md\":\"
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"CUkMfTh6\",\"guide_concepts.md\":\"GEw3xVjc\",\"guide_getting-started.md\":\"cP-vLJIe\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"-S6uhkXO\",\"reference_config.md\":\"DMdXIa91\",\"reference_data.md\":\"B8JfrRhl\",\"reference_methods.md\":\"Cw2UFl8i\",\"reference_runtime.md\":\"UJkdf65W\",\"reference_types.md\":\"CteNuaxc\",\"reference_utils.md\":\"DU5CMWXW\"}");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>
|
|
20
20
|
|
|
21
21
|
</body>
|
|
22
22
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as p}from"./chunks/theme.
|
|
1
|
+
import{t as p}from"./chunks/theme.C9MT_4iu.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.DRADY2L-.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
|