LED wall active area: confine the output to a pixel-mapping rectangle
New 'Area LED' controls in the Schermo tab: W x H @ X,Y. Everything (canvas, videos, images, logos, ticker) lives in a #stage box whose transform makes it the containing block for the fixed layers, so resizing it confines the whole show at once, black outside. The canvas resizes to the stage, so shaders render at the wall's native resolution. Persisted in localStorage and re-pushed when the output window (re)starts; the recorder follows the canvas position. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c1b3f9c311
commit
de85639aaf
6 files changed
+80
-8
No files matched your search
+5
-1
@@ -72,7 +72,11 @@ class Visualizer {
|
||||
|
||||
resize() {
|
||||
const dpr = Math.min(window.devicePixelRatio || 1, 2);
|
||||
const w = Math.floor(window.innerWidth * dpr), h = Math.floor(window.innerHeight * dpr);
|
||||
// The canvas fills the #stage box (the LED active area), which is
|
||||
// normally the whole window but can be a smaller mapping rectangle.
|
||||
const cw = this.canvas.clientWidth || window.innerWidth;
|
||||
const ch = this.canvas.clientHeight || window.innerHeight;
|
||||
const w = Math.floor(cw * dpr), h = Math.floor(ch * dpr);
|
||||
if (this.canvas.width !== w || this.canvas.height !== h) { this.canvas.width = w; this.canvas.height = h; }
|
||||
this.gl.viewport(0, 0, w, h);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user