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

Fix DeveloperError when zooming in 2D #1437

Merged
merged 4 commits into from
Feb 10, 2014
Merged

Fix DeveloperError when zooming in 2D #1437

merged 4 commits into from
Feb 10, 2014

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Feb 5, 2014

Fixes #1432.

Fix developer error when zooming creates an invalid frustum. Also fix crash when attempting to normalize the zero vector during translation in 2D.

… crash when attempting to normalize the zero vector during translation in 2D.
@mramato
Copy link
Contributor

mramato commented Feb 5, 2014

Can we add a unit test to verify that this doesn't break again?

@bagnell
Copy link
Contributor Author

bagnell commented Feb 8, 2014

@mramato This is ready.

@mramato
Copy link
Contributor

mramato commented Feb 8, 2014

If you use the mouse to zoom-in as close as possible, and then call the camera zoomIn function, it zooms into the ellipsoid and the earth disappears.

@bagnell
Copy link
Contributor Author

bagnell commented Feb 10, 2014

That is by design. The CameraController doesn't know about the ellipsoid that is being viewed. Other functions accept an ellipsoid parameter or default to a WGS84 ellipsoid. I can modify it to be similar. This is one of the reasons the ScreenSpaceCameraController has an ellipsoid property and is switched to a unit sphere when following an object.

@mramato
Copy link
Contributor

mramato commented Feb 10, 2014

Okay, we can save that discussion for a camera API review further down the line.

mramato added a commit that referenced this pull request Feb 10, 2014
@mramato mramato merged commit 8c4fa00 into master Feb 10, 2014
@mramato mramato deleted the cameraZoom2D branch February 10, 2014 19:39
mramato added a commit that referenced this pull request Jun 16, 2014
Chrome Canary recently added `navigator.hardwareConcurrency` which exposes the number of physical cores on the client.  This is a simple change to expose that value (or a default if not defined) on `FeatureDetection`.

I chose 3 as the fallback because according to Steam's hardware survey (http://store.steampowered.com/hwsurvey/) (2 cpus 47.26% 4 cpus 44.94%)

This will be handy when we do #1437 (probably post 1.0), but is useful immediately for `Primitive` creation.
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.

DeveloperError when using zoomIn function in 2D mode
2 participants