1bit waves
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 - 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) }
}
Developer | Elliot |
Username | vez |
Uploaded | December 22, 2022 |
Rating | 3 |
Size | 1,919 Kb |
Views | 12,144 |
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 |
Webgl sh | 2,401 Kb |
Js heap | 1,724 Kb |
Vid player | 2,513 Kb |
Beam button hover and split | 2,005 Kb |
Simple Collatz Generator | 1,706 Kb |
Weird ES6 Shenanigans | 1,885 Kb |
Sierpinski carpet | 1,746 Kb |
A Pen by Elliot | 1,664 Kb |
Interactive mandelbrot set | 2,341 Kb |
Drag and drop image 1bitifier | 2,087 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 |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
RollOver Effect 2 | Lmack90 | 2,162 Kb |
Slider css only | Armandobau | 2,161 Kb |
Twitch Live Channels | Inkblotty | 4,956 Kb |
Scoreboard.js basic usage | Tbleckert | 1,733 Kb |
Responsive slide | Thorien | 2,400 Kb |
Shop Talk logo made in CSS | Hugo | 19,368 Kb |
A Pen by Kevin | Kevinkenger | 2,642 Kb |
Transition | Shayhowe | 1,632 Kb |
Next Word Predictor | Rfalor | 2,776 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!