diff --git a/Frontend/_sysElevator.html b/Frontend/_sysElevator.html
index c45699f..18b42c0 100644
--- a/Frontend/_sysElevator.html
+++ b/Frontend/_sysElevator.html
@@ -898,6 +898,9 @@
var subSeviceData = []; //每個設備訂閱點位值
var floList = []; //每個樓層
var elevObj = null; //左側 2D 電梯物件
+ var viewer3DNodeIds = [223, 228, 233];
+ var elev3DBind = {};
+ var elev3DOption = {};
var subOrdPath = {
"building_tag": pageAct.buiTag,
"system_tag": pageAct.sysMainTag,
@@ -1069,9 +1072,15 @@
elevObj.curElevFloor[matchDevice.device_number] = subData["CP"];
elevObj.redraw();
} else {
-
elevObj.setElevFloor(matchDevice.device_number, subData["CP"]);
}
+
+ // 左側 3D 電梯 nodeID 與 device_number match
+ if (Object.keys(elev3DBind).indexOf(matchDevice.device_number) == -1) {
+ elev3DBind[matchDevice.device_number] = viewer3DNodeIds[elev3DBind.length];
+ }
+
+
elevObj.setEleMovStatus(matchDevice.device_number, subData["RD"] == "UP" ? 1 : subData["RD"] == "DOWN" ? 2 : 0);
//現在樓層
if (subData["CP"]) {
@@ -2337,11 +2346,27 @@
//載入3D模型
function load3DModel() {
+ let option = {
+ nodes: [223, 228, 233],
+ element: "#forgeViewer",
+ floorHeight: [
+ { floor: 1, height: 15 },
+ { floor: 2, height: 24.5 },
+ { floor: 3, height: 34 },
+ ]
+ }
+
+
+ launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA==', option, () => {
+ console.log($("#forgeViewer"))
+ let elevator = $("#forgeViewer")[0]._elevator3D[0];
+ elevator.obj.setElevatorFloor(3)
+ elevator.obj.movElevator()
+ //setElevatorSpeed(0.2)
+ //setElevatorFloor(2)
+ //requestAnimationFrame(movElevator);
+ });
- launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6LW1vZGVsX3Rlc3QxMTIxLyVFMyU4MCU5MFRFU1QlRTMlODAlOTEubndk');
- setElevatorSpeed(0.2)
- setElevatorFloor(3)
- movElevator()
}
function show3D() {
if (isFirstLoad3D) {
diff --git a/Frontend/index.html b/Frontend/index.html
index ec96779..a0d772e 100644
--- a/Frontend/index.html
+++ b/Frontend/index.html
@@ -2552,6 +2552,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li