Processing.js Playground
How do I make an processing.js playground?
Testing…. What is a processing.js playground? How do you make a processing.js playground? This script and codes were developed by Christian Fleschhut on 11 August 2022, Thursday.
Processing.js Playground - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Processing.js Playground</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/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas id='c1'></canvas> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Processing.js Playground - Script Codes CSS Codes
@import "bourbon";
Processing.js Playground - Script Codes JS Codes
function sketchProc(p) { p.setup = function() { p.size(200, 200); p.stroke(255); }; // Override draw function, by default it will be called 60 times per second p.draw = function() { // determine center and max clock arm length var centerX = p.width / 2, centerY = p.height / 2; var maxArmLength = Math.min(centerX, centerY); function drawArm(position, lengthScale, weight) { p.strokeWeight(weight); p.line(centerX, centerY, centerX + Math.sin(position * 2 * Math.PI) * lengthScale * maxArmLength, centerY - Math.cos(position * 2 * Math.PI) * lengthScale * maxArmLength); } // erase background p.background(51); var now = new Date(); // Moving hours arm by small increments var hoursPosition = (now.getHours() % 12 + now.getMinutes() / 60) / 12; drawArm(hoursPosition, 0.5, 3); // Moving minutes arm by small increments var minutesPosition = (now.getMinutes() + now.getSeconds() / 60) / 60; drawArm(minutesPosition, 0.8, 2); // Moving hour arm by second increments var secondsPosition = now.getSeconds() / 60; drawArm(secondsPosition, 0.9, 1); };
}
var canvas = document.getElementById("c1");
var processingInstance = new Processing(canvas, sketchProc);
Developer | Christian Fleschhut |
Username | cfleschhut |
Uploaded | August 11, 2022 |
Rating | 3 |
Size | 2,392 Kb |
Views | 28,336 |
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 |
Sass random fn | 4,849 Kb |
Backbone.js Playground | 2,812 Kb |
AngularJS tutorial app | 4,565 Kb |
Starting out with Ember.JS | 4,808 Kb |
HubSpot Odometer Quicktest | 2,641 Kb |
Playing with firebase | 3,175 Kb |
AngularJS comments form | 3,280 Kb |
Json data for todolist | 1,615 Kb |
React-Bootstrap sandbox | 2,936 Kb |
Bootstrap 3 Playground | 2,594 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 |
Parallax-ish Sliding Content | Jdsteinbach | 2,748 Kb |
Ghost | Mghayour | 11,738 Kb |
Simple blog concept | Drew_mc | 2,666 Kb |
Animated bar chart | CreativePunch | 3,124 Kb |
Calendar | Miroot | 2,033 Kb |
Smoke Shader - Frame Buffer | Omarshe7ta | 2,672 Kb |
Airbnb Homepage | SindhujaD | 2,480 Kb |
STIKHOI | Denmch | 7,122 Kb |
Animated SVG stroke-dasharray | Netsi1964 | 3,179 Kb |
12 DAYS OF XMAS | Proto78 | 2,313 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!