Cocos Creator API


Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

ValueType static

The base class of all value types.

clone ( ) ValueType

This method returns an exact copy of current value.


  • other

Compares this object with the other one.

other ValueType


toString ( ) string



: string

  • to
  • ratio

Linearly interpolates between this value to to value by ratio which is in the range [0, 1]. When ratio = 0 returns this. When ratio = 1 return to. When ratio = 0.5 returns the average of this and to.

to ValueType

the to value

ratio number

the interpolation coefficient


There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index