A Pen by lloydwheeler
How do I make an a pen by lloydwheeler?
What is a a pen by lloydwheeler? How do you make a a pen by lloydwheeler? This script and codes were developed by Lloydwheeler on 26 January 2023, Thursday.
A Pen by lloydwheeler - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by lloydwheeler</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas id="particles"></canvas> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
A Pen by lloydwheeler - Script Codes CSS Codes
body { margin: 0;
}
#particles { background: #19abff; width: 1900px; height: 920px;
}
A Pen by lloydwheeler - Script Codes JS Codes
var canvas = $('#particles').get(0);
canvas.width = 1920;
canvas.height = 920;
var ctx = canvas.getContext('2d');
var particles = [];
var mousePosition = { x: 950, y: 460
}
$('#particles').mousemove(function(e) { var position = { x: e.pageX, y: e.pageY } drawParticles(position);
});
function Particle(x,y) { this.pos = { x: x, y: y }; this.size = Math.random() * 100; this.luminosity = Math.random() *.5; this.z = this.size*0.05;
}
Particle.prototype.draw = function(ctx, positionDelta) { ctx.beginPath(); ctx.arc(this.pos.x - (positionDelta.x*this.z), this.pos.y - (positionDelta.y*this.z), this.size, 0, 2 * Math.PI, false); ctx.fillStyle = 'rgba(255,255,255,' + this.luminosity + ')'; ctx.fill();
};
function initParticles() { for(var i = 0; i < 50; i++) { var particle = new Particle(canvas.width*Math.random(), canvas.height*Math.random()); particle.draw(ctx, {x:0, y:0}); particles.push(particle); }
};
initParticles();
function drawParticles(position) { canvas.width = canvas.width; var i = 0, numStars = this.particles.length; for(; i < numStars; i++) { this.particles[i].draw(ctx, positionDelta(mousePosition, position)); }
};
function positionDelta(before, after) { /* Returns the difference between two position vectors */ return {x: (after.x - before.x)/10, y: (after.y - before.y)/10};
};
Developer | Lloydwheeler |
Username | lloydwheeler |
Uploaded | January 26, 2023 |
Rating | 4.5 |
Size | 2,180 Kb |
Views | 8,096 |
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 |
Page Editor Animation | 8,456 Kb |
Profile Flip | 2,373 Kb |
Weather Icon | 3,352 Kb |
Mix Blend Mode | 2,391 Kb |
IOS Style Back Button | 2,006 Kb |
Particle Emitter | 2,320 Kb |
Console Input | 2,173 Kb |
Device Switcher | 4,297 Kb |
SVG Loading Animation | 2,786 Kb |
Triangle Generator | 3,947 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 |
A Pen by Tosh | Panev | 2,586 Kb |
Speech bubbles | Something | 1,547 Kb |
Slide out Menu | Rbiggs | 4,936 Kb |
A Pen by Paul Sullivan | Pwsm50 | 2,349 Kb |
Weather App | Kw7oe | 3,162 Kb |
Update CSS Variables with JS | Wesbos | 2,335 Kb |
Filtering with shuffle.js | Deyand | 2,712 Kb |
Project_one | MOHIM | 9,592 Kb |
Loader | MikitaLisavets | 3,321 Kb |
Pure CSS read more toggle | Idered | 2,344 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!