drei
drei copied to clipboard
<html> onOcclude issue with helpers
threeversion: 0.130.1@react-three/fiberversion: 7.0.6@react-three/dreiversion: 7.2.2nodeversion: v16.4.2npm(oryarn) version: 7.18.1
Problem description:
The problem occurs when using <html> occlude property. When you add a <axesHelper /> to the canvas, the text inside the html will flicker rapidly. If console.log the visibility in the onOcclude property, you will see it switching between true and false continously. Getting rid of the axesHelper fixes the problem. Here is a demo
When using gridHelper, the html will consider the gridHelper as something to occlude from, acting like a object plane in a way.
Suggested solution:
Although the occlude property, will occlude the entire scene, it would make more sense if the helper components are not counted especially the axesHelper and gridHelper.
i have a similar problem using Lines. I would like to ignore Lines when calculating occlusion, is there way to reduce the set of objects taken into account ?
Still an issue when using e.g. drei/Grid helper it messes up with occlude logic. There is a workaround by passing array of ref objects to occlude argument but it would be much better to implicitly ignore all helper objects.