Rainbow Pinwheel - p5.js
How do I make an rainbow pinwheel - p5.js?
Drag/click for effect. What is a rainbow pinwheel - p5.js? How do you make a rainbow pinwheel - p5.js? This script and codes were developed by Tina Anastopoulos on 31 August 2022, Wednesday.
Rainbow Pinwheel - p5.js - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Rainbow Pinwheel - p5.js</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src='https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Rainbow Pinwheel - p5.js - Script Codes CSS Codes
body { background: #141432; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
canvas { border-radius: 50%;
}
Rainbow Pinwheel - p5.js - Script Codes JS Codes
var incr = 0;
var spiral = true;
function setup() { createCanvas(485, 485);
}
function draw() { background(0); var color = ['rgb(255, 0 , 0)', 'rgb(255, 127, 0)','rgb(255, 255, 0)','rgb(0, 255, 0)','rgb(0, 0, 255)','rgb(75, 0, 130)','rgb(148, 0, 211)']; translate(width/2, height/2); for (var i = 0; i < 84; i++) { fill(color[i%7]); bezier(200, 34, 300, 141, 63, 10, 49, 91); rotate((incr)); if (spiral) scale(1, 0.99); } incr += map(mouseX, 0, width, -.005, .005); pop();
};
function mousePressed() { spiral = !spiral;
}
![Rainbow Pinwheel - p5.js - Script Codes](http://shots.codepen.io/TWAIN/pen/OpGayd-512.jpg)
Developer | Tina Anastopoulos |
Username | TWAIN |
Uploaded | August 31, 2022 |
Rating | 4 |
Size | 2,190 Kb |
Views | 107,272 |
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 |
Game Boy - p5.js | 4,324 Kb |
Spinner | 6,488 Kb |
Crazy Eights | 3,070 Kb |
404 Page Not Found | 9,434 Kb |
People Graphic | 4,620 Kb |
Donut | 7,169 Kb |
Lens Illusion - p5.js | 2,366 Kb |
CSS Toaster | 4,766 Kb |
Cone Illusion | 2,732 Kb |
Fan Loader | 2,190 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 |
Simple jQuery Slider | Jurbank | 2,874 Kb |
Working around OS X Dynamic Scrollbars | Jrjenk | 2,279 Kb |
Simple Responsive Text | Fbrz | 2,282 Kb |
Canvas snow | Win7killer | 2,572 Kb |
Jochaho Skeleton | Dhanushbadge | 1,689 Kb |
Popup Modal | Aldlevine | 3,696 Kb |
WRENCH - STAFF | Lolita-adams | 1,608 Kb |
Fixed with using Calc | Tomleo | 2,542 Kb |
Perforated foil | 0x04 | 2,617 Kb |
Impress JS Algorhytmic Generator | Jeffscottward | 7,906 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!