Hi there:
The case is that I have some 3d models encrypted files and, in order to consume them in my code, I’m generating a Uint8Array (plaintextbytes
in the following program abstracts) with the help of a generic decrypter algorithm.
It works flawless with GLB files:
...
var blob = new Blob([plaintextbytes], { type: "model/gltf-binary" });
BABYLON.SceneLoader.ImportMeshAsync("","",URL.createObjectURL(blob),_scene,onProgress,".glb")
}
But in order to be able to share textures among several 3d models (with a great saving in bandwidth and storage space) I prefer to use GLTF.
The case is that, when I try to apply the same previous schema to GLTFs it doesn´t work.
I suppose I must change:
-
type: "model/gltf-binary"
to maybetype: "model/gltf+json"
but it is not working - the ending parameter in
ImportMeshAsync
, the plugin type".glb"
, could need to be".gltf"
, but again it is not working nether.
Any direction about it? I mean, about such a gltf vs glb specification in the call to APIs.
Thanks for your time.