library(knitr)
library(rgl)
knit_hooks$set(webgl = hook_webgl)

This works fine.

library(rgl)
x <- sort(rnorm(1000))
y <- rnorm(1000)
z <- rnorm(1000) + atan2(x, y)
plot3d(x, y, z, col = rainbow(1000))

You must enable Javascript to view this page properly.

This one also works.

open3d()
## glX 
##   3
spheres3d(x, y, z, col = rainbow(1000))