JavaScript HTML5 Canvas dymanic object map