What's the coordinate precision limits of three.js renderer?

I tried use three.js to render point cloud data(Coordinates system: EPSG4326 ), but got incorrect result (rendered points on one line, in other words, all points coordinates’s X and Y become same, just Z is different), seemed due to precision limits. Any one can help me?

Sorry for poor english!

*point cloud data coordinate ex:
(138.89326676679846, 37.01513381124151, 330.42)
(138.8932601575297, 37.01513788838176, 330.3)
(138.89326127060627, 37.015135812015515, 330.36)

Some Code For Understanding:

const geometry = new Geometry();

geometry.vertices.push(
        new Vector3(138.89326676679846, 37.01513381124151, 330.42),
        new Vector3(138.8932601575297, 37.01513788838176, 330.3),
        new Vector3(138.89326127060627, 37.015135812015515, 330.36),
        ...
);

geometry.computeBoundingSphere(); 

const material = new PointsMaterial({ size: 0.005 });

const points= new Points(geometry, material);

THREE.scene.add(points);

All numbers in JavaScript are doubles. Since all instances of Geometry are internally converted to BufferGeometry, vertices are converted to single precision floating point. This is the default precision in shaders and also the highest precision you can possibly get.

1 Like

Got it, Thanks so much!