I just made a SO post about an hour ago, but I’m in a bit of a hurry to get this working… My problem is that in r108 and I am trying to get multiple FBX files imported, which does not seem to work. I can import them separately, but as soon as I load more than one, the second is ignored. I need to load about 10 different objects that will be changed dynamically at runtime so I can’t make them into a single mesh…
What the hell. I am doing the exact same thing and it only loads the first one I load… I am doing this in VSCode and imported the npm package for the fbx loader though. Is that a different/non-official version? I might be using the wrong fbx loader. Though weird, my package.json saids “dependencies”: {
“three”: “^0.108.0” } I also just tried it in the editor on the threeJS website and it loads there as well.
Appearantly the mesh is loaded correctly, but not being rendered. I have no idea why though…
If you have the time can you take a look at my code, check if I have’nt missed anything important, but I dont think I have. https://pastebin.com/fgwkwqWZ
Yeah, there are many three.js related third-party packages, most of them not really maintained. Please use the FBXLoader from the three npm package. But looking at your pastebin, you are already doing this.
Besides, please use just a single instance of FBXLoader. There is no need for loader2.
Apart from that, I can’t see something unusual in your code. Consider to share your entire repository (with all assets) via github so it’s possible to locally execute your app.
I’ve uploaded my project folder and anything that was needed to make it run that I can think of into my github. I was not sure about including the npm dependencies but they’re there just in case. https://github.com/GrimZero/Configurator
I should tell you as well that I am relatively new to JavaScipt but have been doing C# in my education. Thats why the typescript dependency is there but I couldnt get it to work.
OK. Now I am really confused. I was messing with my orbitcontrols and zooming out quite a bit and zooming back in to the default camera position. Somehow this made the second mesh appear. This is one of the weirdest things I have seen in a while.
I think that was VSCode auto-importing it when I used the three keyword for the first time. Either that or I just messed up at the start, which is more likely.
Changing that import seems to have resolved the mesh not loading in correctly.
I removed the line where I added the camera to the scene as well. Now I’ll have to spend a lot of time trying to get a good render. I was planning to make a geometry shader for the grass to make it look nice. But I forgot this is not HLSL but GLSL. The grass looks pretty bad (but that has nothing to do with my problems, I just kinda suck at lighting and materials xD)