-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
33 lines (29 loc) · 1.05 KB
/
index.html
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
<!doctype html>
<html>
<script src="slider.js"></script>
<head>
<link rel="stylesheet" href="http://elm-in-action.com/styles.css">
<link rel="stylesheet" href="http://elm-in-action.com/range-slider.css">
<script src="http://elm-in-action.com/range-slider.js"></script>
</head>
<body>
<div id="app"></div>
<script src="http://elm-in-action.com/pasta.js"></script>
<script src="app.js"></script>
<script>
const app = Elm.Main.init({
flags: Pasta.version,
node: document.getElementById("app")
});
app.ports.setFilters.subscribe((options) => {
requestAnimationFrame(() => {
Pasta.apply(document.getElementById("main-canvas"), options);
});
});
Pasta.addActivityListener((activity) => {
console.log('Sending activity to Elm', activity);
app.ports.activityChanges.send(activity);
});
</script>
</body>
</html>