Skip to content

Instantly share code, notes, and snippets.

Avatar

Rune Skjoldborg Madsen runemadsen

View GitHub Profile
View lineup.txt
Welcome (4:30 PM - 4:50 PM)
Workshops (5:00 PM - 6:20 PM)
Beginners Workshop: Getting Started with P5.js by Kristian Gårdhus Wichmann
Are you new to creative coding and programming? Fear not! This workshop will get you started immediately with the p5js library. Using the online editor, magic will happen in your browser in no time. Kristian spent his teenage years programming his Commodore 64. Later in life, while teaching secondary school, his interest in coding was rekindled by the youtube channel The Coding Train. Kristian currently works as a data scientist at Blackwood Seven.
Intermediate Workshop: Processing + Graphic Design = ❤️ by Stig Møller Hansen
View audio.js
var AudioContext = AudioContext || webkitAudioContext;
var context = new AudioContext;
var audios = document.getElementsByClassName("audio")
var audio = audios[2];
for (var i = 0; i < audios.length; i++) {
audios[i].src = "music/music" + (i) + ".wav";
audios[i].preload = "auto";
audios[i].muted = true;
View arduino.cc
boolean ledState = false;
int lastButtonState = 0;
void setup() {
pinMode(4, INPUT);
pinMode(7, OUTPUT);
Serial.begin(9600);
}
void loop() {
View iceberg.js
function setup() {
createCanvas(600, 600);
noiseDetail(4, 0.75);
noiseSeed(3);
}
function draw() {
background(30);
var noiseStep = frameCount/100;
View midiconvert.js
var midi = MidiConvert.create()
midi.track()
.patch(32)
.note(60, 0, 2)
.note(63, 1, 2)
.note(60, 2, 2);
var data = 'data:audio/midi;base64,' + btoa(midi.encode())
var element = document.createElement('a');
element.setAttribute('href', data);
View intersection.js
var canvasX = 200;
var canvasY = 300;
var canvasWidth = 600;
var canvasHeight = 300;
function intersection(rect1, rect2) {
var x1 = rect2.x, y1 = rect2.y, x2 = x1+rect2.width, y2 = y1+rect2.height;
if (rect1.x > x1) { x1 = rect1.x; }
if (rect1.y > y1) { y1 = rect1.y; }
if (rect1.x + rect1.width < x2) { x2 = rect1.x + rect1.width; }
View README.md
  1. Copy the content below into the URL field of a Chrome bookmark
  2. Go to the game you want to see.
  3. It will pop up a window saying "starting a 5 minute demo". Click "Okay"
  4. Run this bookmark

Watch the game :)

View rotations.js
// This example requires you to add TweenLite.js and Easepack.js to your HTML file.
var r = new Rune({
container: "#canvas",
width: 800,
height: 600
});
function drawTile(x, y) {
View bruce.js
var r = new Rune({
container: "#canvas",
width: 800,
height: 600
});
var bruce = new Rune.Pixels("bruce.jpg");
function drawRect(x, y, w, h)
{
View fill.js
var r = new Rune({
container: "#canvas",
width: 800,
height: 600
});
var myPoly = r.polygon(400, 200)
.lineTo(0, 0)
.lineTo(200, 50)
.lineTo(250, 60)
You can’t perform that action at this time.