Examples of web controls > build composite objects

The goal is to have composite objects, each defined in a separate file, which can be placed in the scene set by the index.html file.

Click the small rectangle inside each object.

This example uses script elements in the html to append additional script and html to the page with document.write() of template literals before the page is completed with the ending body and html tags. This fixes the number of objects present on the page to those present initially.

The separate example of "add complex objects to scene from palette" uses the alternative of adding template literals to specific elements on the page using innerHTML. That method allows objects to be added and removed by the user.