Merge pull request #348 from rschamp/get-canvas
Add getter for the renderer's canvas
This commit is contained in:
@@ -201,6 +201,13 @@ class RenderWebGL extends EventEmitter {
|
||||
return this._gl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {HTMLCanvasElement} the canvas of the WebGL rendering context associated with this renderer.
|
||||
*/
|
||||
get canvas () {
|
||||
return this._gl && this._gl.canvas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the physical size of the stage in device-independent pixels.
|
||||
* This will be multiplied by the device's pixel ratio on high-DPI displays.
|
||||
|
||||
Reference in New Issue
Block a user