Spectacles Embed Example 5 --- View and Selection

In this example we'll load a single model in a dedicated div, and provide UI to control views in the model (load pre-set views from the json file, zoom extents, zoom selected), as well as element selection and attribute display.

Free and Open Source

Yeah, so as you are probably already aware, Spectacles is a free and open source 3D model viewer that runs in the browser and can render files that were exported from Revit or Grasshopper using the Spectacles exporters for those platforms.

Totally hackable

Not much of a hack in this example, but because the code is open it's totally up to you in terms of customization. Want to pull attributes from a database when an element is selected? Go for it!

Embeddable

As this example shows, it's relatively straightforward to embed a custom viewer in any webpage. Just reference the required javascript and css files in your head tag, block out a div and pass it to our SPECTACLES constructor function along with your json data.