@genome-spy/app 0.25.0 → 0.25.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/index.js +34 -34
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -28,10 +28,10 @@ uniform float uMinOpacity;
|
|
28
28
|
/** top-right, bottom-right, top-left, bottom-left */
|
29
29
|
uniform vec4 uCornerRadii;
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
out lowp vec4 vFillColor;
|
32
|
+
out lowp vec4 vStrokeColor;
|
33
|
+
out float vHalfStrokeWidth;
|
34
|
+
out vec4 vCornerRadii;
|
35
35
|
|
36
36
|
|
37
37
|
#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
@@ -40,7 +40,7 @@ out vec2 vPosInPixels;
|
|
40
40
|
#endif
|
41
41
|
|
42
42
|
/** Size of the rect in pixels */
|
43
|
-
|
43
|
+
out vec2 vHalfSizeInPixels;
|
44
44
|
|
45
45
|
/**
|
46
46
|
* Clamps the minimumSize and returns an opacity that reflects the amount of clamping.
|
@@ -129,12 +129,12 @@ void main(void) {
|
|
129
129
|
in vec2 vPosInPixels;
|
130
130
|
#endif
|
131
131
|
|
132
|
-
|
132
|
+
in vec2 vHalfSizeInPixels;
|
133
133
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
134
|
+
in lowp vec4 vFillColor;
|
135
|
+
in lowp vec4 vStrokeColor;
|
136
|
+
in float vHalfStrokeWidth;
|
137
|
+
in vec4 vCornerRadii;
|
138
138
|
|
139
139
|
out lowp vec4 fragColor;
|
140
140
|
|
@@ -485,7 +485,7 @@ float getSampleFacetHeight(vec2 pos) {
|
|
485
485
|
* https://deck.gl/docs/developer-guide/custom-layers/picking
|
486
486
|
*/
|
487
487
|
|
488
|
-
|
488
|
+
out highp vec4 vPickingColor;
|
489
489
|
|
490
490
|
/**
|
491
491
|
* Passes the unique id to the fragment shader as a color if picking is enabled.
|
@@ -506,7 +506,7 @@ bool setupPicking() {
|
|
506
506
|
}
|
507
507
|
return false;
|
508
508
|
}
|
509
|
-
`,eD=`
|
509
|
+
`,eD=`in highp vec4 vPickingColor;
|
510
510
|
`,rs=Symbol("cacheMap");function Ur(t,e,n){let r=ao(t).get(e);return r===void 0&&(r=n(e),ao(t).set(e,r)),r}function Rm(t,e){ao(t).delete(e)}function oo(t,e){const n=ao(t);for(const r of n.keys())r.startsWith(e)&&n.delete(r);ao(t).delete(e)}function jm(t){t[rs]=new Map}function ao(t){return t[rs]||jm(t),t[rs]}function tD(t,e,n,r){const i=te(t)?t:t.name,o=!te(t)&&t.extent||[0,1];if(n===void 0&&!te(t)&&(n=t.count),i){const a=mu(i);if(ke(a)){const s=Gm(a,{extent:o,count:n});return so(e,{minMag:e.LINEAR,format:e.RGB,height:1,wrap:e.CLAMP_TO_EDGE},s,r)}else{if(We(a))return Um(a,e);throw new Error("Unknown scheme: "+i)}}}function nD(t,e="rgb",n,r){const i=Da(t,te(e)?e:e.type,te(e)?void 0:e.gamma),o=Gm(i);return so(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},o,r)}function rD(t,e,n,r){const i=Math.max(t.length,n||0),o=new Float32Array(i);for(let a=0;a<i;a++)o[a]=t[a%t.length];return so(e,{minMag:e.NEAREST,format:e.RED,internalFormat:e.R32F,height:1},o,r)}function Um(t,e,n,r){const i=Hm(t,n);return so(e,{minMag:e.NEAREST,format:e.RGB,height:1},i,r)}function Gm(t,{extent:e=[0,1],reverse:n=!1,count:r=256}={}){const i=e[0],o=je(e)-i,a=Yt(r).map(s=>s/(r-1)).map(s=>i+s/o).map(t);return n&&a.reverse(),Hm(a)}function Hm(t,e){const n=Math.max(t.length,e||0),r=new Uint8Array(n*3);for(let i=0;i<n;i++){const o=Bn(t[i%t.length]).rgb();r[i*3+0]=o.r,r[i*3+1]=o.g,r[i*3+2]=o.b}return r}class iD{constructor(e,n){this._container=e,this._sizeSource=n,this._shaderCache=new Map,this._listeners=[],this.rangeTextures=new WeakMap;const r=document.createElement("canvas");e.appendChild(r);const i=BE(r,{antialias:!0,depth:!1,premultipliedAlpha:!0});if(!i)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!kr(i))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");km(i),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),this.canvas=r,this.gl=i,this._pickingAttachmentOptions=[{format:i.RGBA,type:i.UNSIGNED_BYTE,minMag:i.LINEAR,wrap:i.CLAMP_TO_EDGE}],this._pickingBufferInfo=ME(i,this._pickingAttachmentOptions),i.bindFramebuffer(i.FRAMEBUFFER,null),this.adjustGl(),this._resizeObserver=new ResizeObserver(o=>{this.invalidateSize(),this._emit("resize")}),this._resizeObserver.observe(this._container),this._updateDpr()}invalidateSize(){this._logicalCanvasSize=void 0,this._updateDpr(),this.adjustGl()}_updateDpr(){this.dpr=window.devicePixelRatio}compileShader(e,n){const r="#version 300 es",i="precision mediump float;";We(n)&&(n=n.join(`
|
511
511
|
|
512
512
|
`));const o=this.gl,a=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let s=this._shaderCache.get(a);if(!s){const c=[r,i,n].join(`
|
@@ -540,13 +540,13 @@ uniform float uMaxPointSize;
|
|
540
540
|
uniform float uZoomLevel;
|
541
541
|
uniform float uSemanticThreshold;
|
542
542
|
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
543
|
+
out float vRadius;
|
544
|
+
out float vRadiusWithPadding;
|
545
|
+
out lowp vec4 vFillColor;
|
546
|
+
out lowp vec4 vStrokeColor;
|
547
|
+
out lowp float vShape;
|
548
|
+
out lowp float vHalfStrokeWidth;
|
549
|
+
out mat2 vRotationMatrix;
|
550
550
|
|
551
551
|
|
552
552
|
float computeSemanticThresholdFactor() {
|
@@ -656,15 +656,15 @@ const lowp vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
|
|
656
656
|
uniform bool uInwardStroke;
|
657
657
|
uniform float uGradientStrength;
|
658
658
|
|
659
|
-
|
660
|
-
|
659
|
+
in float vRadius;
|
660
|
+
in float vRadiusWithPadding;
|
661
661
|
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
662
|
+
in lowp vec4 vFillColor;
|
663
|
+
in lowp vec4 vStrokeColor;
|
664
|
+
in lowp float vShape;
|
665
|
+
in lowp float vHalfStrokeWidth;
|
666
666
|
|
667
|
-
|
667
|
+
in mat2 vRotationMatrix;
|
668
668
|
|
669
669
|
out lowp vec4 fragColor;
|
670
670
|
|
@@ -793,10 +793,10 @@ uniform float uMinLength;
|
|
793
793
|
uniform mediump float uDashTextureSize;
|
794
794
|
uniform lowp int uStrokeCap;
|
795
795
|
|
796
|
-
|
796
|
+
out vec4 vColor;
|
797
797
|
|
798
798
|
/** Stroke width */
|
799
|
-
|
799
|
+
out float vSize;
|
800
800
|
|
801
801
|
/** The distance from the line center to the direction of normal in pixels */
|
802
802
|
out float vNormalLengthInPixels;
|
@@ -875,8 +875,8 @@ uniform float uDashTextureSize;
|
|
875
875
|
uniform float uStrokeDashOffset;
|
876
876
|
uniform lowp int uStrokeCap;
|
877
877
|
|
878
|
-
|
879
|
-
|
878
|
+
in vec4 vColor;
|
879
|
+
in float vSize;
|
880
880
|
|
881
881
|
/** Position on the rule along its length in pixels */
|
882
882
|
in vec2 vPosInPixels;
|
@@ -1077,8 +1077,8 @@ uniform bool uFlushY;
|
|
1077
1077
|
#endif
|
1078
1078
|
|
1079
1079
|
out vec2 vTexCoord;
|
1080
|
-
|
1081
|
-
|
1080
|
+
out vec4 vColor;
|
1081
|
+
out float vSlope;
|
1082
1082
|
out float vEdgeFadeOpacity;
|
1083
1083
|
|
1084
1084
|
struct RangeResult {
|
@@ -1296,8 +1296,8 @@ void main(void) {
|
|
1296
1296
|
|
1297
1297
|
in vec2 vTexCoord;
|
1298
1298
|
in float vEdgeFadeOpacity;
|
1299
|
-
|
1300
|
-
|
1299
|
+
in vec4 vColor;
|
1300
|
+
in float vSlope;
|
1301
1301
|
|
1302
1302
|
out lowp vec4 fragColor;
|
1303
1303
|
|
package/package.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
},
|
8
8
|
"contributors": [],
|
9
9
|
"license": "BSD-2-Clause",
|
10
|
-
"version": "0.25.
|
10
|
+
"version": "0.25.1",
|
11
11
|
"main": "dist/index.js",
|
12
12
|
"files": [
|
13
13
|
"dist/"
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"@fortawesome/fontawesome-free": "^6.1.1",
|
28
28
|
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
29
29
|
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
30
|
-
"@genome-spy/core": "^0.25.
|
30
|
+
"@genome-spy/core": "^0.25.1",
|
31
31
|
"@reduxjs/toolkit": "^1.8.4",
|
32
32
|
"idb": "^7.0.1",
|
33
33
|
"lit": "^2.0.2",
|
@@ -37,5 +37,5 @@
|
|
37
37
|
"redux-undo": "^1.0.1",
|
38
38
|
"snarkdown": "^2.0.0"
|
39
39
|
},
|
40
|
-
"gitHead": "
|
40
|
+
"gitHead": "e9c4acf0c725ce1ef46303a01a05d7ccf6dcc9c3"
|
41
41
|
}
|