Color.interpolateColorWithRGB()

<static> interpolateColorWithRGB(color, r, g, b, steps, currentStep) → {number}

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

Parameters
Name Type Description
color number

The first color value.

r number

The red color value, between 0 and 0xFF (255).

g number

The green color value, between 0 and 0xFF (255).

b number

The blue color value, between 0 and 0xFF (255).

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.

Returns
number -

The interpolated color value.

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

Please login to continue.