Rectangle#Rectangle

new Rectangle(x, y, width, height)

Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters.
If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.

Parameters
Name Type Description
x number

The x coordinate of the top-left corner of the Rectangle.

y number

The y coordinate of the top-left corner of the Rectangle.

width number

The width of the Rectangle. Should always be either zero or a positive value.

height number

The height of the Rectangle. Should always be either zero or a positive value.

Source code: geom/Rectangle.js (Line 18)
doc_phaser
2017-02-14 11:07:03
Comments
Leave a Comment

Please login to continue.