2022-11-18 21:27:54 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title></title>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="https://github.com/Autodesk-Forge/learn.forge.viewmodels/raw/master/img/favicon.ico">
|
2022-11-24 21:58:54 +08:00
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css">
|
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/themes/default/style.min.css" />
|
2022-11-18 21:27:54 +08:00
|
|
|
|
<!-- Autodesk Forge Viewer files -->
|
|
|
|
|
<link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/style.min.css" type="text/css">
|
|
|
|
|
|
|
|
|
|
|
2022-11-24 00:20:37 +08:00
|
|
|
|
<div id="MyControls" class="adsk control">
|
|
|
|
|
<p style="text-align: center; font-weight: bold;">Robot Controls</p>
|
|
|
|
|
<p id="id_printer">Selected_ID: </p>
|
|
|
|
|
<p id="all_id">All_ID: </p>
|
|
|
|
|
<button id="1F1oor" onclick="move1Floor()">1 Floor</button>
|
|
|
|
|
<button id="2F1oor" onclick="move2Floor()">2 Floor</button>
|
|
|
|
|
<button id="3F1oor" onclick="move3Floor()">3 Floor</button>
|
2022-12-07 00:41:55 +08:00
|
|
|
|
|
|
|
|
|
<button id="1F1oor" onclick="move4Floor()">4 Floor</button>
|
|
|
|
|
<button id="2F1oor" onclick="move5Floor()">5 Floor</button>
|
|
|
|
|
<button id="3F1oor" onclick="move6Floor()">6 Floor</button>
|
|
|
|
|
<button id="1F1oor" onclick="move7Floor()">7 Floor</button>
|
|
|
|
|
<button id="2F1oor" onclick="move8Floor()">8 Floor</button>
|
|
|
|
|
<button id="3F1oor" onclick="move9Floor()">9 Floor</button>
|
|
|
|
|
<button id="1F1oor" onclick="move10Floor()">10 Floor</button>
|
|
|
|
|
<button id="2F1oor" onclick="move11Floor()">11 Floor</button>
|
|
|
|
|
<button id="3F1oor" onclick="move12Floor()">12 Floor</button>
|
|
|
|
|
<button id="3F1oor" onclick="moveB1Floor()">B1 Floor</button>
|
2022-11-28 23:16:14 +08:00
|
|
|
|
<input id="lightBar" type="range" min="0" max="100" step="5" onchange="changeLightPower()">亮度
|
2022-11-24 00:20:37 +08:00
|
|
|
|
<!-- <input type="range">Main Axis</input> -->
|
|
|
|
|
</div>
|
|
|
|
|
|
2022-11-18 21:27:54 +08:00
|
|
|
|
<div>
|
|
|
|
|
<div id="forgeViewer"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--Base JS-->
|
|
|
|
|
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
|
2022-11-24 21:58:54 +08:00
|
|
|
|
<!--<script src="lib//vendors.bundle.js"></script>
|
|
|
|
|
<script src="lib//app.bundle.js"></script>-->
|
2022-11-18 21:27:54 +08:00
|
|
|
|
<!-- JQuery Validate -->
|
2022-11-24 21:58:54 +08:00
|
|
|
|
<!--<script src="lib/jquery-validation/dist/jquery.validate.js"></script>
|
2022-11-18 21:27:54 +08:00
|
|
|
|
<script src="lib/jquery-validation/dist/additional-methods.min.js"></script>
|
|
|
|
|
<script src="lib/jquery-validation/dist/localization/messages_zh_TW.js"></script>
|
|
|
|
|
<script src="lib/notifications/sweetalert2/sweetalert2.bundle.js"></script>
|
|
|
|
|
<script src="lib/notifications/toastr/toastr.js"></script>
|
2022-11-24 21:58:54 +08:00
|
|
|
|
<script src="js/toast.js"></script>-->
|
2022-11-18 21:27:54 +08:00
|
|
|
|
<script src="js/init.js"></script>
|
|
|
|
|
|
|
|
|
|
<!-- Common packages: jQuery, Bootstrap, jsTree -->
|
|
|
|
|
<!--<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>-->
|
2022-11-24 21:58:54 +08:00
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/jstree.min.js"></script>
|
2022-11-18 21:27:54 +08:00
|
|
|
|
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/viewer3D.js"></script>
|
|
|
|
|
<!-- <script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.16/viewer3D.js"></script> -->
|
2022-12-07 00:41:55 +08:00
|
|
|
|
<!--<script src="js/forge/forgemodel.js"></script>-->
|
|
|
|
|
<script src="js/forge/modeltest.js"></script>
|
2022-11-18 21:27:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU2JUIwJUI4JUU2JTk4JUE1JUU2JUEzJUE3JUUzJTgwJTkxJUUzJTgwJTkwTUVQJUUzJTgwJTkxVjMubndk');
|
2022-11-24 00:20:37 +08:00
|
|
|
|
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwTUVQJUUzJTgwJTkxLm53Yw');//[TEST].nwd
|
2022-11-28 23:16:14 +08:00
|
|
|
|
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6LW1vZGVsX3Rlc3QxMTIxLyVFMyU4MCU5MFRFU1QlRTMlODAlOTEubndk');
|
2022-11-24 00:20:37 +08:00
|
|
|
|
|
2022-12-07 00:41:55 +08:00
|
|
|
|
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwTUVQJUUzJTgwJTkxLm53Yw==');
|
2022-11-28 23:16:14 +08:00
|
|
|
|
//
|
|
|
|
|
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwVEVTVCVFMyU4MCU5MS5ud2Q=');
|
2022-12-07 00:41:55 +08:00
|
|
|
|
//launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA');
|
|
|
|
|
launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA');
|
|
|
|
|
//dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA
|
2022-11-18 21:27:54 +08:00
|
|
|
|
});
|
2022-11-24 00:20:37 +08:00
|
|
|
|
function move1Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(0);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move2Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(1);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move3Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(2);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
2022-11-28 23:16:14 +08:00
|
|
|
|
|
2022-12-07 00:41:55 +08:00
|
|
|
|
function move4Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(3);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move5Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(4);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move6Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(5);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move7Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(6);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move8Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(7);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move9Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(8);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move10Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(9);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move11Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(10);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function move12Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(11);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
function moveB1Floor() {
|
|
|
|
|
setElevatorSpeed(0.2);
|
|
|
|
|
setElevatorFloor(-1);
|
|
|
|
|
requestAnimationFrame(movElevator);
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-28 23:16:14 +08:00
|
|
|
|
function changeLightPower() {
|
|
|
|
|
var value = document.getElementById('lightBar').value;
|
|
|
|
|
console.log("power: " + value);
|
|
|
|
|
setLightPower(value);
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-18 21:27:54 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|