Skip to content

Conversation

@soadzoor
Copy link
Contributor

So, here's the deal in a longer story:
I implemented a new feature into one of my projects: ability to change the cameratype realtime (Orthographic vs Perspective).
So I noticed the following: By default, it's Orthographic. If I change it to Perspective, then back to Orthographic, the CSS3D parts look weird. I investigated this problem a bit, and found that the "perspective" component of the style attribute is added when the camera is a perspectivecamera, but it doesn't get removed when the camera is an orthographic camera.

This PR fixes the issue.

@soadzoor soadzoor changed the title Remove perspective component from style when scene is being rendered with an orthographic camera CSS3DRenderer: Remove perspective component from style when scene is being rendered with an orthographic camera Oct 25, 2019
@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 28, 2019

@yomotsu Does this change look good to you?

@yomotsu
Copy link
Contributor

yomotsu commented Oct 29, 2019

Thanks for letting me know @Mugen87 🙇‍♂️

I took a look at the PR.
It makes sense. Here is the reason we need to remove the style for orthographic camera
#13790 (comment)

Here is the current r109 with the problem.
(Camera type can be changed with the button)
https://jsfiddle.net/0uta1xro/1/

And here is the fixed one with the PR
https://jsfiddle.net/0uta1xro/

LGTM👍

@Mugen87 Mugen87 added this to the r110 milestone Oct 29, 2019
@yomotsu
Copy link
Contributor

yomotsu commented Oct 29, 2019

wait! This PR is changing JSM.

@soadzoor please change /js file. /jsm is generated from /js.

@mrdoob
Copy link
Owner

mrdoob commented Oct 30, 2019

I'll fix the js file post-merge.

@mrdoob mrdoob merged commit 4f9c398 into mrdoob:dev Oct 30, 2019
@mrdoob
Copy link
Owner

mrdoob commented Oct 30, 2019

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Oct 30, 2019

4223646

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.

4 participants