Can I increase vector accuracy in THREE.js?

In THREE.js, I am sometimes in search of better control over vector accuracy, especially when working with large floats, for example, in the solar system. Is there any way to do this?

In a related example, I am building a simple solar system with realistic numbers for the size and distance of the planet. To simulate an orbit, the entire system rotates on an axis located in the position of the planet. As the camera approaches the horizon of the planet, positional jitter appears along the edge.

Can I increase the accuracy of rotation applied to the object of rotation and its child’s objects so that the jitter will not be so strong? Or do I just need to work with a smaller range of numbers?

http://jsfiddle.net/Angrypickle/5zs8eLoj/72/

When smaller numbers are used for the following vectors, jitter seems reduced.

sun.position.set( 50000000, 0, 0 );
planet.position.set( -50000000, 0, 0 );
+4
source share
1 answer

After much research, the short answer to the question “Can I increase vector accuracy in THREE.js” is yes, but it is an advanced question.

Long answer: increasing the accuracy of a vector basically means increasing the accuracy of the JavaScript number, since the x, y, z, and w values ​​inside the vector are regular JavaScript numbers.

"", . . http://mathjs.org/docs/datatypes/numbers.html . Epsilon JavaScript - 64 Numbers.

, , Logarithmic Depth Buffer ( Z). , . , , .

, . :

fooobar.com/questions/965630/...

Outerra:

, "" "" , . - , . , THREE.js , . - 6 , , , 57,9 . 57,9 . , , , .. , , 999,999 .

+2

All Articles