*/
module.exports = function (modulation, width, height, renderer) {
*/
module.exports = function (modulation, width, height, renderer) {
- for (let i = 0; i < height; ++i) {
- for (let j = 0; j < width; ++j) {
- const red = ((modulation + i) * 255 / height) % 255;
- const blue = ((modulation + j) * 255 / width) % 255;
- const green = ((modulation + i * j) * 255 / (width * height)) % 255;
+ for (let i = 0; i < height; ++i) {
+ for (let j = 0; j < width; ++j) {
+ const red = ((modulation + i) * 255 / height) % 255;
+ const blue = ((modulation + j) * 255 / width) % 255;
+ const green = ((modulation + i * j) * 255 / (width * height)) % 255;
- response = response + renderer(red, blue, green);
- response = response + ' ';
- }
+ response = response + renderer(red, blue, green);
+ response = response + ' ';
+ }