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

OrthographicCamera: Simplify view offset calculation #18301

Merged
merged 1 commit into from
Jan 4, 2020

Conversation

miyamonz
Copy link
Contributor

@miyamonz miyamonz commented Jan 4, 2020

This is about this block. -> https://github.com/mrdoob/three.js/blob/dev/src/cameras/OrthographicCamera.js#L106-L118

Every diff to be added to left, right, top and bottom contains (scaleW / zoomW) or (scaleH / zoomH) factor, but both the scale and the zoom contains same this.view.{width, height} term, so it can be divided.

Image from Gyazo

@miyamonz miyamonz marked this pull request as ready for review January 4, 2020 01:15
In scaleW / zoomW, there are (this.view.width) in the numerator and denominator
@WestLangley WestLangley changed the title Fix scale calculation about view offset in OrthographicCamera OrthographicCamera: Simplify view offset calculation Jan 4, 2020
@WestLangley WestLangley added this to the r113 milestone Jan 4, 2020
@WestLangley
Copy link
Collaborator

Thank you for your contribution!

@mrdoob This is OK to merge.

@mrdoob mrdoob merged commit dd81aad into mrdoob:dev Jan 4, 2020
@mrdoob
Copy link
Owner

mrdoob commented Jan 4, 2020

Thanks!

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.

None yet

3 participants