Skip to content

Commit

Permalink
made version number global
Browse files Browse the repository at this point in the history
  • Loading branch information
techsoftrick committed Mar 20, 2024
1 parent 4c62233 commit fe0b867
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion javascripts/common/load_scripts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var versionNumer
async function loadDynamicScript() {
var result = await fetchVersionNumber();
var versionNumer = result['hcVersion']
versionNumer = result['hcVersion']
var url = `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}/hoops_web_viewer.js`
// var url = `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}/hoops-web-viewer.iife.js`

return new Promise((resolve, reject) => {
$.getScript(url, async function () {
Expand Down
3 changes: 2 additions & 1 deletion javascripts/conversionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ async function startViewer(modelName, uid) {
containerId: "viewerContainer",
endpointUri: sessioninfo.endpointUri,
model: modelName,
enginePath: "https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer",
enginePath: `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}`,
// enginePath: `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}`,
rendererType: 0
});

Expand Down

0 comments on commit fe0b867

Please sign in to comment.