Description of the problem
Error: FBXLoader: Import inflate.min.js from https://github.com/imaya/zlib.js
at BinaryParser.parseProperty (FBXLoader.js:4273)
at BinaryParser.parseNode (FBXLoader.js:3994)
at BinaryParser.parseNode (FBXLoader.js:4018)
at BinaryParser.parseNode (FBXLoader.js:4018)
at BinaryParser.parse (FBXLoader.js:3935)
at THREE.FBXLoader.parse (FBXLoader.js:95)
at FBXLoader.js:61
at XMLHttpRequest. (three.js:29871)
Three.js version
- Dev
- r85
- …
Browser
- [] All of them
- Chrome
- Firefox
- Internet Explorer
OS
- [] All of them
- Windows
- macOS
- Linux
- Android
- iOS
You have to import the mentioned file into your project in order to parse FBX files in binary format. You can also use a version of zlib.js in https://github.com/mrdoob/three.js/blob/master/examples/js/libs/inflate.min.js
Please don’t rely on this URL. It’s not maintained by the project. You can find the official list of examples with the latest
three.js
version right here:https://threejs.org/examples/
Use the
inflate.min.js
version of the following example. It works with the latest version ofFBXLoader
.@Mugen87 Thanks, now it works!👍
Althought I couldn’t get it running by loading libs via require, but it worked when I load it via scripttags in my template, like in the example you mentioned.
I managed to do it using what @yuanzhaokang like this:
import { inflate } from 'zlib.es';
And in the FBXloader (as a module)