Object Oriented Javascript and classes with shapes