Open wandreveloso opened 6 years ago
@arose @fredludlow
If you want to modify a representation after its creation, you need to keep it (or the components, or the stage it belongs to) in a javascript variable.
When that is the case, you can adjust the representation parameters to your users actions.
for example,
r = stage.compList[0].addRepresentation('licorice')
if you want to hide this representation, you can
r.setVisibility(false)
if you want to change quality, you can
r.setParameters({quality: 'high'})
For more examples of how to script NGL, look at the gallery here http://nglviewer.org/ts2/gallery/index.html
Hi, I'm trying to allow the user, with javascript buttons, set the parameters of a protein visualization (quality low, medium and high) and remove surface or sticks, but I can't find any examples of this. Can anybody help me?