`plot_3d` ignores the `...` arguments [BUG]
dmurdoch opened this issue · comments
Describe the bug
The help page for plot_3d
says ...
contains "Additional arguments to pass to the 'rgl::par3d' function." However, the dots are never used in plot_3d
. There's one commented out line
Line 356 in 81f95cf
but no actual use.
Session Info
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.7.1
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
time zone: America/Toronto
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rayshader_0.35.7
loaded via a namespace (and not attached):
[1] crayon_1.5.2 vctrs_0.6.4 doParallel_1.0.17 cli_3.6.1 knitr_1.45 rlang_1.1.2
[7] xfun_0.41 Rttf2pt1_1.3.12 jsonlite_1.8.7 prettyunits_1.2.0 extrafontdb_1.0 htmltools_0.5.7
[13] hms_1.1.3 fastmap_1.1.1 base64enc_0.1-3 progress_1.2.2 foreach_1.5.2 lifecycle_1.0.4
[19] rgl_1.2.1 compiler_4.3.1 codetools_0.2-19 Rcpp_1.0.11 htmlwidgets_1.6.2 pkgconfig_2.0.3
[25] extrafont_0.19 digest_0.6.33 R6_2.5.1 parallel_4.3.1 magrittr_2.0.3 tools_4.3.1
[31] iterators_1.0.14
Reproducible Example
Please provide a reproducible example that triggers the bug below.
library(rayshader)
montereybay %>%
sphere_shade(texture="desert") %>%
plot_3d(montereybay,zscale=50, mouseMode = c(none = "none", left = "trackball", right = "zoom", middle = "fov",
wheel = "fov"))
rgl::par3d("mouseMode")
Note that uncommenting line 356 is not sufficient; it should be replaced with something like
rgl::par3d(...)
after all other changes to par3d()
settings have been made, i.e. at the very end of the function (since aspect3d()
changes the par3d("scale")
value.)
Thanks for the report! The ... argument was vestigial documentation--all the the relevant par3d settings now have an explicit argument in the function. The latest version removes the ... from the documentation to represent the current state of the code.