-
Notifications
You must be signed in to change notification settings - Fork 193
How do you use loaders? #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There hasn't been any work to implement loaders yet, mostly as I've been unsure how to best source file/urls correctly to the JS-side (file loaders would have to download the file via contents api). If somebody wants to put some time in here, that would be very appreciated. I can help with mentoring of the current source code (helping find the right place to put code, which patterns to use, etc.). In terms of the loaders, please note that several of them have been deprecated in favor of the GLTF loader (OpenGL Transfer Format), so we might come a long way by adding support for this. |
Okay. As I said, I'm mostly interested in the OBJ loader (which piggybacks off the FileLoader, but so does the GLTF loader), so I'd be willing to help make progress there. I did the naive thing and added OBJLoader as a class to export in three-class-config.js with the relative path pointing to the examples/loaders directory, and when that failed I just moved the OBJLoader file to the src/loaders folder and adjusted the path accordingly. That worked, in the sense that I got a class file that looked like every other loader class file. The point of this is that your autogen scripts are mysterious to me and I could use an overview of how they work, as well as a general orientation around just how the functionality written in JS is exposed in Python. If you'd like to send me an email (see my profile) we can discuss further. |
I would like to be able to use the OBJLoader as well. Any progress/pointers on how to go about implementing this? |
@rkalyanapurdue I ended up porting the OBJLoader to Python myself, and then I discovered PyWavefront. Two issues I ran into with PyWavefront:
|
Thanks @aliddell . I briefly looked at PyWavefront and Pyglet (for the viz.) but it seemed like Pyglet requires an X Server/display (unless I've understood wrong) which doesn't really work for our use case since the notebook server is running on a cloud VM. |
Forgive the maybe-dumb question, but I'm new to both pythreejs and threejs in general.
I'm actually interested in the OBJLoader, but this is not included out of the box*, so I'll start with the FileLoader. It's not clear from the docs how to use it. Even looking over the Python source has me puzzled, since all the loaders look the same. I guess they wrap the JS in some way, so I would think it would be straightforward to do something like
but there doesn't seem to be a
load
function. How do I use any of these loaders? grepping on "Loader" in the examples/ directory turns up nothing.* it's in the examples directory, so I'm not sure why it couldn't be -- in any case I'd be willing to help implement it in pythreejs if I could understand how to use loaders in this library
The text was updated successfully, but these errors were encountered: