Loads the model structure file located at cube.ms.json and prints the text content.
The component can be used in combination with other Archilogic components such as <base3d-viewer>.
This demo renders a model structure file in a <base3d-viewer>:
The component can be used with data binding libraries, for instance Polymer
The sample below responds to selecting a model from the dropdown and displaying it in an <base3d-viewer>.
As the component uses vanilla DOM features such as events, attributes and properties, you can use it like any HTML element.
The following example responds to a change in the dropdown and responds to load and error events by displaying the model structure as text or the error message, if loading failed.
| Property name | Type | Description |
|---|---|---|
src |
String | Specifies the URL to load the model structure data from. This will immediately fetch the data from the given URL when the property is set or changed. |
modelStructure |
Object | read only. This property contains the parsed model structure as an object or undefined |