memoscan
← all memos

Memo 0x910c7970…d958b1 on Ethereum

///5 //STYLE SHEET class StyleSheet { calculateFeatures(tokDat){ // CALCULATE FEATURES FOR ARTBLOCKS class CFRandom { constructor(){this.useA=false;let CFsfc32=function(uint128Hex){ let a=parseInt(uint128Hex.substring(0,8),16);let b=parseInt(uint128Hex.substring(8,16),16); let c=parseInt(uint128Hex.substring(16,24),16);let d=parseInt(uint128Hex.substring(24,32),16); return function(){a|=0;b|=0;c|=0;d|=0;let t=(((a+b)|0)+d)|0;d=(d+1)|0;a=b^(b>>>9);b=(c+(c<<3))|0;c=(c<<21)|(c>>>11);c=(c+t)|0;return (t>>>0)/4294967296;};}; this.prngA=new CFsfc32(tokDat.hash.substring(2,34));this.prngB=new CFsfc32(tokDat.hash.substring(34,66)); for(let i=0;i<1e6;i+=2){this.prngA();this.prngB();}} cfRandomDec(){this.useA=!this.useA;return this.useA?this.prngA():this.prngB();} } let myCFRandom=new CFRandom(); function cfMap(x,ina,inb,outa,outb){return ((x-ina)/(inb-ina))*(outb-outa)+outa;} function cfR01(){let n=myCFRandom.cfRandomDec();return n=~~(32768*n)/32768,n} function cfRA(n){return n*cfR01()} function cfRAB(n,t){return n+(t-n)*cfR01()} function cfRI(n,t){return ~~(cfRAB(n,t+1))} let cfGaussPrev=false;let cfy2=0; function cfRGauss(n,e=1){let t,s,a,i;if(cfGaussPrev)t=cfy2,cfGaussPrev=false;else{do{s=cfRA(2)-1,a=cfRA(2)-1,i=s*s+a*a}while(i>=1);i=Math.sqrt(-2*Math.log(i)/i),t=s*i,cfy2=a*i,cfGaussPrev=true}return t*e+(n||0)} function cfSGauss(n,t,r,u){let e=t-n,m=n+e/2,o=cfRGauss(0,1),y=Math.exp(u);return m+e*(y/(y+Math.exp(-o/r))-.5)} const cfRandPick=(arr)=>arr[(cfR01()*arr.length)|0]; function cfWop(options){let choices=[];for(let i in options){choices=choices.concat(new Array(options[i][1]).fill(options[i][0]));}return cfRandPick(choices);}; function cfResetRnd(newhash){tokDat.hash=newhash;myCFRandom=new CFRandom();cfGaussPrev=false;cfy2=0;} //ESSENTIAL cfResetRnd(tokDat.hash); let bFIX=false; if ((typeof nRetries !=='undefined')&&(typeof myABFeatures !=='undefined')){ if((nRetries>0)&&(myABFeatures!==undefined)){bFIX=true;} } const phalorNames=["Augue","Smurh"]; const mbrStyNames=["Nilum","Cinctus","Partis","Glebis","Cestor","Spinit","Mordic","Lacert","Striam","Plagam","Tmema","Torulis","Iuvenc"]; const ileaNames=["Rhoncus","Lacus","Turpis","Auctor","Eius","Varlam","Olvis","Sphoeus","Ploebhis","Inanis"]; const ornareNames=["Tenvis","Usitat","Audax"]; const cladeNames=["Chorda","Vorsura","Glomera","Lemnis","Theca"]; //MEMBRANE let mbrStyleProbabilities=[[0,2],[1,9],[2,11],[3,15],[4,12],[5,5],[6,6],[7,10],[8,5],[9,8],[10,8],[11,10],[12,10]]; this.mbr_STYLE_ID=cfWop(mbrStyleProbabilities); //CONTOUR SHMA=cfWop([ [100,6],[101,8],[102,7],[103,3],[104,6],[105,8],[108,4],[109,0], [202,10],[204,6],[205,9],[206,3],[207,8],[208,8],[209,0], [300,3],[303,2],[304,8],[305,1]]); if(bFIX){ let ix=cladeNames.indexOf(myABFeatures.Clade); if(ix>=0&&ix!=3){SHMA=((ix==2)||(ix==4))?100:(ix==0)?200:300; let il=ileaNames.indexOf(myABFeatures.Ilea);if(il!==-1){SHMA+=il%10;}else{SHMA+=4;} } else{SHMA=105;}} if((SHMA>=100)&&(SHMA<200)){CONT_MODE=2; }else if((SHMA>=200)&&(SHMA<300)){CONT_MODE=0; }else if((SHMA>=300)&&(SHMA<400)){CONT_MODE=1;} if(SHMA==103){ while ((this.mbr_STYLE_ID==0)||(this.mbr_STYLE_ID==5)||(this.mbr_STYLE_ID==8)||(this.mbr_STYLE_ID==12)){ this.mbr_STYLE_ID=cfWop(mbrStyleProbabilities); } } this.bHpo=false; if(SHMA==105){this.bHpo=(cfR01()<0.275);} if(bFIX){ let vi=mbrStyNames.indexOf(myABFeatures.Vestis);if(vi!==-1)this.mbr_STYLE_ID=vi; if(myABFeatures.Clade==cladeNames[3]){this.bHpo=true;}} //PAPER this.bUseLighterPaper=(cfR01()<0.96); if(bFIX){this.bUseLighterPaper=(myABFeatures.Phalor==phalorNames[0]);} //STRUCTURE WEIGHT REST_L=cfWop([[8.3,8],[9.,17],[10.,62],[10.6,10],[11.2,3]]); if(bFIX){let oi=ornareNames.indexOf(myABFeatures.Ornare);if(oi!==-1){REST_L=(oi==0)?9:(oi==1)?10:10.6;}} this.minOSF=0.9;this.maxOSF=1; this.ORG_SCALE_FACTOR=cfSGauss(this.minOSF,this.maxOSF,1,0.8); let randOcA=cfR01(); this.bDoRings=(CONT_MODE==2)?(randOcA<0.9):(randOcA<0.95); if(this.mbr_STYLE_ID==4){this.bDoRings=false;} this.bGappyOffsetCurves=(cfR01()<0.925); if(CONT_MODE==1){this.bGappyOffsetCurves=false;} this.nOffRIngs=0; if(this.bDoRings){ let nr=Math.pow(cfR01(),1.3); if(this.bGappyOffsetCurves){ nr=cfMap(nr,0,1,5,10)/(cfMap(this.ORG_SCALE_FACTOR,this.minOSF,this.maxOSF,0.75,1.5)); nr=Math.max(5,Math.min(10,nr)); }else{let nrm=cfMap(nr,0,1,3,10);nr=Math.max(3,Math.min(10,nrm));} this.nOffRIngs=Math.round(nr); }if(this.nOffRIngs<=0){this.bDoRings=false;} this.doMbrHairs=false; if((!this.bDoRings)||(this.nOffRIngs<=0)){ this.doMbrHairs=true; let acceptableMbrStylesForHairs=[0,3,4]; if(!acceptableMbrStylesForHairs.includes(this.mbr_STYLE_ID)){ this.mbr_STYLE_ID=acceptableMbrStylesForHairs[cfRI(0,2)]; if(SHMA==103){if(this.mbr_STYLE_ID==0){this.mbr_STYLE_ID=acceptableMbrStylesForHairs[cfRI(1,2)];}} }} if(CONT_MODE==1){ this.firstOffsetRingSpacing=1.5; this.probabilityOfHavingExternalHairsWhenContourIsRadial=0.6; if(cfR01()<this.probabilityOfHavingExternalHairsWhenContourIsRadial){ this.bDoRings=false;this.doMbrHairs=true;this.mbrHairSkip=1;this.mbrHairsPerSeg=cfRI(2,4); this.mbr_STYLE_ID=cfWop([[0,2],[2,11],[3,15],[4,12],[6,6],[10,8],[12,10]]); }} if(bFIX){let vi=mbrStyNames.indexOf(myABFeatures.Vestis);if(vi!==-1)this.mbr_STYLE_ID=vi;} //MEMBRANE_LAYERS this.cachedFieldGamma=cfSGauss(1.5,4.5,1.,-0.75); let maxNLayers=(this.ORG_SCALE_FACTOR<0.9)?5:(this.ORG_SCALE_FACTOR<1.)?6.2:7.; this.nMemLayers=~~(Math.round(cfMap(Math.pow(cfR01(),1.375),0,1,2.4,maxNLayers))); if(this.cachedFieldGamma>3.0){this.nMemLayers--;} if(this.cachedFieldGamma>3.9){this.nMemLayers--;} if(this.cachedFieldGamma>4.5){this.nMemLayers--;} if((this.mbr_STYLE_ID==3)&&(Math.abs(this.nMemLayers)%2==1)){this.nMemLayers=Math.min(2,this.nMemLayers--);} if(((this.mbr_STYLE_ID==2)||(this.mbr_STYLE_ID==3)||(this.mbr_STYLE_ID==10))&&(this.nMemLayers==1)){ if(this.cachedFieldGamma>3.25){this.nMemLayers=0;}else{this.nMemLayers=2;}} if(SHMA!=103){if(cfR01()<0.012){this.nMemLayers=0;}}else if(SHMA==103){this.nMemLayers=Math.max(this.nMemLayers,2);} if(SHMA==105){if(cfR01()<0.2){this.nMemLayers=Math.min(7,this.nMemLayers+1);}this.nMemLayers=Math.max(this.nMemLayers,2);} if(SHMA==205){if(cfR01()<0.5){this.nMemLayers=Math.min(7,this.nMemLayers+1);}} if(SHMA==206){this.nMemLayers+=2;}this.nMemLayers=Math.max(0,this.nMemLayers); this.amoMaskWrinkle=1.05; this.amoContourNoiseFalloff=0.3; this.edgeRandomnessChoice=cfR01(); this.schema105noiseStruct=cfWop([[[0.5,0.250],70],[[2.5,0.035],20],[[5.,0.065],10]]); this.bSchema105noiseChoice=(cfR01()<0.75); let bRectangularContour=false; if((SHMA==100)||(SHMA==102)){ if(this.edgeRandomnessChoice<0.3){this.amoMaskWrinkle=cfRAB(2.,2.5);this.amoContourNoiseFalloff=cfRAB(0.1,0.25); }else if(this.edgeRandomnessChoice<0.55){this.amoMaskWrinkle=cfRAB(4.,7.);this.amoContourNoiseFalloff=cfRAB(0.5,0.55); }else if(this.edgeRandomnessChoice<0.75){this.amoMaskWrinkle=cfRAB(0.5,0.75); }else if(this.edgeRandomnessChoice<0.9){bRectangularContour=true;this.amoMaskWrinkle=cfRAB(0.7,0.9); }else{this.amoMaskWrinkle=cfRAB(1,1.1);} if(bFIX){if(myABFeatures.Clade==cladeNames[4]){bRectangularContour=true;this.amoMaskWrinkle=0.8;}} }else if(SHMA==105){ if(this.bSchema105noiseChoice){this.amoMaskWrinkle=this.schema105noiseStruct[0]*cfRAB(0.9,1.);} this.amoContourNoiseFalloff=cfRAB(0.4,0.51); }else if(SHMA==108){ let noistruct=cfWop([[[0.5,0.55],30],[[1.5,0.35],40],[[2.7,0.10],30]]); this.amoMaskWrinkle=noistruct[0];this.amoContourNoiseFalloff=noistruct[1]; } if((this.amoMaskWrinkle>=2.25)||(this.amoContourNoiseFalloff>0.5)){ this.nMemLayers+=cfRI(1,2);this.nMemLayers=Math.min(8,Math.max(2,this.nMemLayers)); } this.nMemLayers=Math.min(8,Math.max(0,this.nMemLayers)); if(bFIX){this.nMemLayers=myABFeatures.Dermis;} let Phalor=(this.bUseLighterPaper)?phalorNames[0]:phalorNames[1]; let Dermis=this.nMemLayers; let Vestis=(Dermis==0)?mbrStyNames[0]:mbrStyNames[this.mbr_STYLE_ID]; let whichOrn=(REST_L<10)?0:(REST_L==10)?1:2;let Ornare=ornareNames[whichOrn]; this.bDoStamp=(cfR01()<0.075);let Indica=this.bDoStamp; let Clade=cladeNames[CONT_MODE];if(this.bHpo){Clade=cladeNames[3];}else if(bRectangularContour){Clade=cladeNames[4];} let Ilea=ileaNames[SHMA%10]; let AB_FEATURES={"Clade":Clade,"Ilea":Ilea,"Vestis":Vestis,"Ornare":Ornare,"Phalor":Phalor,"Dermis":Dermis,"Indica":Indica}; return AB_FEATURES; } //============ constructor(){ //Sections are ordered below due to possible dependencies. resetRnd(CHASH); myABFeatures=this.calculateFeatures(tokenData); resetRnd(CHASH); noiseSeed(CNOISEED); MAXSP=REST_L*0.3125; MAXSP2=MAXSP*MAXSP; MINSPRD=REST_L/128.; MINSPRD2=MINSPRD*MINSPRD; //Paper this.uBiasC=.1,this.uBiasL=.55,this.uReverseTextAmount=1,this.bUseLighterPaper?(this.uBiasC=myRAB(.06,.12),this.uBiasL=myRAB(.35,.6),this.uReverseTextAmount=.5+2.5*pow(myR01(),2)):(this.uBiasC=myRAB(.16,.24),this.uBiasL=myRAB(.6,.85),this.uReverseTextAmount=1),this.uNoiseSharpness=myRAB(.83,.91),this.uNoiseScale=myRAB(1.1,1.6),this.uNoiOff=[myRAB(4,5),5],this.uNoiseThreshold=myRAB(.2,.27),this.uIllLit=myRAB(.05,.1),this.uIllG=myRAB(1.08,1.9)+3*(this.uNoiseThreshold-.2),this.textBlur=myRAB(.85,1.35),this.textPhase=myR01()*PI2,this.textAlpha=map(pow(myR01(),1.5),0,1,.3,.55),this.uBlurRadius=myRAB(.1,.4),this.uEmbossAmount=myRAB(.01,.03); //Membrane this.radBW=[0,0]; switch(this.mbr_STYLE_ID){case 11:this.radBW=getWop([[[W0,W0],75],[[W1,W0],10],[[W0,W1],15]]);break;case 9:this.radBW=getWop([[[W0,W0],75],[[W1,W0],14],[[W1,W1],10],[[W2,W1],1]]);break;case 8:this.radBW=getWop([[[W0,W0],10],[[W1,W0],45],[[W2,W1],2],[[W1,W1],40],[[W2,W2],3]]);break;case 7:this.radBW=getWop([[[W0,W0],80],[[W0,W1],4],[[W1,W0],10],[[W1,W1],6]]);break;case 5:this.radBW=getWop([[[W0,W0],20],[[W1,W0],75],[[W2,W0],5]]);break;default:this.radBW=getWop([[[W0,W0],80],[[W1,W0],20]])} this.bUseVSh=T,this.greedyAddTimeout=3600,this.growthUpdateCycleLength=2,this.tempCoolRate=15/16,this.addStrcFrmCyc=4,this.maxNProgressivelyAddedBlobs=80,this.addStrcFrmDur=1e3,this.schemaOccupancyThreshold=.8,this.bProgAddLpsWhls=F,this.progAddType=-1,this.blbTgtLenPoke=myRAB(.75,1.25),this.intWhlTgtLenPoke=1,this.whlTgtLenPoke=2,this.minDistInRestLengths=1.5,this.minOccupancyForProgressivelyAddedBlobs=.25,this.proportionOfParticlesToAddToBlobs=.2,this.blbIntExtRatio=.5,this.progressivelyAddedBlobStylePair=[0,0],this.whlStyPrMode=WHEEL_MODE_PARTY,this.bEnableRingsOrHairs=T,this.bImplementBorders=T,this.flockCfg=getWop([[0,70],[1,15],[2,15]]),this.adequateLetterCloseness=REST_L*getWop([[3,80],[.5,20]]),this.probabilityOfLetterOnSite=.4,this.probabilityOfLetterOnStructure=.48,SHMA>=200&&SHMA<300?(this.edgeNoiseScale=400,this.edgeNoiseAmp=50):SHMA>=300&&SHMA<400&&(this.edgeNoiseScale=300,this.edgeNoiseAmp=0); //Contour this.bUseAmoCnt=F; if(CONT_MODE==CONT_MODE_IMPLICIT_SPINES){this.bUseAmoCnt=F; }else if(CONT_MODE==CONT_MODE_IMPLICIT_RADIAL){this.bUseAmoCnt=F; }else if(CONT_MODE==CONT_MODE_AMORPHOUS){this.bUseAmoCnt=T;} if(CONT_MODE==CONT_MODE_IMPLICIT_RADIAL){ this.nRadialArms=round(myRAB(3.33,7.49)); this.nRdR=4;this.nSubdivsToDo=3; switch(this.nRadialArms){ case 3:this.nRdR=4;this.nSubdivsToDo=9;break; case 4:this.nRdR=4;this.nSubdivsToDo=16;break; case 5:this.nRdR=4;this.nSubdivsToDo=5;break; case 6:this.nRdR=4;this.nSubdivsToDo=12;break; case 7:this.nRdR=5;this.nSubdivsToDo=14;break; case 8:this.nRdR=5;this.nSubdivsToDo=8;break; } this.bOrientEvenShapesDifferently=F; if(this.nRadialArms%2==0){this.bOrientEvenShapesDifferently=(myR01()<0.3);} this.bDoWarpEvenShapeSpokeModulo=(myR01()<0.2); this.howMuchSpokeAngleWarping=myRAB(-0.4,0.4); this.bMakeBulbous=(myR01()<0.25)&&!this.bOrientEvenShapesDifferently; let distFracPrePow=myRAB(0.4,1.); this.radialSiteDistFracPow=(myR01()<0.5)?distFracPrePow:1./distFracPrePow; this.radialSiteMassDirection=(myR01()<0.5); this.bIsSym=F; this.bMakePlatonicRadials=(myR01()<0.0625); if(this.bMakePlatonicRadials){ this.howMuchSpokeAngleWarping*=(19./128.); this.bMakeBulbous=F; }} this.amoInvSp2=20000; this.amoInvSp=getSGauss(3000,10000,1.,-1.5); this.amoRot=Rd(getSGauss(-1.5,1.5,1.,0.)); this.amoNoiCat=getWop([[1,80],[2,20]]); let bumpShaperOption=getWop([[[-1,1],45],[[1,-1],10],[[1,1],15],[[0,2],30]]); this.amoBumpShaperA=bumpShaperOption[0]; this.amoBumpShaperB=bumpShaperOption[1]; this.hipRat=getSGauss(1.20,2.05,1.,-0.7); this.hipNoi=myRAB(0.2,0.57); this.hipRatVar=myRAB(0.06,0.08); this.hipRatVarInvSp=this.amoInvSp*myRAB(0.5,0.7); this.bPropHip=(myR01()<0.35); this.amoWFq=0;this.amoWAm=0; if(SHMA==103){ this.amoNoiCat=1; this.amoWFq=getWop([[4,25],[6,20],[8,20],[10,25],[12,8],[14,2]]); this.amoWAm=getWop([[0.,17],[0.002,30],[0.005,30],[0.010,20],[0.015,3]]); } switch(this.amoNoiCat){ case 1:this.amoNoi=getSGauss(0.04,0.12,1.,-0.65);break; case 2:this.amoNoi=getSGauss(0.12,0.2,1.,0.);break;} let amoARCats=[[1,12],[2,24],[3,64]]; this.amoARCat=getWop(amoARCats); if(SHMA==103){while (this.amoARCat==3){this.amoARCat=getWop(amoARCats);}} switch (this.amoARCat){ case 1:this.amoAR=getSGauss(0.95,1.05,1.,0.);break; case 2:this.amoAR=getSGauss(0.65,0.98,0.9,0.4);break; case 3:this.amoAR=1./getSGauss(0.65,0.92,0.9,0.4);break;} this.amoPowX=1.;this.amoPowY=1.; if(1==this.amoNoiCat){let o=121/128;switch(this.amoARCat){case 1:this.amoPowX=getSGauss(.8,1.1,1.5,-.5),this.amoPowY=getSGauss(.8,1.1,1.5,-.5);break;case 2:this.amoPowX=o,this.amoPowY=o,myR01()<.666&&(this.amoPowX=myRAB(.7,.9)),myR01()<.002&&(this.amoPowY=myRAB(1,1.2));break;case 3:this.amoPowX=o,this.amoPowY=o,myR01()<.8&&(this.amoPowY=getSGauss(.5,.9,1.5,.5)),myR01()<.04&&(this.amoPowX=myRAB(1.2,1.5))}} if((SHMA==100)||(SHMA==102)){ this.amoInvSp=10000; this.amoInvSp2=4000000; if(this.edgeRandomnessChoice<0.3){ this.amoNoi=myRAB(0.1,0.2); this.amoRot*=1.25; }else if(this.edgeRandomnessChoice<0.55){ this.amoInvSp=8000; this.amoInvSp2=800000; this.amoRot=0; this.amoNoi=myRAB(0.04,0.06); switch (this.amoARCat){ case 2:this.amoAR-=(7./128.);break; case 3:this.amoAR+=(7./128.);break; } }else if(this.edgeRandomnessChoice<0.75){ this.amoNoi=myRAB(0.22,0.32); }else if(this.edgeRandomnessChoice<0.9){ this.amoRot=0; this.amoNoi=myRAB(0.1,0.15); this.amoAR=myRAB(0.4,0.62); this.amoPowX=myRAB(0.38,0.48); this.amoPowY=this.amoPowX; }else{this.amoNoi=myRAB(0.08,0.14);} }else if(SHMA==205){ let ens=getWop([[[20,15],5],[[40,15],25],[[80,30],40],[[120,40],25],[[320,50],5]]); this.edgeNoiseScale=ens[0]; this.edgeNoiseAmp=ens[1]; }else if(SHMA==105){ if(this.bSchema105noiseChoice){this.amoNoi=this.schema105noiseStruct[1]*myRAB(0.9,1.);} this.amoInvSp2=myRAB(40000,60000)*((myR01()<0.5)?-1:1); this.amoInvSp=100000*myRAB(0.1,0.35);} //Parameters for the imp sites and overall contour this.bIsSym=(myR01()<0.13); if(this.bUseAmoCnt){this.bIsSym=F;} this.massRandomness=(this.bIsSym)?0.01:myRAB(0.05,0.2); let cfg=this.cachedFieldGamma; this.siteWvA=(cfg<2.)?map(cfg,1.5,2.,0.4,0.3):map(cfg,2.,4.,0.3,0.2); this.siteWvS=800.; if(this.cachedFieldGamma<2.){this.siteWvS=map(cfg,1.5,2.,1000,800); }else{this.siteWvS=map(cfg,2.,4.,800,700);} this.impConvergeIterations=4; this.impContourTwistStdv=0.25; this.impContourBloatStdv=0.08; this.impContourBendy=0.15; this.impBaseThresholdBoost=0.; this.impContourBendxStdv=0.2; switch(SHMA){ case 204:this.impBaseThresholdBoost=-0.02;this.impContourBendxStdv=myRAB(0.2,0.4);this.siteWvA*=0.5;break; case 209:this.impContourBendxStdv=myRAB(0.2,0.33);this.siteWvA*=0.5;break; case 205:this.impContourBendxStdv=myRAB(0.2,0.55);this.siteWvA*=0.5;break; case 206:this.impContourBendxStdv=myRAB(0.2,0.59);this.siteWvA*=0.5;break; case 207:this.impContourBendxStdv=myRAB(0.2,0.6);this.siteWvA*=0.5;break; case 208:this.impContourBendxStdv=myRAB(0.2,0.75);this.impBaseThresholdBoost=-0.05;break; }if(this.impContourBendxStdv>0.5){this.impConvergeIterations=5;} //ST11 -------------- this.mbrInnerWiggleAmp=getWop([[0.,75],[0.07,25]]); this.mbrInnerWiggleFrq=myRI(50,60); this.mbr3variant=getWop([[0,55],[1,15],[2,15],[3,15]]); this.mbr3pointSkip=getWop([[4,5],[6,15],[7,10],[8,200],[9,220],[12,500],[18,30],[24,5],[36,5],[54,5],[72,5]]); if(CONT_MODE==CONT_MODE_IMPLICIT_RADIAL){ this.mbr3pointSkip=getWop([[4,1],[6,10],[8,20],[9,30],[12,39]]); }else if((CONT_MODE==CONT_MODE_AMORPHOUS)&&this.bHpo){ this.mbr3pointSkip=getWop([[6,1],[8,5],[9,35],[12,45],[18,10],[36,1],[72,3]]);} this.bAddMiniNuclei=F; if(this.mbr_STYLE_ID==1){this.bAddMiniNuclei=(myR01()<0.11); }else if((this.mbr_STYLE_ID==2)||(this.mbr_STYLE_ID==10)){this.bAddMiniNuclei=(myR01()<0.2);} this.offsetRingSpacing=map(pow(myR01(),map(this.nOffRIngs,5,10,1,4)),0,1,3,5); this.firstOffsetRingSpacing= ((this.nOffRIngs<=4)||(this.nOffRIngs>=8&&this.offsetRingSpacing>4.))?1.5: ((myR01()<0.666)?1.5:2.5); if(this.mbr_STYLE_ID==9){this.firstOffsetRingSpacing=1.5;} if(this.nOffRIngs<=0){this.bDoRings=F;} //ST10 -------------- this.doMbrExtraInnerMbr=(myR01()<0.666); this.mbrExtraInnerMbrSeparation=myRAB(0.3,0.5); let stylesWithNoExtraInnerMbr=[0,5]; if(stylesWithNoExtraInnerMbr.includes(this.mbr_STYLE_ID)){this.doMbrExtraInnerMbr=F;} this.mbrHairLengthFactor=getSGauss (1.,2.,1.,-0.5); this.mbrHairWeight=(myR01()<0.3)?W0:W1; this.mbrHairsPerSeg=1; this.mbrHairSkip=myRI(1,2); this.doMbrHairsStubbly=F; if((!this.bDoRings)||(this.nOffRIngs<=0)){ this.doMbrHairs=T; if(CONT_MODE==CONT_MODE_AMORPHOUS){ this.doMbrHairsStubbly=(myR01()<0.17); if(this.doMbrHairsStubbly){ this.mbrHairsPerSeg=2; this.mbrHairWeight=W1; this.mbrHairLengthFactor=myRAB(0.8,1.); }}} this.mbrLoopPerimeterReductionFactor=myRAB(0.96,0.99); this.mbrInnermostRingMass=myRAB(0.9,1.5); if(SHMA==202){this.siteWvA=0.1;this.siteWvS=1000.;} if(SHMA==205){ this.mbrLoopPerimeterReductionFactor=myRAB(1.,1.01); this.mbrInnermostRingMass=myRAB(1.3,1.6); this.siteWvA=myRAB(0.15,0.3); this.siteWvS=myRAB(1500,4500); if(!this.doMbrHairsStubbly){ this.mbrHairLengthFactor=myRAB(1.75,2.75); } this.bIsSym=(myR01()<0.01); if(myR01()<0.02){this.mbrHairsPerSeg=2;} this.cachedFieldGamma=pow(this.cachedFieldGamma,0.9); if(this.ORG_SCALE_FACTOR<1.){ this.ORG_SCALE_FACTOR=pow(this.ORG_SCALE_FACTOR,0.5); }} if(SHMA==208){ this.siteWvA=myRAB(0.05,0.09); this.bIsSym=(myR01()<0.875); this.massRandomness=(this.bIsSym)?myRAB(0.01,0.03):myRAB(0.05,0.1); this.mbrHairsPerSeg=getWop([[1,10],[2,30],[3,45],[4,15]]); this.mbrHairSkip=1; this.cachedFieldGamma=myRAB(1.,1.04); this.ORG_SCALE_FACTOR=myRAB(1.04,1.12); let edgeNoiseConfig=getWop([[[50,10],15],[[200,25],35],[[400,40],50]]); this.edgeNoiseScale=edgeNoiseConfig[0]; this.edgeNoiseAmp=edgeNoiseConfig[1];} this.bDoMbr=(this.nMemLayers>0); this.defdStrcMinDstThr=2.; this.bOrientationSensitiveDashedContours=F; this.orientationSensitiveOmitDashAngle=Rd(25.); this.orientationSensitiveDashNotchWidth=getSGauss(0.5,1.5,1.4,-1.7); this.mbr_bAddDitherDots=F; let probabilitiesOfAddingDitherDots=[22,12,26,30,0,1,16,8,0,0,40,10,0]; if(this.nMemLayers>=2){ if((this.mbr_STYLE_ID>=0)&&(this.mbr_STYLE_ID<=12)){ let probabilityOfAddingDitherDots=probabilitiesOfAddingDitherDots[this.mbr_STYLE_ID]; if(this.nMemLayers==2){probabilityOfAddingDitherDots*=0.33;} if(SHMA==206){ probabilityOfAddingDitherDots*=1.5; probabilityOfAddingDitherDots=min(100,probabilityOfAddingDitherDots+35); } this.mbr_bAddDitherDots=(myR01()<(probabilityOfAddingDitherDots/100.)); }} this.mbrLoopIndent=0; this.loopIndentWeight=W2; const acceptableMbrStylesForLoopIndent=[0,1,2,3,5,7,8,9,10,11]; if(acceptableMbrStylesForLoopIndent.includes(this.mbr_STYLE_ID)){ if(this.nMemLayers>3){ let loopIndentProbability=map(this.nMemLayers,4,8,0.65,0.85,T); if(this.mbr_STYLE_ID==0){loopIndentProbability*=0.6;} if(myR01()<loopIndentProbability){ this.mbrLoopIndent=1; }}} //-------------- this.bDrawPs=(myR01()>0.01); this.particleDrawMode=getWop([[P_SIZE_CONSTANT,66],[P_SIZE_SPEEDBASED,18],[P_SIZE_VARIEGATED,16]]); if(SHMA==206){this.particleDrawMode=P_SIZE_VARIEGATED;} this.bDrawVs=T; this.bDrawClippedVoronoiCellsOnInteriorStructureBoundaries=(myR01()>0.01); this.bDrawBs=(myR01()>0.01); this.nVoronoiSubdivs=getWop([[1,2],[3,8],[4,90]]); this.pDiam=Cs(myRGauss(1.75,0.2),1.,2.5); this.blobDrpPct=myRAB(0.01,0.04); this.nucDropPct=myRAB(0.01,0.04); this.bDoFillSiteBlobs=T; this.siteBlbFCol=(myRA(1.)<0.1)?0:255; this.siteBlbSCol=(this.bDoFillSiteBlobs)?(255-this.siteBlbFCol):0; this.siteBlobScale=getSGauss(0.5,0.8,0.85,1.4); if(this.bDoFillSiteBlobs){this.siteBlobScale-=0.11;} this.siteBlobTightness=getSGauss(0.3,0.5,0.7,-1.7); //COMP this.nToppings=getWop([[2,25],[3,50],[4,25]]); this.toppings=[]; for(let i=0;i<this.nToppings;i++){ let aTopping=getWop([[ST1,20],[ST2,15],[ST3,10],[ST5,5],[ST6,5],[ST8,10],[ST9,15],[ST0,20]]); while (this.toppings.includes(aTopping)){ aTopping=getWop([[ST1,20],[ST2,15],[ST3,10],[ST5,5],[ST6,5],[ST8,10],[ST9,15],[ST0,20]]); }this.toppings[i]=aTopping; } //ST0 let lS=getWop([[[0,20,10,T],28],[[1,25,10,F],35],[[2,10,2,T],25],[[3,10,1,F],4],[[4,10,2,F],4],[[5,6,2,F],4]]); this.linSty=lS[0]; this.lineLenTgt=lS[1]; this.lineLenVar=lS[2]; this.lineStrcGreedy=lS[3]; this.lineStructureSmoothing=getSGauss(0.5,3.5,0.9,0.4); this.bLinesGrowAtHighestCurvature=(myR01()>0.75); this.lineMassMultiplier=1.; //ST1 let lpS=getWop([[[0,T],25],[[1,F],3],[[2,F],20],[[3,T],5],[[4,F],5],[[5,T],42]]); this.loopSty=lpS[0]; this.bLoopShoEnclBl=lpS[1]; this.loopSmth=getSGauss(1.5,3,1,.6); this.bLoopGrdy=(myR01()<.01); this.loopMssMlt=myRAB(1,2); this.loopInitSz=10; this.loopSzTgt=myRI(12,60); this.loopSzVar=int(this.loopSzTgt*myRAB(.1,.4)); this.bGroAtKink=myR01()>0.75; //ST2 this.dashStructureStyle=getWop([[0,10],[1,25],[2,45],[3,20]]); this.dashMassMultiplier=getWop([[1,15],[1.5,20],[2,40],[3,20],[4,5]]); //ST3 let trS=getWop([[[0,2,.7],10],[[1,2,1.1],25],[[2,4,1.2],5],[[3,2,1.1],15],[[4,2,1],10],[[5,3,.6],25],[[6,1,1.1],10]]); this.trsSty=trS[0]; this.trsMinLen=trS[1]; this.trsTgtLenStd=trS[2]; this.trsTgtLenMin=this.trsMinLen; this.trsTaper=(myR01()<0.3); //ST4 this.nWheelRadialBands=myRI(3,5); this.nWheelAnnularLoops=myRI(1,3); this.wheelMassMultiplier=myRAB(3.,4.); this.scrunchTickProbabilities=[0,0,0,75,20,0,0,25,27,0,0,66,0,0,95,0,0,0,0,0]; this.bDrawAllRadialLines=(myR01()<0.7); this.drawRadialLinePercent=getWop([[0.09,5],[0.2,5],[0.94,90]]); //ST5 let starStruct=getWop([[0,5],[1,15],[2,10],[3,25],[4,10],[5,25],[6,10]]); this.starStructureStyle=starStruct; this.starSzTgt=int(abs(myRGauss(0.,1.1))); this.bDoStarCenterDot=F; //ST6 let treeStruct=getWop([[0,20],[1,10],[2,45],[3,25]]); this.treeStructureStyle=treeStruct; this.bTreeUseGreedyGrowth=F; let maxTreeGrowth=(this.treeStructureStyle==3)?25:50; this.treeGrowthSizeLimit=int(getSGauss(6,maxTreeGrowth,1.,-0.8)); this.treeMassMultiplier=map(this.treeGrowthSizeLimit,6,maxTreeGrowth,2.,5.); this.maxSpringsPerParticle=myRI(3,4); this.treeStructureBranchDiminishFactor=getSGauss(0.2,0.9,1.1,1.8); this.treeBranchMutualRepulsionFactor=getSGauss(0.05,0.75,0.9,-0.4); //ST7 this.urchinStructureCounter=myRI(0,3); //ST8 let centiStruct=getWop([[0,15],[1,15],[2,40],[3,20],[4,10]]); this.centiStructureStyle=centiStruct; this.centiStructureLength=int(round(getSGauss(3,7,1.6,-0.25))); //ST9 this.ballStructureStyle=getWop([[PARTY_STYLE,10],[0,4],[1,5],[2,25],[3,20],[4,10],[5,5],[6,5],[8,7],[10,1],[11,3],[13,3],[14,2]]); this.ballStructureEccentricity=getSGauss(1.,1.5,1.1,-0.3); this.ballStructureSymmetry=getSGauss(0.,0.5,0.8,-0.3); this.nSpokesPerBall=myRI(6,8); this.ballMassMultiplier=myRAB(0.85,1.); this.ballForceBalance=myRAB(0.3,0.7); this.ballAttr=0.75; this.bBallCenterDot=(myR01()<0.4); //ST15 this.S15St=getWop([[1,65],[5,35]]); this.S15NS=myRI(2,9); this.S15B=(myR01()<0.6); //ST16 this.S16St=getWop([[0,80],[6,20]]); this.S16N=myRI(3,6); //ST17 this.S17S=getWop([[5,75],[4,20],[0,5]]); this.S17T=getWop([[1,65],[5,25],[6,10]]); this.S17nS=getWop([[1,10],[2,5],[3,30],[5,10],[6,10],[7,25],[8,5],[9,5]]); this.S17SL=~~(15/this.S17nS); //SVG this.HATCH_ANGLE=Rd(getSGauss(35,45,1.3,0.)); this.HATCH_DENSITY=myRI(2,3); }}