Write me a code which implement a object Sprite editor in javascript