I’ve been staring at the doc for a while, I’m still having a hardtime trying load a basic gltf model from loose files.
i have .gltf .bin .pngs in memory, blob or buffer either one is fine
how do i go about loading the model? please share
(not considering glb)
thanks for the quick reply, I saw this example in the doc.
but what about sub resources like textures?
let’s just use this example you shared, if there are resources like textures referenced by the gltf, how do i load or prep them so the loader can correctly pick them up?
var res = await fetch('/textures/palm.png');
var blob = await res.blob();
var blobURL = URL.createObjectURL(blob);
But the problem is with references. There could be different ways to solve them, and currently I am not sure which is better. Here is quite a long thread about it - Modify gltf in runtime,fallback for textures
Pinging @bghgary , GLTF master
yea the references are giving me problems. ive seen some discussion about hooking into gltfloader’s preproess url to fix up the path. i dont have a clear mental picture yet, but will look into it some more