regl-project / regl

👑 Functional WebGL
MIT License
5.19k stars 320 forks source link

Fallback values for DynamicVariable #409

Open jwerle opened 7 years ago

jwerle commented 7 years ago

It would be nice to have fallback values for dynamic variables. Something like:

regl.prop('position', [0, 0, 0])
regl.context('transform', mat4.identity([]))

what do you think?

jwerle commented 7 years ago

cc @mikolalysenko @Erkaman

jwerle commented 7 years ago

it would also be neat if we could specify a dynamic variable that used a context property and fell back to a argument property basically combining regl.context() and regl.prop()

mikolalysenko commented 6 years ago

I like this idea for a feature, am open to implementing it.

mikolalysenko commented 6 years ago

CC @gregtatum this could be a good first issue for getting to know core.js

gregtatum commented 6 years ago

Thanks, this looks like a good one for me to take.