Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (35 sloc) 1.58 KB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>chirimen-piano</title>
<meta name="description" content="chirimen-piano description">
<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="/manifest.json">
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script src="src/polyfill/polyfill.js"></script>
<script type="module" src="src/chirimen-piano-app/chirimen-piano-app.js"></script>
<script type="module" src="src/chirimen-piano-app/web-i2c.js"></script>
<script type="module" src="src/chirimen-piano-app/grove-gesture.js"></script>
<script type="module" src="src/chirimen-piano-app/grove-touch.js"></script>
</head>
<body>
<chirimen-piano-app></chirimen-piano-app>
<web-i2c>
<grove-touch slave-address="0x5a"></grove-touch>
<grove-gesture slave-address="0x73"></grove-gesture>
<div slot="no-web-i2c">
このデバイスはCHIRIMENではありませんが、ピアノ演奏はお楽しみいただけます。
</div>
</web-i2c>
<script>
document.querySelector('grove-touch').addEventListener('value-changed', e => {
document.querySelector('chirimen-piano-app').touchChanged(e.detail.value);
});
document.querySelector('grove-gesture').addEventListener('value-changed', e => {
document.querySelector('chirimen-piano-app').gestureChanged(e.detail.value);
});
</script>
</body>
</html>