@vitessce/scatterplot 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-d451b100.js → deflate-d286fc81.js} +1 -1
- package/dist/{index-a703efd5.js → index-1144f987.js} +160 -79
- package/dist/index.js +1 -1
- package/dist/{jpeg-61cd3c68.js → jpeg-7411bf6b.js} +1 -1
- package/dist/{lerc-bdc18460.js → lerc-1e14a3bb.js} +1 -1
- package/dist/{lzw-038a2f32.js → lzw-7dccbdc7.js} +1 -1
- package/dist/{packbits-f6194869.js → packbits-11ee86b7.js} +1 -1
- package/dist/{raw-0c6dd216.js → raw-9b667484.js} +1 -1
- package/dist/{webimage-a4c2e646.js → webimage-1cd07cf5.js} +1 -1
- package/package.json +7 -7
|
@@ -4519,7 +4519,7 @@ const jsonLoader = {
|
|
|
4519
4519
|
testText: isJSON,
|
|
4520
4520
|
parseTextSync: JSON.parse
|
|
4521
4521
|
};
|
|
4522
|
-
const version = "8.8.
|
|
4522
|
+
const version = "8.8.27";
|
|
4523
4523
|
const existingVersion = globalThis.deck && globalThis.deck.VERSION;
|
|
4524
4524
|
if (existingVersion && existingVersion !== version) {
|
|
4525
4525
|
throw new Error("deck.gl - multiple versions detected: ".concat(existingVersion, " vs ").concat(version));
|
|
@@ -5718,9 +5718,8 @@ function cssToDeviceRatio(gl) {
|
|
|
5718
5718
|
luma
|
|
5719
5719
|
} = gl;
|
|
5720
5720
|
if (gl.canvas && luma) {
|
|
5721
|
-
const
|
|
5722
|
-
|
|
5723
|
-
} = luma.canvasSizeInfo;
|
|
5721
|
+
const cachedSize = luma.canvasSizeInfo;
|
|
5722
|
+
const clientWidth = "clientWidth" in cachedSize ? cachedSize.clientWidth : gl.canvas.clientWidth;
|
|
5724
5723
|
return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
|
|
5725
5724
|
}
|
|
5726
5725
|
return 1;
|
|
@@ -5976,7 +5975,7 @@ function setDevicePixelRatio(gl, devicePixelRatio, options) {
|
|
|
5976
5975
|
});
|
|
5977
5976
|
}
|
|
5978
5977
|
}
|
|
5979
|
-
const VERSION$7 = "8.5.
|
|
5978
|
+
const VERSION$7 = "8.5.21";
|
|
5980
5979
|
const STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
5981
5980
|
class StatsManager {
|
|
5982
5981
|
constructor() {
|
|
@@ -6097,7 +6096,6 @@ let Resource$1 = class Resource {
|
|
|
6097
6096
|
this._handle = this._createHandle();
|
|
6098
6097
|
}
|
|
6099
6098
|
this.byteLength = 0;
|
|
6100
|
-
this._initStats();
|
|
6101
6099
|
this._addStats();
|
|
6102
6100
|
}
|
|
6103
6101
|
toString() {
|
|
@@ -6233,9 +6231,6 @@ let Resource$1 = class Resource {
|
|
|
6233
6231
|
this.gl.luma = this.gl.luma || {};
|
|
6234
6232
|
return this.gl.luma;
|
|
6235
6233
|
}
|
|
6236
|
-
_initStats() {
|
|
6237
|
-
this.gl.stats = this.gl.stats || new StatsManager();
|
|
6238
|
-
}
|
|
6239
6234
|
_addStats() {
|
|
6240
6235
|
const name2 = this[Symbol.toStringTag];
|
|
6241
6236
|
const stats = lumaStats.get("Resource Counts");
|
|
@@ -6250,27 +6245,29 @@ let Resource$1 = class Resource {
|
|
|
6250
6245
|
}
|
|
6251
6246
|
_trackAllocatedMemory(bytes) {
|
|
6252
6247
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
6253
|
-
this.
|
|
6254
|
-
this.
|
|
6248
|
+
this._trackAllocatedMemoryForContext(bytes, name2);
|
|
6249
|
+
this._trackAllocatedMemoryForContext(bytes, name2, this.gl.canvas && this.gl.canvas.id);
|
|
6250
|
+
this.byteLength = bytes;
|
|
6255
6251
|
}
|
|
6256
|
-
|
|
6252
|
+
_trackAllocatedMemoryForContext(bytes) {
|
|
6257
6253
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
6258
|
-
let
|
|
6254
|
+
let id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
6255
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
6259
6256
|
stats.get("GPU Memory").addCount(bytes);
|
|
6260
6257
|
stats.get("".concat(name2, " Memory")).addCount(bytes);
|
|
6261
|
-
this.byteLength = bytes;
|
|
6262
6258
|
}
|
|
6263
6259
|
_trackDeallocatedMemory() {
|
|
6264
6260
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
6265
|
-
this.
|
|
6266
|
-
this.
|
|
6261
|
+
this._trackDeallocatedMemoryForContext(name2);
|
|
6262
|
+
this._trackDeallocatedMemoryForContext(name2, this.gl.canvas && this.gl.canvas.id);
|
|
6263
|
+
this.byteLength = 0;
|
|
6267
6264
|
}
|
|
6268
|
-
|
|
6265
|
+
_trackDeallocatedMemoryForContext() {
|
|
6269
6266
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
6270
|
-
let
|
|
6267
|
+
let id = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
6268
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
6271
6269
|
stats.get("GPU Memory").subtractCount(this.byteLength);
|
|
6272
6270
|
stats.get("".concat(name2, " Memory")).subtractCount(this.byteLength);
|
|
6273
|
-
this.byteLength = 0;
|
|
6274
6271
|
}
|
|
6275
6272
|
};
|
|
6276
6273
|
const ERR_TYPE_DEDUCTION = "Failed to deduce GL constant from typed array";
|
|
@@ -19486,6 +19483,7 @@ const picking = {
|
|
|
19486
19483
|
inject: {
|
|
19487
19484
|
"vs:DECKGL_FILTER_GL_POSITION": "\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ",
|
|
19488
19485
|
"vs:DECKGL_FILTER_COLOR": "\n picking_setPickingColor(geometry.pickingColor);\n ",
|
|
19486
|
+
"fs:#decl": "\nuniform bool picking_uAttribute;\n ",
|
|
19489
19487
|
"fs:DECKGL_FILTER_COLOR": {
|
|
19490
19488
|
order: 99,
|
|
19491
19489
|
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 "
|
|
@@ -20296,6 +20294,9 @@ class Viewport {
|
|
|
20296
20294
|
this.projectFlat = this.projectFlat.bind(this);
|
|
20297
20295
|
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
20298
20296
|
}
|
|
20297
|
+
get subViewports() {
|
|
20298
|
+
return null;
|
|
20299
|
+
}
|
|
20299
20300
|
get metersPerPixel() {
|
|
20300
20301
|
return this.distanceScales.metersPerUnit[2] / this.scale;
|
|
20301
20302
|
}
|
|
@@ -29187,7 +29188,7 @@ class Attribute extends DataColumn {
|
|
|
29187
29188
|
const {
|
|
29188
29189
|
startIndices
|
|
29189
29190
|
} = this;
|
|
29190
|
-
const vertexIndex = startIndices ? startIndices[row] : row;
|
|
29191
|
+
const vertexIndex = startIndices ? row < startIndices.length ? startIndices[row] : this.numInstances : row;
|
|
29191
29192
|
return vertexIndex * this.size;
|
|
29192
29193
|
}
|
|
29193
29194
|
getShaderAttributes() {
|
|
@@ -31831,7 +31832,7 @@ class Layer extends Component {
|
|
|
31831
31832
|
if (Array.isArray(highlightColor)) {
|
|
31832
31833
|
parameters.pickingHighlightColor = highlightColor;
|
|
31833
31834
|
}
|
|
31834
|
-
if (
|
|
31835
|
+
if (forceUpdate || highlightedObjectIndex !== oldProps.highlightedObjectIndex) {
|
|
31835
31836
|
parameters.pickingSelectedColor = Number.isFinite(highlightedObjectIndex) && highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;
|
|
31836
31837
|
}
|
|
31837
31838
|
this.setModuleParameters(parameters);
|
|
@@ -33194,7 +33195,7 @@ function interpolateQuad(quad, ut, vt) {
|
|
|
33194
33195
|
}
|
|
33195
33196
|
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";
|
|
33196
33197
|
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";
|
|
33197
|
-
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");
|
|
33198
|
+
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");
|
|
33198
33199
|
const defaultProps$I = {
|
|
33199
33200
|
image: {
|
|
33200
33201
|
type: "image",
|
|
@@ -41337,18 +41338,22 @@ function getBoundingBox(viewport, zRange, extent2) {
|
|
|
41337
41338
|
}
|
|
41338
41339
|
function getCullBounds({
|
|
41339
41340
|
viewport,
|
|
41340
|
-
z: z2,
|
|
41341
|
+
z: z2 = 0,
|
|
41341
41342
|
cullRect
|
|
41342
41343
|
}) {
|
|
41343
|
-
const
|
|
41344
|
-
|
|
41345
|
-
|
|
41346
|
-
|
|
41347
|
-
height
|
|
41348
|
-
} = cullRect;
|
|
41344
|
+
const subViewports = viewport.subViewports || [viewport];
|
|
41345
|
+
return subViewports.map((v) => getCullBoundsInViewport(v, z2, cullRect));
|
|
41346
|
+
}
|
|
41347
|
+
function getCullBoundsInViewport(viewport, z2, cullRect) {
|
|
41349
41348
|
if (!Array.isArray(z2)) {
|
|
41349
|
+
const x2 = cullRect.x - viewport.x;
|
|
41350
|
+
const y2 = cullRect.y - viewport.y;
|
|
41351
|
+
const {
|
|
41352
|
+
width,
|
|
41353
|
+
height
|
|
41354
|
+
} = cullRect;
|
|
41350
41355
|
const unprojectOption = {
|
|
41351
|
-
targetZ: z2
|
|
41356
|
+
targetZ: z2
|
|
41352
41357
|
};
|
|
41353
41358
|
const topLeft = viewport.unproject([x2, y2], unprojectOption);
|
|
41354
41359
|
const topRight = viewport.unproject([x2 + width, y2], unprojectOption);
|
|
@@ -41356,16 +41361,8 @@ function getCullBounds({
|
|
|
41356
41361
|
const bottomRight = viewport.unproject([x2 + width, y2 + height], unprojectOption);
|
|
41357
41362
|
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])];
|
|
41358
41363
|
}
|
|
41359
|
-
const bounds0 =
|
|
41360
|
-
|
|
41361
|
-
z: z2[0],
|
|
41362
|
-
cullRect
|
|
41363
|
-
});
|
|
41364
|
-
const bounds1 = getCullBounds({
|
|
41365
|
-
viewport,
|
|
41366
|
-
z: z2[1],
|
|
41367
|
-
cullRect
|
|
41368
|
-
});
|
|
41364
|
+
const bounds0 = getCullBoundsInViewport(viewport, z2[0], cullRect);
|
|
41365
|
+
const bounds1 = getCullBoundsInViewport(viewport, z2[1], cullRect);
|
|
41369
41366
|
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])];
|
|
41370
41367
|
}
|
|
41371
41368
|
function getIndexingCoords(bbox2, scale2, modelMatrixInverse) {
|
|
@@ -41595,7 +41592,7 @@ class Tileset2D {
|
|
|
41595
41592
|
return false;
|
|
41596
41593
|
}
|
|
41597
41594
|
if (cullRect && this._viewport) {
|
|
41598
|
-
const
|
|
41595
|
+
const boundsArr = this._getCullBounds({
|
|
41599
41596
|
viewport: this._viewport,
|
|
41600
41597
|
z: this._zRange,
|
|
41601
41598
|
cullRect
|
|
@@ -41603,12 +41600,20 @@ class Tileset2D {
|
|
|
41603
41600
|
const {
|
|
41604
41601
|
bbox: bbox2
|
|
41605
41602
|
} = tile;
|
|
41606
|
-
|
|
41607
|
-
|
|
41603
|
+
for (const [minX, minY, maxX, maxY] of boundsArr) {
|
|
41604
|
+
let overlaps;
|
|
41605
|
+
if ("west" in bbox2) {
|
|
41606
|
+
overlaps = bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY && bbox2.north > minY;
|
|
41607
|
+
} else {
|
|
41608
|
+
const y02 = Math.min(bbox2.top, bbox2.bottom);
|
|
41609
|
+
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
41610
|
+
overlaps = bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
41611
|
+
}
|
|
41612
|
+
if (overlaps) {
|
|
41613
|
+
return true;
|
|
41614
|
+
}
|
|
41608
41615
|
}
|
|
41609
|
-
|
|
41610
|
-
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
41611
|
-
return bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
41616
|
+
return false;
|
|
41612
41617
|
}
|
|
41613
41618
|
return true;
|
|
41614
41619
|
}
|
|
@@ -42057,14 +42062,19 @@ class TileLayer extends CompositeLayer {
|
|
|
42057
42062
|
info,
|
|
42058
42063
|
sourceLayer
|
|
42059
42064
|
}) {
|
|
42065
|
+
const sourceTile = sourceLayer.props.tile;
|
|
42060
42066
|
if (info.picked) {
|
|
42061
|
-
info.tile =
|
|
42067
|
+
info.tile = sourceTile;
|
|
42062
42068
|
}
|
|
42069
|
+
info.sourceTile = sourceTile;
|
|
42063
42070
|
return info;
|
|
42064
42071
|
}
|
|
42065
42072
|
_updateAutoHighlight(info) {
|
|
42066
|
-
|
|
42067
|
-
|
|
42073
|
+
const sourceTile = info.sourceTile;
|
|
42074
|
+
if (sourceTile && sourceTile.layers) {
|
|
42075
|
+
for (const layer of sourceTile.layers) {
|
|
42076
|
+
layer.updateAutoHighlight(info);
|
|
42077
|
+
}
|
|
42068
42078
|
}
|
|
42069
42079
|
}
|
|
42070
42080
|
renderLayers() {
|
|
@@ -54382,6 +54392,9 @@ class ScenegraphNode {
|
|
|
54382
54392
|
toString() {
|
|
54383
54393
|
return "{type: ScenegraphNode, id: ".concat(this.id, ")}");
|
|
54384
54394
|
}
|
|
54395
|
+
getBounds() {
|
|
54396
|
+
return null;
|
|
54397
|
+
}
|
|
54385
54398
|
setPosition(position) {
|
|
54386
54399
|
assert$8(position.length === 3, "setPosition requires vector argument");
|
|
54387
54400
|
this.position = position;
|
|
@@ -54532,6 +54545,34 @@ class GroupNode extends ScenegraphNode {
|
|
|
54532
54545
|
this.removeAll();
|
|
54533
54546
|
super.delete();
|
|
54534
54547
|
}
|
|
54548
|
+
getBounds() {
|
|
54549
|
+
const result = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]];
|
|
54550
|
+
this.traverse((node, _ref) => {
|
|
54551
|
+
let {
|
|
54552
|
+
worldMatrix
|
|
54553
|
+
} = _ref;
|
|
54554
|
+
const bounds2 = node.getBounds();
|
|
54555
|
+
if (!bounds2) {
|
|
54556
|
+
return;
|
|
54557
|
+
}
|
|
54558
|
+
const [min, max] = bounds2;
|
|
54559
|
+
const center2 = new Vector3(min).add(max).divide([2, 2, 2]);
|
|
54560
|
+
worldMatrix.transformAsPoint(center2, center2);
|
|
54561
|
+
const halfSize = new Vector3(max).subtract(min).divide([2, 2, 2]);
|
|
54562
|
+
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
54563
|
+
for (let v = 0; v < 8; v++) {
|
|
54564
|
+
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
54565
|
+
for (let i2 = 0; i2 < 3; i2++) {
|
|
54566
|
+
result[0][i2] = Math.min(result[0][i2], position[i2]);
|
|
54567
|
+
result[1][i2] = Math.max(result[1][i2], position[i2]);
|
|
54568
|
+
}
|
|
54569
|
+
}
|
|
54570
|
+
});
|
|
54571
|
+
if (!Number.isFinite(result[0][0])) {
|
|
54572
|
+
return null;
|
|
54573
|
+
}
|
|
54574
|
+
return result;
|
|
54575
|
+
}
|
|
54535
54576
|
traverse(visitor) {
|
|
54536
54577
|
let {
|
|
54537
54578
|
worldMatrix = new Matrix4()
|
|
@@ -54781,6 +54822,7 @@ class ModelNode extends ScenegraphNode {
|
|
|
54781
54822
|
} else {
|
|
54782
54823
|
this.model = new Model(gl, props2);
|
|
54783
54824
|
}
|
|
54825
|
+
this.bounds = null;
|
|
54784
54826
|
this.managedResources = props2.managedResources || [];
|
|
54785
54827
|
}
|
|
54786
54828
|
setProps(props2) {
|
|
@@ -54788,6 +54830,9 @@ class ModelNode extends ScenegraphNode {
|
|
|
54788
54830
|
this._setModelNodeProps(props2);
|
|
54789
54831
|
return this;
|
|
54790
54832
|
}
|
|
54833
|
+
getBounds() {
|
|
54834
|
+
return this.bounds;
|
|
54835
|
+
}
|
|
54791
54836
|
delete() {
|
|
54792
54837
|
if (this.model) {
|
|
54793
54838
|
this.model.delete();
|
|
@@ -54972,17 +55017,21 @@ function createGLTFModel(gl, options) {
|
|
|
54972
55017
|
const managedResources = [];
|
|
54973
55018
|
managedResources.push(...materialParser.generatedTextures);
|
|
54974
55019
|
managedResources.push(...Object.values(attributes).map((attribute) => attribute.buffer));
|
|
54975
|
-
const model = new ModelNode(gl,
|
|
55020
|
+
const model = new ModelNode(gl, {
|
|
54976
55021
|
id,
|
|
54977
55022
|
drawMode,
|
|
54978
55023
|
vertexCount,
|
|
54979
55024
|
modules: [pbr],
|
|
54980
|
-
defines: materialParser.defines,
|
|
54981
55025
|
parameters: materialParser.parameters,
|
|
54982
55026
|
vs: addVersionToShader(gl, vs$7),
|
|
54983
55027
|
fs: addVersionToShader(gl, fs$7),
|
|
54984
|
-
managedResources
|
|
54985
|
-
|
|
55028
|
+
managedResources,
|
|
55029
|
+
...modelOptions,
|
|
55030
|
+
defines: {
|
|
55031
|
+
...materialParser.defines,
|
|
55032
|
+
...modelOptions.defines
|
|
55033
|
+
}
|
|
55034
|
+
});
|
|
54986
55035
|
model.setProps({
|
|
54987
55036
|
attributes
|
|
54988
55037
|
});
|
|
@@ -55077,13 +55126,15 @@ class GLTFInstantiator {
|
|
|
55077
55126
|
log$2.warn("getVertexCount() not found")();
|
|
55078
55127
|
}
|
|
55079
55128
|
createPrimitive(gltfPrimitive, i2, gltfMesh) {
|
|
55080
|
-
|
|
55129
|
+
const model = createGLTFModel(this.gl, Object.assign({
|
|
55081
55130
|
id: gltfPrimitive.name || "".concat(gltfMesh.name || gltfMesh.id, "-primitive-").concat(i2),
|
|
55082
55131
|
drawMode: gltfPrimitive.mode || 4,
|
|
55083
55132
|
vertexCount: gltfPrimitive.indices ? gltfPrimitive.indices.count : this.getVertexCount(gltfPrimitive.attributes),
|
|
55084
55133
|
attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),
|
|
55085
55134
|
material: gltfPrimitive.material
|
|
55086
55135
|
}, this.options));
|
|
55136
|
+
model.bounds = [gltfPrimitive.attributes.POSITION.min, gltfPrimitive.attributes.POSITION.max];
|
|
55137
|
+
return model;
|
|
55087
55138
|
}
|
|
55088
55139
|
createAttributes(attributes, indices) {
|
|
55089
55140
|
const loadedAttributes = {};
|
|
@@ -63011,15 +63062,11 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
63011
63062
|
info,
|
|
63012
63063
|
sourceLayer
|
|
63013
63064
|
}) {
|
|
63014
|
-
const
|
|
63015
|
-
|
|
63016
|
-
|
|
63017
|
-
const layerId = sourceLayer && sourceLayer.id;
|
|
63018
|
-
if (layerId) {
|
|
63019
|
-
const substr = layerId.substring(this.id.length + 1);
|
|
63020
|
-
const tileId = substr.substring(substr.indexOf("-") + 1);
|
|
63021
|
-
info.object = layerMap[tileId] && layerMap[tileId].tile;
|
|
63065
|
+
const sourceTile = sourceLayer && sourceLayer.props.tile;
|
|
63066
|
+
if (info.picked) {
|
|
63067
|
+
info.object = sourceTile;
|
|
63022
63068
|
}
|
|
63069
|
+
info.sourceTile = sourceTile;
|
|
63023
63070
|
return info;
|
|
63024
63071
|
}
|
|
63025
63072
|
filterSubLayer({
|
|
@@ -63035,8 +63082,10 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
63035
63082
|
return tile.selected && tile.viewportIds.includes(viewportId);
|
|
63036
63083
|
}
|
|
63037
63084
|
_updateAutoHighlight(info) {
|
|
63038
|
-
|
|
63039
|
-
|
|
63085
|
+
const sourceTile = info.sourceTile;
|
|
63086
|
+
const layerCache = this.state.layerMap[sourceTile === null || sourceTile === void 0 ? void 0 : sourceTile.id];
|
|
63087
|
+
if (layerCache && layerCache.layer) {
|
|
63088
|
+
layerCache.layer.updateAutoHighlight(info);
|
|
63040
63089
|
}
|
|
63041
63090
|
}
|
|
63042
63091
|
async _loadTileset(tilesetUrl) {
|
|
@@ -104715,16 +104764,16 @@ function addDecoder(cases, importFn) {
|
|
|
104715
104764
|
}
|
|
104716
104765
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
104717
104766
|
}
|
|
104718
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
104719
|
-
addDecoder(5, () => import("./lzw-
|
|
104767
|
+
addDecoder([void 0, 1], () => import("./raw-9b667484.js").then((m2) => m2.default));
|
|
104768
|
+
addDecoder(5, () => import("./lzw-7dccbdc7.js").then((m2) => m2.default));
|
|
104720
104769
|
addDecoder(6, () => {
|
|
104721
104770
|
throw new Error("old style JPEG compression is not supported.");
|
|
104722
104771
|
});
|
|
104723
|
-
addDecoder(7, () => import("./jpeg-
|
|
104724
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
104725
|
-
addDecoder(32773, () => import("./packbits-
|
|
104726
|
-
addDecoder(34887, () => import("./lerc-
|
|
104727
|
-
addDecoder(50001, () => import("./webimage-
|
|
104772
|
+
addDecoder(7, () => import("./jpeg-7411bf6b.js").then((m2) => m2.default));
|
|
104773
|
+
addDecoder([8, 32946], () => import("./deflate-d286fc81.js").then((m2) => m2.default));
|
|
104774
|
+
addDecoder(32773, () => import("./packbits-11ee86b7.js").then((m2) => m2.default));
|
|
104775
|
+
addDecoder(34887, () => import("./lerc-1e14a3bb.js").then((m2) => m2.default));
|
|
104776
|
+
addDecoder(50001, () => import("./webimage-1cd07cf5.js").then((m2) => m2.default));
|
|
104728
104777
|
function decodeRowAcc(row, stride) {
|
|
104729
104778
|
let length2 = row.length - stride;
|
|
104730
104779
|
let offset5 = 0;
|
|
@@ -123996,6 +124045,7 @@ const DataType$1 = {
|
|
|
123996
124045
|
const FileType$1 = {
|
|
123997
124046
|
// Joint file types
|
|
123998
124047
|
ANNDATA_ZARR: "anndata.zarr",
|
|
124048
|
+
SPATIALDATA_ZARR: "spatialdata.zarr",
|
|
123999
124049
|
// Atomic file types
|
|
124000
124050
|
OBS_EMBEDDING_CSV: "obsEmbedding.csv",
|
|
124001
124051
|
OBS_SPOTS_CSV: "obsSpots.csv",
|
|
@@ -124018,6 +124068,16 @@ const FileType$1 = {
|
|
|
124018
124068
|
OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
|
|
124019
124069
|
OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
|
|
124020
124070
|
FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
|
|
124071
|
+
// SpatialData
|
|
124072
|
+
IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
|
|
124073
|
+
LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
|
|
124074
|
+
SHAPES_SPATIALDATA_ZARR: "shapes.spatialdata.zarr",
|
|
124075
|
+
OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
|
|
124076
|
+
OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
|
|
124077
|
+
OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
|
|
124078
|
+
// TODO:
|
|
124079
|
+
// OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
|
|
124080
|
+
// OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
|
|
124021
124081
|
// MuData
|
|
124022
124082
|
OBS_FEATURE_MATRIX_MUDATA_ZARR: "obsFeatureMatrix.mudata.zarr",
|
|
124023
124083
|
OBS_SETS_MUDATA_ZARR: "obsSets.mudata.zarr",
|
|
@@ -124454,9 +124514,30 @@ z.object({
|
|
|
124454
124514
|
offsetsUrl: z.string().optional(),
|
|
124455
124515
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
124456
124516
|
});
|
|
124457
|
-
z.object({
|
|
124517
|
+
const imageOmeZarrSchema = z.object({
|
|
124458
124518
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
124459
124519
|
});
|
|
124520
|
+
imageOmeZarrSchema.extend({
|
|
124521
|
+
path: z.string()
|
|
124522
|
+
});
|
|
124523
|
+
z.object({
|
|
124524
|
+
path: z.string()
|
|
124525
|
+
});
|
|
124526
|
+
z.object({
|
|
124527
|
+
path: z.string()
|
|
124528
|
+
});
|
|
124529
|
+
z.object({
|
|
124530
|
+
path: z.string(),
|
|
124531
|
+
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.")
|
|
124532
|
+
});
|
|
124533
|
+
annDataObsFeatureMatrix.extend({
|
|
124534
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
124535
|
+
});
|
|
124536
|
+
z.object({
|
|
124537
|
+
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
124538
|
+
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
124539
|
+
obsSets: annDataObsSets
|
|
124540
|
+
});
|
|
124460
124541
|
z.object({
|
|
124461
124542
|
obsIndex: z.string(),
|
|
124462
124543
|
obsEmbedding: z.array(z.string()).length(2)
|
|
@@ -131014,9 +131095,9 @@ const schemePlasma = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138], [2
|
|
|
131014
131095
|
function rgbSpline(spline) {
|
|
131015
131096
|
return (colors) => {
|
|
131016
131097
|
const n2 = colors.length;
|
|
131017
|
-
|
|
131018
|
-
|
|
131019
|
-
|
|
131098
|
+
const r2 = new Array(n2);
|
|
131099
|
+
const g2 = new Array(n2);
|
|
131100
|
+
const b = new Array(n2);
|
|
131020
131101
|
let i2;
|
|
131021
131102
|
let color;
|
|
131022
131103
|
for (i2 = 0; i2 < n2; ++i2) {
|
|
@@ -131025,10 +131106,10 @@ function rgbSpline(spline) {
|
|
|
131025
131106
|
g2[i2] = color[1] || 0;
|
|
131026
131107
|
b[i2] = color[2] || 0;
|
|
131027
131108
|
}
|
|
131028
|
-
|
|
131029
|
-
|
|
131030
|
-
|
|
131031
|
-
return (t2) => [
|
|
131109
|
+
const rFunc = spline(r2);
|
|
131110
|
+
const gFunc = spline(g2);
|
|
131111
|
+
const bFunc = spline(b);
|
|
131112
|
+
return (t2) => [rFunc(t2), gFunc(t2), bFunc(t2)];
|
|
131032
131113
|
};
|
|
131033
131114
|
}
|
|
131034
131115
|
function basis(values2) {
|
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-1144f987.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",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"d3-quadtree": "^1.0.7",
|
|
24
24
|
"lodash-es": "^4.17.21",
|
|
25
25
|
"react-aria": "^3.28.0",
|
|
26
|
-
"@vitessce/constants-internal": "3.
|
|
27
|
-
"@vitessce/
|
|
28
|
-
"@vitessce/
|
|
29
|
-
"@vitessce/
|
|
30
|
-
"@vitessce/
|
|
31
|
-
"@vitessce/
|
|
26
|
+
"@vitessce/constants-internal": "3.3.1",
|
|
27
|
+
"@vitessce/icons": "3.3.1",
|
|
28
|
+
"@vitessce/tooltip": "3.3.1",
|
|
29
|
+
"@vitessce/utils": "3.3.1",
|
|
30
|
+
"@vitessce/vit-s": "3.3.1",
|
|
31
|
+
"@vitessce/gl": "3.3.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.4",
|