Skip to content

Bivariate Support - #765

Merged
TheJeran merged 23 commits into
mainfrom
jp/var2
Sep 26, 2026
Merged

TheJeran merged 23 commits into
mainfrom
jp/var2

Conversation

@TheJeran

@TheJeran TheJeran commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

New Features

  • Bivariate colormapping — Visualize two variables at once using a 2D color scheme (blended from four corner colors: bottom-left, top-left, bottom-right, and a configurable mix mode/resolution), instead of the previous single-variable colormap.
  • Second variable selection — New SecondVariable / VariableCombo UI lets users pick a second variable to pair with the primary one, with a quick "swap" control to flip which variable maps to which axis.
  • Bivariate colorbar — A new 2D colorbar (BivariateColorbar, BivariateColor, BivariateCanvas) with axis labels, hover support, and titles, alongside the existing univariate colorbar (UnivariateColor, UnivariateColorbar).
  • Point cloud bivariate coloring — Bivariate color mapping now also works in point cloud rendering mode, in addition to flat, sphere, and their displacement/volumetric variants.
  • Bivariate-aware image export — Export now supports multiple colorbar labels/units (cbarLabels/cbarUnits arrays) so exported images correctly reflect both variables.

Refactors / Breaking Internal Changes

  • Global store now supports arrays for per-variable state: valueScales, units, scalingFactor → scalingFactors, and colormap-related state moved out of GlobalStore into a new dedicated ColormapStore.
  • variable is now string | undefined (was defaulting to "Default"), with a new variable2: string | undefined for the second variable, and a new bivariate: boolean / shareScale: boolean flag pair.
  • zMeta is now object[] | undefined instead of defaulting to [{}].
  • Shader chunks reorganized: new shared commonHelpers.glsl / commonUniforms.glsl, plus blend-mode support added to fragment shaders (flatFrag, sphereFrag, sphereBlocksFrag, pointFrag, rayMarchFragment, DDAFrag).

Fixes / Stability

  • Multiple "code review" passes fixing shader/UI stability issues introduced during bivariate development (per commit history: "stability changes from code review," "Code review bug fixes and shader tweaks").
  • Adjustment menu settings now conditionally hidden depending on univariate/bivariate mode.

Removed

  • TextureStore.ts deleted — its responsibilities were absorbed into ColormapStore/GlobalStore.

@TheJeran TheJeran changed the title Jp/var2 Bivariate Support Sep 25, 2026
@TheJeran
TheJeran marked this pull request as ready for review September 26, 2026 18:27
@TheJeran
TheJeran merged commit 0833e48 into main Sep 26, 2026
6 checks passed
@TheJeran
TheJeran deleted the jp/var2 branch September 26, 2026 18:38
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