Skip to content
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

ColladaLoader now loads a Scene instead of an Object3D #5754

Closed
Baccanno opened this issue Dec 12, 2014 · 7 comments
Closed

ColladaLoader now loads a Scene instead of an Object3D #5754

Baccanno opened this issue Dec 12, 2014 · 7 comments

Comments

@Baccanno
Copy link
Contributor

ColladaLoader now loads a 'Scene' instead of an 'Object3D' in the '.scene' field of the callback parameter.

It's not an issue rather a fix but the info is somehow interesting.

I had a regretion due to that as I was performing a deep copy of the object in order to have instances not sharing materials indeed clone functions of Object3D and Scene are slightly different

@mrdoob
Copy link
Owner

mrdoob commented Dec 12, 2014

Added to the Migration page.

@mrdoob mrdoob closed this as completed Dec 12, 2014
@WestLangley
Copy link
Collaborator

Why is ColladaLoader implented to return a Scene instead of an Object3D?

@mrdoob
Copy link
Owner

mrdoob commented Dec 12, 2014

Hmmm... It was for making it renderable... 17a4ae3

@WestLangley
Copy link
Collaborator

Sorry, I do not understand what "making it renderable" means in this case...

Also, the returned scene has scale applied by the loader. Usually we do not scale a scene.

And furthermore, in the loader callback, users end up adding the returned scene as a child of another scene.

Unless I am missing something, the loader should return an Object3D with children... No?

@mrdoob
Copy link
Owner

mrdoob commented Dec 12, 2014

Sorry, I do not understand what "making it renderable" means in this case...

It means that WebGLRenderer can only do render.render( THREE.Scene, THREE.Camera ). It can't do renderer.render( THREE.Object3D, THREE.Camera ). Well, that's not true. Since r69 we can now render a single object (or group) but updateMatrix may not be being called...

Unless I am missing something, the loader should return an Object3D with children... No?

Yeah, you're making me reconsider...

@Baccanno
Copy link
Contributor Author

I would agree with @WestLangley although you can use the collada loader for a scene it may happen quite often that you only want to load an Object3D to add anywhere, adding a scene to as scene could probably add sides effects and confusion no ?

@mrdoob
Copy link
Owner

mrdoob commented Dec 14, 2014

Yesh... I agree. I'll revert! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants