@ray-js/robot-map-sdk 0.0.3-beta-10 → 0.0.3-beta-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application/Interaction.js +1 -1
- package/dist/application/MapApplication.js +1 -1
- package/dist/assets/floorType1.png.js +1 -0
- package/dist/assets/floorType2.png.js +1 -0
- package/dist/components/Map/Free.js +1 -1
- package/dist/components/Map/Obstacle.js +1 -1
- package/dist/components/Path/index.js +1 -1
- package/dist/components/RoomFloorType/index.js +1 -1
- package/dist/components/RoomInfo/RoomProperty.js +1 -1
- package/dist/components/RoomInfo/RoomSelectionIndicator.js +1 -1
- package/dist/components/RoomInfo/index.js +1 -1
- package/dist/constant/config.js +1 -1
- package/dist/index.rjs.js +1 -1
- package/dist/managers/RoomManager.js +1 -1
- package/dist-app/assets/{index-zPCor596.js → index-BZrSlwsu.js} +1 -1
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.CWzbsird.js → app.DQX-KXAE.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.DFhlA73m.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.C1dzEhbA.js → VPLocalSearchBox.DMOz5xxA.js} +1 -1
- package/dist-docs/assets/chunks/{theme.Dh1LIHtb.js → theme.BNIQfRMl.js} +2 -2
- package/dist-docs/assets/{guide_advanced-usage.md.ChUH15VJ.js → guide_advanced-usage.md.DUawnQ9c.js} +6 -6
- package/dist-docs/assets/{guide_advanced-usage.md.ChUH15VJ.lean.js → guide_advanced-usage.md.DUawnQ9c.lean.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.9TA9iDUN.js → guide_getting-started.md.pCYbkwjy.js} +1 -1
- package/dist-docs/guide/advanced-usage.html +9 -9
- 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.DRAHC9Wk.js +0 -1
- /package/dist/assets/{floorType.png.js → floorType3.png.js} +0 -0
- /package/dist-docs/assets/{guide_getting-started.md.9TA9iDUN.lean.js → guide_getting-started.md.pCYbkwjy.lean.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Container as o}from"pixi.js";import{LAYER_ROOM_INFO as t}from"../application/AppContainer.js";import{RoomInfo as i}from"../components/RoomInfo/index.js";import{RoomFloorType as e}from"../components/RoomFloorType/index.js";import{subscribeKey as r}from"valtio/vanilla/utils";import{Logger as s}from"../utils/logger.js";import{useAppService as n}from"../application/AppService.js";class a{unsubscribeFns=[];roomInfoContainer=new o;roomInfoMap=new Map;roomDisplayMap=new Map;roomFloorType=new e;constructor(){const o=n();o.appContainer.addToLayer(t,this.roomInfoContainer);const i=r(o.runtime,"showRoomFloorType",o=>{s.log(`[runtime] showRoomFloorType: ${o}`),o?this.updateFloorTypes():this.roomFloorType.clearFloorTypes()}),e=r(o.runtime,"showRoomProperty",o=>{s.log(`[runtime] showRoomProperty: ${o}`),this.updateAllRoomPropertyVisibility()}),a=r(o.runtime,"showRoomOrder",o=>{s.log(`[runtime] showRoomOrder: ${o}`),this.updateAllRoomPropertyVisibility()}),m=r(o.runtime,"roomPropertyFoldIds",o=>{s.log(`[runtime] roomPropertyFoldIds: ${o}`),this.updateAllRoomPropertyVisibility()}),l=r(o.runtime,"showRoomName",o=>{s.log(`[runtime] showRoomName: ${o}`),this.updateAllRoomNameVisibility(o)}),p=r(o.runtime,"enableRoomSelection",o=>{s.log(`[runtime] enableRoomSelection: ${o}`),this.updateAllRoomPropertyVisibility(),this.updateAllRoomSelectionIndicatorVisibility()}),c=r(o.runtime,"selectRoomIds",o=>{s.log(`[runtime] selectRoomIds: ${o}`),this.updateAllRoomSelectionIndicatorVisibility()}),h=r(o.runtime,"roomSelectionMode",o=>{s.log(`[runtime] roomSelectionMode: ${o}`),this.updateAllRoomPropertyVisibility(),this.updateAllRoomSelectionIndicatorVisibility()});this.unsubscribeFns.push(i,e,a,m,l,p,c,h)}drawRoomProperty(o){const t=n();return this.roomDisplayMap.clear(),o.forEach((o,i)=>{const e=t.mapManager.getRoomById(o.id),r={...o,centerPoint:e?.centerPoint||null,index:i};this.roomDisplayMap.set(o.id,r)}),this.updateRoomInfoDisplay(),this.updateFloorTypes(),!0}updateRoomInfoDisplay(){if(0===this.roomDisplayMap.size)return;const o=Array.from(this.roomDisplayMap.values()).filter(o=>null!==o.centerPoint);this.clearRoomInfos(),o.forEach(o=>{this.createRoomInfo(o)})}createRoomInfo(o){const t=new i(o);this.roomInfoContainer.addChild(t),this.roomInfoMap.set(o.id,t)}updateRoomName(o,t){const i=this.roomInfoMap.get(o);i&&i.updateName(t)}updateRoomPosition(o,t){const i=this.roomDisplayMap.get(o);i&&(i.centerPoint=t);const e=this.roomInfoMap.get(o);e&&e.updatePosition(t)}clearRoomInfos(){this.roomInfoMap.forEach(o=>{o.destroy()}),this.roomInfoMap.clear(),this.roomInfoContainer.removeChildren()}getRoomPropertyById(o){return this.roomDisplayMap.get(o)}refresh(){const o=n();this.roomFloorType.clearFloorTypes(),this.roomDisplayMap.forEach((t,i)=>{const e=o.mapManager.getRoomById(i),r=e?.centerPoint||null;if(t.centerPoint!==r){t.centerPoint=r;const o=this.roomInfoMap.get(i);o&&r&&o.updatePosition(r)}}),this.updateRoomInfoDisplay(),this.updateFloorTypes()}updateAllRoomPropertyVisibility(){this.roomInfoMap.forEach(o=>{o.updateRoomPropertyVisibility()})}updateAllRoomNameVisibility(o){this.roomInfoMap.forEach(t=>{t.updateRoomNameVisibility(o)})}updateAllRoomSelectionIndicatorVisibility(){this.roomInfoMap.forEach(o=>{o.updateRoomSelectionIndicatorVisibility()})}async updateFloorTypes(){const o=n(),t=o.mapManager.roomFill.getRoomGraphicsMap();t.size>0&&(await this.roomFloorType.createFloorTypes(t),o.getApp().renderOnceNextFrame())}destroy(){this.clearRoomInfos(),this.roomInfoContainer.destroy(),this.roomFloorType.destroy(),this.unsubscribeFns.forEach(o=>o()),this.unsubscribeFns=[]}}export{a as RoomManager};
|
|
1
|
+
import{Container as o}from"pixi.js";import{LAYER_ROOM_INFO as t}from"../application/AppContainer.js";import{RoomInfo as i}from"../components/RoomInfo/index.js";import{RoomFloorType as e}from"../components/RoomFloorType/index.js";import{subscribeKey as r}from"valtio/vanilla/utils";import{Logger as s}from"../utils/logger.js";import{useAppService as n}from"../application/AppService.js";class a{unsubscribeFns=[];roomInfoContainer=new o;roomInfoMap=new Map;roomDisplayMap=new Map;roomFloorType=new e;constructor(){const o=n();o.appContainer.addToLayer(t,this.roomInfoContainer);const i=r(o.runtime,"showRoomFloorType",o=>{s.log(`[runtime] showRoomFloorType: ${o}`),o?this.updateFloorTypes():this.roomFloorType.clearFloorTypes()}),e=r(o.runtime,"showRoomProperty",o=>{s.log(`[runtime] showRoomProperty: ${o}`),this.updateAllRoomPropertyVisibility()}),a=r(o.runtime,"showRoomOrder",o=>{s.log(`[runtime] showRoomOrder: ${o}`),this.updateAllRoomPropertyVisibility()}),m=r(o.runtime,"roomPropertyFoldIds",o=>{s.log(`[runtime] roomPropertyFoldIds: ${o}`),this.updateAllRoomPropertyVisibility()}),l=r(o.runtime,"showRoomName",o=>{s.log(`[runtime] showRoomName: ${o}`),this.updateAllRoomNameVisibility(o)}),p=r(o.runtime,"enableRoomSelection",o=>{s.log(`[runtime] enableRoomSelection: ${o}`),this.updateAllRoomPropertyVisibility(),this.updateAllRoomSelectionIndicatorVisibility()}),c=r(o.runtime,"selectRoomIds",o=>{s.log(`[runtime] selectRoomIds: ${o}`),this.updateAllRoomPropertyVisibility(),this.updateAllRoomSelectionIndicatorVisibility()}),h=r(o.runtime,"roomSelectionMode",o=>{s.log(`[runtime] roomSelectionMode: ${o}`),this.updateAllRoomPropertyVisibility(),this.updateAllRoomSelectionIndicatorVisibility()});this.unsubscribeFns.push(i,e,a,m,l,p,c,h)}drawRoomProperty(o){const t=n();return this.roomDisplayMap.clear(),o.forEach((o,i)=>{const e=t.mapManager.getRoomById(o.id),r={...o,centerPoint:e?.centerPoint||null,index:i};this.roomDisplayMap.set(o.id,r)}),this.updateRoomInfoDisplay(),this.updateFloorTypes(),!0}updateRoomInfoDisplay(){if(0===this.roomDisplayMap.size)return;const o=Array.from(this.roomDisplayMap.values()).filter(o=>null!==o.centerPoint);this.clearRoomInfos(),o.forEach(o=>{this.createRoomInfo(o)})}createRoomInfo(o){const t=new i(o);this.roomInfoContainer.addChild(t),this.roomInfoMap.set(o.id,t)}updateRoomName(o,t){const i=this.roomInfoMap.get(o);i&&i.updateName(t)}updateRoomPosition(o,t){const i=this.roomDisplayMap.get(o);i&&(i.centerPoint=t);const e=this.roomInfoMap.get(o);e&&e.updatePosition(t)}clearRoomInfos(){this.roomInfoMap.forEach(o=>{o.destroy()}),this.roomInfoMap.clear(),this.roomInfoContainer.removeChildren()}getRoomPropertyById(o){return this.roomDisplayMap.get(o)}refresh(){const o=n();this.roomFloorType.clearFloorTypes(),this.roomDisplayMap.forEach((t,i)=>{const e=o.mapManager.getRoomById(i),r=e?.centerPoint||null;if(t.centerPoint!==r){t.centerPoint=r;const o=this.roomInfoMap.get(i);o&&r&&o.updatePosition(r)}}),this.updateRoomInfoDisplay(),this.updateFloorTypes()}updateAllRoomPropertyVisibility(){this.roomInfoMap.forEach(o=>{o.updateRoomPropertyVisibility()})}updateAllRoomNameVisibility(o){this.roomInfoMap.forEach(t=>{t.updateRoomNameVisibility(o)})}updateAllRoomSelectionIndicatorVisibility(){this.roomInfoMap.forEach(o=>{o.updateRoomSelectionIndicatorVisibility()})}async updateFloorTypes(){const o=n(),t=o.mapManager.roomFill.getRoomGraphicsMap();t.size>0&&(await this.roomFloorType.createFloorTypes(t),o.getApp().renderOnceNextFrame())}destroy(){this.clearRoomInfos(),this.roomInfoContainer.destroy(),this.roomFloorType.destroy(),this.unsubscribeFns.forEach(o=>o()),this.unsubscribeFns=[]}}export{a as RoomManager};
|