Releases: dmurdoch/rgl
Releases · dmurdoch/rgl
rgl 0.109.2
This is a fairly large update, fixing a lot of bugs and adding a number of new features.
Major changes
- Changes to support glTF animation:
- Handling of
embedding = "modify"
for the model matrix
has changed. Now the centering step is only done for
embedding = "replace"
. In addition, various bugs
have been fixed. - If a subscene has no lights defined, the lights from the parent
are used. plot.rglscene()
now ends with the root subscene as
current. It also allows specification ofopen3d()
parameters in a list.- The
MATn
types inBuffer
are returned as arrays with
dimc(n, n, count)
. - The
plot3d.rglscene
method now passes...
toopen3d()
. - The
setUserShaders()
function now allows arrays of 4x4 matrices as "uniforms", and allows additional textures to be specified.
- Handling of
sprites3d()
now has the option of
rotating = TRUE
, to allow 3D sprites to rotate with
the scene.- Added
getShaders()
function to get shaders used in WebGL. - Now detects if
rgl
is running withinreprex::reprex()
and if so arranges that a screenshot will be included in the
output. - Added default shaders to be used in
rglwidget()
, rather than
constructing them on the fly. This incompatibly affects the use
of lights and clipping planes with user shaders: their data
is now stored in arrays rather than multiple numbered variables.
Minor changes
- Now that
pkgdown
2.0.0 has been released, a number
of internal workarounds to support the development version
have been removed. - Added
as.mesh3d()
methods for"rglsubscene"
and"rglscene"
. open3d()
now handlesuseNULL
andsilent
arguments
passed inparams
.- Controls passed to
playwidget()
may now include a
component specifying HTML dependencies. - Added
rglwidgetClass.readAccessor()
method to let other
code use the buffering. - Changed the internal organization of bounding box calculations.
- All functions that produce meshes now accept
material properties. Newly modified to do so using the...
argument:cylinder3d()
, andgetBoundary3d()
. - Updated the system requirements and installation instructions.
- Solid bounding box decorations now try harder to display 3 faces (issue #206).
- Now that
webshot2
is on CRAN, instructions for
installing it from Github have been removed. - Sometimes
webshot2
snapshots are very slow, so
the default for thewebshot
argument tosnapshot3d()
now depends on theRGL_USE_WEBSHOT
environment
variable, usingTRUE
if it is unset. (Reported by Prof. B. D. Ripley.) - If the Chrome browser is not found,
snapshot3d(webshot = TRUE)
now issues a warning and
reverts to usingrgl.snapshot()
. - Buffers now use "normalized integers" to store
color or texture coordinate values that lie between 0
and 1 when it saves some space. - At the request of CRAN, the
akima
package is no
longer suggested.
Bug fixes
- as.mesh3d.rglobject() didn't handle objects with indices
properly. - In WebGL, the front vs back calculation sometimes
got the wrong result (issue #164). pop3d(tag = x)
did not always find the objects withtag == x
if they were not in the current subscene.- The default values for
front
andback
inrgl.material
andmaterial3d
are now"filled"
, as documented in some
places. - The
fog
setting wasn't handled properly bybg3d()
. - Numerous cases of partial argument matching were fixed
(suggestion of Henrik Bengtsson in issue #170.) - Argument
col
is accepted as a synonym forcolor
inmaterial3d()
andrgl.material()
. planes3d()
objects were not displayed consistently
inrgl
windows and WebGL displays, because the bounding
boxes were not computed consistently (issue #169).- Some initialization wasn't done properly in Shiny apps,
so they failed after a redraw (issue #173). - Buffers are now optional, as they don't work with
Shiny scene changes (also issue #173). - The NULL device would sometimes miscalculate the
bounding box. selectpoints3d(closest = TRUE)
selected too many points
when multiple objects were in the scene.- Clearing nested subscenes could cause a segfault and crash.
- In
knitr
andrmarkdown
, blank plots could be shown
whenpar3d(skipRedraw=TRUE)
was set (issue #188). - Objects drawn with
sprites3d()
weren't lit correctly
in WebGL (issue #189). - Objects with textures were sometimes drawn more than once, both
before the texture loaded and after. This was most noticeable for
objects with user textures. - Axis mode
"pretty"
got lost when scenes were redrawn. - Tick labels were sometimes lost in WebGL displays and
snapshot3d()
results (issue #197). - The new material properties from 0.107.10 and 0.108.3
were not handled properly byplotmath3d()
. rglMouse()
did not set the default value of the drop-down
selector properly (issue #213).merge.mesh3d()
, used byfilledContour3d()
, didn't handle
colors properly (issue #212).bg3d(sphere = TRUE)
has been fixed (issue #207).- Textures were not appearing on spheres, and front-back
differences weren't being rendered (issue #217). - When "knitting" within RStudio under R 4.2.0 on
Windows,rgl
scenes didn't appear (reported by
Dieter Menne.) A workaround has been added. - In
rglwidget()
, axis labels were not always
displayed, and did not move with solid bounding box
decorations properly (issue #206). - On some systems,
lines3d()
using both missing values
and transparency did not draw properly (issue #234,
originally reported by Gaspar Jekely). - The
rglShared()
example failed whencrosstalk
was uninstalled.
rgl 0.108.3
Major changes
- Added
getBoundary3d()
function to extract the boundary
edges of a mesh. - Added material property
tag
, a string associated
with each object. The value is reported byids3d(tags = TRUE)
and
may be used to select objects in most functions that use ids,
but otherwise is
largely ignored byrgl
. Thetagged3d()
function returns
information on tags. - Primitive types (points, lines, segments, triangles, quads)
can now accept anindices
parameter, similar to the
indices inmesh3d
objects. - Added
Buffer
object, based on glTF design, for holding binary
data forrglwidget()
.
Minor changes
- Allowed for a third coordinate in
text3d()
'sadj
parameter. - Added support for
adj
,pos
andoffset
to
sprites3d()
. - Added support for
pos
values of0
(at specified
location),5
(in front of it), and6
(behind it) in
text3d()
,sprites3d()
andplotmath3d()
. crosstalk
is now a Suggested package, rather than
a required one.- The
Makevars.ucrt
file has been modified with
contributions from Tomas Kalibera to work with his winutf8
build of R. bgplot3d()
no longer pauses for each page when running
examples.deldir
version 1.0-2 is incompatible withrgl
. Added
thecheckDeldir()
function to avoid running it.shade3d()
treated texture coordinates like colors, and
duplicated the first one for the whole face whenmeshColor = "faces"
was chosen.
Instead, they are now treated like vertex coordinates.
(Reported by Michael Sumner in issue #145).- Corrected the documentation and made the implementations
ofasHomogeneous()
,asEuclidean()
etc. more consistent. - An
as.rglscene()
generic has been added, though no methods
are defined in this package. downlit
0.4.0 has been released with support forrgl
, so instructions
for installing the devel version have been removed.
Bug fixes
- Fixed rendering of text as sprites3d() objects.
- Added
--static
flag to configure script for FreeType
installation. (Suggestion of Simon Urbanek and Prof. Brian Ripley.) shade3d()
,wire3d()
anddots3d()
overrode
"front"
and"back"
material settings in mesh objects.- rglwidget() handling of bounding box decorations had
several bugs. rgl
could not find routines in the DLL on some Windows
installs (Issue 148.)- Some cases where allocations were not protected have been fixed.
rgl 0.107.14
Major changes
- Added
expect_known_scene()
function to work with
testthat
. - Added some
testthat
tests. - Prepend a 5th entry to
par3d("mouseMode")
, corresponding
to actions to take when no button is pressed. - Allowed any of the mouse modes to be applied to
the mouse wheel. - Added the
setUserCallbacks()
function to allow
user-specified mouse callbacks in WebGL code. - Added Javascript code for support of movable
axis labels inbboxdeco
objects. - Most drawing functions can now draw in the margins
using new material propertiesmargin
andfloating
,
with objects that move as the bounding box changes.
See?mtext3d
for details. - The
mtext3d()
argument order has changed. - Added the
setAxisCallbacks()
function to allow
user-specified axis drawing routines. - Exposed (and generalized) the
as.tmesh3d()
function.
Minor changes
- The
shiny
andmanipulateWidget
packages have been changed from imports
that are always loaded to suggested packages that
will only be loaded if needed. This will reduce the
"footprint" ofrgl
for users who don't use them. - The NULL device can now specify
par3d("useFreeType")
and the result is saved. - Code to work with pre-1.33 versions of
knitr
has now
been removed. - Added documentation of Javascript to web page.
- The handling of the
RGL_DEBUGGING
environment variable
has changed: now it must look likeTRUE
to trigger
Javascript debugging mode. - Argument
webshot = TRUE
has been added tomovie3d
(issue #113). - The assert() macro is now always defined.
- In Windows, the
WM_PAINT
handler should be more tolerant
of code called while painting. as.mesh3d.default()
can create segments. (Contributed
by Michael Sumner.)compare_proxy.mesh3d()
has been modified to be
compatible with both current and upcoming versions of
waldo
.
Bug fixes
- The bug workaround in 0.105.22 for issue #27 triggered a bug
in RStudio, resulting in two RStudio processes showing up
whenrgl
was loaded. The workaround is now skipped when
RStudio is detected. Useoptions(startQuartz = TRUE)
in RStudio before loadingrgl
to run it,
oroptions(startQuartz = FALSE)
to suppress it. - In some cases, snapshots in
rmarkdown
documents
were produced at the wrong size. - Controls failed to modify sphere colors (e.g. as in
example(playwidget)
, issue #102)