empaempa / GLOW

GLOW is a WebGL wrapper, which focuses on easy creation and use of shaders.
http://i-am-glow.com
MIT License
244 stars 28 forks source link

Add npm module #24

Open mikolalysenko opened 11 years ago

mikolalysenko commented 11 years ago

Creating an npm module for GLOW would be helpful for writing more complicated javascript applications using the require module system. Making these changes would require some small changes to the naming of the modules and checking for .exports

empaempa commented 11 years ago

Hey! It has crossed my mind, but I never sat down to do it. If you do it, please do it in a separate folder for now (called require.js or something clever) and we can see later if there's a way to have it in one. Possibly, could this be done at build stage?

mikolalysenko commented 11 years ago

Ok, with your blessing I'll make an attempt. The one major problem that I am foreseeing though is that there are two main public interfaces for GLOW: GLOW and GL. I am thinking the best way to do would be to move GL into GLOW.GL, but this could break some existing code. I'll hack something together and send you a pull request.

empaempa commented 11 years ago

Right, try GLOW.GL and hope for the best. If possible, please keep the global GL. BTW: why can't there be two globals for one require module?