Small orbitals
How do I make an small orbitals?
What is a small orbitals? How do you make a small orbitals? This script and codes were developed by Findoff on 03 October 2022, Monday.
Small orbitals - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>small orbitals</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
Small orbitals - Script Codes JS Codes
var canvas, ctx, w, h;
canvas = document.createElement('canvas');
document.body.appendChild( canvas );
document.body.style.margin = '0px';
document.body.style.padding = '0px';
document.body.style.overflow = 'hidden';
document.body.style.backgroundColor = '#000';
ctx = canvas.getContext('2d');
var part, samples;
document.body.onresize = function() { w = canvas.width = innerWidth; h = canvas.height = innerHeight; part = { dist: 0, a: 0, av: Math.PI/64, color: '#ff0', r: Math.min(w,h)/15, childs: [], //childs: [{dist:50,a:0,r:20,av:Math.PI/64}], }; samples = 20; while(samples>0) gen(part, part.r); part.tpos = [w/2, h/2]; part.ta = part.a; clearInterval(loopId); loopId = setInterval(loop, 16);
};
var loopId;
var light = [0,0];
function loop() { ctx.fillStyle = 'rgba(0,0,0,0.001)'; ctx.fillRect(0,0,w,h); processPart(part);
}
function gen(part, size) { if(samples<=0) return; if(Math.random()<0.6 && part.childs.length > 0) gen(part.childs[(Math.random()*part.childs.length)>>0], size/4) else { --samples; part.childs.push({ dist: size*2 + size*Math.random()*4, a: Math.random() * Math.PI * 2, av: Math.PI*2*(Math.random()-0.5)/size/size, r: size/3 + size/4*Math.random(), childs: [], color: 'hsl('+((Math.random()*360)>>0)+',100%,50%)', }); }
}
function processPart(part) { ctx.beginPath(); var la = Math.atan2(part.tpos[1]-light[1], part.tpos[0]-light[0]) - Math.PI/2; //ctx.arc(part.tpos[0], part.tpos[1], part.r, 0,Math.PI*2, 0); ctx.arc(part.tpos[0], part.tpos[1], 1, 0,Math.PI*2, 0); ctx.fillStyle = part.color; ctx.shadowBlur = 0; ctx.fill(); /*ctx.beginPath(); ctx.fillStyle = 'rgba(0,0,0, 0.8)'; ctx.shadowBlur = 15; ctx.shadowColor = '#000'; ctx.arc(part.tpos[0], part.tpos[1], part.r, 0+la,Math.PI+la, 0); ctx.fill();*/ for(var i=0; i<part.childs.length; ++i) { var t = part.childs[i]; t.ta = part.ta + t.a; t.tpos = [ part.tpos[0] + Math.cos(t.ta)*t.dist, part.tpos[1] + Math.sin(t.ta)*t.dist ]; processPart(t); t.a += t.av || 0; }
}
document.body.onresize();
Developer | Findoff |
Username | findoff |
Uploaded | October 03, 2022 |
Rating | 4 |
Size | 2,218 Kb |
Views | 22,264 |
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 |
Curved fractal | 2,430 Kb |
A Pen by findoff | 2,637 Kb |
Lightning | 2,284 Kb |
Stick waves 2 | 2,827 Kb |
Let it snow | 2,600 Kb |
The vortex | 3,730 Kb |
Deflectors vs asteroids | 3,565 Kb |
Screeps body calculator | 6,315 Kb |
Flawed text | 2,280 Kb |
Something with rockets | 3,513 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 |
Word Wrap Algorithm for Multiline Canvas Text | Peterhry | 2,349 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 Kb |
A Pen by Alexandru Pora | Axpro | 1,615 Kb |
FontAwesome icons with animation | Nicotinell | 2,083 Kb |
Next Word Predictor | Rfalor | 2,776 Kb |
BSP Dungeon Generation | Xgundam05 | 5,326 Kb |
Segments mouse following | Nosir | 2,909 Kb |
A Pen by Jim Savage | Madebyjam | 2,418 Kb |
Fullscreen Parallax | Bassta | 3,313 Kb |
Flat design iframe | Damienpm | 1,819 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!