By Shiya Luo
As an experiment, Nop Jiarathanakul, graphics engineer at Autodesk, has built customizable toolbars for the View and Data API. Polymer is a library from Google built on top of web components, which encapsulate code and let you call them with custom HTML elements.
Previously, developers had to struggle with either calling the Viewer3D
function in JavaScript and have to write their own UI components and functions. The other choice was to call the “private” function GuiViewer3D
, which is essentially the Autodesk 360 toolbar. The built in toolbar is not customizable, and can sometimes be broken by CSS on the page. Although the GuiViewer3D
function is convenient, developers will have to take whatever the Autodesk 360 team decides to do with the toolbar.
This is an effort to offer up a library for developers who wants to customize their toolbars without having to do all the heavy lifting. Instead of putting a <div>
element on the page and let JavaScript populate the area, you can simply include the viewer using this single line of code:
<lmv-viewer url=“https://lmv.rocks/data/engineraw/0.svf”></lmv-viewer>
The goal of this toolbar is to let developers be able to implement the View and Data API and easily customize the toolbar without writing a single line of javascript.
A demo of this toolbar can be found at http://lmv.rocks/
The source code is on GitHub.
Comments
You can follow this conversation by subscribing to the comment feed for this post.