@vitessce/scatterplot-embedding 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-bd431815.js → deflate-fd4358a6.js} +1 -1
- package/dist/{index-87e09f29.js → index-1989acf5.js} +120 -71
- package/dist/index.js +1 -1
- package/dist/{jpeg-418390c5.js → jpeg-da8c250c.js} +1 -1
- package/dist/{lerc-f1c20446.js → lerc-d5bf01c3.js} +1 -1
- package/dist/{lzw-9f579219.js → lzw-7366b7df.js} +1 -1
- package/dist/{packbits-81f5fada.js → packbits-8da18e40.js} +1 -1
- package/dist/{raw-12234337.js → raw-87e3335a.js} +1 -1
- package/dist/{webimage-6ef04827.js → webimage-6b9ff4dc.js} +1 -1
- package/package.json +7 -7
|
@@ -22220,7 +22220,7 @@ const jsonLoader = {
|
|
|
22220
22220
|
testText: isJSON,
|
|
22221
22221
|
parseTextSync: JSON.parse
|
|
22222
22222
|
};
|
|
22223
|
-
const version = "8.8.
|
|
22223
|
+
const version = "8.8.27";
|
|
22224
22224
|
const existingVersion = globalThis.deck && globalThis.deck.VERSION;
|
|
22225
22225
|
if (existingVersion && existingVersion !== version) {
|
|
22226
22226
|
throw new Error("deck.gl - multiple versions detected: ".concat(existingVersion, " vs ").concat(version));
|
|
@@ -23419,9 +23419,8 @@ function cssToDeviceRatio(gl) {
|
|
|
23419
23419
|
luma
|
|
23420
23420
|
} = gl;
|
|
23421
23421
|
if (gl.canvas && luma) {
|
|
23422
|
-
const
|
|
23423
|
-
|
|
23424
|
-
} = luma.canvasSizeInfo;
|
|
23422
|
+
const cachedSize = luma.canvasSizeInfo;
|
|
23423
|
+
const clientWidth = "clientWidth" in cachedSize ? cachedSize.clientWidth : gl.canvas.clientWidth;
|
|
23425
23424
|
return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;
|
|
23426
23425
|
}
|
|
23427
23426
|
return 1;
|
|
@@ -23677,7 +23676,7 @@ function setDevicePixelRatio(gl, devicePixelRatio, options) {
|
|
|
23677
23676
|
});
|
|
23678
23677
|
}
|
|
23679
23678
|
}
|
|
23680
|
-
const VERSION$7 = "8.5.
|
|
23679
|
+
const VERSION$7 = "8.5.21";
|
|
23681
23680
|
const STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
|
|
23682
23681
|
class StatsManager {
|
|
23683
23682
|
constructor() {
|
|
@@ -23798,7 +23797,6 @@ let Resource$1 = class Resource {
|
|
|
23798
23797
|
this._handle = this._createHandle();
|
|
23799
23798
|
}
|
|
23800
23799
|
this.byteLength = 0;
|
|
23801
|
-
this._initStats();
|
|
23802
23800
|
this._addStats();
|
|
23803
23801
|
}
|
|
23804
23802
|
toString() {
|
|
@@ -23934,9 +23932,6 @@ let Resource$1 = class Resource {
|
|
|
23934
23932
|
this.gl.luma = this.gl.luma || {};
|
|
23935
23933
|
return this.gl.luma;
|
|
23936
23934
|
}
|
|
23937
|
-
_initStats() {
|
|
23938
|
-
this.gl.stats = this.gl.stats || new StatsManager();
|
|
23939
|
-
}
|
|
23940
23935
|
_addStats() {
|
|
23941
23936
|
const name2 = this[Symbol.toStringTag];
|
|
23942
23937
|
const stats = lumaStats.get("Resource Counts");
|
|
@@ -23951,27 +23946,29 @@ let Resource$1 = class Resource {
|
|
|
23951
23946
|
}
|
|
23952
23947
|
_trackAllocatedMemory(bytes) {
|
|
23953
23948
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
23954
|
-
this.
|
|
23955
|
-
this.
|
|
23949
|
+
this._trackAllocatedMemoryForContext(bytes, name2);
|
|
23950
|
+
this._trackAllocatedMemoryForContext(bytes, name2, this.gl.canvas && this.gl.canvas.id);
|
|
23951
|
+
this.byteLength = bytes;
|
|
23956
23952
|
}
|
|
23957
|
-
|
|
23953
|
+
_trackAllocatedMemoryForContext(bytes) {
|
|
23958
23954
|
let name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[Symbol.toStringTag];
|
|
23959
|
-
let
|
|
23955
|
+
let id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
23956
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
23960
23957
|
stats.get("GPU Memory").addCount(bytes);
|
|
23961
23958
|
stats.get("".concat(name2, " Memory")).addCount(bytes);
|
|
23962
|
-
this.byteLength = bytes;
|
|
23963
23959
|
}
|
|
23964
23960
|
_trackDeallocatedMemory() {
|
|
23965
23961
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
23966
|
-
this.
|
|
23967
|
-
this.
|
|
23962
|
+
this._trackDeallocatedMemoryForContext(name2);
|
|
23963
|
+
this._trackDeallocatedMemoryForContext(name2, this.gl.canvas && this.gl.canvas.id);
|
|
23964
|
+
this.byteLength = 0;
|
|
23968
23965
|
}
|
|
23969
|
-
|
|
23966
|
+
_trackDeallocatedMemoryForContext() {
|
|
23970
23967
|
let name2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this[Symbol.toStringTag];
|
|
23971
|
-
let
|
|
23968
|
+
let id = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
23969
|
+
const stats = lumaStats.get("Memory Usage".concat(id));
|
|
23972
23970
|
stats.get("GPU Memory").subtractCount(this.byteLength);
|
|
23973
23971
|
stats.get("".concat(name2, " Memory")).subtractCount(this.byteLength);
|
|
23974
|
-
this.byteLength = 0;
|
|
23975
23972
|
}
|
|
23976
23973
|
};
|
|
23977
23974
|
const ERR_TYPE_DEDUCTION = "Failed to deduce GL constant from typed array";
|
|
@@ -37187,6 +37184,7 @@ const picking = {
|
|
|
37187
37184
|
inject: {
|
|
37188
37185
|
"vs:DECKGL_FILTER_GL_POSITION": "\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ",
|
|
37189
37186
|
"vs:DECKGL_FILTER_COLOR": "\n picking_setPickingColor(geometry.pickingColor);\n ",
|
|
37187
|
+
"fs:#decl": "\nuniform bool picking_uAttribute;\n ",
|
|
37190
37188
|
"fs:DECKGL_FILTER_COLOR": {
|
|
37191
37189
|
order: 99,
|
|
37192
37190
|
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 "
|
|
@@ -37997,6 +37995,9 @@ class Viewport {
|
|
|
37997
37995
|
this.projectFlat = this.projectFlat.bind(this);
|
|
37998
37996
|
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
37999
37997
|
}
|
|
37998
|
+
get subViewports() {
|
|
37999
|
+
return null;
|
|
38000
|
+
}
|
|
38000
38001
|
get metersPerPixel() {
|
|
38001
38002
|
return this.distanceScales.metersPerUnit[2] / this.scale;
|
|
38002
38003
|
}
|
|
@@ -46888,7 +46889,7 @@ class Attribute extends DataColumn {
|
|
|
46888
46889
|
const {
|
|
46889
46890
|
startIndices
|
|
46890
46891
|
} = this;
|
|
46891
|
-
const vertexIndex = startIndices ? startIndices[row] : row;
|
|
46892
|
+
const vertexIndex = startIndices ? row < startIndices.length ? startIndices[row] : this.numInstances : row;
|
|
46892
46893
|
return vertexIndex * this.size;
|
|
46893
46894
|
}
|
|
46894
46895
|
getShaderAttributes() {
|
|
@@ -49532,7 +49533,7 @@ class Layer extends Component {
|
|
|
49532
49533
|
if (Array.isArray(highlightColor)) {
|
|
49533
49534
|
parameters.pickingHighlightColor = highlightColor;
|
|
49534
49535
|
}
|
|
49535
|
-
if (
|
|
49536
|
+
if (forceUpdate || highlightedObjectIndex !== oldProps.highlightedObjectIndex) {
|
|
49536
49537
|
parameters.pickingSelectedColor = Number.isFinite(highlightedObjectIndex) && highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;
|
|
49537
49538
|
}
|
|
49538
49539
|
this.setModuleParameters(parameters);
|
|
@@ -50895,7 +50896,7 @@ function interpolateQuad(quad, ut, vt) {
|
|
|
50895
50896
|
}
|
|
50896
50897
|
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";
|
|
50897
50898
|
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";
|
|
50898
|
-
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");
|
|
50899
|
+
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");
|
|
50899
50900
|
const defaultProps$I = {
|
|
50900
50901
|
image: {
|
|
50901
50902
|
type: "image",
|
|
@@ -59035,18 +59036,22 @@ function getBoundingBox(viewport, zRange, extent2) {
|
|
|
59035
59036
|
}
|
|
59036
59037
|
function getCullBounds({
|
|
59037
59038
|
viewport,
|
|
59038
|
-
z: z2,
|
|
59039
|
+
z: z2 = 0,
|
|
59039
59040
|
cullRect
|
|
59040
59041
|
}) {
|
|
59041
|
-
const
|
|
59042
|
-
|
|
59043
|
-
|
|
59044
|
-
|
|
59045
|
-
height
|
|
59046
|
-
} = cullRect;
|
|
59042
|
+
const subViewports = viewport.subViewports || [viewport];
|
|
59043
|
+
return subViewports.map((v) => getCullBoundsInViewport(v, z2, cullRect));
|
|
59044
|
+
}
|
|
59045
|
+
function getCullBoundsInViewport(viewport, z2, cullRect) {
|
|
59047
59046
|
if (!Array.isArray(z2)) {
|
|
59047
|
+
const x2 = cullRect.x - viewport.x;
|
|
59048
|
+
const y2 = cullRect.y - viewport.y;
|
|
59049
|
+
const {
|
|
59050
|
+
width,
|
|
59051
|
+
height
|
|
59052
|
+
} = cullRect;
|
|
59048
59053
|
const unprojectOption = {
|
|
59049
|
-
targetZ: z2
|
|
59054
|
+
targetZ: z2
|
|
59050
59055
|
};
|
|
59051
59056
|
const topLeft = viewport.unproject([x2, y2], unprojectOption);
|
|
59052
59057
|
const topRight = viewport.unproject([x2 + width, y2], unprojectOption);
|
|
@@ -59054,16 +59059,8 @@ function getCullBounds({
|
|
|
59054
59059
|
const bottomRight = viewport.unproject([x2 + width, y2 + height], unprojectOption);
|
|
59055
59060
|
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])];
|
|
59056
59061
|
}
|
|
59057
|
-
const bounds0 =
|
|
59058
|
-
|
|
59059
|
-
z: z2[0],
|
|
59060
|
-
cullRect
|
|
59061
|
-
});
|
|
59062
|
-
const bounds1 = getCullBounds({
|
|
59063
|
-
viewport,
|
|
59064
|
-
z: z2[1],
|
|
59065
|
-
cullRect
|
|
59066
|
-
});
|
|
59062
|
+
const bounds0 = getCullBoundsInViewport(viewport, z2[0], cullRect);
|
|
59063
|
+
const bounds1 = getCullBoundsInViewport(viewport, z2[1], cullRect);
|
|
59067
59064
|
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])];
|
|
59068
59065
|
}
|
|
59069
59066
|
function getIndexingCoords(bbox2, scale2, modelMatrixInverse) {
|
|
@@ -59293,7 +59290,7 @@ class Tileset2D {
|
|
|
59293
59290
|
return false;
|
|
59294
59291
|
}
|
|
59295
59292
|
if (cullRect && this._viewport) {
|
|
59296
|
-
const
|
|
59293
|
+
const boundsArr = this._getCullBounds({
|
|
59297
59294
|
viewport: this._viewport,
|
|
59298
59295
|
z: this._zRange,
|
|
59299
59296
|
cullRect
|
|
@@ -59301,12 +59298,20 @@ class Tileset2D {
|
|
|
59301
59298
|
const {
|
|
59302
59299
|
bbox: bbox2
|
|
59303
59300
|
} = tile;
|
|
59304
|
-
|
|
59305
|
-
|
|
59301
|
+
for (const [minX, minY, maxX, maxY] of boundsArr) {
|
|
59302
|
+
let overlaps;
|
|
59303
|
+
if ("west" in bbox2) {
|
|
59304
|
+
overlaps = bbox2.west < maxX && bbox2.east > minX && bbox2.south < maxY && bbox2.north > minY;
|
|
59305
|
+
} else {
|
|
59306
|
+
const y02 = Math.min(bbox2.top, bbox2.bottom);
|
|
59307
|
+
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
59308
|
+
overlaps = bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
59309
|
+
}
|
|
59310
|
+
if (overlaps) {
|
|
59311
|
+
return true;
|
|
59312
|
+
}
|
|
59306
59313
|
}
|
|
59307
|
-
|
|
59308
|
-
const y12 = Math.max(bbox2.top, bbox2.bottom);
|
|
59309
|
-
return bbox2.left < maxX && bbox2.right > minX && y02 < maxY && y12 > minY;
|
|
59314
|
+
return false;
|
|
59310
59315
|
}
|
|
59311
59316
|
return true;
|
|
59312
59317
|
}
|
|
@@ -59755,14 +59760,19 @@ class TileLayer extends CompositeLayer {
|
|
|
59755
59760
|
info,
|
|
59756
59761
|
sourceLayer
|
|
59757
59762
|
}) {
|
|
59763
|
+
const sourceTile = sourceLayer.props.tile;
|
|
59758
59764
|
if (info.picked) {
|
|
59759
|
-
info.tile =
|
|
59765
|
+
info.tile = sourceTile;
|
|
59760
59766
|
}
|
|
59767
|
+
info.sourceTile = sourceTile;
|
|
59761
59768
|
return info;
|
|
59762
59769
|
}
|
|
59763
59770
|
_updateAutoHighlight(info) {
|
|
59764
|
-
|
|
59765
|
-
|
|
59771
|
+
const sourceTile = info.sourceTile;
|
|
59772
|
+
if (sourceTile && sourceTile.layers) {
|
|
59773
|
+
for (const layer of sourceTile.layers) {
|
|
59774
|
+
layer.updateAutoHighlight(info);
|
|
59775
|
+
}
|
|
59766
59776
|
}
|
|
59767
59777
|
}
|
|
59768
59778
|
renderLayers() {
|
|
@@ -72080,6 +72090,9 @@ class ScenegraphNode {
|
|
|
72080
72090
|
toString() {
|
|
72081
72091
|
return "{type: ScenegraphNode, id: ".concat(this.id, ")}");
|
|
72082
72092
|
}
|
|
72093
|
+
getBounds() {
|
|
72094
|
+
return null;
|
|
72095
|
+
}
|
|
72083
72096
|
setPosition(position) {
|
|
72084
72097
|
assert$8(position.length === 3, "setPosition requires vector argument");
|
|
72085
72098
|
this.position = position;
|
|
@@ -72230,6 +72243,34 @@ class GroupNode extends ScenegraphNode {
|
|
|
72230
72243
|
this.removeAll();
|
|
72231
72244
|
super.delete();
|
|
72232
72245
|
}
|
|
72246
|
+
getBounds() {
|
|
72247
|
+
const result = [[Infinity, Infinity, Infinity], [-Infinity, -Infinity, -Infinity]];
|
|
72248
|
+
this.traverse((node, _ref) => {
|
|
72249
|
+
let {
|
|
72250
|
+
worldMatrix
|
|
72251
|
+
} = _ref;
|
|
72252
|
+
const bounds2 = node.getBounds();
|
|
72253
|
+
if (!bounds2) {
|
|
72254
|
+
return;
|
|
72255
|
+
}
|
|
72256
|
+
const [min, max] = bounds2;
|
|
72257
|
+
const center2 = new Vector3(min).add(max).divide([2, 2, 2]);
|
|
72258
|
+
worldMatrix.transformAsPoint(center2, center2);
|
|
72259
|
+
const halfSize = new Vector3(max).subtract(min).divide([2, 2, 2]);
|
|
72260
|
+
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
72261
|
+
for (let v = 0; v < 8; v++) {
|
|
72262
|
+
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
72263
|
+
for (let i2 = 0; i2 < 3; i2++) {
|
|
72264
|
+
result[0][i2] = Math.min(result[0][i2], position[i2]);
|
|
72265
|
+
result[1][i2] = Math.max(result[1][i2], position[i2]);
|
|
72266
|
+
}
|
|
72267
|
+
}
|
|
72268
|
+
});
|
|
72269
|
+
if (!Number.isFinite(result[0][0])) {
|
|
72270
|
+
return null;
|
|
72271
|
+
}
|
|
72272
|
+
return result;
|
|
72273
|
+
}
|
|
72233
72274
|
traverse(visitor) {
|
|
72234
72275
|
let {
|
|
72235
72276
|
worldMatrix = new Matrix4()
|
|
@@ -72479,6 +72520,7 @@ class ModelNode extends ScenegraphNode {
|
|
|
72479
72520
|
} else {
|
|
72480
72521
|
this.model = new Model(gl, props2);
|
|
72481
72522
|
}
|
|
72523
|
+
this.bounds = null;
|
|
72482
72524
|
this.managedResources = props2.managedResources || [];
|
|
72483
72525
|
}
|
|
72484
72526
|
setProps(props2) {
|
|
@@ -72486,6 +72528,9 @@ class ModelNode extends ScenegraphNode {
|
|
|
72486
72528
|
this._setModelNodeProps(props2);
|
|
72487
72529
|
return this;
|
|
72488
72530
|
}
|
|
72531
|
+
getBounds() {
|
|
72532
|
+
return this.bounds;
|
|
72533
|
+
}
|
|
72489
72534
|
delete() {
|
|
72490
72535
|
if (this.model) {
|
|
72491
72536
|
this.model.delete();
|
|
@@ -72670,17 +72715,21 @@ function createGLTFModel(gl, options) {
|
|
|
72670
72715
|
const managedResources = [];
|
|
72671
72716
|
managedResources.push(...materialParser.generatedTextures);
|
|
72672
72717
|
managedResources.push(...Object.values(attributes).map((attribute) => attribute.buffer));
|
|
72673
|
-
const model = new ModelNode(gl,
|
|
72718
|
+
const model = new ModelNode(gl, {
|
|
72674
72719
|
id,
|
|
72675
72720
|
drawMode,
|
|
72676
72721
|
vertexCount,
|
|
72677
72722
|
modules: [pbr],
|
|
72678
|
-
defines: materialParser.defines,
|
|
72679
72723
|
parameters: materialParser.parameters,
|
|
72680
72724
|
vs: addVersionToShader(gl, vs$7),
|
|
72681
72725
|
fs: addVersionToShader(gl, fs$7),
|
|
72682
|
-
managedResources
|
|
72683
|
-
|
|
72726
|
+
managedResources,
|
|
72727
|
+
...modelOptions,
|
|
72728
|
+
defines: {
|
|
72729
|
+
...materialParser.defines,
|
|
72730
|
+
...modelOptions.defines
|
|
72731
|
+
}
|
|
72732
|
+
});
|
|
72684
72733
|
model.setProps({
|
|
72685
72734
|
attributes
|
|
72686
72735
|
});
|
|
@@ -72775,13 +72824,15 @@ class GLTFInstantiator {
|
|
|
72775
72824
|
log$2.warn("getVertexCount() not found")();
|
|
72776
72825
|
}
|
|
72777
72826
|
createPrimitive(gltfPrimitive, i2, gltfMesh) {
|
|
72778
|
-
|
|
72827
|
+
const model = createGLTFModel(this.gl, Object.assign({
|
|
72779
72828
|
id: gltfPrimitive.name || "".concat(gltfMesh.name || gltfMesh.id, "-primitive-").concat(i2),
|
|
72780
72829
|
drawMode: gltfPrimitive.mode || 4,
|
|
72781
72830
|
vertexCount: gltfPrimitive.indices ? gltfPrimitive.indices.count : this.getVertexCount(gltfPrimitive.attributes),
|
|
72782
72831
|
attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),
|
|
72783
72832
|
material: gltfPrimitive.material
|
|
72784
72833
|
}, this.options));
|
|
72834
|
+
model.bounds = [gltfPrimitive.attributes.POSITION.min, gltfPrimitive.attributes.POSITION.max];
|
|
72835
|
+
return model;
|
|
72785
72836
|
}
|
|
72786
72837
|
createAttributes(attributes, indices) {
|
|
72787
72838
|
const loadedAttributes = {};
|
|
@@ -80709,15 +80760,11 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
80709
80760
|
info,
|
|
80710
80761
|
sourceLayer
|
|
80711
80762
|
}) {
|
|
80712
|
-
const
|
|
80713
|
-
|
|
80714
|
-
|
|
80715
|
-
const layerId = sourceLayer && sourceLayer.id;
|
|
80716
|
-
if (layerId) {
|
|
80717
|
-
const substr = layerId.substring(this.id.length + 1);
|
|
80718
|
-
const tileId = substr.substring(substr.indexOf("-") + 1);
|
|
80719
|
-
info.object = layerMap[tileId] && layerMap[tileId].tile;
|
|
80763
|
+
const sourceTile = sourceLayer && sourceLayer.props.tile;
|
|
80764
|
+
if (info.picked) {
|
|
80765
|
+
info.object = sourceTile;
|
|
80720
80766
|
}
|
|
80767
|
+
info.sourceTile = sourceTile;
|
|
80721
80768
|
return info;
|
|
80722
80769
|
}
|
|
80723
80770
|
filterSubLayer({
|
|
@@ -80733,8 +80780,10 @@ class Tile3DLayer extends CompositeLayer {
|
|
|
80733
80780
|
return tile.selected && tile.viewportIds.includes(viewportId);
|
|
80734
80781
|
}
|
|
80735
80782
|
_updateAutoHighlight(info) {
|
|
80736
|
-
|
|
80737
|
-
|
|
80783
|
+
const sourceTile = info.sourceTile;
|
|
80784
|
+
const layerCache = this.state.layerMap[sourceTile === null || sourceTile === void 0 ? void 0 : sourceTile.id];
|
|
80785
|
+
if (layerCache && layerCache.layer) {
|
|
80786
|
+
layerCache.layer.updateAutoHighlight(info);
|
|
80738
80787
|
}
|
|
80739
80788
|
}
|
|
80740
80789
|
async _loadTileset(tilesetUrl) {
|
|
@@ -121212,16 +121261,16 @@ function addDecoder(cases, importFn) {
|
|
|
121212
121261
|
}
|
|
121213
121262
|
cases.forEach((c2) => registry$1.set(c2, importFn));
|
|
121214
121263
|
}
|
|
121215
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
121216
|
-
addDecoder(5, () => import("./lzw-
|
|
121264
|
+
addDecoder([void 0, 1], () => import("./raw-87e3335a.js").then((m2) => m2.default));
|
|
121265
|
+
addDecoder(5, () => import("./lzw-7366b7df.js").then((m2) => m2.default));
|
|
121217
121266
|
addDecoder(6, () => {
|
|
121218
121267
|
throw new Error("old style JPEG compression is not supported.");
|
|
121219
121268
|
});
|
|
121220
|
-
addDecoder(7, () => import("./jpeg-
|
|
121221
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
121222
|
-
addDecoder(32773, () => import("./packbits-
|
|
121223
|
-
addDecoder(34887, () => import("./lerc-
|
|
121224
|
-
addDecoder(50001, () => import("./webimage-
|
|
121269
|
+
addDecoder(7, () => import("./jpeg-da8c250c.js").then((m2) => m2.default));
|
|
121270
|
+
addDecoder([8, 32946], () => import("./deflate-fd4358a6.js").then((m2) => m2.default));
|
|
121271
|
+
addDecoder(32773, () => import("./packbits-8da18e40.js").then((m2) => m2.default));
|
|
121272
|
+
addDecoder(34887, () => import("./lerc-d5bf01c3.js").then((m2) => m2.default));
|
|
121273
|
+
addDecoder(50001, () => import("./webimage-6b9ff4dc.js").then((m2) => m2.default));
|
|
121225
121274
|
function decodeRowAcc(row, stride) {
|
|
121226
121275
|
let length2 = row.length - stride;
|
|
121227
121276
|
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-1989acf5.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-embedding",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/constants-internal": "3.3.
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/sets-utils": "3.3.
|
|
27
|
-
"@vitessce/utils": "3.3.
|
|
28
|
-
"@vitessce/vit-s": "3.3.
|
|
23
|
+
"@vitessce/constants-internal": "3.3.1",
|
|
24
|
+
"@vitessce/scatterplot": "3.3.1",
|
|
25
|
+
"@vitessce/legend": "3.3.1",
|
|
26
|
+
"@vitessce/sets-utils": "3.3.1",
|
|
27
|
+
"@vitessce/utils": "3.3.1",
|
|
28
|
+
"@vitessce/vit-s": "3.3.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"react": "^18.0.0",
|