I am trying to add an extension by using the reference [https://github.com/autodesk-platform-services/aps-extensions]
I was implemeting CameraRotation in simple viewer. I followed all the basis instructions as per [https://aps.autodesk.com/blog/viewer-extensions-tips-and-tricks-or-treats]
function loadModel(viewer, urn) {
function onDocumentLoadSuccess(doc) {
viewer.loadDocumentNode(doc, doc.getRoot().getDefaultGeometry());
viewer.loadExtension(‘CameraRotation’);
}
function onDocumentLoadFailure(viewerErrorCode, message) {
console.error(‘onDocumentLoadFailure() – errorCode:’ + viewerErrorCode);
console.error(message);
}
window.location.hash = urn;
Autodesk.Viewing.Document.load(‘urn:’ + urn, onDocumentLoadSuccess, onDocumentLoadFailure);
}
But I am getting an error as below
TurnTableExtension.js:35 Uncaught TypeError: Cannot read properties of undefined (reading ‘getInstanceTree’)
at TurnTableExtension.load (TurnTableExtension.js:35:31)
at extension. [as load] (ExtensionEventsMixin.js:31:27)
at GuiViewer3D.loadExtensionLocal (ExtensionManager.js:401:34)
at GuiViewer3D.loadExtension (ExtensionManager.js:260:19)
at onDocumentLoadSuccess (main.js:110:15)
at Function.onSuccess (Document.js:197:26)
at onSuccessWrapped (Xhr.js:761:32)
at XMLHttpRequest.onLoad (Xhr.js:1003:24)
Please suggest. Thanks in advance.