Rotate scene by angle degrees around axis

m_rotate(id, angle, axis = "v", animationDuration = 0, fixedPath)

Arguments

id

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

angle

Angle, in degrees numeric, to rotate by.

axis

Axis ("x", "y", "z", "vx", "vy", "vz") to rotate around. Default "y". View relative (rather than model relative) axes are prefixed with "v". Axis can also be specified as a vector.

animationDuration

an optional parameter of milliseconds numeric that denotes the duration of the rotation animation. Default 0 (no animation)

fixedPath

if true animation is constrained to requested motion, overriding updates that happen during the animation

Value

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

Examples

library(r3dmol)
r3dmol() %>%
  m_add_model(data = pdb_6zsl, format = "pdb") %>%
  m_rotate(angle = 90, axis = "y", animationDuration = 1000)