-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (82 loc) · 3.53 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>MotionBrush</title>
<link rel="stylesheet" href="./styles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js" integrity="sha512-Gk+uNk8NWN235mIkS6B7/424TsDuPDaoAsUekJCKTWLKP6wlaPv+PBGfO7dbvZeibVPGW+mYidz0vL0XaWwz4w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="module" src="./index.js" type="text/javascript" defer></script>
<link rel="icon" href="./favicon.png">
</head>
<body>
<section id="banner">
<h3>SVG Motion Brush - Version 2</h3>
<p>Extract path from an SVG file, round corners, segment into series of arcs. Apply image texture.</p>
</section>
<div id="userInterface">
<div id="svgContainer"></div>
<div id="uploadArea">
<div id="dragAndDrop">
<p>File API & FileReader API not supported</p>
</div>
</div>
<div id="configArea">
<form id="inputParameters">
<div>
<label for="simplifyIncrement">Curve Simplification Increment<br/>
<span>Add a node at every # of Pixels along the Path.</span>
</label>
<input class="rangeSlider" type="range" min="1" max="500" id="simplifyIncrement" >
<input type="number" class="rangeValue">
</div>
<div>
<label for="segmentIncrement">Segment Increment<br/>
<span>Create a segment at every # of Pixels along the Path.</span>
</label>
<input class="rangeSlider" type="range" min="2" max="500" id="segmentIncrement" >
<input type="number" class="rangeValue">
</div>
<div>
<label for="roundedCornerRadius">Rounded Corner Radius<br/>
<span>Degree of roundedness applied to corners (pixels))</span>
</label>
<input class="rangeSlider" type="range" min="0" max="10" id="roundedCornerRadius" >
<input type="number" class="rangeValue">
</div>
<div>
<label for="sharpAngleThreshold">Sharp Angle Threshold<br/>
<span>The angle below which a corner is considered too sharp (degrees) </span>
</label>
<input class="rangeSlider" type="range" min="90" max="170" id="sharpAngleThreshold" >
<input type="number" class="rangeValue">
</div>
<div>
<label for="strokeThickness">Stroke Thickness<br/>
<span>The thickness of the stroke applied to the path. (pixels)</span>
</label>
<input class="rangeSlider" type="range" min="10" max="250" id="strokeThickness" >
<input type="number" class="rangeValue">
</div>
<div>
<label for="segmentOverlap">Segment Overlap<br/>
<span>A percentage by which segments are extended so as to overlap with the following segment. </span>
</label>
<input class="rangeSlider" type="range" min="0" max="50" id="segmentOverlap" >
<input type="number" class="rangeValue">
</div>
</form>
</div>
</div>
<main id="renderArea"></main>
<section id="imageMagick">
<p>Source image: </p>
<img id="srcImage" src="sloth-wide.jpg">
<br>
<br>
<p>Results: </p>
</section>
<footer>
<p>Created by <a href="https://nsitu.ca/">Harold Sikkema</a>. HTML5 drag-and-drop by <a href="http://jsfiddle.net/jimschubert/DqcUg/">jimschubert</a></p>
</footer>
</body>
</html>