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

+11
View File
@@ -75,6 +75,17 @@ async function ensureMicAccess() {
} catch (e) { /* getUserMedia will prompt again if needed */ }
}
// Camera permission is requested lazily (only when an interactive preset is
// activated), not at startup: no camera prompt for users who never use it.
ipcMain.handle('cam:ensure', async () => {
if (process.platform !== 'darwin') return true;
try {
const status = systemPreferences.getMediaAccessStatus('camera');
if (status !== 'granted') return await systemPreferences.askForMediaAccess('camera');
return true;
} catch (e) { return true; }
});
app.whenReady().then(async () => {
if (process.platform === 'darwin' && app.dock) {
try { app.dock.setIcon(path.join(__dirname, 'build', 'icon_1024.png')); } catch (e) { /* non-fatal */ }