@vitessce/scatterplot-gating 3.2.2 → 3.3.1
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/{deflate-34407526.js → deflate-636556e0.js} +1 -1
- package/dist/{index-73600fb1.js → index-f4743608.js} +160 -79
- package/dist/index.js +1 -1
- package/dist/{jpeg-d36cd1e8.js → jpeg-3383b938.js} +1 -1
- package/dist/{lerc-e5940768.js → lerc-c057e1dc.js} +1 -1
- package/dist/{lzw-66141aea.js → lzw-476a6015.js} +1 -1
- package/dist/{packbits-2838880b.js → packbits-724e9549.js} +1 -1
- package/dist/{raw-1b8265a8.js → raw-268e3c0d.js} +1 -1
- package/dist/{webimage-ae3e1d5b.js → webimage-534d8cfd.js} +1 -1
- package/package.json +6 -6
|
@@ -10927,6 +10927,7 @@ const DataType$2 = {
|
|
|
10927
10927
|
const FileType$1 = {
|
|
10928
10928
|
// Joint file types
|
|
10929
10929
|
ANNDATA_ZARR: "anndata.zarr",
|
|
10930
|
+
SPATIALDATA_ZARR: "spatialdata.zarr",
|
|
10930
10931
|
// Atomic file types
|
|
10931
10932
|
OBS_EMBEDDING_CSV: "obsEmbedding.csv",
|
|
10932
10933
|
OBS_SPOTS_CSV: "obsSpots.csv",
|
|
@@ -10949,6 +10950,16 @@ const FileType$1 = {
|
|
|
10949
10950
|
OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
|
|
10950
10951
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
10951
10952
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
10953
|
+
// SpatialData
|
|
10954
|
+
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
10955
|
+
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
10956
|
+
SHAPES_SPATIALDATA_ZARR: "shapes.spatialdata.zarr",
|
|
10957
|
+
OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
|
|
10958
|
+
OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
|
|
10959
|
+
OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
|
|
10960
|
+
// TODO:
|
|
10961
|
+
// OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
|
|
10962
|
+
// OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
|
|
10952
10963
|
// MuData
|
|
10953
10964
|
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
10954
10965
|
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
@@ -11750,9 +11761,30 @@ z.object({
|
|
|
11750
11761
|
offsetsUrl: z.string().optional(),
|
|
11751
11762
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11752
11763
|
});
|
|
11753
|
-
z.object({
|
|
11764
|
+
const imageOmeZarrSchema = z.object({
|
|
11754
11765
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11755
11766
|
});
|
|
11767
|
+
imageOmeZarrSchema.extend({
|
|
11768
|
+
path: z.string()
|
|
11769
|
+
});
|
|
11770
|
+
z.object({
|
|
11771
|
+
path: z.string()
|
|
11772
|
+
});
|
|
11773
|
+
z.object({
|
|
11774
|
+
path: z.string()
|
|
11775
|
+
});
|
|
11776
|
+
z.object({
|
|
11777
|
+
path: z.string(),
|
|
11778
|
+
tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
|
|
11779
|
+
});
|
|
11780
|
+
annDataObsFeatureMatrix.extend({
|
|
11781
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
11782
|
+
});
|
|
11783
|
+
z.object({
|
|
11784
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
11785
|
+
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
11786
|
+
obsSets: annDataObsSets
|
|
11787
|
+
});
|
|
11756
11788
|
z.object({
|
|
11757
11789
|
obsIndex: z.string(),
|
|
11758
11790
|
obsEmbedding: z.array(z.string()).length(2)
|
|
@@ -18472,9 +18504,9 @@ const schemePlasma = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138], [2
|
|
|
18472
18504
|
function rgbSpline(spline) {
|
|
18473
18505
|
return (colors) => {
|
|
18474
18506
|
const n2 = colors.length;
|
|
18475
|
-
|
|
18476
|
-
|
|
18477
|
-
|
|
18507
|
+
const r2 = new Array(n2);
|
|
18508
|
+
const g2 = new Array(n2);
|
|
18509
|
+
const b = new Array(n2);
|
|
18478
18510
|
let i2;
|
|
18479
18511
|
let color;
|
|
18480
18512
|
for (i2 = 0; i2 < n2; ++i2) {
|
|
@@ -18483,10 +18515,10 @@ function rgbSpline(spline) {
|
|
|
18483
18515
|
g2[i2] = color[1] || 0;
|
|
18484
18516
|
b[i2] = color[2] || 0;
|
|
18485
18517
|
}
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
|
|
18489
|
-
return (t2) => [
|
|
18518
|
+
const rFunc = spline(r2);
|
|
18519
|
+
const gFunc = spline(g2);
|
|
18520
|
+
const bFunc = spline(b);
|
|
18521
|
+
return (t2) => [rFunc(t2), gFunc(t2), bFunc(t2)];
|
|
18490
18522
|
};
|
|
18491
18523
|
}
|
|
18492
18524
|
function basis(values2) {
|
|
@@ -22102,7 +22134,7 @@ const jsonLoader = {
|
|
|
22102
22134
|
testText: isJSON,
|
|
22103
22135
|
parseTextSync: JSON.parse
|
|
22104
22136
|
};
|
|
22105
|
-
const version = "8.8.
|
|
22137
|
+
const version = "8.8.27";
|
|
22106
22138
|
const existingVersion = globalThis.deck && globalThis.deck.VERSION;
|
|
22107
22139
|
if (existingVersion && existingVersion !== version) {
|
|
22108
22140
|
throw new Error("deck.gl - multiple versions detected: ".concat(existingVersion, " vs ").concat(version));
|
|
@@ -23301,9 +23333,8 @@ function cssToDeviceRatio(gl) {
|
|
|
23301
23333
|
luma
|
|
23302
23334
|
} = gl;
|
|
23303
23335
|
if (gl.canvas && luma) {
|
|
23304
|
-
const
|
|
23305
|
-
|
|
23306
|
-
} = luma.canvasSizeInfo;
|
|
23336
|
+
const cachedSize = luma.canvasSizeInfo;
|
|
23337
|
+
const clientWidth = "clientWidth" in cachedSize ? cachedSize.clientWidth : gl.canvas.clientWidth;
|
|
23307
23338
|
return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
|
|
23308
23339
|
}
|
|
23309
23340
|
return 1;
|
|
@@ -23559,7 +23590,7 @@ function setDevicePixelRatio(gl, devicePixelRatio, options) {
|
|
|
23559
23590
|
});
|
|
23560
23591
|
}
|
|
23561
23592
|
}
|
|
23562
|
-
const VERSION$7 = "8.5.
|
|
23593
|
+
const VERSION$7 = "8.5.21";
|
|
23563
23594
|
const STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
23564
23595
|
class StatsManager {
|
|
23565
23596
|
constructor() {
|
|
@@ -23680,7 +23711,6 @@ let Resource$1 = class Resource {
|
|
|
23680
23711
|
this._handle = this._createHandle();
|
|
23681
23712
|
}
|
|
23682
23713
|
this.byteLength = 0;
|
|
23683
|
-
this._initStats();
|
|
23684
23714
|
this._addStats();
|
|
23685
23715
|
}
|
|
23686
23716
|
toString() {
|
|
@@ -23816,9 +23846,6 @@ let Resource$1 = class Resource {
|
|
|
23816
23846
|
this.gl.luma = this.gl.luma || {};
|
|
23817
23847
|
return this.gl.luma;
|
|
23818
23848
|
}
|
|
23819
|
-
_initStats() {
|
|
23820
|
-
this.gl.stats = this.gl.stats || new StatsManager();
|
|
23821
|
-
}
|
|
23822
23849
|
_addStats() {
|
|
23823
23850
|
const name2 = this[Symbol.toStringTag];
|
|
23824
23851
|
const stats = lumaStats.get("Resource Counts");
|
|
@@ -23833,27 +23860,29 @@ let Resource$1 = class Resource {
|
|
|
23833
23860
|
}
|
|
23834
23861
|
_trackAllocatedMemory(bytes) {
|
|
23835
23862
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
23836
|
-
this.
|
|
23837
|
-
this.
|
|
23863
|
+
this._trackAllocatedMemoryForContext(bytes, name2);
|
|
23864
|
+
this._trackAllocatedMemoryForContext(bytes, name2, this.gl.canvas && this.gl.canvas.id);
|
|
23865
|
+
this.byteLength = bytes;
|
|
23838
23866
|
}
|
|
23839
|
-
|
|
23867
|
+
_trackAllocatedMemoryForContext(bytes) {
|
|
23840
23868
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
23841
|
-
let
|
|
23869
|
+
let id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
23870
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
23842
23871
|
stats.get("GPU Memory").addCount(bytes);
|
|
23843
23872
|
stats.get("".concat(name2, " Memory")).addCount(bytes);
|
|
23844
|
-
this.byteLength = bytes;
|
|
23845
23873
|
}
|
|
23846
23874
|
_trackDeallocatedMemory() {
|
|
23847
23875
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
23848
|
-
this.
|
|
23849
|
-
this.
|
|
23876
|
+
this._trackDeallocatedMemoryForContext(name2);
|
|
23877
|
+
this._trackDeallocatedMemoryForContext(name2, this.gl.canvas && this.gl.canvas.id);
|
|
23878
|
+
this.byteLength = 0;
|
|
23850
23879
|
}
|
|
23851
|
-
|
|
23880
|
+
_trackDeallocatedMemoryForContext() {
|
|
23852
23881
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
23853
|
-
let
|
|
23882
|
+
let id = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
23883
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
23854
23884
|
stats.get("GPU Memory").subtractCount(this.byteLength);
|
|
23855
23885
|
stats.get("".concat(name2, " Memory")).subtractCount(this.byteLength);
|
|
23856
|
-
this.byteLength = 0;
|
|
23857
23886
|
}
|
|
23858
23887
|
};
|
|
23859
23888
|
const ERR_TYPE_DEDUCTION = "Failed to deduce GL constant from typed array";
|
|
@@ -37069,6 +37098,7 @@ const picking = {
|
|
|
37069
37098
|
inject: {
|
|
37070
37099
|
"vs:DECKGL_FILTER_GL_POSITION": "\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ",
|
|
37071
37100
|
"vs:DECKGL_FILTER_COLOR": "\n picking_setPickingColor(geometry.pickingColor);\n ",
|
|
37101
|
+
"fs:#decl": "\nuniform bool picking_uAttribute;\n ",
|
|
37072
37102
|
"fs:DECKGL_FILTER_COLOR": {
|
|
37073
37103
|
order: 99,
|
|
37074
37104
|
injection: "\n // use highlight color if this fragment belongs to the selected object.\n color = picking_filterHighlightColor(color);\n\n // use picking color if rendering to picking FBO.\n color = picking_filterPickingColor(color);\n "
|
|
@@ -37879,6 +37909,9 @@ class Viewport {
|
|
|
37879
37909
|
this.projectFlat = this.projectFlat.bind(this);
|
|
37880
37910
|
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
37881
37911
|
}
|
|
37912
|
+
get subViewports() {
|
|
37913
|
+
return null;
|
|
37914
|
+
}
|
|
37882
37915
|
get metersPerPixel() {
|
|
37883
37916
|
return this.distanceScales.metersPerUnit[2] / this.scale;
|
|
37884
37917
|
}
|
|
@@ -46770,7 +46803,7 @@ class Attribute extends DataColumn {
|
|
|
46770
46803
|
const {
|
|
46771
46804
|
startIndices
|
|
46772
46805
|
} = this;
|
|
46773
|
-
const vertexIndex = startIndices ? startIndices[row] : row;
|
|
46806
|
+
const vertexIndex = startIndices ? row < startIndices.length ? startIndices[row] : this.numInstances : row;
|
|
46774
46807
|
return vertexIndex * this.size;
|
|
46775
46808
|
}
|
|
46776
46809
|
getShaderAttributes() {
|
|
@@ -49414,7 +49447,7 @@ class Layer extends Component {
|
|
|
49414
49447
|
if (Array.isArray(highlightColor)) {
|
|
49415
49448
|
parameters.pickingHighlightColor = highlightColor;
|
|
49416
49449
|
}
|
|
49417
|
-
if (
|
|
49450
|
+
if (forceUpdate || highlightedObjectIndex !== oldProps.highlightedObjectIndex) {
|
|
49418
49451
|
parameters.pickingSelectedColor = Number.isFinite(highlightedObjectIndex) && highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;
|
|
49419
49452
|
}
|
|
49420
49453
|
this.setModuleParameters(parameters);
|
|
@@ -50777,7 +50810,7 @@ function interpolateQuad(quad, ut, vt) {
|
|
|
50777
50810
|
}
|
|
50778
50811
|
const vs$g = "\n#define SHADER_NAME bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float coordinateConversion;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n geometry.worldPosition = positions;\n geometry.uv = texCoords;\n geometry.pickingColor = pickingColor;\n\n gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vTexCoord = texCoords;\n\n if (coordinateConversion < -0.5) {\n vTexPos = geometry.position.xy + project_uCommonOrigin.xy;\n } else if (coordinateConversion > 0.5) {\n vTexPos = geometry.worldPosition.xy;\n }\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n";
|
|
50779
50812
|
const packUVsIntoRGB = "\nvec3 packUVsIntoRGB(vec2 uv) {\n // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n vec2 uv8bit = floor(uv * 256.);\n\n // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n // Scale and clamp to 0-1 range\n vec2 uvFraction = fract(uv * 256.);\n vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n return vec3(uv8bit, fractions) / 255.;\n}\n";
|
|
50780
|
-
const fs$i = "\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n float x = lnglat.x;\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n xy /= WORLD_SCALE;\n return degrees(vec2(\n xy.x - PI,\n atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvec2 getUV(vec2 pos) {\n return vec2(\n (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n );\n}\n\n".concat(packUVsIntoRGB, "\n\nvoid main(void) {\n vec2 uv = vTexCoord;\n if (coordinateConversion < -0.5) {\n vec2 lnglat = mercator_to_lnglat(vTexPos);\n uv = getUV(lnglat);\n } else if (coordinateConversion > 0.5) {\n vec2 commonPos = lnglat_to_mercator(vTexPos);\n uv = getUV(commonPos);\n }\n vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = uv;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n if (picking_uActive) {\n // Since instance information is not used, we can use picking color for pixel index\n gl_FragColor.rgb = packUVsIntoRGB(uv);\n }\n}\n");
|
|
50813
|
+
const fs$i = "\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n float x = lnglat.x;\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n xy /= WORLD_SCALE;\n return degrees(vec2(\n xy.x - PI,\n atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvec2 getUV(vec2 pos) {\n return vec2(\n (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n );\n}\n\n".concat(packUVsIntoRGB, "\n\nvoid main(void) {\n vec2 uv = vTexCoord;\n if (coordinateConversion < -0.5) {\n vec2 lnglat = mercator_to_lnglat(vTexPos);\n uv = getUV(lnglat);\n } else if (coordinateConversion > 0.5) {\n vec2 commonPos = lnglat_to_mercator(vTexPos);\n uv = getUV(commonPos);\n }\n vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = uv;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n if (picking_uActive && !picking_uAttribute) {\n // Since instance information is not used, we can use picking color for pixel index\n gl_FragColor.rgb = packUVsIntoRGB(uv);\n }\n}\n");
|
|
50781
50814
|
const defaultProps$I = {
|
|
50782
50815
|
image: {
|
|
50783
50816
|
type: "image",
|
|
@@ -58917,18 +58950,22 @@ function getBoundingBox(viewport, zRange, extent2) {
|
|
|
58917
58950
|
}
|
|
58918
58951
|
function getCullBounds({
|
|
58919
58952
|
viewport,
|
|
58920
|
-
z: z2,
|
|
58953
|
+
z: z2 = 0,
|
|
58921
58954
|
cullRect
|
|
58922
58955
|
}) {
|
|
58923
|
-
const
|
|
58924
|
-
|
|
58925
|
-
|
|
58926
|
-
|
|
58927
|
-
height
|
|
58928
|
-
} = cullRect;
|
|
58956
|
+
const subViewports = viewport.subViewports || [viewport];
|
|
58957
|
+
return subViewports.map((v) => getCullBoundsInViewport(v, z2, cullRect));
|
|
58958
|
+
}
|
|
58959
|
+
function getCullBoundsInViewport(viewport, z2, cullRect) {
|
|
58929
58960
|
if (!Array.isArray(z2)) {
|
|
58961
|
+
const x2 = cullRect.x - viewport.x;
|
|
58962
|
+
const y2 = cullRect.y - viewport.y;
|
|
58963
|
+
const {
|
|
58964
|
+
width,
|
|
58965
|
+
height
|
|
58966
|
+
} = cullRect;
|
|
58930
58967
|
const unprojectOption = {
|
|
58931
|
-
targetZ: z2
|
|
58968
|
+
targetZ: z2
|
|
58932
58969
|
};
|
|
58933
58970
|
const topLeft = viewport.unproject([x2, y2], unprojectOption);
|
|
58934
58971
|
const topRight = viewport.unproject([x2 + width, y2], unprojectOption);
|
|
@@ -58936,16 +58973,8 @@ function getCullBounds({
|
|
|
58936
58973
|
const bottomRight = viewport.unproject([x2 + width, y2 + height], unprojectOption);
|
|
58937
58974
|
return [Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]), Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]), Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]), Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1])];
|
|
58938
58975
|
}
|
|
58939
|
-
const bounds0 =
|
|
58940
|
-
|
|
58941
|
-
z: z2[0],
|
|
58942
|
-
cullRect
|
|
58943
|
-
});
|
|
58944
|
-
const bounds1 = getCullBounds({
|
|
58945
|
-
viewport,
|
|
58946
|
-
z: z2[1],
|
|
58947
|
-
cullRect
|
|
58948
|
-
});
|
|
58976
|
+
const bounds0 = getCullBoundsInViewport(viewport, z2[0], cullRect);
|
|
58977
|
+
const bounds1 = getCullBoundsInViewport(viewport, z2[1], cullRect);
|
|
58949
58978
|
return [Math.min(bounds0[0], bounds1[0]), Math.min(bounds0[1], bounds1[1]), Math.max(bounds0[2], bounds1[2]), Math.max(bounds0[3], bounds1[3])];
|
|
58950
58979
|
}
|
|
58951
58980
|
function getIndexingCoords(bbox2, scale2, modelMatrixInverse) {
|
|
@@ -59175,7 +59204,7 @@ class Tileset2D {
|
|
|
59175
59204
|
return false;
|
|
59176
59205
|
}
|
|
59177
59206
|
if (cullRect && this._viewport) {
|
|
59178
|
-
const
|
|
59207
|
+
const boundsArr = this._getCullBounds({
|
|
59179
59208
|
viewport: this._viewport,
|
|
59180
59209
|
z: this._zRange,
|
|
59181
59210
|
cullRect
|
|
@@ -59183,12 +59212,20 @@ class Tileset2D {
|
|
|
59183
59212
|
const {
|
|
59184
59213
|
bbox: bbox2
|
|
59185
59214
|
} = tile;
|
|
59186
|
-
|
|
59187
|
-
|
|
59215
|
+
for (const [minX, minY, maxX, maxY] of boundsArr) {
|
|
59216
|
+
let overlaps;
|
|
59217
|
+
if ("west" in bbox2) {
|
|
59218
|
+
overlaps = bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY && bbox2.north > minY;
|
|
59219
|
+
} else {
|
|
59220
|
+
const y02 = Math.min(bbox2.top, bbox2.bottom);
|
|
59221
|
+
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
59222
|
+
overlaps = bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
59223
|
+
}
|
|
59224
|
+
if (overlaps) {
|
|
59225
|
+
return true;
|
|
59226
|
+
}
|
|
59188
59227
|
}
|
|
59189
|
-
|
|
59190
|
-
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
59191
|
-
return bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
59228
|
+
return false;
|
|
59192
59229
|
}
|
|
59193
59230
|
return true;
|
|
59194
59231
|
}
|
|
@@ -59637,14 +59674,19 @@ class TileLayer extends CompositeLayer {
|
|
|
59637
59674
|
info,
|
|
59638
59675
|
sourceLayer
|
|
59639
59676
|
}) {
|
|
59677
|
+
const sourceTile = sourceLayer.props.tile;
|
|
59640
59678
|
if (info.picked) {
|
|
59641
|
-
info.tile =
|
|
59679
|
+
info.tile = sourceTile;
|
|
59642
59680
|
}
|
|
59681
|
+
info.sourceTile = sourceTile;
|
|
59643
59682
|
return info;
|
|
59644
59683
|
}
|
|
59645
59684
|
_updateAutoHighlight(info) {
|
|
59646
|
-
|
|
59647
|
-
|
|
59685
|
+
const sourceTile = info.sourceTile;
|
|
59686
|
+
if (sourceTile && sourceTile.layers) {
|
|
59687
|
+
for (const layer of sourceTile.layers) {
|
|
59688
|
+
layer.updateAutoHighlight(info);
|
|
59689
|
+
}
|
|
59648
59690
|
}
|
|
59649
59691
|
}
|
|
59650
59692
|
renderLayers() {
|
|
@@ -71962,6 +72004,9 @@ class ScenegraphNode {
|
|
|
71962
72004
|
toString() {
|
|
71963
72005
|
return "{type: ScenegraphNode, id: ".concat(this.id, ")}");
|
|
71964
72006
|
}
|
|
72007
|
+
getBounds() {
|
|
72008
|
+
return null;
|
|
72009
|
+
}
|
|
71965
72010
|
setPosition(position) {
|
|
71966
72011
|
assert$8(position.length === 3, "setPosition requires vector argument");
|
|
71967
72012
|
this.position = position;
|
|
@@ -72112,6 +72157,34 @@ class GroupNode extends ScenegraphNode {
|
|
|
72112
72157
|
this.removeAll();
|
|
72113
72158
|
super.delete();
|
|
72114
72159
|
}
|
|
72160
|
+
getBounds() {
|
|
72161
|
+
const result = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]];
|
|
72162
|
+
this.traverse((node, _ref3) => {
|
|
72163
|
+
let {
|
|
72164
|
+
worldMatrix
|
|
72165
|
+
} = _ref3;
|
|
72166
|
+
const bounds2 = node.getBounds();
|
|
72167
|
+
if (!bounds2) {
|
|
72168
|
+
return;
|
|
72169
|
+
}
|
|
72170
|
+
const [min, max] = bounds2;
|
|
72171
|
+
const center2 = new Vector3(min).add(max).divide([2, 2, 2]);
|
|
72172
|
+
worldMatrix.transformAsPoint(center2, center2);
|
|
72173
|
+
const halfSize = new Vector3(max).subtract(min).divide([2, 2, 2]);
|
|
72174
|
+
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
72175
|
+
for (let v = 0; v < 8; v++) {
|
|
72176
|
+
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
72177
|
+
for (let i2 = 0; i2 < 3; i2++) {
|
|
72178
|
+
result[0][i2] = Math.min(result[0][i2], position[i2]);
|
|
72179
|
+
result[1][i2] = Math.max(result[1][i2], position[i2]);
|
|
72180
|
+
}
|
|
72181
|
+
}
|
|
72182
|
+
});
|
|
72183
|
+
if (!Number.isFinite(result[0][0])) {
|
|
72184
|
+
return null;
|
|
72185
|
+
}
|
|
72186
|
+
return result;
|
|
72187
|
+
}
|
|
72115
72188
|
traverse(visitor) {
|
|
72116
72189
|
let {
|
|
72117
72190
|
worldMatrix = new Matrix4()
|
|
@@ -72361,6 +72434,7 @@ class ModelNode extends ScenegraphNode {
|
|
|
72361
72434
|
} else {
|
|
72362
72435
|
this.model = new Model(gl, props2);
|
|
72363
72436
|
}
|
|
72437
|
+
this.bounds = null;
|
|
72364
72438
|
this.managedResources = props2.managedResources || [];
|
|
72365
72439
|
}
|
|
72366
72440
|
setProps(props2) {
|
|
@@ -72368,6 +72442,9 @@ class ModelNode extends ScenegraphNode {
|
|
|
72368
72442
|
this._setModelNodeProps(props2);
|
|
72369
72443
|
return this;
|
|
72370
72444
|
}
|
|
72445
|
+
getBounds() {
|
|
72446
|
+
return this.bounds;
|
|
72447
|
+
}
|
|
72371
72448
|
delete() {
|
|
72372
72449
|
if (this.model) {
|
|
72373
72450
|
this.model.delete();
|
|
@@ -72552,17 +72629,21 @@ function createGLTFModel(gl, options) {
|
|
|
72552
72629
|
const managedResources = [];
|
|
72553
72630
|
managedResources.push(...materialParser.generatedTextures);
|
|
72554
72631
|
managedResources.push(...Object.values(attributes).map((attribute) => attribute.buffer));
|
|
72555
|
-
const model = new ModelNode(gl,
|
|
72632
|
+
const model = new ModelNode(gl, {
|
|
72556
72633
|
id,
|
|
72557
72634
|
drawMode,
|
|
72558
72635
|
vertexCount,
|
|
72559
72636
|
modules: [pbr],
|
|
72560
|
-
defines: materialParser.defines,
|
|
72561
72637
|
parameters: materialParser.parameters,
|
|
72562
72638
|
vs: addVersionToShader(gl, vs$7),
|
|
72563
72639
|
fs: addVersionToShader(gl, fs$7),
|
|
72564
|
-
managedResources
|
|
72565
|
-
|
|
72640
|
+
managedResources,
|
|
72641
|
+
...modelOptions,
|
|
72642
|
+
defines: {
|
|
72643
|
+
...materialParser.defines,
|
|
72644
|
+
...modelOptions.defines
|
|
72645
|
+
}
|
|
72646
|
+
});
|
|
72566
72647
|
model.setProps({
|
|
72567
72648
|
attributes
|
|
72568
72649
|
});
|
|
@@ -72657,13 +72738,15 @@ class GLTFInstantiator {
|
|
|
72657
72738
|
log$2.warn("getVertexCount() not found")();
|
|
72658
72739
|
}
|
|
72659
72740
|
createPrimitive(gltfPrimitive, i2, gltfMesh) {
|
|
72660
|
-
|
|
72741
|
+
const model = createGLTFModel(this.gl, Object.assign({
|
|
72661
72742
|
id: gltfPrimitive.name || "".concat(gltfMesh.name || gltfMesh.id, "-primitive-").concat(i2),
|
|
72662
72743
|
drawMode: gltfPrimitive.mode || 4,
|
|
72663
72744
|
vertexCount: gltfPrimitive.indices ? gltfPrimitive.indices.count : this.getVertexCount(gltfPrimitive.attributes),
|
|
72664
72745
|
attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),
|
|
72665
72746
|
material: gltfPrimitive.material
|
|
72666
72747
|
}, this.options));
|
|
72748
|
+
model.bounds = [gltfPrimitive.attributes.POSITION.min, gltfPrimitive.attributes.POSITION.max];
|
|
72749
|
+
return model;
|
|
72667
72750
|
}
|
|
72668
72751
|
createAttributes(attributes, indices) {
|
|
72669
72752
|
const loadedAttributes = {};
|
|
@@ -80591,15 +80674,11 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
80591
80674
|
info,
|
|
80592
80675
|
sourceLayer
|
|
80593
80676
|
}) {
|
|
80594
|
-
const
|
|
80595
|
-
|
|
80596
|
-
|
|
80597
|
-
const layerId = sourceLayer && sourceLayer.id;
|
|
80598
|
-
if (layerId) {
|
|
80599
|
-
const substr = layerId.substring(this.id.length + 1);
|
|
80600
|
-
const tileId = substr.substring(substr.indexOf("-") + 1);
|
|
80601
|
-
info.object = layerMap[tileId] && layerMap[tileId].tile;
|
|
80677
|
+
const sourceTile = sourceLayer && sourceLayer.props.tile;
|
|
80678
|
+
if (info.picked) {
|
|
80679
|
+
info.object = sourceTile;
|
|
80602
80680
|
}
|
|
80681
|
+
info.sourceTile = sourceTile;
|
|
80603
80682
|
return info;
|
|
80604
80683
|
}
|
|
80605
80684
|
filterSubLayer({
|
|
@@ -80615,8 +80694,10 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
80615
80694
|
return tile.selected && tile.viewportIds.includes(viewportId);
|
|
80616
80695
|
}
|
|
80617
80696
|
_updateAutoHighlight(info) {
|
|
80618
|
-
|
|
80619
|
-
|
|
80697
|
+
const sourceTile = info.sourceTile;
|
|
80698
|
+
const layerCache = this.state.layerMap[sourceTile === null || sourceTile === void 0 ? void 0 : sourceTile.id];
|
|
80699
|
+
if (layerCache && layerCache.layer) {
|
|
80700
|
+
layerCache.layer.updateAutoHighlight(info);
|
|
80620
80701
|
}
|
|
80621
80702
|
}
|
|
80622
80703
|
async _loadTileset(tilesetUrl) {
|
|
@@ -121094,16 +121175,16 @@ function addDecoder(cases, importFn) {
|
|
|
121094
121175
|
}
|
|
121095
121176
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121096
121177
|
}
|
|
121097
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121098
|
-
addDecoder(5, () => import("./lzw-
|
|
121178
|
+
addDecoder([void 0, 1], () => import("./raw-268e3c0d.js").then((m2) => m2.default));
|
|
121179
|
+
addDecoder(5, () => import("./lzw-476a6015.js").then((m2) => m2.default));
|
|
121099
121180
|
addDecoder(6, () => {
|
|
121100
121181
|
throw new Error("old style JPEG compression is not supported.");
|
|
121101
121182
|
});
|
|
121102
|
-
addDecoder(7, () => import("./jpeg-
|
|
121103
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121104
|
-
addDecoder(32773, () => import("./packbits-
|
|
121105
|
-
addDecoder(34887, () => import("./lerc-
|
|
121106
|
-
addDecoder(50001, () => import("./webimage-
|
|
121183
|
+
addDecoder(7, () => import("./jpeg-3383b938.js").then((m2) => m2.default));
|
|
121184
|
+
addDecoder([8, 32946], () => import("./deflate-636556e0.js").then((m2) => m2.default));
|
|
121185
|
+
addDecoder(32773, () => import("./packbits-724e9549.js").then((m2) => m2.default));
|
|
121186
|
+
addDecoder(34887, () => import("./lerc-c057e1dc.js").then((m2) => m2.default));
|
|
121187
|
+
addDecoder(50001, () => import("./webimage-534d8cfd.js").then((m2) => m2.default));
|
|
121107
121188
|
function decodeRowAcc(row, stride) {
|
|
121108
121189
|
let length2 = row.length - stride;
|
|
121109
121190
|
let offset5 = 0;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-f4743608.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-gating",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/sets-utils": "3.
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/scatterplot": "3.3.1",
|
|
24
|
+
"@vitessce/utils": "3.3.1",
|
|
25
|
+
"@vitessce/sets-utils": "3.3.1",
|
|
26
|
+
"@vitessce/vit-s": "3.3.1",
|
|
27
|
+
"@vitessce/constants-internal": "3.3.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"react": "^18.0.0",
|