]>
git.r.bdr.sh - rbdr/tomato-sauce/blob - lib/screens/random.js
0cacea7c20a5bd439206c2c2e931e3d00f5e7059
6 * @function RandomScreen
9 module
.exports = function (modulation
, width
, height
, renderer
) {
13 for (let i
= 0; i
< height
; ++i
) {
14 for (let j
= 0; j
< width
; ++j
) {
15 const red
= Math
.floor(Math
.random() * 255);
16 const blue
= Math
.floor(Math
.random() * 255);
17 const green
= Math
.floor(Math
.random() * 255);
19 response
= response
+ renderer(red
, blue
, green
);
20 response
= response
+ ' ';
24 response
= response
+ '\n';