forked from TheRori/Apple3d
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
196 lines (178 loc) · 5.28 KB
/
index.html
File metadata and controls
196 lines (178 loc) · 5.28 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.138.0/build/three.module.js",
"OrbitControls": "https://unpkg.com/three@0.138.0/examples/jsm/controls/OrbitControls.js"
}
}
</script>
<title>Apple History 3D</title>
<link rel="stylesheet" href="style.css">
<style>
/* Ajout de styles de base pour centrer la scène et les boîtes d'informations */
body {
margin: 0;
overflow: hidden; /* Masquer les barres de défilement */
font-family: Arial, sans-serif;
}
/* Boîte d'information pour chaque modèle */
.info-box {
position: absolute;
bottom: 20px;
left: 20px;
padding: 10px;
background: rgba(0, 0, 0, 0.7);
color: white;
border-radius: 5px;
display: none; /* Cacher par défaut */
max-width: 300px;
}
/* Pointeur personnalisé (cercle gris clair) */
#custom-pointer {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12px;
height: 12px;
border-radius: 50%;
background-color: rgba(220, 220, 220, 0.8);
pointer-events: none;
z-index: 9999;
display: none;
}
/* Écran de préchargement */
#preloader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 9999;
transition: opacity 0.8s ease;
}
#preloader h1 {
color: #fff;
font-size: 2.5rem;
margin-bottom: 2rem;
font-family: 'Helvetica Neue', Arial, sans-serif;
font-weight: 300;
}
#preloader p {
color: #ccc;
font-size: 1.2rem;
margin-bottom: 2rem;
font-family: 'Helvetica Neue', Arial, sans-serif;
}
.loader {
width: 50px;
height: 50px;
border: 5px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: #fff;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.progress-container {
width: 300px;
height: 10px;
background-color: #333;
border-radius: 5px;
margin-top: 20px;
overflow: hidden;
}
.progress-bar {
height: 100%;
width: 0%;
background-color: #9c9;
transition: width 0.3s ease;
}
/* Logo Apple stylisé */
.apple-logo {
width: 80px;
height: 80px;
margin-bottom: 20px;
position: relative;
}
.apple-logo img {
width: 100%;
height: auto;
opacity: 0.8;
}
</style>
</head>
<body>
<!-- Écran de préchargement -->
<div id="preloader">
<div class="apple-logo">
<img src="icons/apple-logo.png" alt="Apple Logo">
</div>
<h1>Apple History 3D</h1>
<p>Chargement des modèles 3D...</p>
<div class="loader"></div>
<div class="progress-container">
<div class="progress-bar" id="progress-bar"></div>
</div>
</div>
<div id="desktop">
<div id="menu-bar">
<span>File</span>
<span>Edit</span>
<span>View</span>
<span>Special</span>
</div>
<div class="window" id="system-software">
<div class="window-title">Mac System Software</div>
<div class="window-content">
<div class="icon">
<img src="icons/system-folder.png" alt="System Folder">
<span>System Folder</span>
</div>
<div class="icon">
<img src="icons/empty-folder.png" alt="Empty Folder">
<span>Empty Folder</span>
</div>
</div>
</div>
<div class="icon trash">
<img src="icons/trash.png" alt="Trash">
<span>Trash</span>
</div>
</div>
<!-- Pointeur personnalisé (cercle gris clair) -->
<div id="custom-pointer"></div>
<div id="interaction-text" style="
display: none;
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 10px 20px;
font-size: 18px;
border-radius: 5px;
z-index: 1000;">
Appuyez sur Entrée pour interagir avec l'ordinateur.
</div>
<!-- Conteneur pour les informations du modèle en survol -->
<div id="info-box" class="info-box">
<h3 id="info-title">Nom du modèle</h3>
<p id="info-description">Description du modèle</p>
</div>
<!-- Importation de Three.js et du script principal -->
<script type="module" src="src/main.js"></script>
</body>
</html>