A simple and flexible HTML5 and JavaScript powered game engine.
View Project on GitHub Download Pixel.js (v0.9b)
Fades the entity to a new opacity level.
Name | Description |
---|---|
opacity | The new opacity to apply to the entity. |
duration | Optional: the time in milliseconds that it should take for the entity to reach its new opacity level; or 0 / undefined to change it immediately. |
callback | Optional: the function to be called when the entity has finished changing opacity. |
Google Chrome, Mozilla FireFox, Internet Explorer 9+, Opera, Safari.