Is there a way to not allow the user to publicly download the 3d model and texture files that i'm showing?

We figured out the process of Encypting / Decrypting the GLB file (Not exactly an encyption more of a a corrupting the file and correct it back while loading,

You need to use a Hex editor and edit (Replace any character at the start and end of the file and note the location of the modification), Then save that as the the “Corrupted.GLB”.

In Threejs, Instead of GLB Loader, You should use the arraybuffer to read the GLB file as and replace the Corrupted places with the proper words / characters

(Eg, The GLB file always starts with GLTF (Position 0 to 3), So If I would have replaced that with something else then I should revert the characters at that positions back to “GLTF”).

And once the replace is done, Then you can directly load the array buffer and instantiate your model.

This whole method prevents anyone to open the GLB file in any 3D Modelling tools, It would just throw error messages that the model is corrupted.

4 Likes