How do I find out if my model is valid?

I have a few different models. Some of them are created via the Three.js-Editor. But none of them work. I used the same code with a link to a ladybug-model and then it worked. I also tried to use the upload the model to the Three.js-Editor and some worked, but a few didnt, so I kept trying out the code with the ones that work.

That’s how I import me file its in the same directory as App.js

“./UntitledScene.glft”,

I used the code from the official GLTFLoader
three.js docs and integrated it in my React-App

This one didnt work in the Three.js-Editor
untitled-scene.json (14.1 KB)
This one worked
UntitledScene.gltf (14.1 KB)

Could someone maybe show me a working model.json too?

My suggestion would be to test any glTF models in some online viewers, such as:

If the model works in both viewers, without validation warnings, it’s fair to expect it will work in your code as well or (if not) that there might be some problem in your code. There is a standalone validation tool for glTF files (glTF Validator), but this runs automatically in both viewers above.