-
Notifications
You must be signed in to change notification settings - Fork 1
/
sketch.js
30 lines (25 loc) · 836 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
// 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 RoadVehiclesMiles());
gallery.addVisual(new TechDiversityRace());
gallery.addVisual(new RainbowTrout());
gallery.addVisual(new TechDiversityGender());
gallery.addVisual(new PayGapTimeSeries());
gallery.addVisual(new ClimateChange());
gallery.addVisual(new PayGapByJob2017());
}
function draw() {
background(255);
if (gallery.selectedVisual != null) {
gallery.selectedVisual.draw();
}
}