- Since: 3.0.0
- Source: src/display/color/Interpolate.js (Line 9)
Methods
-
<static> ColorWithColor(color1, color2 [, length] [, index])
-
Interpolates between the two given color objects over the length supplied.
Parameters:
Name Type Argument Default Description color1
Phaser.Display.Color The first Color object.
color2
Phaser.Display.Color The second Color object.
length
number <optional>
100 Distance to interpolate over.
index
number <optional>
0 Index to start from.
- Since: 3.0.0
- Source: src/display/color/Interpolate.js (Line 48)
Returns:
An object containing the interpolated color values.
-
<static> ColorWithRGB(color1, r, g, b [, length] [, index])
-
Interpolates between the Color object and color values over the length supplied.
Parameters:
Name Type Argument Default Description color1
Phaser.Display.Color The first Color object.
r
number Red value.
g
number Blue value.
b
number Green value.
length
number <optional>
100 Distance to interpolate over.
index
number <optional>
0 Index to start from.
- Since: 3.0.0
- Source: src/display/color/Interpolate.js (Line 71)
Returns:
An object containing the interpolated color values.
-
<static> RGBWithRGB(r1, g1, b1, r2, g2, b2 [, length] [, index])
-
Interpolates between the two given color ranges over the length supplied.
Parameters:
Name Type Argument Default Description r1
number Red value.
g1
number Blue value.
b1
number Green value.
r2
number Red value.
g2
number Blue value.
b2
number Green value.
length
number <optional>
100 Distance to interpolate over.
index
number <optional>
0 Index to start from.
- Since: 3.0.0
- Source: src/display/color/Interpolate.js (Line 15)
Returns:
An object containing the interpolated color values.