inst/localtests/readwrite.R

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)
dmurdoch/rgl2gltf documentation built on Nov. 19, 2024, 9:41 p.m.