let powerupX,powerupY,selectedRectType,selectedDiskType,placeholderScreenX,placeholderScreenY,powerupX1,powerupY1,powerupX2,powerupY2,increment=!0,placeholderCanvasSize=1e3,placeholderScreenWidth=600,placeholderScreenHeight=400,placeholderScreenBackgroundLayer1=[255,255,255],placeholderScreenBackgroundLayer2=[200,200,200],placeholderScreenBackgroundLayer3=[150,150,150],placeholderAlphaValue=100,placeholderBackgroundColor=[0,0,0],rectPercentage=.3,smallRectPercentage=.7,diskPercentage=.99,ssdPercentage=.99,powerupProfiles=[{type:"virus",baseSize:140,maxOffset:80,probability:.1},{type:"virus",baseSize:60,maxOffset:40,probability:.2},{type:"additionalCPU",baseSize:140,maxOffset:30,probability:.2},{type:"additionalCPU",baseSize:200,maxOffset:30,probability:.2},{type:"overclock",baseSize:50,maxOffset:50,probability:.3}],selectedPowerupProfile=powerupProfiles[0];function updateDynamo(e){dynamo=parseInt(e),document.getElementById("dynamoValue").innerText=dynamo}let selectedDataTextProfile,quanticCenterX,quanticCenterY,selectedLightProfile,selectedRectAltProfile,selectedTextProfile,selectedQuanticProfile,speedFactor,baseSpeed,diskX,diskY,rectX,rectY,screenX,screenY,useQuantic,selectedDisquanticProfile,selectedProfile,selectedAnimationSize,selectedBackgroundProfile,selectedColorProfile,offsetX,offsetY,selectedScreenProfile,selectedCorniceProfile,selectedRectProfile,capacitors=[],capacitorProfiles=[{count:32,radius:60,horizontalSpacing:1,verticalSpacing:1,numCircles:3,animationSpeed:.02,rows:4,cols:3,probability:.18},{count:32,radius:130,horizontalSpacing:1,verticalSpacing:1,numCircles:3,animationSpeed:.02,rows:5,cols:2,probability:.18},{count:32,radius:200,horizontalSpacing:1,verticalSpacing:1,numCircles:4,animationSpeed:.02,rows:3,cols:2,probability:.2},{count:32,radius:40,horizontalSpacing:3,verticalSpacing:1,numCircles:3,animationSpeed:.02,rows:4,cols:5,probability:.17},{count:32,radius:350,horizontalSpacing:1,verticalSpacing:1,numCircles:6,animationSpeed:.02,rows:1,cols:1,probability:.03},{count:32,radius:250,horizontalSpacing:1,verticalSpacing:1,numCircles:5,animationSpeed:.02,rows:2,cols:2,probability:.07},{count:32,radius:40,horizontalSpacing:3,verticalSpacing:1,numCircles:2,animationSpeed:.02,rows:6,cols:3,probability:.17}],dataTextProfiles=[{probability:1,textColor:[255,255,255],corner:"top-left"}],dataTextVisible=!1,nextDataTextToggleTime=0,dataTextValues={average_fee:0,average_fee_rate:0,bits:486604799,chainwork:"00000000000100010001",confirmations:0,difficulty:0,hash:"0x19d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",feerate_percentiles:[0,0,0,0,0],height:0,max_fee:0,max_fee_rate:0,max_tx_size:0,median_fee:0,median_time:1231006505,merkle_root:"000000000000000000",min_fee:0,min_fee_rate:0,next_block:null,nonce:0,previous_block:null,subsidy:5e9,target:"00000000ffff000000000000",timestamp:0,total_fee:0,total_size:0,total_weight:0,transaction_count:0,version:0},showDataText=!1,dataTextUpdateInterval=500,lastDataTextUpdateTime=0,quanticRects=[],alphaValue=200,lastGradientUpdateTime=0,gradientUpdateInterval=100,minLightDistance=50,diskRadius=45,diskRotationSpeed=.05,diskAngle=30,diskCircles=0,rectSize=30,rectMaxSize=150,spRam=.3,screenWidth=200,screenHeight=100,quanticProfiles=[{maxDimension:200,baseSpeed:.1,type:"quantic",probability:.2},{maxDimension:250,baseSpeed:.1,type:"quantic",probability:.2},{maxDimension:300,baseSpeed:.1,type:"quantic",probability:.3},{maxDimension:350,baseSpeed:.1,type:"quantic",probability:.25},{maxDimension:420,baseSpeed:.1,type:"quantic",probability:.05}],disquanticProfiles=[{maxDimension:270,baseSpeed:.1,type:"disquantic",probability:.2},{maxDimension:420,baseSpeed:.1,type:"disquantic",probability:.4},{maxDimension:350,baseSpeed:.1,type:"disquantic",probability:.4}],profiles=[{rows:2,cols:2,probability:.15},{rows:3,cols:3,probability:.22},{rows:4,cols:4,probability:.21},{rows:8,cols:8,probability:.14},{rows:10,cols:10,probability:.06},{type:"none",probability:.21}],animationSizes=[{size:150,probability:.24},{size:200,probability:.33},{size:300,probability:.33},{size:350,probability:.1}],diskProfiles=[{radius:150,rotationSpeed:.99,angle:45,probability:.12,circles:60,type:"original"},{radius:200,rotationSpeed:.99,angle:30,probability:.13,circles:70,type:"original"},{radius:200,rotationSpeed:.99,angle:30,probability:.12,circles:45,type:"original"},{radius:150,rotationSpeed:.99,angle:30,probability:.13,circles:45,type:"original"},{radius:40,angle:45,probability:.11,type:"new",numCircles:1.6,circleRotationSpeed:.3,totalSize:500,circleThickness:4.9,circleSpacing:40},{radius:40,angle:45,probability:.11,type:"new",numCircles:3.6,circleRotationSpeed:.4,totalSize:500,circleThickness:2.9,circleSpacing:40},{radius:40,angle:45,probability:.13,type:"new",numCircles:3.2,circleRotationSpeed:.1,totalSize:500,circleThickness:4.9,circleSpacing:30},{radius:40,angle:45,probability:.15,type:"new",numCircles:2.2,circleRotationSpeed:.14,totalSize:500,circleThickness:4.9,circleSpacing:20}],canvasSize=1024,lastBackgroundUpdateTime=0,backgroundUpdateInterval=100,backgroundProfiles=[{type:"gradient",probability:.3},{type:"diagonal",probability:.6},{type:"dynamic",probability:.3}],colorProfiles=[{background1:[80,80,80],background2:[30,30,30],background3:[220,220,220],squareColor1:[195,195,195],squareColor2:[170,175,160],squareColor3:[210,200,205],rectColor1:[145,145,145],rectColor2:[150,150,150],rectColor3:[100,100,100],diskColor1:[170,170,170],diskColor2:[170,170,170],diskColor3:[170,170,170],screenBackground:[200,200,200],screenText:[90,90,90],smallRectColor1:[50,50,50],smallRectColor2:[230,230,230],smallRectColor3:[130,130,130],corniceIntColor1:[30,30,30],corniceIntColor2:[45,45,45],corniceIntColor3:[20,20,20],lightColor1:[60,60,60],lightColor2:[110,110,110],lightColor3:[80,80,80],gradientStart:[160,160,160],gradientEnd:[255,255,255],textColor:[180,180,180],powerupColor1:[155,150,150],powerupColor2:[150,155,150],powerupColor3:[150,150,155],virus1:[250,50,70],virus2:[250,50,70],virus3:[250,50,70],strokeVirus:[235,50,0],additionalCPU1:[150,185,230,100],additionalCPU2:[145,195,240,100],additionalCPU3:[150,1215,250,100],strokeaddCPU:[30,130,40],strokeAdditionalCPU:[10,150,40],probability:.18},{background1:[93,75,10],background2:[73,55,5],background3:[233,195,90],squareColor1:[230,195,40],squareColor2:[245,152,12],squareColor3:[210,100,35],rectColor1:[237,190,80],rectColor2:[220,160,80],rectColor3:[200,150,60],diskColor1:[40,120,0],diskColor2:[40,120,0],diskColor3:[0,155,0],screenBackground:[237,195,90],screenText:[33,41,74],smallRectColor1:[0,255,0],smallRectColor2:[0,200,0],smallRectColor3:[0,150,0],corniceIntColor1:[41,59,89],corniceIntColor2:[33,41,74],corniceIntColor3:[5,12,14],lightColor1:[20,95,60],lightColor2:[20,120,20],lightColor3:[50,130,40],gradientStart:[255,185,0],gradientEnd:[255,185,0],textColor:[245,150,20],virus1:[155,15,20],virus2:[150,15,15],virus3:[150,15,15],strokeVirus:[255,18,0],additionalCPU1:[255,180,200],additionalCPU2:[240,170,180],additionalCPU3:[200,200,190],strokeaddCPU:[30,130,40],strokeAdditionalCPU:[10,150,40],probability:.13},{background1:[20,30,20],background2:[20,20,20],background3:[98,140,40],squareColor1:[193,216,110],squareColor2:[98,140,40],squareColor3:[98,140,40],rectColor1:[120,170,80],rectColor2:[193,216,110],rectColor3:[98,140,40],diskColor1:[98,140,40],diskColor2:[98,140,40],diskColor3:[193,216,110],screenBackground:[25,25,25],screenText:[98,140,40],smallRectColor1:[98,140,40],smallRectColor2:[193,216,110],smallRectColor3:[98,140,40],corniceIntColor1:[20,20,20],corniceIntColor2:[39,25,24],corniceIntColor3:[30,30,30],lightColor1:[170,161,166],lightColor2:[98,140,40],lightColor3:[193,216,110],gradientStart:[98,140,40],gradientEnd:[98,140,40],textColor:[193,216,110],virus1:[255,150,50],virus2:[250,155,50],virus3:[250,150,55],strokeVirus:[225,90,0],additionalCPU1:[120,100,170],additionalCPU2:[100,150,180],additionalCPU3:[150,120,160],strokeaddCPU:[30,130,40],strokeAdditionalCPU:[70,150,240],probability:.18},{background1:[60,40,0],background2:[70,50,0],background3:[120,110,0],squareColor1:[200,130,10],squareColor2:[215,195,40],squareColor3:[215,115,20],rectColor1:[160,90,0],rectColor2:[170,120,0],rectColor3:[180,110,0],diskColor1:[225,185,0],diskColor2:[155,115,0],diskColor3:[225,185,10],screenBackground:[25,25,25],screenText:[255,215,0],smallRectColor1:[190,80,0],smallRectColor2:[220,140,0],smallRectColor3:[205,125,0],corniceIntColor1:[40,40,40],corniceIntColor2:[50,50,50],corniceIntColor3:[60,60,60],lightColor1:[255,215,0],lightColor2:[230,185,30],lightColor3:[220,165,60],gradientStart:[255,215,0],gradientEnd:[255,175,10],textColor:[255,215,0],virus1:[255,50,50],virus2:[250,55,50],virus3:[250,50,55],strokeVirus:[235,0,0],additionalCPU1:[110,190,220],additionalCPU2:[60,180,220],additionalCPU3:[70,170,230],strokeaddCPU:[30,130,40],strokeAdditionalCPU:[10,150,240],probability:.13},{background1:[5,6,21],background2:[15,16,41],background3:[155,76,160],squareColor1:[159,74,181],squareColor2:[190,71,162],squareColor3:[246,71,162],rectColor1:[140,220,162],rectColor2:[159,244,181],rectColor3:[58,124,104],diskColor1:[123,36,81],diskColor2:[123,36,81],diskColor3:[123,36,81],screenBackground:[40,25,51],screenText:[79,122,90],smallRectColor1:[40,25,51],smallRectColor2:[246,71,162],smallRectColor3:[58,24,104],corniceIntColor1:[5,6,21],corniceIntColor2:[40,25,51],corniceIntColor3:[58,24,104],lightColor1:[123,36,81],lightColor2:[79,122,90],lightColor3:[58,24,80],gradientStart:[79,122,90],gradientEnd:[159,244,181],textColor:[159,244,181],virus1:[255,255,255],virus2:[255,255,255],virus3:[255,255,255],strokeVirus:[235,0,0],additionalCPU1:[255,255,255],additionalCPU2:[255,255,255],additionalCPU3:[255,255,255],strokeaddCPU:[130,180,210],strokeAdditionalCPU:[30,150,210],probability:.1},{background1:[185,112,25],background2:[92,60,12],background3:[185,112,25],squareColor1:[200,87,11],squareColor2:[202,98,11],squareColor3:[205,119,30],rectColor1:[205,112,25],rectColor2:[205,112,25],rectColor3:[205,112,25],diskColor1:[205,112,25],diskColor2:[205,119,30],diskColor3:[202,98,11],screenBackground:[33,50,42],screenText:[255,112,25],smallRectColor1:[255,154,63],smallRectColor2:[205,112,25],smallRectColor3:[195,119,42],corniceIntColor1:[33,50,42],corniceIntColor2:[22,40,32],corniceIntColor3:[33,52,42],lightColor1:[240,87,11],lightColor2:[252,98,11],lightColor3:[255,119,30],gradientStart:[180,87,11],gradientEnd:[205,112,25],textColor:[205,112,25],virus1:[200,200,200],virus2:[210,210,210],virus3:[180,180,2180],strokeVirus:[235,0,0],additionalCPU1:[120,100,100],additionalCPU2:[100,150,80],additionalCPU3:[150,120,60],strokeaddCPU:[30,130,40],strokeAdditionalCPU:[10,150,40],probability:.18},{name:"allBlack",background1:[10,10,10],background2:[10,10,10],background3:[10,10,10],squareColor1:[0,0,0],squareColor2:[0,0,0],squareColor3:[0,0,0],rectColor1:[0,0,0],rectColor2:[0,0,0],rectColor3:[0,0,0],diskColor1:[0,0,0],diskColor2:[0,0,0],diskColor3:[0,0,0],screenBackground:[0,0,0],screenText:[0,0,0],smallRectColor1:[0,0,0],smallRectColor2:[0,0,0],smallRectColor3:[0,0,0],corniceIntColor1:[0,0,0],corniceIntColor2:[0,0,0],corniceIntColor3:[0,0,0],lightColor1:[0,0,0],lightColor2:[0,0,0],lightColor3:[0,0,0],gradientStart:[0,0,0],gradientEnd:[0,0,0],textColor:[0,0,0],virus1:[0,0,0],virus2:[0,0,0],virus3:[0,0,0],strokeVirus:[235,0,0],additionalCPU1:[0,0,0],additionalCPU2:[0,0,0],additionalCPU3:[0,0,0],strokeaddCPU:[0,0,0],strokeAdditionalCPU:[10,150,40],probability:.01},{background1:[69,83,110],background2:[36,64,84],background3:[69,83,109],squareColor1:[188,205,211],squareColor2:[193,207,220],squareColor3:[166,184,194],rectColor1:[147,167,186],rectColor2:[102,124,153],rectColor3:[117,139,168],diskColor1:[102,126,153],diskColor2:[125,142,168],diskColor3:[117,139,168],screenBackground:[69,83,109],screenText:[206,212,224],smallRectColor1:[193,207,220],smallRectColor2:[166,184,194],smallRectColor3:[147,167,186],corniceIntColor1:[122,144,173],corniceIntColor2:[117,139,168],corniceIntColor3:[102,126,153],lightColor1:[188,205,211],lightColor2:[166,184,194],lightColor3:[147,167,186],gradientStart:[236,247,251],gradientEnd:[255,255,255],textColor:[36,64,84],virus1:[250,160,160],virus2:[250,170,170],virus3:[250,180,180],strokeVirus:[255,120,140],additionalCPU1:[160,230,160],additionalCPU2:[180,123084,180],additionalCPU3:[200,230,200],strokeAdditionalCPU:[140,230,140],probability:.09}],lightProfiles=[{width:50,height:60,animationSpeed:10,rows:2,cols:3,horizontalSpacing:170,verticalSpacing:40,density:4,probability:.99},{width:26,height:15,animationSpeed:10,rows:4,cols:6,horizontalSpacing:100,verticalSpacing:15,density:4,probability:.25},{width:20,height:15,animationSpeed:10,rows:5,cols:7,horizontalSpacing:70,verticalSpacing:10,density:4,probability:.25},{width:50,height:25,animationSpeed:10,rows:3,cols:4,horizontalSpacing:150,verticalSpacing:20,density:4,probability:.25},{width:50,height:40,animationSpeed:10,rows:3,cols:4,horizontalSpacing:150,verticalSpacing:20,density:4,probability:.25}],rectProfiles=[{count:2,probability:.65}],ssdProfiles=[{count:9,width:20,height:30,lineSpacing:10,rectAngle:0,ssdRotation:0,animationSpeed:.1,rows:3,columns:3,spacing:120,ordered:!0,probability:.1},{count:2,width:90,height:80,lineSpacing:10,rectAngle:0,ssdRotation:90,animationSpeed:.1,rows:1,columns:1,spacing:50,ordered:!0,probability:.1},{count:2,width:90,height:80,lineSpacing:10,rectAngle:0,ssdRotation:0,animationSpeed:.1,rows:1,columns:2,spacing:50,ordered:!0,probability:.1},{count:6,width:40,height:60,lineSpacing:10,rectAngle:0,ssdRotation:0,animationSpeed:.1,rows:3,columns:2,spacing:50,ordered:!0,probability:.12},{count:6,width:60,height:60,lineSpacing:10,rectAngle:0,ssdRotation:0,animationSpeed:.1,rows:2,columns:3,spacing:50,ordered:!0,probability:.12},{count:6,width:45,height:60,lineSpacing:10,rectAngle:0,ssdRotation:90,animationSpeed:.1,rows:3,columns:2,spacing:50,ordered:!0,probability:.12},{count:3,width:50,height:40,lineSpacing:10,rectAngle:0,ssdRotation:0,animationSpeed:.1,rows:2,columns:3,spacing:100,ordered:!0,probability:.12},{count:3,width:50,height:40,lineSpacing:10,rectAngle:0,ssdRotation:90,animationSpeed:.1,rows:2,columns:3,spacing:80,ordered:!0,probability:.12}],rectAltProfiles=[{count:4,width:220,height:45,spacing:30,animationSpeed:.03,rotation:0,probability:.1},{count:6,width:250,height:35,spacing:20,animationSpeed:.03,rotation:0,probability:.1},{count:3,width:300,height:20,spacing:40,animationSpeed:.01,rotation:0,probability:.1},{count:5,width:220,height:25,spacing:35,animationSpeed:.04,rotation:0,probability:.15},{count:4,width:220,height:45,spacing:30,animationSpeed:.03,rotation:270,probability:.1},{count:6,width:250,height:35,spacing:20,animationSpeed:.03,rotation:270,probability:.1},{count:3,width:300,height:20,spacing:40,animationSpeed:.01,rotation:270,probability:.1},{count:5,width:220,height:25,spacing:35,animationSpeed:.04,rotation:270,probability:.15},{count:10,width:160,height:20,spacing:20,animationSpeed:.03,rotation:0,probability:.05},{count:10,width:160,height:20,spacing:20,animationSpeed:.03,rotation:270,probability:.05}],textProfiles=[{type:"binary",characters:"01",probability:.4},{type:"zeros",characters:"0",probability:.2},{type:"ascii",characters:"!@#$%^&*()_+[]{}|;:,.<>?/~",probability:.2},{type:"alphanumeric",characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",probability:.2}],corniceProfiles=[{type:"fourSquares",probability:.15},{type:"default",probability:.7},{type:"diagonalStrip",probability:.15}],screenProfiles=[{width:350,height:200,textSize:10,probability:.99},{width:220,height:140,textSize:14,probability:.00993},{width:300,height:150,textSize:24,probability:.0099}];function hashToSeed(e){let o=0;for(let t=0;t<e.length;t++){o=(16*o+e.charCodeAt(t))%2147483647}return o}let hdssd,smallRects=[],lights=[],smallRectProfiles=[{type:"ordered",count:6,width:100,height:35,rows:3,cols:2,horizontalSpacing:55,verticalSpacing:40,probability:.15},{type:"ordered",count:2,width:190,height:60,rows:2,cols:1,horizontalSpacing:55,verticalSpacing:40,probability:.15},{type:"ordered",count:2,width:190,height:60,rows:2,cols:1,horizontalSpacing:55,verticalSpacing:40,probability:.1},{type:"ordered",count:8,width:130,height:40,rows:4,cols:2,horizontalSpacing:55,verticalSpacing:40,probability:.15},{type:"ordered",count:8,width:60,height:20,rows:4,cols:2,horizontalSpacing:35,verticalSpacing:30,probability:.15},{type:"ordered",count:4,width:80,height:30,rows:2,cols:2,horizontalSpacing:55,verticalSpacing:20,probability:.15},{type:"ordered",count:6,width:40,height:20,rows:2,cols:3,horizontalSpacing:45,verticalSpacing:10,probability:.15}];function setup(){createCanvas(canvasSize,canvasSize),frameRate(30),txnhash.length<60&&generateScreenPosition();let e=hashToSeed(txnhash);if(randomSeed(e),speedFactor=random(1,10),baseSpeed=random(1,10),selectedProfile=selectProfile(),selectedAnimationSize=selectAnimationSize(),selectedBackgroundProfile=selectBackgroundProfile(),selectedColorProfile=selectColorProfile(),selectedCorniceProfile=selectCorniceProfile(),selectedRectAltProfile=selectRectAltProfile(),selectedTextProfile=selectTextProfile(),selectedScreenProfile=selectScreenProfile(),selectedQuanticProfile=selectQuanticProfile(),selectedDisquanticProfile=selectDisquanticProfile(),selectedPowerupProfile=selectPowerupProfile(),selectedCapacitorProfile=selectCapacitorProfile(),selectedRectType=selectRectOrSmallRect(),selectedDiskType=selectDiskOrSSD(),useQuantic=random()<.5,offsetX=random(.1*canvasSize,canvasSize-selectedAnimationSize-.1*canvasSize),offsetY=random(.1*canvasSize,canvasSize-selectedAnimationSize-.1*canvasSize),"none"!==selectedProfile.type&&(selectedProfile.squareSize=selectedAnimationSize/selectedProfile.cols),"none"===selectedProfile.type){quanticCenterX=random(.35*canvasSize,.65*canvasSize),quanticCenterY=random(.35*canvasSize,.65*canvasSize);for(let e=0;e<10;e++)quanticRects.push({width:random(50,150),height:random(50,150),angle:random(0,TWO_PI)})}let o=2*rectMaxSize,t=rectMaxSize/4*3;do{rectX=random(0,canvasSize-o),rectY=random(0,canvasSize-t)}while(isInsideSquareArea(rectX,rectY,o,t));generateScreenPosition(),generateDiskPosition(),generateSmallRects(),generateLights(),generateHdssd(),generateCapacitors(),selectedDiskProfile=selectDiskProfile(),diskRadius=selectedDiskProfile.radius,diskRotationSpeed=selectedDiskProfile.rotationSpeed,diskAngle=selectedDiskProfile.angle,diskCircles=selectedDiskProfile.circles||0,generateRectAltPosition(),selectedDataTextProfile=selectDataTextProfile(),showDataText=random()<selectedDataTextProfile.probability,powerupX1=random(.1*canvasSize,canvasSize-.1*canvasSize),powerupY1=random(.1*canvasSize,canvasSize-.1*canvasSize),powerupX2=random(.1*canvasSize,canvasSize-.1*canvasSize),powerupY2=random(.1*canvasSize,canvasSize-.1*canvasSize),nextDataTextToggleTime=millis()+random(1e3,3e3)}function draw(){if(txnhash.length<60)placeholderFunction(),drawGlitchText("generating",placeholderScreenX+placeholderScreenWidth/2,placeholderScreenY+placeholderScreenHeight/2);else{if("dynamic"===selectedBackgroundProfile.type){let e=updateDynamicBackgroundColors();background(e)}else if("gradient"===selectedBackgroundProfile.type){let e=selectedColorProfile.background1,o=selectedColorProfile.background2;setGradient(0,0,width,height,e,o)}else"diagonal"===selectedBackgroundProfile.type&&drawDiagonalBackground(selectedColorProfile);if(drawCorniceInt(),drawCapacitors(),dataTextVisible&&drawDataText(),drawHdssd(),rectAlt(),drawLights(),selectedProfile&&"none"!==selectedProfile.type){let e=selectedProfile.squareSize+5,o=selectedProfile.squareSize+5,t=selectedProfile.cols,r=selectedProfile.rows;for(let l=0;l<t;l++)for(let t=0;t<r;t++){drawGroup(offsetX+l*e+random(-1,1),offsetY+t*o+random(-1,1),selectedProfile.squareSize)}}else selectedProfile&&"none"===selectedProfile.type&&(useQuantic?drawQuantic():drawDisquantic());if("rect"===selectedRectType?drawAnimatedRectangle():"smallRect"===selectedRectType&&drawSmallRects(),"disk"===selectedDiskType?drawDisk():"SSD"===selectedDiskType&&drawHdssd(),drawScreen(),millis()>nextDataTextToggleTime&&(toggleDataTextVisibility(),nextDataTextToggleTime=millis()+random(1e3,3e3)),powerup&&drawPowerup(),powerup&&"overclock"===selectedPowerupProfile.type)for(let e=0;e<3;e++){let o=random(-selectedPowerupProfile.maxOffset,selectedPowerupProfile.maxOffset),t=random(-selectedPowerupProfile.maxOffset,selectedPowerupProfile.maxOffset),r=255,l=0,i=0,a=5+10*e;blendMode(OVERLAY),fill(r,l,i,a),noStroke(),rect(o,t,1.2*width,1.2*height),blendMode(BLEND)}}}function selectRectOrSmallRect(){return random(1)<rectPercentage?"rect":"smallRect"}function selectDiskOrSSD(){return random(1)<diskPercentage?"disk":"SSD"}function selectProfile(){let e=[{rows:2,cols:2,probability:.2},{rows:3,cols:3,probability:.2},{rows:4,cols:4,probability:.2},{rows:8,cols:8,probability:.2},{rows:10,cols:10,probability:.2}],o=random(1),t=0;for(let r of e)if(t+=r.probability,o<t)return r;return e[0]}function selectScreenProfile(){let e=random(1),o=0;for(let t of screenProfiles)if(o+=t.probability,e<o)return t;return screenProfiles[0]}function selectCorniceProfile(){let e=random(1),o=0;for(let t of corniceProfiles)if(o+=t.probability,e<o)return t;return corniceProfiles[0]}function selectDisquanticProfile(){let e=random(1),o=0;for(let t of disquanticProfiles)if(o+=t.probability,e<o)return t;return disquanticProfiles[0]}function selectDiskProfile(){let e=random(1),o=0;for(let t of diskProfiles)if(o+=t.probability,e<o)return t;return diskProfiles[0]}function selectSsdProfile(){let e=random(1),o=0;for(let t of ssdProfiles)if(o+=t.probability,e<o)return t;return ssdProfiles[0]}function selectTextProfile(){let e=random(1),o=0;for(let t of textProfiles)if(o+=t.probability,e<o)return t;return textProfiles[0]}function selectQuanticProfile(){let e=random(1),o=0;for(let t of quanticProfiles)if(o+=t.probability,e<o)return t;return quanticProfiles[0]}function selectLightProfile(){let e=random(1),o=0;for(let t of lightProfiles)if(o+=t.probability,e<o)return t;return lightProfiles[0]}function selectRectAltProfile(){let e=random(1),o=0;for(let t of rectAltProfiles)if(o+=t.probability,e<o)return t;return rectAltProfiles[0]}function drawDiagonalBackground(e){background(0);let o=e.background3;stroke(o),strokeWeight(1);for(let e=0;e<width;e+=10)for(let o=0;o<height;o+=10)line(e,o,e+10,o+10)}function drawGroup(e,o,t){let r=[selectedColorProfile.squareColor1,selectedColorProfile.squareColor2,selectedColorProfile.squareColor3];drawParallelLines(e,o,t,r),push();let l=random(-5,5),i=random(-7,7);translate(l,l),drawVerticalLines(e,o,t,r),pop(),push(),translate(i,i),drawHorizontalLines(e,o,t,r),pop()}function drawParallelLines(e,o,t,r){let l=getHeatColor(dynamo),i=map(dynamo,1,10,0,8),a=map(dynamo,1,10,1,4);stroke(l.levels[0],l.levels[1],l.levels[2],alphaValue/2),strokeWeight(a),line(e-i,o-i,e+t+i,o-i),line(e-i,o+t+i,e+t+i,o+t+i),line(e-i,o-i,e-i,o+t+i),line(e+t+i,o-i,e+t+i,o+t+i),strokeWeight(1);for(let l=0;l<t;l+=2)stroke(r[1][0],r[1][1],r[1][2],alphaValue),line(e,o+l,e+t,o+l)}function drawVerticalLines(e,o,t,r){let l=getHeatColor(dynamo),i=map(dynamo,1,10,0,10);stroke(l.levels[0],l.levels[1],l.levels[2],alphaValue/2),strokeWeight(1),line(e-i,o-i,e-i,o+t+i),line(e+t+i,o-i,e+t+i,o+t+i);for(let l=0;l<t;l+=2)stroke(r[2][0],r[2][1],r[2][2],alphaValue),line(e+l,o,e+l,o+t)}function drawHorizontalLines(e,o,t,r){let l=getHeatColor(dynamo),i=map(dynamo,1,10,0,10);stroke(l.levels[0],l.levels[1],l.levels[2],alphaValue/2),strokeWeight(1),line(e-i,o-i,e+t+i,o-i),line(e-i,o+t+i,e+t+i,o+t+i);for(let l=0;l<t;l+=2)stroke(r[0][0],r[0][1],r[0][2],alphaValue),line(e,o+l,e+t,o+l)}function setGradient(e,o,t,r,l,i){noFill();for(let a=o;a<=o+r;a++){let n=map(a,o,o+r,0,1),s=lerpColor(color(l),color(i),n);stroke(s),line(e,a,e+t,a)}}function drawAnimatedRectangle(){selectedRectProfile=selectRectangleProfile();let e=selectedRectProfile.count,o=.5*sin(.1*frameCount)+.5,t=rectSize+o*(rectMaxSize-rectSize),r=rectSize/4,l=spRam*(1+.05*dynamo),i=100*sin(frameCount*l);for(let o=0;o<e;o++){drawRectGroup(rectX+i,rectY+o*(r+20),2*t,3*r)}}function isInsideSquareArea(e,o,t,r){let l=selectedProfile.squareSize+5,i=selectedProfile.squareSize+5,a=selectedProfile.cols*l,n=selectedProfile.rows*i;return e<offsetX+a&&e+t>offsetX&&o<offsetY+n&&o+r>offsetY}function isInsideRectArea(e,o,t,r){return e<rectX+2*rectMaxSize&&e+t>rectX&&o<rectY+rectMaxSize/4*3&&o+r>rectY}function drawRectGroup(e,o,t,r){let l=[selectedColorProfile.rectColor1,selectedColorProfile.rectColor2,selectedColorProfile.rectColor3];drawRectParallelLines(e,o,t,r,l),push();let i=random(-5,5),a=random(-7,7);translate(i,i),drawRectVerticalLines(e,o,t,r,l),pop(),push(),translate(a,a),drawRectHorizontalLines(e,o,t,r,l),pop()}function drawRectParallelLines(e,o,t,r,l){let i=getHeatColor(dynamo),a=map(dynamo,1,10,0,10),n=map(dynamo,1,10,1,3);stroke(i.levels[0],i.levels[1],i.levels[2],alphaValue/2),strokeWeight(n),line(e-a,o-a,e+t+a,o-a),line(e-a,o+r+a,e+t+a,o+r+a),line(e-a,o-a,e-a,o+r+a),line(e+t+a,o-a,e+t+a,o+r+a);for(let i=0;i<r;i+=2)stroke(l[1][0],l[1][1],l[1][2],alphaValue),line(e,o+i,e+t,o+i);for(let i=0;i<t;i+=2)stroke(l[2][0],l[2][1],l[2][2],alphaValue),line(e+i,o,e+i,o+r)}function drawRectVerticalLines(e,o,t,r,l){let i=getHeatColor(dynamo),a=map(dynamo,1,10,0,10),n=map(dynamo,1,10,1,3);stroke(i.levels[0],i.levels[1],i.levels[2],alphaValue/2),strokeWeight(n),line(e-a,o-a,e-a,o+r+a),line(e+t+a,o-a,e+t+a,o+r+a);for(let i=0;i<t;i+=2)stroke(l[2][0],l[2][1],l[2][2],alphaValue),line(e+i,o,e+i,o+r)}function drawRectHorizontalLines(e,o,t,r,l){let i=getHeatColor(dynamo),a=map(dynamo,1,10,0,10),n=map(dynamo,1,10,1,3);stroke(i.levels[0],i.levels[1],i.levels[2],alphaValue/2),strokeWeight(n),line(e-a,o-a,e+t+a,o-a),line(e-a,o+r+a,e+t+a,o+r+a);for(let i=0;i<r;i+=2)stroke(l[0][0],l[0][1],l[0][2],alphaValue),line(e,o+i,e+t,o+i)}function generateScreenPosition(){let e=.3*canvasSize,o=.1*canvasSize;do{screenX=random(o,canvasSize-e-selectedScreenProfile.width),screenY=random(o,canvasSize-e-selectedScreenProfile.height)}while(isInsideSquareArea(screenX,screenY,selectedScreenProfile.width,selectedScreenProfile.height)||isInsideRectArea(screenX,screenY,selectedScreenProfile.width,selectedScreenProfile.height))}function generateIncomprehensibleText(e,o,t){let r=selectedTextProfile.characters,l=floor(map(dynamo,1,10,10,30)),i=floor(map(dynamo,1,10,1,5)),a="";for(let e=0;e<i;e++){let e="";for(let o=0;o<l;o++)random()>.3?e+=r.charAt(floor(random(r.length))):e+=" ";a+=e+"\n"}return a}function drawScreen(){let e=selectedColorProfile.screenBackground,o=selectedColorProfile.screenText;drawRectParallelLines(screenX,screenY,selectedScreenProfile.width,selectedScreenProfile.height,[e,e,e]),push();let t=random(-5,5),r=random(-7,7);translate(t,t),drawRectVerticalLines(screenX,screenY,selectedScreenProfile.width,selectedScreenProfile.height,[e,e,e]),pop(),push(),translate(r,r),drawRectHorizontalLines(screenX,screenY,selectedScreenProfile.width,selectedScreenProfile.height,[e,e,e]),pop();let l=.1*min(selectedScreenProfile.width,selectedScreenProfile.height),i=generateIncomprehensibleText(selectedScreenProfile.width,selectedScreenProfile.height,l);fill(o[0],o[1],o[2],alphaValue),textFont("Courier New"),textSize(l),textAlign(CENTER,CENTER),text(i,screenX+selectedScreenProfile.width/2,screenY+selectedScreenProfile.height/2)}function generateDiskPosition(){do{diskX=random(diskRadius,canvasSize-diskRadius),diskY=random(diskRadius,canvasSize-diskRadius)}while(isInsideSquareArea(diskX-diskRadius,diskY-diskRadius,2*diskRadius,2*diskRadius)||isInsideRectArea(diskX-diskRadius,diskY-diskRadius,2*diskRadius,2*diskRadius))}function drawDisk(){"original"===selectedDiskProfile.type?drawOriginalDisk():"new"===selectedDiskProfile.type&&drawNewDisk()}function drawOriginalDisk(){let e=[selectedColorProfile.diskColor1,selectedColorProfile.diskColor2,selectedColorProfile.diskColor3];push(),translate(diskX,diskY),drawDiskLayer(diskRadius,e[0],diskAngle,PI/4,1,diskCircles),drawDiskLayer(.8*diskRadius,e[1],1.2*diskAngle,-PI/4,1+speedFactor*dynamo,diskCircles),drawDiskLayer(.6*diskRadius,e[2],1.5*diskAngle,PI/4,1+2*speedFactor*dynamo,diskCircles),pop(),diskAngle+=.01*baseSpeed*dynamo}function drawNewDisk(){let e=selectedDiskProfile.numCircles||floor(random(2,4)),o=[selectedColorProfile.diskColor1,selectedColorProfile.diskColor2,selectedColorProfile.diskColor3],t=selectedDiskProfile.circleRotationSpeed||.01,r=selectedDiskProfile.circleThickness||5,l=r+(selectedDiskProfile.circleSpacing||10);push(),translate(diskX,diskY);for(let i=0;i<e;i++){let e=l*(i+1),a=diskAngle*(i+1)*(t*sqrt(dynamo));drawIncompleteCircle(e,r,o[i%o.length],a)}for(let i=0;i<e;i++){let e=l*(i+1)*.7,a=diskAngle*(i+1)*(t*sqrt(dynamo)*2);drawPartialCircle(e,r,o[i%o.length],a)}pop(),diskAngle+=.01*baseSpeed*sqrt(dynamo)}function drawIncompleteCircle(e,o,t,r){stroke(t[0],t[1],t[2],alphaValue),noFill(),strokeWeight(o);let l=r,i=l+PI/3;for(let o=0;o<5;o++)arc(0,0,2*e,2*e,l+o*PI/2,i+o*PI/2)}function drawMovingCircles(e,o,t,r){stroke(o[0],o[1],o[2],alphaValue),noFill(),strokeWeight(2);let l=t+TWO_PI*r;arc(0,0,2*e,2*e,t,l)}function drawPartialCircle(e,o,t,r){let l=getHeatColor(dynamo),i=map(dynamo,1,10,10,20),a=map(dynamo,1,10,.5,15),n=r,s=n+.8*PI;stroke(l.levels[0],l.levels[1],l.levels[2],alphaValue/2),strokeWeight(a),arc(0,0,3*e+i,3*e+i,n,s),stroke(t[0],t[1],t[2],alphaValue),strokeWeight(o),arc(0,0,2*e,2*e,n,s)}function drawDiskLayer(e,o,t,r,l,i){push(),rotate(t),fill(o[0],o[1],o[2],alphaValue);let a=TWO_PI/i;for(let t=0;t<i;t++){drawRotatedRect(cos(t*a)*e,sin(t*a)*e,.1*e,.05*e,r,o)}for(let t=.45*e;t<e;t+=.1*e)for(let e=0;e<i;e++){drawRotatedRect(cos(e*a)*t,sin(e*a)*t,.1*t,.05*t,r,o)}pop()}function drawRotatedRect(e,o,t,r,l,i){let a=getHeatColor(dynamo),n=map(dynamo,1,10,0,10),s=map(dynamo,1,10,1,3);push(),translate(e,o),rotate(l),rectMode(CENTER),stroke(a.levels[0],a.levels[1],a.levels[2],alphaValue/2),strokeWeight(s),noFill(),rect(-n,-n,t+2*n,r+2*n),noStroke(),fill(i[0],i[1],i[2],alphaValue),rect(0,0,t,r/2),pop()}function selectProfile(){let e=random(1),o=0;for(let t of profiles)if(o+=t.probability,e<o)return t;return profiles[0]}function selectAnimationSize(){let e=random(1),o=0;for(let t of animationSizes)if(o+=t.probability,e<o)return t.size;return animationSizes[0].size}function selectBackgroundProfile(){let e=random(1),o=0;for(let t of backgroundProfiles)if(o+=t.probability,e<o)return t;return backgroundProfiles[0]}function selectRectangleProfile(){let e=random(1),o=0;for(let t of rectProfiles)if(o+=t.probability,e<o)return t;return rectProfiles[0]}function selectColorProfile(){let e=random(1),o=0;for(let t of colorProfiles)if(o+=t.probability,e<o)return t;return colorProfiles[0]}function selectSmallRectProfile(){let e=random(1),o=0;for(let t of smallRectProfiles)if(o+=t.probability,e<o)return t;return smallRectProfiles[0]}function generateSmallRects(){smallRects=[];let e=selectSmallRectProfile(),o=e.width,t=e.height,r=o*map(dynamo,1,10,1,2),l=t*map(dynamo,1,10,1,2);if("ordered"===e.type){let o,t,i=e.cols*(r+e.horizontalSpacing)-e.horizontalSpacing,a=e.rows*(l+e.verticalSpacing)-e.verticalSpacing;do{o=random(0,canvasSize-i),t=random(0,canvasSize-a)}while(isInsideSquareArea(o,t,i,a)||isInsideRectArea(o,t,i,a));for(let i=0;i<e.rows;i++)for(let a=0;a<e.cols;a++){if(i*e.cols+a>=e.count)break;let n=o+a*(r+e.horizontalSpacing),s=t+i*(l+e.verticalSpacing);smallRects.push({x:n,y:s,initialX:n,width:r,height:l,colors:[selectedColorProfile.smallRectColor1,selectedColorProfile.smallRectColor2,selectedColorProfile.smallRectColor3]})}}else if("disordered"===e.type)for(let o=0;o<e.count;o++){let e,o;do{e=random(0,canvasSize-r),o=random(0,canvasSize-l)}while(isInsideSquareArea(e,o,r,l)||isInsideRectArea(e,o,r,l));smallRects.push({x:e,y:o,initialX:e,width:r,height:l,colors:[selectedColorProfile.smallRectColor1,selectedColorProfile.smallRectColor2,selectedColorProfile.smallRectColor3]})}}function drawSmallRects(){for(let e of smallRects){let{x:o,y:t,width:r,height:l,initialX:i,colors:a}=e,n=map(dynamo,1,10,.1,.35),s=map(dynamo,1,10,10,50),c=sin(frameCount*n)*s,d=sin(frameCount*n+PI/4)*s,p=sin(frameCount*n+PI/2)*s;drawSmallRectParallelLines(o+c,t,r,l,a[0]),drawSmallRectParallelLines(o+d,t,r,l,a[1]),drawSmallRectParallelLines(o+p,t,r,l,a[2])}}function drawSmallRectParallelLines(e,o,t,r,l){let i=getHeatColor(dynamo),a=map(dynamo,1,10,0,10),n=map(dynamo,1,10,1,2.5);stroke(i.levels[0],i.levels[1],i.levels[2],alphaValue/2),strokeWeight(n),line(e-a,o-a,e+t+a,o-a),line(e-a,o+r+a,e+t+a,o+r+a),line(e-a,o-a,e-a,o+r+a),line(e+t+a,o-a,e+t+a,o+r+a),strokeWeight(1);for(let i=0;i<r;i+=2)stroke(l[0],l[1],l[2],alphaValue),line(e,o+i,e+t,o+i)}function generateLights(){lights=[],selectedLightProfile=selectLightProfile();let e,o,{rows:t,cols:r,width:l,height:i,horizontalSpacing:a,verticalSpacing:n,animationSpeed:s}=selectedLightProfile,c=.3*canvasSize;do{e=random(0,canvasSize-r*(l+a)),o=random(1)<.5?random(0,(canvasSize-c)/2-t*(i+n)):random((canvasSize+c)/2,canvasSize-t*(i+n))}while(isInsideSquareArea(e,o,r*(l+a),t*(i+n))||isInsideRectArea(e,o,r*(l+a),t*(i+n)));for(let c=0;c<t;c++)for(let t=0;t<r;t++){let r=e+t*(l+a),d=o+c*(i+n);lights.push({x:r,y:d,initialX:r,colors:[selectedColorProfile.lightColor1,selectedColorProfile.lightColor2,selectedColorProfile.lightColor3],lastSwitchTime:millis(),width:l,height:i,density:selectedLightProfile.density,animationSpeed:s})}}let lastSwitchTimeGlobal=0;function drawLights(){let e=millis();if(e-lastSwitchTimeGlobal>100/dynamo){for(let e of lights)e.colors.push(e.colors.shift());lastSwitchTimeGlobal=e}for(let o of lights){let{x:t,y:r,colors:l,width:i,height:a,density:n,animationSpeed:s}=o,c=s*dynamo,d=map(dynamo,1,10,1,1.3),p=i*d,u=a*d;drawLightShadows(t,r,p,u,e,c);let f=0;for(let e of l)drawLightParallelLines(t+f,r,p,u,e,n),f+=p}}function drawLightShadows(e,o,t,r,l,i){let a=getHeatColor(dynamo),n=map(dynamo,1,10,0,10),s=map(dynamo,1,10,1,3),c=1e4/i,d=e+2.2*t*(1-l%c/c);stroke(a.levels[0],a.levels[1],a.levels[2],alphaValue/2),strokeWeight(s);let p=t;line(d,o-n-3,d+p,o-n-3),line(d,o+r+n+1,d+p,o+r+n+1)}function drawLightParallelLines(e,o,t,r,l,i){fill(l[0],l[1],l[2],alphaValue),noStroke();for(let a=0;a<r;a+=i)stroke(l[0],l[1],l[2],alphaValue),line(e,o+a,e+t,o+a)}function drawCorniceInt(){let e=[selectedColorProfile.corniceIntColor1,selectedColorProfile.corniceIntColor2,selectedColorProfile.corniceIntColor3];if("fourSquares"===selectedCorniceProfile.type)drawFourSquaresCornice(e);else if("diagonalStrip"===selectedCorniceProfile.type)drawDiagonalStripCornice(e);else{let o=.9*canvasSize,t=.9*canvasSize,r=(canvasSize-o)/2,l=(canvasSize-t)/2;drawCorniceParallelLines(r,l,o,t,e),push(),translate(random(-5,5),random(-5,5)),drawCorniceVerticalLines(r,l,o,t,e),pop(),push(),translate(random(-5,5),random(-5,5)),drawCorniceHorizontalLines(r,l,o,t,e),pop()}}function drawDiagonalStripCornice(e){let o,t,r=.3*canvasSize,l=floor(canvasSize/(r+20))+1,i=floor(canvasSize/(r+20))+1,a=[e[1][0],e[1][1],e[1][2],150],n=[e[2][0],e[2][1],e[2][2],150],s=[e[0][0],e[0][1],e[0][2],150],c=random(-5,5),d=random(-5,5);for(let e=0;e<l;e++)for(let l=0;l<i;l++){let i=e*(r+20)+c,p=l*(r+20)+d;o=random(-5,5),t=random(-5,5),drawParallelLinesOptimized(i,p,r,a),push(),translate(o,t),drawVerticalLinesOptimized(i,p,r,n),drawHorizontalLinesOptimized(i,p,r,s),pop()}}function drawParallelLinesOptimized(e,o,t,r){stroke(r[0],r[1],r[2],r[3]);for(let r=0;r<t;r+=4)line(e,o+r,e+t,o+r)}function drawVerticalLinesOptimized(e,o,t,r){stroke(r[0],r[1],r[2],r[3]);for(let r=0;r<t;r+=4)line(e+r,o,e+r,o+t)}function drawHorizontalLinesOptimized(e,o,t,r){stroke(r[0],r[1],r[2],r[3]);for(let r=0;r<t;r+=4)line(e,o+r,e+t,o+r)}function drawFourSquaresCornice(e){let o=.45*canvasSize,t=[{x:0,y:0},{x:canvasSize-o,y:0},{x:0,y:canvasSize-o},{x:canvasSize-o,y:canvasSize-o}];for(let r of t)drawCorniceParallelLines(r.x,r.y,o,o,e),push(),translate(random(-5,5),random(-5,5)),drawCorniceVerticalLines(r.x,r.y,o,o,e),pop(),push(),translate(random(-5,5),random(-5,5)),drawCorniceHorizontalLines(r.x,r.y,o,o,e),pop()}function drawCorniceParallelLines(e,o,t,r,l){for(let i=0;i<r;i+=2)stroke(l[1][0],l[1][1],l[1][2],150),line(e,o+i,e+t,o+i);for(let i=0;i<t;i+=2)stroke(l[2][0],l[2][1],l[2][2],150),line(e+i,o,e+i,o+r)}function drawCorniceVerticalLines(e,o,t,r,l){for(let i=0;i<t;i+=2)stroke(l[2][0],l[2][1],l[2][2],150),line(e+i,o,e+i,o+r)}function drawCorniceHorizontalLines(e,o,t,r,l){for(let i=0;i<r;i+=2)stroke(l[0][0],l[0][1],l[0][2],150),line(e,o+i,e+t,o+i)}function generateHdssd(){let e=selectSsdProfile();hdssd=[];let o=e.columns,t=e.rows,r=e.spacing,l=e.width,i=e.height,a=.3*canvasSize;if(e.ordered){let n=random(0,canvasSize-(o*(l+r)-r)),s=random((canvasSize-a)/2,(canvasSize+a)/2-(t*(i+r)-r));for(let t=0;t<e.count;t++){let a=n+t%o*(l+r),c=s+floor(t/o)*(i+r);isOverlapping(a,c,l,i)||hdssd.push({x:a,y:c,width:l,height:i,lineSpacing:e.lineSpacing,rectAngle:e.rectAngle,ssdRotation:e.ssdRotation,animationSpeed:e.animationSpeed,colors:[selectedColorProfile.rectColor1,selectedColorProfile.rectColor2,selectedColorProfile.rectColor3]})}}else for(let o=0;o<e.count;o++){let o,t;do{o=random(0,canvasSize-l),t=random((canvasSize-a)/2,(canvasSize+a)/2-i)}while(isOverlapping(o,t,l,i));hdssd.push({x:o,y:t,width:l,height:i,lineSpacing:e.lineSpacing,rectAngle:e.rectAngle,ssdRotation:e.ssdRotation,animationSpeed:e.animationSpeed,colors:[selectedColorProfile.rectColor1,selectedColorProfile.rectColor2,selectedColorProfile.rectColor3]})}}function isOverlapping(e,o,t,r){if(isInsideSquareArea(e,o,t,r)||isInsideRectArea(e,o,t,r))return!0;for(let l of hdssd)if(e<l.x+l.width&&e+t>l.x&&o<l.y+l.height&&o+r>l.y)return!0;return!1}function drawHdssd(){if(!hdssd)return;let e=millis();for(let o of hdssd){let{x:t,y:r,width:l,height:i,colors:a,rectAngle:n,ssdRotation:s,animationSpeed:c}=o,d=20*dynamo,p=.001,u=sin(e*p*c+d)*l/2,f=sin(e*p*c+d+PI/4)*l/2,m=sin(e*p*c+d+PI/2)*l/2,h=40*sin(e*p+u),g=40*sin(e*p+f),C=40*sin(e*p+m);push(),translate(t+l/2,r+i/2),rotate(radians(s)),drawHdssdLayer(-l/2+h,-i/2,l,i,a[0],u,n,-6),drawHdssdLayer(-l/2+g,-i/2,l,i,a[1],f,n,3),drawHdssdLayer(-l/2+C,-i/2,l,i,a[2],m,n,-5),pop()}}function drawHdssdLayer(e,o,t,r,l,i,a,n){let s=getHeatColor(dynamo),c=map(dynamo,1,10,3,13),d=map(dynamo,1,10,1,5),p=map(dynamo,1,10,1,3),u=map(dynamo,1,10,10,40);millis();for(let f=-t;f<t;f+=5){let t=e+f+i+n,m=o,h=sin(.1*frameCount+f)*u;stroke(s.levels[0],s.levels[1],s.levels[2],alphaValue/2),strokeWeight(d),noFill(),line(t-c+h,m-c,t+p+c+h,m-c),line(t-c+h,m+r+c,t+p+c+h,m+r+c),fill(l[0],l[1],l[2],alphaValue),noStroke(),push(),translate(t+h,m),rotate(radians(a)),rect(0,0,p,r),pop()}}function rectAlt(){let e=selectedRectAltProfile;push(),translate(rectAltX+e.width/2,rectAltY+e.count*(e.height+e.spacing)/2),rotate(radians(e.rotation)),translate(-(rectAltX+e.width/2),-(rectAltY+e.count*(e.height+e.spacing)/2));for(let o=0;o<e.count;o++){let t=rectAltY+o*(e.height+e.spacing);drawRamRect(rectAltX,t,e.width,e.height,e.animationSpeed,o)}pop()}function drawRamRect(e,o,t,r,l,i){let a=[selectedColorProfile.rectColor1,selectedColorProfile.rectColor2,selectedColorProfile.rectColor3],n=.5*sin(.1*frameCount)+.5,s=t*(1+.1*n),c=r*(1+.1*n);drawRectShadow(e,o,s,c);for(let t=0;t<3;t++){let r=s*((sin(frameCount*l*dynamo*(t+1)+i*PI/2)+1)/2);fill(a[t][0],a[t][1],a[t][2],alphaValue/4),noStroke(),rect(e,o,r,c)}}function drawRectShadow(e,o,t,r){let l=getHeatColor(dynamo),i=map(dynamo,1,10,0,4),a=map(dynamo,1,10,1,3);stroke(l.levels[0],l.levels[1],l.levels[2],alphaValue/2),strokeWeight(a),noFill(),rect(e-i,o-i,t+2*i,r+2*i)}function isInsideCornice(e,o,t,r,l,i){let a=.1*canvasSize;return e>=a&&o>=a&&e+t<=canvasSize-a&&o+l*(r+i)<=canvasSize-a}function generateRectAltPosition(){let e=selectedRectAltProfile,o=.1*canvasSize;random(0,1)<.5?rectAltX=random(o,.35*canvasSize-e.width):rectAltX=random(.65*canvasSize,canvasSize-o-e.width),random(0,1)<.5?rectAltY=random(o,.35*canvasSize-(e.count*e.height+(e.count-1)*e.spacing)):rectAltY=random(.65*canvasSize-(e.count*e.height+(e.count-1)*e.spacing),canvasSize-o-(e.count*e.height+(e.count-1)*e.spacing))}function getHeatColor(e){if("allBlack"===selectedColorProfile.name)return color(random(255),random(255),random(255));let o=map(e,1,10,0,1),t=lerp(selectedColorProfile.gradientStart[0],selectedColorProfile.gradientEnd[0],o),r=lerp(selectedColorProfile.gradientStart[1],selectedColorProfile.gradientEnd[1],o),l=lerp(selectedColorProfile.gradientStart[2],selectedColorProfile.gradientEnd[2],o);return color(t,r,l)}function drawQuantic(){let e=selectedQuanticProfile.baseSpeed,o=.01*dynamo,t=selectedQuanticProfile.maxDimension;for(let r=0;r<5;r++){let l=quanticRects[r],i=r*TWO_PI/7;l.width=map(sin(frameCount*(e+o)+i),-1,1,t/3,t),l.height=map(cos(frameCount*(e+o)+i),-1,1,t/3,t);let a=[selectedColorProfile.squareColor1,selectedColorProfile.squareColor2,selectedColorProfile.squareColor3];drawQuanticRectangle(quanticCenterX,quanticCenterY,l.width,l.height,a)}}function drawQuanticRectangle(e,o,t,r,l){push(),translate(e,o);let i=getHeatColor(dynamo),a=map(dynamo,1,10,0,10),n=map(dynamo,1,10,1,5);stroke(i.levels[0],i.levels[1],i.levels[2],alphaValue/2),strokeWeight(n),line(-t/2-a,-r/2-a,t/2+a,-r/2-a),line(-t/2-a,r/2+a,t/2+a,r/2+a),line(-t/2-a,-r/2-a,-t/2-a,r/2+a),line(t/2+a,-r/2-a,t/2+a,r/2+a),strokeWeight(.5);for(let e=-r/2;e<r/2;e+=2)stroke(l[0][0],l[0][1],l[0][2],alphaValue),line(-t/2,e,t/2,e);for(let e=-t/2;e<t/2;e+=2)stroke(l[1][0],l[1][1],l[1][2],alphaValue),line(e,-r/2,e,r/2);for(let e=-r/2;e<r/2;e+=4)stroke(l[2][0],l[2][1],l[2][2],alphaValue),line(-t/2,e,t/2,e);pop()}function drawDisquantic(){let e=.5*selectedDisquanticProfile.baseSpeed,o=.04*dynamo,t=selectedDisquanticProfile.maxDimension;for(let r=0;r<3;r++){let l=quanticRects[r],i=r*PI/2;l.width=map(sin(frameCount*(e+o)+i),-1,1,t/3,t),l.height=map(cos(frameCount*(e+o)+i),-1,1,t/3,t);let a=20*sin(frameCount*(e+o)+i)+50*cos(.01*frameCount+i),n=20*cos(frameCount*(e+o)+i)+50*sin(.01*frameCount+i),s=[selectedColorProfile.squareColor1,selectedColorProfile.squareColor2,selectedColorProfile.squareColor3];drawDisquanticRectangle(quanticCenterX+a,quanticCenterY+n,l.width,l.height,s)}}function drawDisquanticRectangle(e,o,t,r,l){push(),translate(e,o);let i=getHeatColor(dynamo),a=map(dynamo,1,10,0,20),n=map(dynamo,1,10,0,20),s=map(dynamo,1,10,0,3);stroke(i.levels[0],i.levels[1],i.levels[2],alphaValue),strokeWeight(s),line(-t/2-a,-r/2-n,t/2+a,-r/2-n),line(-t/2-a,r/2+n,t/2+a,r/2+n),line(-t/2-a,-r/2-n,-t/2-a,r/2+n),line(t/2+a,-r/2-n,t/2+a,r/2+n),strokeWeight(.7);for(let e=-r/2;e<r/2;e+=2)stroke(l[0][0],l[0][1],l[0][2],alphaValue),line(-t/2,e,t/2,e);for(let e=-t/2;e<t/2;e+=2)stroke(l[1][0],l[1][1],l[1][2],alphaValue),line(e,-r/2,e,r/2);for(let e=-r/2;e<r/2;e+=4)stroke(l[2][0],l[2][1],l[2][2],alphaValue),line(-t/2,e,t/2,e);pop()}function selectDataTextProfile(){let e=random(1),o=0;for(let t of dataTextProfiles)if(o+=t.probability,e<o)return t;return dataTextProfiles[0]}function toggleDataTextVisibility(){dataTextVisible=!dataTextVisible}function getDataTextPosition(){let e=60,o=60;return"fourSquares"===selectedCorniceProfile.type?(e=20,o=20):"diagonalStrip"===selectedCorniceProfile.type&&(e=-20,o=-70),{x:e,y:o}}function drawDataText(){millis()-lastDataTextUpdateTime>dataTextUpdateInterval&&(updateDataTextValues(),lastDataTextUpdateTime=millis());let{x:e,y:o}=getDataTextPosition(),t=selectedColorProfile.textColor;fill(t[0],t[1],t[2],alphaValue/3),noStroke(),textSize(12),textAlign(LEFT,TOP),textFont("Courier New");let r=generateDataText().split("\n");for(let t=0;t<r.length;t++){let l=random(-1,1),i=random(-1,1);text(r[t],e+l,o+i+12*t)}}function generateDataText(){let e="";for(let o in dataTextValues)e+=`${o}: ${dataTextValues[o]}\n`;return e}function updateDataTextValues(){dataTextValues.average_fee=floor(random(0,200)),dataTextValues.average_fee_rate=floor(random(0,100)),dataTextValues.bits=floor(random(4e8,5e8)),dataTextValues.chainwork=generateRandomHexString(12),dataTextValues.confirmations=floor(random(0,1e3)),dataTextValues.difficulty=random(0,100),dataTextValues.hash=generateRandomHexString(32),dataTextValues.feerate_percentiles=[floor(random(0,100)),floor(random(0,100)),floor(random(0,100)),floor(random(0,100)),floor(random(0,100))],dataTextValues.height=floor(random(0,1e5)),dataTextValues.max_fee=floor(random(0,1e3)),dataTextValues.max_fee_rate=floor(random(0,1e3)),dataTextValues.max_tx_size=floor(random(0,1e3)),dataTextValues.median_fee=floor(random(0,1e3)),dataTextValues.median_time=floor(random(12e8,13e8)),dataTextValues.merkle_root=generateRandomHexString(32),dataTextValues.min_fee=floor(random(0,100)),dataTextValues.min_fee_rate=floor(random(0,100)),dataTextValues.nonce=floor(random(0,1e6)),dataTextValues.subsidy=floor(random(4e9,6e9)),dataTextValues.target=generateRandomHexString(24),dataTextValues.timestamp=floor(random(12e8,13e8)),dataTextValues.total_fee=floor(random(0,1e3)),dataTextValues.total_size=floor(random(0,1e6)),dataTextValues.total_weight=floor(random(0,1e6)),dataTextValues.transaction_count=floor(random(0,1e6)),dataTextValues.version=floor(random(0,10))}function generateRandomHexString(e){let o="",t="0123456789abcdef";for(let r=0;r<e;r++)o+=t.charAt(floor(random(16)));return o}function drawPowerup(){"virus"===selectedPowerupProfile.type?drawVirusPowerup():"additionalCPU"===selectedPowerupProfile.type&&drawAdditionalCPUPowerup()}function drawVirusPowerup(){let e=selectedPowerupProfile.baseSize,o=selectedPowerupProfile.maxOffset,t=[selectedColorProfile.virus1,selectedColorProfile.virus2,selectedColorProfile.virus3];for(let r=0;r<3;r++){let l=e+10*sin(.5*frameCount+r*PI/4),i=cos(.2*frameCount+r*PI/6)*map(dynamo,1,10,.7*o,o),a=sin(.1*frameCount+r*PI/5)*map(dynamo,1,10,.7*o,o);drawPowerupLayer(powerupX1+i,powerupY1+a,l*map(dynamo,1,10,1,1.5),t[r])}}function drawAdditionalCPUPowerup(){let e=selectedPowerupProfile.baseSize,o=(selectedPowerupProfile.maxOffset,[selectedColorProfile.additionalCPU1,selectedColorProfile.additionalCPU2,selectedColorProfile.additionalCPU3]),t=[.5,.3,.7];for(let r=0;r<3;r++){let l=e+10*sin(frameCount*t[r]+r*PI/4),i=powerupX2+0,a=powerupY2+0,n=l*map(dynamo,1,10,1,1.5),s=l*map(dynamo,1,10,1,1.5);push(),translate(i,a);getHeatColor(dynamo);let c=map(dynamo,1,10,0,10),d=map(dynamo,1,10,1,5),p=selectedColorProfile.strokeAdditionalCPU;stroke(p[0],p[1],p[2],alphaValue/3),strokeWeight(d),line(-n/2-c,-s/2-c,n/2+c,-s/2-c),line(-n/2-c,s/2+c,n/2+c,s/2+c),line(-n/2-c,-s/2-c,-n/2-c,s/2+c),line(n/2+c,-s/2-c,n/2+c,s/2+c),strokeWeight(1);for(let e=-s/2;e<s/2;e+=2)stroke(o[0][0],o[0][1],o[0][2],alphaValue/3),line(-n/2,e,n/2,e);for(let e=-n/2;e<n/2;e+=2)stroke(o[1][0],o[1][1],o[1][2],alphaValue/3),line(e,-s/2,e,s/2);for(let e=-s/2;e<s/2;e+=4)stroke(o[2][0],o[2][1],o[2][2],alphaValue/3),line(-n/2,e,n/2,e);pop()}}function drawPowerupLayer(e,o,t,r){getHeatColor(dynamo);let l=map(dynamo,1,10,0,10),i=map(dynamo,1,10,1,6);if("virus"===selectedPowerupProfile.type){let a=selectedColorProfile.strokeVirus;stroke(a[0],a[1],a[2],alphaValue/3),strokeWeight(i),line(e-t/2-l,o-t/2-l,e+t/2+l,o-t/2-l),line(e-t/2-l,o+t/2+l,e+t/2+l,o+t/2+l),line(e-t/2-l,o-t/2-l,e-t/2-l,o+t/2+l),line(e+t/2+l,o-t/2-l,e+t/2+l,o+t/2+l),stroke(r[0],r[1],r[2],alphaValue),strokeWeight(1);for(let r=-t/2;r<t/2;r+=2)line(e-t/2,o+r,e+t/2,o+r)}else if("additionalCPU"===selectedPowerupProfile.type){let a=selectedColorProfile.strokeAdditionalCPU;stroke(a[0],a[1],a[2],alphaValue/4),strokeWeight(i),line(e-t/2-l,o-t/2-l,e+t/2+l,o-t/2-l),line(e-t/2-l,o+t/2+l,e+t/2+l,o+t/2+l),line(e-t/2-l,o-t/2-l,e-t/2-l,o+t/2+l),line(e+t/2+l,o-t/2-l,e+t/2+l,o+t/2+l),stroke(r[0],r[1],r[2],alphaValue),strokeWeight(1);for(let r=-t/2;r<t/2;r+=2)line(e-t/2,o+r,e+t/2,o+r)}}function selectPowerupProfile(){let e=random(1),o=0;for(let t of powerupProfiles)if(o+=t.probability,e<o)return t;return powerupProfiles[0]}function selectCapacitorProfile(){let e=random(0,1),o=0;for(let t of capacitorProfiles)if(o+=t.probability,e<o)return t}function generateCapacitors(){let e=selectCapacitorProfile();capacitors=[];let o,t,r=e.rows,l=e.cols,i=l*(e.radius+e.horizontalSpacing)-e.horizontalSpacing,a=r*(e.radius+e.verticalSpacing)-e.verticalSpacing,n=.35*canvasSize;o=random(0,1)<.5?random(0,n-i):random(canvasSize-n,canvasSize-i),t=random(0,canvasSize-a);for(let i=0;i<r;i++)for(let r=0;r<l;r++){if(i*l+r>=e.count)break;let a=o+r*(e.radius+e.horizontalSpacing),n=t+i*(e.radius+e.verticalSpacing);capacitors.push({x:a,y:n,radius:e.radius,numCircles:e.numCircles,animationSpeed:e.animationSpeed,colors:[selectedColorProfile.rectColor1,selectedColorProfile.rectColor2,selectedColorProfile.rectColor3]})}}function randomWeightedEdge(e,o){let t=(e+o)/2,r=random()<.97?random()*(t-e):random()*(o-t);return random()<.5?t-r:t+r}function drawCapacitors(){for(let e of capacitors)drawCapacitor(e.x,e.y,e.radius,e.numCircles,e.colors,e.animationSpeed)}function drawCapacitor(e,o,t,r,l,i){push(),translate(e,o);let a=millis()%1e3/1e3,n=i*dynamo,s=map(dynamo,1,10,1,2);for(let e=0;e<r;e++){let o=t*(e+1)/r*s,i=map(a,0,1,0,TWO_PI)*(e%2==0?1:-1),c=i+map(sin(frameCount*n+e*PI/4),-1,1,PI/2,PI);stroke(l[e%l.length][0],l[e%l.length][1],l[e%l.length][2],alphaValue/1.5),noFill(),strokeWeight(2),arc(0,0,.5*o,.5*o,i,c)}pop()}function updateDynamicBackgroundColors(){let e,o,t=millis()-lastBackgroundUpdateTime,r=map(dynamo,1,10,2e3,500),l=t%r/r;return l<.5?(l=map(l,0,.5,0,1),e=selectedColorProfile.background1,o=selectedColorProfile.background2):(l=map(l,.5,1,0,1),e=selectedColorProfile.background2,o=selectedColorProfile.background1),lerpColor(color(e[0],e[1],e[2]),color(o[0],o[1],o[2]),l)}function generateScreenPosition(){placeholderScreenX=(placeholderCanvasSize-placeholderScreenWidth)/2,placeholderScreenY=(placeholderCanvasSize-placeholderScreenHeight)/2}function placeholderFunction(){background(placeholderBackgroundColor),drawPlaceholderScreen(),drawPlaceholderVerticalInterference()}function drawPlaceholderScreen(){let e=[placeholderScreenBackgroundLayer1,placeholderScreenBackgroundLayer2,placeholderScreenBackgroundLayer3];drawRectParallelLines(placeholderScreenX,placeholderScreenY,placeholderScreenWidth,placeholderScreenHeight,e),push();let o=random(-10,10),t=random(-15,15);translate(o,o),drawRectVerticalLines(placeholderScreenX,placeholderScreenY,placeholderScreenWidth,placeholderScreenHeight,e),pop(),push(),translate(t,t),drawRectHorizontalLines(placeholderScreenX,placeholderScreenY,placeholderScreenWidth,placeholderScreenHeight,e),pop()}function drawRectParallelLines(e,o,t,r,l){for(let i=0;i<r;i+=2)stroke(l[1][0],l[1][1],l[1][2],placeholderAlphaValue),line(e,o+i,e+t,o+i);for(let i=0;i<t;i+=2)stroke(l[2][0],l[2][1],l[2][2],placeholderAlphaValue),line(e+i,o,e+i,o+r)}function drawRectVerticalLines(e,o,t,r,l){for(let i=0;i<t;i+=2)stroke(l[2][0],l[2][1],l[2][2],placeholderAlphaValue),line(e+i,o,e+i,o+r)}function drawRectHorizontalLines(e,o,t,r,l){for(let i=0;i<r;i+=2)stroke(l[0][0],l[0][1],l[0][2],placeholderAlphaValue),line(e,o+i,e+t,o+i)}function drawPlaceholderVerticalInterference(){if(random()>.78){stroke(120,120,120);let e=int(random(width));line(e,0,e,height)}}function drawGlitchText(e,o,t){textSize(42),textAlign(CENTER,CENTER),noStroke();let r=[placeholderScreenBackgroundLayer1,placeholderScreenBackgroundLayer2,placeholderScreenBackgroundLayer3];for(let l=0;l<5;l++){let l=random(-5,5),i=random(-5,5),a=100;fill(r[0][0],r[0][1],r[0][2],a/2),text(e,o+l,t+i),l=random(-5,5),i=random(-5,5),fill(r[1][0],r[1][1],r[1][2],a/2),text(e,o+l,t+i),l=random(-5,5),i=random(-5,5),fill(r[2][0],r[2][1],r[2][2],a/2),text(e,o+l,t+i)}fill(225,100),text(e,o,t)}
Inscription number 72,580,200
Genesis block 852,383
File type text
File size 50.44 KB
Creation date Jul 16,2024 1:59 am