Recent Releases of rgl
rgl - v1.3.24
- The
shapelist3d()function did not handle material names properly (issue #462). - The
markdownpackage no longer supportsrgl, so the change inrgl1.3.1 to use it has been reverted. This means Pandoc is once again necessary to build the vignettes. - Links from help pages to vignettes have been repaired and added, using new
\HTMLVignette{}{}{}and\HTMLVignetteCRAN{}{}{}{}macros. - To support those macros, two environment variables are used.
VignetteRdPath(default"../html/") should be the lead-in of the URL for the HTML version of an Rd help file referenced from a vignette, andRdVignettePath(default"../doc/") should be the lead-in of the URL for a vignette referenced from an Rd file. abclines3d()did not handle multiple colors properly, sometimes causing a crash (issue #476).- The
COPYING.GL2PSfile containing the license for the code used inrgl.postscript()has been moved so that it will be installed at the top level of the package.
- C++
Published by dmurdoch 8 months ago
rgl - v1.3.18
rgl 1.3.18
- Internal code changes to satisfy
R CMD checkrequirements. - Some memory leaks reported in issue #451 have been fixed.
- The OpenGL "glad" loader has been updated to version 2.0.8.
- A number of implicit type conversions have been made explicit to avoid compiler warnings.
- C++
Published by dmurdoch 11 months ago
rgl - v1.3.16
rgl 1.3.16
Bug fixes
triangulate()now uses theearcutlibrary from https://github.com/mapbox/earcut.hpp, which should be faster and more reliable than the previous R implementation.- In cases where the X11 server did not provide sufficient
support,
rgl.init()could sometimes segfault. That has been fixed, and warning messages have been made more informative.
- C++
Published by dmurdoch about 1 year ago
rgl - v1.3.14
rgl 1.3.14
Minor changes
rgl.incrementID()has been added.- An example using log axes has been added to the
help page for
axes3d().
Bug fixes
clear3d("all"), callingbg3d()on the root subscene, and some cases ofpop3d()involving the background could create a leak of a background object (issue #439). For back compatibility of saved results, these cases still increment the object ID number, but don't actually create a new object.rglwidget()displays didn't support objects withsmooth = FALSE.
- C++
Published by dmurdoch over 1 year ago
rgl - v1.3.12
rgl 1.3.12
Minor changes
readSTL()can now read (some) ASCII format STL files.- The configure script has had minor changes, and autoconf support files have been updated.
unameis no longer used during startup (PR #435 submitted by Jonathon Love).
Bug fixes
- Background plots did not always appear (issue #421).
- Changing the background resulted in an additional background object instead of replacing the current one.
- Colors weren't handled correctly by
writePLY()(issue #425). bbox3d()objects ignored thexlen,ylenandzlensettings when rendered usingrglwidget()(issue #415).- In certain cases, the
WebGLvignette started with the mouse mode set to "selecting". - The
rglwidget()function gets a new argumentfastTransparencywhich makes WebGL mimic thergldevice when drawing transparent objects. The default value isTRUEunless optionrgl.fastTransparencyis set toFALSE. writeSTL()now writesendsolid, which is required by some apps.
- C++
Published by dmurdoch over 1 year ago
rgl - rgl 1.3.1
Major changes
sprites3d()now supports plotting different 3D symbols at each location (issue #406).
Minor changes
- ARIA support now declares
rglscenes withrole = "img". - The vignettes in this package now use
markdown::html_format, so they no longer require Pandoc (though Pandoc-using output formats likehtml_documentwill still be supported). - Christophe Geuzaine's GL2PS library (used by
rgl.postscript()) updated to version 1.4.2, and blending (transparency) has been enabled in formats that support it. - The
Makevars.ucrtfile has been changed for compatibility with an upcoming change to Windows Rtools. (Pull request #412 submitted by Tomas Kalibera).
Bug fixes
- The ARIA support caused
htmlwidgets::saveWidget()to fail when run in a Shiny session. text3d()andmtext3d()did not pass thecexargument toplotmath3d()(pull request #384).polygon3d()failed when given exactly 3 points (issue #388).snapshot3d()failed on Windows with some versions ofwebshot2(issue #391).- Fixed issues caused by misuse of
dev.off()using new functionsafe.dev.off(). - Fixed issue with
warning()call reported by CRAN. - Smooth shapes were not rendered correctly by
rglwidget(). This was especially noticeable for spheres withfov = 0, but was present in other cases as well (issue #401). textype = "alpha"was not rendered correctly byrglwidget()(issue #408).setUserCallbacks()and related functions failed when thesubsceneargument was anything other than the root subscene.
- C++
Published by dmurdoch almost 2 years ago
rgl - rgl 1.2.8
Minor changes
- ARIA support now declares
rglscenes withrole = "img".
Bug fixes
- The ARIA support caused
htmlwidgets::saveWidget()to fail when run in a Shiny session. text3d()andmtext3d()did not pass thecexargument toplotmath3d()(pull request #384).polygon3d()failed when given exactly 3 points (issue #388).snapshot3d()failed on Windows with some versions ofwebshot2(issue #391).- Fixed issues caused by misuse of
dev.off()using new functionsafe.dev.off(). - Fixed issue with
warning()call reported by CRAN.
- C++
Published by dmurdoch about 2 years ago
rgl - v1.2.1
rgl 1.2.1
Major changes
- Support for non-PNG textures has been added. Currently
supported: JPEG files and any other object
for which
grDevices::as.raster()works, e.g. matrices. (Fixes issue #196.)
Minor changes
- Support for "alt" text has been added to
rglwidget(). Full support in R Markdown orknitrrequires aknitrupdate to version 1.42.12 or newer. - Some of the tests have been relaxed slightly so they shouldn't trigger errors on the M1Mac test platform.
- Internally, the C++ code has dropped the use of the internally
defined
Stringtype, settling onstd::stringinstead. subdivision3d(),clipMesh3d()and related functions now (optionally) record the original faces associated with each new one in amesh$tagsaddition to the output.
Bug fixes
- The
Makevars.winfile was being produced incorrectly on older Windows versions. rgl.window2user()did not work correctly when multiple panes were showing. This causedarrow3d()to fail in some panes (issue #354).selectpoints3d()had a typo which was revealed by warnings in recent R versions.getShaders()was broken in 1.1.3.arc3d()can now handle "arcs" that are straight lines along a radius (issue #357).- Spheres did not show textures correctly (issue #360).
hover3d()failed to display default labels in R (issue #362).shade3d()didn't handle meshes with a mix of triangles and quads properly whenmeshColor == "faces".subdivision3d()and related functions now handle colors properly.addNormals()sometimes gaveNaNvalues due to rounding error (issue #372).arc3d()sometimes missed plotting the last segment of the arc (issue #369).R_NO_REMAPhas been defined and header includes have been rearranged to prevent conflict between R internals and C++17 library. (Thanks to Prof. B. D. Ripley and G. Csardi for suggested fixes.)
- C++
Published by dmurdoch over 2 years ago
rgl - v1.1.3
rgl 1.1.3
Major changes
- A new function
hover3d()has been added to display "hover hints": labels next to points when the mouse passes near them. - A new material property
"texmode"has been added to control how textures are applied. The default is"modulate", consistent with previous versions. If set to"replace", the texture is displayed without any lighting effects or dependence on the original color of the surface. - Many of the demos have been moved to a new vignette called
demos. rglnow uses thegladloader which will eventually allow access to newer OpenGL functions in systems that support them.
Minor changes
- The
texenvmap = TRUEmaterial property is now supported in WebGL. - The method of including shader source code has changed to work around a limitation in Jupyter.
- The default C++ standard is now accepted, rather than requiring C++11. On R versions prior to R 4.2.0 C++11 is still requested.
Bug fixes
- The
as.mesh3d.rglId()andas.triangles3d.rglId()methods and theselectpoints3d(),writeOBJ(),writePLY()andwriteSTL()functions did not handle indices in the objects they were processing (issue #293). - Transparent planes were not always drawn properly in WebGL (issue #300).
view3d()now returns alowlevel()result so that it will be handled properly in WebGL vignettes with auto printing.- If
transform3d()orrotate3d()changed the orientation of amesh3dobject with normals, the normals ended up with the wrong sign. (Reported by Stephane Laurent.) scene3d()(and hencerglwidget()) did not save the normals for unlit objects. When the objects were also indexed, this prevented proper calculation of front and back. This is fixed, and a warning is issued if normals are not provided when needed.- It was possible to call
glVersionbefore OpenGL was initialized; this resulted in a segfault with the newgladloader, and may have been the cause of some older crashes as well. This has been fixed. readOBJ()did not handle comments properly.- Sprites consisting only of line segments (as used
for example by
pch3d()) caused rendering to fail inrglwidget()(issue #316). - Headers have been cleaned up to fix problems identified by Rtools43.
- C++
Published by dmurdoch almost 3 years ago
rgl - v1.0.1
Major changes
- The long promised deprecations of the
rgl.*functions have happened. Now deprecated:rgl.abclines,rgl.bbox,rgl.bg,rgl.clear,rgl.clipplanes,rgl.close,rgl.light,rgl.lines,rgl.linestrips,rgl.material,rgl.open,rgl.planes,rgl.points,rgl.quads,rgl.select3d,rgl.set,rgl.setAxisCallback,rgl.sprites,rgl.surface,rgl.texts,rgl.triangles, andrgl.viewpoint. - A vignette "Deprecating the
rgl.*interface" has been added. - Also deprecated:
elementId2Prefix,writeWebGL
Minor changes
- Since
rgl.materialis deprecated and no longer contains the list of material types in its argument list,rgl.material.namesandrgl.material.readonlyhave been added. - Similarly,
rgl.par3d.namesandrgl.par3d.readonlycontain lists of properties that may be set or queried inpar3d(). - The flexibility improvements for
surface3d()in 0.111.6 were incomplete. - Argument
fliphas been added tosurface3d()to allow front and back to be switched.
- C++
Published by dmurdoch about 3 years ago
rgl - v0.111.6
Minor changes
- Added a panning example to the help page for
setUserCallbacks(). - Replaced all calls to
sprintffrom C/C++ code with calls tosnprintf. surface3dandrgl.surfaceare now more flexible, allowing any of the 3 coordinates to be a vector or matrix as long as at least one is a matrix.material3dcan now specify anidto query properties for individual objects.- Since
rgl.materialis soon to be deprecated and no longer contain the list of material types in its argument list,rgl.material.namesandrgl.material.readonlyhave been added. - Similarly,
rgl.par3d.namesandrgl.par3d.readonlycontain lists of properties that may be set or queried inpar3d(). - Made some examples conditional on interactive use to save time on CRAN.
Bug fixes
- Default mouse modes used when a window is opened by an
rgl.*call (which is not recommended!) now match the defaults inrgl::r3dDefaults. - Missing values could cause
surface3d()to segfault. - The C source code for
gl2psGetFileFormatmissed declaring a prototype.
- C++
Published by dmurdoch about 3 years ago
rgl - rgl 0.109.6
Minor changes
rglwidget()displays now act on “pointer” events, not just “mouse” events, so they should be more usable on touch screens and tablets (PR #240).
Bug fixes
- Plotting
scene3d()objects didn’t handle suppressed axes properly, drawing the default axis instead (issue #241). - On some systems using X11, rgl would segfault when the “fixed” font was not found.
- X11 errors could cause R to abort.
- C++
Published by dmurdoch over 3 years ago
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 forembedding = "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
MATntypes inBufferare returned as arrays with dimc(n, n, count). - The
plot3d.rglscenemethod 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 ofrotating = TRUE, to allow 3D sprites to rotate with the scene.- Added
getShaders()function to get shaders used in WebGL. - Now detects if
rglis 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
pkgdown2.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 handlesuseNULLandsilentarguments 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
webshot2is on CRAN, instructions for installing it from Github have been removed. - Sometimes
webshot2snapshots are very slow, so the default for thewebshotargument tosnapshot3d()now depends on theRGL_USE_WEBSHOTenvironment variable, usingTRUEif 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
akimapackage 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 == xif they were not in the current subscene.- The default values for
frontandbackinrgl.materialandmaterial3dare now"filled", as documented in some places. - The
fogsetting wasn't handled properly bybg3d(). - Numerous cases of partial argument matching were fixed (suggestion of Henrik Bengtsson in issue #170.)
- Argument
colis accepted as a synonym forcolorinmaterial3d()andrgl.material(). planes3d()objects were not displayed consistently inrglwindows 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
knitrandrmarkdown, 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 by
plotmath3d(). 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,
rglscenes 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 whencrosstalkwas uninstalled.
- C++
Published by dmurdoch over 3 years ago
rgl - rgl 0.107.14
Major changes
- Added
expect_known_scene()function to work withtestthat. - Added some
testthattests. - 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 in
bboxdecoobjects. - Most drawing functions can now draw in the margins
using new material properties
marginandfloating, with objects that move as the bounding box changes. See?mtext3dfor 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
shinyandmanipulateWidgetpackages have been changed from imports that are always loaded to suggested packages that will only be loaded if needed. This will reduce the "footprint" ofrglfor 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
knitrhas now been removed. - Added documentation of Javascript to web page.
- The handling of the
RGL_DEBUGGINGenvironment variable has changed: now it must look likeTRUEto trigger Javascript debugging mode. - Argument
webshot = TRUEhas been added tomovie3d(issue #113). - The assert() macro is now always defined.
- In Windows, the
WM_PAINThandler 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 ofwaldo.
Bug fixes
- The bug workaround in 0.105.22 for issue #27 triggered a bug
in RStudio, resulting in two RStudio processes showing up
when
rglwas loaded. The workaround is now skipped when RStudio is detected. Useoptions(startQuartz = TRUE)in RStudio before loadingrglto run it, oroptions(startQuartz = FALSE)to suppress it. - In some cases, snapshots in
rmarkdowndocuments were produced at the wrong size. - Controls failed to modify sphere colors (e.g. as in
example(playwidget), issue #102)
- C++
Published by dmurdoch about 4 years ago
rgl - 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 an
indicesparameter, similar to the indices inmesh3dobjects. - Added
Bufferobject, based on glTF design, for holding binary data forrglwidget().
Minor changes
- Allowed for a third coordinate in
text3d()'sadjparameter. - Added support for
adj,posandoffsettosprites3d(). - Added support for
posvalues of0(at specified location),5(in front of it), and6(behind it) intext3d(),sprites3d()andplotmath3d(). crosstalkis now a Suggested package, rather than a required one.- The
Makevars.ucrtfile 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.deldirversion 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
of
asHomogeneous(),asEuclidean()etc. more consistent. - An
as.rglscene()generic has been added, though no methods are defined in this package. downlit0.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
--staticflag 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.
rglcould not find routines in the DLL on some Windows installs (Issue 148.)- Some cases where allocations were not protected have been fixed.
- C++
Published by dmurdoch about 4 years ago