Skip to content

Commit a8e05ce

Browse files
committed
Add Phaser.GameObjects.Shape#setDisplaySize()
1 parent a7308da commit a8e05ce

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/gameobjects/shape/Shape.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,27 @@ var Shape = new Class({
327327
return this;
328328
},
329329

330+
/**
331+
* Sets the display size of this Shape.
332+
*
333+
* Calling this will adjust the scale.
334+
*
335+
* @method Phaser.GameObjects.Shape#setDisplaySize
336+
* @since 3.53.0
337+
*
338+
* @param {number} width - The display width of this Shape.
339+
* @param {number} height - The display height of this Shape.
340+
*
341+
* @return {this} This Shape instance.
342+
*/
343+
setDisplaySize: function (width, height)
344+
{
345+
this.displayWidth = width;
346+
this.displayHeight = height;
347+
348+
return this;
349+
},
350+
330351
/**
331352
* Internal destroy handler, called as part of the destroy process.
332353
*

0 commit comments

Comments
 (0)