shape-points
Version:
Generate points for simple shapes and curves: arcs, rectangles, rounded rectangles, circles, ellipses, bezierCurveTo, bezierCurveThrough (i.e., bezier curves through specific points)
46 lines (40 loc) • 1.17 kB
HTML
<head>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/ascetic.min.css">
<style>
body {
margin: 0;
padding: 0;
}
.title {
margin-top: 1%;
margin-left: 15%;
font-size: 200%;
}
#code {
left: 15%;
width: 80%;
position: absolute;
word-wrap: break-word;
z-index: -1;
}
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: rgba(0, 0, 100, 0.02);
}
.hljs-comment {
color: blue;
}
.font {
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
font-size: 1.25em;
}
</style>
<script src="index.js"></script>
</head>
<body>
<canvas id="canvas"></canvas>
<div class="title">Example for <a href="https://github.com/davidfig/shape-points/">github.com/davidfig/shape-points/</a></div>
<pre><code class="javascript" id="code"></code></pre>
</body>