m_rotate: Rotate scene by angle degrees around axis

Description Usage Arguments Value Examples

View source: R/animation.R

Description

Rotate scene by angle degrees around axis

Usage

1
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

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

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