function preload() {
  modules = [];
  for (var i = 0; i < moduleType.length; i++) {
    modules[moduleType[i]] = [];
    for (var j = 0; j < 16; j++) {
      modules[moduleType[i]].push(loadImage('data/' + moduleType[i] + '_' + nf(j, 2) + '.svg'));
    }
  }
}
draw tool. draws a specific module according to
its east, south, west and north neighbours.
with switchable tileset

MOUSE
drag left           : draw new module
drag right          : delete a module

KEYS
1-8                 : switch tileset
y, x, c, v, b       : switch colors
del, backspace      : clear screen
r                   : random tiles
s                   : save png
g                   : toogle. show grid
d                   : toogle. show module values