Home > decentraland-ecs > Size
Size containing widht and height
Property | Access Modifier | Type | Description |
---|---|---|---|
height |
number |
Height | |
surface |
number |
The surface of the Size : width * height (float). | |
width |
number |
Width |
Method | Access Modifier | Returns | Description |
---|---|---|---|
constructor(width, height) |
Creates a Size object from the given width and height (floats). | ||
add(otherSize) |
Size |
Sums the width and height of two sizes | |
clone() |
Size |
Clones the size | |
copyFrom(src) |
void |
Updates the current size from the given one. | |
copyFromFloats(width, height) |
Size |
Updates in place the current Size from the given floats. | |
equals(other) |
boolean |
True if the current Size and the given one width and height are strictly equal. | |
getClassName() |
string |
"Size" | |
getHashCode() |
number |
Returns the Size hash code. | |
Lerp(start, end, amount) |
Size |
Creates a new Size set at the linear interpolation "amount" between "start" and "end" | |
multiplyByFloats(w, h) |
Size |
Multiplies the width and height by numbers | |
set(width, height) |
Size |
Updates in place the current Size from the given floats. | |
subtract(otherSize) |
Size |
Subtracts the width and height of two | |
Zero() |
Size |
Create a new size of zero |