diff --git a/src/lines/dist/lines.js b/src/lines/dist/lines.js index 5080360..9d0aa2c 100644 --- a/src/lines/dist/lines.js +++ b/src/lines/dist/lines.js @@ -1 +1 @@ -registerPaint("lines",class{static get inputProperties(){return["--lines-colors","--lines-widths","--lines-gaps","--lines-rotate"]}parseProps(t){return["--lines-colors","--lines-widths","--lines-gaps","--lines-rotate"].map(e=>t.get(e).toString().trim()||void 0)}paint(t,e,s){const{width:l,height:i}=e,[a="#71a7ee, #7940c1",n="6, 2",r="8",o=0]=this.parseProps(s),p=2*Math.floor(Math.sqrt(Math.pow(l,2)+Math.pow(i,2))),h=a.split(",").map(t=>t),c=h.length;let g=0;const m=n.split(",").map(t=>+t),M=Math.min(...m),w=m.length;let P=0;const d=r.split(",").map(t=>+t),f=d.length;let u=0;0!==o&&(t.rotate(o*Math.PI/180),t.translate(-p,-p));let S=0;for(let e=0;e

=w-1?P=0:P++,u>=f-1?u=0:u++,g>=c-1?g=0:g++,S+=e}}}); +registerPaint("lines",class{static get inputProperties(){return["--lines-colors","--lines-widths","--lines-gaps","--lines-rotate"]}parseProps(t){return["--lines-colors","--lines-widths","--lines-gaps","--lines-rotate"].map(e=>t.get(e).toString().trim()||void 0)}paint(t,e,s){const{width:i,height:l}=e,[a="#71a7ee, #7940c1",n="6, 2",r="8",o=0]=this.parseProps(s),p=2*Math.floor(Math.sqrt(Math.pow(i,2)+Math.pow(l,2))),h=a.split(",").map(t=>t.trim()),c=h.length;let g=0;const m=n.split(",").map(t=>+t),M=Math.min(...m),w=m.length;let P=0;const d=r.split(",").map(t=>+t),f=d.length;let u=0;0!==o&&(t.rotate(o*Math.PI/180),t.translate(-p,-p));let S=0;for(let e=0;e

=w-1?P=0:P++,u>=f-1?u=0:u++,g>=c-1?g=0:g++,S+=e}}}); diff --git a/src/lines/src/index.js b/src/lines/src/index.js index 402c334..ac0c271 100644 --- a/src/lines/src/index.js +++ b/src/lines/src/index.js @@ -37,7 +37,7 @@ registerPaint( const sqrtArea = Math.floor(Math.sqrt(Math.pow(w, 2) + Math.pow(h, 2))) const saveArea = sqrtArea * 2 - const colorLines = colors.split(',').map(color => color) + const colorLines = colors.split(',').map(color => color.trim()) const maxColors = colorLines.length let indexColor = 0