Initial commit: DJ Visualizer
Electron app with audio-reactive fractal/abstract visuals on an external display. Dual-window setup (control panel + fullscreen output), 8 WebGL scenes, audio from file/live input/system audio, image and scrolling-text overlays. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
b32ea47ae5
14 files changed
+5748
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
const { contextBridge, ipcRenderer, webUtils } = require('electron');
|
||||
|
||||
// Each window is launched with --role=control or --role=output.
|
||||
const roleArg = process.argv.find(a => a.startsWith('--role='));
|
||||
const role = roleArg ? roleArg.split('=')[1] : 'control';
|
||||
|
||||
contextBridge.exposeInMainWorld('djv', {
|
||||
role,
|
||||
// Control -> Output commands.
|
||||
send: (msg) => ipcRenderer.send('ctl', msg),
|
||||
onControl: (cb) => ipcRenderer.on('ctl', (_e, m) => cb(m)),
|
||||
// Output -> Control reports.
|
||||
report: (msg) => ipcRenderer.send('rpt', msg),
|
||||
onReport: (cb) => ipcRenderer.on('rpt', (_e, m) => cb(m)),
|
||||
// Display management (control window).
|
||||
// Resolve a dropped/picked File to its absolute filesystem path.
|
||||
pathForFile: (file) => {
|
||||
try { return webUtils.getPathForFile(file); }
|
||||
catch (e) { return file && file.path ? file.path : null; }
|
||||
},
|
||||
listDisplays: () => ipcRenderer.invoke('displays:list'),
|
||||
moveOutputTo: (id) => ipcRenderer.invoke('output:moveTo', id),
|
||||
toggleOutputFullscreen: () => ipcRenderer.invoke('output:toggleFullscreen')
|
||||
});
|
||||
Reference in new issue
Block a user