I couldn't find any CDNs for FBXLoader (including inflate.js) over the internet. Are there any for three.js? Even better, where can I find the compatible loader, for including it in my project?
Asked
Active
Viewed 4,218 times
1 Answers
2
Using jsdeliver
will work. It's actually best to use the module version of FBXLoader
since any dependencies like inflate.js
will automatically be imported for you.
https://cdn.jsdelivr.net/npm/three@0.117.1/examples/jsm/loaders/FBXLoader.js
If you need for some reasons the global script version, just replace jsm
with js
. However, this version is deprecated since r117
and will be removed at the end of 2020.

Mugen87
- 28,829
- 4
- 27
- 50
-
Thank you very much. But I have always problems with the module's version. – Abraham Jun 04 '20 at 09:39
-
Well, it will be soon the only alternative so it's really better to focus on a ES6 module workflow. – Mugen87 Jun 04 '20 at 09:52
-
Now I am trying to convert my code into the modules. I have set the type of script as ```module```, and wrote this above the .js file: ```import * as THREE from './build/three.module.js'; import { OrbitControls } from './examples/jsm/controls/OrbitControls.js'; import { FBXLoader } from './FBXLoader.js';``` But I receive this:```GET http://127.0.0.1:5000/libs/inflate.module.min.js net::ERR_ABORTED 404 (Not Found)``` ```FBXLoader.js:66 GET http://127.0.0.1:5000/curves/NURBSCurve.js net::ERR_ABORTED 404 (Not Found)```, please note that I didn't use the CDN version, but the same file offline. – Abraham Jun 04 '20 at 10:02
-
Sorry, without seeing your code it's hard to understand what happens in your code. How about sharing a GitHub repo with your code? – Mugen87 Jun 04 '20 at 10:25
-
I downloaded r117 and updated everything, including the above-mentioned files and all its dependencies. It seemed I didn't know how really use the modules. I figured it out and both the ```FBXLoader``` and ```OrbitControls``` work as a charm. Thanks again @Mugen87, our world needs in dire need of people like you. Keep up the good work. – Abraham Jun 04 '20 at 10:36
-
you're welcome. Actually I have already upvoted, but since I'm quote new on stackoverflow, my upvotings have been already recorded, but will be publicly displayed once my reputation increases 15, thanks to the weird mechanics of reputation and so on and so forth. Nobody even bothers upvoting my questions :-) – Abraham Jun 04 '20 at 12:02
-
For those who've landed here and might have been stranded in the concept of JS Modules, there is a link to 16th chapter of Exploring ES6 [Link](https://exploringjs.com/es6/ch_modules.html), which I've found thanks to Mugen87 who shared it in another thread. I've just read this chapter, and I should say it is a comprehensive guide to JavaScript Modules. Furthermore, one should pay heed to the imported relative file paths, as they might've been already hardcoded in the module, e.g, the path to ```OrbitControls```. I hope all **loaders** be included in future revisions of three.js. – Abraham Jun 04 '20 at 17:17