@vitessce/all 3.3.0 → 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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-bef59a57.js";
2
+ import { B as BaseDecoder } from "./index-1b56347b.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,6 +1,6 @@
1
1
  import React__default from "react";
2
2
  import ReactDOM__default from "react-dom";
3
- import { c as commonjsGlobal, o as objectAssign, g as getDefaultExportFromCjs, e as earcut, b as getAugmentedNamespace } from "./index-bef59a57.js";
3
+ import { c as commonjsGlobal, o as objectAssign, g as getDefaultExportFromCjs, e as earcut, b as getAugmentedNamespace } from "./index-1b56347b.js";
4
4
  function _mergeNamespaces(n, m) {
5
5
  for (var i = 0; i < m.length; i++) {
6
6
  const e = m[i];
@@ -56356,7 +56356,7 @@ const jsonLoader = {
56356
56356
  testText: isJSON,
56357
56357
  parseTextSync: JSON.parse
56358
56358
  };
56359
- const version$5 = "8.8.20";
56359
+ const version$5 = "8.8.27";
56360
56360
  const existingVersion = globalThis.deck && globalThis.deck.VERSION;
56361
56361
  if (existingVersion && existingVersion !== version$5) {
56362
56362
  throw new Error("deck.gl - multiple versions detected: ".concat(existingVersion, " vs ").concat(version$5));
@@ -57555,9 +57555,8 @@ function cssToDeviceRatio(gl) {
57555
57555
  luma
57556
57556
  } = gl;
57557
57557
  if (gl.canvas && luma) {
57558
- const {
57559
- clientWidth
57560
- } = luma.canvasSizeInfo;
57558
+ const cachedSize = luma.canvasSizeInfo;
57559
+ const clientWidth = "clientWidth" in cachedSize ? cachedSize.clientWidth : gl.canvas.clientWidth;
57561
57560
  return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
57562
57561
  }
57563
57562
  return 1;
@@ -57813,7 +57812,7 @@ function setDevicePixelRatio(gl, devicePixelRatio2, options) {
57813
57812
  });
57814
57813
  }
57815
57814
  }
57816
- const VERSION$8 = "8.5.16";
57815
+ const VERSION$8 = "8.5.21";
57817
57816
  const STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
57818
57817
  class StatsManager {
57819
57818
  constructor() {
@@ -57934,7 +57933,6 @@ let Resource$1 = class Resource {
57934
57933
  this._handle = this._createHandle();
57935
57934
  }
57936
57935
  this.byteLength = 0;
57937
- this._initStats();
57938
57936
  this._addStats();
57939
57937
  }
57940
57938
  toString() {
@@ -58070,9 +58068,6 @@ let Resource$1 = class Resource {
58070
58068
  this.gl.luma = this.gl.luma || {};
58071
58069
  return this.gl.luma;
58072
58070
  }
58073
- _initStats() {
58074
- this.gl.stats = this.gl.stats || new StatsManager();
58075
- }
58076
58071
  _addStats() {
58077
58072
  const name2 = this[Symbol.toStringTag];
58078
58073
  const stats = lumaStats.get("Resource Counts");
@@ -58087,27 +58082,29 @@ let Resource$1 = class Resource {
58087
58082
  }
58088
58083
  _trackAllocatedMemory(bytes) {
58089
58084
  let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
58090
- this._doTrackAllocatedMemory(bytes, name2);
58091
- this._doTrackAllocatedMemory(bytes, name2, this.gl.stats.get("Memory Usage"));
58085
+ this._trackAllocatedMemoryForContext(bytes, name2);
58086
+ this._trackAllocatedMemoryForContext(bytes, name2, this.gl.canvas && this.gl.canvas.id);
58087
+ this.byteLength = bytes;
58092
58088
  }
58093
- _doTrackAllocatedMemory(bytes) {
58089
+ _trackAllocatedMemoryForContext(bytes) {
58094
58090
  let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
58095
- let stats = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : lumaStats.get("Memory Usage");
58091
+ let id2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
58092
+ const stats = lumaStats.get("Memory Usage".concat(id2));
58096
58093
  stats.get("GPU Memory").addCount(bytes);
58097
58094
  stats.get("".concat(name2, " Memory")).addCount(bytes);
58098
- this.byteLength = bytes;
58099
58095
  }
58100
58096
  _trackDeallocatedMemory() {
58101
58097
  let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
58102
- this._doTrackDeallocatedMemory(name2);
58103
- this._doTrackDeallocatedMemory(name2, this.gl.stats.get("Memory Usage"));
58098
+ this._trackDeallocatedMemoryForContext(name2);
58099
+ this._trackDeallocatedMemoryForContext(name2, this.gl.canvas && this.gl.canvas.id);
58100
+ this.byteLength = 0;
58104
58101
  }
58105
- _doTrackDeallocatedMemory() {
58102
+ _trackDeallocatedMemoryForContext() {
58106
58103
  let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
58107
- let stats = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : lumaStats.get("Memory Usage");
58104
+ let id2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
58105
+ const stats = lumaStats.get("Memory Usage".concat(id2));
58108
58106
  stats.get("GPU Memory").subtractCount(this.byteLength);
58109
58107
  stats.get("".concat(name2, " Memory")).subtractCount(this.byteLength);
58110
- this.byteLength = 0;
58111
58108
  }
58112
58109
  };
58113
58110
  const ERR_TYPE_DEDUCTION = "Failed to deduce GL constant from typed array";
@@ -71323,6 +71320,7 @@ const picking = {
71323
71320
  inject: {
71324
71321
  "vs:DECKGL_FILTER_GL_POSITION": "\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ",
71325
71322
  "vs:DECKGL_FILTER_COLOR": "\n picking_setPickingColor(geometry.pickingColor);\n ",
71323
+ "fs:#decl": "\nuniform bool picking_uAttribute;\n ",
71326
71324
  "fs:DECKGL_FILTER_COLOR": {
71327
71325
  order: 99,
71328
71326
  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 "
@@ -72133,6 +72131,9 @@ class Viewport {
72133
72131
  this.projectFlat = this.projectFlat.bind(this);
72134
72132
  this.unprojectFlat = this.unprojectFlat.bind(this);
72135
72133
  }
72134
+ get subViewports() {
72135
+ return null;
72136
+ }
72136
72137
  get metersPerPixel() {
72137
72138
  return this.distanceScales.metersPerUnit[2] / this.scale;
72138
72139
  }
@@ -81024,7 +81025,7 @@ class Attribute extends DataColumn {
81024
81025
  const {
81025
81026
  startIndices
81026
81027
  } = this;
81027
- const vertexIndex = startIndices ? startIndices[row] : row;
81028
+ const vertexIndex = startIndices ? row < startIndices.length ? startIndices[row] : this.numInstances : row;
81028
81029
  return vertexIndex * this.size;
81029
81030
  }
81030
81031
  getShaderAttributes() {
@@ -83668,7 +83669,7 @@ class Layer extends Component {
83668
83669
  if (Array.isArray(highlightColor)) {
83669
83670
  parameters.pickingHighlightColor = highlightColor;
83670
83671
  }
83671
- if (Number.isInteger(highlightedObjectIndex)) {
83672
+ if (forceUpdate || highlightedObjectIndex !== oldProps.highlightedObjectIndex) {
83672
83673
  parameters.pickingSelectedColor = Number.isFinite(highlightedObjectIndex) && highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;
83673
83674
  }
83674
83675
  this.setModuleParameters(parameters);
@@ -85031,7 +85032,7 @@ function interpolateQuad(quad2, ut, vt) {
85031
85032
  }
85032
85033
  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";
85033
85034
  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";
85034
- 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");
85035
+ 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");
85035
85036
  const defaultProps$I = {
85036
85037
  image: {
85037
85038
  type: "image",
@@ -93171,18 +93172,22 @@ function getBoundingBox(viewport, zRange, extent2) {
93171
93172
  }
93172
93173
  function getCullBounds({
93173
93174
  viewport,
93174
- z: z2,
93175
+ z: z2 = 0,
93175
93176
  cullRect
93176
93177
  }) {
93177
- const x2 = cullRect.x - viewport.x;
93178
- const y2 = cullRect.y - viewport.y;
93179
- const {
93180
- width: width2,
93181
- height: height2
93182
- } = cullRect;
93178
+ const subViewports = viewport.subViewports || [viewport];
93179
+ return subViewports.map((v) => getCullBoundsInViewport(v, z2, cullRect));
93180
+ }
93181
+ function getCullBoundsInViewport(viewport, z2, cullRect) {
93183
93182
  if (!Array.isArray(z2)) {
93183
+ const x2 = cullRect.x - viewport.x;
93184
+ const y2 = cullRect.y - viewport.y;
93185
+ const {
93186
+ width: width2,
93187
+ height: height2
93188
+ } = cullRect;
93184
93189
  const unprojectOption = {
93185
- targetZ: z2 || 0
93190
+ targetZ: z2
93186
93191
  };
93187
93192
  const topLeft = viewport.unproject([x2, y2], unprojectOption);
93188
93193
  const topRight = viewport.unproject([x2 + width2, y2], unprojectOption);
@@ -93190,16 +93195,8 @@ function getCullBounds({
93190
93195
  const bottomRight = viewport.unproject([x2 + width2, y2 + height2], unprojectOption);
93191
93196
  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])];
93192
93197
  }
93193
- const bounds0 = getCullBounds({
93194
- viewport,
93195
- z: z2[0],
93196
- cullRect
93197
- });
93198
- const bounds1 = getCullBounds({
93199
- viewport,
93200
- z: z2[1],
93201
- cullRect
93202
- });
93198
+ const bounds0 = getCullBoundsInViewport(viewport, z2[0], cullRect);
93199
+ const bounds1 = getCullBoundsInViewport(viewport, z2[1], cullRect);
93203
93200
  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])];
93204
93201
  }
93205
93202
  function getIndexingCoords(bbox2, scale2, modelMatrixInverse) {
@@ -93429,7 +93426,7 @@ class Tileset2D {
93429
93426
  return false;
93430
93427
  }
93431
93428
  if (cullRect && this._viewport) {
93432
- const [minX, minY, maxX, maxY2] = getCullBounds({
93429
+ const boundsArr = this._getCullBounds({
93433
93430
  viewport: this._viewport,
93434
93431
  z: this._zRange,
93435
93432
  cullRect
@@ -93437,12 +93434,20 @@ class Tileset2D {
93437
93434
  const {
93438
93435
  bbox: bbox2
93439
93436
  } = tile;
93440
- if ("west" in bbox2) {
93441
- return bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY2 && bbox2.north > minY;
93437
+ for (const [minX, minY, maxX, maxY2] of boundsArr) {
93438
+ let overlaps;
93439
+ if ("west" in bbox2) {
93440
+ overlaps = bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY2 && bbox2.north > minY;
93441
+ } else {
93442
+ const y02 = Math.min(bbox2.top, bbox2.bottom);
93443
+ const y12 = Math.max(bbox2.top, bbox2.bottom);
93444
+ overlaps = bbox2.left < maxX && bbox2.right > minX && y02 < maxY2 && y12 > minY;
93445
+ }
93446
+ if (overlaps) {
93447
+ return true;
93448
+ }
93442
93449
  }
93443
- const y02 = Math.min(bbox2.top, bbox2.bottom);
93444
- const y12 = Math.max(bbox2.top, bbox2.bottom);
93445
- return bbox2.left < maxX && bbox2.right > minX && y02 < maxY2 && y12 > minY;
93450
+ return false;
93446
93451
  }
93447
93452
  return true;
93448
93453
  }
@@ -93891,14 +93896,19 @@ class TileLayer extends CompositeLayer {
93891
93896
  info: info2,
93892
93897
  sourceLayer
93893
93898
  }) {
93899
+ const sourceTile = sourceLayer.props.tile;
93894
93900
  if (info2.picked) {
93895
- info2.tile = sourceLayer.props.tile;
93901
+ info2.tile = sourceTile;
93896
93902
  }
93903
+ info2.sourceTile = sourceTile;
93897
93904
  return info2;
93898
93905
  }
93899
93906
  _updateAutoHighlight(info2) {
93900
- if (info2.sourceLayer) {
93901
- info2.sourceLayer.updateAutoHighlight(info2);
93907
+ const sourceTile = info2.sourceTile;
93908
+ if (sourceTile && sourceTile.layers) {
93909
+ for (const layer of sourceTile.layers) {
93910
+ layer.updateAutoHighlight(info2);
93911
+ }
93902
93912
  }
93903
93913
  }
93904
93914
  renderLayers() {
@@ -106216,6 +106226,9 @@ class ScenegraphNode {
106216
106226
  toString() {
106217
106227
  return "{type: ScenegraphNode, id: ".concat(this.id, ")}");
106218
106228
  }
106229
+ getBounds() {
106230
+ return null;
106231
+ }
106219
106232
  setPosition(position2) {
106220
106233
  assert$9(position2.length === 3, "setPosition requires vector argument");
106221
106234
  this.position = position2;
@@ -106366,6 +106379,34 @@ class GroupNode extends ScenegraphNode {
106366
106379
  this.removeAll();
106367
106380
  super.delete();
106368
106381
  }
106382
+ getBounds() {
106383
+ const result = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]];
106384
+ this.traverse((node, _ref3) => {
106385
+ let {
106386
+ worldMatrix
106387
+ } = _ref3;
106388
+ const bounds2 = node.getBounds();
106389
+ if (!bounds2) {
106390
+ return;
106391
+ }
106392
+ const [min2, max2] = bounds2;
106393
+ const center2 = new Vector3(min2).add(max2).divide([2, 2, 2]);
106394
+ worldMatrix.transformAsPoint(center2, center2);
106395
+ const halfSize = new Vector3(max2).subtract(min2).divide([2, 2, 2]);
106396
+ worldMatrix.transformAsVector(halfSize, halfSize);
106397
+ for (let v = 0; v < 8; v++) {
106398
+ const position2 = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
106399
+ for (let i2 = 0; i2 < 3; i2++) {
106400
+ result[0][i2] = Math.min(result[0][i2], position2[i2]);
106401
+ result[1][i2] = Math.max(result[1][i2], position2[i2]);
106402
+ }
106403
+ }
106404
+ });
106405
+ if (!Number.isFinite(result[0][0])) {
106406
+ return null;
106407
+ }
106408
+ return result;
106409
+ }
106369
106410
  traverse(visitor) {
106370
106411
  let {
106371
106412
  worldMatrix = new Matrix4()
@@ -106615,6 +106656,7 @@ class ModelNode extends ScenegraphNode {
106615
106656
  } else {
106616
106657
  this.model = new Model$1(gl, props2);
106617
106658
  }
106659
+ this.bounds = null;
106618
106660
  this.managedResources = props2.managedResources || [];
106619
106661
  }
106620
106662
  setProps(props2) {
@@ -106622,6 +106664,9 @@ class ModelNode extends ScenegraphNode {
106622
106664
  this._setModelNodeProps(props2);
106623
106665
  return this;
106624
106666
  }
106667
+ getBounds() {
106668
+ return this.bounds;
106669
+ }
106625
106670
  delete() {
106626
106671
  if (this.model) {
106627
106672
  this.model.delete();
@@ -106806,17 +106851,21 @@ function createGLTFModel(gl, options) {
106806
106851
  const managedResources = [];
106807
106852
  managedResources.push(...materialParser.generatedTextures);
106808
106853
  managedResources.push(...Object.values(attributes).map((attribute) => attribute.buffer));
106809
- const model = new ModelNode(gl, Object.assign({
106854
+ const model = new ModelNode(gl, {
106810
106855
  id: id2,
106811
106856
  drawMode,
106812
106857
  vertexCount,
106813
106858
  modules: [pbr],
106814
- defines: materialParser.defines,
106815
106859
  parameters: materialParser.parameters,
106816
106860
  vs: addVersionToShader(gl, vs$7),
106817
106861
  fs: addVersionToShader(gl, fs$7),
106818
- managedResources
106819
- }, modelOptions));
106862
+ managedResources,
106863
+ ...modelOptions,
106864
+ defines: {
106865
+ ...materialParser.defines,
106866
+ ...modelOptions.defines
106867
+ }
106868
+ });
106820
106869
  model.setProps({
106821
106870
  attributes
106822
106871
  });
@@ -106911,13 +106960,15 @@ class GLTFInstantiator {
106911
106960
  log$8.warn("getVertexCount() not found")();
106912
106961
  }
106913
106962
  createPrimitive(gltfPrimitive, i2, gltfMesh) {
106914
- return createGLTFModel(this.gl, Object.assign({
106963
+ const model = createGLTFModel(this.gl, Object.assign({
106915
106964
  id: gltfPrimitive.name || "".concat(gltfMesh.name || gltfMesh.id, "-primitive-").concat(i2),
106916
106965
  drawMode: gltfPrimitive.mode || 4,
106917
106966
  vertexCount: gltfPrimitive.indices ? gltfPrimitive.indices.count : this.getVertexCount(gltfPrimitive.attributes),
106918
106967
  attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),
106919
106968
  material: gltfPrimitive.material
106920
106969
  }, this.options));
106970
+ model.bounds = [gltfPrimitive.attributes.POSITION.min, gltfPrimitive.attributes.POSITION.max];
106971
+ return model;
106921
106972
  }
106922
106973
  createAttributes(attributes, indices) {
106923
106974
  const loadedAttributes = {};
@@ -114845,15 +114896,11 @@ class Tile3DLayer extends CompositeLayer {
114845
114896
  info: info2,
114846
114897
  sourceLayer
114847
114898
  }) {
114848
- const {
114849
- layerMap
114850
- } = this.state;
114851
- const layerId = sourceLayer && sourceLayer.id;
114852
- if (layerId) {
114853
- const substr = layerId.substring(this.id.length + 1);
114854
- const tileId = substr.substring(substr.indexOf("-") + 1);
114855
- info2.object = layerMap[tileId] && layerMap[tileId].tile;
114899
+ const sourceTile = sourceLayer && sourceLayer.props.tile;
114900
+ if (info2.picked) {
114901
+ info2.object = sourceTile;
114856
114902
  }
114903
+ info2.sourceTile = sourceTile;
114857
114904
  return info2;
114858
114905
  }
114859
114906
  filterSubLayer({
@@ -114869,8 +114916,10 @@ class Tile3DLayer extends CompositeLayer {
114869
114916
  return tile.selected && tile.viewportIds.includes(viewportId);
114870
114917
  }
114871
114918
  _updateAutoHighlight(info2) {
114872
- if (info2.sourceLayer) {
114873
- info2.sourceLayer.updateAutoHighlight(info2);
114919
+ const sourceTile = info2.sourceTile;
114920
+ const layerCache = this.state.layerMap[sourceTile === null || sourceTile === void 0 ? void 0 : sourceTile.id];
114921
+ if (layerCache && layerCache.layer) {
114922
+ layerCache.layer.updateAutoHighlight(info2);
114874
114923
  }
114875
114924
  }
114876
114925
  async _loadTileset(tilesetUrl) {
@@ -156032,16 +156081,16 @@ async function getDecoder(fileDirectory) {
156032
156081
  const Decoder = await importFn();
156033
156082
  return new Decoder(fileDirectory);
156034
156083
  }
156035
- addDecoder([void 0, 1], () => import("./raw-e3409593.js").then((m2) => m2.default));
156036
- addDecoder(5, () => import("./lzw-fddb0b81.js").then((m2) => m2.default));
156084
+ addDecoder([void 0, 1], () => import("./raw-da28bf32.js").then((m2) => m2.default));
156085
+ addDecoder(5, () => import("./lzw-54abbb89.js").then((m2) => m2.default));
156037
156086
  addDecoder(6, () => {
156038
156087
  throw new Error("old style JPEG compression is not supported.");
156039
156088
  });
156040
- addDecoder(7, () => import("./jpeg-92e88990.js").then((m2) => m2.default));
156041
- addDecoder([8, 32946], () => import("./deflate-2f8bc9ba.js").then((m2) => m2.default));
156042
- addDecoder(32773, () => import("./packbits-f19f0a34.js").then((m2) => m2.default));
156043
- addDecoder(34887, () => import("./lerc-7d9f0083.js").then((m2) => m2.default));
156044
- addDecoder(50001, () => import("./webimage-e1f702e2.js").then((m2) => m2.default));
156089
+ addDecoder(7, () => import("./jpeg-d4932e74.js").then((m2) => m2.default));
156090
+ addDecoder([8, 32946], () => import("./deflate-4c7ad087.js").then((m2) => m2.default));
156091
+ addDecoder(32773, () => import("./packbits-0cb854db.js").then((m2) => m2.default));
156092
+ addDecoder(34887, () => import("./lerc-8e20c0a6.js").then((m2) => m2.default));
156093
+ addDecoder(50001, () => import("./webimage-344622f8.js").then((m2) => m2.default));
156045
156094
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
156046
156095
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
156047
156096
  }
@@ -202628,7 +202677,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
202628
202677
  const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
202629
202678
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
202630
202679
  const LazyHiGlassComponent = React__default.lazy(async () => {
202631
- const { HiGlassComponent } = await import("./hglib-c31dff2a.js").then((n3) => n3.h);
202680
+ const { HiGlassComponent } = await import("./hglib-7473f81f.js").then((n3) => n3.h);
202632
202681
  return { default: HiGlassComponent };
202633
202682
  });
202634
202683
  const HG_SIZE = 800;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { f, P, h, d, V, z } from "./index-bef59a57.js";
1
+ import { f, P, h, d, V, z } from "./index-1b56347b.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-bef59a57.js";
1
+ import { B as BaseDecoder } from "./index-1b56347b.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-bef59a57.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-1b56347b.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-bef59a57.js";
1
+ import { B as BaseDecoder } from "./index-1b56347b.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-bef59a57.js";
1
+ import { B as BaseDecoder } from "./index-1b56347b.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-bef59a57.js";
1
+ import { B as BaseDecoder } from "./index-1b56347b.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-bef59a57.js";
1
+ import { B as BaseDecoder } from "./index-1b56347b.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/all",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -18,27 +18,27 @@
18
18
  "dependencies": {
19
19
  "@material-ui/core": "~4.12.3",
20
20
  "zod": "^3.21.4",
21
- "@vitessce/constants-internal": "3.3.0",
22
- "@vitessce/description": "3.3.0",
23
- "@vitessce/csv": "3.3.0",
24
- "@vitessce/feature-list": "3.3.0",
25
- "@vitessce/heatmap": "3.3.0",
26
- "@vitessce/genomic-profiles": "3.3.0",
27
- "@vitessce/json": "3.3.0",
28
- "@vitessce/layer-controller": "3.3.0",
29
- "@vitessce/layer-controller-beta": "3.3.0",
30
- "@vitessce/ome-tiff": "3.3.0",
31
- "@vitessce/obs-sets-manager": "3.3.0",
32
- "@vitessce/plugins": "3.3.0",
33
- "@vitessce/scatterplot-embedding": "3.3.0",
34
- "@vitessce/scatterplot-gating": "3.3.0",
35
- "@vitessce/schemas": "3.3.0",
36
- "@vitessce/spatial": "3.3.0",
37
- "@vitessce/spatial-beta": "3.3.0",
38
- "@vitessce/statistical-plots": "3.3.0",
39
- "@vitessce/vit-s": "3.3.0",
40
- "@vitessce/status": "3.3.0",
41
- "@vitessce/zarr": "3.3.0"
21
+ "@vitessce/constants-internal": "3.3.1",
22
+ "@vitessce/csv": "3.3.1",
23
+ "@vitessce/description": "3.3.1",
24
+ "@vitessce/heatmap": "3.3.1",
25
+ "@vitessce/feature-list": "3.3.1",
26
+ "@vitessce/genomic-profiles": "3.3.1",
27
+ "@vitessce/layer-controller": "3.3.1",
28
+ "@vitessce/layer-controller-beta": "3.3.1",
29
+ "@vitessce/json": "3.3.1",
30
+ "@vitessce/obs-sets-manager": "3.3.1",
31
+ "@vitessce/ome-tiff": "3.3.1",
32
+ "@vitessce/plugins": "3.3.1",
33
+ "@vitessce/scatterplot-embedding": "3.3.1",
34
+ "@vitessce/scatterplot-gating": "3.3.1",
35
+ "@vitessce/schemas": "3.3.1",
36
+ "@vitessce/spatial": "3.3.1",
37
+ "@vitessce/statistical-plots": "3.3.1",
38
+ "@vitessce/spatial-beta": "3.3.1",
39
+ "@vitessce/status": "3.3.1",
40
+ "@vitessce/vit-s": "3.3.1",
41
+ "@vitessce/zarr": "3.3.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "^18.0.28",