Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

rgl2gltf (version 1.0.7)

readGLB: Read a GLB file.

Description

GLB is the self-contained binary format of glTF files. This function reads one, extracts the embedded files into the temporary directory, and returns a "gltf" object containing the information in R format.

Usage

readGLB(con, verbose = FALSE, ...)

Value

An object of class "gltf". This is an R version of the structure represented by a “glTF” file's JSON information.

Arguments

con

The connection or filename to read from.

verbose

Whether to report on the process.

...

Currently unused.

Author

Duncan Murdoch

References

The specification of the glTF format: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html

See Also

readglTF

Examples

Run this code
# \donttest{
# This web page has lots of sample files

samples <- "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0"

# Get one of them:  an avocado

gltf <- readGLB(paste0(samples, "/Avocado/glTF-Binary/Avocado.glb?raw=true"))

if (interactive())
  rgl::plot3d(gltf)

if (rgl::in_pkgdown_example())
  gltfWidget(gltf)

gltf$closeBuffers()
# }

Run the code above in your browser using DataLab