import Bilza, { Ui, hsl ,getRandom} from "../../src/bilza.js";

let bil = new Bilza("bilza", 70);

bil.background.color.set(hsl(240,100,15));
bil.alwaysOn().grid(10,10,"grey");
//--------------------
let startFrame = 0;
//--------------------
for (let row = 0; row < 100; row+=10) {
    for (let col = 0; col < 100; col+=10) {
        //....................................
        const comp = bil.add(startFrame,120).rect(hsl(getRandom(0,360)));
        comp.setPaddings(0);
        comp.lineWidth.set(4);
        // comp.showBackground.set(true);
        // comp.colorBackground.set(hsl(240,50,20));
        comp.border.set(0);
        comp.x.set(row);        
        comp.y.set(col);      
        comp.width.set(10);
        comp.height.set(10);
        startFrame++;  
        //....................................        
    }
}
//--------------------
const ui = new Ui(bil);
bil.draw();