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

Add support for axis stretches #85

Merged
merged 6 commits into from
Nov 14, 2024
Merged

Conversation

Carifio24
Copy link
Member

Currently plugin exports don't respect the axis stretch values of the viewer state. This PR adds support for stretches, and generally cleans up the functions related to putting the coordinates of the exported data into clip space.

The current approach of the plugin is to do the following: in native aspect mode, we make the largest coordinate range to (-1, 1) and others to the appropriate fraction. In non-native aspect mode, every range is mapped to (-1, 1).

With this PR, in native aspect mode we instead find the max of (range * stretch) across coordinates, which gets mapped to (-1, 1), and map other axis to range * stretch / max(range * stretch). And in non-native aspect mode, we map the range that's maximally stretched to (-1,1), and the others to the appropriate fraction.

@Carifio24 Carifio24 added the enhancement New feature or request label Nov 14, 2024
@Carifio24 Carifio24 merged commit 0a11430 into glue-viz:master Nov 14, 2024
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant