ValueType Class

Defined in: https://github.com/cocos-creator/engine/blob/2fda22be5638065a190bc4c97da6548631319aba/cocos2d/core/value-types/value-type.ts:32

Module: cc Parent Module: cc

The base class of all value types.

Index

Methods
  • clone This method returns an exact copy of current value.
  • equals Compares this object with the other one.
  • lerp Linearly interpolates between this value to to value by ratio which is in the range [0, 1].
  • set Copys all the properties from another given object to this value.
  • toString Convert to a readable string.

Details

Methods

clone

This method returns an exact copy of current value.

meta description
Returns ValueType
Defined in cocos2d/core/value-types/value-type.ts:39
equals

Compares this object with the other one.

meta description
Returns Boolean
Defined in cocos2d/core/value-types/value-type.ts:51
Parameters
lerp

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.

meta description
Returns ValueType
Defined in cocos2d/core/value-types/value-type.ts:63
Parameters
set

Copys all the properties from another given object to this value.

meta description
Defined in cocos2d/core/value-types/value-type.ts:80
Parameters
toString

Convert to a readable string.

meta description
Returns string
Defined in cocos2d/core/value-types/value-type.ts:92

results matching ""

    No results matching ""