Members
the bottom value of the bounds.
the height value of the bounds.
Is the bounds positive.
the left value of the bounds.
- Default Value:
- -Infinity
- Default Value:
- -Infinity
- Default Value:
- Infinity
- Default Value:
- Infinity
rectangle Rectangle
The bounding rectangle of the bounds.
the right value of the bounds.
the top value of the bounds.
the width value of the bounds.
the x value of the bounds.
the y value of the bounds.
Methods
Adds other Bounds.
Name | Type | Attributes | Description |
---|---|---|---|
bounds |
BoundsData |
The Bounds to be added |
|
matrix |
Matrix |
<optional> |
Adds other Bounds, masked with Bounds.
Name | Type | Description |
---|---|---|
mask |
Bounds |
The Bounds to be added. |
Adds sprite frame
Name | Type | Attributes | Description |
---|---|---|---|
x0 |
number |
left X of frame |
|
y0 |
number |
top Y of frame |
|
x1 |
number |
right X of frame |
|
y1 |
number |
bottom Y of frame |
|
matrix |
Matrix |
<optional> |
Adds a rectangle to the bounds.
Name | Type | Attributes | Description |
---|---|---|---|
rect |
Rectangle |
The rectangle to be added. |
|
matrix |
Matrix |
<optional> |
The matrix to apply to the bounds. |
Adds screen vertices from array
Name | Type | Attributes | Description |
---|---|---|---|
vertexData |
Float32Array |
calculated vertices |
|
beginOffset |
number |
begin offset |
|
endOffset |
number |
end offset, excluded |
|
matrix |
Matrix |
<optional> |
Adds other Bounds, multiplied with matrix.
Name | Type | Description |
---|---|---|
matrix |
Matrix |
The matrix to apply to the bounds. |
Ceils the bounds.
Returns:
Type | Description |
---|---|
this |
Clears the bounds and resets.
Returns:
Type | Description |
---|---|
this |
Clones the bounds.
Returns:
Type | Description |
---|---|
Bounds |
Checks if the point is contained within the bounds.
Name | Type | Description |
---|---|---|
x |
number |
x coordinate |
y |
number |
y coordinate |
Returns:
Type | Description |
---|---|
boolean |
Resizes the bounds object to include the given rectangle.
Name | Type | Description |
---|---|---|
rect |
Rectangle |
The rectangle to be included. |
Returns:
Type | Description |
---|---|
this |
Resizes the bounds object to include the given bounds.
Name | Type | Description |
---|---|---|
left |
number |
The left value of the bounds. |
right |
number |
The right value of the bounds. |
top |
number |
The top value of the bounds. |
bottom |
number |
The bottom value of the bounds. |
Returns:
Type | Description |
---|---|
this |
Checks if bounds are empty.
Returns:
Type | Description |
---|---|
boolean |
|
Pads bounds object, making it grow in all directions. If paddingY is omitted, both paddingX and paddingY will be set to paddingX.
Name | Type | Description |
---|---|---|
paddingX |
number |
The horizontal padding amount. |
paddingY |
number |
The vertical padding amount. |
Returns:
Type | Description |
---|---|
this |
Scales the bounds by the given values
Name | Type | Description |
---|---|---|
x |
number |
The X value to scale by. |
y |
number |
The Y value to scale by. |
Returns:
Type | Description |
---|---|
this |
Sets the bounds.
Name | Type | Description |
---|---|---|
x0 |
number |
left X of frame |
y0 |
number |
top Y of frame |
x1 |
number |
right X of frame |
y1 |
number |
bottom Y of frame |