cruise-automation / webviz

web-based visualization libraries
https://webviz.io/
Apache License 2.0
2.01k stars 408 forks source link

Order of appearance in the list affects visibility of objects behind transparent objects #725

Open pkulijing opened 2 years ago

pkulijing commented 2 years ago

Maybe the title is not well phrased. I'll demonstrate the problem with the Cone example in the documentation.

I expect any objects behind a transparent object (i.e. alpha of color < 1) to be visible. In this example, the pink cone is visible behind the yellow one.

image

However the yellow cone is invisible behind the pink one.

image

The behavior seems to be decided by the order of appearance in the list. The pink cone ranks 1st, and it's visible when behind the yellow cones. This also applies to the axes: it's never visible behind the cones because it ranks the last in the list.

Is this a bug or an expected behavior?