Add an arrow from start to end, additional customisation through
m_shape_spec()
.
m_add_arrow(
id,
start,
end,
radius = 0.2,
radiusRatio = 1.62,
mid = 0.62,
spec = m_shape_spec(),
hidden = FALSE
)
R3dmol id
or a r3dmol
object (the output from
r3dmol()
)
Start location of arrow Can be either m_sel()
or
m_vector3()
.
End location of arrow. Can be either m_sel()
or
m_vector3()
.
Radius of base cylinder for arrow.
Ratio of arrow point to the base cylinder. Default 1.618034.
Relative position of the arrow point base, along the length of arrow object. Default to 0.618034.
Additional shape specifications defined with
m_shape_spec()
.
Hide object if TRUE.
if (FALSE) {
r3dmol() %>%
m_add_model(data = m_fetch_pdb("1bna")) %>%
m_zoom_to(sel = m_sel(resi = 1)) %>%
m_add_arrow(
start = m_sel(resi = 1),
end = m_sel(resi = 3),
spec = m_shape_spec(color = "green")
)
}