Interactive camera family: webcam motion pushes physical balls on screen

New 'Interattivo Palle' family (interactive.js): frame-differencing motion map
from the webcam, ball physics (push-away forces, collisions, beat kicks),
palette-tinted rendering with motion mist. Camera is requested lazily and
released when switching preset; mouse/touch fallback when unavailable.
Excluded from Auto VJ so the camera never turns on by itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
lucianoandClaude Fable 5 committed 2026-07-29 21:35:38 +02:00
1 parent f2121c0fc5
commit ea31d68350
7 files changed
+429 -4

No files matched your search

+7
View File
@@ -94,6 +94,13 @@ class Visualizer {
render(timeSec, audio) {
const gl = this.gl, u = this.u, e = this.effect;
// Release the camera as soon as a non-interactive preset takes over.
if (this.inter && !e.isInteractive) this.inter.suspend();
if (e.isInteractive && window.InteractiveSim) {
if (!this.inter) this.inter = new window.InteractiveSim(gl);
this.inter.render(timeSec, audio, e, this.canvas);
return;
}
if (e.isFluid && window.FluidSim) {
if (!this.fluid) this.fluid = new window.FluidSim(gl);
this.fluid.render(timeSec, audio, e, this.canvas);