mirror of
https://github.com/rough-stuff/rough.git
synced 2026-02-16 00:16:21 -05:00
samples
This commit is contained in:
22
examples/sample.html
Normal file
22
examples/sample.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>RoughJS sample</title>
|
||||
<script src="../dist/rough.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const rough = new RoughCanvas(document.getElementById('canvas'), 800, 800);
|
||||
rough.rectangle(5, 5, 90, 90);
|
||||
rough.circle(80, 170, 50);
|
||||
rough.ellipse(300, 100, 150, 80);
|
||||
rough.line(80, 170, 300, 100);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user