Canvas Simple Circle Loader
How do I make an canvas simple circle loader?
What is a canvas simple circle loader? How do you make a canvas simple circle loader? This script and codes were developed by Jack Rugile on 11 August 2022, Thursday.
Canvas Simple Circle Loader - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Canvas Simple Circle Loader</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { background: #111 url(/images/classy_fabric.png);
}
canvas { background: radial-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .9)); display: block;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <script src='https://rawgithub.com/soulwire/sketch.js/master/js/sketch.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Canvas Simple Circle Loader - Script Codes CSS Codes
body { background: #111 url(/images/classy_fabric.png);
}
canvas { background: radial-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .9)); display: block;
}
Canvas Simple Circle Loader - Script Codes JS Codes
(function() { var Particle; Particle = (function() { function Particle(x, y) { this.x = x; this.y = y; this.radius = 5; this.decayRate = .07; } Particle.prototype.update = function(ctx, index) { if (this.radius > this.decayRate) { return this.radius -= this.decayRate; } else { return ctx.particles.splice(index, 1); } }; Particle.prototype.draw = function(ctx, index) { ctx.beginPath(); ctx.arc(this.x, this.y, this.radius, 0, TWO_PI); ctx.fillStyle = 'hsla(' + ctx.hue + ', 100%, ' + (index / ctx.particles.length) * 90 + '%, ' + (index / ctx.particles.length) + ')'; return ctx.fill(); }; return Particle; })(); Sketch.create({ setup: function() { this.tick = 0; this.particles = []; this.hue = 120; return this.anchor = { x: this.width / 2, y: this.height / 2, radius: 40, angle: 0, speed: 0.07 }; }, update: function() { var i, results; this.anchor.angle += this.anchor.speed; this.particles.push(new Particle(this.anchor.x + cos(this.anchor.angle) * this.anchor.radius, this.anchor.y + sin(this.anchor.angle) * this.anchor.radius)); this.hue += 1; i = this.particles.length; results = []; while (i--) { results.push(this.particles[i].update(this, i)); } return results; }, draw: function() { var i, results; i = this.particles.length; results = []; while (i--) { results.push(this.particles[i].draw(this, i)); } return results; } });
}).call(this);
Developer | Jack Rugile |
Username | jackrugile |
Uploaded | August 11, 2022 |
Rating | 4.5 |
Size | 2,946 Kb |
Views | 44,528 |
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 |
Snake Game - CSS Renderer | 7,412 Kb |
Canvas Sparkly Circle Loader | 2,446 Kb |
Scroll Progress as Canvas to Favicon | 2,407 Kb |
Canvas Radar | 3,074 Kb |
Canvas Orbital Trails v2 | 3,421 Kb |
Canvas Color Smoke | 3,446 Kb |
Organic Circle Canvas Loader | 2,428 Kb |
Canvas Wave | 2,902 Kb |
Canvas Parallax Skyline | 4,871 Kb |
Light Loader | 2,738 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 |
Pomodoro Clock | Yas46 | 3,328 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
Easing | GreenSock | 2,043 Kb |
A Pen by Alexandru Pora | Axpro | 1,615 Kb |
Pure CSS Animated Photo Stack | Depthdev | 2,486 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 Kb |
Headroom.js demo | WickyNilliams | 3,982 Kb |
Vue Transition | Chenming142 | 4,561 Kb |
Layout 11 | Altynai | 1,690 Kb |
Blog Concept - Single Post | Marionebl | 9,603 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!