xxxxxxxxxx
46
var canvas;
let table;
function setup() {
canvas = createCanvas(windowWidth, windowHeight);
background(250);
canvas.drop(gotFile);
textFont('Courier');
}
function draw() {
fill(20);
noStroke();
textSize(24);
textAlign(CENTER);
rectMode(CENTER);
fill(230);
rect(width/2,height/2,width/1.1,height/4,10);
fill(90);
text('drop centroid file here', width / 2, height / 2);
//noLoop();
}
function gotFile(file){
background(0);
//table = file.data;
table = loadTable(file,loaded);
//print(file.getRowCount());
//print(table.getRowCount());
text("Type of File: "+file.type, width / 2, height - 70);
text("File Name: "+file.name, width / 2, height - 50);
text("File Size: "+file.size, width / 2, height - 30);
}
function loaded(myTable)
{
print(myTable.getRowCount())
}