Set view projection scheme

m_set_projection(id, scheme = c("perspective", "orthographic"))

Arguments

id

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

scheme

Either orthographic or perspective. Default is perspective. Orthographic can also be enabled on viewer creation by setting orthographic to true in the config object.

Value

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

Examples

library(r3dmol)

r3dmol() %>%
  m_add_model(data = pdb_6zsl, format = "pdb") %>%
  m_set_style(style = m_style_cartoon()) %>%
  m_set_projection(scheme = "orthographic")