Open xrobin opened 6 years ago
Sadly, NGL does not support multi layer transparency. You can try to get a desired effect by setting depthWrite: false
on representations. However that will result in other artifacts, but it is often ok when the transperency is not too low.
Here is a CodePen example.
I set two representation: a white cartoon for the protein and a ball+stick for ligand. Both have alpha transparency, with opacity: 0.5.
Observed behaviour:
Expected behaviour:
Additional comments:
* Actually, if you set the rotation to
o.setRotation([0, 1.3, 1]);
, you may notice that the cartoon that is right in front of the scene seems to be hiding a bit of the cartoon too, however it isn't quite as obvious.