-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.html
More file actions
145 lines (142 loc) · 4.77 KB
/
Copy pathindex.html
File metadata and controls
145 lines (142 loc) · 4.77 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Datacenter Planner</title>
<link rel="stylesheet" href="src/styles/styles.css" />
<link rel="icon" href="public/dualistic-logo.png" />
</head>
<body>
<button id="switchMode" class="btn btn-primary">Switch to 3D</button>
<div id="container2D">
<div id="uploadControls">
<input
type="file"
id="dxfFileInput"
accept=".dxf"
style="display: none"
/>
<button id="uploadDxfBtn" class="btn btn-secondary">Upload DXF</button>
</div>
<div id="info2D" class="info-box">
<div id="shortcutsHeader2D" class="shortcuts-toggle">
<h3>Keyboard Shortcuts <span class="shortcutsArrow">▼</span></h3>
</div>
<div id="shortcutsContent2D" class="shortcuts-content">
<ul>
<li><strong>Ctrl + Z:</strong> Undo last action</li>
</ul>
</div>
</div>
<canvas id="canvas2D"></canvas>
</div>
<!-- start with container3D hidden -->
<div id="container3D" style="display: none">
<!-- info, menu and canvas are fixed so Three.js correctly calculates canvas' dimensions -->
<div id="info3D" class="info-box">
<div id="shortcutsHeader3D" class="shortcuts-toggle">
<h3>Keyboard Shortcuts <span class="shortcutsArrow">▼</span></h3>
</div>
<div id="shortcutsContent3D" class="shortcuts-content">
<ul>
<li>
<strong>T - Translate (Move):</strong> Switches to Translate mode
on X/Z axes.
</li>
<li>
<strong>R - Rotate:</strong> Switches to Rotate mode on Y axis.
</li>
<li>
<strong>Y - Translate Vertically:</strong> Switches to Translate
mode on Y axis only.
</li>
</ul>
</div>
</div>
<div id="menuBar">
<!-- Dropdown with Thumbnails -->
<div class="mb-3">
<p>Add new model</p>
<div class="dropdown" data-alt="none">
<button
class="btn btn-secondary dropdown-toggle"
type="button"
id="dropdownMenuButton"
data-bs-toggle="dropdown"
aria-expanded="false"
>
Choose a model
</button>
<ul
class="dropdown-menu w-100"
aria-labelledby="dropdownMenuButton"
style="max-height: 300px; overflow-y: auto"
>
<!-- Cooler -->
<li class="dropdown-item" onclick="selectImage('Cooler')">
<img
src="cooler.jpg"
alt="cooler"
class="img-thumbnail"
style="width: 50px; height: 50px"
/>
<span>Cooler</span>
</li>
<!-- Chair -->
<li class="dropdown-item" onclick="selectImage('Chair')">
<img
src="chair.jpg"
alt="chair"
class="img-thumbnail"
style="width: 50px; height: 50px"
/>
<span>Chair</span>
</li>
<!-- Table -->
<li class="dropdown-item" onclick="selectImage('Table')">
<img
src="table.jpg"
alt="table"
class="img-thumbnail"
style="width: 50px; height: 50px"
/>
<span>Table</span>
</li>
<!-- Rack -->
<li class="dropdown-item" onclick="selectImage('Rack')">
<img
src="rack.jpg"
alt="rack"
class="img-thumbnail"
style="width: 50px; height: 50px"
/>
<span>Rack</span>
</li>
</ul>
</div>
</div>
<button id="add_model" type="button" class="btn btn-primary mb-3">
Add Model
</button>
<hr />
<p id="selectedModel">No selected model</p>
<button id="delete_model" type="button" class="btn btn-danger mb-3">
Delete Selected
</button>
<hr />
<button id="export_scene" type="button" class="btn btn-secondary w-101">
Export 3D
</button>
</div>
<canvas id="canvas3D"></canvas>
</div>
<div id="loading-indicator" style="display: none">
<div class="loading-content">
<div class="spinner"></div>
<div>Loading model...</div>
</div>
</div>
<script type="module" src="src/js/main.js"></script>
</body>
</html>