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

Support Object3D.lookAt( x, y, z ) #12128

Merged
merged 1 commit into from
Sep 5, 2017
Merged

Conversation

WestLangley
Copy link
Collaborator

... as discussed in #12101.

@mrdoob mrdoob merged commit 90a7955 into mrdoob:dev Sep 5, 2017
@mrdoob
Copy link
Owner

mrdoob commented Sep 5, 2017

Thanks!

@WestLangley WestLangley deleted the dev-lookAt branch September 6, 2017 00:55
@mrdoob
Copy link
Owner

mrdoob commented Sep 11, 2017

Actually, I'm reconsidering this...

I think this is more clear:

object.lookAt( x, y, z );
object.lookAtVector( v );
object.lookAtObject( o );

object.lookAt() will now have to throw a warning because now it expects x, y, z instead of v.

@mrdoob
Copy link
Owner

mrdoob commented Sep 11, 2017

Before @pailhead gets upset... Yes, that's what he suggested in #12101 (comment) 😉

@WestLangley
Copy link
Collaborator Author

Actually, I'm reconsidering this...

I hope you decide not to. I think it is better if lookAt() just works.

LookAtObject() is not well-defined. The geometry can be offset from the origin.

@pailhead
Copy link
Contributor

:D

@mrdoob
Copy link
Owner

mrdoob commented Sep 11, 2017

LookAtObject() is not well-defined. The geometry can be offset from the origin.

Good point...

@pailhead
Copy link
Contributor

I think the alternative would be in tune more with JavaScript, than a graphics library. A super experienced JavaScript person might expect lookAtVector, without knowing much about linear algebra or graphics. A 3D artist that's trying some coding would expect the overloaded function. I'm totally 50:50 on this. It would be so nice if we had some sort of analytics with how people use threejs :)

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

Successfully merging this pull request may close these issues.

3 participants