xxxxxxxxxx
38
let points;
let point;
function preload() {
// Get the most recent earthquake in the database
let url = './points.json';
point = loadJSON(url);
}
function setup() {
points = point.a;
createCanvas(400, 400);
let maxX = 0;
let maxY = 0;
let maxZ = 0;
console.log(points.length);
for (let i = 0; i < points.length; i++){
if (Math.abs(points[i][0]) > maxX) maxX = points[i][0];
if (Math.abs(points[i][1]) > maxY) maxY = points[i][1];
if (Math.abs(points[i][2]) > maxZ) maxZ = points[i][2];
}
console.log(maxX);
console.log(maxY);
console.log(maxZ);
}
function draw() {
background(220);
}