Skip to content

Commit 752fccb

Browse files
committed
Added w/h, comment out draw for now
1 parent 741f5f4 commit 752fccb

1 file changed

Lines changed: 31 additions & 9 deletions

File tree

src/renderer/webgl/RenderTarget.js

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,26 @@ var RenderTarget = new Class({
7272
*/
7373
this.texture = null;
7474

75+
/**
76+
* The width of the texture.
77+
*
78+
* @name Phaser.Renderer.WebGL.RenderTarget#width
79+
* @type {number}
80+
* @readonly
81+
* @since 3.50.0
82+
*/
83+
this.width = 0;
84+
85+
/**
86+
* The height of the texture.
87+
*
88+
* @name Phaser.Renderer.WebGL.RenderTarget#height
89+
* @type {number}
90+
* @readonly
91+
* @since 3.50.0
92+
*/
93+
this.height = 0;
94+
7595
/**
7696
* A value between 0 and 1. Controls the size of this Render Target in relation to the Renderer.
7797
*
@@ -136,9 +156,11 @@ var RenderTarget = new Class({
136156
height *= this.scale;
137157

138158
this.texture = renderer.createTextureFromSource(null, width, height, this.minFilter);
139-
140159
this.framebuffer = renderer.createFramebuffer(width, height, this.texture, false);
141160

161+
this.width = width;
162+
this.height = height;
163+
142164
return this;
143165
},
144166

@@ -181,14 +203,14 @@ var RenderTarget = new Class({
181203
*
182204
* @name Phaser.Renderer.WebGL.RenderTarget#draw
183205
* @since 3.50.0
184-
*/
185-
draw: function ()
186-
{
187-
var width = this.renderer.width;
188-
var height = this.renderer.height;
189-
190-
this.pipeline.drawFillRect(0, 0, width, height, 0, 1, this.texture);
191-
},
206+
draw: function ()
207+
{
208+
var width = this.renderer.width;
209+
var height = this.renderer.height;
210+
211+
this.pipeline.drawFillRect(0, 0, width, height, 0, 1, this.texture);
212+
},
213+
*/
192214

193215
/**
194216
* Removes all external references from this class and deletes the

0 commit comments

Comments
 (0)