parallax-mountains 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/assets/JK.ico +0 -0
- data/assets/JK.png +0 -0
- data/assets/home.js +72 -0
- data/assets/main.scss +4 -0
- data/assets/navbar.js +35 -0
- data/assets/perlinMountains.js +90 -0
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4658b294839a2a48a3f9fb10d8d93f731b4957c463f3c1b3601c562e4bb6be88
|
4
|
+
data.tar.gz: 2c54cc906bf71f31440ff913191e555dbada1ff8a777ebb470f73d269ad9578f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e1e750250856230c1162a3c0a99c3315d340e7ceb7006c725df581f7c0ff2877257949a112c3c8e0c85ce61e0ce5847b050893e6ad70dfecd07ce309370edf5
|
7
|
+
data.tar.gz: b84de0ec6c60b3d9e06c9abc40df4587f64b12bf08935db19b47435397610a3a81585c203cccf7c9cb075746aecf8a2c5f0b7cb3c6e88e232711d9ced36d3a4c
|
data/assets/JK.ico
ADDED
Binary file
|
data/assets/JK.png
ADDED
Binary file
|
data/assets/home.js
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
window.addEventListener('scroll', function(event){
|
2
|
+
if (window.pageYOffset+window.innerHeight >= document.getElementById("bio").offsetTop+100) {
|
3
|
+
document.getElementById("contact").classList.remove("unstick");
|
4
|
+
} else {
|
5
|
+
document.getElementById("contact").classList.add("unstick");
|
6
|
+
}
|
7
|
+
if(window.pageYOffset >= 0){
|
8
|
+
$(".menuPage").removeClass("activePage");
|
9
|
+
var activePage = document.getElementById("Home");
|
10
|
+
activePage.classList.add("activePage");
|
11
|
+
}
|
12
|
+
if(window.pageYOffset > document.getElementById("bio").offsetTop - 250) {
|
13
|
+
$(".menuPage").removeClass("activePage");
|
14
|
+
var activePage = document.getElementById("Bio");
|
15
|
+
activePage.classList.add("activePage");
|
16
|
+
}
|
17
|
+
if(window.pageYOffset > document.getElementById("projects").offsetTop - 250) {
|
18
|
+
$(".menuPage").removeClass("activePage");
|
19
|
+
var activePage = document.getElementById("Projects");
|
20
|
+
activePage.classList.add("activePage");
|
21
|
+
}
|
22
|
+
if(window.pageYOffset > document.getElementById("blog").offsetTop - 300) {
|
23
|
+
console.log("yes");
|
24
|
+
$(".menuPage").removeClass("activePage");
|
25
|
+
var activePage = document.getElementById("Blog");
|
26
|
+
activePage.classList.add("activePage");
|
27
|
+
}
|
28
|
+
});
|
29
|
+
|
30
|
+
function projectArrow(id) {
|
31
|
+
var x = document.getElementById("arrowProject");
|
32
|
+
if (x.className == "fas fa-chevron-down arrow") {
|
33
|
+
x.classList.add("flip");
|
34
|
+
} else {
|
35
|
+
x.className = "fas fa-chevron-down arrow";
|
36
|
+
}
|
37
|
+
var p = document.querySelectorAll(".hideProject");
|
38
|
+
var q = document.querySelectorAll(".unhideProject");
|
39
|
+
var j;
|
40
|
+
for (j = 0; j < p.length; j++) {
|
41
|
+
p[j].className = "col-md-6 col-lg-6 unhideProject";
|
42
|
+
}
|
43
|
+
var k;
|
44
|
+
for (k = 0; k < q.length; k++) {
|
45
|
+
q[k].className = "col-md-6 col-lg-6 hideProject";
|
46
|
+
}
|
47
|
+
if (q.length > 0) {
|
48
|
+
$('html,body').animate({scrollTop: $("#projects").offset().top},'fast');
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
function postArrow(id) {
|
53
|
+
var x = document.getElementById("arrowPost");
|
54
|
+
if (x.className == "fas fa-chevron-down arrow") {
|
55
|
+
x.classList.add("flip");
|
56
|
+
} else {
|
57
|
+
x.className = "fas fa-chevron-down arrow";
|
58
|
+
}
|
59
|
+
var p = document.querySelectorAll(".hidePost");
|
60
|
+
var q = document.querySelectorAll(".unhidePost");
|
61
|
+
var j;
|
62
|
+
for (j = 0; j < p.length; j++) {
|
63
|
+
p[j].className = "col-md-6 col-lg-6 unhidePost";
|
64
|
+
}
|
65
|
+
var k;
|
66
|
+
for (k = 0; k < q.length; k++) {
|
67
|
+
q[k].className = "col-md-6 col-lg-6 hidePost";
|
68
|
+
}
|
69
|
+
if (q.length > 0) {
|
70
|
+
$('html,body').animate({scrollTop: $("#blog").offset().top},'fast');
|
71
|
+
}
|
72
|
+
}
|
data/assets/main.scss
ADDED
data/assets/navbar.js
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
function hamburger() {
|
2
|
+
var x = document.getElementById("myTopnav");
|
3
|
+
if (x.className === "topnav") {
|
4
|
+
x.className += " responsive";
|
5
|
+
document.getElementById("Logo").classList.add("inactiveLink");
|
6
|
+
} else {
|
7
|
+
x.className = "topnav";
|
8
|
+
document.getElementById("Logo").classList.remove("inactiveLink");
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
function goToHome(id){
|
13
|
+
var x = document.getElementById("myTopnav");
|
14
|
+
x.className = "topnav";
|
15
|
+
document.getElementById("Logo").classList.remove("inactiveLink");
|
16
|
+
$('html,body').animate({scrollTop: $("#home").offset().top},'slow');
|
17
|
+
}
|
18
|
+
function goToBio(id){
|
19
|
+
var x = document.getElementById("myTopnav");
|
20
|
+
x.className = "topnav";
|
21
|
+
document.getElementById("Logo").classList.remove("inactiveLink");
|
22
|
+
$('html,body').animate({scrollTop: $("#bio").offset().top-30},'slow');
|
23
|
+
}
|
24
|
+
function goToProjects(id){
|
25
|
+
var x = document.getElementById("myTopnav");
|
26
|
+
x.className = "topnav";
|
27
|
+
document.getElementById("Logo").classList.remove("inactiveLink");
|
28
|
+
$('html,body').animate({scrollTop: $("#projects").offset().top},'slow');
|
29
|
+
}
|
30
|
+
function goToBlog(id){
|
31
|
+
var x = document.getElementById("myTopnav");
|
32
|
+
x.className = "topnav";
|
33
|
+
document.getElementById("Logo").classList.remove("inactiveLink");
|
34
|
+
$('html,body').animate({scrollTop: $("#blog").offset().top},'slow');
|
35
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
let numberPoints;
|
2
|
+
|
3
|
+
function setup() {
|
4
|
+
var canvasDiv = document.getElementById('background');
|
5
|
+
var myCanvas = createCanvas(canvasDiv.offsetWidth, canvasDiv.offsetHeight);
|
6
|
+
myCanvas.parent("background");
|
7
|
+
frameRate(60);
|
8
|
+
}
|
9
|
+
|
10
|
+
function windowResized() {
|
11
|
+
var canvasDiv = document.getElementById('background');
|
12
|
+
resizeCanvas(canvasDiv.offsetWidth, canvasDiv.offsetHeight);
|
13
|
+
}
|
14
|
+
|
15
|
+
function draw() {
|
16
|
+
windowResized();
|
17
|
+
background(51);
|
18
|
+
|
19
|
+
if (width > 1000) {
|
20
|
+
numberPoints = 750;
|
21
|
+
} else {
|
22
|
+
numberPoints = width / 2;
|
23
|
+
}
|
24
|
+
|
25
|
+
fill(75,75,75,255);
|
26
|
+
stroke(75);
|
27
|
+
beginShape();
|
28
|
+
vertex(0, height);
|
29
|
+
for (var x = 0; x <= numberPoints; x++) {
|
30
|
+
var nx = map(x*width/numberPoints, 0, 1000, frameCount/200+10000, 10+frameCount/200+10000);
|
31
|
+
var y = (height/2 * noise(nx)) + height*2/7;
|
32
|
+
vertex(x*width/numberPoints, y);
|
33
|
+
}
|
34
|
+
vertex(width, height);
|
35
|
+
endShape();
|
36
|
+
|
37
|
+
fill(51,51,51,51);
|
38
|
+
noStroke();
|
39
|
+
beginShape();
|
40
|
+
vertex(0, height);
|
41
|
+
for (var x = 0; x <= numberPoints; x++) {
|
42
|
+
var nx = map(x*width/numberPoints, 0, 1000, frameCount/150+1000.05, 10+frameCount/150+1000.05);
|
43
|
+
var y = (height/2 * noise(nx)) + height*1/3-5;
|
44
|
+
vertex(x*width/numberPoints, y);
|
45
|
+
}
|
46
|
+
vertex(width, height);
|
47
|
+
endShape();
|
48
|
+
|
49
|
+
fill(51,121,183,255);
|
50
|
+
stroke(51,121,183);
|
51
|
+
beginShape();
|
52
|
+
vertex(0, height);
|
53
|
+
for (var x = 0; x <= numberPoints; x++) {
|
54
|
+
var nx = map(x*width/numberPoints, 0, 1000, frameCount/150+1000, 10+frameCount/150+1000);
|
55
|
+
var y = (height/2 * noise(nx)) + height*1/3;
|
56
|
+
vertex(x*width/numberPoints, y);
|
57
|
+
}
|
58
|
+
vertex(width, height);
|
59
|
+
endShape();
|
60
|
+
|
61
|
+
fill(75,75,75,50);
|
62
|
+
noStroke();
|
63
|
+
beginShape();
|
64
|
+
vertex(0, height);
|
65
|
+
for (var x = 0; x <= numberPoints; x++) {
|
66
|
+
var nx = map(x*width/numberPoints, 0, 1000, frameCount/100+0.05, 10+frameCount/100+0.05);
|
67
|
+
var y = (height/2 * noise(nx)) + height*1/2-5;
|
68
|
+
vertex(x*width/numberPoints, y);
|
69
|
+
}
|
70
|
+
vertex(width, height);
|
71
|
+
endShape();
|
72
|
+
|
73
|
+
fill(255,255,255,255);
|
74
|
+
stroke(255);
|
75
|
+
beginShape();
|
76
|
+
vertex(0, height);
|
77
|
+
for (var x = 0; x <= numberPoints; x++) {
|
78
|
+
var nx = map(x*width/numberPoints, 0, 1000, frameCount/100, 10+frameCount/100);
|
79
|
+
var y = (height/2 * noise(nx)) + height*1/2;
|
80
|
+
vertex(x*width/numberPoints, y);
|
81
|
+
}
|
82
|
+
vertex(width, height);
|
83
|
+
endShape();
|
84
|
+
|
85
|
+
//let fps = frameRate();
|
86
|
+
//fill(0);
|
87
|
+
//stroke(0);
|
88
|
+
//textSize(50);
|
89
|
+
//text("FPS: " + fps.toFixed(2), 10, height - 10);
|
90
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallax-mountains
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Kitchens
|
@@ -49,6 +49,8 @@ files:
|
|
49
49
|
- _sass/parallax-mountains.scss
|
50
50
|
- assets/.DS_Store
|
51
51
|
- assets/CV/KitchensJames_CV.pdf
|
52
|
+
- assets/JK.ico
|
53
|
+
- assets/JK.png
|
52
54
|
- assets/blog/.DS_Store
|
53
55
|
- assets/blog/animated-website-background/.DS_Store
|
54
56
|
- assets/blog/animated-website-background/animated-website-background-1.gif
|
@@ -61,8 +63,12 @@ files:
|
|
61
63
|
- assets/blog/genetic-algorithms/fitness.png
|
62
64
|
- assets/blog/genetic-algorithms/thumbnail.png
|
63
65
|
- assets/blog/genetic-algorithms/timelapse.gif
|
66
|
+
- assets/home.js
|
64
67
|
- assets/logo/JK.ico
|
65
68
|
- assets/logo/JK.png
|
69
|
+
- assets/main.scss
|
70
|
+
- assets/navbar.js
|
71
|
+
- assets/perlinMountains.js
|
66
72
|
- assets/projects/.DS_Store
|
67
73
|
- assets/projects/central-valley-water-resources/thumbnail.jpg
|
68
74
|
- assets/projects/lichen-bipolar/thumbnail.jpg
|