Tiles

Developer
Size
2,018 Kb
Views
12,144

How do I make an tiles?

What is a tiles? How do you make a tiles? This script and codes were developed by Pogany on 09 November 2022, Wednesday.

Tiles Previews

Tiles - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>tiles</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas id="canvas"></canvas> <script src="js/index.js"></script>
</body>
</html>

Tiles - Script Codes CSS Codes

body { background-color: #222; overflow: hidden; margin:0; padding:0;
}
canvas { background-color: #000;
}

Tiles - Script Codes JS Codes

var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var cw = canvas.width = window.innerWidth, cx = cw / 2;
var ch = canvas.height = window.innerHeight, cy = ch / 2;
ctx.strokeStyle = "#fff";
var rad = Math.PI / 180;
var step = 30;//cw/25;
var frames = 0;
function grad(h){
for( var y = 0; y < ch;y+=step){
for( var x = 0; x < cw; x+=step){ var hyp = Math.sqrt( cw*cw + ch*ch); var xy = Math.sqrt( x*x + y*y); var hue = map(xy, 0,hyp, 180, 240) + randomIntFromInterval(-5, +5); ctx.fillStyle = "hsl("+hue+", 100%,50%)"; ctx.fillRect(x,y,step,step);
}
}
}
grad(180)
function Draw() {
requestId = window.requestAnimationFrame(Draw);
//ctx.clearRect(0,0,cw,ch); frames+=.1; grad(frames)
}
//Draw();
function map(n, a, b, _a, _b) { var d = b - a; var _d = _b - _a; var u = _d / d; return _a + n * u;
}
function randomIntFromInterval(mn, mx) { return ~~(Math.random() * (mx - mn + 1) + mn);
}
Tiles - Script Codes
Tiles - Script Codes
Home Page Home
Developer Pogany
Username giaco
Uploaded November 09, 2022
Rating 3
Size 2,018 Kb
Views 12,144
Do you need developer help for Tiles?

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!

Pogany (giaco) Script Codes
Name
Basket
Circles
Swim Smooth
Helianthus
Mountains
Out of the blue
Tiles nr.2
Fuzzies
Matrix Falling Code
Create amazing web content with AI!

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!