This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Layer covering video</title> | |
<style type="text/css"> | |
html, body { | |
padding: 0px; | |
margin:0px; | |
} | |
#overlay { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
// Global frame rate is 30 fps | |
// 1 second = 30 frames | |
frameRate(30); | |
} | |
void draw() { | |
// Change the background once every 30 frames | |
// 30 frames is 1 second, so that means | |
// change the background at 1 fps | |
if(frameCount % 30 == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Swiped from https://github.com/annasob/processing-js | |
* This code searches for all the <script type="application/processing" target="canvasid"> | |
* in your page and loads each script in the target canvas with the proper id. | |
* It is useful to smooth the process of adding Processing code in your page and starting | |
* the Processing.js engine. | |
*/ | |
if (window.addEventListener) { | |
window.addEventListener("load", function() { | |
var scripts = document.getElementsByTagName("script"); | |
var canvasArray = Array.prototype.slice.call(document.getElementsByTagName("canvas")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JavaScript code by Sean Angley ported to Processing. | |
// Original: https://www.khanacademy.org/cs/energy-grid/5571983911682048 | |
//click to energize the grid | |
float a = 0; | |
float b = 0; | |
int dens = 8; //density - ! numbers higher than 20 may slow down your browser ! | |
float d; // must be initiazed after size(); | |
float e = 180; //energy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://funprogramming.org/76-Slowly-morphing-bezier-curves.html#comment-1520486548 | |
PGraphics pg; | |
void setup() { | |
size(500, 400); | |
pg = createGraphics(width, height); | |
} | |
void draw() { | |
background(255); | |
pg.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This scripts automatically updates text files when asset files are renamed | |
# Given page.md containing ![Image](/static/images/1234.jpg) | |
# if you rename the file 1234.jpg to awesome_jungle.jpg | |
# it will update page.md to ![Image](/static/images/awesome_jungle.jpg) | |
# Works on Linux (untested in Mac, where sed is slightly different). | |
# I place the script in my images/ folder and let it run while I rename images. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
size(displayWidth, displayHeight); | |
int[] colors = getColorLove(); | |
println(colors); | |
noStroke(); | |
for(float x=0; x<width; x+=random(100)) { | |
fill(colors[(int)random(colors.length)]); | |
rect(x, 0, width, height); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Processing 3.5.4 IDE - dark theme | |
# Updated version by @RandomGuy3015 | |
# File location: processing-3.5.4/lib/theme.txt | |
# Make a backup of the original theme.txt | |
# Then replace it with this code | |
# Code colors can be adjusted in the preferences.txt file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
SynthDef(\lemonade_dream, { | |
arg gate = 1, | |
freq = 440, | |
f2 = 500, | |
spreadf = 222, | |
sustain = 1, | |
amp = 0.1, | |
mix = 0.1, | |
release = 0.1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function()%20{%20var%20tag%20=%20document.createElement('style');%20tag.type%20=%20'text/css';%20document.getElementsByTagName('head')[0].appendChild(tag);%20tag[%20(typeof%20document.body.style.WebkitAppearance=='string')%20?%20'innerText'%20:%20'innerHTML']%20=%20'*%20{%20background-color:%20white%20!important;%20color:%20#444%20!important;%20%20}%20html%20{%20filter:%20invert(100%)%20grayscale(100%);%20}';%20})(); |
OlderNewer