diff --git a/DESCRIPTION b/DESCRIPTION index dd2ac19..545f7e2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rgl2gltf Type: Package Title: Read and Write '.gltf' and '.glb' Files -Version: 1.0.4 +Version: 1.0.5 Authors@R: c(person("Duncan", "Murdoch", role = c("aut", "cre"), email = "murdoch.duncan@gmail.com"), person("Morten S.", "Mikkelsen", role = c("cph"))) @@ -24,5 +24,5 @@ Suggests: png, jpeg VignetteBuilder: knitr, rmarkdown -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 Roxygen: list(markdown = TRUE) diff --git a/NAMESPACE b/NAMESPACE index abedf65..60ccd06 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -42,6 +42,13 @@ 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") diff --git a/NEWS.md b/NEWS.md index 306bf5e..73fe43d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ -# rgl2gltf 1.0.4 +# rgl2gltf 1.0.5 * Support transparency. +* Fix noRemap issue as requested by CRAN. # rgl2gltf 1.0.3 diff --git a/R/gltfObj.R b/R/gltfObj.R index be5657d..b4f8f40 100644 --- a/R/gltfObj.R +++ b/R/gltfObj.R @@ -39,7 +39,7 @@ Gltf <- R6Class("gltf", #' The glTF standard requires `min` and `max` values in #' accessors, whereas other uses of buffers may not. #' This function stores in the usual way using the - #' [`Buffer$addAccessor()`][Buffer] method, and then adds + #' [`Buffer$addAccessor()`][rgl::Buffer] method, and then adds #' `min` and `max` values. #' #' The standard also doesn't support signed 4 byte integers diff --git a/cran-comments.md b/cran-comments.md index 519fc4c..46708f3 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,9 +1,4 @@ -1.0.3: Fixed issue found in rlibro additional tests. Now - I'm quite sure all existing CRAN issues have been addressed. +1.0.5: -1.0.2: Minor update in response to request from CRAN. - - - Re-ran Roxygen to fix tidy issues. - - Updated URL for glTF web page. - - One very small enhancement. - +Small update to add support for transparency and to avoid NoRemap issues +as requested by CRAN. diff --git a/man/Gltf.Rd b/man/Gltf.Rd index 242dcb7..78a3b22 100644 --- a/man/Gltf.Rd +++ b/man/Gltf.Rd @@ -130,7 +130,7 @@ Write values to accessor, including \code{min} and \code{max}. The glTF standard requires \code{min} and \code{max} values in accessors, whereas other uses of buffers may not. This function stores in the usual way using the -\code{\link[=Buffer]{Buffer$addAccessor()}} method, and then adds +\code{\link[rgl:Buffer]{Buffer$addAccessor()}} method, and then adds \code{min} and \code{max} values. The standard also doesn't support signed 4 byte integers diff --git a/man/as.gltf.Rd b/man/as.gltf.Rd index e4216f3..03517ca 100644 --- a/man/as.gltf.Rd +++ b/man/as.gltf.Rd @@ -82,7 +82,7 @@ Rescaling in the enclosing subscene. \code{as.gltf} is a generic function. The method for \code{"rglscene"} objects can handle most -objects produced by \code{\link{scene3d}}, but not all +objects produced by \code{\link[rgl]{scene3d}}, but not all objects will be handled. In particular: \itemize{ \item{Lights, text, bounding box decorations and backgrounds are saved in \dQuote{extra} fields, so diff --git a/man/as.rglscene.Rd b/man/as.rglscene.Rd index c234c72..52cc3d9 100644 --- a/man/as.rglscene.Rd +++ b/man/as.rglscene.Rd @@ -6,7 +6,7 @@ Convert a glTF object to an rglscene or mesh3d object. } \description{ These methods convert a \code{"gltf"} object to -a \code{"rglscene"} object, similar to what \code{\link{scene3d}} +a \code{"rglscene"} object, similar to what \code{\link[rgl]{scene3d}} would produce, or a \code{"mesh3d"} object. } \usage{ @@ -34,7 +34,7 @@ that information, otherwise include only what standard glTF viewers would displa \item{clone}{Whether to clone the \code{gltf} object. See the Details below.} \item{quick}{If \code{TRUE}, \code{\link{plot3d}} will work on the result, but it is not sufficiently complete to use - as the scene in \code{\link{rglwidget}}.} + as the scene in \code{\link[rgl]{rglwidget}}.} \item{add}{If \code{quick = FALSE}, the scene will be plotted in an existing rgl scene, and both old and new parts will be returned.} \item{...}{\code{as.mesh3d} passes these arguments to \code{as.rglscene}.} diff --git a/man/gltfWidget.Rd b/man/gltfWidget.Rd index 4499ced..0cc4e36 100644 --- a/man/gltfWidget.Rd +++ b/man/gltfWidget.Rd @@ -58,7 +58,7 @@ Give some progress information. } \item{open3dParams}{ A list to pass as the \code{params} argument to -\code{\link{open3d}}. +\code{\link[rgl]{open3d}}. } \item{usePBR}{ Whether to use physically based rendering methods. @@ -70,7 +70,7 @@ actually contains PBR parameters. A list containing optional arguments to the \code{\link{setPBRshaders}} function. } \item{\dots}{ -Additional parameters which will be passed to \code{rgl::\link{playwidget}}. +Additional parameters which will be passed to \code{rgl::\link[rgl]{playwidget}}. } } \details{ diff --git a/man/modifyShaders.Rd b/man/modifyShaders.Rd index c93df50..aa5c3a5 100644 --- a/man/modifyShaders.Rd +++ b/man/modifyShaders.Rd @@ -12,7 +12,7 @@ modifyShaders(shaders, mod, ...) } \arguments{ \item{shaders}{ -A list of shaders, e.g. as produced by \code{\link{getShaders}}. +A list of shaders, e.g. as produced by \code{\link[rgl]{getShaders}}. } \item{mod}{ Either a character value naming a built-in set of mods (currently just \code{"skins"}), or a list of mods as described diff --git a/man/playgltf.Rd b/man/playgltf.Rd index d90a5b1..4572b03 100644 --- a/man/playgltf.Rd +++ b/man/playgltf.Rd @@ -43,8 +43,8 @@ Control the updates; see details below. Whether to print status updates. } \item{...}{ -Parameter settings to pass to \code{\link{plot3d.rglscene}} (and hence -to \code{\link{open3d}}). +Parameter settings to pass to \code{\link[rgl]{plot3d.rglscene}} (and hence +to \code{\link[rgl]{open3d}}). } } \details{ diff --git a/man/setPBRshaders.Rd b/man/setPBRshaders.Rd index 689f57a..b1d008f 100644 --- a/man/setPBRshaders.Rd +++ b/man/setPBRshaders.Rd @@ -68,7 +68,7 @@ values to control the contribution from each of those components to the image based lighting. } \item{defines, uniforms, attributes, textures}{ -Values to use in \code{\link{setUserShaders}} in addition +Values to use in \code{\link[rgl]{setUserShaders}} in addition to the ones determined by this function. } } diff --git a/man/showTags.Rd b/man/showTags.Rd index be666b3..d55ad7c 100644 --- a/man/showTags.Rd +++ b/man/showTags.Rd @@ -25,7 +25,7 @@ displayed tags. The default will put the tag in front of everything, so it won't be obscured by other objects. } \item{\dots}{ -Other arguments to pass to \code{\link{text3d}}. +Other arguments to pass to \code{\link[rgl]{text3d}}. } } \details{ diff --git a/src/calc_tangents.cpp b/src/calc_tangents.cpp index 85b606f..0de7557 100644 --- a/src/calc_tangents.cpp +++ b/src/calc_tangents.cpp @@ -67,7 +67,7 @@ int CalcTangents::get_num_vertices_of_face(const SMikkTSpaceContext *context, } else if (working_mesh->draw_mode == GL_QUADS) { return 4; } - error("no vertices with less than 3 and more than 4 supported"); + Rf_error("no vertices with less than 3 and more than 4 supported"); } void CalcTangents::get_position(const SMikkTSpaceContext *context, diff --git a/src/mikktspace.c b/src/mikktspace.c index 70be1f6..d72cce9 100644 --- a/src/mikktspace.c +++ b/src/mikktspace.c @@ -728,7 +728,8 @@ static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn) { - int iNumUniqueVerts = 0, t=0, i=0; + int // iNumUniqueVerts = 0, + t=0, i=0; for (t=0; t