Skip to content

v2.0.0

Compare
Choose a tag to compare
@axelboc axelboc released this 17 Feb 12:57
· 1301 commits to main since this release

@h5web/app

  • ⚠️ Breaking change Importing the styles now requires importing only one stylesheet named styles.css (note the s) #942:
    /* BEFORE */
    @import '@h5web/app/dist/style-lib.css';
    @import '@h5web/app/dist/style.css';
    
    /* AFTER */
    @import '@h5web/app/dist/styles.css';
  • < Line > Allow zooming on a specific axis with mouse wheel by pressing Alt for x or Shift for y #949 #953
  • ✨ Restore last selected visualization when switching back from inspect mode to display mode #954
  • ✨ Select most advanced visualization automatically when switching between datasets, unless user has manually selected a less advanced visualization #954
  • [H5GroveProvider] Datasets fetched as binary typed arrays are no longer converted to plain JavaScript number arrays. H5Web is now capable of handling those raw typed arrays without any conversion in most cases (see below for caveats with shader-based visualizations). This leads to significant speed ups and memory savings for very large datasets. #946 #950 #951 #952 #956 #960 #964
    • < Heatmap >: float32 and uint8 data arrays are passed directly to the shader; everything else is converted to float32;
    • < RGB >: float32 and uint8 data arrays are passed directly to the shader; float64 arrays are converted to float32; int8 arrays are converted to number[] and their values incremented by 128 before being converted to uint8; everything else is converted to uint8.
  • 🐛 Fix issue with react-keyed-flatten-children import in Angular project #914
  • [App] Add prop initialPath to select a path on initial load #937
  • < RGB > RGB/BGR flip now performed entirely in shader #969
  • Avoid copying ndarray when no slicing/mapping is needed #973
  • Add CodeSandbox examples in README to demonstrate use of package in Create React App and Vite projects. #929

@h5web/lib

  • ⚠️ Breaking change Stylesheet renamed to styles.css (note the s) #942:
    /* BEFORE */
    @import '@h5web/lib/dist/style.css';
    
    /* AFTER */
    @import '@h5web/lib/dist/styles.css';
  • ⚠️ Breaking change PanZoomMesh removed in favour of two separate components: PanMesh and ZoomMesh #953 #955 #957:
    // BEFORE
    <PanZoomMesh />
    
    // AFTER
    <PanMesh />
    <ZoomMesh />
  • [LineVis] Add axial zoom interactivity (mouse wheel + Alt key for x axis; mouse wheel + Shift key for y axis)
  • ✨ New XAxisZoomMesh component to enable constrained zooming on the x axis, by default bound to the Alt key
  • ✨ New YXAxisZoomMesh component to enable constrained zooming on the y axis, by default bound to theShift key
  • ✨ New RectSelectionMesh, LineSelectionMesh and SelectionMesh components to draw selection rectangles and lines on the canvas (or other custom shapes with SelectionMesh's selectionComponent prop). #941 #944 #947 #959
  • PanMesh, ZoomMesh, XAxisZoomMesh and YAxisZoomMesh can all be disabled dynamically with optional prop disabled, and can all be bound to a specific key with optional prop modifierKey. By default, PanMesh and ZoomMesh are not bound to any key. #947 #949 #953
  • [HeatmapMesh] Now officially documented in Storybook #948
  • [HeatmapMesh] Props values and alphaValues now accept float32,uint8 and uint16 typed ndarrays. uint16 arrays are interpreted as half-floats. #946 #950 #960
    • ⚠️ Breaking change Props values and alphaValues no longer accept plain number[] ndarrays; you must convert them to one of the supported typed ndarrays beforehand - e.g. ndarray(Float32Array.from(numNdArr.data), numNdArr.shape)
  • [HeatmapMesh] Add optional prop magFilter to override ThreeJS' default texture filter (i.e. NearestFilter) #948
  • [HeatmapVis] Props dataArray and alpha.array now accept typed ndarrays - e.g. NdArray<Float32Array>. Prefer float32 and uint8 arrays for performance as they are passed directly to the shader. #946 #950 #960
  • [LineVis] Props dataArray, errorsArray and auxArrays now accept typed ndarrays #951
  • [MatrixVis] Prop dataArray now accepts typed ndarrays #952
  • 🐛 [ScatterVis] Fix y-axis domain computation #971
  • 🐛 [HeatmapVis] No longer flip children when flipY is set to true #945
  • [MatrixVis] Prop sticky is now optional and defaults to true #952
  • [DataCurve] Add optional prop visible to control the visibility of the curve #965
  • [getDomain, getDomains, useDomain, useDomains] Accept typed arrays and typed ndarrays - e.g. Float32Array, NdArray<Uint16Array>, etc. #950
  • Add hook useVisibleDomains to compute the x and y-axis domains at the current camera position and zoom level #936
  • Add hook useFrameRendering to re-render a React component on every React Three Fiber frame (e.g. when panning/zooming) #933
  • Add utility getValueToIndexScale and corresponding memoised hook to create threshold scales, which are particularly useful to recover indices from axis values in tooltips #968
  • Provide functions dataToWorld and worldToData through AxisSystemContext to convert vectors from data space to world space and back #935
  • Add CodeSandbox examples in README to demonstrate use of package in Create React App and Vite projects. #929

Screenshots

Axial zooming

Peek 2022-02-17 12-05

Rectangle selection

image