Skip to content

Commit

Permalink
Totally intentional...very cool shit!
Browse files Browse the repository at this point in the history
  • Loading branch information
karismatic-megafauna committed Feb 13, 2016
1 parent 0a11849 commit ebebaf7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions js/episode-2/sinAndCos.js
Expand Up @@ -15,15 +15,16 @@ export const sinAndCos = {
const height = canvas.height = window.innerHeight;
const randNum = (Math.floor(Math.random() * 500) + 200);

context.translate(0, height / 2);
context.scale(1, -1);

let waveStep = 1;
let start = 0;
let waveStep = .09;
let start = 0;
let end = Math.PI * 2;
function render() {
debugger;
context.clearRect(0, 0, width, height);
context.clearRect(0, 0, canvas.width, canvas.height);

context.save();

context.translate(0, height / 2);
context.scale(1, -1);


let freq = end - start;
Expand All @@ -39,14 +40,13 @@ export const sinAndCos = {
context.fillStyle = 'black';
context.fillRect(x, y, 5, 5);
}
start = waveStep;
end = end + waveStep;
start = waveStep;
end = end + waveStep;

context.restore();
if (switcher.on) {
frameId = requestAnimationFrame(render);
}
waveStep++;
debugger;

}
render();
},
Expand Down

0 comments on commit ebebaf7

Please sign in to comment.