R/rd.R
, R/set.R
m_set_view.Rd
Sets the view to the specified translation, zoom, rotation and style
m_set_view(id, arg, style)
R3dmol id
or a r3dmol
object (the output from
r3dmol()
)
Vector formatted view setting,
c(pos.x, pos.y, pos.z, rotationGroup.position.z, q.x, q.y, q.z, q.w)
.
Requires any one of q.x
, q.y
, q.z
, q.w
to be set
to 1
to enable mouse control, otherwise only static image is rendered.
css style object in list.
R3dmol id
or a r3dmol
object (the output from
r3dmol()
)
library(r3dmol)
r3dmol() %>%
m_add_model(data = pdb_6zsl, format = "pdb") %>%
m_set_style(style = m_style_cartoon()) %>%
m_set_view(arg = c(20, -20, 10, -200, 0, 1, 0, 0)) %>%
m_add_outline(color = "blue")