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
function glitchTransition(){ | |
this.canvas = document.getElementById("transition"); | |
this.c = this.canvas.getContext('2d'); | |
this.img = document.createElement('img'); | |
this.img.onerror = function(e){ | |
e.src = ''; | |
} | |
this.nextimg = ""; | |
//this.feed = document.createElement('img'); | |
this.tt = 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
var palette = ['#b8cab5','#9fc3bc','#338ab3']; | |
var frame = window.setInterval(framedraw,40); | |
var blitx = new Array(); | |
var canvas = document.getElementById('cc'); | |
var c = canvas.getContext('2d'); | |
for(var i = 0;i<100;i++){ | |
blitx[i] = new Blit(Math.random()*800,Math.random()*400,10,10); | |
blitx[i].vx = Math.random()*5-2.5; | |
blitx[i].vy = Math.random()*5-2.5; | |
} |
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
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || | |
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; | |
window.requestAnimationFrame = requestAnimationFrame; | |
var canvas = document.getElementById('bb'); | |
var cc = canvas.getContext('2d'); | |
var swing = 0; | |
var swinger = -0.008; | |
var armswing = 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
var canvas = document.getElementById('cvs'), | |
c = canvas.getContext('2d'), | |
ocan = document.createElement("canvas"), | |
oc = ocan.getContext('2d'); | |
ocan.width=canvas.width; | |
ocan.height=canvas.height; | |
var offx = canvas.offsetLeft; | |
var offy = canvas.offsetTop; | |
var lastX = 0,lastY=0; | |
var active = 0; |