xxxxxxxxxx
33
//Tile constructor(edgeLen, n_xStreets, n_zStreets, minDistStreets, streetWidth,blockOffset,maxHouseWidth)
let tiles = [];
let tile;
let h;
let g;
let colorBuildings;
let colorWindows;
function setup() {
createCanvas(1000, 1000, WEBGL);
colorBuildings = [color("#88777d"),color("#856349"),color("#a98d89"),color("#e3eded"),color("#938c9a")]
colorWindows = [color("#ffe0b2"),color("#ffb74d"),color("#e1f5fe"),color("#fff3e0"),color("#ffe0b2")]
tile = new Tile(1000, 4, 5, 100, 15, 5, 120);
//noStroke()
//h = new House(0, 0, 80, 100, 65);
//g = new Ground(1000,7,5,100,15);
}
function draw() {
background(22);
ambientLight(color(5));
directionalLight(color(50,50,35), 1,1,-1);
orbitControl();
tile.show();
let camX = mouseX - width / 2;
let camY = mouseY - width;
camera(camX, camY * 2, height / 2 / tan(PI / 6), 0, 0, 0, 0, 1, 0);
//noLoop();
}