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); }
}
![Tesla - Script Codes](http://shots.codepen.io/sinthetyc/pen/sBryk-512.jpg)
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 |
Perspective | 2,894 Kb |
Pipes | 2,578 Kb |
Zodiac | 120,243 Kb |
Pink Ribbon | 2,847 Kb |
A Better Colour Picker | 18,308 Kb |
Particle System 7 | 9,446 Kb |
Kaleidoscope | 2,674 Kb |
Julia Vertex Shader | 3,012 Kb |
Hovering a Hexagon | 2,254 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 |
Freecodecamp - Tribute Page | Samoht513 | 3,583 Kb |
Wikipedia Viewer | Thalpha | 4,426 Kb |
Flex Table | Simeonoff | 4,059 Kb |
My Interests | Anshusaxenaarora | 2,015 Kb |
Simple Flat Menu | Jeplaa | 2,467 Kb |
Count up | Alanshortis | 2,391 Kb |
Tooltip in table | Roine | 3,713 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
Experiment | Toddmoy | 2,849 Kb |
A Pen by Rob Levin | Roblevin | 2,787 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!