rglwidget (version 0.1.1434)

clipplaneControl: Sets attributes of a clipping plane.

Description

This is a function to produce actions in a web display. A playwidget or Shiny input control (e.g. a sliderInput control) sets a value which controls attributes of one or more clipping planes.

Usage

clipplaneControl(a = NULL, b = NULL, c = NULL, d = NULL, plane = 1, clipplaneids, ...)

Arguments

a, b, c, d
Parameter values for the clipping planes.
plane
Which plane in the clipplane object?
clipplaneids
The id of the clipplane object.
...
Other parameters passed to propertyControl.

Value

A list of class "rglControl" of cleaned up parameter values, to be used in an rgl widget.

Examples

Run this code
  saveopts <- options(rgl.useNULL = TRUE)
  xyz <- matrix(rnorm(300), ncol = 3)
  id <- rgl::plot3d(xyz, type="s", col = "blue", zlim = c(-3,3))["clipplanes"]
  dvals <- c(3, -3)
  rglwidget(width=500, height=300) %>%
    playwidget(clipplaneControl(d = dvals, clipplaneids = id),
               start = 0, stop = 1, step = 0.01,
               rate = 0.5)
  options(saveopts)

Run the code above in your browser using DataLab