* Set new dimensions for the rectangle. * @param width - The new width of the rectangle. * @param height - The new height of the rectangle.
(width: number, height: number)
| 34 | * @param height - The new height of the rectangle. |
| 35 | */ |
| 36 | setSize(width: number, height: number) { |
| 37 | this.points[0].set(0, 0); // 0, 0 |
| 38 | this.points[1].set(width, 0); // 1, 0 |
| 39 | this.points[2].set(width, height); // 1, 1 |
| 40 | this.points[3].set(0, height); // 0, 1 |
| 41 | this.recalc(); |
| 42 | this.updateBounds(); |
| 43 | return this; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * The left coordinate of the Rectangle. |
no test coverage detected