3D visualisation

The threed ("3D") component allows in-browser visualization of 3D files.

HTML markup

The visualizer is switched on by adding the class "threed" to a class. It is then controlled by JSON options passed in the data-options attribute.

<div class="threed" data-options="{...}"> <div>

If options are not present, or don't contain a URL, the component will examine the element and its children for the first <a> tag, and if it finds one, generate a <div> to hold a visualisation above the element with class "threed". This provides a simple method to give users a download link, for example.

<p class="threed">
Download <a href="...">your_file_name.stl</a>
</p>

Options

url

URL containing the file to be visualized. Must include the file extention.

Currently only .stl files are supported.