A Pen by Carl Calderon

Developer
Size
3,738 Kb
Views
42,504

How do I make an a pen by carl calderon?

What is a a pen by carl calderon? How do you make a a pen by carl calderon? This script and codes were developed by Carl Calderon on 30 July 2022, Saturday.

A Pen by Carl Calderon Previews

A Pen by Carl Calderon - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by Carl Calderon</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <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! */ html { height: 100%;
}
body { background: black; width: 100%; height: 100%; display: block; overflow: hidden;
}
body canvas { width: 100%; height: 100%;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <canvas></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 Carl Calderon - Script Codes CSS Codes

html { height: 100%;
}
body { background: black; width: 100%; height: 100%; display: block; overflow: hidden;
}
body canvas { width: 100%; height: 100%;
}

A Pen by Carl Calderon - Script Codes JS Codes

(function() { var Particle, animate, canvas, context, h, particles, start, update, w; Particle = (function() { var MAX_VELOCITY; MAX_VELOCITY = 10; function Particle(x1, y) { this.x = x1; this.y = y; this.s = Math.random() * 3; this.c = '#' + parseInt(Number(Math.random() * 0x808080 + 0x808080)).toString(16); } Particle.prototype.update = function(maxWidth, maxHeight) { this.vx = Math.random() * MAX_VELOCITY - MAX_VELOCITY / 2; this.vy = Math.random() * MAX_VELOCITY - MAX_VELOCITY / 2; if (this.x + this.vx < 0) { this.x = maxWidth - 1; } if (this.x + this.vx > maxWidth) { this.x = 0; } if (this.y + this.vy < 0) { this.y = maxHeight - 1; } if (this.y + this.vy > maxHeight) { this.y = 0; } this.x += this.vx; return this.y += this.vy; }; return Particle; })(); canvas = document.getElementsByTagName('canvas')[0]; context = canvas.getContext('2d'); w = 0; h = 0; particles = []; update = function(x) { var j, len, p, results, s; results = []; for (j = 0, len = particles.length; j < len; j++) { p = particles[j]; p.update(w, h); context.fillStyle = p.c; context.beginPath(); s = Math.random() * Math.PI; context.arc(p.x, p.y, p.s, s, s + Math.random() * Math.PI, false); context.closePath(); results.push(context.fill()); } return results; }; (animate = function() { var callback; callback = ((function(_this) { return function() { return animate(); }; })(this)); requestAnimationFrame(callback, 1000); return update(); })(); (start = function() { var i, j, results; context.globalCompositeOperation = 'source-over'; context.fillStyle = 'black'; context.fillRect(0, 0, w, h); particles = []; w = canvas.width = $('body').innerWidth(); h = canvas.height = $('body').innerHeight(); context.globalCompositeOperation = 'lighter'; results = []; for (i = j = 0; j <= 1000; i = ++j) { results.push(particles.push(new Particle(Math.random() * w, Math.random() * h))); } return results; })(); $('canvas').click(start);
}).call(this);
A Pen by Carl Calderon - Script Codes
A Pen by Carl Calderon - Script Codes
Home Page Home
Developer Carl Calderon
Username carlcalderon
Uploaded July 30, 2022
Rating 3.5
Size 3,738 Kb
Views 42,504
Do you need developer help for A Pen by Carl Calderon?

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!

Carl Calderon (carlcalderon) Script Codes
Create amazing art & images with AI!

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!