Vaporous Mood
How do I make an vaporous mood?
Forked from Gabi's Pen Lissajous flower. What is a vaporous mood? How do you make a vaporous mood? This script and codes were developed by Bailh on 07 December 2022, Wednesday.
Vaporous Mood - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Vaporous Mood</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js'> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<svg id="paper"></svg>
<canvas id="canv"></canvas>
<!--variation on click--> <script src='https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Vaporous Mood - Script Codes CSS Codes
* { margin: 0; padding: 0; overflow: hidden; height: 100%; overflow: hidden; background-image: -webkit-linear-gradient(top, rgba(46, 209, 185, 0.6) 0%, rgba(209, 92, 46, 0.1) 40%, rgba(171, 229, 237, 0.3) 65%, rgba(59, 157, 196, 0.5) 85%, rgba(46, 209, 185, 0.6) 100%); background-image: linear-gradient(top, rgba(46, 209, 185, 0.6) 0%, rgba(209, 92, 46, 0.1) 40%, rgba(171, 229, 237, 0.3) 65%, rgba(59, 157, 196, 0.5) 85%, rgba(46, 209, 185, 0.6) 100%); mix-blend-mode: 'color';
}
body { background: -webkit-linear-gradient(left, black, transparent 100%), -webkit-linear-gradient(left, rgba(255, 217, 0, 0.6), transparent 10%), -webkit-linear-gradient(right, rgba(255, 217, 0, 0.4), transparent), -webkit-linear-gradient(left, rgba(108, 93, 25, 0.3), transparent); background: linear-gradient(left, black, transparent 100%), linear-gradient(left, rgba(255, 217, 0, 0.6), transparent 10%), linear-gradient(right, rgba(255, 217, 0, 0.4), transparent), linear-gradient(left, rgba(108, 93, 25, 0.3), transparent); mix-blend-mode: 'multiply'; -webkit-filter: invert(1); filter: invert(1);
}
#canv { height: 100vh; position: absolute; top: 0; left: 0; z-index: 2; mix-blend-mode: 'color';
}
#paper { position: absolute; display: block; height: 100%; width: 100%; top: 0; left: 0; z-index: 1; mix-blend-mode: color; -webkit-filter: invert(0) hue-rotate(7deg); filter: invert(0) hue-rotate(7deg);
}
Vaporous Mood - Script Codes JS Codes
////
var C = document.getElementById("canv");
var Ctx = C.getContext("2d");
var Cw = C.width = window.innerWidth, Cx = Cw/2;
var Ch = C.height = window.innerHeight, Cy = Ch/2;
var c = document.createElement("canvas");
var ctx = c.getContext("2d");
var cw = c.width = 700, cx = cw/2;
var ch = c.height = 700, cy = ch/2;
var rad = Math.PI /100;
var frames=0;
var stopped = true;
var Rx = Math.round(cx), Ry=Math.abs(cy), kx=Math.tan(.3),ky =4,
x,y,x1,y1,x2,y2,t;
var petals = 8;
var grd = ctx.createRadialGradient(cx,cy,0,cx*Math.tan(4.2),cy/.9,Rx*1.27);
grd.addColorStop(0, "hsla(180,55%,32%,1)");
grd.addColorStop(.4, "hsla(78,46%,74%,1)");
grd.addColorStop(1, "hsl(260,58%,55%)");
function random(min, max) { return Math.random() * (max - min) + min;
}
ctx.strokeStyle = grd;//"hsl(210,100%,50%)";
ctx.globalAlpha = .8;
ctx.lineWidth = .25;
Ctx.translate(Cw/2, Ch/2);
Ctx.scale(.60,.60)
function Draw(){ frames+=.3; Ctx.rotate(Math.PI/3000); Ctx.clearRect(-Cw,-Ch,2*Cw,2*Ch); t = frames * rad; rx = Rx * Math.abs(Math.cos(t*3))+90; ry = Ry * Math.abs(Math.sin(t))+110; x = cx+ rx * Math.sin(kx * t + Math.PI/4); y = cy+ ry * Math.sin(ky * t + Math.PI/4); x1 = cx+ rx * Math.sin(kx * t + 3*Math.PI/4); y1 = cy- ry * Math.sin(ky * t + 3*Math.PI/4); x2 = cx+ rx * Math.sin(kx * t + 5*Math.PI/4); y2 = cy- ry * Math.sin(ky * t + 5*Math.PI/4); x3 = cx+ rx * Math.sin(kx * t + 7*Math.PI/4); y3 = cy- ry * Math.sin(ky * t + 7*Math.PI/.2); ctx.beginPath(); ctx.moveTo(x, y3); //ctx.quadraticCurveTo(x1,y1,x2,y2); ctx.bezierCurveTo(x3,y3,y3,y3,x1,y2,y1,x1,y1) ctx.stroke(); ctx.globalCompositeOperation = "lighter"; var img = c; for (var i = 0; i < petals; i++) { Ctx.globalCompositeOperation = "color-dodge"; Ctx.drawImage(img, -200, -400); Ctx.rotate(2*Math.PI/petals); } requestId = window.requestAnimationFrame(Draw); }
function start() { requestId = window.requestAnimationFrame(Draw); stopped = false;
}
function stopAnim() { if (requestId) { window.cancelAnimationFrame(requestId); } stopped = true;
}
window.addEventListener("load", function() { start();
}, false);
function cleanSlate(){ ctx.clearRect(0,0,cw,ch); stopped = true; start(); window.setTimeout(function(){stopAnim();},20000);
}
window.setTimeout(function(){stopAnim();},20000);
C.addEventListener("click", function(){cleanSlate()},false);
///
//
//
var svg = Snap("#paper");
var circ = svg.circle(4,4,4) .attr({fill:"rgba(0, 250, 250,.6)"}) .pattern(0,0,16,16) .attr({patternTransform: "rotate(45)"});
svg.rect(0,0,'100%','100%').attr({fill: circ});
$.globalCompositeOperation = 'difference';
var svg = Snap("#paper");
var circ = svg.circle(4,4,4) .attr({fill:"rgba(250, 0, 250,.4)"}) .pattern(0,0,9,9) .attr({patternTransform: "rotate(-4)"});
svg.rect(0,0,'100%','100%').attr({fill: circ}); $.globalCompositeOperation = 'difference';
Developer | Bailh |
Username | cathbailh |
Uploaded | December 07, 2022 |
Rating | 3.5 |
Size | 3,831 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Etoiles | 44,177 Kb |
Lunares | 3,801 Kb |
Puddle | 4,941 Kb |
Fanzine Radioactive Skull | 144,324 Kb |
Rainbow Harmony | 7,996 Kb |
Circular noise | 2,864 Kb |
Sweet chaos in the space of tulle | 3,085 Kb |
Random City | 5,412 Kb |
Job | 4,041 Kb |
Spirographe | 3,944 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Highbrow Basic HTML Lesson 8 | Kimlarocca | 2,094 Kb |
Two tables and header with jspdf-autotable | Someatoms | 2,245 Kb |
Portfolio Landing Page | FDfranklin | 3,585 Kb |
Simple Login Form | JoshBlackwood | 4,418 Kb |
Sony Xperia Z3 Flat MockUp | Dapinitial | 4,379 Kb |
OnScreenAction | Ozgursagiroglu | 2,647 Kb |
Fluid Grid 12 | Alexoliverwd | 2,309 Kb |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
CSS Grid Overlay | Cliffpyles | 3,090 Kb |
Free css icon set v2 - one div | Ben_jammin | 0 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!