This browser has no WebGPU, so the sketch cannot run here. The program is below, and it runs in a current Chrome, Edge or Safari.
Webcam 3D
trace image history for a live webcam feed
/////////////////////////////////////////////
// webcam-3d
// trace image history for a live webcam feed
// open :project>imputs to select camera
/////////////////////////////////////////////
#cam{
dim = (640, 480,1);
run = <webcam>;
}
#two{
dim = (64,64,64);
run =
add(
mlt(lrg(C.z, 0.9), #cam[ mlt(C, (0.75, 1, 1)) ]),
mlt(sml(C.z, 0.9), #(0,0,1) )
);
}
~two{
dim = (64,64,64);
col = #two;
pos = (0,0,0);
scl = (1,1, 1);
i_scl = mlt(0.75, sml(#two.x, 0.85));
shape = CUBE;
}
~cam{
col = #cam;
pos = (-2,0,0);
scl = mlt(0.25, (-1, 0.75, 1));
}