Wagner icon indicating copy to clipboard operation
Wagner copied to clipboard

Add build step

Open milcktoast opened this issue 10 years ago • 1 comments

To make development of features easier, it would be good to add a build step using Grunt or similar. I could put work into this if there is interest, I would propose:

  • Breaking passes and discreet classes into separate files (concatenated on build)
  • Concatenate shader code into main library file for distributable build to reduce http requests (current minefield example makes over 40 requests just for shaders).

milcktoast avatar Jun 15 '15 18:06 milcktoast

That's a great idea. I've wanted to tackle the problem of the many sources, and how to make it modular and compile just what's needed. A Grunt task could very well be the solution.

Concatenating Wagner's base and the different Passes would be straightforward. What is a bit more complex to solve, I think, it's how to compile all different vertex and fragment shaders sources. There's .glsl files in /vertex-shaders and in /fragment-shaders, and other sources can be provided when creating a Pass.

Any idea on a structure to allow to easily load source files when developing, and merge them all for the code in production?

spite avatar Jun 15 '15 23:06 spite