mirror of
https://github.com/rough-stuff/rough.git
synced 2026-01-14 17:07:58 -05:00
30 lines
629 B
HTML
30 lines
629 B
HTML
<!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>RoughJS linear path</title>
|
|
</head>
|
|
|
|
<body>
|
|
<canvas width="800" height="800"></canvas>
|
|
|
|
<script type="module">
|
|
import rough from '../../bin/rough.js';
|
|
const canvas = document.querySelector('canvas');
|
|
const rc = rough.canvas(canvas);
|
|
|
|
rc.linearPath([
|
|
[10, 10],
|
|
[200, 10],
|
|
[100, 100],
|
|
[100, 50],
|
|
[300, 100],
|
|
[60, 200]
|
|
], { stroke: 'orange', strokeWidth: 4 });
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html> |