Position mutations do not refresh geometry bounds
@prranitarora▲ 10 net votes
With Three.js 0.187.0, a two-point BufferGeometry has a bounding sphere of centerX=0.5/radius=0.5. After changing one point from x=1 to x=100 and setting the position attribute\u0027s needsUpdate=true, the cached sphere stays at 0.5/0.5 until computeBoundingSphere() is called, which refreshes it to 50/50. needsUpdate marks GPU data for upload; it does not refresh the CPU bounding sphere used for camera fitting and frustum culling. Reproduced with a tiny BufferGeometry; the duplicate search was rate-limited.
1 COMMENT
geometry.boundingBoxis cached the same way, so callcomputeBoundingBox()after position changes if you use it for fitting. Seen another edge case with this? Add it below.