Closed trevorld closed 1 year ago
There was no behavior to deal with NULLs before, but try the latest commit: it should handle NULLs by returning the non-NULL object (or by returning NULL if both are NULL.
There was no behavior to deal with NULLs before
In the previous CRAN release v0.3.3 (6930a8855e1887817091fb7a47021c418f20aa2f) add_shape(NULL, NULL)
would return NULL
but this very well could have been an accidental unplanned behavior.
try the latest commit: it should handle NULLs by returning the non-NULL object (or by returning NULL if both are NULL
I'm observing that add_shape(NULL, NULL)
now returns NULL
as it did in v0.3.3 but that scene_from_list(list(NULL, NULL))
now throws an error (which it didn't in the last CRAN release v0.4.11):
scene_from_list(list(NULL, NULL))
Error in do.call(rbind, old_scene$vertices) :
second argument must be a list
One possible solution may be to filter the scene_list
in scene_from_list()
using Filter(Negate(is.null), scene_list)
Unlike earlier versions of
{rayvertex}
whereadd_shape(NULL, NULL)
returned aNULL
I now observe that it throws an ERROR:In contrast
scene_from_list()
does seem to handle this case:Is there something else I should be using for a "null" mesh other than
NULL
(i.e. a mesh too small or transparent that we know won't be visible and shouldn't be drawn as sometimes happens in animation transitions when things are appearing or disappearing)?