Morphin line.js to make a rectangle.js object and methdos