This might be the stupid question, but here goes nothing.
I have seen people using .js file for model instead of .glb, but now sure how they export and import in threeJs.
For Reference, I was looking to this example
+360º - Car Visualizer - Three.js
and when I Inspected it most of the part of these are Downloaded separately but that too In .js format as show below
So far I have been using .gltf/.glb and .obj format … but I am not sure how to do this.
And In this example, the models switch way quickly.
Any link or guide is much appreciated.
What you see in the car visualizer app is an outdated workflow (the app uses
.js extension was used in the past by a legacy JOSN loader. If you export with recent
three.js versions a 3D object or scene to JSON, you end up with a
.json file that can be loaded with
However, the internal JSON format is mainly relevant for the
three.js editor. If you want to load 3D assets into an application, glTF should be your first choice.
Thanks for replying
Just one Minor doubt,
what would be the recommended way to hide your 3d models, so It’s not easily accessible from network tab or at least harder to make out any sense from those files.
Let’s say I’m making a 3d model store similar to sketchfab.
For visual representation of model, I’m using threejs, but I don’t want people to directly download those models from network tab.
You find some information about this topic here:
I have a usecase where I have edited a GLB model using a hex editor. I have added some ciphers into the file and Saved it.
In Threejs code, I am looking for a way to decode the cipher by performing a edit on the GLB model considering it as a binary file.
I am not able to implement any methods that reads the GLB and perform edits in it.
Please suggest a way.
The title is a bit misleading but later on there is a suggestion on how to encrypt/decrypt arbitrary binary data (so it also works for glb files).