Updated renderers to accept a view
The reason for this commit is to allow support for previously created
canvases to be specified as views.

The major usecase here is Ejecta, who's primary screen canvas is always
obtained through document.getElementById('canvas'); Thus, creating a
canvas using document.createElement('canvas') would only make an
offscreen canvas which wouldn't be visible.

This commit maintains backwards compatibility since specifying a canvas
is completely optional, and if none is specified, it falls back to
previous behaviour.
1 parent f78ae48 commit a82a50d8320ac227b0d7954ebafe7f8ac923aa22
@Amadeus Demarzi Amadeus Demarzi authored on 16 Mar 2013
Showing 3 changed files
View
src/pixi/renderers/CanvasRenderer.js
View
src/pixi/renderers/WebGLRenderer.js
View
src/pixi/utils/Detector.js