-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Camera #282
Conversation
…er and simplify some computations.
In the Simple CZML Demo Sandcastle example, clicking the Vehicle button throws this error: |
Also the "Two Canvases" example throws this error on load: |
Last one: picking seems to be messed up in the Volumes example. Mousing over the blue-white volume usually highlights the red one instead. |
@kring Thanks. The first two are fixed. The third is a problem in master as well. |
Volume picking bug is #349. |
|
|
||
if (modeChanged) { | ||
that._mode = that.scene.mode; | ||
that.scene.getScreenSpaceCameraController().enableTranslate = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be a big deal (and could be reserved for future cleanup) but we can probably cache the result of getScreenSpaceCameraController()
instead of calling the function every time, right? Same for other calls to this function throughout this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be a big deal (and could be reserved for future cleanup) but we can probably cache the result of
getScreenSpaceCameraController()
instead of calling the function every time, right? Same for other calls to this function throughout this file.
DynamicObjectView
apparently doesn't require that the scene be provided to the constructor, as long as it is set before update is called. So Dan's change as a result of this comment broke two tests in DynamicObjectViewSpec
that were not providing a scene. I was just going to fix it myself, but it's not obvious to me what should change. If scene is optional at construction time and then the user can set it later, then we can't cache the result of screenSpaceCameraController in the constructor or maybe even at all.
@mramato I made the changes you suggested. Anything else that can be improved? |
Looks good, merging. |
@emackey what touch events does this merge add? Can you please add them to CHANGES.md in master? (yes, I said master; crazy, I know). |
Done. |
Removed
Camera2DController
,CameraCentralBodyController
,CameraColumbusViewController
,CameraFlightController
,CameraFreeLookController
,CameraSpindleController
, andCameraControllerCollection
. Common ways to modify the camera are through theCameraController
object of theCamera
and will work in all scene modes. The default camera mouse handler is theCameraMouseController
object on theScene
. TheCameraMouseController
translates mouse input to camera movement through the camera's controller.