-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
374 lines (347 loc) · 22.7 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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | final</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> -->
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<link rel="stylesheet" href="./controls.css">
<link rel="stylesheet" href="./preLoader.css">
</head>
<body>
<div id="preLoaderId"><div id="Datacount" onclick="removePreLoader()">....</div></div>
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas" width=700 height=700 tabindex="-1"></canvas>
<div id="unity-loading-bar">
<div id="unity-logo"></div>
<div id="unity-progress-bar-empty">
<div id="unity-progress-bar-full"></div>
</div>
</div>
<div id="unity-warning"> </div>
<div id="unity-footer">
<!-- <div id="unity-webgl-logo"></div> -->
<div style="display: none;" id="unity-fullscreen-button"></div>
<!-- <div id="unity-build-title">final</div> -->
</div>
</div>
<div id="controlerdiv" class="centering">
<div id="drager" class="centering" onclick="dragToggle(false)">
Edit Your T-Shirt
</div>
<div id="controlContext" class="centering">
<div id="controlOption">
<div id="TColor" class="centering" onclick="disappearbullets(0)">T-shirt Color</div>
<div id="FImage" class="centering" onclick="disappearbullets(1)">Front Image</div>
<div id="BImage" class="centering" onclick="disappearbullets(2)">Back Image</div>
<div id="audioSet" class="centering">
<span id="mute" class="material-symbols-outlined" onclick="toggleMute()">volume_up</span>
<!-- volume_off -->
<span id="playStop" class="material-symbols-outlined" onclick="togglePlay()">play_arrow</span>
<!-- stop -->
<span class="material-symbols-outlined" onclick="prevSong()">skip_previous</span>
<span id="songName">None</span>
<span class="material-symbols-outlined" onclick="nextSong()">skip_next</span>
</div>
</div>
<div id="controlDisplay">
<div id="TShirtColor">
<ul class="swatches">
<li style="background: var(--RED);" onclick="TShirtColorChange('--RED',false)"></li>
<li style="background: var(--YELLOW);" onclick="TShirtColorChange('--YELLOW',false)"></li>
<li style="background: var(--ORANGE);" onclick="TShirtColorChange('--ORANGE',false)"></li>
<li style="background: var(--BLUE);" onclick="TShirtColorChange('--BLUE',false)"></li>
<li style="background: var(--WHITE);" onclick="TShirtColorChange('--WHITE',false)"></li>
<li style="background: var(--GREEN);" onclick="TShirtColorChange('--GREEN',false)"></li>
<li style="background: var(--LIGHTGREEN);" onclick="TShirtColorChange('--LIGHTGREEN',false)"></li>
<li style="background: var(--PURPLE);" onclick="TShirtColorChange('--PURPLE',false)"></li>
<li style="background: var(--PINK);" onclick="TShirtColorChange('--PINK',false)"></li>
<li style="background: var(--MUSTARD);" onclick="TShirtColorChange('--MUSTARD',false)"></li>
<li style="background: var(--BROWN);" onclick="TShirtColorChange('--BROWN',false)"></li>
<!-- <li style="background: var(--ambrosia);" onclick="TShirtColorChange('--ambrosia')"></li> -->
<!-- <li style="background: var(--banana);" onclick="TShirtColorChange('--banana')"></li> -->
<!-- <li style="background: var(--blue-tack);" onclick="TShirtColorChange('--blue-tack')"></li> -->
<!-- <li style="background: var(--bud);" onclick="TShirtColorChange('--bud')"></li> -->
<!-- <li style="background: var(--butter);" onclick="TShirtColorChange('--butter')"></li> -->
<!-- <li style="background: var(--camo);" onclick="TShirtColorChange('--camo')"></li> -->
<!-- <li style="background: var(--cappuccino);" onclick="TShirtColorChange('--cappuccino')"></li> -->
<!-- <li style="background: var(--champagne);" onclick="TShirtColorChange('--champagne')"></li> -->
<!-- <li style="background: var(--dusty-pink);" onclick="TShirtColorChange('--dusty-pink')"></li> -->
<!-- <li style="background: var(--forget-me-not);" onclick="TShirtColorChange('--forget')"></li> -->
<!-- <li style="background: var(--ice);" onclick="TShirtColorChange('--ice')"></li> -->
<!-- <li style="background: var(--strawberry-yogurt);" onclick="TShirtColorChange('--strawberry-yogurt')"></li> -->
<!-- <li style="background: var(--sun);" onclick="TShirtColorChange('--sun')"></li> -->
<!-- <li style="background: var(--grassy);" onclick="TShirtColorChange('--grassy')"></li> -->
<!-- <li style="background: var(--lemon);" onclick="TShirtColorChange('--lemon')"></li> -->
<!-- <li style="background: var(--lime);" onclick="TShirtColorChange('--lime')"></li> -->
<!-- <li style="background: var(--limestone);" onclick="TShirtColorChange('--limestone')"></li> -->
<!-- <li style="background: var(--melon);" onclick="TShirtColorChange('--melon')"></li> -->
<!-- <li style="background: var(--mink);" onclick="TShirtColorChange('--mink')"></li> -->
<!-- <li style="background: var(--spearmint);" onclick="TShirtColorChange('--spearmint')"></li> -->
<!-- <li style="background: var(--mint);" onclick="TShirtColorChange('--mint')"></li> -->
<!-- <li style="background: var(--mushroom);" onclick="TShirtColorChange('--mushroom')"></li> -->
<!-- <li style="background: var(--mustard);" onclick="TShirtColorChange('--mustard')"></li> -->
<!-- <li style="background: var(--pale-lemon);" onclick="TShirtColorChange('--pale-lemon')"></li> -->
<!-- <li style="background: var(--peach);" onclick="TShirtColorChange('--peach')"></li> -->
<!-- <li style="background: var(--petal);" onclick="TShirtColorChange('--petal')"></li> -->
<!-- <li style="background: var(--pebble);" onclick="TShirtColorChange('--pebble')"></li> -->
<!-- <li style="background: var(--pink);" onclick="TShirtColorChange('--pink')"></li> -->
<!-- <li style="background: var(--posy);" onclick="TShirtColorChange('--posy')"></li> -->
<!-- <li style="background: var(--powder-blue);" onclick="TShirtColorChange('--powder-blue')"></li> -->
<!-- <li style="background: var(--powder-pink);" onclick="TShirtColorChange('--powder-pink')"></li> -->
<!-- <li style="background: var(--primrose);" onclick="TShirtColorChange('--primrose')"></li> -->
<!-- <li style="background: var(--robins-egg);" onclick="TShirtColorChange('--robins-egg')"></li> -->
<!-- <li style="background: var(--sakura);" onclick="TShirtColorChange('--sakura')"></li> -->
<!-- <li style="background: var(--salmon);" onclick="TShirtColorChange('--salmon')"></li> -->
<!-- <li style="background: var(--sand);" onclick="TShirtColorChange('--sand')"></li> -->
<!-- <li style="background: var(--sea-glass);" onclick="TShirtColorChange('--sea-glass')"></li> -->
<!-- <li style="background: var(--yellow);" onclick="TShirtColorChange('--yellow')"></li> -->
<!-- <li style="background: var(--apricot);" onclick="TShirtColorChange('--apricot')"></li> -->
<!-- <li style="background: var(--blue-gray);" onclick="TShirtColorChange('--blue-gray')"></li> -->
<!-- <li style="background: var(--blush);" onclick="TShirtColorChange('--blush')"></li> -->
<!-- <li style="background: var(--bronze);" onclick="TShirtColorChange('----bronze')"></li> -->
<!-- <li style="background: var(--emerald);" onclick="TShirtColorChange('--emerald')"></li> -->
<!-- <li style="background: var(--lilac);" onclick="TShirtColorChange('--lilac')"></li> -->
<!-- <li style="background: var(--hazelnut);" onclick="TShirtColorChange('--hazelnut')"></li> -->
<!-- <li style="background: var(--sage);" onclick="TShirtColorChange('--sage')"></li> -->
<!-- <li style="background: var(--rouge);" onclick="TShirtColorChange('--rouge')"></li> -->
<!-- <li style="background: var(--punch);" onclick="TShirtColorChange('--punch')"></li> -->
<!-- <li style="background: var(--aubergine);" onclick="TShirtColorChange('--aubergine')"></li> -->
<!-- <li style="background: var(--auburn);" onclick="TShirtColorChange('--auburn')"></li> -->
<!-- <li style="background: var(--beetroot);" onclick="TShirtColorChange('--beetroot')"></li> -->
<!-- <li style="background: var(--berry);" onclick="TShirtColorChange('--berry')"></li> -->
<!-- <li style="background: var(--carmine);" onclick="TShirtColorChange('--carmine')"></li> -->
<!-- <li style="background: var(--charcoal);" onclick="TShirtColorChange('--charcoal')"></li> -->
<!-- <li style="background: var(--chestnut);" onclick="TShirtColorChange('--chestnut')"></li> -->
<!-- <li style="background: var(--chocolate);" onclick="TShirtColorChange('--chocolate')"></li> -->
<!-- <li style="background: var(--clay);" onclick="TShirtColorChange('--clay')"></li> -->
<!-- <li style="background: var(--burnt-orange);" onclick="TShirtColorChange('--burnt')"></li> -->
<!-- <li style="background: var(--cerise);" onclick="TShirtColorChange('--cerise')"></li> -->
<!-- <li style="background: var(--coffee);" onclick="TShirtColorChange('--coffee')"></li> -->
<!-- <li style="background: var(--conker);" onclick="TShirtColorChange('--conker')"></li> -->
<!-- <li style="background: var(--coral);" onclick="TShirtColorChange('--coral')"></li> -->
<!-- <li style="background: var(--dusty-purple);" onclick="TShirtColorChange('--dusty-purple')"></li> -->
<!-- <li style="background: var(--eucalyptus);" onclick="TShirtColorChange('--eucalyptus')"></li> -->
<!-- <li style="background: var(--fern);" onclick="TShirtColorChange('--fern')"></li> -->
<!-- <li style="background: var(--forest);" onclick="TShirtColorChange('--forest')"></li> -->
<!-- <li style="background: var(--hot-pink);" onclick="TShirtColorChange('--hot-pink')"></li> -->
<!-- <li style="background: var(--ink);" onclick="TShirtColorChange('--ink')"></li> -->
<!-- <li style="background: var(--iron);" onclick="TShirtColorChange('--iron')"></li> -->
<!-- <li style="background: var(--lapis);" onclick="TShirtColorChange('--lapis')"></li> -->
<!-- <li style="background: var(--leafy);" onclick="TShirtColorChange('--leafy')"></li> -->
<!-- <li style="background: var(--magenta);" onclick="TShirtColorChange('--magenta')"></li> -->
<!-- <li style="background: var(--meadow);" onclick="TShirtColorChange('--meadow')"></li> -->
<!-- <li style="background: var(--midnight);" onclick="TShirtColorChange('--midnight')"></li> -->
<!-- <li style="background: var(--moss);" onclick="TShirtColorChange('--moss')"></li> -->
<!-- <li style="background: var(--navy);" onclick="TShirtColorChange('--navy')"></li> -->
<!-- <li style="background: var(--ocean);" onclick="TShirtColorChange('--ocean')"></li> -->
<!-- <li style="background: var(--orange);" onclick="TShirtColorChange('--orange')"></li> -->
<!-- <li style="background: var(--orchid);" onclick="TShirtColorChange('--orchid')"></li> -->
<!-- <li style="background: var(--pond-bottom);" onclick="TShirtColorChange('--pond-bottom')"></li> -->
<!-- <li style="background: var(--purple);" onclick="TShirtColorChange('--purple')"></li> -->
<!-- <li style="background: var(--purple-slate);" onclick="TShirtColorChange('--purple-slate')"></li> -->
<!-- <li style="background: var(--rainforest);" onclick="TShirtColorChange('--rainforest')"></li> -->
<!-- <li style="background: var(--raspberry-jam);" onclick="TShirtColorChange('--raspberry-jam')"></li> -->
<!-- <li style="background: var(--royal);" onclick="TShirtColorChange('--royal')"></li> -->
<!-- <li style="background: var(--ruby);" onclick="TShirtColorChange('--ruby')"></li> -->
<!-- <li style="background: var(--squash);" onclick="TShirtColorChange('--squash')"></li> -->
<!-- <li style="background: var(--sea-foam);" onclick="TShirtColorChange('--sea-foam')"></li> -->
<!-- <li style="background: var(--sea-fog);" onclick="TShirtColorChange('--sea-fog')"></li> -->
<!-- <li style="background: var(--slate);" onclick="TShirtColorChange('--slate')"></li> -->
<!-- <li style="background: var(--spice);" onclick="TShirtColorChange('--spice')"></li> -->
<!-- <li style="background: var(--spring);" onclick="TShirtColorChange('--spring')"></li> -->
<!-- <li style="background: var(--teal);" onclick="TShirtColorChange('--teal')"></li> -->
<!-- <li style="background: var(--terracotta);" onclick="TShirtColorChange('--terracotta')"></li> -->
<!-- <li style="background: var(--twilight);" onclick="TShirtColorChange('--twilight')"></li> -->
<!-- <li style="background: var(--vavavoom);" onclick="TShirtColorChange('--vavavoom')"></li> -->
<!-- <li style="background: var(--walnut);" onclick="TShirtColorChange('--walnut')"></li> -->
</ul>
</div>
<div id="FrontImage">
<div id="frontViewBoard">
<div id="frontControlBoard">
<div id="frontUpArrow" onclick="frontShifting(event,3)"><span>➤</span></div>
<div id="frontBelowUpArrow">
<div id="frontLeftArrow" onclick="frontShifting(event,1)"><span>➤</span></div>
<div id="pos-size">
<label id="frontSize" for="FrontSize">Img. Reduct.. :-
<input id="frontSizeInput" onclick="frontTextSizing(value)" type="number" form="FrontSize" min="1" max="5" value="1" step="0.01">
</label>
<label id="frontPos" for="Frontpostion">Img. Positon :-
<input id="frontPosInputX" onclick="frontTextPosx(value)" type="number" form="FrontSize" min="0" max="1" value="0" step="0.01">
<input id="frontPosInputY" onclick="frontTextPosy(value)" type="number" form="FrontSize" min="0" max="1" value="0" step="0.01">
</label>
</div>
<div id="frontRightArrow" onclick="frontShifting(event,2)"><span>➤</span></div>
</div>
<div id="frontDownArrow" onclick="frontShifting(event,0)"><span>➤</span></div>
</div>
<div id="frontDropBox">
Drag and Drop Your Image Here
<input type="file" id="frontGetImage" onchange="frontImageFile(event)">
</div>
<span id="info">Press Alt for reverse action</span>
</div>
</div>
<div id="BackImage">
<div id="backViewBoard">
<div id="backControlBoard">
<div id="backUpArrow" onclick="backShifting(event,0)"><span>➤</span></div>
<div id="backBelowUpArrow">
<div id="backLeftArrow" onclick="backShifting(event,1)"><span>➤</span></div>
<div id="pos-size">
<label id="backSize" for="BackSize">Img. Reduct.. :-
<input id="backSizeInput" type="number" form="BackSize" min="1" max="5" value="1" step="0.01" onclick="backTextSizing(value)">
</label>
<label id="backPos" for="Backpostion">Img. Positon :-
<input id="backPosInputX" type="number" form="BackSize" min="0" max="1" value="0" step="0.01" onclick="backTextPosx(value)">
<input id="backPosInputY" type="number" form="BackSize" min="0" max="1" value="0" step="0.01" onclick="backTextPosy(value)">
</label>
</div>
<div id="backRightArrow" onclick="backShifting(event,2)"><span>➤</span></div>
</div>
<div id="backDownArrow" onclick="backShifting(event,3)"><span>➤</span></div>
</div>
<div id="backDropBox">
Drag and Drop Your Image Here
<input type="file" id="backGetImage" onchange="backImageFile(event)">
</div>
<span id="info">Press Alt for reverse action</span>
</div>
</div>
</div>
</div>
</div>
<script>
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var loadingBar = document.querySelector("#unity-loading-bar");
var progressBarFull = document.querySelector("#unity-progress-bar-full");
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
var warningBanner = document.querySelector("#unity-warning");
// Shows a temporary message banner/ribbon for a few seconds, or
// a permanent error message on top of the canvas if type=='error'.
// If type=='warning', a yellow highlight color is used.
// Modify or remove this function to customize the visually presented
// way that non-critical warnings and error messages are presented to the
// user.
function unityShowBanner(msg, type) {
function updateBannerVisibility() {
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
}
var div = document.createElement('div');
div.innerHTML = msg;
warningBanner.appendChild(div);
if (type == 'error') div.style = 'background: red; padding: 10px;';
else {
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
setTimeout(function() {
warningBanner.removeChild(div);
updateBannerVisibility();
}, 5000);
}
updateBannerVisibility();
}
var buildUrl = "Build";
var loaderUrl = buildUrl + "/throwExcep_2.loader.js";
var config = {
dataUrl: buildUrl + "/throwExcep_2.data",
frameworkUrl: buildUrl + "/throwExcep_2.framework.js",
codeUrl: buildUrl + "/throwExcep_2.wasm",
streamingAssetsUrl: "StreamingAssets",
companyName: "DefaultCompany",
productName: "final",
productVersion: "0.1",
showBanner: unityShowBanner,
};
// By default Unity keeps WebGL canvas render target size matched with
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
// Set this to false if you want to decouple this synchronization from
// happening inside the engine, and you would instead like to size up
// the canvas DOM size and WebGL render target sizes yourself.
// config.matchWebGLToCanvasSize = false;
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
// Mobile device style: fill the whole browser client area with the game canvas:
var meta = document.createElement('meta');
meta.name = 'viewport';
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
document.getElementsByTagName('head')[0].appendChild(meta);
container.className = "unity-mobile";
canvas.className = "unity-mobile";
// To lower canvas resolution on mobile devices to gain some
// performance, uncomment the following line:
// config.devicePixelRatio = 1;
} else {
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
canvas.style.width = `${window.innerWidth - 4}px`;
canvas.style.height = `${window.innerHeight - 4}px`;
}
loadingBar.style.display = "block";
unityBridge = null;
const allotedTexture = 5
const allotedAudio = 2
sceneUpload = false;
textureUpload = false;
audioUpload = false;
level = [false,false,false];
function contentLoading(){
loadInterval = setInterval(()=>{
if(!(level[0])){
data_count.innerText = "Loading Scene ..."
level[0] = true;
}
if(sceneUpload){
if(!(level[1])){
data_count.innerText = "Loading Texture ..."
setTimeout(()=>{
loadingTextures(allotedTexture);
dragToggle(true);
},3000)
level[1] = true;
}
if(textureUpload){
if(!(level[2])){
level[2] = true;
data_count.innerText = "Loading Audio ..."
setTimeout(() => {
loadingAudios(allotedAudio);
},2000);
}
if(audioUpload){
frameRunning();
setInterval(()=>{
createButton();
},5000)
clearInterval(loadInterval);
}
}
}
// data_count.innerText = preloaderCont;
},1000)
}
contentLoading();
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
unityBridge = unityInstance;
sceneUpload = true;
loadingBar.style.display = "none";
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
</body>
</html>
<script src="./controlAnimate.js"></script>
<script src="./preLoader.js"></script>