Learn R Programming

r3dmol (version 0.1.0)

m_zoom: Zoom current view by a constant factor

Description

Zoom current view by a constant factor

Usage

m_zoom(id, factor = 2, animationDuration, fixedPath)

Arguments

id

R3dmol id or a r3dmol object (the output from r3dmol())

factor

Magnification numeric factor. Values greater than 1 will zoom in, less than one will zoom out. Default 2.

animationDuration

an optional parameter of milliseconds numeric that denotes the duration of a zoom animation

fixedPath

if true animation is constrained to requested motion, overriding updates that happen during the animation

Value

R3dmol id or a r3dmol object (the output from r3dmol())

Examples

Run this code
# NOT RUN {
library(r3dmol)

r3dmol() %>%
  m_add_model(data = pdb_6zsl, format = "pdb") %>%
  m_zoom_to() %>%
  m_zoom(factor = 2, animationDuration = 1000)
# }

Run the code above in your browser using DataLab