-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
cpedit.pug
101 lines (101 loc) · 4.26 KB
/
cpedit.pug
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
doctype html
html
head
meta(charset="utf-8")
title Crease Pattern Editor
script(src='node_modules/@svgdotjs/svg.js/dist/svg.min.js')
script(src='node_modules/fold/dist/fold.js')
script(src='cpedit.js')
style
include:stylus cpedit.styl
body
#menu
.input.clickable
input#loadFold(type='button', value='Load FOLD 1.2', title='Load previously saved .fold file (including cut edges), previously named .cp files (which also work)')
input#fileFold(type='file', style='display: none')
.input.clickable
input#downloadFold(type='button', value='Save FOLD 1.2', title='For reloading with this editor, and other software supporting cut edges')
a#download
.input.clickable
input#downloadSplitFold(type='button', value = 'Export FOLD w/o cuts', title='Separate all cuts into boundaries. For most software supporting .fold, including Freeform Origami and Origami Simulator. Do not reload with this editor.')
.input.clickable
input#downloadSVG(type='button', value='Export SVG', title='For Origami Simulator or paper figures')
.input.clickable
input#simulate(type='button', value='Simulate', title='Launch Origami Simulator in a new window with current pattern')
.input.clickable
input#cleanup(type='button', value='Cleanup', title='Clean up unneeded straight vertices')
hr
.input
input#title(type='text', placeholder='Title')
.input
label Width
span.number#width 4
button#widthDec −
button#widthInc +
.input
label Height
span.number#height 4
button#heightDec −
button#heightInc +
.input
label Transform:
.stack
.row
button#reflectX(title="Reflect horizontally") ⇹
button#reflectY(title="Reflect vertically") ↕
button#rotateCCW(title="Rotate 90° counterclockwise") ⟲
button#rotateCW(title="Rotate 90° clockwise") ⟳
.row
button#shiftL(title="Shift left") ←
button#shiftD(title="Shift down") ↓
button#shiftU(title="Shift up") ↑
button#shiftR(title="Shift right") →
hr
.input.clickable
input#undo(type='button', value='Undo', title='Shortcut: z or ctrl-z')
.input.clickable
input#redo(type='button', value='Redo', title='Shortcut: y or shift-z or ctrl-y or ctrl-shift-z')
hr
.input.clickable
input#drawLine(type='radio', name='mode', checked)
label(for='drawLine') Draw Crease (<code>d</code>)
.input.clickable
input#assignLine(type='radio', name='mode')
label(for='assignLine') Assign Crease (<code>a</code>)
.input.clickable
input#eraseLine(type='radio', name='mode')
label(for='eraseLine') Erase Crease (<code>e</code>)
.input.clickable
input#moveVertex(type='radio', name='mode')
label(for='moveVertex') Move Vertex (<code>m</code>)
hr
.input.clickable
input#boundary(type='radio', name='line', value='B', checked)
label(for='boundary') Boundary (<code>B</code>)
.input.clickable
input#mountain(type='radio', name='line', value='M')
label(for='mountain') Mountain (<code>M</code>)
.input.clickable
input#valley(type='radio', name='line', value='V')
label(for='valley') Valley (<code>V</code>)
.input.clickable
input#unfolded(type='radio', name='line', value='U')
label(for='unfolded') Unfolded (<code>U</code>)
.input.clickable
input#cut(type='radio', name='line', value='C')
label(for='cut') Cut (<code>C</code>)
.multinput
.input
label(for='angle', title='Between 0 and 180 degrees. Use Mountain/Valley for sign. Can use JavaScript formulas.') Absolute fold angle:
.gap
button#angleAdd1 +1
button#angleAdd90 +90
.input
input#angle(type='text', value='180', title='Between 0 and 180 degrees. Use Mountain/Valley for sign. Can use JavaScript formulas.')
.gap
button#angleSub1 −1
button#angleSub90 −90
hr
.input
a(href="https://github.com/edemaine/cp-editor/") Source code on GitHub
div#interface