1bit waves

Developer
Size
1,919 Kb
Views
12,144

How do I make an 1bit waves?

What is a 1bit waves? How do you make a 1bit waves? This script and codes were developed by Elliot on 22 December 2022, Thursday.

1bit waves Previews

1bit waves - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>1bit waves</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas id="c" width=400 height=400></canvas> <script src="js/index.js"></script>
</body>
</html>

1bit waves - Script Codes CSS Codes

body { background: black;
}
canvas { position: relative; display: block; margin: 0 auto; border: 1px solid white
}

1bit waves - Script Codes JS Codes

const c = document.getElementById('c')
const ctx = c.getContext('2d')
let v = 0
let xoffset = 0
const draw = _ => {  v += 0.02  xoffset += 0.02 const waveLength = 36 const yOffset = -20 ctx.fillStyle = "black" ctx.fillRect(0,0,c.width,c.height) for(let p = 0; p < 460; p += 10) drawFunc( x=> Math.sin(xoffset + x/(waveLength + p/4)) * (Math.sin(v + p/20)*15) + p + yOffset ) window.requestAnimationFrame(draw)
}
draw()
//draws a function (f(x) = y) to the canvas
function drawFunc(f) { ctx.fillStyle = "white" for(let x = 0; x < c.width; x++) { const y = f(x) ctx.fillRect(x,y,1,1) }
}
1bit waves - Script Codes
1bit waves - Script Codes
Home Page Home
Developer Elliot
Username vez
Uploaded December 22, 2022
Rating 3
Size 1,919 Kb
Views 12,144
Do you need developer help for 1bit waves?

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!

Elliot (vez) Script Codes
Create amazing video scripts 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!