Description

This first graphic, created with rgl, includes a translucent mesh, which will lag the page if the user interacts with it. However, the lag will be subtle, due to the fact that a lightweight ply file has been used to create that translucent mesh.

rgl graphic

plyLoadR similar graphic

Show the code
# Load the same ply files, now via the plyLoadR library
library(plyLoadR)

plyLoadR(
  paths = paste0(Mainpath, "/", patient1_FolderViews),
  localFiles = TRUE,
  elementId = "plyLoadRGraphic1",
  isTransparent = TRUE,
  opacity = list(1, 0.2),
  toggleMeshes = list(
    showEvolution = FALSE,
    labels = patient1_ViewsNames
  )
)

plyLoadR: Mesh evolution

Show the code
# Load ply files with 'aligned' geometries
plyLoadR(
  paths = paste0(Mainpath, "/", patient0_FolderViews),
  localFiles = TRUE,
  elementId = "plyLoadRGraphic2",
  isTransparent = TRUE,
  opacity = 0.5,
  # ::::::::::::::::::::::::::::::::::::
  # Set camera in a specific 3D location
  camera = list(
    position = list(x = 23.417, y = -8.950, z = 28.593),
    up = list(x = 0.484, y = 0.615, z = 0.621)
  ),
  controls = list(
    target = list(x = 1.380, y = 1.561, z = 1.450)
  ),
  # ::::::::::::::::::::::::::::::::::::
  toggleMeshes = list(
    labels = list("2020-07-09", "2020-07-17", "2020-07-24"),
    showEvolution = TRUE
  )
)