three-geo icon indicating copy to clipboard operation
three-geo copied to clipboard

how to make the graphic position center?

Open zp1112 opened this issue 5 years ago • 3 comments

like the example,the boundary of graphic is out of LineSegments edges bounds. image and like this,the mesh center is not on the scene center image

zp1112 avatar Nov 25 '19 08:11 zp1112

Thanks for the report!

I understand you are expecting that the getTerrain() API should return a cropped square mesh (the part only inside the white line segment box). Currently, we don't have this cropping behavior implemented. It would be nice to have this supported in the future.

j-devel avatar Nov 26 '19 09:11 j-devel

Thanks for the report!

I understand you are expecting that the getTerrain() API should return a cropped square mesh (the part only inside the white line segment box). Currently, we don't have this cropping behavior implemented. It would be nice to have this supported in the future.

I fix this problem by djust the mesh position to center manually , using computeBoundingBox and use mesh.geometry.boundingBox to compute the boundary position of every mesh.Then I can translate position correctly. It is not a best idea,but can solve my problem temporarily.

zp1112 avatar Nov 28 '19 06:11 zp1112

That sounds a reasonable user space workaround to me. Thanks for sharing!

j-devel avatar Nov 28 '19 15:11 j-devel