zoomMove: Set zoomMove

View source: R/NGLVieweR.R

zoomMoveR Documentation

Set zoomMove

Description

Add a zoom animation

Usage

zoomMove(NGLVieweR, center, zoom, duration = 0, z_offSet = 0)

Arguments

NGLVieweR

A NGLVieweR object.

center

Target distance of selected atoms/residues. See the section "selection-language" in the official NGL.js manual.

zoom

Target zoom of selected atoms/residues. See the section "selection-language" in the official NGL.js manual.

duration

Optional animation time in milliseconds (default = 0).

z_offSet

Optional zoom offset value (default = 0).

Value

List of zoomMove parameters to NGLVieweR htmlwidgets object.

See Also

  • setScale()

  • setRotation()

  • setPosition()

Other transformations: setPosition(), setRotation(), setScale()

Examples

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)

NGLVieweR documentation built on April 4, 2025, 4:33 a.m.