gabrielelanaro / chemview

The new generation molecular viewer for IPython notebook
GNU Lesser General Public License v2.1
81 stars 17 forks source link

Alpha channel in representations #31

Closed tam10 closed 8 years ago

tam10 commented 8 years ago

Transparency in molecular representations could allow comparisons between large geometries such as proteins and nanotubes in chemical reactions, optimisations etc.

alphatest

For entire representations, it's fairly easy to allow transparency by adding: transparent: true, opacity: alpha to the THREE material's arguments. However, a bit more effort would be needed to control individual atoms, but I can't think of a situation where varying transparencies could be useful.

For now, if it seems useful, I can add an opacity option for balls_and_sticks and isosurfaces.

gabrielelanaro commented 8 years ago

I think that's a pretty good idea, yes we can stick with a per-representation alpha value as there's probably not much use for a per-atom alpha value