Skip to content

Conversation

@callmegaga
Copy link
Contributor

fixed when the CSS2DObject visible is false,But it still is shown.

fixed when the CSS2DObject visible is false,But it still is shown.
fixed when the CSS2DObject visible is false,But it still is shown.That is better code style
@mrdoob
Copy link
Owner

mrdoob commented Apr 24, 2019

I propose this instead 😇

element.style.display = ( object.visible && vector.z > - 1 && vector.z < 1 ) ? '' : 'none';

@mrdoob mrdoob added this to the r104 milestone Apr 24, 2019
@WestLangley
Copy link
Collaborator

Then you probably should use <= 1 and >= - 1.

@mrdoob
Copy link
Owner

mrdoob commented Apr 24, 2019

Will merge and amend.

@mrdoob mrdoob merged commit 972b42c into mrdoob:dev Apr 24, 2019
@mrdoob
Copy link
Owner

mrdoob commented Apr 24, 2019

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.

3 participants