티스토리 수익 글 보기
n?-1:1,l=!0;l;)if(s[a]<=n&&s[a+1]>n?(o=(n-s[a])/(s[a+1]-s[a]),l=!1):a+=h,a<0||a>=r-1){if(a===r-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}function l(e,i,s,r,a,n){var o=h(a,n),l=1-o;return[t.round((l*l*l*e[0]+(o*l*l+l*o*l+l*l*o)*s[0]+(o*o*l+l*o*o+o*l*o)*r[0]+o*o*o*i[0])*1e3)/1e3,t.round((l*l*l*e[1]+(o*l*l+l*o*l+l*l*o)*s[1]+(o*o*l+l*o*o+o*l*o)*r[1]+o*o*o*i[1])*1e3)/1e3]}var p=createTypedArray(“float32”,8);return{getSegmentsLength:r,getNewSegment:function(e,i,s,r,a,n,o){a<0?a=0:a>1&&(a=1);var l,f=h(a,o),c=h(n=n>1?1:n,o),m=e.length,u=1-f,d=1-c,g=u*u*u,y=f*u*u*3,v=f*f*u*3,b=f*f*f,x=u*u*d,_=f*u*d+u*f*d+u*u*c,k=f*f*d+u*f*c+f*u*c,C=f*f*c,P=u*d*d,A=f*d*d+u*c*d+u*d*c,w=f*c*d+u*c*c+f*d*c,S=f*c*c,D=d*d*d,T=c*d*d+d*c*d+d*d*c,M=c*c*d+d*c*c+c*d*c,E=c*c*c;for(l=0;l =c?S=1:t s+i||(o=n.s*r<=s?0:(n.s*r-s)/i,l.push([o,n.e*r>=s+i?1:(n.e*r-s)/i]));return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e1?1+e:this.s.v<0?0+e:this.s.v+e)>(n=this.e.v>1?1+e:this.e.v<0?0+e:this.e.v+e)){var i=a;a=n,n=i}a=1e-4*Math.round(1e4*a),n=1e-4*Math.round(1e4*n),this.sValue=a,this.eValue=n}else a=this.sValue,n=this.eValue;var s=this.shapes.length,r=0;if(n===a)for(h=0;h =1?y.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(b-1)}):(y.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),y.push({s:0,e:u.totalShapeLength*(b-1)}));var _=this.addShapes(u,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var k=_.pop();this.addPaths(_,d),_=this.addShapes(u,y[1],k)}else this.addPaths(_,d),_=this.addShapes(u,y[1]);this.addPaths(_,d)}}u.shape.paths=d}}else if(this._mdf)for(h=0;h f?p:f,p=-2*d,b=””,v=!0,h+=1):b=I,e.chars?(k=e.getCharData(I,c.fStyle,e.getFontByName(t.f).fFamily),m=v?0:k.w*t.finalSize/100):m=e.measureText(b,t.f,t.finalSize),” “===I?M+=m+d:(p+=m+d+M,M=0),s.push({l:m,an:m,add:n,n:v,anIndexes:[],val:b,line:h,animatorJustifyOffset:0}),2==a){if(n+=m,””===b||” “===b||g===y-1){for((“”===b||” “===b)&&(n-=m);o<=g;)s[o].an=n,s[o].ind=r,s[o].extra=m,o+=1;r+=1,n=0}}else if(3==a){if(n+=m,""===b||g===y-1){for(""===b&&(n-=m);o<=g;)s[o].an=n,s[o].ind=r,s[o].extra=m,o+=1;n=0,r+=1}}else s[r].ind=r,s[r].extra=0,r+=1;if(t.l=s,f=p>f?p:f,l.push(p),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=f,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=l;var E=i.a;_=E.length;var F=[];for(x=0;x<_;x+=1){for((L=E[x]).a.sc&&(t.strokeColorAnim=!0),L.a.sw&&(t.strokeWidthAnim=!0),(L.a.fc||L.a.fh||L.a.fs||L.a.fb)&&(t.fillColorAnim=!0),V=0,R=L.s.b,g=0;g1e-5&&(this.v[i]=e,this._mdf=!0),i+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length){if(this.lock)return void this.setVValue(this.pv);this.lock=!0,this._mdf=this._isFirstFrame;var t,e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t=0;h-=1)if((u=this.shapes[h]).shape._mdf){for((d=u.localShapeCollection).releaseShapes(),2===this.m&&s>1?(g=this.calculateShapeEdges(a,n,u.totalShapeLength,x,r),x+=u.totalShapeLength):g=[[v,b]],p=g.length,l=0;le.e){i.c=!1;break}else e.s<=u&&e.e>=u+n.addedLength?(this.addSegment(c[s].v[r-1],c[s].o[r-1],c[s].i[r],c[s].v[r],i,o,g),g=!1):(l=bez.getNewSegment(c[s].v[r-1],c[s].v[r],c[s].o[r-1],c[s].i[r],(e.s-u)/n.addedLength,(e.e-u)/n.addedLength,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1),u+=n.addedLength,o+=1;if(c[s].c&&h.length){if(n=h[r-1],u<=e.e){var y=h[r-1].addedLength;e.s<=u&&e.e>=u+y?(this.addSegment(c[s].v[r-1],c[s].o[r-1],c[s].i[0],c[s].v[0],i,o,g),g=!1):(l=bez.getNewSegment(c[s].v[r-1],c[s].v[0],c[s].o[r-1],c[s].i[0],(e.s-u)/y,(e.e-u)/y,h[r-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1)}else i.c=!1;u+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],”i”,p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],”o”,i._length-1)),u>e.e)break;s1&&e.length>1&&(r=getIntersection(t[0],e[e.length-1])))?[[t[0].split(r[0])[0]],[e[e.length-1].split(r[1])[1]]]:[i,s]}function pruneIntersections(t){for(var e,i=1;i1&&(a+=” C”+e.o[s-1][0]+”,”+e.o[s-1][1]+” “+e.i[0][0]+”,”+e.i[0][1]+” “+e.v[0][0]+”,”+e.v[0][1]),i.lastPath!==a){var n=””;i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute(“d”,n)),i.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};function e(){var t=createNS(“feColorMatrix”);return t.setAttribute(“type”,”matrix”),t.setAttribute(“color-interpolation-filters”,”sRGB”),t.setAttribute(“values”,”0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1″),t}return t.createFilter=function t(t,e){var i=createNS(“filter”);return i.setAttribute(“id”,t),!0!==e&&(i.setAttribute(“filterUnits”,”objectBoundingBox”),i.setAttribute(“x”,”0%”),i.setAttribute(“y”,”0%”),i.setAttribute(“width”,”100%”),i.setAttribute(“height”,”100%”)),i},t.createAlphaToLuminanceFilter=e,t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:”undefined”!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix=”filter_result_”;function SVGEffects(t){var e,i,s=”SourceGraphic”,r=t.data.ef?t.data.ef.length:0,a=createElementID(),n=filtersFactory.createFilter(a,!0),o=0;for(e=0,this.filters=[];e.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0&&o<1&&f[c].push(this.calculateF(o,t,e,i,s,c)):(h=a*a-4*n*r)>=0&&((l=(-a+bmSqrt(h))/(2*r))>0&&l<1&&f[c].push(this.calculateF(l,t,e,i,s,c)),(p=(-a-bmSqrt(h))/(2*r))>0&&p<1&&f[c].push(this.calculateF(p,t,e,i,s,c))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,i,s,r,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*i[a]+3*(1-t)*bmPow(t,2)*s[a]+bmPow(t,3)*r[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var i,s=t.length;for(i=0;ii&&(i=r)}i*=t.mult}else i=t.v*t.mult;e.x-=i,e.xMax+=i,e.y-=i,e.yMax+=i},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=999999,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var i,s,r=createTag(“div”);styleDiv(r);var a=createTag(“div”);if(styleDiv(a),”3d”===e){(i=r.style).width=this.globalData.compSize.w+”px”,i.height=this.globalData.compSize.h+”px”;var n=”50% 50%”;i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n;var o=”matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)”;(s=a.style).transform=o,s.webkitTransform=o}r.appendChild(a);var h={container:a,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,i=this.layers.length,s=””;for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var i=0,s=this.threeDElements.length;in?(t=r/this.globalData.compSize.w,e=r/this.globalData.compSize.w,i=0,s=(a-this.globalData.compSize.h*(r/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,i=(r-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,s=0);var o=this.resizerElem.style;o.webkitTransform=”matrix3d(“+t+”,0,0,0,0,”+e+”,0,0,0,0,1,0,”+i+”,”+s+”,0,1)”,o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display=”none”},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display=”block”},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,s=this.threeDElements.length;for(t=0;t=p;)t/=2,e/=2,i>>>=1;return(t+i)/e};return x.int32=function(){return 0|b.g(4)},x.quick=function(){return b.g(4)/0x100000000},x.double=x,g(v(b.S),t),(s.pass||n||function(t,i,s,r){return(r&&(r.S&&u(r,b),t.state=function(){return u(b,{})}),s)?(e[o]=t,i):t})(x,c,”global”in s?s.global:this==e,s.state)}function m(t){var e,i=t.length,s=this,a=0,n=s.i=s.j=0,o=s.S=[];for(i||(t=[i++]);a.5?l/(2-n-o):l/(n+o),n){case s:e=(r-a)/l+6*(r1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,s,r=t[0],a=t[1],n=t[2];if(0===a)e=n,s=n,i=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,r+1/3),i=hue2rgb(h,o,r),s=hue2rgb(h,o,r-1/3)}return[e,i,s,t[3]]}function linear(t,e,i,s,r){if((void 0===s||void 0===r)&&(s=e,r=i,e=0,i=1),i