Minify glTF JSON
There should be a converter option (off by default) to minify the JSON created to reduce its size.
There are several JavaScript minifiers available, but given that we can't change the names of any of the JSON properties, we probably just need to remove whitespace, which we won't need a third-party minifier for.
I would recommend the classic and venerable JSMin, which I think does exactly what you want.
http://www.crockford.com/javascript/jsmin.html
Good idea.
I think jsmin does not provide the full extend of optimizing for download and parsing speed. Google closure compiler is probably better ?
We're talking about JSON here. Closure compiler works by doing stuff like type or alias analysis, variable renaming, etc. The JSON is going to be a tiny fraction of the binary assets, so it is questionable to spend time on anything more complicated than a basic thing.
Yes of course. BTW-I am using other json 3D converters that by default produce optimized JSON and have an option to not optimize.
@kainino0x did we add this to COLLADA2JSON or did we revert it?
We reverted it because my fix didn't work correctly.
Moving to gltf-pipeline so it is useful to all exporters/converters, see https://github.com/AnalyticalGraphicsInc/gltf-pipeline/issues/1.