##Description
A collection of various JavaScript extensions for the viewer, showing off what is doable with client-side JavaScript APIs.
##Dependencies
These sample extensions need to be loaded with viewer client JavaScript API.
##Setup/Usage Instructions
There are two ways to load an extension with viewer API:
-
Load extensions when viewer is initialized:
var viewerElement = document.getElementById('viewer'); viewer = new Autodesk.Viewing.Private.GuiViewer3D(viewerElement, { extensions: ['BasicExtension'] }); Autodesk.Viewing.Initializer(options, function () { viewer.start(); loadDocument(viewer, options.document); });
Please refer to this sample for detail.
-
Load extensions danamically on demand:
//load extension for SEO viewer.loadExtension('Autodesk.ADN.Viewing.Extension.SEO');
Please refer to this sample for detail.
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
##Written by
Written by Philippe Leefsma