Shapes in cricles
How do I make an shapes in cricles?
Triangle, quadrat, pentagon, hexagon. What is a shapes in cricles? How do you make a shapes in cricles? This script and codes were developed by Matthias Dittgen on 26 August 2022, Friday.
Shapes in cricles - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Shapes in cricles</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="space"></canvas>
<div id="info"> <h1>Shapes in circles</h1> <p>triangle, quadrat, pentagon, hexagon</p>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.0/lodash.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Shapes in cricles - Script Codes CSS Codes
html,
body { width: 100%; height: 100%; margin: 0;
}
body{ position: relative; background-color: #333333;
}
#info { position: absolute; top: 0px; left: 0px; margin: 12px 0 0 12px;
}
h1 { color: #eeeeee; font-size: 21px; font-weight: normal; margin: 0;
}
p, a { margin: 3px 0 0 0; color: #cccccc; font-size: 13px;
}
Shapes in cricles - Script Codes JS Codes
var main = (function () { var canvas, ctx; var deg360 = Math.PI*2; var poc = function (x, y, r, a) { return { x: x + r * Math.cos(a * deg360), y: y + r * Math.sin(a * deg360)}; }; var createPoints = function (x, y, r, segments, offset) { return _.times(segments+1, function (index) { return poc(x, y, r, index/segments + offset); }); }; var drawPoints = function (points,a) { ctx.beginPath(); _.forEach(points, function (item, index) { var f = (index==0?ctx.moveTo:ctx.lineTo); f.apply(ctx, [item.x, item.y]); }); ctx.lineWidth = 1; ctx.strokeStyle = 'rgba(240,200,40,'+a+')'; ctx.stroke(); }; var c = 0; var loop = function () { drawPoints(createPoints(100, 150, 80, 3, c), c); drawPoints(createPoints(300, 150, 80, 4, c), c); drawPoints(createPoints(100, 350, 80, 5, c), c); drawPoints(createPoints(300, 350, 80, 6, c), c); c += 0.05; if (c<1) setTimeout(arguments.callee, 1000/10); }; var start = function () { canvas = document.getElementById('space'); canvas.width = window.innerWidth; canvas.height = window.innerHeight; ctx = canvas.getContext('2d'); loop(); }; // domReady if (document.addEventListener) { document.addEventListener('DOMContentLoaded', function () { document.removeEventListener('DOMContentLoaded', arguments.callee, false); setTimeout(start, 0); }, false ); }
})();
Developer | Matthias Dittgen |
Username | matths |
Uploaded | August 26, 2022 |
Rating | 3 |
Size | 2,368 Kb |
Views | 34,408 |
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 |
Timebox | 4,202 Kb |
Additive color mix with triangles | 2,760 Kb |
Text-shadow spiral | 2,228 Kb |
Draw a line coord | 3,687 Kb |
Additive color mixing | 2,865 Kb |
1x1 trainer | 2,566 Kb |
Animating non-CSS property | 3,794 Kb |
Text-shadow fireworks | 2,430 Kb |
WIP | 2,592 Kb |
Moving lines illusion while scrolling | 3,358 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 |
Under construction | GhostRider | 1,642 Kb |
A Pen by Ben Babics | Benbabics | 2,957 Kb |
A Pen by Kevin | Kevinkenger | 2,642 Kb |
Cut and Paste Roll Link | BottomlineInteractive | 2,546 Kb |
Image Hover | Johnheiner | 3,409 Kb |
Tumblr API | Juanv911 | 2,436 Kb |
Drag n Drop | Martin42 | 2,594 Kb |
Commuter Line Tokyu 8500 | Pedox | 7,031 Kb |
Direction-icon | Alexandremasy | 3,323 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!