-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathindex.html
More file actions
122 lines (105 loc) · 4.15 KB
/
index.html
File metadata and controls
122 lines (105 loc) · 4.15 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>reveal.js</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-markdown="source.md"
data-separator="^H:"
data-separator-vertical="V:"
data-separator-notes="^N:"
data-charset="utf-8">
</section>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/p5@1.0.0/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@1.0.0/lib/addons/p5.sound.js"></script>
<!-- Manager for p5 instances -->
<script src="js/p5Manager.js"></script>
<script>const p5Man = new p5Manager();</script>
<!-- p5 sketches -->
<script src="sketches/IllusorySquare.js"></script>
<script src="sketches/scintillating_grid.js"></script>
<script src="sketches/MullerLyer.js"></script>
<script src="sketches/Ebbinghaus.js"></script>
<script src="sketches/Zollner.js"></script>
<script src="sketches/MotionBinding.js"></script>
<script src="sketches/Anstis.js"></script>
<script src="sketches/cafe_wall.js"></script>
<script src="sketches/color_gradient.js"></script>
<script src="sketches/whites.js"></script>
<script src="sketches/watercolor.js"></script>
<script src="sketches/poggendorff.js"></script>
<script src="sketches/ponzo.js"></script>
<script src="sketches/MachBands.js"></script>
<script src="sketches/PenroseTriangle.js"></script>
<script src="sketches/checker.js"></script>
<script src="sketches/stroboscopicMotion.js"></script>
<script src="sketches/rotateSquare.js"></script>
<script src="sketches/lilacChaser.js"></script>
<script src="sketches/pinna.js"></script>
<script src="sketches/silencing.js"></script>
<script src="sketches/wagonWheel.js"></script>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
width: "100%",
height: "100%",
margin: 0,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
//added by Pierre
math: {
mathjax: 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
},
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true },
//added by Pierre
{ src: 'plugin/math/math.js', async: true }
]
});
window.onload = () => {
// Send active canvases
p5Man.initialize(getCanvases(Reveal.getCurrentSlide()));
Reveal.addEventListener('slidechanged', (e) => {
if (e.previousSlide)
p5Man.stopCanvases(getCanvases(e.previousSlide));
if (e.currentSlide)
p5Man.runCanvases(getCanvases(e.currentSlide));
});
};
getCanvases = (element) => {
return element.getElementsByTagName('canvas');
}
</script>
</body>
</html>