mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
REDESIGNED: ColorFromHSV()
Replaced Vector3 by direct values, easier to use and understand
This commit is contained in:
@ -84,7 +84,7 @@ int main()
|
||||
};
|
||||
|
||||
// Pick a color with a hue depending on cube position for the rainbow color effect
|
||||
Color cubeColor = ColorFromHSV((Vector3){ (float)(((x + y + z)*18)%360), 0.75f, 0.9f });
|
||||
Color cubeColor = ColorFromHSV((float)(((x + y + z)*18)%360), 0.75f, 0.9f);
|
||||
|
||||
// Calculate cube size
|
||||
float cubeSize = (2.4f - scale)*blockScale;
|
||||
|
||||
@ -311,8 +311,7 @@ static void RandomizeEmoji(void)
|
||||
emoji[i].index = GetRandomValue(0, 179)*5;
|
||||
|
||||
// Generate a random color for this emoji
|
||||
Vector3 hsv = {(start*(i + 1))%360, 0.6f, 0.85f};
|
||||
emoji[i].color = Fade(ColorFromHSV(hsv), 0.8f);
|
||||
emoji[i].color = Fade(ColorFromHSV((float)((start*(i + 1))%360), 0.6f, 0.85f), 0.8f);
|
||||
|
||||
// Set a random message for this emoji
|
||||
emoji[i].message = GetRandomValue(0, SIZEOF(messages) - 1);
|
||||
|
||||
Reference in New Issue
Block a user