drei icon indicating copy to clipboard operation
drei copied to clipboard

<html> onOcclude issue with helpers

Open Theonlyhamstertoh opened this issue 4 years ago • 2 comments

  • three version: 0.130.1
  • @react-three/fiber version: 7.0.6
  • @react-three/drei version: 7.2.2
  • node version: v16.4.2
  • npm (or yarn) 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.

Theonlyhamstertoh avatar Jul 28 '21 01:07 Theonlyhamstertoh

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 ?

dberardo-com avatar Jan 30 '23 16:01 dberardo-com

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.

msantic avatar Nov 25 '23 14:11 msantic