Eight of make_cabaret_vc.py's Can Patterns on the cans pads 1-8, in a Can patterns solo frame in place of the pads frame's empty Buttons 53-60: Theater, Rainbow, Odd Even, Left Right, Scanner (with a fading tail), Fill, Center and Pairs, laid out for the test show's cans and walking the ring round the room (scripts/shows/can_patterns.py). Collapse and Chase Out are left out. The masks show the Colour 1 colour; Odd Even (a checkerboard) and Left Right swap between Colour 1 and Colour 2 through four Matrix widgets in the Chase colours frame. All of them follow the cans' Speed dial (knob 1). Each pattern is RGB matrices running from start to stop (rgbscripts/steps.js and swap.js, linked into ~/.qlcplus/rgbscripts), so a chase started over one lands on top, and the pad controller restarts the pattern that is on just after a Colour 1 press so the new colour scene doesn't cover it. The row of 4 (#3-#6) never animates; CLAUDE.md now says so for whatever comes next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
/*
|
|
Swap: every pixel in one colour, then every pixel in the other.
|
|
|
|
Two steps, all pixels lit with the step's colour. Give the RGB matrix a start
|
|
and an end colour and QLC+ hands step 0 the start colour and step 1 the end
|
|
colour, so the matrix swaps between them; with a fade in it crossfades.
|
|
|
|
shows/test.qxw's Odd Even and Left Right cans patterns use it, two matrices
|
|
at once with their colours the other way round (scripts/shows/can_patterns.py).
|
|
QLC+ loads it from ~/.qlcplus/rgbscripts, where can_patterns.py links it.
|
|
*/
|
|
|
|
var testAlgo;
|
|
|
|
(
|
|
function()
|
|
{
|
|
var algo = new Object;
|
|
algo.apiVersion = 2;
|
|
algo.name = "Swap";
|
|
algo.author = "qlcplus shows";
|
|
algo.acceptColors = 2;
|
|
algo.properties = new Array();
|
|
|
|
algo.rgbMap = function(width, height, rgb, step)
|
|
{
|
|
var map = new Array(height);
|
|
for (var y = 0; y < height; y++)
|
|
{
|
|
map[y] = new Array(width);
|
|
for (var x = 0; x < width; x++)
|
|
map[y][x] = rgb;
|
|
}
|
|
return map;
|
|
};
|
|
|
|
algo.rgbMapStepCount = function(width, height)
|
|
{
|
|
return 2;
|
|
};
|
|
|
|
testAlgo = algo;
|
|
return algo;
|
|
}
|
|
)();
|