3MF export need?

Hey guys, I’m finalizing a basic 3MFexporter from IVerticeData to 3MF files for internal use. I may share it or add it to Babylon if there’s interest from the community.

Please share your use cases or thoughts. I’ll be happy to share the Git repo or make a PR if it’s relevant.

3 Likes

That would be great!

1 Like

That could directly go to our exporters:
Babylon.js/packages/dev/serializers/src at master · BabylonJS/Babylon.js

2 Likes

I started adding 3MF support under the serializer. So far it is straightforward, but I have one open question that I do not have an easy answer for.

A 3MF file is a ZIP container, so to serialize it we likely need to handle ZIP compression. In my current implementation, which works well, I chose fflate because it is the most lightweight library I found that supports compression and is MIT licensed.

However, I understand that we cannot add third-party libraries like this to the project. What is the best practice in this case? And if adding a dependency is acceptable, what is the recommended way to keep it attached to the serializer only, without affecting the rest of the project?

if you may send me the pirat for my tests… :grin:

You can look at what I did for exr image format
You can dynamically load the fflate

(Sorry for brevity, I’m on my iPhone)

1 Like

That’s fine for me. I can take it through producing the babylon.threemfSerializer.min.js bundle. Now I need to understand what tools you put in place to test this serializer.

1 Like