Someone would you please clean up XLoader
code?
I think it's a bit too messed up to work among contributors.
/cc @adrs2002
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:
For example,
wrong intents
https://github.com/mrdoob/three.js/blob/53e3b1b4061742889f64add932147ae85a3b503c/examples/js/loaders/XLoader.js#L1445-L1481
wrong spaces
https://github.com/mrdoob/three.js/blob/53e3b1b4061742889f64add932147ae85a3b503c/examples/js/loaders/XLoader.js#L425
wrong reference (maybe)
https://github.com/mrdoob/three.js/blob/53e3b1b4061742889f64add932147ae85a3b503c/examples/js/loaders/XLoader.js#L394
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
and parse
as public methods.
OK. i fixing this.
Continue here ↓
https://github.com/mrdoob/three.js/pull/11361
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
andparse
as public methods.