Skip to content

Commit

Permalink
updated to use dynamic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
techsoftrick committed Jul 19, 2024
1 parent 85fba02 commit bb562d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<link rel="stylesheet" href="stylesheets/robotics.css" type="text/css" />

<script type="module">
caasClient.init('https://caas.techsoft3d.com', { accessKey: "651ae3b3b4571588031b0cc3" });
caasClient.init('https://caas.techsoft3d.com', { accessKey: "64e757dbd8ac93cc087cfab7" });

import robotViewer from "./javascripts/robotics.js";

Expand Down
5 changes: 3 additions & 2 deletions javascripts/conversionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ var factory_uids = [
export async function startViewer(model, container) {
var viewer;
let sessioninfo = await caasClient.getStreamingSession();
var result = await fetchVersionNumber();

await caasClient.enableStreamAccess(sessioninfo.sessionid, factory_uids);

viewer = new Communicator.WebViewer({
containerId: container,
endpointUri: sessioninfo.endpointUri,
model: model,
boundingPreviewMode: "none",
enginePath: "https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer",
enginePath: `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${result['hcVersion']}`,
rendererType: 0
});

Expand All @@ -29,7 +31,6 @@ export async function startViewer(model, container) {

async function fetchVersionNumber() {
let data = await caasClient.getHCVersion();
versionNumer = data;
return data
}

0 comments on commit bb562d2

Please sign in to comment.