-
Notifications
You must be signed in to change notification settings - Fork 1
/
federfriendly.html~
150 lines (140 loc) · 6.22 KB
/
federfriendly.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="bw_style.css" type="text/css" />
<title>WarmHummus.City</title>
<audio autoplay loop>
<source src="ducktales_midi.mp3" type="audio/mpeg">
</audio>
</head>
<body>
<ul class = "ul_nav">
<li class = "li_nav"><a class = "li_a_nav" href = "#sponsors"> FREE HUMMUS CLICK HERE</a></li>
<!--<li class = "li_nav"><a class = "li_a_nav" href = "#sponsors" id= "t_horse"> FREE <span>HUMMUS CLICK HERE</span></a></li>-->
<li class = "li_nav"><a class = "li_a_nav" href = "#sponsors"> 🔒 Grown Up Zone</a></li>
<li class = "li_nav"><a class = "li_a_nav" href = "report_archive.html"> Report Archive</a></li>
<li class = "li_nav"><a class = "li_a_nav" href = "sponsors.html"> Sponsors</a></li>
<li class = "li_nav"><a class = "li_a_nav" href = "#sponsors"> Humorous Hummus</a></li>
<li class = "li_nav"><a class = "li_a_nav" href = "index.html"> Feder Unfriendly Theme</a></li>
</ul>
<h1 class ="hum_pun1">WE'LL HUMMUSS YOU!</h1>
<canvas id="canvas" style="display:none;" resize></canvas>
<div id="money-disp">$</div>
<div class="m-block">
<div id="money">$</div>
<div class="money2" id="money">$</div>
<a href="#" id="money-link">
<blink>free hummus click here</blink>
</a>
</div>
<!--[if IE]>
<style>.step, .eyes { display:none; }h1, p { color:#fff; padding:20px; }</style>
<![endif]-->
<script async src="http://platform.twitter.com/widgets.js" charset="utf-8"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/paper.js/0.22/paper.js"></script>
<script type="text/javascript">
paper.install(window);
document.getElementById('money-link').onclick = function() {
var canvas = document.getElementById('canvas');
canvas.style = "display:block";
document.getElementsByTagName('audio')[0].remove();
var audio = document.createElement('AUDIO');
audio.setAttribute('autoplay',true);
var source = document.createElement('source');
audio.appendChild(source);
audio.volume=.7;
source.src = 'rickroll.mp3';
document.getElementsByTagName('BODY')[0].appendChild(audio);
var ctx = canvas.getContext('2d');
var left_hand = new Image();
left_hand.src = 'img/chickpeas_left.png';
var right_hand = new Image();
right_hand.src = 'img/chickpeas_right.png';
var money;
var moneySign = document.getElementById('money-disp');
moneySign.setAttribute('style','display:block');
Hand = Raster;
Hand.prototype.velocity = new Point(0,0);
Hand.prototype.acceleration = new Point(0,0);
Hand.prototype.mass;
Hand.prototype.limit;
Hand.prototype.angle = 0;
Hand.prototype.applyPowerOfMoney = function(money_power){
var money_power = new Point(money_power.x/this.mass, money_power.y/this.mass);
this.acceleration = this.acceleration.add(money_power);
}
Hand.prototype.update = function(money,delta){
this.velocity = this.velocity.add(this.acceleration);
if(magnitude(this.velocity) > this.limit)
{
this.velocity = this.velocity.normalize();
this.velocity = this.velocity.multiply(this.limit);
}
this.position = this.position.add(this.velocity);
this.position = this.position.add(new Point(random(.2, 1), random(.2, 1)));
this.acceleration = this.acceleration.multiply(0);
this.image = this.position.x < money.x ? this.image = left_hand : this.image = right_hand;
var deltaX = this.position.x - money.x;
var deltaY = this.position.y - money.y;
var angleDegrees = Math.atan2(deltaY, deltaX) * 180 / Math.PI;
angleDegrees = this.position.x < money.x ? angleDegrees - 180 : angleDegrees;
this.rotate(-this.angle);
this.angle = angleDegrees;
this.rotate(this.angle);
}
Money = Point;
Money.prototype.mass = 40;
Money.prototype.getItNow = function(hand){
var force = new Point(this.x,this.y);
force = force.subtract(hand.position);
var distance = magnitude(force);
distance = scale(distance,10,20);
force = force.normalize();
var strength = (2 * this.mass * hand.mass) / (distance * distance);
force = force.multiply(strength);
return force;
}
paper.setup(canvas);
var money = new Money(canvas.width*.5,canvas.height*.5);
document.onmousemove = function(e){
money.x = e.pageX;
money.y = e.pageY;
moneySign.style.top = money.y - 30 + 'px';
moneySign.style.left = money.x - 5 + 'px';
}
left_hand.onload = function(){
for(var i = 0; i < 50; i++){
var hand = new Hand(left_hand);
hand.position = new Point(Math.random()*canvas.width,Math.random()*canvas.height);
hand.scale(random(.3,.8));
hand.limit = random(5,6);
hand.mass = random(10,12);
}
view.onFrame = function(event) {
var hands = project.activeLayer.children;
for(var j = 0; j < hands.length; j++){
hands[j].update(money,event.delta);
var money_power = money.getItNow(hands[j]);
hands[j].applyPowerOfMoney(money_power);
}
}
}
random = function(a,b){
return Math.random() * (b - a) + a;
}
magnitude = function(vector){
return Math.sqrt(vector.x * vector.x + vector.y * vector.y);
}
scale = function(value,min,max){
if(value < min){
value = min;
}
if(value > max){
value = max;
}
return value;
}
}
</script>
</body>
</html>