Description Usage Arguments Value Examples
Continuously rotate a scene around the specified axis
1 |
id |
R3dmol |
axis |
Axis ( |
speed |
Speed multiplier for spin animation. Defaults to 1. Negative value reverses the direction of spin. |
R3dmol id or a r3dmol
object (the output from r3dmol()
)
1 2 3 4 5 6 7 8 9 10 11 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.