replit / kaboom

💥 JavaScript game library
https://kaboomjs.com
MIT License
2.61k stars 226 forks source link

Added support for arrays in uniforms. #814

Closed tristanperrow closed 5 months ago

tristanperrow commented 6 months ago

Arrays for shader uniforms. Soon to support struct like objects to be sent as a uniform. For example, Light a = { vec2 position, vec3 color } will be sent as a uniform such that if your shader has the struct Light, it will be able to accept that uniform to link specific variables together.

lajbel commented 5 months ago

It looks good for me, @slmjkdbtl check it!

slmjkdbtl commented 5 months ago

Thanks, this is good! Might also want to add to the UniformValue type here

tristanperrow commented 5 months ago

Should be good? I don't think I'm missing something, but lmk!

slmjkdbtl commented 5 months ago

Thank you, this is great!