@vitessce/scatterplot-gating 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-db1c8f5b.js → deflate-636556e0.js} +1 -1
- package/dist/{index-ffb8adc6.js → index-f4743608.js} +120 -71
- package/dist/index.js +1 -1
- package/dist/{jpeg-b7775743.js → jpeg-3383b938.js} +1 -1
- package/dist/{lerc-8db218c1.js → lerc-c057e1dc.js} +1 -1
- package/dist/{lzw-5c97cf9e.js → lzw-476a6015.js} +1 -1
- package/dist/{packbits-3e7a20be.js → packbits-724e9549.js} +1 -1
- package/dist/{raw-d8d40fca.js → raw-268e3c0d.js} +1 -1
- package/dist/{webimage-adb9e0d3.js → webimage-534d8cfd.js} +1 -1
- package/package.json +6 -6
|
@@ -22134,7 +22134,7 @@ const jsonLoader = {
|
|
|
22134
22134
|
testText: isJSON,
|
|
22135
22135
|
parseTextSync: JSON.parse
|
|
22136
22136
|
};
|
|
22137
|
-
const version = "8.8.
|
|
22137
|
+
const version = "8.8.27";
|
|
22138
22138
|
const existingVersion = globalThis.deck && globalThis.deck.VERSION;
|
|
22139
22139
|
if (existingVersion && existingVersion !== version) {
|
|
22140
22140
|
throw new Error("deck.gl - multiple versions detected: ".concat(existingVersion, " vs ").concat(version));
|
|
@@ -23333,9 +23333,8 @@ function cssToDeviceRatio(gl) {
|
|
|
23333
23333
|
luma
|
|
23334
23334
|
} = gl;
|
|
23335
23335
|
if (gl.canvas && luma) {
|
|
23336
|
-
const
|
|
23337
|
-
|
|
23338
|
-
} = luma.canvasSizeInfo;
|
|
23336
|
+
const cachedSize = luma.canvasSizeInfo;
|
|
23337
|
+
const clientWidth = "clientWidth" in cachedSize ? cachedSize.clientWidth : gl.canvas.clientWidth;
|
|
23339
23338
|
return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
|
|
23340
23339
|
}
|
|
23341
23340
|
return 1;
|
|
@@ -23591,7 +23590,7 @@ function setDevicePixelRatio(gl, devicePixelRatio, options) {
|
|
|
23591
23590
|
});
|
|
23592
23591
|
}
|
|
23593
23592
|
}
|
|
23594
|
-
const VERSION$7 = "8.5.
|
|
23593
|
+
const VERSION$7 = "8.5.21";
|
|
23595
23594
|
const STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
23596
23595
|
class StatsManager {
|
|
23597
23596
|
constructor() {
|
|
@@ -23712,7 +23711,6 @@ let Resource$1 = class Resource {
|
|
|
23712
23711
|
this._handle = this._createHandle();
|
|
23713
23712
|
}
|
|
23714
23713
|
this.byteLength = 0;
|
|
23715
|
-
this._initStats();
|
|
23716
23714
|
this._addStats();
|
|
23717
23715
|
}
|
|
23718
23716
|
toString() {
|
|
@@ -23848,9 +23846,6 @@ let Resource$1 = class Resource {
|
|
|
23848
23846
|
this.gl.luma = this.gl.luma || {};
|
|
23849
23847
|
return this.gl.luma;
|
|
23850
23848
|
}
|
|
23851
|
-
_initStats() {
|
|
23852
|
-
this.gl.stats = this.gl.stats || new StatsManager();
|
|
23853
|
-
}
|
|
23854
23849
|
_addStats() {
|
|
23855
23850
|
const name2 = this[Symbol.toStringTag];
|
|
23856
23851
|
const stats = lumaStats.get("Resource Counts");
|
|
@@ -23865,27 +23860,29 @@ let Resource$1 = class Resource {
|
|
|
23865
23860
|
}
|
|
23866
23861
|
_trackAllocatedMemory(bytes) {
|
|
23867
23862
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
23868
|
-
this.
|
|
23869
|
-
this.
|
|
23863
|
+
this._trackAllocatedMemoryForContext(bytes, name2);
|
|
23864
|
+
this._trackAllocatedMemoryForContext(bytes, name2, this.gl.canvas && this.gl.canvas.id);
|
|
23865
|
+
this.byteLength = bytes;
|
|
23870
23866
|
}
|
|
23871
|
-
|
|
23867
|
+
_trackAllocatedMemoryForContext(bytes) {
|
|
23872
23868
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
23873
|
-
let
|
|
23869
|
+
let id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
23870
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
23874
23871
|
stats.get("GPU Memory").addCount(bytes);
|
|
23875
23872
|
stats.get("".concat(name2, " Memory")).addCount(bytes);
|
|
23876
|
-
this.byteLength = bytes;
|
|
23877
23873
|
}
|
|
23878
23874
|
_trackDeallocatedMemory() {
|
|
23879
23875
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
23880
|
-
this.
|
|
23881
|
-
this.
|
|
23876
|
+
this._trackDeallocatedMemoryForContext(name2);
|
|
23877
|
+
this._trackDeallocatedMemoryForContext(name2, this.gl.canvas && this.gl.canvas.id);
|
|
23878
|
+
this.byteLength = 0;
|
|
23882
23879
|
}
|
|
23883
|
-
|
|
23880
|
+
_trackDeallocatedMemoryForContext() {
|
|
23884
23881
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
23885
|
-
let
|
|
23882
|
+
let id = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
23883
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
23886
23884
|
stats.get("GPU Memory").subtractCount(this.byteLength);
|
|
23887
23885
|
stats.get("".concat(name2, " Memory")).subtractCount(this.byteLength);
|
|
23888
|
-
this.byteLength = 0;
|
|
23889
23886
|
}
|
|
23890
23887
|
};
|
|
23891
23888
|
const ERR_TYPE_DEDUCTION = "Failed to deduce GL constant from typed array";
|
|
@@ -37101,6 +37098,7 @@ const picking = {
|
|
|
37101
37098
|
inject: {
|
|
37102
37099
|
"vs:DECKGL_FILTER_GL_POSITION": "\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ",
|
|
37103
37100
|
"vs:DECKGL_FILTER_COLOR": "\n picking_setPickingColor(geometry.pickingColor);\n ",
|
|
37101
|
+
"fs:#decl": "\nuniform bool picking_uAttribute;\n ",
|
|
37104
37102
|
"fs:DECKGL_FILTER_COLOR": {
|
|
37105
37103
|
order: 99,
|
|
37106
37104
|
injection: "\n // use highlight color if this fragment belongs to the selected object.\n color = picking_filterHighlightColor(color);\n\n // use picking color if rendering to picking FBO.\n color = picking_filterPickingColor(color);\n "
|
|
@@ -37911,6 +37909,9 @@ class Viewport {
|
|
|
37911
37909
|
this.projectFlat = this.projectFlat.bind(this);
|
|
37912
37910
|
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
37913
37911
|
}
|
|
37912
|
+
get subViewports() {
|
|
37913
|
+
return null;
|
|
37914
|
+
}
|
|
37914
37915
|
get metersPerPixel() {
|
|
37915
37916
|
return this.distanceScales.metersPerUnit[2] / this.scale;
|
|
37916
37917
|
}
|
|
@@ -46802,7 +46803,7 @@ class Attribute extends DataColumn {
|
|
|
46802
46803
|
const {
|
|
46803
46804
|
startIndices
|
|
46804
46805
|
} = this;
|
|
46805
|
-
const vertexIndex = startIndices ? startIndices[row] : row;
|
|
46806
|
+
const vertexIndex = startIndices ? row < startIndices.length ? startIndices[row] : this.numInstances : row;
|
|
46806
46807
|
return vertexIndex * this.size;
|
|
46807
46808
|
}
|
|
46808
46809
|
getShaderAttributes() {
|
|
@@ -49446,7 +49447,7 @@ class Layer extends Component {
|
|
|
49446
49447
|
if (Array.isArray(highlightColor)) {
|
|
49447
49448
|
parameters.pickingHighlightColor = highlightColor;
|
|
49448
49449
|
}
|
|
49449
|
-
if (
|
|
49450
|
+
if (forceUpdate || highlightedObjectIndex !== oldProps.highlightedObjectIndex) {
|
|
49450
49451
|
parameters.pickingSelectedColor = Number.isFinite(highlightedObjectIndex) && highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;
|
|
49451
49452
|
}
|
|
49452
49453
|
this.setModuleParameters(parameters);
|
|
@@ -50809,7 +50810,7 @@ function interpolateQuad(quad, ut, vt) {
|
|
|
50809
50810
|
}
|
|
50810
50811
|
const vs$g = "\n#define SHADER_NAME bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float coordinateConversion;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n geometry.worldPosition = positions;\n geometry.uv = texCoords;\n geometry.pickingColor = pickingColor;\n\n gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vTexCoord = texCoords;\n\n if (coordinateConversion < -0.5) {\n vTexPos = geometry.position.xy + project_uCommonOrigin.xy;\n } else if (coordinateConversion > 0.5) {\n vTexPos = geometry.worldPosition.xy;\n }\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n";
|
|
50811
50812
|
const packUVsIntoRGB = "\nvec3 packUVsIntoRGB(vec2 uv) {\n // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n vec2 uv8bit = floor(uv * 256.);\n\n // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n // Scale and clamp to 0-1 range\n vec2 uvFraction = fract(uv * 256.);\n vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n return vec3(uv8bit, fractions) / 255.;\n}\n";
|
|
50812
|
-
const fs$i = "\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n float x = lnglat.x;\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n xy /= WORLD_SCALE;\n return degrees(vec2(\n xy.x - PI,\n atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvec2 getUV(vec2 pos) {\n return vec2(\n (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n );\n}\n\n".concat(packUVsIntoRGB, "\n\nvoid main(void) {\n vec2 uv = vTexCoord;\n if (coordinateConversion < -0.5) {\n vec2 lnglat = mercator_to_lnglat(vTexPos);\n uv = getUV(lnglat);\n } else if (coordinateConversion > 0.5) {\n vec2 commonPos = lnglat_to_mercator(vTexPos);\n uv = getUV(commonPos);\n }\n vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = uv;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n if (picking_uActive) {\n // Since instance information is not used, we can use picking color for pixel index\n gl_FragColor.rgb = packUVsIntoRGB(uv);\n }\n}\n");
|
|
50813
|
+
const fs$i = "\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n float x = lnglat.x;\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n xy /= WORLD_SCALE;\n return degrees(vec2(\n xy.x - PI,\n atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvec2 getUV(vec2 pos) {\n return vec2(\n (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n );\n}\n\n".concat(packUVsIntoRGB, "\n\nvoid main(void) {\n vec2 uv = vTexCoord;\n if (coordinateConversion < -0.5) {\n vec2 lnglat = mercator_to_lnglat(vTexPos);\n uv = getUV(lnglat);\n } else if (coordinateConversion > 0.5) {\n vec2 commonPos = lnglat_to_mercator(vTexPos);\n uv = getUV(commonPos);\n }\n vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = uv;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n if (picking_uActive && !picking_uAttribute) {\n // Since instance information is not used, we can use picking color for pixel index\n gl_FragColor.rgb = packUVsIntoRGB(uv);\n }\n}\n");
|
|
50813
50814
|
const defaultProps$I = {
|
|
50814
50815
|
image: {
|
|
50815
50816
|
type: "image",
|
|
@@ -58949,18 +58950,22 @@ function getBoundingBox(viewport, zRange, extent2) {
|
|
|
58949
58950
|
}
|
|
58950
58951
|
function getCullBounds({
|
|
58951
58952
|
viewport,
|
|
58952
|
-
z: z2,
|
|
58953
|
+
z: z2 = 0,
|
|
58953
58954
|
cullRect
|
|
58954
58955
|
}) {
|
|
58955
|
-
const
|
|
58956
|
-
|
|
58957
|
-
|
|
58958
|
-
|
|
58959
|
-
height
|
|
58960
|
-
} = cullRect;
|
|
58956
|
+
const subViewports = viewport.subViewports || [viewport];
|
|
58957
|
+
return subViewports.map((v) => getCullBoundsInViewport(v, z2, cullRect));
|
|
58958
|
+
}
|
|
58959
|
+
function getCullBoundsInViewport(viewport, z2, cullRect) {
|
|
58961
58960
|
if (!Array.isArray(z2)) {
|
|
58961
|
+
const x2 = cullRect.x - viewport.x;
|
|
58962
|
+
const y2 = cullRect.y - viewport.y;
|
|
58963
|
+
const {
|
|
58964
|
+
width,
|
|
58965
|
+
height
|
|
58966
|
+
} = cullRect;
|
|
58962
58967
|
const unprojectOption = {
|
|
58963
|
-
targetZ: z2
|
|
58968
|
+
targetZ: z2
|
|
58964
58969
|
};
|
|
58965
58970
|
const topLeft = viewport.unproject([x2, y2], unprojectOption);
|
|
58966
58971
|
const topRight = viewport.unproject([x2 + width, y2], unprojectOption);
|
|
@@ -58968,16 +58973,8 @@ function getCullBounds({
|
|
|
58968
58973
|
const bottomRight = viewport.unproject([x2 + width, y2 + height], unprojectOption);
|
|
58969
58974
|
return [Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]), Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]), Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]), Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1])];
|
|
58970
58975
|
}
|
|
58971
|
-
const bounds0 =
|
|
58972
|
-
|
|
58973
|
-
z: z2[0],
|
|
58974
|
-
cullRect
|
|
58975
|
-
});
|
|
58976
|
-
const bounds1 = getCullBounds({
|
|
58977
|
-
viewport,
|
|
58978
|
-
z: z2[1],
|
|
58979
|
-
cullRect
|
|
58980
|
-
});
|
|
58976
|
+
const bounds0 = getCullBoundsInViewport(viewport, z2[0], cullRect);
|
|
58977
|
+
const bounds1 = getCullBoundsInViewport(viewport, z2[1], cullRect);
|
|
58981
58978
|
return [Math.min(bounds0[0], bounds1[0]), Math.min(bounds0[1], bounds1[1]), Math.max(bounds0[2], bounds1[2]), Math.max(bounds0[3], bounds1[3])];
|
|
58982
58979
|
}
|
|
58983
58980
|
function getIndexingCoords(bbox2, scale2, modelMatrixInverse) {
|
|
@@ -59207,7 +59204,7 @@ class Tileset2D {
|
|
|
59207
59204
|
return false;
|
|
59208
59205
|
}
|
|
59209
59206
|
if (cullRect && this._viewport) {
|
|
59210
|
-
const
|
|
59207
|
+
const boundsArr = this._getCullBounds({
|
|
59211
59208
|
viewport: this._viewport,
|
|
59212
59209
|
z: this._zRange,
|
|
59213
59210
|
cullRect
|
|
@@ -59215,12 +59212,20 @@ class Tileset2D {
|
|
|
59215
59212
|
const {
|
|
59216
59213
|
bbox: bbox2
|
|
59217
59214
|
} = tile;
|
|
59218
|
-
|
|
59219
|
-
|
|
59215
|
+
for (const [minX, minY, maxX, maxY] of boundsArr) {
|
|
59216
|
+
let overlaps;
|
|
59217
|
+
if ("west" in bbox2) {
|
|
59218
|
+
overlaps = bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY && bbox2.north > minY;
|
|
59219
|
+
} else {
|
|
59220
|
+
const y02 = Math.min(bbox2.top, bbox2.bottom);
|
|
59221
|
+
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
59222
|
+
overlaps = bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
59223
|
+
}
|
|
59224
|
+
if (overlaps) {
|
|
59225
|
+
return true;
|
|
59226
|
+
}
|
|
59220
59227
|
}
|
|
59221
|
-
|
|
59222
|
-
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
59223
|
-
return bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
59228
|
+
return false;
|
|
59224
59229
|
}
|
|
59225
59230
|
return true;
|
|
59226
59231
|
}
|
|
@@ -59669,14 +59674,19 @@ class TileLayer extends CompositeLayer {
|
|
|
59669
59674
|
info,
|
|
59670
59675
|
sourceLayer
|
|
59671
59676
|
}) {
|
|
59677
|
+
const sourceTile = sourceLayer.props.tile;
|
|
59672
59678
|
if (info.picked) {
|
|
59673
|
-
info.tile =
|
|
59679
|
+
info.tile = sourceTile;
|
|
59674
59680
|
}
|
|
59681
|
+
info.sourceTile = sourceTile;
|
|
59675
59682
|
return info;
|
|
59676
59683
|
}
|
|
59677
59684
|
_updateAutoHighlight(info) {
|
|
59678
|
-
|
|
59679
|
-
|
|
59685
|
+
const sourceTile = info.sourceTile;
|
|
59686
|
+
if (sourceTile && sourceTile.layers) {
|
|
59687
|
+
for (const layer of sourceTile.layers) {
|
|
59688
|
+
layer.updateAutoHighlight(info);
|
|
59689
|
+
}
|
|
59680
59690
|
}
|
|
59681
59691
|
}
|
|
59682
59692
|
renderLayers() {
|
|
@@ -71994,6 +72004,9 @@ class ScenegraphNode {
|
|
|
71994
72004
|
toString() {
|
|
71995
72005
|
return "{type: ScenegraphNode, id: ".concat(this.id, ")}");
|
|
71996
72006
|
}
|
|
72007
|
+
getBounds() {
|
|
72008
|
+
return null;
|
|
72009
|
+
}
|
|
71997
72010
|
setPosition(position) {
|
|
71998
72011
|
assert$8(position.length === 3, "setPosition requires vector argument");
|
|
71999
72012
|
this.position = position;
|
|
@@ -72144,6 +72157,34 @@ class GroupNode extends ScenegraphNode {
|
|
|
72144
72157
|
this.removeAll();
|
|
72145
72158
|
super.delete();
|
|
72146
72159
|
}
|
|
72160
|
+
getBounds() {
|
|
72161
|
+
const result = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]];
|
|
72162
|
+
this.traverse((node, _ref3) => {
|
|
72163
|
+
let {
|
|
72164
|
+
worldMatrix
|
|
72165
|
+
} = _ref3;
|
|
72166
|
+
const bounds2 = node.getBounds();
|
|
72167
|
+
if (!bounds2) {
|
|
72168
|
+
return;
|
|
72169
|
+
}
|
|
72170
|
+
const [min, max] = bounds2;
|
|
72171
|
+
const center2 = new Vector3(min).add(max).divide([2, 2, 2]);
|
|
72172
|
+
worldMatrix.transformAsPoint(center2, center2);
|
|
72173
|
+
const halfSize = new Vector3(max).subtract(min).divide([2, 2, 2]);
|
|
72174
|
+
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
72175
|
+
for (let v = 0; v < 8; v++) {
|
|
72176
|
+
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
72177
|
+
for (let i2 = 0; i2 < 3; i2++) {
|
|
72178
|
+
result[0][i2] = Math.min(result[0][i2], position[i2]);
|
|
72179
|
+
result[1][i2] = Math.max(result[1][i2], position[i2]);
|
|
72180
|
+
}
|
|
72181
|
+
}
|
|
72182
|
+
});
|
|
72183
|
+
if (!Number.isFinite(result[0][0])) {
|
|
72184
|
+
return null;
|
|
72185
|
+
}
|
|
72186
|
+
return result;
|
|
72187
|
+
}
|
|
72147
72188
|
traverse(visitor) {
|
|
72148
72189
|
let {
|
|
72149
72190
|
worldMatrix = new Matrix4()
|
|
@@ -72393,6 +72434,7 @@ class ModelNode extends ScenegraphNode {
|
|
|
72393
72434
|
} else {
|
|
72394
72435
|
this.model = new Model(gl, props2);
|
|
72395
72436
|
}
|
|
72437
|
+
this.bounds = null;
|
|
72396
72438
|
this.managedResources = props2.managedResources || [];
|
|
72397
72439
|
}
|
|
72398
72440
|
setProps(props2) {
|
|
@@ -72400,6 +72442,9 @@ class ModelNode extends ScenegraphNode {
|
|
|
72400
72442
|
this._setModelNodeProps(props2);
|
|
72401
72443
|
return this;
|
|
72402
72444
|
}
|
|
72445
|
+
getBounds() {
|
|
72446
|
+
return this.bounds;
|
|
72447
|
+
}
|
|
72403
72448
|
delete() {
|
|
72404
72449
|
if (this.model) {
|
|
72405
72450
|
this.model.delete();
|
|
@@ -72584,17 +72629,21 @@ function createGLTFModel(gl, options) {
|
|
|
72584
72629
|
const managedResources = [];
|
|
72585
72630
|
managedResources.push(...materialParser.generatedTextures);
|
|
72586
72631
|
managedResources.push(...Object.values(attributes).map((attribute) => attribute.buffer));
|
|
72587
|
-
const model = new ModelNode(gl,
|
|
72632
|
+
const model = new ModelNode(gl, {
|
|
72588
72633
|
id,
|
|
72589
72634
|
drawMode,
|
|
72590
72635
|
vertexCount,
|
|
72591
72636
|
modules: [pbr],
|
|
72592
|
-
defines: materialParser.defines,
|
|
72593
72637
|
parameters: materialParser.parameters,
|
|
72594
72638
|
vs: addVersionToShader(gl, vs$7),
|
|
72595
72639
|
fs: addVersionToShader(gl, fs$7),
|
|
72596
|
-
managedResources
|
|
72597
|
-
|
|
72640
|
+
managedResources,
|
|
72641
|
+
...modelOptions,
|
|
72642
|
+
defines: {
|
|
72643
|
+
...materialParser.defines,
|
|
72644
|
+
...modelOptions.defines
|
|
72645
|
+
}
|
|
72646
|
+
});
|
|
72598
72647
|
model.setProps({
|
|
72599
72648
|
attributes
|
|
72600
72649
|
});
|
|
@@ -72689,13 +72738,15 @@ class GLTFInstantiator {
|
|
|
72689
72738
|
log$2.warn("getVertexCount() not found")();
|
|
72690
72739
|
}
|
|
72691
72740
|
createPrimitive(gltfPrimitive, i2, gltfMesh) {
|
|
72692
|
-
|
|
72741
|
+
const model = createGLTFModel(this.gl, Object.assign({
|
|
72693
72742
|
id: gltfPrimitive.name || "".concat(gltfMesh.name || gltfMesh.id, "-primitive-").concat(i2),
|
|
72694
72743
|
drawMode: gltfPrimitive.mode || 4,
|
|
72695
72744
|
vertexCount: gltfPrimitive.indices ? gltfPrimitive.indices.count : this.getVertexCount(gltfPrimitive.attributes),
|
|
72696
72745
|
attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),
|
|
72697
72746
|
material: gltfPrimitive.material
|
|
72698
72747
|
}, this.options));
|
|
72748
|
+
model.bounds = [gltfPrimitive.attributes.POSITION.min, gltfPrimitive.attributes.POSITION.max];
|
|
72749
|
+
return model;
|
|
72699
72750
|
}
|
|
72700
72751
|
createAttributes(attributes, indices) {
|
|
72701
72752
|
const loadedAttributes = {};
|
|
@@ -80623,15 +80674,11 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
80623
80674
|
info,
|
|
80624
80675
|
sourceLayer
|
|
80625
80676
|
}) {
|
|
80626
|
-
const
|
|
80627
|
-
|
|
80628
|
-
|
|
80629
|
-
const layerId = sourceLayer && sourceLayer.id;
|
|
80630
|
-
if (layerId) {
|
|
80631
|
-
const substr = layerId.substring(this.id.length + 1);
|
|
80632
|
-
const tileId = substr.substring(substr.indexOf("-") + 1);
|
|
80633
|
-
info.object = layerMap[tileId] && layerMap[tileId].tile;
|
|
80677
|
+
const sourceTile = sourceLayer && sourceLayer.props.tile;
|
|
80678
|
+
if (info.picked) {
|
|
80679
|
+
info.object = sourceTile;
|
|
80634
80680
|
}
|
|
80681
|
+
info.sourceTile = sourceTile;
|
|
80635
80682
|
return info;
|
|
80636
80683
|
}
|
|
80637
80684
|
filterSubLayer({
|
|
@@ -80647,8 +80694,10 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
80647
80694
|
return tile.selected && tile.viewportIds.includes(viewportId);
|
|
80648
80695
|
}
|
|
80649
80696
|
_updateAutoHighlight(info) {
|
|
80650
|
-
|
|
80651
|
-
|
|
80697
|
+
const sourceTile = info.sourceTile;
|
|
80698
|
+
const layerCache = this.state.layerMap[sourceTile === null || sourceTile === void 0 ? void 0 : sourceTile.id];
|
|
80699
|
+
if (layerCache && layerCache.layer) {
|
|
80700
|
+
layerCache.layer.updateAutoHighlight(info);
|
|
80652
80701
|
}
|
|
80653
80702
|
}
|
|
80654
80703
|
async _loadTileset(tilesetUrl) {
|
|
@@ -121126,16 +121175,16 @@ function addDecoder(cases, importFn) {
|
|
|
121126
121175
|
}
|
|
121127
121176
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121128
121177
|
}
|
|
121129
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121130
|
-
addDecoder(5, () => import("./lzw-
|
|
121178
|
+
addDecoder([void 0, 1], () => import("./raw-268e3c0d.js").then((m2) => m2.default));
|
|
121179
|
+
addDecoder(5, () => import("./lzw-476a6015.js").then((m2) => m2.default));
|
|
121131
121180
|
addDecoder(6, () => {
|
|
121132
121181
|
throw new Error("old style JPEG compression is not supported.");
|
|
121133
121182
|
});
|
|
121134
|
-
addDecoder(7, () => import("./jpeg-
|
|
121135
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121136
|
-
addDecoder(32773, () => import("./packbits-
|
|
121137
|
-
addDecoder(34887, () => import("./lerc-
|
|
121138
|
-
addDecoder(50001, () => import("./webimage-
|
|
121183
|
+
addDecoder(7, () => import("./jpeg-3383b938.js").then((m2) => m2.default));
|
|
121184
|
+
addDecoder([8, 32946], () => import("./deflate-636556e0.js").then((m2) => m2.default));
|
|
121185
|
+
addDecoder(32773, () => import("./packbits-724e9549.js").then((m2) => m2.default));
|
|
121186
|
+
addDecoder(34887, () => import("./lerc-c057e1dc.js").then((m2) => m2.default));
|
|
121187
|
+
addDecoder(50001, () => import("./webimage-534d8cfd.js").then((m2) => m2.default));
|
|
121139
121188
|
function decodeRowAcc(row, stride) {
|
|
121140
121189
|
let length2 = row.length - stride;
|
|
121141
121190
|
let offset5 = 0;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-f4743608.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/scatterplot-gating",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/sets-utils": "3.3.
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/scatterplot": "3.3.1",
|
|
24
|
+
"@vitessce/utils": "3.3.1",
|
|
25
|
+
"@vitessce/sets-utils": "3.3.1",
|
|
26
|
+
"@vitessce/vit-s": "3.3.1",
|
|
27
|
+
"@vitessce/constants-internal": "3.3.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"react": "^18.0.0",
|