@vitessce/dev 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.
- package/dist/{deflate-dd7ac17e.js → deflate-38551de0.js} +1 -1
- package/dist/{hglib-bfa27271.js → hglib-3a7613d1.js} +1 -1
- package/dist/{index-2be4c31c.js → index-05a9921e.js} +124 -75
- package/dist/index.js +1 -1
- package/dist/{jpeg-f6e5062b.js → jpeg-8349089f.js} +1 -1
- package/dist/{lerc-0786b93e.js → lerc-4449a2af.js} +1 -1
- package/dist/{lzw-6a6d016c.js → lzw-3c38ef38.js} +1 -1
- package/dist/{packbits-bf4fb6d5.js → packbits-ffd38b8f.js} +1 -1
- package/dist/{raw-face48f2.js → raw-367b085b.js} +1 -1
- package/dist/{webimage-7b46caa6.js → webimage-2c7bf8d5.js} +1 -1
- package/package.json +5 -5
|
@@ -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-
|
|
3
|
+
import { c as commonjsGlobal, o as objectAssign, g as getDefaultExportFromCjs, e as earcut, b as getAugmentedNamespace } from "./index-05a9921e.js";
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
5
5
|
for (var i = 0; i < m.length; i++) {
|
|
6
6
|
const e = m[i];
|
|
@@ -694,10 +694,10 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
694
694
|
]
|
|
695
695
|
};
|
|
696
696
|
const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
|
|
697
|
-
const version$6 = "3.3.
|
|
698
|
-
const date$3 = "2023-
|
|
697
|
+
const version$6 = "3.3.1";
|
|
698
|
+
const date$3 = "2023-11-08";
|
|
699
699
|
const branch = "changeset-release/main";
|
|
700
|
-
const hash$1 = "
|
|
700
|
+
const hash$1 = "8e897a20";
|
|
701
701
|
const META_VERSION = {
|
|
702
702
|
note,
|
|
703
703
|
version: version$6,
|
|
@@ -70480,7 +70480,7 @@ const jsonLoader = {
|
|
|
70480
70480
|
testText: isJSON,
|
|
70481
70481
|
parseTextSync: JSON.parse
|
|
70482
70482
|
};
|
|
70483
|
-
const version$5 = "8.8.
|
|
70483
|
+
const version$5 = "8.8.27";
|
|
70484
70484
|
const existingVersion = globalThis.deck && globalThis.deck.VERSION;
|
|
70485
70485
|
if (existingVersion && existingVersion !== version$5) {
|
|
70486
70486
|
throw new Error("deck.gl - multiple versions detected: ".concat(existingVersion, " vs ").concat(version$5));
|
|
@@ -71679,9 +71679,8 @@ function cssToDeviceRatio(gl) {
|
|
|
71679
71679
|
luma
|
|
71680
71680
|
} = gl;
|
|
71681
71681
|
if (gl.canvas && luma) {
|
|
71682
|
-
const
|
|
71683
|
-
|
|
71684
|
-
} = luma.canvasSizeInfo;
|
|
71682
|
+
const cachedSize = luma.canvasSizeInfo;
|
|
71683
|
+
const clientWidth = "clientWidth" in cachedSize ? cachedSize.clientWidth : gl.canvas.clientWidth;
|
|
71685
71684
|
return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
|
|
71686
71685
|
}
|
|
71687
71686
|
return 1;
|
|
@@ -71937,7 +71936,7 @@ function setDevicePixelRatio(gl, devicePixelRatio2, options) {
|
|
|
71937
71936
|
});
|
|
71938
71937
|
}
|
|
71939
71938
|
}
|
|
71940
|
-
const VERSION$8 = "8.5.
|
|
71939
|
+
const VERSION$8 = "8.5.21";
|
|
71941
71940
|
const STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
71942
71941
|
class StatsManager {
|
|
71943
71942
|
constructor() {
|
|
@@ -72058,7 +72057,6 @@ let Resource$1 = class Resource {
|
|
|
72058
72057
|
this._handle = this._createHandle();
|
|
72059
72058
|
}
|
|
72060
72059
|
this.byteLength = 0;
|
|
72061
|
-
this._initStats();
|
|
72062
72060
|
this._addStats();
|
|
72063
72061
|
}
|
|
72064
72062
|
toString() {
|
|
@@ -72194,9 +72192,6 @@ let Resource$1 = class Resource {
|
|
|
72194
72192
|
this.gl.luma = this.gl.luma || {};
|
|
72195
72193
|
return this.gl.luma;
|
|
72196
72194
|
}
|
|
72197
|
-
_initStats() {
|
|
72198
|
-
this.gl.stats = this.gl.stats || new StatsManager();
|
|
72199
|
-
}
|
|
72200
72195
|
_addStats() {
|
|
72201
72196
|
const name2 = this[Symbol.toStringTag];
|
|
72202
72197
|
const stats = lumaStats.get("Resource Counts");
|
|
@@ -72211,27 +72206,29 @@ let Resource$1 = class Resource {
|
|
|
72211
72206
|
}
|
|
72212
72207
|
_trackAllocatedMemory(bytes) {
|
|
72213
72208
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
72214
|
-
this.
|
|
72215
|
-
this.
|
|
72209
|
+
this._trackAllocatedMemoryForContext(bytes, name2);
|
|
72210
|
+
this._trackAllocatedMemoryForContext(bytes, name2, this.gl.canvas && this.gl.canvas.id);
|
|
72211
|
+
this.byteLength = bytes;
|
|
72216
72212
|
}
|
|
72217
|
-
|
|
72213
|
+
_trackAllocatedMemoryForContext(bytes) {
|
|
72218
72214
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
72219
|
-
let
|
|
72215
|
+
let id2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
72216
|
+
const stats = lumaStats.get("Memory Usage".concat(id2));
|
|
72220
72217
|
stats.get("GPU Memory").addCount(bytes);
|
|
72221
72218
|
stats.get("".concat(name2, " Memory")).addCount(bytes);
|
|
72222
|
-
this.byteLength = bytes;
|
|
72223
72219
|
}
|
|
72224
72220
|
_trackDeallocatedMemory() {
|
|
72225
72221
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
72226
|
-
this.
|
|
72227
|
-
this.
|
|
72222
|
+
this._trackDeallocatedMemoryForContext(name2);
|
|
72223
|
+
this._trackDeallocatedMemoryForContext(name2, this.gl.canvas && this.gl.canvas.id);
|
|
72224
|
+
this.byteLength = 0;
|
|
72228
72225
|
}
|
|
72229
|
-
|
|
72226
|
+
_trackDeallocatedMemoryForContext() {
|
|
72230
72227
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
72231
|
-
let
|
|
72228
|
+
let id2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
72229
|
+
const stats = lumaStats.get("Memory Usage".concat(id2));
|
|
72232
72230
|
stats.get("GPU Memory").subtractCount(this.byteLength);
|
|
72233
72231
|
stats.get("".concat(name2, " Memory")).subtractCount(this.byteLength);
|
|
72234
|
-
this.byteLength = 0;
|
|
72235
72232
|
}
|
|
72236
72233
|
};
|
|
72237
72234
|
const ERR_TYPE_DEDUCTION = "Failed to deduce GL constant from typed array";
|
|
@@ -85447,6 +85444,7 @@ const picking = {
|
|
|
85447
85444
|
inject: {
|
|
85448
85445
|
"vs:DECKGL_FILTER_GL_POSITION": "\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ",
|
|
85449
85446
|
"vs:DECKGL_FILTER_COLOR": "\n picking_setPickingColor(geometry.pickingColor);\n ",
|
|
85447
|
+
"fs:#decl": "\nuniform bool picking_uAttribute;\n ",
|
|
85450
85448
|
"fs:DECKGL_FILTER_COLOR": {
|
|
85451
85449
|
order: 99,
|
|
85452
85450
|
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 "
|
|
@@ -86257,6 +86255,9 @@ class Viewport {
|
|
|
86257
86255
|
this.projectFlat = this.projectFlat.bind(this);
|
|
86258
86256
|
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
86259
86257
|
}
|
|
86258
|
+
get subViewports() {
|
|
86259
|
+
return null;
|
|
86260
|
+
}
|
|
86260
86261
|
get metersPerPixel() {
|
|
86261
86262
|
return this.distanceScales.metersPerUnit[2] / this.scale;
|
|
86262
86263
|
}
|
|
@@ -95148,7 +95149,7 @@ class Attribute extends DataColumn {
|
|
|
95148
95149
|
const {
|
|
95149
95150
|
startIndices
|
|
95150
95151
|
} = this;
|
|
95151
|
-
const vertexIndex = startIndices ? startIndices[row] : row;
|
|
95152
|
+
const vertexIndex = startIndices ? row < startIndices.length ? startIndices[row] : this.numInstances : row;
|
|
95152
95153
|
return vertexIndex * this.size;
|
|
95153
95154
|
}
|
|
95154
95155
|
getShaderAttributes() {
|
|
@@ -97792,7 +97793,7 @@ class Layer extends Component {
|
|
|
97792
97793
|
if (Array.isArray(highlightColor)) {
|
|
97793
97794
|
parameters.pickingHighlightColor = highlightColor;
|
|
97794
97795
|
}
|
|
97795
|
-
if (
|
|
97796
|
+
if (forceUpdate || highlightedObjectIndex !== oldProps.highlightedObjectIndex) {
|
|
97796
97797
|
parameters.pickingSelectedColor = Number.isFinite(highlightedObjectIndex) && highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;
|
|
97797
97798
|
}
|
|
97798
97799
|
this.setModuleParameters(parameters);
|
|
@@ -99155,7 +99156,7 @@ function interpolateQuad(quad2, ut, vt) {
|
|
|
99155
99156
|
}
|
|
99156
99157
|
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";
|
|
99157
99158
|
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";
|
|
99158
|
-
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");
|
|
99159
|
+
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");
|
|
99159
99160
|
const defaultProps$I = {
|
|
99160
99161
|
image: {
|
|
99161
99162
|
type: "image",
|
|
@@ -107295,18 +107296,22 @@ function getBoundingBox(viewport, zRange, extent2) {
|
|
|
107295
107296
|
}
|
|
107296
107297
|
function getCullBounds({
|
|
107297
107298
|
viewport,
|
|
107298
|
-
z: z2,
|
|
107299
|
+
z: z2 = 0,
|
|
107299
107300
|
cullRect
|
|
107300
107301
|
}) {
|
|
107301
|
-
const
|
|
107302
|
-
|
|
107303
|
-
|
|
107304
|
-
|
|
107305
|
-
height: height2
|
|
107306
|
-
} = cullRect;
|
|
107302
|
+
const subViewports = viewport.subViewports || [viewport];
|
|
107303
|
+
return subViewports.map((v) => getCullBoundsInViewport(v, z2, cullRect));
|
|
107304
|
+
}
|
|
107305
|
+
function getCullBoundsInViewport(viewport, z2, cullRect) {
|
|
107307
107306
|
if (!Array.isArray(z2)) {
|
|
107307
|
+
const x2 = cullRect.x - viewport.x;
|
|
107308
|
+
const y2 = cullRect.y - viewport.y;
|
|
107309
|
+
const {
|
|
107310
|
+
width: width2,
|
|
107311
|
+
height: height2
|
|
107312
|
+
} = cullRect;
|
|
107308
107313
|
const unprojectOption = {
|
|
107309
|
-
targetZ: z2
|
|
107314
|
+
targetZ: z2
|
|
107310
107315
|
};
|
|
107311
107316
|
const topLeft = viewport.unproject([x2, y2], unprojectOption);
|
|
107312
107317
|
const topRight = viewport.unproject([x2 + width2, y2], unprojectOption);
|
|
@@ -107314,16 +107319,8 @@ function getCullBounds({
|
|
|
107314
107319
|
const bottomRight = viewport.unproject([x2 + width2, y2 + height2], unprojectOption);
|
|
107315
107320
|
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])];
|
|
107316
107321
|
}
|
|
107317
|
-
const bounds0 =
|
|
107318
|
-
|
|
107319
|
-
z: z2[0],
|
|
107320
|
-
cullRect
|
|
107321
|
-
});
|
|
107322
|
-
const bounds1 = getCullBounds({
|
|
107323
|
-
viewport,
|
|
107324
|
-
z: z2[1],
|
|
107325
|
-
cullRect
|
|
107326
|
-
});
|
|
107322
|
+
const bounds0 = getCullBoundsInViewport(viewport, z2[0], cullRect);
|
|
107323
|
+
const bounds1 = getCullBoundsInViewport(viewport, z2[1], cullRect);
|
|
107327
107324
|
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])];
|
|
107328
107325
|
}
|
|
107329
107326
|
function getIndexingCoords(bbox2, scale2, modelMatrixInverse) {
|
|
@@ -107553,7 +107550,7 @@ class Tileset2D {
|
|
|
107553
107550
|
return false;
|
|
107554
107551
|
}
|
|
107555
107552
|
if (cullRect && this._viewport) {
|
|
107556
|
-
const
|
|
107553
|
+
const boundsArr = this._getCullBounds({
|
|
107557
107554
|
viewport: this._viewport,
|
|
107558
107555
|
z: this._zRange,
|
|
107559
107556
|
cullRect
|
|
@@ -107561,12 +107558,20 @@ class Tileset2D {
|
|
|
107561
107558
|
const {
|
|
107562
107559
|
bbox: bbox2
|
|
107563
107560
|
} = tile;
|
|
107564
|
-
|
|
107565
|
-
|
|
107561
|
+
for (const [minX, minY, maxX, maxY2] of boundsArr) {
|
|
107562
|
+
let overlaps;
|
|
107563
|
+
if ("west" in bbox2) {
|
|
107564
|
+
overlaps = bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY2 && bbox2.north > minY;
|
|
107565
|
+
} else {
|
|
107566
|
+
const y02 = Math.min(bbox2.top, bbox2.bottom);
|
|
107567
|
+
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
107568
|
+
overlaps = bbox2.left < maxX && bbox2.right > minX && y02 < maxY2 && y12 > minY;
|
|
107569
|
+
}
|
|
107570
|
+
if (overlaps) {
|
|
107571
|
+
return true;
|
|
107572
|
+
}
|
|
107566
107573
|
}
|
|
107567
|
-
|
|
107568
|
-
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
107569
|
-
return bbox2.left < maxX && bbox2.right > minX && y02 < maxY2 && y12 > minY;
|
|
107574
|
+
return false;
|
|
107570
107575
|
}
|
|
107571
107576
|
return true;
|
|
107572
107577
|
}
|
|
@@ -108015,14 +108020,19 @@ class TileLayer extends CompositeLayer {
|
|
|
108015
108020
|
info: info2,
|
|
108016
108021
|
sourceLayer
|
|
108017
108022
|
}) {
|
|
108023
|
+
const sourceTile = sourceLayer.props.tile;
|
|
108018
108024
|
if (info2.picked) {
|
|
108019
|
-
info2.tile =
|
|
108025
|
+
info2.tile = sourceTile;
|
|
108020
108026
|
}
|
|
108027
|
+
info2.sourceTile = sourceTile;
|
|
108021
108028
|
return info2;
|
|
108022
108029
|
}
|
|
108023
108030
|
_updateAutoHighlight(info2) {
|
|
108024
|
-
|
|
108025
|
-
|
|
108031
|
+
const sourceTile = info2.sourceTile;
|
|
108032
|
+
if (sourceTile && sourceTile.layers) {
|
|
108033
|
+
for (const layer of sourceTile.layers) {
|
|
108034
|
+
layer.updateAutoHighlight(info2);
|
|
108035
|
+
}
|
|
108026
108036
|
}
|
|
108027
108037
|
}
|
|
108028
108038
|
renderLayers() {
|
|
@@ -120340,6 +120350,9 @@ class ScenegraphNode {
|
|
|
120340
120350
|
toString() {
|
|
120341
120351
|
return "{type: ScenegraphNode, id: ".concat(this.id, ")}");
|
|
120342
120352
|
}
|
|
120353
|
+
getBounds() {
|
|
120354
|
+
return null;
|
|
120355
|
+
}
|
|
120343
120356
|
setPosition(position2) {
|
|
120344
120357
|
assert$9(position2.length === 3, "setPosition requires vector argument");
|
|
120345
120358
|
this.position = position2;
|
|
@@ -120490,6 +120503,34 @@ class GroupNode extends ScenegraphNode {
|
|
|
120490
120503
|
this.removeAll();
|
|
120491
120504
|
super.delete();
|
|
120492
120505
|
}
|
|
120506
|
+
getBounds() {
|
|
120507
|
+
const result = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]];
|
|
120508
|
+
this.traverse((node, _ref3) => {
|
|
120509
|
+
let {
|
|
120510
|
+
worldMatrix
|
|
120511
|
+
} = _ref3;
|
|
120512
|
+
const bounds2 = node.getBounds();
|
|
120513
|
+
if (!bounds2) {
|
|
120514
|
+
return;
|
|
120515
|
+
}
|
|
120516
|
+
const [min2, max2] = bounds2;
|
|
120517
|
+
const center2 = new Vector3(min2).add(max2).divide([2, 2, 2]);
|
|
120518
|
+
worldMatrix.transformAsPoint(center2, center2);
|
|
120519
|
+
const halfSize = new Vector3(max2).subtract(min2).divide([2, 2, 2]);
|
|
120520
|
+
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
120521
|
+
for (let v = 0; v < 8; v++) {
|
|
120522
|
+
const position2 = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
120523
|
+
for (let i2 = 0; i2 < 3; i2++) {
|
|
120524
|
+
result[0][i2] = Math.min(result[0][i2], position2[i2]);
|
|
120525
|
+
result[1][i2] = Math.max(result[1][i2], position2[i2]);
|
|
120526
|
+
}
|
|
120527
|
+
}
|
|
120528
|
+
});
|
|
120529
|
+
if (!Number.isFinite(result[0][0])) {
|
|
120530
|
+
return null;
|
|
120531
|
+
}
|
|
120532
|
+
return result;
|
|
120533
|
+
}
|
|
120493
120534
|
traverse(visitor) {
|
|
120494
120535
|
let {
|
|
120495
120536
|
worldMatrix = new Matrix4()
|
|
@@ -120739,6 +120780,7 @@ class ModelNode extends ScenegraphNode {
|
|
|
120739
120780
|
} else {
|
|
120740
120781
|
this.model = new Model$1(gl, props2);
|
|
120741
120782
|
}
|
|
120783
|
+
this.bounds = null;
|
|
120742
120784
|
this.managedResources = props2.managedResources || [];
|
|
120743
120785
|
}
|
|
120744
120786
|
setProps(props2) {
|
|
@@ -120746,6 +120788,9 @@ class ModelNode extends ScenegraphNode {
|
|
|
120746
120788
|
this._setModelNodeProps(props2);
|
|
120747
120789
|
return this;
|
|
120748
120790
|
}
|
|
120791
|
+
getBounds() {
|
|
120792
|
+
return this.bounds;
|
|
120793
|
+
}
|
|
120749
120794
|
delete() {
|
|
120750
120795
|
if (this.model) {
|
|
120751
120796
|
this.model.delete();
|
|
@@ -120930,17 +120975,21 @@ function createGLTFModel(gl, options) {
|
|
|
120930
120975
|
const managedResources = [];
|
|
120931
120976
|
managedResources.push(...materialParser.generatedTextures);
|
|
120932
120977
|
managedResources.push(...Object.values(attributes).map((attribute) => attribute.buffer));
|
|
120933
|
-
const model = new ModelNode(gl,
|
|
120978
|
+
const model = new ModelNode(gl, {
|
|
120934
120979
|
id: id2,
|
|
120935
120980
|
drawMode,
|
|
120936
120981
|
vertexCount,
|
|
120937
120982
|
modules: [pbr],
|
|
120938
|
-
defines: materialParser.defines,
|
|
120939
120983
|
parameters: materialParser.parameters,
|
|
120940
120984
|
vs: addVersionToShader(gl, vs$7),
|
|
120941
120985
|
fs: addVersionToShader(gl, fs$7),
|
|
120942
|
-
managedResources
|
|
120943
|
-
|
|
120986
|
+
managedResources,
|
|
120987
|
+
...modelOptions,
|
|
120988
|
+
defines: {
|
|
120989
|
+
...materialParser.defines,
|
|
120990
|
+
...modelOptions.defines
|
|
120991
|
+
}
|
|
120992
|
+
});
|
|
120944
120993
|
model.setProps({
|
|
120945
120994
|
attributes
|
|
120946
120995
|
});
|
|
@@ -121035,13 +121084,15 @@ class GLTFInstantiator {
|
|
|
121035
121084
|
log$8.warn("getVertexCount() not found")();
|
|
121036
121085
|
}
|
|
121037
121086
|
createPrimitive(gltfPrimitive, i2, gltfMesh) {
|
|
121038
|
-
|
|
121087
|
+
const model = createGLTFModel(this.gl, Object.assign({
|
|
121039
121088
|
id: gltfPrimitive.name || "".concat(gltfMesh.name || gltfMesh.id, "-primitive-").concat(i2),
|
|
121040
121089
|
drawMode: gltfPrimitive.mode || 4,
|
|
121041
121090
|
vertexCount: gltfPrimitive.indices ? gltfPrimitive.indices.count : this.getVertexCount(gltfPrimitive.attributes),
|
|
121042
121091
|
attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),
|
|
121043
121092
|
material: gltfPrimitive.material
|
|
121044
121093
|
}, this.options));
|
|
121094
|
+
model.bounds = [gltfPrimitive.attributes.POSITION.min, gltfPrimitive.attributes.POSITION.max];
|
|
121095
|
+
return model;
|
|
121045
121096
|
}
|
|
121046
121097
|
createAttributes(attributes, indices) {
|
|
121047
121098
|
const loadedAttributes = {};
|
|
@@ -128969,15 +129020,11 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
128969
129020
|
info: info2,
|
|
128970
129021
|
sourceLayer
|
|
128971
129022
|
}) {
|
|
128972
|
-
const
|
|
128973
|
-
|
|
128974
|
-
|
|
128975
|
-
const layerId = sourceLayer && sourceLayer.id;
|
|
128976
|
-
if (layerId) {
|
|
128977
|
-
const substr = layerId.substring(this.id.length + 1);
|
|
128978
|
-
const tileId = substr.substring(substr.indexOf("-") + 1);
|
|
128979
|
-
info2.object = layerMap[tileId] && layerMap[tileId].tile;
|
|
129023
|
+
const sourceTile = sourceLayer && sourceLayer.props.tile;
|
|
129024
|
+
if (info2.picked) {
|
|
129025
|
+
info2.object = sourceTile;
|
|
128980
129026
|
}
|
|
129027
|
+
info2.sourceTile = sourceTile;
|
|
128981
129028
|
return info2;
|
|
128982
129029
|
}
|
|
128983
129030
|
filterSubLayer({
|
|
@@ -128993,8 +129040,10 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
128993
129040
|
return tile.selected && tile.viewportIds.includes(viewportId);
|
|
128994
129041
|
}
|
|
128995
129042
|
_updateAutoHighlight(info2) {
|
|
128996
|
-
|
|
128997
|
-
|
|
129043
|
+
const sourceTile = info2.sourceTile;
|
|
129044
|
+
const layerCache = this.state.layerMap[sourceTile === null || sourceTile === void 0 ? void 0 : sourceTile.id];
|
|
129045
|
+
if (layerCache && layerCache.layer) {
|
|
129046
|
+
layerCache.layer.updateAutoHighlight(info2);
|
|
128998
129047
|
}
|
|
128999
129048
|
}
|
|
129000
129049
|
async _loadTileset(tilesetUrl) {
|
|
@@ -170153,16 +170202,16 @@ async function getDecoder(fileDirectory) {
|
|
|
170153
170202
|
const Decoder = await importFn();
|
|
170154
170203
|
return new Decoder(fileDirectory);
|
|
170155
170204
|
}
|
|
170156
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
170157
|
-
addDecoder(5, () => import("./lzw-
|
|
170205
|
+
addDecoder([void 0, 1], () => import("./raw-367b085b.js").then((m2) => m2.default));
|
|
170206
|
+
addDecoder(5, () => import("./lzw-3c38ef38.js").then((m2) => m2.default));
|
|
170158
170207
|
addDecoder(6, () => {
|
|
170159
170208
|
throw new Error("old style JPEG compression is not supported.");
|
|
170160
170209
|
});
|
|
170161
|
-
addDecoder(7, () => import("./jpeg-
|
|
170162
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
170163
|
-
addDecoder(32773, () => import("./packbits-
|
|
170164
|
-
addDecoder(34887, () => import("./lerc-
|
|
170165
|
-
addDecoder(50001, () => import("./webimage-
|
|
170210
|
+
addDecoder(7, () => import("./jpeg-8349089f.js").then((m2) => m2.default));
|
|
170211
|
+
addDecoder([8, 32946], () => import("./deflate-38551de0.js").then((m2) => m2.default));
|
|
170212
|
+
addDecoder(32773, () => import("./packbits-ffd38b8f.js").then((m2) => m2.default));
|
|
170213
|
+
addDecoder(34887, () => import("./lerc-4449a2af.js").then((m2) => m2.default));
|
|
170214
|
+
addDecoder(50001, () => import("./webimage-2c7bf8d5.js").then((m2) => m2.default));
|
|
170166
170215
|
function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
|
|
170167
170216
|
return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
|
|
170168
170217
|
}
|
|
@@ -215416,7 +215465,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
|
|
|
215416
215465
|
const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
|
|
215417
215466
|
register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
|
|
215418
215467
|
const LazyHiGlassComponent = React__default.lazy(async () => {
|
|
215419
|
-
const { HiGlassComponent } = await import("./hglib-
|
|
215468
|
+
const { HiGlassComponent } = await import("./hglib-3a7613d1.js").then((n3) => n3.h);
|
|
215420
215469
|
return { default: HiGlassComponent };
|
|
215421
215470
|
});
|
|
215422
215471
|
const HG_SIZE = 800;
|
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, L as LercParameters, a as LercAddCompression } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-05a9921e.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
var LercDecode = { exports: {} };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/dev",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"dist-tsc"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@vitessce/all": "3.3.
|
|
20
|
-
"@vitessce/config": "3.3.
|
|
21
|
-
"@vitessce/constants": "3.3.
|
|
22
|
-
"@vitessce/export-utils": "3.3.
|
|
19
|
+
"@vitessce/all": "3.3.1",
|
|
20
|
+
"@vitessce/config": "3.3.1",
|
|
21
|
+
"@vitessce/constants": "3.3.1",
|
|
22
|
+
"@vitessce/export-utils": "3.3.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@vitejs/plugin-react": "^4.0.0",
|