JoanaChicau
1 year ago
1 changed files with 0 additions and 23 deletions
@ -1,23 +0,0 @@ |
|||||
/* based on tutorial #6: p5.js Sketch as Background @ The Code Train */ |
|
||||
|
|
||||
var canvas; |
|
||||
var mic; |
|
||||
|
|
||||
function windowResized() { |
|
||||
resizeCanvas(windowWidth,windowHeight) |
|
||||
} |
|
||||
|
|
||||
function setup () { |
|
||||
canvas = createCanvas(windowWidth,windowHeight) |
|
||||
canvas.position(0,0); |
|
||||
canvas.style('z-index', '-1') |
|
||||
mic = new p5.AudioIn(); |
|
||||
mic.start() |
|
||||
} |
|
||||
|
|
||||
function draw () { |
|
||||
background('#88afff'); |
|
||||
describe('canvas with light blue background'); |
|
||||
var vol = mic.getLevel(); |
|
||||
ellipse(width/2, height/2, vol*100) |
|
||||
} |
|
Loading…
Reference in new issue