Hello to everyone,
I have one question regarding the loaders. I have tried all of the troubleshoot solution, but nothing seems to work for me in order to load my 3d model from blender on the web. I was wondering whether I have to create a scene first + the webGL renderer and after that write down the code for the GLTFLoader.
Hi!
Your camera, if to believe the code from the screenshot, is in the center of the scene. Try to shift it along z-axis, for example, camera.position.z = 20;
But more important, there is no renderer.render(scene, camera); line in the code, neither on its own nor in animation loop.
Hey, thanks for the reply! I tried changing the position of the z-index, but that does not seem to do the trick. Regarding the renderer.render(scene, camera); line, isn’t that what loader.load does? If not where in my code do I have to write it down?
it just loads your object, then you add it to the scene, and then you have to render the content of the scene with your camera via renderer.render(scene, camera);
Add a render loop at the end of your script: