m_spin {r3dmol} | R Documentation |
Continuously rotate a scene around the specified axis
Description
Continuously rotate a scene around the specified axis
Usage
m_spin(id, axis = "y", speed = 1)
Arguments
id |
R3dmol |
axis |
Axis ( |
speed |
Speed multiplier for spin animation. Defaults to 1. Negative value reverses the direction of spin. |
Value
R3dmol id or a r3dmol
object (the output from r3dmol()
)
Examples
library(r3dmol)
model <- r3dmol() %>%
m_add_model(data = pdb_6zsl, format = "pdb") %>%
m_set_style(style = m_style_cartoon(color = "spectrum")) %>%
m_zoom_to()
# spin the model
model %>% m_spin()
# reverses the direction of spin
model %>% m_spin(speed = -0.5)
[Package r3dmol version 0.1.2 Index]