-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (74 loc) · 2 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
<!DOCTYPE html>
<html>
<head>
<title>asdf</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<script src="js/jquery2.js"></script>
<script src="js/polyfills.js"></script>
<script>var app = {};</script>
<script src="js/musicPlayer.js"></script>
<script src="js/vis.js"></script>
<script src="js/audio.js"></script>
<script>
$(function () {
var $t = $('#timeline');
var $h = $t.children('button');
var hWidth = $h.width();
var downPixel;
var timelineOffset;
var timelineW;
var mouseMove = function (e) {
var newLeft = e.pageX - timelineOffset - downPixel;
if (newLeft > timelineW - hWidth) {
newLeft = timelineW - hWidth;
} else if (newLeft < 0) {
newLeft = 0;
}
requestAnimationFrame(function () {
$h.css('left', newLeft)
console.log(e.pageX - timelineOffset);
});
};
var mouseUp = function (e) {
downPixel = false;
$(document).off('mousemove', mouseMove);
};
$h.on('mousedown', function (e) {
var tMargin = parseInt($t.css('margin-left').replace('px', ''));
console.log(tMargin)
timelineW = $t.width() - tMargin;
hWidth = $h.width();
downPixel = e.offsetX;
timelineOffset = $t.offset().left;
console.log(downPixel)
$(document).on('mousemove', mouseMove);
$(document).one('mouseup', mouseUp);
});
});
</script>
<style>
#fileInputContainer{
position: fixed;
z-index: 9999;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header" class="row">
<b>Julian Raya</b> Graphic Designer × UX Wizard 510º926º2098 julianMRaya<span
class="big">⊗</span>gmail.com
</div>
<div id="visualizer">
<canvas id="canvas1"></canvas>
<canvas id="canvas2"></canvas>
<canvas id="canvas3"></canvas>
<canvas id="canvas4"></canvas>
</div>
<div id="footer"></div>
<div id="fileInputContainer">
<input type="file" id="fileInput" />
</div>
</div>
</body>
</html>