Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/rglcontroller.R
These functions allow Shiny apps to make relatively large changes to a scene, adding and removing objects from it.
| 1 2 3 4 5 6 | sceneChange(elementId, x = scene3d(minimal),
            delete = NULL, add = NULL, replace = NULL,
            material = FALSE, rootSubscene = FALSE,
            delfromSubscenes = NULL, skipRedraw = FALSE,
            minimal = TRUE)
registerSceneChange()
 | 
| elementId | The id of the element holding the  | 
| x | The new scene to use as a source for objects to add. | 
| delete, add, replace | Object ids to modify in the scene.  The  | 
| material | Logical to indicate whether default material should be updated. | 
| rootSubscene | Logical to indicate whether root subscene should be updated. | 
| delfromSubscenes | A vector of subscene ids that may have been changed by
deletions.  By default, all subscenes in  | 
| skipRedraw | If  | 
| minimal | See  | 
registerSceneChange must be called in the UI component
of a Shiny app to register the "sceneChange" custom
message.
registerSceneChange returns the HTML code to register the
message.
sceneChange returns a list to be used as the "sceneChange"
message to change the scene.  Use
shiny::session$sendCustomMessage to send it.
Duncan Murdoch
playwidget for a different approach to modifying
scenes that can be much faster, but may be less flexible.  The
Shiny demo in this package makes use of all of these approaches.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run: 
shinyUI(fluidPage(
  registerSceneChange(),
  actionButton("thebutton", "Change")
))
shinyServer(function(input, output, session) {
  observeEvent(input$thebutton, {
    session$sendCustomMessage("sceneChange",
      sceneChange("thewidget", delete = deletes, add = adds))
  })
})
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.