Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Highlight and Enlarge points #123

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

janithwanni
Copy link
Contributor

Depends on: #122
Changes:

  • Adds R functions enlarge_points and highlight_points through a proxy
  • Adds family of R functions clear_* to clear points, edges, highlights and enlarge through a proxy
  • Adds button to clear added points and edges.

@janithwanni janithwanni force-pushed the feat/highlight-enlarge-points branch from a05cf48 to 9872622 Compare October 25, 2024 11:35
@janithwanni janithwanni force-pushed the feat/highlight-enlarge-points branch from 9872622 to b393221 Compare October 30, 2024 08:37
@janithwanni
Copy link
Contributor Author

Hi @casperhart,

I finally managed to clean up all the PRs with demos. This PR introduces,

  • Methods to highlight points (increase alpha relatively) in the given dataset and enlarge points in the given dataset.
  • Button to clear aesthetics and additional points.
  • Aesthetics for the created points.

The demo is located at demo/shiny_detourr/detour_shiny_feature_demo.R

detourr_highlight_enlarge_recording

@janithwanni janithwanni marked this pull request as ready for review November 5, 2024 10:06
Comment on lines +244 to +247
force_rerender <- function(proxy) {
proxy$session$sendCustomMessage("clear-enlarge", list(id = proxy$id))
return(proxy)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional function to call render on the scene

#'
#' @param proxy proxy object created by \code{\link{display_scatter_proxy}}
#' @param point_list Numeric vector. indexes to highlight in the prinary dataset
#' @param alpha The transparency value of the points outside of the point_list
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alpha parameter points towards the alpha of the points outside because the points given by the id list will have an alpha of 1

@@ -1,5 +1,5 @@
export const VERTEX_SHADER_2D = `
uniform float size;
attribute float size;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made changes to the vertex shader to be able to change the size as an attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant