-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathragdoll.html
More file actions
159 lines (142 loc) · 4.22 KB
/
ragdoll.html
File metadata and controls
159 lines (142 loc) · 4.22 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
<html>
<head>
<title></title>
<style type="text/css">
body, html{
height: 100%;
width: 100%;
position: relative;
margin:0;
-webkit-transition: background 0.5s ease-in-out; /* Chrome 1-25, Safari 3.2+ */
-moz-transition: background 0.5s ease-in-out; /* Firefox 4-15 */
-o-transition: background 0.5s ease-in-out; /* Opera 10.50–12.00 */
transition: background 0.5s ease-in-out; /* Chrome 26, Firefox 16+, IE 10+, Opera 12.10+ */
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
canvas {
display: block;
width: 100%;
height: 100%;
position: relative;
z-index: 10;
background: none;
}
audio{display: none;}
.external{
position: absolute;
background: white;
padding: 1em;
z-index: 9999
}
.wide{
top:0;
left:0;
}
.lenotta{
right:0;
top: 0;
}
.hack{
left:0;
bottom: 0;
}
.lights{
right:0;
bottom: 0;
}
.central{
position: absolute;
top: 420px;
margin: auto;
width: 570px;
margin-left: -285px;
left: 50%;
z-index: 9999;
font-family: 'Open Sans', sans-serif;
text-align: center;
color:#222;
}
.central2{
-webkit-transform-origin: 50% 100%;
-moz-transform-origin: 50% 100%;
-ms-transform-origin: 50% 100%;
-o-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-transform: skew(0deg,0deg) scaleY(.2);
-moz-transform: skew(0deg,0deg) scaleY(.2);
-ms-transform: skew(0deg,0deg) scaleY(.2);
-o-transform: skew(0deg,0deg) scaleY(.2);
color: transparent;
text-shadow: 0px 0px 40px #222;
display: none;
top:480px;
}
h1.subtitle{
font-size: 1.2em;
}
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
@font-face {
font-family: 'code_boldregular';
src: url('fonts/code_bold-webfont.eot');
src: url('fonts/code_bold-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/code_bold-webfont.woff') format('woff'),
url('fonts/code_bold-webfont.ttf') format('truetype'),
url('fonts/code_bold-webfont.svg#code_boldregular') format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
</head>
<body>
<div class = 'external wide'>Wide</div>
<div class = 'external lenotta'>Lenotta</div>
<div class = 'external hack'>Hack</div>
<div class = 'external lights'>Toggle Lights!</div>
<div class = 'central mainText'>
<h1 class = 'title'>Hi! My name is Edoardo Odorico.</h1>
<h1 class = 'subtitle'>I'm a web designer, photographer and videomaker.</h1>
<h1 class = 'subtitle'>Watch my blogs on the left, or my works on the top right.</h1>
</div>
<div class = 'central central2'>
<h1 class = 'title'>Hi! My name is Edoardo Odorico.</h1>
<h1 class = 'subtitle'>I'm a web designer, photographer and videomaker.</h1>
<h1 class = 'subtitle'>Watch my blogs on the left, or my works on the top right.</h1>
</div>
<canvas id="RopeDrawingArea">You need a internet browser that support html5 canvas…</canvas>
<script type="text/javascript" src="js/physic.js"></script>
<script type="text/javascript" src="js/ropeCore.js"></script>
<script type="text/javascript" src="js/ropeImpl.js"></script>
<script type="text/javascript" src="js/verletDemoBootStrapper.js"></script>
<script type="text/javascript">$
var titleShadow = $('.central2');
var central = $('.mainText');
var winW = $(window).width();
$('.lights').click(function(){
if( ropeDemo.data.state == true){
ropeDemo.turnOff();
central.css({'left':'50%'});
}else{
ropeDemo.waitLight();
}
});
$("body").mousemove(function(e) {
if( ropeDemo.data.state == true){
var degree = -((e.pageX-(winW/2))*65)/(winW/2);
titleShadow.css({'transform': 'skew('+(-degree)+'deg,0deg) scaleY(.2)'});
titleShadow.css({'left':(winW/2)+(degree*1.2)});
// central.css({'left':winW/2+(degree*0.2)});
}
})
</script>
<audio preload="auto" controls id="neonSound" class="resources">
<source src="neon.mp3" type="audio/mp3">
Your browser does not support the audio element.
</audio>
<audio preload="auto" controls id="creakSound" class="resources">
<source src="creak0.mp3" type="audio/mp3">
Your browser does not support the audio element.
</audio>
</body>
</html>