Galactic Orbitals
How do I make an galactic orbitals?
Galaxy clusters orbiting galaxy clusters, orbiting galaxy clusters...After a short while of orbiting, smaller clusters travel to the centers of larger galaxies && connections are formed . What is a galactic orbitals? How do you make a galactic orbitals? This script and codes were developed by Tiffany Rayside on 13 June 2022, Monday.
Galactic Orbitals - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Galactic Orbitals</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas id='canv'></canvas> <script src="js/index.js"></script>
</body>
</html>
Galactic Orbitals - Script Codes CSS Codes
body{ width:100%; margin:0; overflow:hidden; background:hsla(0,0%,0%,1);
}
Galactic Orbitals - Script Codes JS Codes
var c = document.getElementById('canv');
var $ = c.getContext('2d');
var w = c.width = window.innerWidth;
var h = c.height = window.innerHeight;
window.addEventListener('resize', function(){ c.width = w = window.innerWidth; c.height = h = window.innerHeight;
}, false);
var num = w * h / 810;
var arr = [];
var i = 0;
while (arr.length < num) { arr.push({ x: (Math.random() * w) | 0, y: (Math.random() * h) | 0, vx: 0, vy: 0 });
}
function _X(foo) { return Math.sin(foo.y / 45 ) / 0.3;
}
function _Y(foo) { return Math.sin(foo.x / 45 ) / 0.3;
}
function upd(bar) { var n = arr[i]; n.x += n.vx; n.y += n.vy; if (n.x < 0) { n.x = w + n.x; } else if (n.x >= w) { n.x -= w; } if (n.y < 0) { n.y = h + n.y; } else if (n.y >= h) { n.y -= h; } n.vy = _Y(n); n.vx = _X(n);
}
function draw(bar) { var n = arr[i]; var col = 'hsla(' + i + ',90%, 60%, 1)'; //outer rings $.beginPath(); $.fillStyle = col; $.globalAlpha = .1; $.arc(n.x, n.y, 15 / Math.max((n.vx * n.vx + n.vy * n.vy), 0.5), 0, 2 * Math.PI, 0); $.closePath(); $.fill(); //inner rings $.beginPath(); $.globalAlpha = 1; $.fillStyle = col; $.arc(n.x, n.y, 8 / Math.max((n.vx * n.vx + n.vy * n.vy), 0.8), 0, 2 * Math.PI, 0); $.closePath(); $.fill();
}
function go() { $.fillStyle = 'hsla(0,0%,0%,1)'; $.fillRect(0, 0, w, h); for (i = 0; i < num; i++) { upd(i); draw(i); }
};
run();
function run() { window.requestAnimationFrame(run); go();
}
Developer | Tiffany Rayside |
Username | tmrDevelops |
Uploaded | June 13, 2022 |
Rating | 4.5 |
Size | 2,428 Kb |
Views | 56,672 |
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 |
Transference | 3,021 Kb |
Omega Centauri | 4,197 Kb |
Curvature | 2,809 Kb |
GOOey | 5,088 Kb |
Legions | 3,557 Kb |
Birds of a Feather | 6,076 Kb |
Morph | 2,084 Kb |
Whizzzer | 5,048 Kb |
Spider Spring | 3,375 Kb |
Deliquescent | 3,211 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 |
DevCamp 2014 - Denver Public Library | See8ch | 5,033 Kb |
Responsive scrolling text | Ashdurham | 2,259 Kb |
Sticky footer testing | 75th | 1,649 Kb |
Lazy Load for Background Images | The_ruther4d | 2,977 Kb |
Slide out Menu | Rbiggs | 4,936 Kb |
Vanilla JS - A toggleClass function | Woodwork | 2,532 Kb |
Count checked checkboxes with jQuery | Mestika | 2,343 Kb |
Example SVGZ Data URI | Joeyhoer | 2,981 Kb |
Glitchy Text Effect | Kescoe | 2,208 Kb |
Svg animation draw | SzymonDziewonski | 5,545 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!