Size
Class
Module: cc
Parent 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
ZERO
Size
return a Size object with width = 0 and height = 0.
width
Number
height
Number
Methods
Details
Properties
ZERO
return a Size object with width = 0 and height = 0.
width
height
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();