Search code examples
three.jsmeshloader

Three.JS project - loaders don't load local models (with screenshot)


Example projects don't load 3d models to the scene. Or load but don't display, idk.

I tried both - the examples from three.js archive that I downloaded, also my own projects with my own models.

So I simply open three.js-master folder, open the index page in the examples folder, go through the list of examples. All examples work except the loaders examples. I just go through all of them and not a single format works, not obj, not fbx. What's wrong with local stuff? Online examples work but if I copy code from there it doesn't work.

See example The same for all local models

Can someone just open that freaking three.js master folder on your desktop and run any example locally? I mean an example with a mesh loader.


Solution

  • You have to run through a local webserver or change your browsers local file security policy.

    It is all outlined at the three.js wiki at... Three.js, how to run things locally.