This is a slightly more robust issue to deal with, but I've got all the infrastructure built in.
Basically it needs to have a UI somewhere out of the way but also easily available, and then in the code, a layer can be added by calling canvas.push(new Layer(CANVAS_WIDTH, CANVAS_HEIGHT)) somewhere in index.js. Then the active layer can be switched by changing the global variable ACTIVE_LAYER to the appropriate index in the canvas.layers array.
This is a slightly more robust issue to deal with, but I've got all the infrastructure built in. Basically it needs to have a UI somewhere out of the way but also easily available, and then in the code, a layer can be added by calling
canvas.push(new Layer(CANVAS_WIDTH, CANVAS_HEIGHT))
somewhere inindex.js
. Then the active layer can be switched by changing the global variableACTIVE_LAYER
to the appropriate index in thecanvas.layers
array.