Skip to content

Commit 783ffcd

Browse files
committed
Move deprecated fns to defunct
1 parent d7cf458 commit 783ffcd

File tree

11 files changed

+131
-756
lines changed

11 files changed

+131
-756
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* The WebGL code did not handle the case of lit objects
44
with no lights properly. Now they display the emission
55
color only. (Issue #494).
6+
* Several deprecated functions have been made defunct.
67

78
# rgl 1.3.31
89

@@ -18,8 +19,12 @@ has been dropped at the request of CRAN.
1819
## Bug fixes
1920

2021
* `arrow3d(type = "extrusion")` was broken by the changes to triangulation in version 1.3.16.
22+
<<<<<<< Updated upstream
2123
* Changes last year to `writePLY()` introduced an error
2224
in some cases (issue #489).
25+
=======
26+
* Many deprecated functions have been made defunct.
27+
>>>>>>> Stashed changes
2328
2429
# rgl 1.3.24
2530

R/callbacks.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ rgl.getWheelCallback <- function(dev = cur3d(), subscene = currentSubscene3d(dev
1515

1616
rgl.setAxisCallback <- function(axis, draw = NULL, dev = cur3d(), subscene = currentSubscene3d(dev)) {
1717

18-
.Deprecated("setAxisCallbacks")
18+
.Defunct("setAxisCallbacks")
1919

20-
stopifnot(length(axis) == 1, axis %in% 1:3)
21-
.Call(rgl_setAxisCallback, draw, as.integer(dev), as.integer(subscene), as.integer(axis - 1))
22-
invisible(NULL)
2320
}
2421

2522
rgl.getAxisCallback <- function(axis, dev = cur3d(), subscene = currentSubscene3d(dev)) {

R/device.R

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,7 @@ rgl.useNULL <- function() {
2828

2929
rgl.open <- function(useNULL = rgl.useNULL()) {
3030

31-
.Deprecated("open3d")
32-
33-
ret <- .C( rgl_dev_open, success=FALSE, useNULL=useNULL,
34-
antialias = as.integer(getOption("rgl.antialias", -1L)))
35-
36-
if (! ret$success)
37-
stop("'rgl.open' failed")
31+
.Defunct("open3d")
3832

3933
}
4034

@@ -45,19 +39,7 @@ rgl.open <- function(useNULL = rgl.useNULL()) {
4539
##
4640

4741
rgl.close <- function() {
48-
49-
.Deprecated("close3d")
50-
51-
if (length(hook <- getHook("on.rgl.close"))) {
52-
if (is.list(hook)) hook <- hook[[1]] # test is for compatibility with R < 3.0.0
53-
hook()
54-
}
55-
56-
ret <- .C( rgl_dev_close, success=FALSE )
57-
58-
if (! ret$success)
59-
stop("No device opened")
60-
42+
.Defunct("close3d")
6143
}
6244

6345
##
@@ -75,18 +57,7 @@ rgl.dev.list <- function()
7557
##
7658

7759
rgl.set <- function(which, silent = FALSE) {
78-
79-
.Deprecated("set3d")
80-
81-
idata <- c( as.integer(which), as.integer(silent) )
82-
83-
ret <- .C( rgl_dev_setcurrent,
84-
success=FALSE,
85-
idata
86-
)
87-
88-
if (! ret$success)
89-
stop(gettextf("No device opened with id %s", which), domain = NA)
60+
.Defunct("set3d")
9061
}
9162

9263

R/material.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ rgl.material0 <- function(
136136
}
137137

138138
rgl.material <- function(...) {
139-
.Deprecated("material3d")
140-
rgl.material0(...)
139+
.Defunct("material3d")
141140
}
142141

143142
rgl.getcolorcount <- function() .C( rgl_getcolorcount, count=integer(1) )$count

R/rglcontroller.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,7 @@ par3dinterpControl <- function(fn, from, to, steps, subscene = NULL,
201201
# imports those into the real scene object.
202202

203203
elementId2Prefix <- function(elementId, prefix = elementId) {
204-
.Deprecated("", msg = "This function is not needed if you use rglwidget().")
205-
cat(paste0("<script>var ", prefix, "rgl = {};</script>"))
206-
playwidget(elementId, structure(list(type = "oldBridge",
207-
prefix = prefix),
208-
class = "rglControl"),
209-
components = character(0))
204+
.Defunct("", msg = "This function is not needed if you use rglwidget().")
210205
}
211206

212207
# This puts together a custom message for a more extensive change

0 commit comments

Comments
 (0)