function preload() {
  // preload svg for line module
  elements = [];
  elements[0] = loadImage('data/01.svg');
  elements[1] = loadImage('data/02.svg');
  elements[2] = loadImage('data/03.svg');
  elements[3] = loadImage('data/04.svg');
  elements[4] = loadImage('data/05.svg');
  elements[5] = loadImage('data/06.svg');
  elements[6] = loadImage('data/07.svg');
  elements[7] = loadImage('data/08.svg');
  elements[8] = loadImage('data/09.svg');
}
draw tool. shows how to draw with dynamic elements.

MOUSE
drag                : draw

KEYS
1-9                 : switch module
del, backspace      : clear screen
arrow up            : module size +
arrow down          : module size -
arrow left          : step size -
arrow right         : step size +
s                   : save png