Skip to content

Commit 066119d

Browse files
dmurdochcran-robot
authored andcommitted
version 0.107.10
1 parent 9a1b013 commit 066119d

File tree

125 files changed

+4851
-1865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+4851
-1865
lines changed

DESCRIPTION

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: rgl
2-
Version: 0.106.8
2+
Version: 0.107.10
33
Title: 3D Visualization Using OpenGL
44
Authors@R: c(person("Duncan", "Murdoch", role = c("aut", "cre"),
55
email = "murdoch.duncan@gmail.com"),
@@ -22,33 +22,33 @@ Authors@R: c(person("Duncan", "Murdoch", role = c("aut", "cre"),
2222
person("Joshua", "Ulrich", role = "ctb"),
2323
person("Xavier", "Fernandez i Marin", role = "ctb"),
2424
person("George", "Helffrich", role = "ctb"),
25-
person("Ivan", "Krylov", role = "ctb"))
25+
person("Ivan", "Krylov", role = "ctb"),
26+
person("Michael", "Sumner", role = "ctb"))
2627
Depends: R (>= 3.3.0)
27-
Suggests: MASS, rmarkdown, deldir, orientlib, lattice, misc3d,
28-
rstudioapi, magick, plotrix (>= 3.7-3), tripack, interp,
29-
alphashape3d, tcltk, js (>= 1.2), akima, webshot2, downlit,
30-
pkgdown, extrafont
28+
Suggests: MASS, rmarkdown, deldir, orientlib, lattice, misc3d, magick,
29+
plotrix (>= 3.7-3), tripack, interp, alphashape3d, tcltk, js
30+
(>= 1.2), akima, webshot2, downlit, pkgdown, extrafont, shiny,
31+
manipulateWidget (>= 0.9.0), testthat, markdown
3132
Imports: graphics, grDevices, stats, utils, htmlwidgets, htmltools,
32-
knitr, jsonlite (>= 0.9.20), shiny, magrittr, crosstalk,
33-
manipulateWidget (>= 0.9.0)
33+
knitr (>= 1.33), jsonlite (>= 0.9.20), magrittr, crosstalk
3434
Enhances: waldo
3535
Description: Provides medium to high level functions for 3D interactive graphics, including
3636
functions modelled on base graphics (plot3d(), etc.) as well as functions for
3737
constructing representations of geometric objects (cube3d(), etc.). Output
3838
may be on screen using OpenGL, or to various standard 3D file formats including
3939
WebGL, PLY, OBJ, STL as well as 2D image formats, including PNG, Postscript, SVG, PGF.
4040
License: GPL
41-
URL: https://github.com/dmurdoch/rgl,
42-
https://dmurdoch.github.io/rgl/dev/
41+
URL: https://github.com/dmurdoch/rgl, https://dmurdoch.github.io/rgl/
4342
SystemRequirements: OpenGL, GLU Library, XQuartz (on OSX), zlib
4443
(optional), libpng (>=1.2.9, optional), FreeType (optional),
45-
pandoc (>=1.14, needed for vignettes)
44+
pandoc (>=1.14, needed for vignettes; if not present, markdown
45+
package will be used)
4646
BugReports: https://github.com/dmurdoch/rgl/issues
4747
VignetteBuilder: knitr
4848
Biarch: true
4949
Additional_repositories: https://dmurdoch.github.io/drat
5050
NeedsCompilation: yes
51-
Packaged: 2021-04-21 16:29:06 UTC; murdoch
51+
Packaged: 2021-07-21 13:32:27 UTC; murdoch
5252
Author: Duncan Murdoch [aut, cre],
5353
Daniel Adler [aut],
5454
Oleg Nenadic [ctb],
@@ -68,7 +68,8 @@ Author: Duncan Murdoch [aut, cre],
6868
Joshua Ulrich [ctb],
6969
Xavier Fernandez i Marin [ctb],
7070
George Helffrich [ctb],
71-
Ivan Krylov [ctb]
71+
Ivan Krylov [ctb],
72+
Michael Sumner [ctb]
7273
Maintainer: Duncan Murdoch <murdoch.duncan@gmail.com>
7374
Repository: CRAN
74-
Date/Publication: 2021-04-23 09:50:02 UTC
75+
Date/Publication: 2021-07-22 08:20:02 UTC

MD5

+124-99
Large diffs are not rendered by default.

NAMESPACE

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export(.check3d,
22
abclines3d, addNormals, addToSubscene3d, arc3d,
3-
arrow3d, as.mesh3d, as.triangles3d, asRow,
3+
arrow3d, as.mesh3d, as.tmesh3d, as.triangles3d, asRow,
44
ageSetter, asEuclidean, asEuclidean2, asHomogeneous, asHomogeneous2,
55
aspect3d, axes3d, axis3d, box3d,
66
bbox3d, bg3d, bgplot3d,
@@ -9,7 +9,8 @@ export(.check3d,
99
contourLines3d,
1010
cube3d, cuboctahedron3d, cur3d,
1111
currentSubscene3d, cylinder3d,
12-
decorate3d, deform.mesh3d, delFromSubscene3d, divide.mesh3d, dodecahedron3d, dot3d, drape3d, ellipse3d, extrude3d,
12+
decorate3d, deform.mesh3d, delFromSubscene3d, divide.mesh3d, dodecahedron3d, dot3d, drape3d, ellipse3d,
13+
expect_known_scene, extrude3d,
1314
facing3d, figWidth, figHeight, filledContour3d,
1415
gc3d, getr3dDefaults, getWidgetId, GramSchmidt, grid3d,
1516
highlevel, hook_rgl, hook_webgl,
@@ -23,7 +24,7 @@ export(.check3d,
2324
play3d, plot3d, plotmath3d, points3d,
2425
polygon3d, pop3d, projectDown, propertySetter, propertySlider,
2526
qmesh3d, quads3d, readOBJ, readSTL, rgl.abclines, rgl.bbox, rgl.bg, rgl.bringtotop, rgl.clear,
26-
rgl.getMouseCallbacks, rgl.getWheelCallback,
27+
rgl.getAxisCallback, rgl.getMouseCallbacks, rgl.getWheelCallback,
2728
rgl.close, rgl.cur, rgl.ids, rgl.init, rgl.light, rgl.lines, rgl.linestrips,
2829
rgl.clipplanes, rgl.material, rgl.open, rgl.pixels, rgl.planes, rgl.points, rgl.pop, rgl.postscript,
2930
rgl.primitive, rgl.projection, rgl.quads, rgl.quit, rgl.Sweave, rgl.Sweave.off,
@@ -35,8 +36,9 @@ export(.check3d,
3536
r3dDefaults, rotate3d, rotationMatrix,
3637
scale3d, scaleMatrix, scene3d, segments3d,
3738
select3d, selectionFunction3d, selectpoints3d,
38-
rgl.setMouseCallbacks, rgl.setWheelCallback, set3d,
39-
setGraphicsDelay, setupKnitr, setUserShaders, shade3d, shadow3d,
39+
rgl.setAxisCallback, rgl.setMouseCallbacks, rgl.setWheelCallback,
40+
set3d, setAxisCallbacks, setGraphicsDelay, setupKnitr,
41+
setUserCallbacks, setUserShaders, shade3d, shadow3d,
4042
shapelist3d, shinyGetPar3d, shinySetPar3d, shinyResetBrush,
4143
show2d, snapshot3d,
4244
spheres3d, spin3d, sprites3d, subdivision3d,
@@ -72,6 +74,7 @@ export(.check3d,
7274
S3method(plot3d, mesh3d)
7375

7476
S3method(all.equal, mesh3d)
77+
S3method(all.equal, rglscene)
7578

7679
S3method(as.mesh3d, deldir)
7780
S3method(as.mesh3d, tri)
@@ -81,6 +84,9 @@ export(.check3d,
8184
S3method(as.mesh3d, rglobject)
8285
S3method(as.mesh3d, default)
8386

87+
S3method(as.tmesh3d, mesh3d)
88+
S3method(as.tmesh3d, default)
89+
8490
S3method(as.triangles3d, mesh3d)
8591
S3method(as.triangles3d, rglId)
8692

@@ -140,6 +146,9 @@ export(.check3d,
140146
S3method(filledContour3d, rglId)
141147
S3method(filledContour3d, mesh3d)
142148

149+
S3method(sew, rglRecordedplot)
150+
S3method(is_low_change, rglRecordedplot)
151+
143152
if(.Platform$OS.type == "windows") {
144153
importFrom(utils, getWindowsHandle)
145154
}
@@ -168,10 +177,9 @@ importFrom(htmltools, css, HTML, htmlDependency, img,
168177
includeScript, tags, tagAppendAttributes,
169178
tagHasAttribute, tagList, browsable, resolveDependencies)
170179
importFrom(jsonlite, toJSON, base64_dec)
171-
importFrom(knitr, asis_output, fig_path, hook_plot_custom, image_uri, include_graphics, knit_hooks,
172-
knit_meta_add, knit_print, opts_current, opts_hooks, opts_knit)
173-
importFrom(shiny, getDefaultReactiveDomain, markRenderFunction,
174-
registerInputHandler, removeInputHandler)
180+
importFrom(knitr, asis_output, fig_path, hook_plot_custom, image_uri, include_graphics,
181+
is_low_change, knit_hooks,
182+
knit_meta_add, knit_print, opts_current, opts_hooks, opts_knit,
183+
pandoc_to, sew)
175184
importFrom(magrittr, "%>%")
176-
importFrom(manipulateWidget, combineWidgets)
177185
importFrom(stats, coef, predict, residuals)

NEWS.md

+61-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,73 @@
11

2-
# rgl 0.106.8
2+
# rgl 0.107.10
3+
4+
## Major changes
5+
6+
* Added `expect_known_scene()` function to work with
7+
`testthat`.
8+
* Added some `testthat` tests.
9+
* Prepend a 5th entry to `par3d("mouseMode")`, corresponding
10+
to actions to take when no button is pressed.
11+
* Allowed any of the mouse modes to be applied to
12+
the mouse wheel.
13+
* Added the `setUserCallbacks()` function to allow
14+
user-specified mouse callbacks in WebGL code.
15+
* Added Javascript code for support of movable
16+
axis labels in `bboxdeco` objects.
17+
* Most drawing functions can now draw in the margins
18+
using new material properties `margin` and `floating`,
19+
with objects that move as the bounding box changes.
20+
See `?mtext3d` for details.
21+
* The `mtext3d()` argument order has changed.
22+
* Added the `setAxisCallbacks()` function to allow
23+
user-specified axis drawing routines.
24+
* Exposed (and generalized) the `as.tmesh3d()` function.
325

426
## Minor changes
527

6-
* Support for FreeType has been dropped in the experimental
7-
Windows Unicode (UCRT) build.
8-
28+
* The `shiny` and `manipulateWidget` packages have been changed from imports
29+
that are always loaded to suggested packages that
30+
will only be loaded if needed. This will reduce the
31+
"footprint" of `rgl` for users who don't use them.
32+
* The NULL device can now specify `par3d("useFreeType")`
33+
and the result is saved.
34+
* Code to work with pre-1.33 versions of `knitr` has now
35+
been removed.
36+
* Added documentation of Javascript to web page.
37+
* The handling of the `RGL_DEBUGGING` environment variable
38+
has changed: now it must look like `TRUE` to trigger
39+
Javascript debugging mode.
40+
* Argument `webshot = TRUE` has been added to `movie3d` (issue #113).
41+
* The assert() macro is now always defined.
42+
* In Windows, the `WM_PAINT` handler should be more tolerant
43+
of code called while painting.
44+
* `as.mesh3d.default()` can create segments. (Contributed
45+
by Michael Sumner.)
46+
* `compare_proxy.mesh3d()` has been modified to be
47+
compatible with both current and upcoming versions of
48+
`waldo`.
49+
50+
## Bug fixes
51+
52+
* The bug workaround in 0.105.22 for issue #27 triggered a bug
53+
in RStudio, resulting in two RStudio processes showing up
54+
when `rgl` was loaded. The workaround is now skipped when
55+
RStudio is detected. Use `options(startQuartz = TRUE)`
56+
in RStudio before loading `rgl` to run it,
57+
or `options(startQuartz = FALSE)` to suppress it.
58+
* In some cases, snapshots in `rmarkdown` documents
59+
were produced at the wrong size.
60+
* Controls failed to modify sphere colors (e.g. as in `example(playwidget)`, issue #102)
61+
62+
# rgl 0.106.8
63+
964
## Bug fixes
1065

1166
* Some of the changes related to avoiding `testthat` errors
1267
in other files accidentally introduced a new error
1368
in coloring meshes in `rgl`: now fixed.
14-
* readOBJ() was broken by the 0.106.x changes.
15-
* merge.mesh3d() failed for meshes containing points or
69+
* `readOBJ()` was broken by the 0.106.x changes.
70+
* `merge.mesh3d()` failed for meshes containing points or
1671
segments.
1772

1873
# rgl 0.106.6

R/animate.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ play3d <- function(f, duration = Inf, dev = cur3d(), ..., startTime = 0) {
172172
movie3d <- function(f, duration, dev = cur3d(), ..., fps=10,
173173
movie = "movie", frames = movie, dir = tempdir(),
174174
convert = NULL, clean = TRUE, verbose=TRUE,
175-
top = !rgl.useNULL(), type = "gif", startTime = 0) {
175+
top = !rgl.useNULL(), type = "gif", startTime = 0,
176+
webshot = TRUE) {
176177

177178
olddir <- setwd(dir)
178179
on.exit(setwd(olddir))
@@ -196,7 +197,7 @@ movie3d <- function(f, duration, dev = cur3d(), ..., fps=10,
196197
}
197198
if (top)
198199
rgl.bringtotop()
199-
snapshot3d(filename=filename)
200+
snapshot3d(filename = filename, webshot = webshot)
200201
}
201202
cat("\n")
202203
if (.Platform$OS.type == "windows") system <- shell # nolint

R/as.mesh3d.default.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
as.mesh3d.default <- function(x, y = NULL, z = NULL,
2-
type = c("triangles", "quads", "points"),
2+
type = c("triangles", "quads", "segments", "points"),
33
smooth = FALSE,
44
tolerance = sqrt(.Machine$double.eps),
55
notEqual = NULL,
@@ -24,7 +24,7 @@ as.mesh3d.default <- function(x, y = NULL, z = NULL,
2424
}
2525
}
2626
type <- match.arg(type, several.ok = TRUE)
27-
pcs <- c(triangles = 3, quads = 4, points = 1)
27+
pcs <- c(triangles = 3, quads = 4, segments = 2, points = 1)
2828
nvert <- length(x)
2929
okay <- FALSE
3030
for (i in seq_along(type)) {
@@ -69,6 +69,7 @@ as.mesh3d.default <- function(x, y = NULL, z = NULL,
6969
mesh <- mesh3d(vertices = rbind(verts[,keep, drop = FALSE], 1), points = if (type == "points") indices,
7070
triangles = if (type == "triangles") indices,
7171
quads = if (type == "quads") indices,
72+
segments = if (type == "segments") indices,
7273
material = list(...))
7374
if (smooth && type != "points")
7475
mesh <- addNormals(mesh)

0 commit comments

Comments
 (0)