forked from pahefu/nmsthehub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
309 lines (259 loc) · 12.5 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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<!doctype html>
<!-- Created by pahefu @ 2017 -->
<!-- Version review 0.4 -->
<!-- Applied performance updates (twice) -->
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<link rel="stylesheet" href="./css/blaze.min.css">
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/hubfont.css">
<script src="./js/gl-matrix-min.js"></script>
<script src="./js/phoria-min.js"></script>
<script src="./js/trilateration.js"></script>
<script src="./js/vue.min.js"></script>
<script src="./js/zepto.min.js"></script>
<script src="./js/metadata.js"></script>
<title>NMS The HUB: Management System</title>
</head>
<body>
<script type="text/javascript">
var requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame || window.msRequestAnimationFrame ||
function(c) {window.setTimeout(c, 250)};
// bind to window onload event
window.addEventListener('load', onloadHandler, false);
function onloadHandler(){
phoriaHandler.initialize("canvas","canvasParent");
regionHandler.initialize();
loadMetaData(); // Local metadata loading
systemSelectionApp.applyFilter();
loadDataFromWiki(); // Here we load the data
/*var pause = false;
var fnAnimate = function() {
if (!pause){
phoriaHandler.scene.modelView();
phoriaHandler.renderer.render(phoriaHandler.scene);
}
requestAnimFrame(fnAnimate);
};*/
}
</script>
<div container style="max-width:inherit!important;">
<ul id="brand" class="c-nav c-nav--inline">
<li class="c-nav__content nopadding logoParent"><img id="hubLogo" src="./img/hublogo.png"/></li>
<li class="c-nav__content nopadding">
NMS The Hub Management System
<span class="c-badge c-badge--brand">v.0.4</span>
</li>
</ul>
<div class="o-grid o-grid--wrap">
<div id="leftpanel" class="o-grid__cell o-grid__cell--width-100 o-grid__cell--width-40@small">
<div id="mainsectionblock" class="c-card">
<div class="c-tabs">
<div class="c-tabs__headings" id="uiSelectionApp">
<div v-bind:class="{ 'c-tab-heading': isTab , 'c-tab-heading--active': viewSystemList }" id="systemListTab" v-on:click="showSystemList">
<i class="icon-target"></i> System selection
</div>
<div v-bind:class="{ 'c-tab-heading': isTab , 'c-tab-heading--active': viewMaterials }" id="materialsTab" v-on:click="showMaterials">
<i class="icon-chart-line"></i> Materials list
</div>
<div v-bind:class="{ 'c-tab-heading': isTab , 'c-tab-heading--active': viewSettings }" id="materialsTab" v-on:click="showSettings">
<i class="icon-space-shuttle"></i> Settings
</div>
</div>
<!-- System selection APP -->
<div id="systemSelectionApp" v-bind:class="{ 'c-tabs__tab': isTab , 'c-tabs__tab--active': viewActive }">
<div class="paneltitle" >System selection</div>
<div class="c-alert c-alert--brand" v-show="wikiLoading">
Loading data from wiki ...
</div>
<div>Click on a system name to see it or type below to filter the list in real time</div>
<input type="text" class="c-field" id="systemFilterTexBox" v-model="systemFilter" :disabled="wikiLoading">
<div class="c-hint" style="position:inherit;">Special filters available: <strong>race:Initial letter</strong> and <strong>color:Initial letter</strong> (i.e race:g , color:y)</div>
<div id="listGridParent">
<table id="systemGridTable" class="c-table">
<thead class="c-table__head">
<tr class="c-table__row c-table__row--heading">
<th class="c-table__cell">ID</th>
<th class="c-table__cell">Name</th>
<th class="c-table__cell">Color</th>
<th class="c-table__cell">Race</th>
</tr>
</thead>
<tbody class="c-table__body">
<template v-for="system of visibleSystems">
<tr class="gridStarRow c-table__row">
<td class="c-table__cell">{{system.getHexSolarId()}}</td>
<td class="c-table__cell gridStarName" :id='"#sys_"+system.solarIndex' v-on:click="showSystem" >{{system.getName()}}</td>
<td class="c-table__cell"><div class="gridStarColor" :style="system.getBgColor()"></div></td>
<td class="c-table__cell">{{system.getRaceName()}}</td>
</tr>
</template>
</tbody>
</table>
<div id="systemListFooter" v-if="visibleSystems.length>0">
<hr/>
<div> Page {{currentPage +1 }} of {{maxPages}}
<button class="c-button icon-left-open u-small" title="previous" v-on:click="prevPage"> </button>
<button class="c-button icon-right-open u-small" title="next" v-on:click="nextPage"> </button>
</div>
</div>
</div>
</div>
<!-- End of SystemSelection APP -->
<!-- Material list APP -->
<div id="materialSelectionApp" v-bind:class="{ 'c-tabs__tab': isTab , 'c-tabs__tab--active': viewActive }">
<div class="paneltitle">Materials list</div>
<div>click on a material button to check where you can find it in the hub</div>
<div id="materialbuttonsgrid">
<template v-for="(mat, index) of materials">
<div column="6" class="materialbuttondiv">
<button class="materialbutton c-button u-medium" :id='"#mat_"+mat.id' v-on:click="selectMaterial">{{mat.name}}</button>
</div>
</template>
</div>
<div>
<div class="paneltitle">Material information</div>
<div id="materialDescriptionParent">
<div v-if="selectedMat!=undefined">
<table id="materialdescriptiontable" class="c-table" >
<thead class="c-table__head">
<tr class="c-table__row c-table__row--heading">
<th class="c-table__cell">Name</th><th class="c-table__cell">Requires tool</th><th class="c-table__cell">Available always</th><th class="c-table__cell">Notes</th>
</tr>
</thead>
<tbody class="c-table__body">
<tr class="c-table__row">
<td class="c-table__cell">{{selectedMat.name}}</td>
<td class="c-table__cell">{{selectedMat.tool}}</td>
<td class="c-table__cell">{{selectedMat.allPlanets}}</td>
<td class="c-table__cell">{{selectedMat.notes}}</td>
</tr>
</tbody>
</table>
</div>
<div v-else>
Pick one material to see where to get it.
</div>
</div>
<div class="paneltitle">Associated systems</div>
<!-- Material result -->
<div id="materialGridParent">
<!-- Material sources -->
<div v-if="selectedMat!=undefined">
<!-- Visible table -->
<div v-if="visibleSystems.length!=0">
<table id="materialSourcesGridTable" class="c-table">
<thead class="c-table__head">
<tr class="c-table__row c-table__row--heading">
<th class="c-table__cell">ID</th><th class="c-table__cell">System Name</th><th class="c-table__cell">Location</th><th class="c-table__cell">Notes</th>
</tr>
</thead>
<tbody class="c-table__body">
<template v-for="system of visibleSystems">
<tr class="gridStarRow c-table__row">
<td class="c-table__cell">{{system.solarIndexHex}}</td>
<td class="gridStarName c-table__cell" :id='"#matsys_"+system.solarIndex' v-on:click="showSystem" >{{system.getName()}}</td>
<td class="c-table__cell">
<div v-if="system.inStation">In space station</div>
<div v-else>In planet</div>
</td>
<td class="c-table__cell">{{system.notes}}</td>
</tr>
</template>
</tbody>
</table>
<hr/>
<div> Page {{currentPage +1 }} of {{maxPages}}
<button class="c-button icon-left-open u-small" title="previous" v-on:click="prevPage"> </button>
<button class="c-button icon-right-open u-small" title="next" v-on:click="nextPage"> </button>
</div>
</div>
<div v-else>
<div v-if="!selectedMat.allPlanets">
<div class="centered"><strong>No associated systems known</strong></div>
</div>
<div v-else>
<div class="centered"><strong>Available in all planets</strong></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End of material list APP -->
<!-- Settings APP -->
<div id="settingsPanelApp" v-bind:class="{ 'c-tabs__tab': isTab , 'c-tabs__tab--active': viewActive }">
<fieldset class="o-fieldset">
<div class="c-input-group">
<button class="c-button c-button--brand">Platform</button>
<div class="o-field">
<select class="c-field" v-model="current_platform" v-on:change="applySettings">
<option value="1" selected>PS4</option>
<option value="2">PC</option>
</select>
</div>
</div>
</fieldset>
<fieldset class="o-fieldset">
<div class="c-input-group">
<button class="c-button c-button--brand">Items per page</button>
<div class="o-field">
<input type="text" class="c-field" v-model="items_per_page" v-on:change="applySettings">
</div>
</div>
</fieldset>
</div>
<!-- End of settings APP -->
</div>
</div>
<div id="poweredBy">
<div class="poweredByContent">
Powered by NMS Wiki at
<a class="poweredByContent" href="http://nomanssky.gamepedia.com">
<img src="http://nomanssky.gamepedia.com/skins/Hydra/images/netbar/logo-fallback.png" alt="Gamepedia wiki"/>
</a>
</div>
</div>
</div>
<div id="drawPanelApp" class="o-grid__cell o-grid__cell--width-100 o-grid__cell--width-60@small">
<div id="canvasControls" style="position:absolute;">
<ul class="c-card c-card--menu">
<li class="c-card__item c-card__item--brand">
<div class="dinline">Showing: </div>
<select class="c-field dinline" id="phoriaLabelSelect" v-model="labelType" v-on:change="updateLabels">
<option class="phoriaLabelOption" value="1" selected>Names</option>
<option class="phoriaLabelOption" value="2">IDS</option>
<option class="phoriaLabelOption" value="3">Mixed</option>
<option class="phoriaLabelOption" value="0">None</option>
</select>
</li>
<li class="c-card__item c-card__item--brand">
<div class="dinline">Rotation: </div>
<input type="range" class="dinline c-range phoriaRotationRange" v-model="horizontalAngle" v-on:input="updateCameraRotationH" v-on:change="updateCameraRotationH" min="0" max="270" step="1">
</li>
<li class="c-card__item c-card__item--brand">
<div class="dinline">V Rotation: </div>
<input type="range" class="dinline c-range phoriaRotationRange" v-model="verticalAngle" v-on:input="updateCameraRotationV" v-on:change="updateCameraRotationV" min="0" max="180" step="1">
</li>
<li class="c-card__item c-card__item--brand">
<div class="dinline">Zoom: </div>
<input type="range" class="dinline c-range phoriaRotationRange" v-model="zoomValue" v-on:input="updateZoom" v-on:change="updateZoom" min="-100" max="100" step="1">
</li>
</ul>
</div>
<div id="canvasParent">
<div id="canvasButtonParent">
</div>
<!-- Real canvas rendering here -->
<canvas id="canvas" ></canvas>
<!-- End of Canvas rendering -->
</div>
</div>
</div>
</div>
<script src="./js/rdl.js"></script>
</body>
</html>