Import editor's Loader module

I’d like to import and use the Loader module that enables loading of arbitrary files:

But the editor doesn’t appear to be a part of package.json, so I can’t npm install it. Is there some smart way to get the editor code into my application, other than copy-pasting the code, cloning the github repo, or something gross like that?

The Editor is provided as a standalone web application, but not as a part of the library. That file also depends on the command pattern system used by the editor. I think you will want to fork it and then edit according to your needs.


Thanks @donmccurdy, and hey, I think I’m about to use your three-to-cannon package in this project, so thanks for that!!

The quick and dirty solution I’m trying is adding three.js as a submodule in my git repo, then importing the loader. I will have to spoof the editor object and its command system as you say, and so far the code bloat it adds to builds is pretty annoying. I think a fork of three.js that suits my needs would never be compatible with upstream changes, so it might as well be a copy-paste if I can’t make this submodule thing work.