Is it possible to use identify3d() or something similar to capture the coordinates of landmarks in an rgl scene rendered through renderRglwidget? I'm using the following code in shiny to render:
#server
observeEvent(input$mspec3D, {
tt1 <- out2[[6]][out2[[6]][,3] == input$mspec3D, ][1]
tt1 <- as.numeric(tt1)
tt2 <- out2[[6]][out2[[6]][,3] == input$mspec3D, ][2]
tt2 <- as.numeric(tt2)
tt1 <- out2[[1]][[tt1]]
tt2 <- out2[[1]][[tt2]]
output$webgl3D <- renderRglwidget ({
try(rgl.close())
points3d(tt1, size=3, col="dimgray", box=FALSE)
points3d(tt2, size=3, col="dodgerblue", box=FALSE)
axes3d()
rglwidget()
})
})
#ui
rglwidgetOutput('webgl3D', width = "1200px", height = "400px")