How can I load a GLTF from json

Hi there,

Sorry if this is a stupid question, but lets say I have the contents of a .gltf assigned to a variable (as a JSON object) in a script. How would I go about loading this using the gltf loader??

As far as I can tell, the gltf loader examples all use a url. I would like to use a JSON object which I have downloaded from database.


You can directly call GLTFLoader.parse(). However, the loader expects the given JSON as a string.

Perfect, thanks