Tangram-Generator in Javascript