@vitessce/zarr 3.3.0 → 3.3.2
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-cbfc7dda.js → deflate-9cfe31b4.js} +1 -1
- package/dist/{index-f6c69b65.js → index-2d09430a.js} +120 -71
- package/dist/index.js +1 -1
- package/dist/{jpeg-6aa85133.js → jpeg-e623e3f3.js} +1 -1
- package/dist/{lerc-b3d50536.js → lerc-3b89a300.js} +1 -1
- package/dist/{lzw-5e6de0df.js → lzw-834edf30.js} +1 -1
- package/dist/{packbits-7e23e08a.js → packbits-37beb194.js} +1 -1
- package/dist/{raw-4e6560dc.js → raw-f349901d.js} +1 -1
- package/dist/{webimage-6b964081.js → webimage-89dafa8c.js} +1 -1
- package/package.json +9 -9
|
@@ -41199,7 +41199,7 @@ const jsonLoader = {
|
|
|
41199
41199
|
testText: isJSON,
|
|
41200
41200
|
parseTextSync: JSON.parse
|
|
41201
41201
|
};
|
|
41202
|
-
const version = "8.8.
|
|
41202
|
+
const version = "8.8.27";
|
|
41203
41203
|
const existingVersion = globalThis.deck && globalThis.deck.VERSION;
|
|
41204
41204
|
if (existingVersion && existingVersion !== version) {
|
|
41205
41205
|
throw new Error("deck.gl - multiple versions detected: ".concat(existingVersion, " vs ").concat(version));
|
|
@@ -42398,9 +42398,8 @@ function cssToDeviceRatio(gl) {
|
|
|
42398
42398
|
luma
|
|
42399
42399
|
} = gl;
|
|
42400
42400
|
if (gl.canvas && luma) {
|
|
42401
|
-
const
|
|
42402
|
-
|
|
42403
|
-
} = luma.canvasSizeInfo;
|
|
42401
|
+
const cachedSize = luma.canvasSizeInfo;
|
|
42402
|
+
const clientWidth = "clientWidth" in cachedSize ? cachedSize.clientWidth : gl.canvas.clientWidth;
|
|
42404
42403
|
return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
|
|
42405
42404
|
}
|
|
42406
42405
|
return 1;
|
|
@@ -42656,7 +42655,7 @@ function setDevicePixelRatio(gl, devicePixelRatio, options) {
|
|
|
42656
42655
|
});
|
|
42657
42656
|
}
|
|
42658
42657
|
}
|
|
42659
|
-
const VERSION$7 = "8.5.
|
|
42658
|
+
const VERSION$7 = "8.5.21";
|
|
42660
42659
|
const STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
42661
42660
|
class StatsManager {
|
|
42662
42661
|
constructor() {
|
|
@@ -42777,7 +42776,6 @@ let Resource$1 = class Resource {
|
|
|
42777
42776
|
this._handle = this._createHandle();
|
|
42778
42777
|
}
|
|
42779
42778
|
this.byteLength = 0;
|
|
42780
|
-
this._initStats();
|
|
42781
42779
|
this._addStats();
|
|
42782
42780
|
}
|
|
42783
42781
|
toString() {
|
|
@@ -42913,9 +42911,6 @@ let Resource$1 = class Resource {
|
|
|
42913
42911
|
this.gl.luma = this.gl.luma || {};
|
|
42914
42912
|
return this.gl.luma;
|
|
42915
42913
|
}
|
|
42916
|
-
_initStats() {
|
|
42917
|
-
this.gl.stats = this.gl.stats || new StatsManager();
|
|
42918
|
-
}
|
|
42919
42914
|
_addStats() {
|
|
42920
42915
|
const name2 = this[Symbol.toStringTag];
|
|
42921
42916
|
const stats = lumaStats.get("Resource Counts");
|
|
@@ -42930,27 +42925,29 @@ let Resource$1 = class Resource {
|
|
|
42930
42925
|
}
|
|
42931
42926
|
_trackAllocatedMemory(bytes) {
|
|
42932
42927
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
42933
|
-
this.
|
|
42934
|
-
this.
|
|
42928
|
+
this._trackAllocatedMemoryForContext(bytes, name2);
|
|
42929
|
+
this._trackAllocatedMemoryForContext(bytes, name2, this.gl.canvas && this.gl.canvas.id);
|
|
42930
|
+
this.byteLength = bytes;
|
|
42935
42931
|
}
|
|
42936
|
-
|
|
42932
|
+
_trackAllocatedMemoryForContext(bytes) {
|
|
42937
42933
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
42938
|
-
let
|
|
42934
|
+
let id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
42935
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
42939
42936
|
stats.get("GPU Memory").addCount(bytes);
|
|
42940
42937
|
stats.get("".concat(name2, " Memory")).addCount(bytes);
|
|
42941
|
-
this.byteLength = bytes;
|
|
42942
42938
|
}
|
|
42943
42939
|
_trackDeallocatedMemory() {
|
|
42944
42940
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
42945
|
-
this.
|
|
42946
|
-
this.
|
|
42941
|
+
this._trackDeallocatedMemoryForContext(name2);
|
|
42942
|
+
this._trackDeallocatedMemoryForContext(name2, this.gl.canvas && this.gl.canvas.id);
|
|
42943
|
+
this.byteLength = 0;
|
|
42947
42944
|
}
|
|
42948
|
-
|
|
42945
|
+
_trackDeallocatedMemoryForContext() {
|
|
42949
42946
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
42950
|
-
let
|
|
42947
|
+
let id = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
42948
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
42951
42949
|
stats.get("GPU Memory").subtractCount(this.byteLength);
|
|
42952
42950
|
stats.get("".concat(name2, " Memory")).subtractCount(this.byteLength);
|
|
42953
|
-
this.byteLength = 0;
|
|
42954
42951
|
}
|
|
42955
42952
|
};
|
|
42956
42953
|
const ERR_TYPE_DEDUCTION = "Failed to deduce GL constant from typed array";
|
|
@@ -52565,6 +52562,7 @@ const picking = {
|
|
|
52565
52562
|
inject: {
|
|
52566
52563
|
"vs:DECKGL_FILTER_GL_POSITION": "\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ",
|
|
52567
52564
|
"vs:DECKGL_FILTER_COLOR": "\n picking_setPickingColor(geometry.pickingColor);\n ",
|
|
52565
|
+
"fs:#decl": "\nuniform bool picking_uAttribute;\n ",
|
|
52568
52566
|
"fs:DECKGL_FILTER_COLOR": {
|
|
52569
52567
|
order: 99,
|
|
52570
52568
|
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 "
|
|
@@ -53375,6 +53373,9 @@ class Viewport {
|
|
|
53375
53373
|
this.projectFlat = this.projectFlat.bind(this);
|
|
53376
53374
|
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
53377
53375
|
}
|
|
53376
|
+
get subViewports() {
|
|
53377
|
+
return null;
|
|
53378
|
+
}
|
|
53378
53379
|
get metersPerPixel() {
|
|
53379
53380
|
return this.distanceScales.metersPerUnit[2] / this.scale;
|
|
53380
53381
|
}
|
|
@@ -62266,7 +62267,7 @@ class Attribute extends DataColumn {
|
|
|
62266
62267
|
const {
|
|
62267
62268
|
startIndices
|
|
62268
62269
|
} = this;
|
|
62269
|
-
const vertexIndex = startIndices ? startIndices[row] : row;
|
|
62270
|
+
const vertexIndex = startIndices ? row < startIndices.length ? startIndices[row] : this.numInstances : row;
|
|
62270
62271
|
return vertexIndex * this.size;
|
|
62271
62272
|
}
|
|
62272
62273
|
getShaderAttributes() {
|
|
@@ -64910,7 +64911,7 @@ class Layer extends Component {
|
|
|
64910
64911
|
if (Array.isArray(highlightColor)) {
|
|
64911
64912
|
parameters.pickingHighlightColor = highlightColor;
|
|
64912
64913
|
}
|
|
64913
|
-
if (
|
|
64914
|
+
if (forceUpdate || highlightedObjectIndex !== oldProps.highlightedObjectIndex) {
|
|
64914
64915
|
parameters.pickingSelectedColor = Number.isFinite(highlightedObjectIndex) && highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;
|
|
64915
64916
|
}
|
|
64916
64917
|
this.setModuleParameters(parameters);
|
|
@@ -66273,7 +66274,7 @@ function interpolateQuad(quad, ut, vt) {
|
|
|
66273
66274
|
}
|
|
66274
66275
|
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";
|
|
66275
66276
|
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";
|
|
66276
|
-
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");
|
|
66277
|
+
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");
|
|
66277
66278
|
const defaultProps$I = {
|
|
66278
66279
|
image: {
|
|
66279
66280
|
type: "image",
|
|
@@ -74413,18 +74414,22 @@ function getBoundingBox(viewport, zRange, extent2) {
|
|
|
74413
74414
|
}
|
|
74414
74415
|
function getCullBounds({
|
|
74415
74416
|
viewport,
|
|
74416
|
-
z: z2,
|
|
74417
|
+
z: z2 = 0,
|
|
74417
74418
|
cullRect
|
|
74418
74419
|
}) {
|
|
74419
|
-
const
|
|
74420
|
-
|
|
74421
|
-
|
|
74422
|
-
|
|
74423
|
-
height
|
|
74424
|
-
} = cullRect;
|
|
74420
|
+
const subViewports = viewport.subViewports || [viewport];
|
|
74421
|
+
return subViewports.map((v) => getCullBoundsInViewport(v, z2, cullRect));
|
|
74422
|
+
}
|
|
74423
|
+
function getCullBoundsInViewport(viewport, z2, cullRect) {
|
|
74425
74424
|
if (!Array.isArray(z2)) {
|
|
74425
|
+
const x2 = cullRect.x - viewport.x;
|
|
74426
|
+
const y2 = cullRect.y - viewport.y;
|
|
74427
|
+
const {
|
|
74428
|
+
width,
|
|
74429
|
+
height
|
|
74430
|
+
} = cullRect;
|
|
74426
74431
|
const unprojectOption = {
|
|
74427
|
-
targetZ: z2
|
|
74432
|
+
targetZ: z2
|
|
74428
74433
|
};
|
|
74429
74434
|
const topLeft = viewport.unproject([x2, y2], unprojectOption);
|
|
74430
74435
|
const topRight = viewport.unproject([x2 + width, y2], unprojectOption);
|
|
@@ -74432,16 +74437,8 @@ function getCullBounds({
|
|
|
74432
74437
|
const bottomRight = viewport.unproject([x2 + width, y2 + height], unprojectOption);
|
|
74433
74438
|
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])];
|
|
74434
74439
|
}
|
|
74435
|
-
const bounds0 =
|
|
74436
|
-
|
|
74437
|
-
z: z2[0],
|
|
74438
|
-
cullRect
|
|
74439
|
-
});
|
|
74440
|
-
const bounds1 = getCullBounds({
|
|
74441
|
-
viewport,
|
|
74442
|
-
z: z2[1],
|
|
74443
|
-
cullRect
|
|
74444
|
-
});
|
|
74440
|
+
const bounds0 = getCullBoundsInViewport(viewport, z2[0], cullRect);
|
|
74441
|
+
const bounds1 = getCullBoundsInViewport(viewport, z2[1], cullRect);
|
|
74445
74442
|
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])];
|
|
74446
74443
|
}
|
|
74447
74444
|
function getIndexingCoords(bbox2, scale2, modelMatrixInverse) {
|
|
@@ -74671,7 +74668,7 @@ class Tileset2D {
|
|
|
74671
74668
|
return false;
|
|
74672
74669
|
}
|
|
74673
74670
|
if (cullRect && this._viewport) {
|
|
74674
|
-
const
|
|
74671
|
+
const boundsArr = this._getCullBounds({
|
|
74675
74672
|
viewport: this._viewport,
|
|
74676
74673
|
z: this._zRange,
|
|
74677
74674
|
cullRect
|
|
@@ -74679,12 +74676,20 @@ class Tileset2D {
|
|
|
74679
74676
|
const {
|
|
74680
74677
|
bbox: bbox2
|
|
74681
74678
|
} = tile;
|
|
74682
|
-
|
|
74683
|
-
|
|
74679
|
+
for (const [minX, minY, maxX, maxY] of boundsArr) {
|
|
74680
|
+
let overlaps;
|
|
74681
|
+
if ("west" in bbox2) {
|
|
74682
|
+
overlaps = bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY && bbox2.north > minY;
|
|
74683
|
+
} else {
|
|
74684
|
+
const y02 = Math.min(bbox2.top, bbox2.bottom);
|
|
74685
|
+
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
74686
|
+
overlaps = bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
74687
|
+
}
|
|
74688
|
+
if (overlaps) {
|
|
74689
|
+
return true;
|
|
74690
|
+
}
|
|
74684
74691
|
}
|
|
74685
|
-
|
|
74686
|
-
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
74687
|
-
return bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
74692
|
+
return false;
|
|
74688
74693
|
}
|
|
74689
74694
|
return true;
|
|
74690
74695
|
}
|
|
@@ -75133,14 +75138,19 @@ class TileLayer extends CompositeLayer {
|
|
|
75133
75138
|
info,
|
|
75134
75139
|
sourceLayer
|
|
75135
75140
|
}) {
|
|
75141
|
+
const sourceTile = sourceLayer.props.tile;
|
|
75136
75142
|
if (info.picked) {
|
|
75137
|
-
info.tile =
|
|
75143
|
+
info.tile = sourceTile;
|
|
75138
75144
|
}
|
|
75145
|
+
info.sourceTile = sourceTile;
|
|
75139
75146
|
return info;
|
|
75140
75147
|
}
|
|
75141
75148
|
_updateAutoHighlight(info) {
|
|
75142
|
-
|
|
75143
|
-
|
|
75149
|
+
const sourceTile = info.sourceTile;
|
|
75150
|
+
if (sourceTile && sourceTile.layers) {
|
|
75151
|
+
for (const layer of sourceTile.layers) {
|
|
75152
|
+
layer.updateAutoHighlight(info);
|
|
75153
|
+
}
|
|
75144
75154
|
}
|
|
75145
75155
|
}
|
|
75146
75156
|
renderLayers() {
|
|
@@ -87458,6 +87468,9 @@ class ScenegraphNode {
|
|
|
87458
87468
|
toString() {
|
|
87459
87469
|
return "{type: ScenegraphNode, id: ".concat(this.id, ")}");
|
|
87460
87470
|
}
|
|
87471
|
+
getBounds() {
|
|
87472
|
+
return null;
|
|
87473
|
+
}
|
|
87461
87474
|
setPosition(position) {
|
|
87462
87475
|
assert$7(position.length === 3, "setPosition requires vector argument");
|
|
87463
87476
|
this.position = position;
|
|
@@ -87608,6 +87621,34 @@ class GroupNode extends ScenegraphNode {
|
|
|
87608
87621
|
this.removeAll();
|
|
87609
87622
|
super.delete();
|
|
87610
87623
|
}
|
|
87624
|
+
getBounds() {
|
|
87625
|
+
const result = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]];
|
|
87626
|
+
this.traverse((node2, _ref) => {
|
|
87627
|
+
let {
|
|
87628
|
+
worldMatrix
|
|
87629
|
+
} = _ref;
|
|
87630
|
+
const bounds2 = node2.getBounds();
|
|
87631
|
+
if (!bounds2) {
|
|
87632
|
+
return;
|
|
87633
|
+
}
|
|
87634
|
+
const [min2, max2] = bounds2;
|
|
87635
|
+
const center2 = new Vector3(min2).add(max2).divide([2, 2, 2]);
|
|
87636
|
+
worldMatrix.transformAsPoint(center2, center2);
|
|
87637
|
+
const halfSize = new Vector3(max2).subtract(min2).divide([2, 2, 2]);
|
|
87638
|
+
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
87639
|
+
for (let v = 0; v < 8; v++) {
|
|
87640
|
+
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
87641
|
+
for (let i2 = 0; i2 < 3; i2++) {
|
|
87642
|
+
result[0][i2] = Math.min(result[0][i2], position[i2]);
|
|
87643
|
+
result[1][i2] = Math.max(result[1][i2], position[i2]);
|
|
87644
|
+
}
|
|
87645
|
+
}
|
|
87646
|
+
});
|
|
87647
|
+
if (!Number.isFinite(result[0][0])) {
|
|
87648
|
+
return null;
|
|
87649
|
+
}
|
|
87650
|
+
return result;
|
|
87651
|
+
}
|
|
87611
87652
|
traverse(visitor) {
|
|
87612
87653
|
let {
|
|
87613
87654
|
worldMatrix = new Matrix4()
|
|
@@ -87857,6 +87898,7 @@ class ModelNode extends ScenegraphNode {
|
|
|
87857
87898
|
} else {
|
|
87858
87899
|
this.model = new Model(gl, props2);
|
|
87859
87900
|
}
|
|
87901
|
+
this.bounds = null;
|
|
87860
87902
|
this.managedResources = props2.managedResources || [];
|
|
87861
87903
|
}
|
|
87862
87904
|
setProps(props2) {
|
|
@@ -87864,6 +87906,9 @@ class ModelNode extends ScenegraphNode {
|
|
|
87864
87906
|
this._setModelNodeProps(props2);
|
|
87865
87907
|
return this;
|
|
87866
87908
|
}
|
|
87909
|
+
getBounds() {
|
|
87910
|
+
return this.bounds;
|
|
87911
|
+
}
|
|
87867
87912
|
delete() {
|
|
87868
87913
|
if (this.model) {
|
|
87869
87914
|
this.model.delete();
|
|
@@ -88048,17 +88093,21 @@ function createGLTFModel(gl, options) {
|
|
|
88048
88093
|
const managedResources = [];
|
|
88049
88094
|
managedResources.push(...materialParser.generatedTextures);
|
|
88050
88095
|
managedResources.push(...Object.values(attributes).map((attribute) => attribute.buffer));
|
|
88051
|
-
const model = new ModelNode(gl,
|
|
88096
|
+
const model = new ModelNode(gl, {
|
|
88052
88097
|
id,
|
|
88053
88098
|
drawMode,
|
|
88054
88099
|
vertexCount,
|
|
88055
88100
|
modules: [pbr],
|
|
88056
|
-
defines: materialParser.defines,
|
|
88057
88101
|
parameters: materialParser.parameters,
|
|
88058
88102
|
vs: addVersionToShader(gl, vs$7),
|
|
88059
88103
|
fs: addVersionToShader(gl, fs$7),
|
|
88060
|
-
managedResources
|
|
88061
|
-
|
|
88104
|
+
managedResources,
|
|
88105
|
+
...modelOptions,
|
|
88106
|
+
defines: {
|
|
88107
|
+
...materialParser.defines,
|
|
88108
|
+
...modelOptions.defines
|
|
88109
|
+
}
|
|
88110
|
+
});
|
|
88062
88111
|
model.setProps({
|
|
88063
88112
|
attributes
|
|
88064
88113
|
});
|
|
@@ -88153,13 +88202,15 @@ class GLTFInstantiator {
|
|
|
88153
88202
|
log$2.warn("getVertexCount() not found")();
|
|
88154
88203
|
}
|
|
88155
88204
|
createPrimitive(gltfPrimitive, i2, gltfMesh) {
|
|
88156
|
-
|
|
88205
|
+
const model = createGLTFModel(this.gl, Object.assign({
|
|
88157
88206
|
id: gltfPrimitive.name || "".concat(gltfMesh.name || gltfMesh.id, "-primitive-").concat(i2),
|
|
88158
88207
|
drawMode: gltfPrimitive.mode || 4,
|
|
88159
88208
|
vertexCount: gltfPrimitive.indices ? gltfPrimitive.indices.count : this.getVertexCount(gltfPrimitive.attributes),
|
|
88160
88209
|
attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),
|
|
88161
88210
|
material: gltfPrimitive.material
|
|
88162
88211
|
}, this.options));
|
|
88212
|
+
model.bounds = [gltfPrimitive.attributes.POSITION.min, gltfPrimitive.attributes.POSITION.max];
|
|
88213
|
+
return model;
|
|
88163
88214
|
}
|
|
88164
88215
|
createAttributes(attributes, indices) {
|
|
88165
88216
|
const loadedAttributes = {};
|
|
@@ -96087,15 +96138,11 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
96087
96138
|
info,
|
|
96088
96139
|
sourceLayer
|
|
96089
96140
|
}) {
|
|
96090
|
-
const
|
|
96091
|
-
|
|
96092
|
-
|
|
96093
|
-
const layerId = sourceLayer && sourceLayer.id;
|
|
96094
|
-
if (layerId) {
|
|
96095
|
-
const substr = layerId.substring(this.id.length + 1);
|
|
96096
|
-
const tileId = substr.substring(substr.indexOf("-") + 1);
|
|
96097
|
-
info.object = layerMap[tileId] && layerMap[tileId].tile;
|
|
96141
|
+
const sourceTile = sourceLayer && sourceLayer.props.tile;
|
|
96142
|
+
if (info.picked) {
|
|
96143
|
+
info.object = sourceTile;
|
|
96098
96144
|
}
|
|
96145
|
+
info.sourceTile = sourceTile;
|
|
96099
96146
|
return info;
|
|
96100
96147
|
}
|
|
96101
96148
|
filterSubLayer({
|
|
@@ -96111,8 +96158,10 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
96111
96158
|
return tile.selected && tile.viewportIds.includes(viewportId);
|
|
96112
96159
|
}
|
|
96113
96160
|
_updateAutoHighlight(info) {
|
|
96114
|
-
|
|
96115
|
-
|
|
96161
|
+
const sourceTile = info.sourceTile;
|
|
96162
|
+
const layerCache = this.state.layerMap[sourceTile === null || sourceTile === void 0 ? void 0 : sourceTile.id];
|
|
96163
|
+
if (layerCache && layerCache.layer) {
|
|
96164
|
+
layerCache.layer.updateAutoHighlight(info);
|
|
96116
96165
|
}
|
|
96117
96166
|
}
|
|
96118
96167
|
async _loadTileset(tilesetUrl) {
|
|
@@ -136134,16 +136183,16 @@ function addDecoder(cases, importFn) {
|
|
|
136134
136183
|
}
|
|
136135
136184
|
cases.forEach((c) => registry$1.set(c, importFn));
|
|
136136
136185
|
}
|
|
136137
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
136138
|
-
addDecoder(5, () => import("./lzw-
|
|
136186
|
+
addDecoder([void 0, 1], () => import("./raw-f349901d.js").then((m) => m.default));
|
|
136187
|
+
addDecoder(5, () => import("./lzw-834edf30.js").then((m) => m.default));
|
|
136139
136188
|
addDecoder(6, () => {
|
|
136140
136189
|
throw new Error("old style JPEG compression is not supported.");
|
|
136141
136190
|
});
|
|
136142
|
-
addDecoder(7, () => import("./jpeg-
|
|
136143
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
136144
|
-
addDecoder(32773, () => import("./packbits-
|
|
136145
|
-
addDecoder(34887, () => import("./lerc-
|
|
136146
|
-
addDecoder(50001, () => import("./webimage-
|
|
136191
|
+
addDecoder(7, () => import("./jpeg-e623e3f3.js").then((m) => m.default));
|
|
136192
|
+
addDecoder([8, 32946], () => import("./deflate-9cfe31b4.js").then((m) => m.default));
|
|
136193
|
+
addDecoder(32773, () => import("./packbits-37beb194.js").then((m) => m.default));
|
|
136194
|
+
addDecoder(34887, () => import("./lerc-3b89a300.js").then((m) => m.default));
|
|
136195
|
+
addDecoder(50001, () => import("./webimage-89dafa8c.js").then((m) => m.default));
|
|
136147
136196
|
function decodeRowAcc(row, stride) {
|
|
136148
136197
|
let length2 = row.length - stride;
|
|
136149
136198
|
let offset = 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-2d09430a.js";
|
|
3
3
|
import "@vitessce/vit-s";
|
|
4
4
|
import "react";
|
|
5
5
|
const LercParameters = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/zarr",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"d3-array": "^2.4.0",
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"zarrita": "0.4.0-next.4",
|
|
22
|
-
"@vitessce/constants-internal": "3.3.
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/sets-utils": "3.3.
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
28
|
-
"@vitessce/vit-s": "3.3.
|
|
29
|
-
"@vitessce/zarr-utils": "3.3.
|
|
22
|
+
"@vitessce/constants-internal": "3.3.2",
|
|
23
|
+
"@vitessce/spatial-utils": "3.3.2",
|
|
24
|
+
"@vitessce/sets-utils": "3.3.2",
|
|
25
|
+
"@vitessce/image-utils": "3.3.2",
|
|
26
|
+
"@vitessce/utils": "3.3.2",
|
|
27
|
+
"@vitessce/gl": "3.3.2",
|
|
28
|
+
"@vitessce/vit-s": "3.3.2",
|
|
29
|
+
"@vitessce/zarr-utils": "3.3.2"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|