R Under development (unstable) (2024-11-18 r87347 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(rgl2gltf) > library(rgl) > > # Tests from R to glTF > > x <- cube3d(col="red") > open3d(); shade3d(x) wgl 1 > bg3d("yellow") > > s <- scene3d() > plot3d(s) > # This opens a window; perhaps it should do next3d() instead > > g1 <- as.gltf(s) > s1 <- as.rglscene(g1) > plot3d(s1) > plot3d(g1) > > # Has bogus new window, due to calling plot3d.rglscene > # add = TRUE puts it in the wrong place > > g2 <- as.gltf(x) > s2 <- as.rglscene(g2) > plot3d(g2) > > example(plot3d, package="rgl") plot3d> open3d() wgl 10 plot3d> x <- sort(rnorm(1000)) plot3d> y <- rnorm(1000) plot3d> z <- rnorm(1000) + atan2(x, y) plot3d> plot3d(x, y, z, col = rainbow(1000)) > s3 <- scene3d() > g3 <- as.gltf(s3) > plot3d(g3) > > proc.time() user system elapsed 1.42 0.31 1.75