Color.interpolateColor()

<static> interpolateColor(color1, color2, steps, currentStep, alpha) → {number}

Interpolates the two given colours based on the supplied step and currentStep properties.

Parameters
Name Type Description
color1 number

The first color value.

color2 number

The second color value.

steps number

The number of steps to run the interpolation over.

currentStep number

The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two.

alpha number

The alpha of the returned color.

Returns
number -

The interpolated color value.

Source code: utils/Color.js (Line 760)
doc_phaser
2017-02-14 10:42:08
Comments
Leave a Comment

Please login to continue.