folk-canvas/website/visualizing-set-relations.html

53 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shapes</title>
<style>
html {
height: 100%;
}
body {
z-index: -1;
min-height: 100%;
position: relative;
margin: 0;
}
folk-shape {
background: rgb(187, 178, 178);
&:hover {
z-index: 2;
}
}
h1 {
margin: 0;
width: fit-content;
}
</style>
</head>
<body>
<h1>This is a Convex Hull</h1>
<folk-shape x="50" y="100" width="50" height="50"></folk-shape>
<folk-shape x="200" y="200" width="50" height="50"></folk-shape>
<folk-hull sources="h1, body > folk-shape"></folk-hull>
<folk-shape x="100" y="300" width="50" height="50"></folk-shape>
<folk-hull sources="h1">
<folk-shape x="350" y="100" width="50" height="50"></folk-shape>
<folk-shape x="500" y="200" width="50" height="50"></folk-shape>
<folk-shape x="400" y="300" width="50" height="50"></folk-shape>
</folk-hull>
<script type="module">
import '../lib/standalone/folk-shape.ts';
import '../lib/standalone/folk-hull.ts';
</script>
</body>
</html>