Best 3d format to inline in JS

So I have an animated 3d model, and I’m trying to embed it in my JS code.
So far I’ve been using the GLTF format and babylon format as both of them are JSON based.
I’m wondering if there’s another alternative ?

glb works too.

Umm, what kind of alternative are you looking for?

But glb is binary. So I guess I have to convert it to base64.
I’m looking for formats that I can embed in my JS.
GLTFs is sometimes inconsistent, maybe Blender exporter is here to blame too. And .babylon is usually bigger than gltf for me. So I’m wondering if there’s a better and reliable way to embed a 3d model in JS.

yeah Id give the glb a try convert it to base64 and a URI then convert it back maybe after runtime?

Reliability should be good, if not, do no hesitate to create issues for the exporters.

1 Like

glTF with base64 encoded resources is probably better than GLB encoded as base64. Decoding base64 can be quite slow, so doing it as little as possible is best.