/
index.html
171 lines (162 loc) · 5.63 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!DOCTYPE html>
<html>
<head>
<title>Shaper Taper V2 🀺🁘🁊🁜 Generate repeatable Shaper Origin dominoes</title>
<meta charset="utf-8" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/seedrandom/2.4.3/seedrandom.min.js"></script>
<link
href="https://fonts.googleapis.com/css?family=Stardos+Stencil"
rel="stylesheet"
/>
<link rel="stylesheet" href="shaper-taper.css" />
<meta property="og:title" content="Shaper Taper V2">
<meta property="og:description" content="Generate repeatable Shaper Origin dominoes">
<meta property="og:image" content="https://repository-images.githubusercontent.com/125921973/623e5080-c83e-11ea-9555-989268d060ef">
<meta property="og:url" content="https://wraybowling.github.io/shaper-taper/">
<meta name="twitter:card" content="summary_large_image">
</head>
<body>
<svg height="0" width="0" style="display: none;">
<defs>
<rect
id="domino_body"
width="1.7in"
height="0.5in"
rx="0.1in"
style="fill:black; stroke:none;"
/>
<circle id="domino_dot" cx="0" cy="0" r="0.05in" style="fill: white;" />
</defs>
</svg>
<div id="app">
<div class="hello">
<h2>Shaper Taper V2</h2>
<p>Generate repeatable <a href="https://www.shapertools.com/">Shaper Origin</a> domino fiducials from your project name</p>
<p class="if-safari warning">Safari Detected: a fix has been applied. If your domino is still not ½in tall, use a different browser.</p>
</div>
<nav>
<div class="options">
<label>
Dominoes<br>
<input type="number" v-model="dominoCount" min="1" max="373" />
</label>
<label>
↕ Row Spacing (inches)<br>
<input type="number" v-model="rowSpacing" min="0.1" step="0.1" />
</label>
<label>
↔ Column Spacing (inches)<br>
<input type="number" v-model="columnSpacing" min="0.1" step="0.1" />
</label>
<button class="print-button" onClick="window.print()">Print</button>
</div>
</nav>
<h1>
<!-- {{randomSeed}} -->
<label>
<!-- Project Name<br> -->
<input type="text" v-model="randomSeed" placeholder="Type Your Project Name Here" class="project-name" />
</label>
</h1>
<div
class="domino-grid"
:style="{ 'grid-column-gap': columnSpacing+'in', 'grid-row-gap': rowSpacing+'in'}"
>
<!-- <domino-template dots="permutation[d]"/> -->
<div v-for="d in permutation" class="domino">
<svg width="1.7in" height="0.5in">
<use xlink:href="#domino_body" x="0" y="0" />
<!-- dots that never go away -->
<use xlink:href="#domino_dot" x="0.15in" y="0.15in" />
<use xlink:href="#domino_dot" x="0.15in" y="0.35in" />
<use xlink:href="#domino_dot" x="1.55in" y="0.15in" />
<use xlink:href="#domino_dot" x="1.55in" y="0.35in" />
<!-- row 1 (left to right) -->
<use
xlink:href="#domino_dot"
x="0.35in"
y="0.15in"
v-if="d[0][0]"
/>
<use
xlink:href="#domino_dot"
x="0.55in"
y="0.15in"
v-if="d[0][1]"
/>
<use
xlink:href="#domino_dot"
x="0.75in"
y="0.15in"
v-if="d[0][2]"
/>
<use
xlink:href="#domino_dot"
x="0.95in"
y="0.15in"
v-if="d[0][3]"
/>
<use
xlink:href="#domino_dot"
x="1.15in"
y="0.15in"
v-if="d[0][4]"
/>
<use
xlink:href="#domino_dot"
x="1.35in"
y="0.15in"
v-if="d[0][5]"
/>
<!-- row 2 (right to left) -->
<use
xlink:href="#domino_dot"
x="1.35in"
y="0.35in"
v-if="d[1][0]"
/>
<use
xlink:href="#domino_dot"
x="1.15in"
y="0.35in"
v-if="d[1][1]"
/>
<use
xlink:href="#domino_dot"
x="0.95in"
y="0.35in"
v-if="d[1][2]"
/>
<use
xlink:href="#domino_dot"
x="0.75in"
y="0.35in"
v-if="d[1][3]"
/>
<use
xlink:href="#domino_dot"
x="0.55in"
y="0.35in"
v-if="d[1][4]"
/>
<use
xlink:href="#domino_dot"
x="0.35in"
y="0.35in"
v-if="d[1][5]"
/>
<!-- left to right version for visual debugging -->
<!-- <use xlink:href="#domino_dot" x="0.3345714in" y="0.35in" v-if="d[1][0]"/>
<use xlink:href="#domino_dot" x="0.5341428in" y="0.35in" v-if="d[1][1]"/>
<use xlink:href="#domino_dot" x="0.7237143in" y="0.35in" v-if="d[1][2]"/>
<use xlink:href="#domino_dot" x="0.922857in" y="0.35in" v-if="d[1][3]"/>
<use xlink:href="#domino_dot" x="1.118571in" y="0.35in" v-if="d[1][4]"/>
<use xlink:href="#domino_dot" x="1.314286in" y="0.35in" v-if="d[1][5]"/> -->
</svg>
</div>
</div>
</div>
<script src="shaper-taper.js"></script>
</body>
</html>