Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add camera to scene? #1046

Closed
chrismo opened this Issue · 6 comments

7 participants

@chrismo

A number of the examples do scene.add(camera), but a number of them don't. What's the use case for doing so?

@kor86

The camera will be added automatically if you don´t add it to the scene. I believe when you´re using only one camera it´s ok but if you´re using more then one you should at them.

@mrdoob
Owner

Until recently the camera wasn't part of the scene graph. Because of that most of the example never add it to the scene so we do that automatically if the camera has no parent. Now a camera can be part of the scene graph, meaning that can be a child of an object. Imagine having a car on your scene and you want to put a camera on it.

@chandlerprall

Since not adding a camera to the scene is deprecated shouldn't all of the examples add the camera regardless?

@alteredq

They already do:

36b8839

@mrdoob mrdoob closed this
@egpaik

I'd just like to note that the README's copy+paste example does not add the camera to the scene. It only caused me a minute of confusion, but it might be a good idea to fix it.

@WestLangley
Collaborator

@egpaik As of r.50, the camera no longer needs to be added to the scene.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.