Skip to content

Commit 1688a59

Browse files
author
Nathan Bolton
committed
Update to renderer setup
1 parent daae418 commit 1688a59

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

js/rpg_core/Graphics.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,19 +1103,21 @@ Graphics._paintUpperCanvas = function() {
11031103
*/
11041104
Graphics._createRenderer = function() {
11051105
PIXI.dontSayHello = true;
1106-
var width = this._width;
1107-
var height = this._height;
1108-
var options = { view: this._canvas };
1106+
var options = {
1107+
view: this._canvas,
1108+
width: this._width,
1109+
height: this._height,
1110+
};
11091111
try {
11101112
switch (this._rendererType) {
11111113
case 'canvas':
1112-
this._renderer = new PIXI.CanvasRenderer(width, height, options);
1114+
this._renderer = new PIXI.CanvasRenderer(options);
11131115
break;
11141116
case 'webgl':
1115-
this._renderer = new PIXI.WebGLRenderer(width, height, options);
1117+
this._renderer = new PIXI.Renderer(options);
11161118
break;
11171119
default:
1118-
this._renderer = PIXI.autoDetectRenderer(width, height, options);
1120+
this._renderer = PIXI.autoDetectRenderer(options);
11191121
break;
11201122
}
11211123

0 commit comments

Comments
 (0)