A simple and flexible HTML5 and JavaScript powered game engine.
View Project on GitHub Download Pixel.js (v0.9b)
Moves the entity to a new position.
| Name | Description | 
|---|---|
| x | The x coordinate to move the entity to. | 
| y | The y coordinate to move the entity to. | 
| duration | Optional: the time in milliseconds that it should take for the entity to reach its destination; or 0 / undefined to have an instant movement. | 
                            
| callback | Optional: the function to be called when the entity has finished moving to its new position. | 
Google Chrome, Mozilla FireFox, Internet Explorer 9+, Opera, Safari.