Let's also declare those as properties of the object in order to not change the shape at runtime. Also maybe you want a position: {x: x, y: y} object instead ?