Loading objects using the basic class - loader
Last updated
Last updated
Always, when loading any objects, be it materials, 3D models and the like, a special type of THREE.js library objects called loader has to be used.
The loader is used to add, for example, material to the scene from the outside.
An example of using a loader is adding a texture to a plane (line 6):
So what are the limitations of using the loader?
Files cannot be imported from all servers. The server from which you import your file must allow resource sharing and have Access-Control-Allow-Origin. What it is, is written.
If the server does not allow resource sharing, you will see the following error in the console:
As it can be seen above, the link to the image from Google.Drive does not pass validation, due to which the scene cannot be launched and errors appear.