Skip to content

Commit 490ca9c

Browse files
committed
Added setSize method
1 parent 640d90c commit 490ca9c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/gameobjects/shape/ellipse/Ellipse.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,25 @@ var Ellipse = new Class({
9494

9595
},
9696

97+
/**
98+
* Sets the size of the ellipse by changing the underlying geometry data, rather than scaling the object.
99+
* This call can be chained.
100+
*
101+
* @method Phaser.GameObjects.Ellipse#setSize
102+
* @since 3.13.0
103+
*
104+
* @param {number} width - The width of the ellipse.
105+
* @param {number} height - The height of the ellipse.
106+
*
107+
* @return {this} This Game Object instance.
108+
*/
109+
setSize: function (width, height)
110+
{
111+
this.data.setSize(width, height);
112+
113+
return this.updateData();
114+
},
115+
97116
/**
98117
* Sets the smoothness of the ellipse. The number of points used when rendering it.
99118
* Increase this value for a smoother ellipse, at the cost of more polygons being rendered.

0 commit comments

Comments
 (0)