I'm making a 2d game engine using Java Script and WebGL, both of which I am new to, and was wondering if it was a good idea to use a shader object to initialize the fragment and vertex shader and then attach that to a game object. I would then update the shaders by passing things like the screen coordinates, sprite sheet coords, and other information into those shader objects.
I'm not sure if this is the correct approach to rendering or if there are better methods of doing so.