A simple and flexible HTML5 and JavaScript powered game engine.
View Project on GitHub Download Pixel.js (v0.9b)
Draw an image to the layer.
Name | Description |
---|---|
img | The image to draw to the layer. |
x | The x coordinate where to place the image on the layer. |
y | The y coordinate where to place the image on the layer. |
rotation | The angle (in degrees) in which to rotate the image. A value of 0 or undefined will stop the image being rotated at all. |
opacity | The opacity at which to draw the image. A value of 1.0 draws the image at full opacity, a value of 0 would be completely opaque. |
Google Chrome, Mozilla FireFox, Internet Explorer 9+, Opera, Safari.