-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated to use conversion service versioning
- Loading branch information
1 parent
a8ec837
commit 3134470
Showing
13 changed files
with
78 additions
and
16,157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
const loadScripts = () => { | ||
// Load common scripts and Communicator Scripts. | ||
const HWP_VERSION = "latest"; | ||
async function loadDynamicScript() { | ||
var result = await fetchVersionNumber(); | ||
var versionNumer = result['hcVersion'] | ||
var url = `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}/hoops_web_viewer.js` | ||
|
||
// URL of files to load. | ||
const files = [ | ||
`https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@${HWP_VERSION}/hoops_web_viewer.js`, | ||
"/javascripts/communicator_scripts/web_viewer_ui.js?v=latest", | ||
"/javascripts/communicator_scripts/communicator_server_integration.js?v=latest", | ||
"/javascripts/communicator_scripts/sample.js?v=latest", | ||
]; | ||
return new Promise((resolve, reject) => { | ||
$.getScript(url, async function () { | ||
console.log('done') | ||
resolve(); | ||
}); | ||
}); | ||
} | ||
|
||
files.forEach((url) => { | ||
console.log("loading files."); | ||
jQuery.ajax({ | ||
url: url, | ||
dataType: "script", | ||
success: () => { | ||
console.log("loaded!"); | ||
}, | ||
async: true, | ||
}); | ||
async function loadIndividualScript(url) { | ||
return new Promise((resolve, reject) => { | ||
$.getScript(url, async function () { | ||
console.log('done') | ||
resolve(); | ||
}); | ||
}); | ||
}; | ||
} | ||
|
||
loadScripts(); |
Oops, something went wrong.