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

Sometimes things go wonky #5

Open
mattdesl opened this issue Jan 13, 2016 · 1 comment
Open

Sometimes things go wonky #5

mattdesl opened this issue Jan 13, 2016 · 1 comment

Comments

@mattdesl
Copy link
Contributor

Occasionally with orbit-controls, when you drag way up and then left or right, the scene will appear "flipped" like everything is inverted somehow.
http://jam3.github.io/orbit-controls/

At first I thought this was because I'm using wireframes (i.e. no point of reference for depth), but I saw it a while back with a solid mesh where there was no question that it should not look like that.

It's hard to reproduce and I'm not sure what is causing it, so it might be a tricky bug to track down. 😄

@525c1e21-bd67-4735-ac99-b4b0e5262290

Reproduced by utilising an EPSILON of Math.pow(2, -50)

The problem arises when controls or cameras utilise an EPSILON small enough to allow matrices to be passed to gl-mat4/invert having both 1) non-zero determinants and 2) cells whose inverted values explode to infinity when stuffed into Float32Arrays.

new Float32Array([Math.pow(2, 127)])
// [1.7014118346046923e+38]

new Float32Array([Math.pow(2, 128)])
// [Infinity]

new Float64Array([Math.pow(2, 127)])
// [1.7014118346046923e+38]

new Float64Array([Math.pow(2, 128)])
//[3.402823669209385e+38]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants