-
Notifications
You must be signed in to change notification settings - Fork 4
/
3DEditor.html
205 lines (181 loc) · 11.2 KB
/
3DEditor.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<html id="editor">
<header>
<title>B-Spline Curve Editor</title>
<link rel="stylesheet" href="./Styles/reset.css">
<link rel="stylesheet" href="./Styles/fonts.css">
<link rel="stylesheet" href="./Styles/flexbox.css">
<link rel="stylesheet" href="./Styles/colors.css">
<link rel="stylesheet" href="./Styles/test.css">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta charset="utf-8" />
<!-- Angular Material style sheet -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.8/angular-material.css">
</header>
<body ng-app="BSplineEditor" ng-controller="BSplineCtrl">
<canvas id="glCanvas"></canvas>
<div id="Menu" ng-cloak="" class="menuBardemoBasicUsage">
<md-toolbar class="md-menu-toolbar">
<div layout="row">
<div style="width: 100%;">
<h2 class="md-toolbar-tools">{{ settings.designName }}</h2>
<md-menu-bar style="display: flex;">
<md-menu>
<button ng-click="$mdMenu.open()">
File
</button>
<md-menu-content>
<!-- <md-menu-item>
<md-button disabled="disabled" ng-click="sampleAction('share', $event)">
Share...
</md-button>
</md-menu-item>
<md-menu-divider></md-menu-divider> -->
<md-menu-item>
<md-button ng-click="newDesign($event)">
New Design
</md-button>
</md-menu-item>
<md-menu-item>
<md-button ng-click="renameDesign($event)">
Rename Design
</md-button>
</md-menu-item>
<!-- <md-menu-item>
<md-button onclick="document.getElementById('UploadBezierFile').click();">
Import Bezier Design...
<span class="md-alt-text"> {{ 'M-O' | keyboardShortcut }}</span>
</md-button>
<input class="ng-hide" id="UploadBezierFile" type="file" />
</md-menu-item> -->
<md-menu-item>
<md-button onclick="document.getElementById('UploadBSplineFile').click();">
Import 3D B-Spline Design...
<!-- <span class="md-alt-text"> {{ 'M-O' | keyboardShortcut }}</span> -->
</md-button>
<input class="ng-hide" id="UploadBSplineFile" type="file" />
</md-menu-item>
<md-menu-item>
<md-button ng-click="save($event)">
Save Design
</md-button>
</md-menu-item>
<!-- <md-menu-divider></md-menu-divider>
<md-menu-item>
<md-button disabled="disabled" ng-click="sampleAction('Print', $event)">
Print
<span class="md-alt-text">{{ 'M-P' | keyboardShortcut }}</span>
</md-button>
</md-menu-item> -->
</md-menu-content>
</md-menu>
<md-menu>
<button ng-click="$mdMenu.open()">
View
</button>
<md-menu-content>
<md-menu-item class="md-indent">
<md-button ng-click="resetCamera($event)">
Reset Camera
<span class="md-alt-text">{{ 'M-S-H' | keyboardShortcut }}</span>
</md-button>
</md-menu-item>
<md-menu-item type="checkbox" ng-model="settings.useOrtho" ng-click="toggleOrtho($event)">Orthographic
Mode</md-menu-item>
<md-menu-divider></md-menu-divider>
<md-menu-item type="checkbox" ng-model="settings.showControlPolygon" ng-click="updateVisibility($event)">Show
Control Polygon</md-menu-item>
<md-menu-item type="checkbox" ng-model="settings.showControlHandles" ng-click="updateVisibility($event)">Show
Control Handles</md-menu-item>
<md-menu-item type="checkbox" ng-model="settings.showCurve" ng-click="updateVisibility($event)">Show
Curve</md-menu-item>
<md-menu-divider></md-menu-divider>
<md-menu-item type="checkbox" ng-model="settings.fullScreen" ng-click="toggleFullScreen($event)"
nv>Full screen</md-menu-item>
<md-menu-item>
<md-button ng-click="goTo2DEditor()">
Go to 2D Editor
<!-- <span class="md-alt-text"> {{ 'M-O' | keyboardShortcut }}</span> -->
</md-button>
</md-menu-item>
<md-menu-divider></md-menu-divider>
<md-menu-item style="overflow: hidden;">
<md-slider style="width: 100%;" class="zoomSlider" ng-model="settings.zoom"
ng-change="updateZoom()" min="{{settings.minzoom}}" max="{{settings.maxzoom}}"
aria-label="regular slider"></md-slider>
</md-menu-item>
</md-menu-content>
</md-menu>
<span flex></span>
<md-slider-container flex=60 flex-sm="40" hide-xs>
<md-tooltip md-direction="bottom">Zoom</md-tooltip>
<!-- <div hide-sm hide-xs flex="20" layout layout-align="center center">
<span class="md-body-1">Zoom</span>
</div> -->
<md-slider style="width: 100%;" class="zoomSlider" ng-model="settings.zoom" ng-change="updateZoom()"
min="{{settings.minzoom}}" max="{{settings.maxzoom}}" aria-label="regular slider"></md-slider>
</md-slider-container>
<!-- <md-menu>
<md-button class="md-raised" ng-click="resetCamera($event)">
Reset Camera
</md-button>
<md-menu-content></md-menu-content>
</md-menu> -->
<span flex></span>
<md-menu>
<md-button class="md-icon-button" aria-label="More" ng-click="openBottomSheet($event)">
<md-tooltip md-direction="bottom">Open Knot Editor</md-tooltip>
<md-icon md-svg-icon="img/icons/abacus.svg"></md-icon>
</md-button>
<md-menu-content></md-menu-content>
</md-menu>
<md-menu>
<md-button class="md-icon-button" aria-label="More" ng-click="deleteCurve($event)">
<md-tooltip md-direction="bottom">Delete Curve</md-tooltip>
<md-icon md-svg-icon="img/icons/rubbish-bin.svg"></md-icon>
</md-button>
<md-menu-content></md-menu-content>
</md-menu>
<md-menu hide-sm hide-xs>
<md-button class="md-icon-button" aria-label="More" ng-click="showHelp($event)">
<md-tooltip md-direction="bottom">Show help</md-tooltip>
<md-icon md-svg-icon="img/icons/information.svg"></md-icon>
</md-button>
<md-menu-content></md-menu-content>
</md-menu>
<md-menu hide-sm hide-xs>
<md-button class="md-icon-button" aria-label="More" ng-click="toggleFullScreen($event, true)">
<md-tooltip md-direction="bottom">Go Fullscreen</md-tooltip>
<md-icon md-svg-icon="img/icons/fullscreen.svg"></md-icon>
</md-button>
<md-menu-content></md-menu-content>
</md-menu>
</md-menu-bar>
</div>
</div>
</md-toolbar>
</div>
<!-- Angular Material requires Angular.js Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-animate.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-aria.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-messages.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-sanitize.js"></script>
<!-- Angular Material Library -->
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.8/angular-material.js"></script>
<script src="./Scripts/jquery-3.3.1.js"></script>
<script src="./Scripts/hammer.min.js"></script>
<script src="./Scripts/gl-matrix.js"></script>
<script type="module" src="./Scripts/3DEditor.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111687166-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-111687166-1');
</script>
</body>
</html>