-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathreveal-to-d3-config.js
107 lines (100 loc) · 3.68 KB
/
reveal-to-d3-config.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* global d3 */
var pt = pt || {};
pt.slideIdToFunctions = {
'sketch-lines': {
init: () => {
pt.sketchLines.init();
},
'-1': () => {
// all the lines positioned by character, and also their names
var animateBefore = true;
var triggerForce = true;
pt.sketchLines.drawLines(hamiltonAllLines, animateBefore, triggerForce);
pt.sketchLines.drawSongs(hamiltonCharacters, 'middle');
pt.sketchLines.drawStaffs([]);
pt.sketchLines.drawCurves([]);
pt.sketchLines.drawThemes([]);
},
0: () => {
// lines grouped consecutively
// positioned by character, and also their names
var animateBefore = true;
var triggerForce = true;
pt.sketchLines.drawLines(hamiltonGroupedLines, animateBefore, triggerForce);
pt.sketchLines.drawSongs(hamiltonCharacters, 'middle');
pt.sketchLines.drawStaffs([]);
pt.sketchLines.drawCurves([]);
pt.sketchLines.drawThemes([]);
},
1: () => {
// fade in sketch notes, do no animating
var animateBefore = false;
var triggerForce = true;
pt.sketchLines.drawLines(hamiltonGroupedLines, animateBefore, triggerForce);
pt.sketchLines.drawSongs(hamiltonCharacters, 'middle');
pt.sketchLines.drawStaffs([]);
pt.sketchLines.drawCurves([]);
pt.sketchLines.drawThemes([]);
// so lower opacity of everything
pt.sketchLines.lowerOpacity();
},
2: () => {
pt.sketchLines.drawSongs([], 'start');
pt.sketchLines.drawStaffs([]);
pt.sketchLines.drawCurves([]);
pt.sketchLines.drawThemes([]);
var animateBefore = false;
var triggerForce = true;
// fade out sketch notes and first try at rectangular lines
// don't animate path before re-positioning
pt.sketchLines.drawLines(hamiltonLines, animateBefore, triggerForce, () => {
pt.sketchLines.drawSongs(hamiltonSongs, 'start');
});
},
3: () => {
// add in diamond theme, but nothing else should animate
var animateBefore = false;
var triggerForce = false;
pt.sketchLines.drawLines(hamiltonLines, animateBefore, triggerForce)
pt.sketchLines.drawSongs(hamiltonSongs, 'start');
pt.sketchLines.drawStaffs([]);
pt.sketchLines.drawCurves([]);
pt.sketchLines.drawThemes(hamiltonThemes);
},
4: () => {
// fade in second sketch note, do no animating
var animateBefore = false;
var triggerForce = true;
pt.sketchLines.drawLines(hamiltonLines, animateBefore, triggerForce)
pt.sketchLines.drawSongs(hamiltonSongs, 'start');
pt.sketchLines.drawStaffs([]);
pt.sketchLines.drawCurves([]);
pt.sketchLines.drawThemes(hamiltonThemes);
pt.sketchLines.lowerOpacity();
},
5: () => {
pt.sketchLines.drawSongs([], 'start');
pt.sketchLines.drawThemes([]);
// fade out sketch notes, animate in final lines and background staff and themes
var animateBefore = false;
var triggerForce = true;
pt.sketchLines.drawLines(hamiltonFinalLines, animateBefore, triggerForce, () => {
pt.sketchLines.drawSongs(hamiltonFinalSongs, 'start');
pt.sketchLines.drawStaffs(hamiltonFinalSongs);
pt.sketchLines.drawCurves(hamiltonFinalThemes);
});
},
6: () => {
// take away staff finally
var animateBefore = false;
var triggerForce = false;
pt.sketchLines.drawLines(hamiltonFinalLines, animateBefore, triggerForce);
pt.sketchLines.drawSongs(hamiltonFinalSongs, 'start');
pt.sketchLines.drawCurves(hamiltonFinalThemes);
pt.sketchLines.drawStaffs([]);
},
}
};
function removeSVGs() {
//Remove (heavy) all existing svg currently running
}//removeSVGs