Open SbastianGarzon opened 1 year ago
Have you tried rgl2gltf::writeGLB
?
Hi @dmurdoch,
I'm trying this approach, following your example here
volcano %>%
sphere_shade(texture = "desert") %>%
plot_3d(volcano, zscale = 10, fov = 0, theta = 135, phi = 45, zoom = 0.75, windowsize = c(1000, 800))
# Capture the rgl scene
scene <- rgl::rglwidget()
# Convert rgl scene to GLTF
gltf <- rgl2gltf::as.gltf(scene)
I'm getting this error:
Error in xyz.coords(x, y, z, recycle = TRUE) :
'x' is a list, but does not have components 'x', 'y' and 'z'
Export function to GLTF
Hello, I'm working on a solution to integrate rayshader models into virtual reality environments (e.g., A-frame). I'm wondering if it is possible to have a
save_gltf()
function. You mentioned in an old issue that you have developed a function for this task.Originally posted by @tylermorganwall in https://github.com/tylermorganwall/rayshader/issues/27#issuecomment-459987313