Add cabaret's can patterns to the test show.
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>
This commit is contained in:
1 parent
e7e1cf656b
commit
4fd11445e8
9 files changed
+1622
-98
No files matched your search
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
Steps: play the steps written in the "steps" property, one after another.
|
||||
|
||||
steps is the steps separated by ";", each the pixels' colours as rrggbb hex
|
||||
separated by ",", left to right and then top to bottom. Missing pixels are
|
||||
off. The matrix's own colour is not used.
|
||||
|
||||
shows/test.qxw's can patterns use it (scripts/shows/can_patterns.py): each is
|
||||
one RGB matrix running for as long as the pattern does, so a chase started
|
||||
after it lands on top, where a chaser of scenes would start a newer scene
|
||||
every step. With a Mask blend, grey levels dim the colour under it.
|
||||
QLC+ loads it from ~/.qlcplus/rgbscripts, where can_patterns.py links it.
|
||||
*/
|
||||
|
||||
var testAlgo;
|
||||
|
||||
(
|
||||
function()
|
||||
{
|
||||
var algo = new Object;
|
||||
algo.apiVersion = 2;
|
||||
algo.name = "Steps";
|
||||
algo.author = "qlcplus shows";
|
||||
algo.acceptColors = 0;
|
||||
algo.properties = new Array();
|
||||
algo.steps = [[0]];
|
||||
algo.text = "000000";
|
||||
|
||||
algo.properties.push("name:steps|type:string|display:Steps|write:setSteps|read:getSteps");
|
||||
|
||||
algo.setSteps = function(_steps)
|
||||
{
|
||||
algo.text = _steps;
|
||||
algo.steps = String(_steps).split(";").map(function(step) {
|
||||
return step.split(",").map(function(hex) { return parseInt(hex, 16) || 0; });
|
||||
});
|
||||
};
|
||||
|
||||
algo.getSteps = function()
|
||||
{
|
||||
return algo.text;
|
||||
};
|
||||
|
||||
algo.rgbMap = function(width, height, rgb, step)
|
||||
{
|
||||
var pixels = algo.steps[step % algo.steps.length];
|
||||
var map = new Array(height);
|
||||
for (var y = 0; y < height; y++)
|
||||
{
|
||||
map[y] = new Array(width);
|
||||
for (var x = 0; x < width; x++)
|
||||
{
|
||||
var i = y * width + x;
|
||||
map[y][x] = i < pixels.length ? pixels[i] : 0;
|
||||
}
|
||||
}
|
||||
return map;
|
||||
};
|
||||
|
||||
algo.rgbMapStepCount = function(width, height)
|
||||
{
|
||||
return algo.steps.length;
|
||||
};
|
||||
|
||||
testAlgo = algo;
|
||||
return algo;
|
||||
}
|
||||
)();
|
||||
Reference in new issue
Block a user