# \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: a 2 cylinder engine
gltf <- readGLB(paste0(samples, "/NormalTangentTest/glTF-Binary/NormalTangentTest.glb?raw=true"))
gltfMat <- gltf$getMaterial(0)
scene <- as.rglscene(gltf)
id <- scene$objects[[1]]$id
scene <- setPBRshaders(gltf, gltfMat, id, scene)
cat(scene$objects[[1]]$userFragmentShader)
# }
Run the code above in your browser using DataLab