0xe4f517a4…f7b9sent to0x99a9b7c1…b069·#16,562,338·view on Etherscan
){return this._patternSizeRatio}set patternSizeRatio(s){s!==this._patternSizeRatio&&(this._patternSizeRatio=s,this.onChange.dispatch())}};var C=y(z());var H0={GLOBAL:"global",LOCAL:"local"},Mt=[];for(let r in H0)Mt.push(H0[r]);var P=H0;var hs=y(z()),U={DISP_GLITCH:"dispGlitch",GLITCH_DISP:"glitchDisp",EDGE_DETECTION:"edgeDetection"},Rt=[];for(let r in U)Rt.push(U[r]);var R=class{constructor(){this._deformersOrder=U.GLITCH_DISP,this._displacementTextureIdx=8,this._displacementDistance=0,this._displacementAngle=-60,this._displacementUseRandomAngle=!1,this._displacementIncrementAngle=10,this._displacementIncrementMult=1.1,this._displacementOffsetX=0,this._displacementOffsetY=0,this._displacementScale=1,this._glitchHorizontalBand=0,this._glitchHorizontalBandPos=.48,this._glitchHorizontalBandMirror=!0,this._glitchVerticalBand=0,this._glitchVerticalBandPos=.48,this._glitchVerticalBandMirror=!1,this.onChange=new hs.Signal}dispose(){this.onChange.dispose()}serialize(){return{deformersOrder:this.deformersOrder,displacementTextureIdx:this.displacementTextureIdx,displacementDistance:this.displacementDistance,displacementAngle:this.displacementAngle,displacementUseRandomAngle:this.displacementUseRandomAngle,dispalcementIncrementAngle:this.displacementIncrementAngle,dispalcementIncrementMult:this.dispalcementIncrementMult,displacementOffsetX:this.displacementOffsetX,displacementOffsetY:this.displacementOffsetY,displacementScale:this.displacementScale,glitchHorizontalBand:this.glitchHorizontalBand,glitchHorizontalBandPos:this.glitchHorizontalBandPos,glitchHorizontalBandMirror:this.glitchHorizontalBandMirror,glitchVerticalBand:this.glitchVerticalBand,glitchVerticalBandPos:this.glitchVerticalBandPos,glitchVerticalBandMirror:this.glitchVerticalBandMirror}}setParams(s){console.log("> set params",s);for(let t in s)this[t]=s[t]}get deformersOrder(){return this._deformersOrder}set deformersOrder(s){s!==this._deformersOrder&&(this._deformersOrder=s,this.onChange.dispatch())}get displacementTextureIdx(){return this._displacementTextureIdx}set displacementTextureIdx(s){s!==this._displacementTextureIdx&&(this._displacementTextureIdx=s,this.onChange.dispatch())}get displacementDistance(){return this._displacementDistance}set displacementDistance(s){s!==this._displacementDistance&&(this._displacementDistance=s,this.onChange.dispatch())}get displacementAngle(){return this._displacementAngle}set displacementAngle(s){s!==this._displacementAngle&&(this._displacementAngle=s,this.onChange.dispatch())}get displacementUseRandomAngle(){return this._displacementUseRandomAngle}set displacementUseRandomAngle(s){s!==this._displacementUseRandomAngle&&(this._displacementUseRandomAngle=s,this.onChange.dispatch())}get displacementIncrementAngle(){return this._displacementIncrementAngle}set displacementIncrementAngle(s){s!==this._displacementIncrementAngle&&(this._displacementIncrementAngle=s,this.onChange.dispatch())}get displacementIncrementMult(){return this._displacementIncrementMult}set displacementIncrementMult(s){s!==this._displacementIncrementMult&&(this._displacementIncrementMult=s,this.onChange.dispatch())}get displacementScale(){return this._displacementScale}set displacementScale(s){s!==this._displacementScale&&(this._displacementScale=s,this.onChange.dispatch())}get displacementOffsetX(){return this._displacementOffsetX}set displacementOffsetX(s){s!==this._displacementOffsetX&&(this._displacementOffsetX=s,this.onChange.dispatch())}get displacementOffsetY(){return this._displacementOffsetY}set displacementOffsetY(s){s!==this._displacementOffsetY&&(this._displacementOffsetY=s,this.onChange.dispatch())}get glitchHorizontalBand(){return this._glitchHorizontalBand}set glitchHorizontalBand(s){s!==this._glitchHorizontalBand&&(this._glitchHorizontalBand=s,this.onChange.dispatch())}get glitchHorizontalBandPos(){return this._glitchHorizontalBandPos}set glitchHorizontalBandPos(s){s!==this._glitchHorizontalBandPos&&(this._glitchHorizontalBandPos=s,this.onChange.dispatch())}get glitchHorizontalBandMirror(){return this._glitchHorizontalBandMirror}set glitchHorizontalBandMirror(s){s!==this._glitchHorizontalBandMirror&&(this._glitchHorizontalBandMirror=s,this.onChange.dispatch())}get glitchVerticalBand(){return this._glitchVerticalBand}set glitchVerticalBand(s){s!==this._glitchVerticalBand&&(this._glitchVerticalBand=s,this.onChange.dispatch())}get glitchVerticalBandPos(){return this._glitchVerticalBandPos}set glitchVerticalBandPos(s){s!==this._glitchVerticalBandPos&&(this._glitchVerticalBandPos=s,this.onChange.dispatch())}get glitchVerticalBandMirror(){return this._glitchVerticalBandMirror}set glitchVerticalBandMirror(s){s!==this._glitchVerticalBandMirror&&(this._glitchVerticalBandMirror=s,this.onChange.dispatch())}};var C0=y(z());var y0={GRID:"grid"},Lt=[];for(let r in y0)Lt.push(y0[r]);var q=y0.GRID,z0=y0;var I0=y(z()),j=class{constructor(){this.onSubParamChange=new I0.Signal,this.onChange=new I0.Signal}dispose(){this.onSubParamChange.removeAll(),this.onChange.removeAll()}serialize(s){return s}setParams(s){for(let t in s)this[t]=s[t]}};var ms=y(z()),N=class{constructor(){this._sizeMin=10,this._sizeAdd=800,this._sizePower=10,this._rectWMin=100,this._rectWAdd=500,this._rectHMin=100,this._rectHAdd=500,this.onChange=new ms.Signal}serialize(){return{sizeMin:this.sizeMin,sizeAdd:this.sizeAdd,sizePower:this.sizePower,rectWMin:this.rectWMin,rectWAdd:this.rectWAdd,rectHMin:this.rectHMin,rectHAdd:this.rectHAdd}}setParams(s){for(let t in s)this[t]=s[t]}dispose(){this.onChange.removeAll()}get sizeMin(){return this._sizeMin}set sizeMin(s){s!==this._sizeMin&&(this._sizeMin=s,this.onChange.dispatch())}get sizeAdd(){return this._sizeAdd}set sizeAdd(s){s!==this._sizeAdd&&(this._sizeAdd=s,this.onChange.dispatch())}get sizePower(){return this._sizePower}set sizePower(s){s!==this._sizePower&&(this._sizePower=s,this.onChange.dispatch())}get rectWMin(){return this._rectWMin}set rectWMin(s){s!==this._rectWMin&&(this._rectWMin=s,this.onChange.dispatch())}get rectWAdd(){return this._rectWAdd}set rectWAdd(s){s!==this._rectWAdd&&(this._rectWAdd=s,this.onChange.dispatch())}get rectHMin(){return this._rectHMin}set rectHMin(s){s!==this._rectHMin&&(this._rectHMin=s,this.onChange.dispatch())}get rectHAdd(){return this._rectHAdd}set rectHAdd(s){s!==this._rectHAdd&&(this._rectHAdd=s,this.onChange.dispatch())}};var G0={SQUARE:"square"},At=[];for(let r in G0)At.push(G0[r]);var P0=G0;var Y=class extends j{constructor(){super(),this._shape=P0.SQUARE,this._shapeData=new N,this._shapeData.onChange.add(this._onShapeDataChange),this._cols=4,this._lines=4,this._chancesToSkip=.5,this._chancesToFill=.5,this._chancesToStroke=0,this._turbulence=0,this._turbulenceMode="structurel",this._strokesWidth=50,this._isCircleHalf=!0}_onShapeDataChange=()=>{this.onChange.dispatch()};serialize(){return super.serialize({shape:this.shape,shapeData:this._shapeData.serialize(),cols:this.cols,lines:this.lines,chancesToFill:this.chancesToFill,chancesToStroke:this.chancesToStroke,strokesWidth:this.strokesWidth,isCircleHalf:this.isCircleHalf})}setParams(s){for(let t in s)t==="shapeData"?this.shapeData.setParams(s.shapeData):this[t]=s[t]}get shape(){return this._shape}set shape(s){s!==this._shape&&(this._shape=s,this.onSubParamChange.dispatch(),this.onChange.dispatch())}get shapeData(){return this._shapeData}get cols(){return this._cols}set cols(s){s!==this._cols&&(this._cols=s,this.onChange.dispatch())}get lines(){return this._lines}set lines(s){s!==this._lines&&(this._lines=s,this.onChange.dispatch())}get chancesToSkip(){return this._chancesToSkip}set chancesToSkip(s){s!==this._chancesToSkip&&(this._chancesToSkip=s,this.onChange.dispatch())}get chancesToFill(){return this._chancesToFill}set chancesToFill(s){s!==this._chancesToFill&&(this._chancesToFill=s,this.onChange.dispatch())}get chancesToStroke(){return this._chancesToStroke}set chancesToStroke(s){s!==this._chancesToStroke&&(this._chancesToStroke=s,this.onChange.dispatch())}get strokesChance(){return this.chancesToStroke}get strokesWidth(){return this._strokesWidth}set strokesWidth(s){s!==this._strokesWidth&&(this._strokesWidth=s,this.onChange.dispatch())}get isCircleHalf(){return this._isCircleHalf}set isCircleHalf(s){s!==this._isCircleHalf&&(this._isCircleHalf=s,this.onChange.dispatch())}get turbulence(){return this._turbulence}set turbulence(s){s!==this._turbulence&&(this._turbulence=s,this.onChange.dispatch())}get turbulenceMode(){return this._turbulenceMode}set turbulenceMode(s){s!==this._turbulenceMode&&(this._turbulenceMode=s,this.onChange.dispatch())}};function Bt(r){switch(r){case z0.GRID:return new Y}}var S0=Bt;var D0={MESSY:0,MESSY_STRAIGHT:1,STRAIGHT:2,DIRECTIONAL:3},Et=[];for(let r in D0)Et.push(D0[r]);var X=class{constructor(s){this._color=s,this._colorShadow=s,this.reset(),this._createDeformerData(),this.onPatternChange=new C0.Signal,this.onPatternTypeChange=new C0.Signal,this.onChange=new C0.Signal}reset(){this._isActivated=!0,this._patternType=q,this._patternDataByType={},this._getPatternData(),this._clearPreviousLayer=!1,this._countLines=5e5,this._lineWidth=1,this._lineWidthRandomAdd=0,this._lineWidthRandomPower=8,this._segmentLengthMin=10,this._segmentLengthMax=100,this._segmentLengthPower=4,this._rotationType=D0.MESSY_STRAIGHT,this._rotationAligment=!1,this._rotationAligmentFactor=500,this._rotationValue=0,this._alpha=.6,this._hueMin=0,this._hueMax=0,this._saturationMin=-.05,this._saturationMax=.05,this._luminosityMin=-.1,this._luminosityMax=.1,this._colorAdjustmentValue=.45,this._colorAdjustmentScale=677,this._modSatPercentBased=0,this._modLumPercentBased=0,this._alphaShadow=.6,this._shadowSize=20,this._shadowRotation=D0.MESSY,this._surface=2,this._dontUsePattern=!1,this._invertPatternColors=!1,this._visibleThreshold=.01}_getPatternData(){this._patternData&&this._patternData.dispose(),this._patternData=this._patternDataByType[this._patternType],this._patternData||(this._patternData=S0(this._patternType),this._patternDataByType[this._patternType]=this._patternData),this._patternData.onChange.add(this._onPatternChange)}_createDeformerData(){this._deformerData=new R,this._deformerData.onChange.add(this._onPatternChange)}_onPatternChange=()=>{this.onPatternChange.dispatch()};serialize(){return{isActivated:this.isActivated,color:S(this.color),colorShadow:S(this.colorShadow),patternType:this.patternType,patternData:this.patternData.serialize(),clearPreviousLayer:this.clearPreviousLayer,countLines:this.countLines,lineWidth:this.lineWidth,li