library(rgl2gltf)
testfile <- system.file("localtests/NormalTangentTest.glb",
package = "rgl2gltf")
g1 <- readGLB(testfile)
plot3d(g1)
m1 <- as.mesh3d(g1)
open3d(); shade3d(m1)
g2 <- as.gltf(m1)
plot3d(g2)
temp <- tempfile(fileext = ".glb")
writeGLB(g2, temp)
g3 <- readGLB(temp)
plot3d(g3)
unlink(temp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.