Canvas Geometry
How do I make an canvas geometry?
What is a canvas geometry? How do you make a canvas geometry? This script and codes were developed by John Urbank on 08 July 2022, Friday.
Canvas Geometry - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Canvas Geometry</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { width: 100%; height: 100%; background: rgb(23, 200, 129);
}
canvas { background: rgb(23, 200, 129);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</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>
Canvas Geometry - Script Codes CSS Codes
body { width: 100%; height: 100%; background: rgb(23, 200, 129);
}
canvas { background: rgb(23, 200, 129);
}
Canvas Geometry - Script Codes JS Codes
var body, canvas, ctx;
var pageW = window.innerWidth;
var pageH = window.innerHeight;
var TWO_PI = Math.PI * 2;
var init = function() { body = document.getElementsByTagName( 'body' ); canvas = document.createElement( 'canvas' ); body[0].appendChild( canvas ); canvas = document.getElementsByTagName( 'canvas' )[0]; ctx = canvas.getContext( "2d" ); canvas.width = pageW; canvas.height = pageH; window.onresize = function() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; draw(); }; draw();
}
var draw = function() { var x = canvas.width / 2, y = canvas.height / 2; var size = 210; for (var i=0; i<11; i++) { ctx.globalCompositeOperation = "xor"; ctx.beginPath(); ctx.arc(x, (y-size) + i*20, i*20, TWO_PI, false); ctx.lineWidth = 40; ctx.strokeStyle = 'rgba(0, 0, 0, '+ i/15 +')'; ctx.stroke(); ctx.closePath(); ctx.beginPath(); ctx.arc(x, (y+size) + i* -20, i*20, TWO_PI, false); ctx.lineWidth = 2; ctx.strokeStyle = 'rgba(0, 0, 0, '+ i/5 +')'; ctx.stroke(); ctx.closePath(); }
};
init();
Developer | John Urbank |
Username | jurbank |
Uploaded | July 08, 2022 |
Rating | 3 |
Size | 2,242 Kb |
Views | 48,576 |
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 |
Navicon - responsive nav pattern | 3,469 Kb |
Basic motion with JavaScript | 2,202 Kb |
Mouse Trailing | 3,268 Kb |
CSS Loading Animation | 3,495 Kb |
Gutterless Feature Grid | 3,013 Kb |
Logo Slider | 3,508 Kb |
A Pen by John Urbank | 2,984 Kb |
Simple jQuery Slider | 2,874 Kb |
Time is Money | 4,736 Kb |
Simple, CSS only, responsive menu | 2,615 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 |
Fixed Scrolling Nav Bar | Philsinatra | 0 Kb |
DFF Website | Hawcubite | 10,123 Kb |
Loading animation - freedom purchase | Rocbear | 2,567 Kb |
Table border-collapse property | Maxds | 1,672 Kb |
My Interests | Anshusaxenaarora | 2,015 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
Product item | Mymahesh11 | 2,256 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 Kb |
Ball physics | Blackkbot | 3,874 Kb |
Calendar | Miroot | 2,033 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!