Set Focus

setFocus(NGLVieweR, focus = 0)

Arguments

NGLVieweR

A NGLVieweR object.

focus

Set focus between 0 (default) to 100.

Value

setFocus parameter in NGLVieweR htmlwidgets object.

Details

The focus sets the clipping planes and the fog (the NGL.js stage parameters clipNear, clipFar, fogNear and fogFar). Without setFocus() the viewer uses the NGL.js defaults (with the default clipScale = "relative" these equal focus 0). Values of these four parameters given in stageParameters() win over setFocus().

Examples

NGLVieweR("7CID") %>%
  addRepresentation("cartoon", 
  param=list(name="cartoon", colorValue="blue")) %>%
  setFocus(0)