Follow the lines
How do I make an follow the lines?
What is a follow the lines? How do you make a follow the lines? This script and codes were developed by Aitor on 16 September 2022, Friday.
Follow the lines - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Follow the lines</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
</head>
<body>
<canvas width="640" height="640"></canvas> <script src="js/index.js"></script>
</body>
</html>
Follow the lines - Script Codes JS Codes
"use strict";
var canvas = document.querySelector("canvas"), context = canvas.getContext("2d");
var arcs = [0, 500, 100, 50, 300], arca = [0, 0, 0, 0, 0];
function render() { var cx = canvas.width * 0.5, cy = canvas.height * 0.5, LINES = 360; context.fillStyle = "rgba(0,0,0,0.1)"; context.fillRect(0, 0, canvas.width, canvas.height); for (var index = 0; index < LINES; index++) { var angle = Math.random() * Math.PI * 2; context.beginPath(); context.moveTo(cx, cy); context.lineTo(cx + Math.cos(angle) * Math.max(canvas.width, canvas.height), cy + Math.sin(angle) * Math.max(canvas.width, canvas.height)); context.strokeStyle = "rgba(255,255,255,0.5)"; context.stroke(); } for (var index = 0; index < arcs.length; index++) { arca[index] = (arca[index] += 0.1) % 20; arcs[index] = arcs[index] + arca[index]; if (arcs[index] > Math.max(canvas.width, canvas.height)) { arca[index] = 0; arcs[index] = 0; } context.beginPath(); context.arc(cx, cy, arcs[index], 0, Math.PI * 2); context.stroke(); } window.requestAnimationFrame(render);
}
function resize() { canvas.width = window.innerWidth; canvas.height = window.innerHeight;
}
window.addEventListener("resize", resize);
render();
resize();
Developer | Aitor |
Username | AzazelN28 |
Uploaded | September 16, 2022 |
Rating | 3.5 |
Size | 2,645 Kb |
Views | 26,312 |
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 |
Date Input | 10,870 Kb |
Countdown | 3,558 Kb |
Superformula | 3,671 Kb |
Asteroids | 13,025 Kb |
Dancing Text | 3,761 Kb |
AudioContext Concept | 3,112 Kb |
Loader | 2,222 Kb |
Clock | 4,267 Kb |
Romboids | 3,518 Kb |
Physics 101 | 6,491 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 |
Classy Blockquote Styling | Andrewwright | 3,212 Kb |
Replace url via jquery | Serluk | 1,429 Kb |
Angular Sandbox | Alexgurrola | 1,616 Kb |
Clock with full screen background | Owebboy | 2,415 Kb |
About Us | Francescaedits | 1,902 Kb |
Static Image to Video Block | Grayghostvisuals | 4,864 Kb |
BSP Dungeon Generation | Xgundam05 | 5,326 Kb |
Drawing a Terminal with CSS | Lachlanjc | 3,185 Kb |
Colorful Sliders | Chanrith | 1,246 Kb |
Countdown Timer | Massiebn | 3,001 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!