Tesla
How do I make an tesla?
Electric.. What is a tesla? How do you make a tesla? This script and codes were developed by Tristan on 25 August 2022, Thursday.
Tesla - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Tesla</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Tesla - Script Codes CSS Codes
*{margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}
body{font-size:75%;background:#222;font-family:arial;padding:20px 0 0 20px}
canvas{border:1px solid #181818;display:block;box-shadow:0 0 10px #111}
Tesla - Script Codes JS Codes
var canvas, c, w, h, twoPI = Math.PI * 2, mX, mY, resize = true, styles = [ { c: "rgba(0, 128,255,0.02)", w: 55 }, { c: "rgba(0, 128,255,0.05)", w: 25 }, { c: "rgba(0, 255,255,0.10)", w: 10 }, { c: "rgba(255,128,255,0.20)", w: 5 }, { c: "rgba(255,255,255,1.00)", w: 1 } ];
window.onload = function(){ canvas = document.createElement('canvas') w = canvas.width = window.innerWidth - 40; h = canvas.height = window.innerHeight - 40; c = canvas.getContext('2d'); document.body.appendChild(canvas); !resize || window.addEventListener('resize', function(e){ w = canvas.width = window.innerWidth - 40; h = canvas.height = window.innerHeight - 40; }); c.globalCompositeOperation = "lighter"; window.setInterval(animate, 1000/33);
}
function animate(){ c.save(); c.globalCompositeOperation = "source-over"; c.fillStyle = "rgba(0,0,0,0.3)"; c.fillRect(0,0,w,h); c.restore(); drawBolt(w/2,h-20);
}
function drawBolt(x,y){ c.beginPath(); var direction = twoPI*0.75; new Bolt(x, y, h/2, 20, direction, 0); c.closePath(); c.lineCap = "round"; for(var i = 0; i < styles.length; i++){ c.strokeStyle = styles[i].c; c.lineWidth = styles[i].w; c.stroke(); }
}
function Bolt(ox, oy, length, segments, direction, fork){ var x = ox, y = oy, x2, y2; for(var i = 0; i < segments; i++){ c.moveTo(x,y); x += Math.cos(direction) * (length/segments); y += Math.sin(direction) * (length/segments); c.lineTo(x,y); var branch = (Math.random() * 15) + fork; if(fork < 3 && branch > 12){ new Bolt(x, y, h/5, 5, direction, fork + 1); } direction += (Math.random() * (twoPI/16)) * Math.round(Math.random()*2-1); }
}
Developer | Tristan |
Username | sinthetyc |
Uploaded | August 25, 2022 |
Rating | 3 |
Size | 2,356 Kb |
Views | 50,600 |
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 |
Particle Interaction | 3,058 Kb |
Higgs-Boson | 2,782 Kb |
A Better Colour Picker | 18,308 Kb |
Nebular | 3,189 Kb |
Kaleidoscope | 2,674 Kb |
Pipes | 2,578 Kb |
Pink Ribbon | 2,847 Kb |
Julia Vertex Shader | 3,012 Kb |
Light rays | 2,677 Kb |
1 Element Loading | 3,779 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 |
Wikipedia Viewer | Thomasvaeth | 2,549 Kb |
Polygon Logo in CSS | Kai | 3,412 Kb |
Flexbox slider | Rendro | 3,459 Kb |
Svg sky | Omodev | 7,070 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
My Starter Kit For Codepen | Dkdesign | 2,012 Kb |
Magnus 3 | ARocketfish | 7,944 Kb |
Video Player Custom Controls | EleftheriaBatsou | 3,665 Kb |
Canvas Fireworks | Jackrugile | 6,200 Kb |
Twitch TV | Natester13 | 4,488 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!