-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html~
128 lines (119 loc) · 4.1 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
---
layout: jumbotron
---
<div class="row marketing">
<div class="col-lg-6">
<h4>Hyperbolas Presentation</h4>
<p>This is the hyperbola presentation for AP Calculus class:</p> <a class="link" href="experiment/slideshow.html">Slideshow.html</a>
<h4>RGB and P5js</h4>
<p>In this experiment I familiarized with the P5js library: </p><a class="link" href="experiments/P5js/test/index.html">Colors.html</a>
</div>
<div class="col-lg-6">
<h4>Gravity</h4>
<p>In this experiment I tried to replicate the acceleration in the x and y components of a falling ball: </p> <a class="link" href="experiments/P5js/gravity/index.html">Gravity.html</a>
<h4 style="margin-top: 20px">3D Prism</h4>
<p>In this experiment I tested what you can do with the vertex and line functions in Three.js</p> <a class="link" href="experiments/Three.js/DrawingLines/index.html">Prism.html</a>
<h4>Chattie Chat</h4>
<p>A website I am doing to practice php: </p><a class="link" href="experiment/experiment/start_screen.php">Chattie_Chat.php</a>
</div>
</div>
<!--- Narrow Jumbotron Example Finishes Here -->
<script>
//console.log(window.location.href);
var timeout;
var smoothTimeout = 0;
var color_register = 0;
var r = 255;
var g = 255;
var b = 255;
function textChangeColor(col){
document.body.style.color = col;
}
function smoothColors(){
var col;
var textCol;
if ( r >= 0){
if(g >= 0){
if(b >= 0){
col = "rgb("+10+","+g+","+b+")";
textCol = "rgb("+r+","+g+","+b+")";
textChangeColor(textCol);
changeColor(col);
b--;
smoothTimeout = setTimeout(smoothColors,10);
}
else {
b = 255;
}
g--;
}
else {
g = 255;
}
r--;
}
else {
r = 255;
g = 255;
b = 255;
setTimeout(smoothColors,10);
//clearTimeout(smoothTimeout);
}
}
function epilepsy(){
var random = Math.floor(Math.random()*11);
var col = "green";
if(random == color_register){
if(random < 10){
random += 1;
}
else {
random -= 1;
}
}
color_register = random;
if(random == 0){
col = "red";
}
if(random == 1){
col = "blue";
}
if(random == 2){
col = "yellow";
}
if(random == 3){
col = "purple";
}
if(random == 4){
col = "magenta";
}
if(random == 5){
col = "brown";
}
if(random == 6){
col = "black";
}
if(random == 7){
col = "gray";
}
if(random == 8){
col = "maroon";
}
if(random == 9){
col = "olive";
}
if(random == 10){
col = "teal";
}
changeColor(col);
timeout = setTimeout(epilepsy,150);
}
function changeColor(col){
document.body.style.backgroundColor = col;
}
function myStopFunction(){
changeColor("rgba(70, 63, 58, 1)");
clearTimeout(smoothTimeout);
clearTimeout(timeout);
}
</script>