Three.js: Clean up XLoader

Created on 17 May 2017  Â·  4Comments  Â·  Source: mrdoob/three.js

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
  • [x] Dev
  • [ ] r85
  • [ ] ...
Browser
  • [x] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer
OS
  • [x] All of them
  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS
Enhancement

Most helpful comment

@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 and parse as public methods.

All 4 comments

I think your point is rough.
Specifically, which area is it?

If you are thinking that "quality is low", you do not mind writing so :smiley:

@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 and parse as public methods.

OK. i fixing this.
Continue here ↓
https://github.com/mrdoob/three.js/pull/11361

Was this page helpful?
0 / 5 - 0 ratings