Love is in the air...
How do I make an love is in the air...?
What is a love is in the air...? How do you make a love is in the air...? This script and codes were developed by Theun on 23 July 2022, Saturday.
Love is in the air... - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Love is in the air...</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
Love is in the air... - Script Codes CSS Codes
body { margin: 0; overflow: hidden;
}
Love is in the air... - Script Codes JS Codes
var NUM = 500, SIZE = 0.01, SPEED = 0.03, SCREEN_ROTATION = 0.2, canvas = document.body.appendChild(document.createElement('canvas')), ctx = canvas.getContext('2d');
function Matrix3() {}
Matrix3.prototype = { 0:1, 1:0, 2:0, 3:0, 4:1, 5:0, 6:0, 7:0, 8:1, mul: function() { var a = this, b = arguments, c = new Matrix3(); c[0] = a[0] * b[0] + a[1] * b[3] + a[2] * b[6]; c[1] = a[0] * b[1] + a[1] * b[4] + a[2] * b[7]; c[2] = a[0] * b[2] + a[1] * b[5] + a[2] * b[8]; c[3] = a[3] * b[0] + a[4] * b[3] + a[5] * b[6]; c[4] = a[3] * b[1] + a[4] * b[4] + a[5] * b[7]; c[5] = a[3] * b[2] + a[4] * b[5] + a[5] * b[8]; c[6] = a[6] * b[0] + a[7] * b[3] + a[8] * b[6]; c[7] = a[6] * b[1] + a[7] * b[4] + a[8] * b[7]; c[8] = a[6] * b[2] + a[7] * b[5] + a[8] * b[8]; return c; }, rx: function(t) { var c = Math.cos(t), s = Math.sin(t); return this.mul(1, 0, 0, 0, c, -s, 0, s, c); }, ry: function(t) { var c = Math.cos(t), s = Math.sin(t); return this.mul(c, 0, s, 0, 1, 0, -s, 0, c); }, rz: function(t) { var c = Math.cos(t), s = Math.sin(t); return this.mul(c, -s, 0, s, c, 0, 0, 0, 1); }
};
function Point3d() {}
Point3d.prototype = { x:0, y:0, z:0, rotate: function(m) { var p = new Point3d(); p.x = m[0] * this.x + m[1] * this.y + m[2] * this.z; p.y = m[3] * this.x + m[4] * this.y + m[5] * this.z; p.z = m[6] * this.x + m[7] * this.y + m[8] * this.z; return p; }
};
function random(n) { for (var i = 0; i < 6; i++) { n ^= n << 3; n ^= n >> 2; } return (n & 0xffffff) / 0x1000000;
}
function draw(ctx) { var i, j, k = 1 + 1 / NUM, p, grad, t = new Date() / 1000, r = new Matrix3().ry(-t * 0.123).rx(0.8).rz(SCREEN_ROTATION); for (i = 0; i < NUM; i++) { j = t * SPEED + i * k; p = new Point3d(); p.x = random(j); p.y = j % 1; p.z = random(j + 10000); p.x -= 0.5; p.y -= 0.5; p.z -= 0.5; p.y *= -5; p = p.rotate(r); p.x += Math.sin(t * 0.1 + i) * 0.2; p.z += 0.5; if (p.z <= 0) continue; ctx.save(); ctx.globalAlpha *= 1 / (p.z + 0.6); ctx.translate(p.x / p.z, p.y / p.z); ctx.scale(SIZE / p.z, SIZE / p.z); ctx.rotate(SCREEN_ROTATION); grad = ctx.createRadialGradient(0, -0.4, 0, 0, -0.4, 4); grad.addColorStop(0, 'pink'); grad.addColorStop(1, 'red'); ctx.fillStyle = grad; ctx.beginPath(); ctx.moveTo(0, 1.8); ctx.quadraticCurveTo(2, 0, 2, -1); ctx.quadraticCurveTo(2, -2, 1, -2); ctx.quadraticCurveTo(0, -2, 0, -1); ctx.quadraticCurveTo(0, -2, -1, -2); ctx.quadraticCurveTo(-2, -2, -2, -1); ctx.quadraticCurveTo(-2, 0, 0, 1.8); ctx.fill(); ctx.restore(); }
}
function loop() { var scale = Math.max(canvas.width, canvas.height); ctx.fillStyle = 'snow'; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.save(); ctx.translate(canvas.width * 0.5, canvas.height * 0.5); ctx.scale(scale, scale); draw(ctx); ctx.restore();
}
addEventListener('resize', function resize() { canvas.width = document.documentElement.clientWidth; canvas.height = document.documentElement.clientHeight; loop(); return resize;
}(), false);
setInterval(loop, 16);
Developer | Theun |
Username | tjoen |
Uploaded | July 23, 2022 |
Rating | 3 |
Size | 2,642 Kb |
Views | 36,432 |
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 |
SVG pong | 3,818 Kb |
Canvas Buldings | 2,737 Kb |
A Pen by Theun | 2,240 Kb |
Those kids... | 3,390 Kb |
A Pen by Theun | 6,152 Kb |
Roulette | 2,417 Kb |
Three.js shooter template | 6,268 Kb |
D3 example | 2,392 Kb |
Touch Slider | 3,587 Kb |
Font Awesome Cheetsheet | 7,878 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 |
Header Line Issue | Charlie-volpe | 1,768 Kb |
Material design buttons | Fischaela | 4,381 Kb |
SlideupBoxes | Gavra | 23,772 Kb |
IbrahimJabbari-Effect14 | Ibrahimjabbari | 1,919 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Wikipedia Viewer | Thalpha | 4,426 Kb |
Resume | Rottingroom | 5,483 Kb |
Css3 only dropdown menu | Riogrande | 2,519 Kb |
CSS eye follow | Pedrocampos | 2,592 Kb |
Clock | Martingrand | 3,520 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!