export(Gltf, extractTexture, readglTF, readGLB, as.gltf, as.mesh3d, as.rglscene,
       showNodes, showTags,
       showtree, playgltf, plot3d, writeglTF, writeGLB, findEntry,
       namePattern, hasClass,
       matrixSequence, gltfWidget, modifyShaders, getTangents,
       setPBRshaders)

useDynLib(rgl2gltf, .registration = TRUE, .fixes = "C_")

importFrom("jsonlite", "read_json")
importFrom("rgl", "%>%", "as.rglscene", "addToSubscene3d",
           "asEuclidean", "asEuclidean2", "asHomogeneous", "asHomogeneous2",
           "as.tmesh3d", "clear3d", "close3d",
           "cube3d", "currentSubscene3d",
           "delFromSubscene3d", "getr3dDefaults",
           "as.mesh3d", "getShaders", "ids3d", "lowlevel",
           "makeDependency", "material3d", "mesh3d",
           "newSubscene3d", "open3d",
           "par3d", "par3dinterp", "par3dinterpControl",
           "playwidget",
           "plot3d", "pop3d", "rgl.material", "rgl.primitive",
           "rglwidget",
           "rotationMatrix", "scale3d", "scaleMatrix",
           "scene3d", "setUserShaders",
           "text3d", "tagged3d",
           "translate3d", "translationMatrix",
           "rotate3d", "shapelist3d", "useSubscene3d", "Buffer")
importFrom("grDevices", "col2rgb", "rgb", "xy.coords", "xyz.coords")
importFrom("utils", "capture.output", "head", "packageVersion")
importFrom("tools", "file_ext")
importFrom("R6", "R6Class")
importFrom("base64enc", "dataURI")
importFrom("stats", "approxfun", "complete.cases")

S3method("plot3d", "gltf")
S3method("as.mesh3d", "gltf")

S3method("as.gltf", "default")
S3method("as.gltf", "mesh3d")
S3method("as.gltf", "shapelist3d")

S3method("as.gltf", "rglobject")
S3method("as.gltf", "rglscene")

S3method("as.gltf", "rglbackground")
S3method("as.gltf", "rglbboxdeco")
S3method("as.gltf", "rglspheres")
S3method("as.gltf", "rglsprites")
S3method("as.gltf", "rglsubscene")
S3method("as.gltf", "rgltext")

S3method("as.rglscene", "gltf")

S3method("merge", "rglobject")

S3method("showtree", "gltf")
S3method("showtree", "rglscene")

S3method("print", "gltfNode")
S3method("print", "gltfMesh")
S3method("print", "gltfSkin")
S3method("print", "gltfScene")
S3method("print", "gltfImage")
S3method("print", "gltfCamera")
S3method("print", "gltfBuffer")
S3method("print", "gltfTexture")
S3method("print", "gltfChannel")
S3method("print", "gltfAccessor")
S3method("print", "gltfMaterial")
S3method("print", "gltfPrimitive")
S3method("print", "gltfAnimation")
S3method("print", "gltfBufferview")
S3method("print", "gltfAnimationSampler")
S3method("print", "matrixSequence")
