Spectacles Embed Example 3 --- Scene and Lighting

In this example we'll load a single model in a dedicated div, and provide a user interface to control the Three.js scene's variables including background color, stats visualization, ambient light color, point lights color, and an early implementation of shadows (needs work!).

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. And once it's in there, it's easy to add or remove chunks of application functionality. Check out the innermost callback function in the APP_INIT.js file to see how this works.