rgl 鼠标滚轮只影响最后一个子场景

rgl mouse wheel affects only last subscene

rgl::mfrow3d 允许在同一个 rgl 中绘制多个子场景 window.

点击并拖动子场景会按预期旋转场景。 但是,滚动鼠标滚轮只会缩放最后一个子场景。有没有办法用鼠标滚轮缩放鼠标所在的场景?

可以在文档中找到一个简单的示例:

shapes <- list(Tetrahedron = tetrahedron3d(), Cube = cube3d(), Octahedron = octahedron3d(),
               Icosahedron = icosahedron3d(), Dodecahedron = dodecahedron3d(),
               Cuboctahedron = cuboctahedron3d())
col <- rainbow(6)
open3d()
mfrow3d(3, 2)
for (i in 1:6) {
  next3d()   # won't advance the first time, since it is empty
  shade3d(shapes[[i]], col = col[i])
}
highlevel(integer()) # To trigger display as rglwidget

rgl 的 CRAN 版本(版本 0.100.30)中存在错误。它应该在开发版本(0.100.33 或更高版本)中得到修复。请参阅 获取它的位置。

在固定版本中,鼠标滚轮会影响上次单击鼠标的子场景,而不是最后创建的子场景。