chinedufn / collada-dae-parser

Parse collada .dae 3d animation files into a WebGL friendly JSON format
http://chinedufn.github.io/collada-dae-parser/
MIT License
103 stars 10 forks source link

using a synchronous xml parser #2

Closed ghost closed 8 years ago

ghost commented 8 years ago

This patch swaps out xml2js for xml-parser so that the collada parser can return an object directly without going through a callback.

I tried to make this change minimal to the existing code by formatting the xml-parser object in the way that the xml2js object was formatted previously. The callback is now optional so that the test suite and examples all work the same as before.

One upside is that the payload for the browser is much smaller. Before:

$ browserify . | uglifyjs -cm 2>/dev/null | gzip | wc -c
38274

After:

$ browserify . | uglifyjs -cm 2>/dev/null | gzip | wc -c
4221
chinedufn commented 8 years ago

BEAUTIFUL

Added you as an owner of the project. Thanks for your help!

ghost commented 8 years ago

Thanks!