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
VRMLLoader? #3728
Comments
It can load a bunch of files. I think it was VRML 2.0 only though. However, I was told that doing a X3DLoader would be smarter (and then a VRML to X3D on-the-fly converter). |
I think the one who told you that meant that X3D would be "smarter" in the sense that X3D is basically all VRML2 nodes + more nodes, the difference being that X3D has three ways to encode the same data while VRML only has one:
|
Oh god... sounds like this is more fragmented than I thought... I wonder what would be the best way to pursue this. Or even if I should pursue this... |
Don't worry you don't have to implement every features nor every encoding :) You could stick to the Interchange profile in XML encoding, that's enough for having meshes and materials. |
Is that the most common encoding? |
Yes, XML is the most common encoding for X3D. Actually, Interchange has a conformance test suite with XML-encoded models you could use to test: officially you'd need to be a member of the consortium to access it (100$/year if you're not a student), but as long as you don't share it, I think they'd be OK if I send it to you. |
Is there a known-good VRML file to test the loader with? I'm not sure if my problems relate to the VRML or my code. "Uncaught TypeError: Object [object Object] has no method 'multiplyScalar' |
Do you mind sharing the file you're trying to load? |
Code to load: this.vrmlLoader = new THREE.VRMLLoader(); vrml code:
|
It seems to arise when the parser encounters a
By the way @mcgredonps, something unrelated about that model: the main mesh has its normals flipped (so you see the inside when you should see the outside the shape), so you may want to add |
The error comes from line 160 because
So I think it could be replaced with this:
|
Uhm... So VRML rotation is a quaternion? I don't remember how I came up with that |
Yes, SFRotation values (like Transform.rotation) are quaternions :) By the way, do you still have somewhere a working example of the loader loading a scene (even if it uses an older version of the renderer) ? Just wanted to check I didn't mess things up before even attempting a pull request. |
Thanks, I just grabbed some random student model off our archive. https://savage.nps.edu has a lot of x3d/vrml models. |
Could you please give me the link of example which loads vrm object? Thanks |
Updated VRMLLoader to use object.quaternion instead of object.rotation as mentioned in issue mrdoob/three.js#3728
Is it operational? It's in the distro but I get some errors when trying to use it.
The text was updated successfully, but these errors were encountered: