Merge branch 'master' of https://gitea.mjm-staging.developers-homelab.net/BIMS/BIMS
This commit is contained in:
commit
f5a3e6af2a
@ -7,8 +7,8 @@
|
||||
<body>
|
||||
|
||||
<link rel="shortcut icon" href="https://github.com/Autodesk-Forge/learn.forge.viewmodels/raw/master/img/favicon.ico">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/themes/default/style.min.css" />
|
||||
<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" />
|
||||
<!-- Autodesk Forge Viewer files -->
|
||||
<link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/style.min.css" type="text/css">
|
||||
|
||||
@ -31,24 +31,24 @@
|
||||
|
||||
<!--Base JS-->
|
||||
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
|
||||
<script src="lib//vendors.bundle.js"></script>
|
||||
<script src="lib//app.bundle.js"></script>
|
||||
<!--<script src="lib//vendors.bundle.js"></script>
|
||||
<script src="lib//app.bundle.js"></script>-->
|
||||
<!-- JQuery Validate -->
|
||||
<script src="lib/jquery-validation/dist/jquery.validate.js"></script>
|
||||
<!--<script src="lib/jquery-validation/dist/jquery.validate.js"></script>
|
||||
<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>
|
||||
<script src="js/toast.js"></script>
|
||||
<script src="js/toast.js"></script>-->
|
||||
<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>-->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/jstree.min.js"></script>
|
||||
<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>
|
||||
<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> -->
|
||||
<script src="/js/forge/forgemodel.js"></script>
|
||||
<script src="js/forge/forgemodel.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
|
@ -64,13 +64,13 @@ function launchViewer(urn) {
|
||||
|
||||
|
||||
//test
|
||||
for (let i = 0; i < urns.length; i++) {
|
||||
Autodesk.Viewing.Document.load(urns[i]["urn"], async (doc) => {
|
||||
for (let i = 0; i < urn.length; i++) {
|
||||
Autodesk.Viewing.Document.load(urn[i]["urn"], async (doc) => {
|
||||
let viewables = doc.getRoot().getDefaultGeometry();
|
||||
let model = await viewer.loadDocumentNode(doc, viewables, {
|
||||
preserveView: false,
|
||||
keepCurrentModels: true,
|
||||
placementTransform: (new THREE.Matrix4()).setPosition(urns[i]["xform"]),
|
||||
placementTransform: (new THREE.Matrix4()).setPosition(urn[i]["xform"]),
|
||||
keepCurrentModels: true,
|
||||
globalOffset: {
|
||||
x: 0,
|
||||
@ -262,7 +262,7 @@ function onDocumentLoadFailure(viewerErrorCode) {
|
||||
}
|
||||
|
||||
function getForgeToken(callback) {
|
||||
fetch('http://localhost:3604/api/forge/oauth/token').then(res => {
|
||||
fetch(baseApiUrl + '/api/forge/oauth/token').then(res => {
|
||||
res.json().then(data => {
|
||||
callback(data.dictionary.access_token, data.dictionary.expires_in);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user