Tutorial: Making interactive CPMs in the browser with Artistoo

1. HTML page and the console

To build an interactive simulation with Artistoo, you need some boilerplate (HTML) code. Luckily, you can typically just copy-paste this from other simulations, but it is good to have a look at the structure of the page.

Exercise
Open 1-boilerplate.html in both the browser and a text editor. In the text editor, have a look at the code and where the simulation will come. In the browser, see if you can find the message in the console.

(In Chrome: right click > "inspect" > choose tab "console").

Note that the function initialize() is called when the page is loaded, through the onload attribute in the HTML <body> tag. This function could in principle be called anything, but here we will always call it ``initialize''.

Once you are ready, click "Next" to make your first CPM.