Spectacles Embed Example 4 --- Layers

In this example we'll load a single model in a dedicated div, Provide UI to turn layers in the model on/off.

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.