-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
209 lines (186 loc) · 13.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D .ENV</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/tailwind.min.css">
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/1.6.5/flowbite.min.css" rel="stylesheet" /> -->
<style>
.warning,
.controls {
display: none;
}
@media (max-width: 480px) {
.warning {
min-width: 85vw;
}
}
</style>
</head>
<body>
<div class="header-2">
<nav class="bg-white py-2 md:py-4 shadow-lg ">
<div class="container px-4 mx-auto md:flex md:items-center ">
<div class="flex justify-between items-center">
<a href="#" class="font-bold text-xl text-indigo-600 flex flex-row">3D
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6 ml-2">
<path stroke-linecap="round" stroke-linejoin="round"
d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9" />
</svg>
.ENV</a>
<button
class="border border-solid border-gray-600 px-3 py-1 rounded text-gray-600 opacity-50 hover:opacity-75 md:hidden"
id="navbar-toggle">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
</svg>
</button>
</div>
<div class="hidden md:flex flex-col md:flex-row md:ml-auto mt-3 md:mt-0" id="navbar-collapse">
<a href="#" class="p-2 lg:px-4 md:mx-2 text-white rounded bg-indigo-600">Home</a>
<a href="#"
class="p-2 lg:px-4 md:mx-2 text-gray-600 rounded hover:bg-gray-200 hover:text-gray-700 transition-colors duration-300">About</a>
<a href="#"
class="p-2 lg:px-4 md:mx-2 text-gray-600 rounded hover:bg-gray-200 hover:text-gray-700 transition-colors duration-300">Features</a>
<a href="#"
class="p-2 lg:px-4 md:mx-2 text-gray-600 rounded hover:bg-gray-200 hover:text-gray-700 transition-colors duration-300">Pricing</a>
<a href="#"
class="p-2 lg:px-4 md:mx-2 text-gray-600 rounded hover:bg-gray-200 hover:text-gray-700 transition-colors duration-300">Contact</a>
<a href="#"
class="p-2 lg:px-4 md:mx-2 text-indigo-600 text-center border border-transparent rounded hover:bg-indigo-100 hover:text-indigo-700 transition-colors duration-300">Login</a>
<a href="#"
class="p-2 lg:px-4 md:mx-2 text-indigo-600 text-center border border-solid border-indigo-600 rounded hover:bg-indigo-600 hover:text-white transition-colors duration-300 mt-1 md:mt-0 md:ml-1">Signup</a>
</div>
</div>
</nav>
<div class="bg-indigo-100 py-1 md:py-2">
<div class="container px-4 mx-auto">
<div class="text-center max-w-2xl mx-auto">
<h1 class="text-3xl md:text-4xl font-medium mt-2 mb-4">Render your 3D models.
</h1>
<div class="flex items-center justify-center bg-grey-lighter">
<label
class="inline-flex items-center bg-indigo-600 justify-center py-2 px-4 mr-5 font-semibold text-center text-white no-underline align-middle transition-all duration-300 ease-in-out border-solid rounded-full cursor-pointer select-none hover:text-lg hover:bg-indigo-500 focus:shadow-xs focus:no-underline">
<span class=" text-base leading-normal">Upload Model </span>
<input type='file' id="file-input" class="hidden" />
</label>
</div>
<!-- <button class="bg-indigo-600 text-white py-2 px-6 rounded-full text-xl mt-6">Upload Model</button> -->
<div class="grid grid-cols-3 gap-4 mt-4">
<button id="change-model"
class=" CM p-2 border border-solid font-bold lg:px-4 md:mx-2 text-white rounded bg-indigo-600 shadow-xl hover:bg-indigo-500 transition-colors duration-300"
data-mesh-url="juice_carton_shop" data-mesh-scale="0.5" data-mesh-idx="-1"> Juice
Shop</button>
<button id="change-model1"
class=" CM p-2 border border-solid font-bold border-indigo-600 lg:px-4 md:mx-2 text-grey-500 rounded hover:bg-indigo-500 transition-colors duration-300 "
data-mesh-url="combat_jet_animation" data-mesh-scale="0.2" data-mesh-idx="-1"> Jet</button>
<button id="change-model2"
class=" CM p-2 border border-solid font-bold border-indigo-600 lg:px-4 md:mx-2 text-grey-500 rounded hover:bg-indigo-500 transition-colors duration-300 "
data-mesh-url="free_iphone_13_pro_2021" data-mesh-scale="0.7" data-mesh-idx="0"> Iphone
14</button>
</div>
</div>
</div>
</div>
</div>
<div class="bg-indigo-100 py-1 md:py-2 ">
<div class="VP mb-5 ">
<div class="relative">
<canvas class="webgl w-20 p-1 rounded shadow-md bg-white mx-auto min-h-"></canvas>
<div class="loading-screen absolute">
<div class="loading-text text-grey-500">
<div role="status">
<svg aria-hidden="true"
class="w-8 h-8 mr-2 text-gray-300 animate-spin dark:text-gray-600 fill-blue-600"
viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
fill="currentColor" />
<path
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
fill="currentFill" />
</svg>
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div id="alert-border-2"
class=" warning w-auto flex p-4 mb-4 text-red-800 border-t-4 border-red-300 bg-red-50 dark:text-red-400 dark:bg-gray-800 dark:border-red-800"
role="alert">
<svg class="flex-shrink-0 w-5 h-5" fill="currentColor" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
clip-rule="evenodd"></path>
</svg>
<div class="ml-3 text-sm font-medium">
Please upload .glb files only
</div>
<button type="button" id="close-warning"
class="ml-3 -mx-1.5 -my-1.5 bg-red-50 text-red-500 rounded-lg focus:ring-2 focus:ring-red-400 p-1.5 hover:bg-red-200 inline-flex h-8 w-8 dark:bg-gray-800 dark:text-red-400 dark:hover:bg-gray-700"
data-dismiss-target="#alert-border-2" aria-label="Close">
<span class="sr-only">Dismiss</span>
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule="evenodd"></path>
</svg>
</button>
</div>
<div class="controls flex flex-row absolute">
<button id="reset"
class="inline-flex items-center justify-center py-2 px-4 mr-5 font-semibold text-center text-gray-400 no-underline align-middle transition-all duration-300 ease-in-out bg-transparent border-2 border-gray-400 border-solid rounded-full cursor-pointer select-none hover:text-black hover:border-black focus:shadow-xs focus:no-underline">
Reset<span class="mr-3"></span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round"
d="M15.75 10.5l4.72-4.72a.75.75 0 011.28.53v11.38a.75.75 0 01-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25h-9A2.25 2.25 0 002.25 7.5v9a2.25 2.25 0 002.25 2.25z" />
</svg>
</button>
<button id="zoom-in"
class="inline-flex items-center justify-center p-2 font-semibold text-center text-gray-400 no-underline align-middle transition-all duration-300 ease-in-out bg-transparent border-2 border-gray-400 border-solid rounded-full cursor-pointer select-none hover:text-black hover:border-black focus:shadow-xs focus:no-underline">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6" />
</svg>
</button>
<span id="zoom-value" class="p-2 w-10 mr-1 text-gray-400">1.00</span>
<button id="zoom-out"
class="inline-flex items-center justify-center p-2 mr-5 font-semibold text-center text-gray-400 no-underline align-middle transition-all duration-300 ease-in-out bg-transparent border-2 border-gray-400 border-solid rounded-full cursor-pointer select-none hover:text-black hover:border-black focus:shadow-xs focus:no-underline">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM13.5 10.5h-6" />
</svg>
</button>
</div>
</div>
</div>
<div class=" md:px-4 xl:px-6 mt-8 md:mt-0 text-center m-3">
<span class="w-20 border-t-2 border-solid border-indigo-200 inline-block mb-3"></span>
<h5 class="text-xl font-medium uppercase mb-4">Perfect Tool</h5>
<p class="text-gray-600">3D .ENV is a 3D models viewer. Upload your models in
<a href="#" class="text-blue-600 font-bold">.glb </a> formats.It provides a viewport with emersive
envirenment and modern tools.
</p>
</div>
</div>
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "./three.js-master/build/three.module.js"
}
}
</script>
<script type="module" src="index.js"></script>
</body>
</html>