xxxxxxxxxx
23
let weather;
function preload() {
weather = loadJSON("weatherMap.json");
}
function setup() {
createCanvas(400, 400);
console.log(weather);
}
function draw() {
background(220);
text(weather.name, 20, 20);
text(weather.main.temp + " degrees", 20, 40);
text("feels_like " + weather.main.feels_like, 20, 60);
text(weather.visibility + " visibility", 20, 80);
text(weather.wind.speed + " is the speed of the wind", 20, 100);
text(weather.weather[0].description, 20, 120);
}