setRotation | R Documentation |
Set rotation for the representation
setRotation(NGLVieweR, x = 0, y = 0, z = 0, degrees = TRUE)
NGLVieweR |
A NGLVieweR object. |
x |
Rotation angle around the x-axis. Default is 0. |
y |
Rotation angle around the y-axis. Default is 0. |
z |
Rotation angle around the z-axis. Default is 0. |
degrees |
A logical value. If TRUE (default), the input angles are assumed to be in degrees and will be converted to radians. If FALSE, the angles are assumed to be in radians. |
NGLVieweR object with updated rotateView parameters.
setScale()
zoomMove()
setPosition()
Other transformations:
setPosition()
,
setScale()
,
zoomMove()
NGLVieweR("7CID") %>%
stageParameters(backgroundColor = "white") %>%
addRepresentation("cartoon", param=list(name="cartoon", colorValue="red")) %>%
addRepresentation("ball+stick", param=list(name="ball+stick",
colorValue="yellow",
colorScheme="element",
sele="200")) %>%
setRotation(30, 45, 60, degrees = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.