Pixeljs

A simple and flexible HTML5 and JavaScript powered game engine.

View Project on GitHub Download Pixel.js (v0.9b)

Layer.drawFromCanvas Method

Draw an image from a HTML5 canvas to the layer.

Parameters

Name Description
canvas The HTML5 canvas from which 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.

Supported Platforms

Google Chrome, Mozilla FireFox, Internet Explorer 9+, Opera, Safari.