KilledByAPixel / LittleJS

LittleJS is a fast HTML5 game engine with many features and no dependencies. 🚂 Choo-Choo!
MIT License
3.19k stars 160 forks source link

drawLine with WebGL, color not as expected #100

Closed AndreaPravato closed 1 month ago

AndreaPravato commented 1 month ago

I am probably doing something wrong, but I am not getting the expected color when I draw lines using WebGL (param true);

When I try (tried this in platformer example) drawLine(posA, posB, .1, new Color(9,6,45,1), true) (or whatever other color specification), I get a line that does not have the expected color (where expected color in this case would be new Color(9,6,45,1) (that is a dark purple/blue; I am getting pale pink).

KilledByAPixel commented 1 month ago

Color values from 0 to 1 so yeah, that's going to be white.