Add bezier demo

This commit is contained in:
2024-08-07 11:48:07 +02:00
parent f5a53bdcc1
commit bab3208e61
2 changed files with 241 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>bezier</title>
<style>
body {
margin: 0;
overflow: hidden;
font-family: Helvetica, Arial, sans-serif;
}
canvas {
display: block;
}
.canvas {
width: 100vw;
height: 100vh;
}
.legend {
position: absolute;
left: 2em;
top: 2em;
color: white;
border: 1px dashed;
padding: 1em;
white-space: pre-wrap;
}
.legend.--hidden {
display: none;
}
.smol {
font-size: .7em;
}
</style>
</head>
<body>
<div class="canvas"></div>
<div class="legend">j, k: Select vertex
h, l: Select recursion depth
<span class="smol">⬅⬆⬇➡</span>: Move selected vertex
?: hide/unhide this tooltip</div>
<script src="./bezier.js"></script>
</body>
</html>