xxxxxxxxxx
22
// PlayPauseCamera (c) kouichi.matsuda@gmail.com
var camera; // カメラを管理する変数
var capturing = true;
function setup() {
noCanvas();
camera = createCapture(VIDEO);
}
function draw() {
}
function mouseClicked() {
if(capturing){
camera.stop();
} else {
camera.play();
}
capturing = !capturing;
}