Description of the problem
Someone would you please clean up XLoader
code?
I think it’s a bit too messed up to work among contributors.
/cc @adrs2002
Three.js version
- Dev
- r85
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
For example,
wrong intents
three.js/examples/js/loaders/XLoader.js
Lines 1445 to 1481
in
53e3b1b
wrong spaces
three.js/examples/js/loaders/XLoader.js
Line 425
in
53e3b1b
wrong reference (maybe)
three.js/examples/js/loaders/XLoader.js
Line 394
in
53e3b1b
And I want it to
@adrs2002 I wouldn’t say is bad quality, but it sure has some issues… For example, it creates a lot of functions in global scope which could collide with user’s code.
I think https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/MD2Loader.js and https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/PlayCanvasLoader.js are good examples of my preferred structure for loaders.
Single object with
load
andparse
as public methods.