-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsketch.js
37 lines (30 loc) · 995 Bytes
/
sketch.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Global variable to store the gallery object. The gallery object is
// a container for all the visualisations.
var gallery;
function setup() {
// Create a canvas to fill the content div from index.html.
canvasContainer = select('#app');
var c = createCanvas(1024, 576);
c.parent('app');
// Create a new gallery object.
gallery = new Gallery();
// Add the visualisation objects here.
gallery.addVisual(new TechDiversityRace());
gallery.addVisual(new TechDiversityGender());
gallery.addVisual(new PayGapByJob2017());
gallery.addVisual(new PayGapTimeSeries());
gallery.addVisual(new ClimateChange());
gallery.addVisual(new NationGDP());
gallery.addVisual(new Earthquake());
gallery.addVisual(new MeteoriteData());
gallery.addVisual(new PopulationTimeline());
}
function draw() {
background(255);
if (gallery.selectedVisual != null) {
gallery.selectedVisual.draw();
}
}
function mouseClicked(){
console.log(mouseX,mouseY);
}