/* 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; } )();