m_set_view: Sets the view to the specified translation, zoom, rotation...

Description Usage Arguments Value Examples

View source: R/set.R

Description

Sets the view to the specified translation, zoom, rotation and style

Usage

1
m_set_view(id, arg, style)

Arguments

id

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

arg

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.

style

css style object in list.

Value

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

Examples

1
2
3
4
5
6
7
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")

r3dmol documentation built on March 14, 2021, 5:08 p.m.