Size
Class
Module: cc
cc.Size is the class for size object,
please do not use its constructor to create sizes,
use size alias function instead.
It will be deprecated soon, please use cc.Vec2 instead.
Index
Properties
width
Number
height
Number
ZERO
Size
return a Size object with width = 0 and height = 0.
Methods
Details
Properties
width
height
ZERO
return a Size object with width = 0 and height = 0.
Methods
constructor
Parameters
clone
TODO
Examples
var a = new cc.size(10, 10);
a.clone();
equals
TODO
Parameters
Examples
var a = new cc.size(10, 10);
a.equals(new cc.size(10, 10));
lerp
TODO
Parameters
to
Rect
ratio
Number the interpolation coefficient.
out
Size optional, the receiving vector.
Examples
var a = new cc.size(10, 10);
var b = new cc.rect(50, 50, 100, 100);
update (dt) {
var c = a.lerp(b, dt * 0.1);
a.lerp(b, dt * 0.1, c);
}
toString
TODO
Examples
var a = new cc.size(10, 10);
a.toString();