-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
241 lines (205 loc) · 10.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Animics</title>
<link rel="icon" type="image/x-icon" href="data/imgs/animics_monster.png" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Merriweather+Sans:400,700" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic" rel="stylesheet" type="text/css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/SimpleLightbox/2.1.0/simpleLightbox.min.css" rel="stylesheet" />
<link rel="stylesheet" href="css/template-style.css">
<link rel="stylesheet" href="css/style.css">
<!-- <link rel="stylesheet" href="https://cdn.skypack.dev/lexgui/build/lexgui.css"> -->
<link rel="stylesheet" href="./src/libs/lexgui/build/lexgui.css">
<link rel="stylesheet" href="css/jquery-ui.css">
</head>
<script type="text/javascript" src="src/libs/jquery-3.5.0.min.js"></script>
<script type="text/javascript" src="src/libs/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.js"></script>
<script src="src/libs/image-map-highlighter.js"></script>
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://cdn.skypack.dev/[email protected]",
"lexgui": "./src/libs/lexgui/build/lexgui.module.js",
"lexgui/components/": "./src/libs/lexgui/build/components/"
}
}
</script>
<script type="text/javascript" src="./src/libs/jszip.min.js"></script>
<script type="module" src="src/libs/customLibs.js"></script>
<script type="text/javascript" src="src/timelineClips.js"></script>
<script type="module">
import { App } from "./src/app.js";
import { UTILS } from "./src/utils.js";
window.global = {};
const createApp = window.global.createApp = (settings) => {
$("#mainNav").remove();
$(".masthead").remove();
$("footer").remove();
const app = window.global.app = new App();
app.init(settings);
return app;
}
const onLoadFiles = function( files ){
if(!files || !files.length){ return null; }
console.log(files);
let mode = null;
let resultFiles = [];
const animExtensions = ['bvh','bvhe'];
const scriptExtensions = ['json', 'bml', 'sigml'];
// first valid file will determine the mode. Following files must be of the same format
for(let i = 0; i < files.length; ++i){
// MIME type is video
if(files[i].type.startsWith("video/")) {
if (!mode) { mode = "video"; }
if ( mode == "video" ){
resultFiles.push( files[i] );
}
continue;
}
// other valid file formats
const extension = UTILS.getExtension(files[i].name).toLowerCase();
if(animExtensions.includes(extension)) {
if (!mode) { mode = "bvh"; }
if ( mode == "bvh"){
resultFiles.push( files[i] );
}
}
if(scriptExtensions.includes(extension)) {
if (!mode) { mode = "script"; }
if ( mode == "script"){
resultFiles.push( files[i] );
}
}
}
if ( resultFiles.length ){
return createApp({mode: mode, data: resultFiles});
}
alert("Format not supported.\n\nFormats accepted:\n\tVideo: 'webm','mp4','ogv','avi'\n\tScript animation: 'bml', 'sigml', 'json'\n\tKeyframe animation: 'bvh', 'bvhe'");
return null;
}
const dialog = $("#page-top")[0];
dialog.ondragover = () => {return false};
dialog.ondragend = () => {return false};
dialog.ondrop = (e) => {
e.preventDefault();
e.stopPropagation();
if ( onLoadFiles( e.dataTransfer.files ) ){
$("#page-top")[0].ondrop = null;
}
};
$("#keyframe-project").click(() => {
createApp({mode: "capture"});
});
$("#bml-project").click(() => {
createApp({mode: "bml"});
});
$("#import").click(() =>{
const input = document.createElement('input');
input.type = 'file';
input.click();
input.onchange = (e) => { onLoadFiles(e.currentTarget.files); };
});
</script>
<body id="page-top">
<!-- Navigation-->
<!-- <nav class="navbar navbar-expand-lg navbar-light fixed-top py-3" id="mainNav">
<div class="container px-4 px-lg-5">
<h1 class="navbar-brand"><a class="fs-2 mb-3 icon-link" href="https://www.upf.edu/web/gti"><img src = "data/imgs/GTIlogo.png" width = "200px"></a></h1>
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ms-auto my-2 my-lg-0">
<li class="nav-item"><a class="bi-github fs-2 mb-3 icon-link" href="https://github.com/upf-gti/"></a></li>
<li class="nav-item"><a class="bi-twitter fs-2 mb-3 icon-link" href="https://twitter.com/gti_upf"></a></li>
</ul>
</div>
</div>
</nav> -->
<!-- Masthead (to change the background image look for header.masthead in the template css)-->
<header class="masthead">
<div class="container px-4 px-lg-5 h-100">
<div id="init-dialog" class="row gx-4 gx-lg-5 h-100 align-items-center justify-content-center text-center">
<div class="col-lg-8 align-self-end">
<!-- <h1 class="text-white font-weight-bold">Animics</h1> -->
<img src = "docs/animics_white.png" width = "700px">
<br><br>
</div>
<div class="col-lg-8 align-self-baseline">
<p class="text-white-75 mb-5">End-to-end system able to generate animations of the signing avatar from user input.</p>
<hr class="divider" />
<p class="text-white-75 mb-5">Start new animation project based on</p>
<!-- <a id="from-file" class="btn btn-primary btn-xl">From Video or Animation</a>
<a id="new-capture" class="btn btn-primary btn-xl">New Capture</a> -->
<div style="margin-left: 1rem;">
<a id="bml-project" class="btn btn-primary btn-xl" style="width: 124px;" title="From text instructions">Script animation</a>
<a id="keyframe-project" class="btn btn-primary btn-xl" style="width: 124px;" title="From video or webcam input">Keyframe animation</a>
<br>
<br>
<p class="text-white-75" style="margin-right: 1rem;">or</p>
<a id="import" class="btn btn-drag btn-xl" title="Import video or animation">Import source</a>
</div>
</div>
</div>
</div>
</header>
<footer class="card-footer fixed-bottom" style="width: 100%; color: #747f8a; display: flex; flex-direction: row; align-content: center; justify-content: center;">
<div class="navbar-brand" style="display: flex; justify-content: space-between; align-items: center; width: 96%; padding-bottom: 0px!important;">
<div style="display: flex; flex-direction: column;">
<a class="fs-2 mb-3 icon-link" href="https://www.upf.edu/web/gti"><img src="data/imgs/GTIlogo.png" width="250px" style="filter:invert(0.5)"></a>
<div id="mainNav" class="py-2" style="font-size: 1rem;">©️ 2021-2024 GTI - UPF | This application has been developed within the <a class="" href="https://signon-project.eu/" target="_blank">SignON PROJECT</a>. Released under the Apache 2.0 License</div>
</div>
<div style="display: flex;">
<div style="padding: 0 20px;">
<h1 class="fs-5 mb-3" style="color:var(--global-text-secondary);"><b>APPLICATIONS</b></h1>
<a href="https://webglstudio.org/projects/signon/performs" target="_blank" style="text-decoration: none;"><h3 class="fs-6 mb-3 px-4" style="color:var(--global-text);"><img src = "data/imgs/performs_monster.png" width = "25px"> PERFORMS</h3></a>
<a href="https://webglstudio.org/projects/signon/animics" target="_blank" style="text-decoration: none;"><h3 class="fs-6 mb-3 px-4" style="color:var(--global-text);"><img src = "data/imgs/animics_logo.png" width = "25px"> ANIMICS</h3></a>
</div>
<div style="padding: 0 20px;">
<h1 class="fs-5 mb-3" style="color:var(--global-text-secondary);"><b>MORE INFO</b></h1>
<div >
<ul class="navbar-nav ms-auto my-2 my-lg-0" style="flex-direction: row; justify-content: center;">
<li class="nav-item"><a class="bi-github fs-2 mb-3 icon-link" href="https://github.com/upf-gti/"></a></li>
<!-- <li class="nav-item"><a class="bi-youtube fs-2 mb-3 icon-link"></a></li> -->
<li class="nav-item"><a class="bi-twitter fs-2 mb-3 icon-link" href="https://twitter.com/gti_upf"></a></li>
</ul>
</div>
</div>
</div>
</div>
</footer>
<!-- Modals -->
<div id="loading" class="modal hidden">
<div class="load-7">
<p>Loading application, please wait</p>
<div class="square-holder">
<img class="loading-icon" src="data/imgs/monster.png" width="50" height="50"></div>
</div>
</div>
</div>
<!---->
<!-- <div id="capture" class="expanded hidden" draggable="false">
<div id="capture-area" class="flex-horizontal" style ="width: 100%;">
<div id="video-area" class="flex-vertical">
<video id="inputVideo" class="hidden" muted audio="false"></video>
<div style="display: flex; height: 100%;
width: 100%;
justify-content: space-around; padding: 0px; margin: 0px">
<canvas id="outputVideo" class="border-animation" width="1280px" height="720px" style="z-index: 1;" tabindex="1"></canvas>
<video id="recording" class="hidden" muted audio="false"></video>
</div>
</div>
</div>
</div> -->
<!-- <div id="timeline" class="hidden">
<div id="timeline-splitbar" class="litesplitbar vertical"></div>
<canvas id="timelineCanvas" class="timeline" height = "200" tabindex="1" style="display:none"></canvas>
<canvas id="timelineNMFCanvas" class="timeline" height = "300" tabindex="1" style="display:none"></canvas>
</div> -->
</body>
</html>