Add a zoom animation
zoomMove(NGLVieweR, center, zoom, duration = 0, z_offSet = 0)A NGLVieweR object.
Target distance of selected atoms/residues. See the section "selection-language" in the official NGL.js manual.
Target zoom of selected atoms/residues. See the section "selection-language" in the official NGL.js manual.
Optional animation time in milliseconds (default = 0).
Optional zoom offset value (default = 0).
List of zoomMove parameters to NGLVieweR htmlwidgets
object.
Applies to the last structure added. The camera moves after all
structures are loaded and superposed (see setSuperpose()). If
zoomMove() is used for several structures, the last one is used
(with a warning). The center is that of the atom coordinates, so it does
not follow setPosition(), setRotation() or setScale().
Other transformations:
setPosition(),
setRotation(),
setScale()
NGLVieweR("7CID") %>%
stageParameters(backgroundColor = "white") %>%
addRepresentation("cartoon", param=list(name="cartoon", colorValue="red")) %>%
addRepresentation("ball+stick", param=list(name="ball+stick",
colorValue="yellow",
colorScheme="element",
sele="200")) %>%
zoomMove("200:A.C", "200:A.C", 2000, -20)