CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.7k stars 307 forks source link

feat: allow for tab separated obj from Tinkercad #259

Closed hawkaa closed 3 years ago

hawkaa commented 3 years ago

This PR changes patterns for obj line parsing to recognize files where the elements are separated by any whitespace (regex \s). This way, we support files exported from Tinkercad.

I was a little unsure on how to test the regexes so I exported them from the loadObj module. I am a TypeScript guys so I am not quite sure how to export additional variables but the default import when defined as module.exports.

End result of the Torus looks good:

Screenshot 2021-08-17 at 20 15 42

Fixes #258 .

hawkaa commented 3 years ago

Great feedback @lilleyse ! Could you have another look now?

lilleyse commented 3 years ago

@hawkaa thanks for the updates. Just checking, have you signed the CLA?

hawkaa commented 3 years ago

Now I have!

lilleyse commented 3 years ago

Great thanks!

hawkaa commented 3 years ago

Thank you! Let me know when a new version is released, we are eager to use it in our import pipeline!

lilleyse commented 3 years ago

obj2gltf 3.1.3 is published with the fix. Thanks again @hawkaa