@genome-spy/core 0.70.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/index.es.js +3923 -3598
- package/dist/bundle/index.js +150 -143
- package/dist/bundle/parquetRead-BnAGCa4_.js +1663 -0
- package/dist/schema.json +0 -48
- package/dist/src/data/formats/parquet.d.ts +12 -0
- package/dist/src/data/formats/parquet.d.ts.map +1 -0
- package/dist/src/data/formats/parquet.js +29 -0
- package/dist/src/data/formats/parquetRead.d.ts +18 -0
- package/dist/src/data/formats/parquetRead.d.ts.map +1 -0
- package/dist/src/data/formats/parquetRead.js +326 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +8 -3
- package/dist/src/encoder/encoder.d.ts +2 -2
- package/dist/src/fonts/bmFontManager.d.ts +1 -1
- package/dist/src/genome/genome.d.ts +1 -1
- package/dist/src/genomeSpy/containerUi.d.ts.map +1 -1
- package/dist/src/genomeSpy/containerUi.js +0 -1
- package/dist/src/genomeSpy/viewHighlight.js +2 -2
- package/dist/src/genomeSpy.d.ts +3 -3
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +29 -3
- package/dist/src/gl/hashTable.d.ts +78 -0
- package/dist/src/gl/hashTable.d.ts.map +1 -0
- package/dist/src/gl/hashTable.js +164 -0
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +12 -6
- package/dist/src/marks/mark.d.ts +2 -2
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +2 -3
- package/dist/src/spec/view.d.ts +0 -10
- package/dist/src/utils/keyboardZoomMotion.d.ts +93 -0
- package/dist/src/utils/keyboardZoomMotion.d.ts.map +1 -0
- package/dist/src/utils/keyboardZoomMotion.js +285 -0
- package/dist/src/utils/radixSort.d.ts.map +1 -1
- package/dist/src/utils/radixSort.js +26 -1
- package/dist/src/view/axisGridView.d.ts +1 -1
- package/dist/src/view/axisGridView.js +0 -1
- package/dist/src/view/axisView.d.ts +1 -1
- package/dist/src/view/concatView.d.ts +6 -3
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +9 -2
- package/dist/src/view/containerMutationHelper.d.ts +6 -6
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerView.d.ts +7 -5
- package/dist/src/view/containerView.d.ts.map +1 -1
- package/dist/src/view/containerView.js +4 -1
- package/dist/src/view/facetView.d.ts +2 -2
- package/dist/src/view/flowBuilder.d.ts +1 -1
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +3 -3
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +0 -2
- package/dist/src/view/gridView/gridView.d.ts +13 -11
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +17 -26
- package/dist/src/view/gridView/keyboardZoomController.d.ts +21 -0
- package/dist/src/view/gridView/keyboardZoomController.d.ts.map +1 -0
- package/dist/src/view/gridView/keyboardZoomController.js +202 -0
- package/dist/src/view/gridView/scrollbar.d.ts +1 -1
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +0 -1
- package/dist/src/view/gridView/selectionRect.d.ts +1 -1
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +0 -1
- package/dist/src/view/gridView/separatorView.js +0 -1
- package/dist/src/view/gridView/zoomNavigationUtils.d.ts +19 -0
- package/dist/src/view/gridView/zoomNavigationUtils.d.ts.map +1 -0
- package/dist/src/view/gridView/zoomNavigationUtils.js +51 -0
- package/dist/src/view/layerView.d.ts +8 -5
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +6 -2
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +0 -1
- package/dist/src/view/unitView.d.ts +8 -5
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +5 -1
- package/dist/src/view/view.d.ts +13 -9
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +7 -1
- package/dist/src/view/viewError.d.ts +1 -1
- package/dist/src/view/viewError.d.ts.map +1 -1
- package/dist/src/view/viewFactory.d.ts +3 -44
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +28 -69
- package/dist/src/view/viewSelectors.d.ts.map +1 -1
- package/dist/src/view/viewSelectors.js +123 -160
- package/dist/src/view/viewSpecGuards.d.ts +43 -0
- package/dist/src/view/viewSpecGuards.d.ts.map +1 -0
- package/dist/src/view/viewSpecGuards.js +69 -0
- package/dist/src/view/viewUtils.d.ts +1 -1
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/zoom.d.ts +1 -0
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +5 -1
- package/package.json +4 -3
- package/dist/src/data/collector.test.d.ts +0 -2
- package/dist/src/data/collector.test.d.ts.map +0 -1
- package/dist/src/data/dataFlow.test.d.ts +0 -2
- package/dist/src/data/dataFlow.test.d.ts.map +0 -1
- package/dist/src/data/flow.test.d.ts +0 -2
- package/dist/src/data/flow.test.d.ts.map +0 -1
- package/dist/src/data/flowInit.test.d.ts +0 -2
- package/dist/src/data/flowInit.test.d.ts.map +0 -1
- package/dist/src/data/flowNode.test.d.ts +0 -2
- package/dist/src/data/flowNode.test.d.ts.map +0 -1
- package/dist/src/data/flowOptimizer.test.d.ts +0 -2
- package/dist/src/data/flowOptimizer.test.d.ts.map +0 -1
- package/dist/src/data/formats/fasta.test.d.ts +0 -2
- package/dist/src/data/formats/fasta.test.d.ts.map +0 -1
- package/dist/src/data/keyIndex.test.d.ts +0 -2
- package/dist/src/data/keyIndex.test.d.ts.map +0 -1
- package/dist/src/data/sources/inlineSource.test.d.ts +0 -2
- package/dist/src/data/sources/inlineSource.test.d.ts.map +0 -1
- package/dist/src/data/sources/sequenceSource.test.d.ts +0 -2
- package/dist/src/data/sources/sequenceSource.test.d.ts.map +0 -1
- package/dist/src/data/transforms/aggregate.test.d.ts +0 -2
- package/dist/src/data/transforms/aggregate.test.d.ts.map +0 -1
- package/dist/src/data/transforms/clone.test.d.ts +0 -2
- package/dist/src/data/transforms/clone.test.d.ts.map +0 -1
- package/dist/src/data/transforms/coverage.test.d.ts +0 -2
- package/dist/src/data/transforms/coverage.test.d.ts.map +0 -1
- package/dist/src/data/transforms/filter.test.d.ts +0 -2
- package/dist/src/data/transforms/filter.test.d.ts.map +0 -1
- package/dist/src/data/transforms/filterScoredLabels.test.d.ts +0 -2
- package/dist/src/data/transforms/filterScoredLabels.test.d.ts.map +0 -1
- package/dist/src/data/transforms/flatten.test.d.ts +0 -2
- package/dist/src/data/transforms/flatten.test.d.ts.map +0 -1
- package/dist/src/data/transforms/flattenDelimited.test.d.ts +0 -2
- package/dist/src/data/transforms/flattenDelimited.test.d.ts.map +0 -1
- package/dist/src/data/transforms/flattenSequence.test.d.ts +0 -2
- package/dist/src/data/transforms/flattenSequence.test.d.ts.map +0 -1
- package/dist/src/data/transforms/formula.test.d.ts +0 -2
- package/dist/src/data/transforms/formula.test.d.ts.map +0 -1
- package/dist/src/data/transforms/identifier.test.d.ts +0 -2
- package/dist/src/data/transforms/identifier.test.d.ts.map +0 -1
- package/dist/src/data/transforms/pileup.test.d.ts +0 -2
- package/dist/src/data/transforms/pileup.test.d.ts.map +0 -1
- package/dist/src/data/transforms/project.test.d.ts +0 -2
- package/dist/src/data/transforms/project.test.d.ts.map +0 -1
- package/dist/src/data/transforms/regexExtract.test.d.ts +0 -2
- package/dist/src/data/transforms/regexExtract.test.d.ts.map +0 -1
- package/dist/src/data/transforms/regexFold.test.d.ts +0 -2
- package/dist/src/data/transforms/regexFold.test.d.ts.map +0 -1
- package/dist/src/data/transforms/sample.test.d.ts +0 -2
- package/dist/src/data/transforms/sample.test.d.ts.map +0 -1
- package/dist/src/data/transforms/stack.test.d.ts +0 -2
- package/dist/src/data/transforms/stack.test.d.ts.map +0 -1
- package/dist/src/encoder/accessor.test.d.ts +0 -2
- package/dist/src/encoder/accessor.test.d.ts.map +0 -1
- package/dist/src/encoder/encoder.test.d.ts +0 -2
- package/dist/src/encoder/encoder.test.d.ts.map +0 -1
- package/dist/src/encoder/metadataChannels.test.d.ts +0 -2
- package/dist/src/encoder/metadataChannels.test.d.ts.map +0 -1
- package/dist/src/genome/genome.test.d.ts +0 -2
- package/dist/src/genome/genome.test.d.ts.map +0 -1
- package/dist/src/genome/genomes.test.d.ts +0 -2
- package/dist/src/genome/genomes.test.d.ts.map +0 -1
- package/dist/src/genome/scaleIndex.test.d.ts +0 -2
- package/dist/src/genome/scaleIndex.test.d.ts.map +0 -1
- package/dist/src/genome/scaleLocus.test.d.ts +0 -2
- package/dist/src/genome/scaleLocus.test.d.ts.map +0 -1
- package/dist/src/genomeSpy/viewDataInit.test.d.ts +0 -2
- package/dist/src/genomeSpy/viewDataInit.test.d.ts.map +0 -1
- package/dist/src/gl/colorUtils.test.d.ts +0 -2
- package/dist/src/gl/colorUtils.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/expressionRef.test.d.ts +0 -2
- package/dist/src/paramRuntime/expressionRef.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/graphRuntime.test.d.ts +0 -2
- package/dist/src/paramRuntime/graphRuntime.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/paramRuntime.test.d.ts +0 -2
- package/dist/src/paramRuntime/paramRuntime.test.d.ts.map +0 -1
- package/dist/src/paramRuntime/paramStore.test.d.ts +0 -2
- package/dist/src/paramRuntime/paramStore.test.d.ts.map +0 -1
- package/dist/src/scale/scale.test.d.ts +0 -2
- package/dist/src/scale/scale.test.d.ts.map +0 -1
- package/dist/src/scale/ticks.test.d.ts +0 -2
- package/dist/src/scale/ticks.test.d.ts.map +0 -1
- package/dist/src/scales/axisResolution.test.d.ts +0 -2
- package/dist/src/scales/axisResolution.test.d.ts.map +0 -1
- package/dist/src/scales/domainPlanner.test.d.ts +0 -2
- package/dist/src/scales/domainPlanner.test.d.ts.map +0 -1
- package/dist/src/scales/scaleInstanceManager.test.d.ts +0 -2
- package/dist/src/scales/scaleInstanceManager.test.d.ts.map +0 -1
- package/dist/src/scales/scaleInteractionController.test.d.ts +0 -2
- package/dist/src/scales/scaleInteractionController.test.d.ts.map +0 -1
- package/dist/src/scales/scaleResolution.test.d.ts +0 -2
- package/dist/src/scales/scaleResolution.test.d.ts.map +0 -1
- package/dist/src/scales/scaleRules.test.d.ts +0 -2
- package/dist/src/scales/scaleRules.test.d.ts.map +0 -1
- package/dist/src/selection/selection.test.d.ts +0 -2
- package/dist/src/selection/selection.test.d.ts.map +0 -1
- package/dist/src/tooltip/dataTooltipHandler.test.d.ts +0 -2
- package/dist/src/tooltip/dataTooltipHandler.test.d.ts.map +0 -1
- package/dist/src/tooltip/flattenDatumRows.test.d.ts +0 -2
- package/dist/src/tooltip/flattenDatumRows.test.d.ts.map +0 -1
- package/dist/src/tooltip/tooltipContext.test.d.ts +0 -2
- package/dist/src/tooltip/tooltipContext.test.d.ts.map +0 -1
- package/dist/src/utils/addBaseUrl.test.d.ts +0 -2
- package/dist/src/utils/addBaseUrl.test.d.ts.map +0 -1
- package/dist/src/utils/binnedIndex.test.d.ts +0 -2
- package/dist/src/utils/binnedIndex.test.d.ts.map +0 -1
- package/dist/src/utils/cloner.test.d.ts +0 -2
- package/dist/src/utils/cloner.test.d.ts.map +0 -1
- package/dist/src/utils/coalesce.test.d.ts +0 -2
- package/dist/src/utils/coalesce.test.d.ts.map +0 -1
- package/dist/src/utils/concatIterables.test.d.ts +0 -2
- package/dist/src/utils/concatIterables.test.d.ts.map +0 -1
- package/dist/src/utils/deepEqual.test.d.ts +0 -2
- package/dist/src/utils/deepEqual.test.d.ts.map +0 -1
- package/dist/src/utils/domainArray.test.d.ts +0 -2
- package/dist/src/utils/domainArray.test.d.ts.map +0 -1
- package/dist/src/utils/fetchUtils.test.d.ts +0 -2
- package/dist/src/utils/fetchUtils.test.d.ts.map +0 -1
- package/dist/src/utils/indexer.test.d.ts +0 -2
- package/dist/src/utils/indexer.test.d.ts.map +0 -1
- package/dist/src/utils/interactionEvent.test.d.ts +0 -2
- package/dist/src/utils/interactionEvent.test.d.ts.map +0 -1
- package/dist/src/utils/iterateNestedMaps.test.d.ts +0 -2
- package/dist/src/utils/iterateNestedMaps.test.d.ts.map +0 -1
- package/dist/src/utils/kWayMerge.test.d.ts +0 -2
- package/dist/src/utils/kWayMerge.test.d.ts.map +0 -1
- package/dist/src/utils/mergeObjects.test.d.ts +0 -2
- package/dist/src/utils/mergeObjects.test.d.ts.map +0 -1
- package/dist/src/utils/numberExtractor.test.d.ts +0 -2
- package/dist/src/utils/numberExtractor.test.d.ts.map +0 -1
- package/dist/src/utils/propertyCacher.test.d.ts +0 -2
- package/dist/src/utils/propertyCacher.test.d.ts.map +0 -1
- package/dist/src/utils/propertyCoalescer.test.d.ts +0 -2
- package/dist/src/utils/propertyCoalescer.test.d.ts.map +0 -1
- package/dist/src/utils/radixSort.test.d.ts +0 -2
- package/dist/src/utils/radixSort.test.d.ts.map +0 -1
- package/dist/src/utils/reservationMap.test.d.ts +0 -2
- package/dist/src/utils/reservationMap.test.d.ts.map +0 -1
- package/dist/src/utils/ringBuffer.test.d.ts +0 -2
- package/dist/src/utils/ringBuffer.test.d.ts.map +0 -1
- package/dist/src/utils/throttle.test.d.ts +0 -2
- package/dist/src/utils/throttle.test.d.ts.map +0 -1
- package/dist/src/utils/topK.test.d.ts +0 -2
- package/dist/src/utils/topK.test.d.ts.map +0 -1
- package/dist/src/utils/trees.test.d.ts +0 -2
- package/dist/src/utils/trees.test.d.ts.map +0 -1
- package/dist/src/utils/ui/tooltip.test.d.ts +0 -2
- package/dist/src/utils/ui/tooltip.test.d.ts.map +0 -1
- package/dist/src/utils/url.test.d.ts +0 -2
- package/dist/src/utils/url.test.d.ts.map +0 -1
- package/dist/src/utils/variableTools.test.d.ts +0 -2
- package/dist/src/utils/variableTools.test.d.ts.map +0 -1
- package/dist/src/view/concatView.test.d.ts +0 -2
- package/dist/src/view/concatView.test.d.ts.map +0 -1
- package/dist/src/view/dataReadiness.test.d.ts +0 -2
- package/dist/src/view/dataReadiness.test.d.ts.map +0 -1
- package/dist/src/view/flowBuilder.test.d.ts +0 -2
- package/dist/src/view/flowBuilder.test.d.ts.map +0 -1
- package/dist/src/view/gridView/gridView.test.d.ts +0 -2
- package/dist/src/view/gridView/gridView.test.d.ts.map +0 -1
- package/dist/src/view/gridView/selectionRect.test.d.ts +0 -2
- package/dist/src/view/gridView/selectionRect.test.d.ts.map +0 -1
- package/dist/src/view/layerView.test.d.ts +0 -2
- package/dist/src/view/layerView.test.d.ts.map +0 -1
- package/dist/src/view/layout/flexLayout.test.d.ts +0 -2
- package/dist/src/view/layout/flexLayout.test.d.ts.map +0 -1
- package/dist/src/view/layout/grid.test.d.ts +0 -2
- package/dist/src/view/layout/grid.test.d.ts.map +0 -1
- package/dist/src/view/layout/rectangle.test.d.ts +0 -2
- package/dist/src/view/layout/rectangle.test.d.ts.map +0 -1
- package/dist/src/view/multiscale.test.d.ts +0 -2
- package/dist/src/view/multiscale.test.d.ts.map +0 -1
- package/dist/src/view/view.test.d.ts +0 -2
- package/dist/src/view/view.test.d.ts.map +0 -1
- package/dist/src/view/viewDispose.test.d.ts +0 -2
- package/dist/src/view/viewDispose.test.d.ts.map +0 -1
- package/dist/src/view/viewFactory.test.d.ts +0 -2
- package/dist/src/view/viewFactory.test.d.ts.map +0 -1
- package/dist/src/view/viewParamRuntime.test.d.ts +0 -2
- package/dist/src/view/viewParamRuntime.test.d.ts.map +0 -1
- package/dist/src/view/viewSelectors.test.d.ts +0 -2
- package/dist/src/view/viewSelectors.test.d.ts.map +0 -1
- package/dist/src/view/viewUtils.test.d.ts +0 -2
- package/dist/src/view/viewUtils.test.d.ts.map +0 -1
package/dist/src/genomeSpy.d.ts
CHANGED
|
@@ -28,11 +28,11 @@ export default class GenomeSpy {
|
|
|
28
28
|
*
|
|
29
29
|
* @type {(view: View) => boolean}
|
|
30
30
|
*/
|
|
31
|
-
viewVisibilityPredicate: (view: import("./view/view.js").default) => boolean;
|
|
31
|
+
viewVisibilityPredicate: (view: import("./view/view.js").default<import("./spec/view.js").ViewSpec>) => boolean;
|
|
32
32
|
/** @type {Record<string, import("./tooltip/tooltipHandler.js").TooltipHandler>}> */
|
|
33
33
|
tooltipHandlers: Record<string, import("./tooltip/tooltipHandler.js").TooltipHandler>;
|
|
34
34
|
/** @type {View} */
|
|
35
|
-
viewRoot: import("./view/view.js").default
|
|
35
|
+
viewRoot: import("./view/view.js").default<import("./spec/view.js").ViewSpec>;
|
|
36
36
|
dpr: number;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
@@ -104,7 +104,7 @@ export default class GenomeSpy {
|
|
|
104
104
|
computeLayout(): void;
|
|
105
105
|
renderAll(): void;
|
|
106
106
|
renderPickingFramebuffer(): void;
|
|
107
|
-
getSearchableViews(): UnitView[];
|
|
107
|
+
getSearchableViews(): UnitView<import("./spec/view.js").UnitSpec>[];
|
|
108
108
|
getNamedScaleResolutions(): Map<string, import("./scales/scaleResolution.js").default>;
|
|
109
109
|
#private;
|
|
110
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genomeSpy.d.ts","sourceRoot":"","sources":["../../src/genomeSpy.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"genomeSpy.d.ts","sourceRoot":"","sources":["../../src/genomeSpy.js"],"names":[],"mappings":"AAiDA;IAoBI;;;;;OAKG;IAEH;;;;;OAKG;IACH,uBAJW,WAAW,qDAEX,OAAO,qBAAqB,EAAE,YAAY,EA0CpD;IAvCG,uBAA0B;IAC1B,oDAAsB;IAItB,sCAAsC;IACtC,wCAAgB;IAEhB,yBAAoC;IAEpC,4CAA4C;IAC5C,oBADW,CAAC,CAAS,IAAM,EAAN,MAAM,KAAE,MAAM,EAAE,CAAC,EAAE,CACZ;IAE5B,mBAAoD;IAEpD,0BAA0B;IAC1B,aADW,WAAW,CACM;IAE5B;;;;;OAKG;IACH,yBAFU,CAAC,IAAI,qEAAM,KAAK,OAAO,CAE8B;IAE/D,oFAAoF;IACpF,iBADW,MAAM,CAAC,MAAM,EAAE,OAAO,6BAA6B,EAAE,cAAc,CAAC,CAK9E;IAED,mBAAmB;IACnB,8EAAyB;IAIzB,YAAkC;IAatC;;;OAGG;IACH,oCAFW,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,EAAE,QAIjC;IAED;;OAEG;IACH,+BAFW,MAAM,YAShB;IAED;;;;OAIG;IACH,sBAHW,MAAM,QACN,GAAG,EAAE,QAYf;IAED;;;OAGG;IACH,uBAHW,MAAM,YACN,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,QAI9B;IAED;;;OAGG;IACH,0BAHW,MAAM,YACN,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,QAI9B;IAED;;;;;OAKG;IACH,gBAHW,kBAAkB,YAClB,GAAG,QAMb;IA8DG,iDAAsB;IAQ1B;;OAEG;IACH,gBAqBC;IA+KD;;;OAGG;IACH,UAFa,OAAO,CAAC,OAAO,CAAC,CAyC5B;IAED,2CAiBC;IAED,4BAEC;IAED;;;;;;;OAOG;IACH,cAFa,CAAC,SAFH,CAAC,cACD,CAAS,IAAC,EAAD,CAAC,KAAE,OAAO,CAAC,MAAM,GAAG,WAAW,GAAG,OAAO,KAAK,EAAE,cAAc,CAAC,QAKlF;IAED;;;;;;;;OAQG;IACH,4BANW,MAAM,kBACN,MAAM,qBACN,MAAM,eACN,MAAM,UAuBhB;IAED;;;MAEC;IAED,sBAEC;IAED,kBAEC;IAED,iCAEC;IAED,oEAYC;IAED,uFAWC;;CACJ;;;;iCAhkBY,eAAe,GAAG,QAAQ,GAAG,gBAAgB,GAAG,kBAAkB;4BAdnC,uBAAuB;qBAR9C,qBAAqB;wBAElB,yBAAyB;qBAL5B,oBAAoB"}
|
package/dist/src/genomeSpy.js
CHANGED
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
} from "./genomeSpy/viewHierarchyConfig.js";
|
|
38
38
|
import { exportCanvas } from "./genomeSpy/canvasExport.js";
|
|
39
39
|
import { validateSelectorConstraints } from "./view/viewSelectors.js";
|
|
40
|
+
import parquet from "./data/formats/parquet.js";
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
43
|
* Events that are broadcasted to all views.
|
|
@@ -44,6 +45,7 @@ import { validateSelectorConstraints } from "./view/viewSelectors.js";
|
|
|
44
45
|
*/
|
|
45
46
|
|
|
46
47
|
vegaFormats("fasta", fasta);
|
|
48
|
+
vegaFormats("parquet", parquet);
|
|
47
49
|
|
|
48
50
|
export default class GenomeSpy {
|
|
49
51
|
/** @type {(() => void)[]} */
|
|
@@ -253,6 +255,8 @@ export default class GenomeSpy {
|
|
|
253
255
|
{ powerPreference: this.options.powerPreference ?? "default" }
|
|
254
256
|
);
|
|
255
257
|
|
|
258
|
+
canvasWrapper.appendChild(loadingIndicatorsElement);
|
|
259
|
+
|
|
256
260
|
this.tooltip = tooltip;
|
|
257
261
|
this.#loadingStatusRegistry = new LoadingStatusRegistry();
|
|
258
262
|
this.#loadingIndicatorManager = new LoadingIndicatorManager(
|
|
@@ -322,9 +326,11 @@ export default class GenomeSpy {
|
|
|
322
326
|
getCurrentHover: () =>
|
|
323
327
|
this.#interactionController.getCurrentHover(),
|
|
324
328
|
addKeyboardListener: (type, listener) => {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
329
|
+
this.#keyboardListenerManager.add(type, (event) => {
|
|
330
|
+
if (this.#shouldDispatchKeyboardEvent(type, event)) {
|
|
331
|
+
listener(event);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
328
334
|
},
|
|
329
335
|
addBroadcastListener: (type, listener) =>
|
|
330
336
|
this.#extraBroadcastListeners.add(type, listener),
|
|
@@ -352,6 +358,26 @@ export default class GenomeSpy {
|
|
|
352
358
|
});
|
|
353
359
|
}
|
|
354
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Scopes keydown events to the active embed (focused container or hovered container).
|
|
363
|
+
* Keyup is always dispatched so key-state machines can reliably release keys.
|
|
364
|
+
*
|
|
365
|
+
* @param {"keydown" | "keyup"} type
|
|
366
|
+
* @param {KeyboardEvent} event
|
|
367
|
+
*/
|
|
368
|
+
#shouldDispatchKeyboardEvent(type, event) {
|
|
369
|
+
if (type === "keyup") {
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const activeElement = document.activeElement;
|
|
374
|
+
if (activeElement && activeElement !== document.body) {
|
|
375
|
+
return this.container.contains(activeElement);
|
|
376
|
+
} else {
|
|
377
|
+
return this.container.matches(":hover");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
355
381
|
/**
|
|
356
382
|
* @param {import("./types/viewContext.js").default} context
|
|
357
383
|
*/
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build-time options for sizing the hash table.
|
|
3
|
+
*
|
|
4
|
+
* @typedef {object} HashTableBuildOptions
|
|
5
|
+
* @property {number} [capacity] Power-of-two table size override.
|
|
6
|
+
* @property {number} [maxLoadFactor] Maximum load factor before resizing.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Packed table payload ready for WebGL texture upload.
|
|
10
|
+
*
|
|
11
|
+
* @typedef {object} HashTableBuildResult
|
|
12
|
+
* @property {Uint32Array} table Hash table slots that contain keys.
|
|
13
|
+
* @property {number} capacity Table capacity (number of slots).
|
|
14
|
+
* @property {number} size Number of stored keys.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* 32-bit integer hash for u32 keys. Keep in sync with GLSL hash32.
|
|
18
|
+
*
|
|
19
|
+
* @param {number} value
|
|
20
|
+
* @returns {number}
|
|
21
|
+
*/
|
|
22
|
+
export function hash32(value: number): number;
|
|
23
|
+
/**
|
|
24
|
+
* Build a hash table for set membership checks.
|
|
25
|
+
*
|
|
26
|
+
* @param {Iterable<number>} keys
|
|
27
|
+
* @param {HashTableBuildOptions} [options]
|
|
28
|
+
* @returns {HashTableBuildResult}
|
|
29
|
+
*/
|
|
30
|
+
export function buildHashTableSet(keys: Iterable<number>, options?: HashTableBuildOptions): HashTableBuildResult;
|
|
31
|
+
/**
|
|
32
|
+
* Computes a 2D texture layout for a power-of-two hash table capacity.
|
|
33
|
+
*
|
|
34
|
+
* The returned dimensions satisfy `width * height === capacity`.
|
|
35
|
+
*
|
|
36
|
+
* @param {number} capacity
|
|
37
|
+
* @param {number} maxTextureSize
|
|
38
|
+
* @returns {{ width: number, height: number }}
|
|
39
|
+
*/
|
|
40
|
+
export function computeHashTextureDimensions(capacity: number, maxTextureSize: number): {
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
};
|
|
44
|
+
/** Sentinel key that marks an empty hash slot. */
|
|
45
|
+
export const HASH_EMPTY_KEY: 4294967295;
|
|
46
|
+
/** Default maximum load factor for table sizing. */
|
|
47
|
+
export const DEFAULT_MAX_LOAD_FACTOR: 0.6;
|
|
48
|
+
/**
|
|
49
|
+
* Build-time options for sizing the hash table.
|
|
50
|
+
*/
|
|
51
|
+
export type HashTableBuildOptions = {
|
|
52
|
+
/**
|
|
53
|
+
* Power-of-two table size override.
|
|
54
|
+
*/
|
|
55
|
+
capacity?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Maximum load factor before resizing.
|
|
58
|
+
*/
|
|
59
|
+
maxLoadFactor?: number;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Packed table payload ready for WebGL texture upload.
|
|
63
|
+
*/
|
|
64
|
+
export type HashTableBuildResult = {
|
|
65
|
+
/**
|
|
66
|
+
* Hash table slots that contain keys.
|
|
67
|
+
*/
|
|
68
|
+
table: Uint32Array;
|
|
69
|
+
/**
|
|
70
|
+
* Table capacity (number of slots).
|
|
71
|
+
*/
|
|
72
|
+
capacity: number;
|
|
73
|
+
/**
|
|
74
|
+
* Number of stored keys.
|
|
75
|
+
*/
|
|
76
|
+
size: number;
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=hashTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashTable.d.ts","sourceRoot":"","sources":["../../../src/gl/hashTable.js"],"names":[],"mappings":"AAQA;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,8BAHW,MAAM,GACJ,MAAM,CAUlB;AAED;;;;;;GAMG;AACH,wCAJW,QAAQ,CAAC,MAAM,CAAC,YAChB,qBAAqB,GACnB,oBAAoB,CAkDhC;AAED;;;;;;;;GAQG;AACH,uDAJW,MAAM,kBACN,MAAM,GACJ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA+B7C;AAxID,kDAAkD;AAClD,6BAA8B,UAAW,CAAC;AAE1C,oDAAoD;AACpD,sCAAuC,GAAG,CAAC;;;;;;;;eAQ7B,MAAM;;;;oBACN,MAAM;;;;;;;;;WAON,WAAW;;;;cACX,MAAM;;;;UACN,MAAM"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/** Sentinel key that marks an empty hash slot. */
|
|
2
|
+
export const HASH_EMPTY_KEY = 0xffff_ffff;
|
|
3
|
+
|
|
4
|
+
/** Default maximum load factor for table sizing. */
|
|
5
|
+
export const DEFAULT_MAX_LOAD_FACTOR = 0.6;
|
|
6
|
+
|
|
7
|
+
const MAX_U32 = 0xffff_ffff;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Build-time options for sizing the hash table.
|
|
11
|
+
*
|
|
12
|
+
* @typedef {object} HashTableBuildOptions
|
|
13
|
+
* @property {number} [capacity] Power-of-two table size override.
|
|
14
|
+
* @property {number} [maxLoadFactor] Maximum load factor before resizing.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Packed table payload ready for WebGL texture upload.
|
|
19
|
+
*
|
|
20
|
+
* @typedef {object} HashTableBuildResult
|
|
21
|
+
* @property {Uint32Array} table Hash table slots that contain keys.
|
|
22
|
+
* @property {number} capacity Table capacity (number of slots).
|
|
23
|
+
* @property {number} size Number of stored keys.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 32-bit integer hash for u32 keys. Keep in sync with GLSL hash32.
|
|
28
|
+
*
|
|
29
|
+
* @param {number} value
|
|
30
|
+
* @returns {number}
|
|
31
|
+
*/
|
|
32
|
+
export function hash32(value) {
|
|
33
|
+
let v = value >>> 0;
|
|
34
|
+
v ^= v >>> 16;
|
|
35
|
+
v = Math.imul(v, 0x7feb352d);
|
|
36
|
+
v ^= v >>> 15;
|
|
37
|
+
v = Math.imul(v, 0x846ca68b);
|
|
38
|
+
v ^= v >>> 16;
|
|
39
|
+
return v >>> 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Build a hash table for set membership checks.
|
|
44
|
+
*
|
|
45
|
+
* @param {Iterable<number>} keys
|
|
46
|
+
* @param {HashTableBuildOptions} [options]
|
|
47
|
+
* @returns {HashTableBuildResult}
|
|
48
|
+
*/
|
|
49
|
+
export function buildHashTableSet(keys, options = {}) {
|
|
50
|
+
const normalized = Array.from(keys, (key) => normalizeU32(key, "key"));
|
|
51
|
+
const size = normalized.length;
|
|
52
|
+
const maxLoadFactor = options.maxLoadFactor ?? DEFAULT_MAX_LOAD_FACTOR;
|
|
53
|
+
if (!(maxLoadFactor > 0 && maxLoadFactor < 1)) {
|
|
54
|
+
throw new Error("maxLoadFactor must be between 0 and 1.");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const capacity =
|
|
58
|
+
options.capacity ?? nextPow2(Math.ceil(size / maxLoadFactor));
|
|
59
|
+
if (!Number.isSafeInteger(capacity) || capacity < 1) {
|
|
60
|
+
throw new Error("capacity must be a positive power of two.");
|
|
61
|
+
}
|
|
62
|
+
if ((capacity & (capacity - 1)) !== 0) {
|
|
63
|
+
throw new Error("capacity must be a power of two.");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const table = new Uint32Array(capacity);
|
|
67
|
+
table.fill(HASH_EMPTY_KEY);
|
|
68
|
+
|
|
69
|
+
const mask = capacity - 1;
|
|
70
|
+
for (const key of normalized) {
|
|
71
|
+
if (key === HASH_EMPTY_KEY) {
|
|
72
|
+
throw new Error(
|
|
73
|
+
"Hash table keys must not equal the empty sentinel (0xffffffff)."
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
let index = hash32(key) & mask;
|
|
77
|
+
let inserted = false;
|
|
78
|
+
|
|
79
|
+
for (let probe = 0; probe < capacity; probe += 1) {
|
|
80
|
+
const existingKey = table[index];
|
|
81
|
+
if (existingKey === HASH_EMPTY_KEY || existingKey === key) {
|
|
82
|
+
table[index] = key;
|
|
83
|
+
inserted = true;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
index = (index + 1) & mask;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!inserted) {
|
|
90
|
+
throw new Error(
|
|
91
|
+
"Hash table insertion failed. Increase capacity or lower load factor."
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return { table, capacity, size };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Computes a 2D texture layout for a power-of-two hash table capacity.
|
|
101
|
+
*
|
|
102
|
+
* The returned dimensions satisfy `width * height === capacity`.
|
|
103
|
+
*
|
|
104
|
+
* @param {number} capacity
|
|
105
|
+
* @param {number} maxTextureSize
|
|
106
|
+
* @returns {{ width: number, height: number }}
|
|
107
|
+
*/
|
|
108
|
+
export function computeHashTextureDimensions(capacity, maxTextureSize) {
|
|
109
|
+
if (!Number.isSafeInteger(capacity) || capacity < 1) {
|
|
110
|
+
throw new Error("capacity must be a positive integer.");
|
|
111
|
+
}
|
|
112
|
+
if ((capacity & (capacity - 1)) !== 0) {
|
|
113
|
+
throw new Error("capacity must be a power of two.");
|
|
114
|
+
}
|
|
115
|
+
if (!Number.isSafeInteger(maxTextureSize) || maxTextureSize < 1) {
|
|
116
|
+
throw new Error("maxTextureSize must be a positive integer.");
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const maxSlots = maxTextureSize * maxTextureSize;
|
|
120
|
+
if (capacity > maxSlots) {
|
|
121
|
+
throw new Error(
|
|
122
|
+
"Selection hash table exceeds maximum texture capacity."
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const maxPow2Width = 1 << Math.floor(Math.log2(maxTextureSize));
|
|
127
|
+
const width = Math.min(capacity, maxPow2Width);
|
|
128
|
+
const height = capacity / width;
|
|
129
|
+
|
|
130
|
+
if (height > maxTextureSize) {
|
|
131
|
+
throw new Error(
|
|
132
|
+
"Selection hash table dimensions exceed maximum texture size."
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return { width, height };
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @param {number} value
|
|
141
|
+
* @param {string} label
|
|
142
|
+
* @returns {number}
|
|
143
|
+
*/
|
|
144
|
+
function normalizeU32(value, label) {
|
|
145
|
+
if (!Number.isSafeInteger(value) || value < 0 || value > MAX_U32) {
|
|
146
|
+
throw new Error(label + " must be a non-negative u32.");
|
|
147
|
+
}
|
|
148
|
+
return value >>> 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @param {number} value
|
|
153
|
+
* @returns {number}
|
|
154
|
+
*/
|
|
155
|
+
function nextPow2(value) {
|
|
156
|
+
let v = Math.max(1, value);
|
|
157
|
+
v -= 1;
|
|
158
|
+
v |= v >>> 1;
|
|
159
|
+
v |= v >>> 2;
|
|
160
|
+
v |= v >>> 4;
|
|
161
|
+
v |= v >>> 8;
|
|
162
|
+
v |= v >>> 16;
|
|
163
|
+
return v + 1;
|
|
164
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const shader = "#define PI 3.141593\nuniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}bool
|
|
1
|
+
const shader = "#define PI 3.141593\nuniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}const highp uint HASH_EMPTY_KEY=0xffffffffu;highp uint hash32(highp uint key){highp uint v=key;v ^=v>>16u;v*=0x7feb352du;v ^=v>>15u;v*=0x846ca68bu;v ^=v>>16u;return v;}bool isEmptyHashTexture(highp usampler2D s){ivec2 texSize=textureSize(s,0);return texSize.x==1&&texSize.y==1&&texelFetch(s,ivec2(0,0),0).r==HASH_EMPTY_KEY;}bool hashContainsTexture(highp usampler2D s,highp uint value){ivec2 texSize=textureSize(s,0);highp uint width=uint(texSize.x);highp uint size=width*uint(texSize.y);highp uint mask=size-1u;highp uint index=hash32(value)&mask;for(highp uint probe=0u;probe<size;probe+=1u){ivec2 coord=ivec2(int(index % width),int(index/width));highp uint entry=texelFetch(s,coord,0).r;if(entry==value){return true;}if(entry==HASH_EMPTY_KEY){return false;}index=(index+1u)&mask;}return false;}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,vec4 background,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : background,distanceToRatio(sd));}else{return mix(background,fill,distanceToRatio(-d));}}";
|
|
2
2
|
export default shader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webGLHelper.d.ts","sourceRoot":"","sources":["../../../src/gl/webGLHelper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webGLHelper.d.ts","sourceRoot":"","sources":["../../../src/gl/webGLHelper.js"],"names":[],"mappings":"AA+ZA;;;;GAIG;AACH,kCAJW,sBAAsB,gBACtB,WAAW,kBACX,WAAW;;;;;;EA8CrB;AAED;;;;;GAKG;AACH,0CALW,qBAAqB,WACrB,IAAI,CAAC,OAAO,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,OAC7C,MAAM,EAAE,GAAG,eAAe,YAC1B,YAAY,gBAYtB;AAED;;;;;;GAMG;AACH,qCALW,sBAAsB,mBACtB,OAAO,SAAS,EAAE,eAAe,KACjC,MAAM,KACN,MAAM,2BAWhB;AAED;;;;;GAKG;AACH,yCAJW,sBAAsB,mBACtB,OAAO,SAAS,EAAE,eAAe,SACjC,MAAM,UA4BhB;AApfD;IACI;;;;;;;OAOG;IACH,uBANW,WAAW,eACX,MAAM;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,2BAGrC,sBAAsB,EAsFhC;IAnFG,wBAA2B;IAC3B;;;MAKO;IAEP,uCAAuC;IACvC,cADW,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CACN;IAE7B,6EAA6E;IAC7E,eADW,OAAO,CAAC,OAAO,qBAAqB,EAAE,SAAS,EAAE,YAAY,CAAC,CACvC;IAElC;;OAEG;IACH,mBAFU,OAAO,CAAC,OAAO,4BAA4B,EAAE,mBAAmB,EAAE,YAAY,CAAC,CAEnD;IA8CtC,0BAAoB;IACpB,2BAAY;IAGZ,oDAAoD;IACpD,2BADW,OAAO,SAAS,EAAE,iBAAiB,EAAE,CAQ/C;IACD,sDAGC;IAML,uBAGC;IAFG;;;MAAmC;IAIvC;;;;;OAKG;IACH,oBAHW,MAAM,QACN,MAAM,GAAG,MAAM,EAAE,eA2B3B;IAED,iBAcC;IAED,iBAEC;IAED;;;;OAIG;IACH,oCAFW;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;;;MAS3C;IAED;;;OAGG;IACH;;;MAuBC;IAED;;;;;;;;;OASG;IACH,+BAHW,OAAO,8BAA8B,EAAE,OAAO,WAC9C,OAAO,QA2GjB;IAED;;OAEG;IACH,kCAFW,OAAO,4BAA4B,EAAE,mBAAmB,0BAiClE;CACJ"}
|
|
@@ -27,6 +27,10 @@ import {
|
|
|
27
27
|
isDiscreteChannel,
|
|
28
28
|
} from "../encoder/encoder.js";
|
|
29
29
|
import { isMultiPointSelection } from "../selection/selection.js";
|
|
30
|
+
import {
|
|
31
|
+
buildHashTableSet,
|
|
32
|
+
computeHashTextureDimensions,
|
|
33
|
+
} from "./hashTable.js";
|
|
30
34
|
|
|
31
35
|
export default class WebGLHelper {
|
|
32
36
|
/**
|
|
@@ -351,9 +355,11 @@ export default class WebGLHelper {
|
|
|
351
355
|
);
|
|
352
356
|
}
|
|
353
357
|
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
|
|
358
|
+
const { table, capacity } = buildHashTableSet(selection.data.keys());
|
|
359
|
+
const { width, height } = computeHashTextureDimensions(
|
|
360
|
+
capacity,
|
|
361
|
+
this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE)
|
|
362
|
+
);
|
|
357
363
|
|
|
358
364
|
const existingTexture = this.selectionTextures.get(selection);
|
|
359
365
|
|
|
@@ -365,10 +371,10 @@ export default class WebGLHelper {
|
|
|
365
371
|
minMag: gl.NEAREST,
|
|
366
372
|
format: gl.RED_INTEGER,
|
|
367
373
|
internalFormat: gl.R32UI,
|
|
368
|
-
|
|
369
|
-
|
|
374
|
+
width,
|
|
375
|
+
height,
|
|
370
376
|
},
|
|
371
|
-
|
|
377
|
+
table,
|
|
372
378
|
update ? existingTexture : false
|
|
373
379
|
);
|
|
374
380
|
|
package/dist/src/marks/mark.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export default class Mark<P extends import("../spec/mark.js").MarkProps = import
|
|
|
23
23
|
* @param {import("../view/unitView.js").default} unitView
|
|
24
24
|
*/
|
|
25
25
|
constructor(unitView: import("../view/unitView.js").default);
|
|
26
|
-
unitView: import("../view/unitView.js").default
|
|
26
|
+
unitView: import("../view/unitView.js").default<import("../spec/view.js").UnitSpec>;
|
|
27
27
|
/** @type {Partial<Record<Channel, import("../types/encoder.js").Encoder>>} */
|
|
28
28
|
encoders: Partial<Record<import("../spec/channel.js").Channel, import("../types/encoder.js").Encoder>>;
|
|
29
29
|
/**
|
|
@@ -137,7 +137,7 @@ export default class Mark<P extends import("../spec/mark.js").MarkProps = import
|
|
|
137
137
|
*/
|
|
138
138
|
get encoding(): import("../spec/channel.js").Encoding;
|
|
139
139
|
getContext(): import("../types/viewContext.js").default;
|
|
140
|
-
getType(): "link" | "
|
|
140
|
+
getType(): "link" | "point" | "text" | "rect" | "rule";
|
|
141
141
|
initializeData(): void;
|
|
142
142
|
/**
|
|
143
143
|
* Initialize encoders that encode fields of the data (or constants) to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../../../src/marks/mark.js"],"names":[],"mappings":"AA6DA,mCAAoC,sBAAsB,CAAC;AAC3D,mCAAoC,sBAAsB,CAAC;AAE3D,uCAAwC,oBAAoB,CAAC;AAE7D;;;;;;;;;;;;;GAaG;AAEH;;GAEG;AACH,0BAF0B,CAAC,SAAd,mCAAW;IAkBpB;;OAEG;IACH,sBAFW,OAAO,qBAAqB,EAAE,OAAO,EA4G/C;IAzGG,
|
|
1
|
+
{"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../../../src/marks/mark.js"],"names":[],"mappings":"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"}
|
package/dist/src/marks/mark.js
CHANGED
|
@@ -528,8 +528,7 @@ export default class Mark {
|
|
|
528
528
|
}
|
|
529
529
|
} else if (isMultiPointSelection(selection)) {
|
|
530
530
|
// We need a texture for each multi-selection parameter.
|
|
531
|
-
// The texture
|
|
532
|
-
// in ascending order, which allows for binary search.
|
|
531
|
+
// The texture stores an open-addressing hash table of selected uniqueIds.
|
|
533
532
|
if (!selectionParameterUniforms.has(param)) {
|
|
534
533
|
selectionParameterUniforms.set(param, "multi");
|
|
535
534
|
|
|
@@ -560,7 +559,7 @@ export default class Mark {
|
|
|
560
559
|
const texName = SELECTION_TEXTURE_PREFIX + param;
|
|
561
560
|
scaleCode.push(
|
|
562
561
|
`bool ${SELECTION_CHECKER_PREFIX}${param}(bool empty) {\n` +
|
|
563
|
-
` return
|
|
562
|
+
` return hashContainsTexture(${texName}, ${uniqueIdAttr}) || (empty && isEmptyHashTexture(${texName}));\n` +
|
|
564
563
|
`}`
|
|
565
564
|
);
|
|
566
565
|
|
package/dist/src/spec/view.d.ts
CHANGED
|
@@ -233,16 +233,6 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
233
233
|
*/
|
|
234
234
|
visible?: boolean;
|
|
235
235
|
|
|
236
|
-
/**
|
|
237
|
-
* Is the visibility configurable interactively from the [GenomeSpy
|
|
238
|
-
* App](https://genomespy.app/docs/sample-collections/).
|
|
239
|
-
* Configurability requires that the view has an explicitly specified name
|
|
240
|
-
* that is unique within its import scope.
|
|
241
|
-
*
|
|
242
|
-
* **Default:** `false` for children of `layer`, `true` for others.
|
|
243
|
-
*/
|
|
244
|
-
configurableVisibility?: boolean;
|
|
245
|
-
|
|
246
236
|
/**
|
|
247
237
|
* [Templates](https://genomespy.app/docs/grammar/import/#repeating-with-named-templates)
|
|
248
238
|
* that can be reused within the view specification by importing them with the template key.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export namespace DEFAULT_KEYBOARD_ZOOM_MOTION_CONFIG {
|
|
2
|
+
namespace pan {
|
|
3
|
+
let baseSpeed: number;
|
|
4
|
+
let maxExtraSpeed: number;
|
|
5
|
+
let pressHalfLifeMs: number;
|
|
6
|
+
let releaseHalfLifeMs: number;
|
|
7
|
+
let holdGrowthHalfLifeMs: number;
|
|
8
|
+
let stopVelocity: number;
|
|
9
|
+
}
|
|
10
|
+
namespace zoom {
|
|
11
|
+
let baseSpeed_1: number;
|
|
12
|
+
export { baseSpeed_1 as baseSpeed };
|
|
13
|
+
let maxExtraSpeed_1: number;
|
|
14
|
+
export { maxExtraSpeed_1 as maxExtraSpeed };
|
|
15
|
+
let pressHalfLifeMs_1: number;
|
|
16
|
+
export { pressHalfLifeMs_1 as pressHalfLifeMs };
|
|
17
|
+
let releaseHalfLifeMs_1: number;
|
|
18
|
+
export { releaseHalfLifeMs_1 as releaseHalfLifeMs };
|
|
19
|
+
let holdGrowthHalfLifeMs_1: number;
|
|
20
|
+
export { holdGrowthHalfLifeMs_1 as holdGrowthHalfLifeMs };
|
|
21
|
+
let stopVelocity_1: number;
|
|
22
|
+
export { stopVelocity_1 as stopVelocity };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Handles smooth WASD navigation motion with acceleration and braking.
|
|
27
|
+
*/
|
|
28
|
+
export default class KeyboardZoomMotion {
|
|
29
|
+
/**
|
|
30
|
+
* @param {typeof DEFAULT_KEYBOARD_ZOOM_MOTION_CONFIG} [config]
|
|
31
|
+
*/
|
|
32
|
+
constructor(config?: typeof DEFAULT_KEYBOARD_ZOOM_MOTION_CONFIG);
|
|
33
|
+
/**
|
|
34
|
+
* @param {string} code
|
|
35
|
+
*/
|
|
36
|
+
isNavigationKey(code: string): code is "KeyW" | "KeyA" | "KeyS" | "KeyD";
|
|
37
|
+
/**
|
|
38
|
+
* @param {string} code
|
|
39
|
+
* @returns {boolean} true if the key state changed
|
|
40
|
+
*/
|
|
41
|
+
handleKeyDown(code: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @param {string} code
|
|
44
|
+
* @returns {boolean} true if the key state changed
|
|
45
|
+
*/
|
|
46
|
+
handleKeyUp(code: string): boolean;
|
|
47
|
+
reset(): void;
|
|
48
|
+
/**
|
|
49
|
+
* @param {number} dtMs
|
|
50
|
+
* @returns {MotionStep}
|
|
51
|
+
*/
|
|
52
|
+
step(dtMs: number): MotionStep;
|
|
53
|
+
isActive(): boolean;
|
|
54
|
+
#private;
|
|
55
|
+
}
|
|
56
|
+
export type NavigationKeyCode = "KeyW" | "KeyA" | "KeyS" | "KeyD";
|
|
57
|
+
export type AxisProfile = {
|
|
58
|
+
/**
|
|
59
|
+
* Target speed reached rapidly after key press.
|
|
60
|
+
*/
|
|
61
|
+
baseSpeed: number;
|
|
62
|
+
/**
|
|
63
|
+
* Additional speed gained during sustained hold.
|
|
64
|
+
*/
|
|
65
|
+
maxExtraSpeed: number;
|
|
66
|
+
/**
|
|
67
|
+
* Half-life for accelerating toward target speed.
|
|
68
|
+
*/
|
|
69
|
+
pressHalfLifeMs: number;
|
|
70
|
+
/**
|
|
71
|
+
* Half-life for braking velocity after release.
|
|
72
|
+
*/
|
|
73
|
+
releaseHalfLifeMs: number;
|
|
74
|
+
/**
|
|
75
|
+
* Half-life for hold-time extra acceleration.
|
|
76
|
+
*/
|
|
77
|
+
holdGrowthHalfLifeMs: number;
|
|
78
|
+
/**
|
|
79
|
+
* Velocity threshold below which motion snaps to zero.
|
|
80
|
+
*/
|
|
81
|
+
stopVelocity: number;
|
|
82
|
+
};
|
|
83
|
+
export type AxisState = {
|
|
84
|
+
velocity: number;
|
|
85
|
+
holdMs: number;
|
|
86
|
+
direction: -1 | 0 | 1;
|
|
87
|
+
};
|
|
88
|
+
export type MotionStep = {
|
|
89
|
+
panDelta: number;
|
|
90
|
+
zoomDelta: number;
|
|
91
|
+
active: boolean;
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=keyboardZoomMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboardZoomMotion.d.ts","sourceRoot":"","sources":["../../../src/utils/keyboardZoomMotion.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmDA;;GAEG;AACH;IAcI;;OAEG;IACH,qBAFW,OAAO,mCAAmC,EAwBpD;IAED;;OAEG;IACH,sBAFW,MAAM,6CAShB;IAED;;;OAGG;IACH,oBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,kBAHW,MAAM,GACJ,OAAO,CAInB;IAED,cAaC;IAED;;;OAGG;IACH,WAHW,MAAM,GACJ,UAAU,CAwCtB;IAED,oBAWC;;CAqBJ;gCArNY,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM;;;;;eAKpC,MAAM;;;;mBACN,MAAM;;;;qBACN,MAAM;;;;uBACN,MAAM;;;;0BACN,MAAM;;;;kBACN,MAAM;;;cAKN,MAAM;YACN,MAAM;eACN,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;;;cAKV,MAAM;eACN,MAAM;YACN,OAAO"}
|