ub-movements/index.html

94 lines
2.1 KiB
HTML
Raw Permalink Normal View History

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>UvA UB - movements</title>
<style>
#canvas {
/* background: white; */
position: absolute;
top: 0;
left: 0;
transform-origin: top left;
margin: 0;
padding: 0;
overflow: hidden;
}
@font-face {
font-family: 'Fluxisch Mono', sans-serif;
src:
url(assets/fonts/FluxischElse-Regular.woff) format('woff');
font-weight: normal;
}
@font-face {
font-family: 'Fluxisch Mono', sans-serif;
src:
url(assets/fonts/FluxischElse-Light.woff) format('woff');
font-weight: 200;
}
@font-face {
font-family: 'Fluxisch Mono', sans-serif;
src:
url(assets/fonts/FluxischElse-Bold.woff) format('woff');
font-weight: bold;
}
/* #libraries g circle{
animation-timing-function: easeInOutCubic;
} */
#libraries g.send circle:nth-child(2){
animation: send .5s 1 cubic-bezier(0.22, 1, 0.36, 1);
/* fill: red; */
}
#libraries g.recv circle:nth-child(2){
fill: rgba(199, 162, 217, 0.0)
}
#libraries g.recv circle:nth-child(2){
/* fill: blue; */
animation: recv 1s 1;
}
@keyframes send {15% {opacity: 1} 40%{r:25px; opacity:0;} 41% {r:10px; opacity:0.05} 100% {r: 20px; opacity:1}}
@keyframes recv {50%{fill: rgba(199, 162, 217, 0.3);}}
/* @keyframes recv {50%{transform:rotateY(180deg);}} */
body {
background: black;
}
</style>
<script>
function scaleToFit() {
const el = document.getElementById('canvas');
const sw = window.innerWidth / parseInt(el.style.width);
const sh = window.innerHeight / parseInt(el.style.height);
const s = Math.min(sw, sh);
canvas.style.transform = `scale(${s * 100}%)`;
}
window.addEventListener('resize', scaleToFit);
window.addEventListener('load', scaleToFit);
</script>
</head>
<body>
<div id="canvas">
<div id="viz">
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>