-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
141 lines (113 loc) · 3.69 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<html>
<head>
<title>Transformation Matrix</title>
<style>
body {
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
font-size: 12px;
}
canvas {
border: 5px solid #ccc;
}
form {
overflow: hidden;
}
form legend {
font-weight: bold;
padding: 0;
}
form fieldset {
border: none;
padding: 0;
}
form .form-panel {
float: left;
width: 280px;
margin-right: 10px;
}
form #buttons {
width: 100%;
}
form label {
width: 45px;
float: left;
clear: left;
padding-right: 5px;
}
form .form-panel:first-of-type input {
width: 50px;
}
form .form-panel:first-of-type input,
form .form-panel:first-of-type select {
float: left;
box-sizing: border-box;
}
form button {
display: block;
float: left;
}
form button:first-of-type {
clear: both;
}
form ol {
padding: 0;
margin: 0;
}
form ol li {
display: block;
float: left;
}
form ol li:nth-child(3n+1) {
clear: left;
}
form ol li input {
width: 80px;
}
</style>
</head>
<body>
<h1>Transformation Matrix</h1>
<form novalidate>
<fieldset class="form-panel">
<legend>Preset Matrix</legend>
<p>Select an existing preset or set a custom matrix to the right.</p>
<label for="transformation-types">Type</label>
<select id="transformation-types">
<option value="">Manual</option>
<option value="translate-x">Translate X (px)</option>
<option value="translate-y">Translate Y (px)</option>
<option value="scale-x">Scale X (factor)</option>
<option value="scale-y">Scale Y (factor)</option>
<option value="rotate-cw">Rotate Clockwise (radians)</option>
<option value="rotate-ccw">Rotate Counter-Clockwise (radians)</option>
<option value="shear-x">Shear X (factor)</option>
<option value="shear-y">Shear Y (factor)</option>
</select>
<label for="transformation-type-value">Value</label>
<input type="number" value="0" id="transformation-type-value" />
</fieldset>
<fieldset class="form-panel">
<legend>Custom Matrix</legend>
<p>You may use <em>PI</em>, as well as <em>sin()</em> or <em>cos()</em>. Angles are in radians.</p>
<ol>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
<li><input type="number" name="cell" step="any" /></li>
</ol>
</fieldset>
<fieldset id="buttons">
<button type="submit">Apply</button>
<button type="reset">Reset</button>
</fieldset>
</form>
<canvas width="600" height="600"></canvas>
<p>By <a href="http://alexanderdickson.com">Alexander Dickson</a>.</p>
<script src="dist/bundle.js"></script>
</body>
</html>