Skip to content

Commit

Permalink
Update for 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Banditpong committed Feb 10, 2024
1 parent 4732751 commit 4e89d06
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 30 deletions.
34 changes: 33 additions & 1 deletion css/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
/* Typography */
* {
margin: 0;
padding: 0;
color: #FFF;

}

body {
position: relative;
background: #112538de;

}

#container {
position: relative;
}

#front{
position: absolute;
width: 100%;
z-index: 10;
}

#back{
z-index: -10;
}

canvas#canvas {
background: #112538de;
display: block;
filter: blur(4px);
}
#particles {
position: absolute;
width: 90%;
Expand Down Expand Up @@ -141,7 +172,8 @@ main > .tagline {
}
}
footer {
background-color: whitesmoke;
background-color: #22374A;

}
.footerR {
float:right;
Expand Down
64 changes: 35 additions & 29 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/themes/indigo-white.css">
<!-- <link rel="stylesheet" href="css/themes/indigo-white.css"> -->
<!-- <link rel="stylesheet" href="css/themes/green-white.css"> -->
<!-- <link rel="stylesheet" href="css/themes/red-white.css"> -->
<!-- <link rel="stylesheet" href="css/themes/grey-white.css"> -->
Expand All @@ -22,7 +22,10 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102161158-1"></script>

<script src="particles.min.js"></script>
<!-- <script src="particles.min.js"></script> -->
<script src="script.js"></script>

<!--
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
Expand All @@ -37,35 +40,38 @@
connectParticles: true
});
};
</script>
</script>-->
</head>
<body>
<main>
<div class="intro">Hello, I'm Banditpong.</div>
<div class="rotator-wrapper">I'm a(n)
<span class="rotator">
<span>Application Developer</span>
<span>Embedded Engineer</span>
<span>Software Developer</span>
<span>Test Engineer</span>
<span>Web Engineer</span>
</span>
</div>
<div id="container">
<div id="front"><main>
<div class="intro">Hello, I'm Banditpong.</div>
<div class="rotator-wrapper">I'm a(n)
<span class="rotator">
<span>Application Developer</span>
<span>Embedded Engineer</span>
<span>Software Developer</span>
<span>Test Engineer</span>
<span>Web Engineer</span>
</span>
</div>

<!-- Find your icons from here - https://fontawesome.com/icons?d=gallery&s=brands -->
<div class="icons-social">
<a target="_blank" href="https://blog.banditpong.com"><i class="fab fa-blogger"></i></a>
<a target="_blank" href="https://github.com/banditpong"><i class="fab fa-github"></i></a>
<!-- <a target="_blank" href="#"><i class="fab fa-youtube"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-facebook-f"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-twitter"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-gitlab"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-linkedin-in"></i></a> -->
</div>
<div id="particles"><canvas class="background"></canvas></div>
</main>
<footer>
<span>https://Banditpong.Com</span><span class="footerR">■■■■■■■■■■■□□□ LOADING COMPLETE!</span>
</footer>
<!-- Find your icons from here - https://fontawesome.com/icons?d=gallery&s=brands -->
<div class="icons-social">
<a target="_blank" href="https://blog.banditpong.com"><i class="fab fa-blogger"></i></a>
<a target="_blank" href="https://github.com/banditpong"><i class="fab fa-github"></i></a>
<!-- <a target="_blank" href="#"><i class="fab fa-youtube"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-facebook-f"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-twitter"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-gitlab"></i></a> -->
<!-- <a target="_blank" href="#"><i class="fab fa-linkedin-in"></i></a> -->
</div>
</main>
<footer>
<span>https://Banditpong.com</span><span class="footerR"></span>
</footer>
</div>
<div id="back"><canvas id="canvas">Canvas not supported.</canvas></div>
</div>
</body>
</html>
148 changes: 148 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
/*
* File Name / glitteringSea.js
* Created Date / Aug 14, 2020
* Aurhor / Toshiya Marukubo
* Twitter / https://twitter.com/toshiyamarukubo
*/

(function () {
'use strict';
window.addEventListener('load', function () {
var canvas = document.getElementById('canvas');

if (!canvas || !canvas.getContext) {
return false;
}

/********************
Random Number
********************/

function rand(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}

/********************
Var
********************/

var ctx = canvas.getContext('2d');
var X = canvas.width = window.innerWidth;
var Y = canvas.height = window.innerHeight;
var mouseX = null;
var mouseY = null;
var shapeNum = 300;
var shapes = [];
var style = {
black: 'black',
white: 'white',
lineWidth: 4,
};

/********************
Animation
********************/

window.requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(cb) {
setTimeout(cb, 17);
};

/********************
Shape
********************/

function Shape(ctx, x, y) {
this.ctx = ctx;
this.init(x, y);
}

Shape.prototype.init = function(x, y) {
this.x = x;
this.y = y;
this.r = rand(10, 25);
this.ga = Math.random() * .45;
this.v = {
x: Math.random(),
y: -1
};
this.l = rand(0, 20);
this.sl = this.l;
};

Shape.prototype.updateParams = function() {
var ratio = this.l / this.sl;
//this.r *= ratio;
this.l -= 1;
if (this.l < 0) {
this.init(X * Math.random() , rand(0, Y));
}
};

Shape.prototype.updatePosition = function() {
this.x += Math.random();
this.y += -Math.random();
};

Shape.prototype.draw = function() {
var ctx = this.ctx;
ctx.save();
ctx.globalCompositeOperation = 'lighter';
ctx.globalAlpha = this.ga;
//ctx.fillStyle = 'rgb(123, 252, 100)';
ctx.fillStyle = 'white';
ctx.beginPath();
ctx.arc(this.x, this.y, this.r, 0, Math.PI * 2, false);
ctx.fill();
ctx.restore();
};

Shape.prototype.render = function(i) {
this.updatePosition();
this.updateParams();
this.draw();
};

for (var i = 0; i < shapeNum; i++) {
var s = new Shape(ctx, X * Math.random(), rand(0, Y));
shapes.push(s);
}

/********************
Render
********************/

function render() {
ctx.clearRect(0, 0, X, Y);
for (var i = 0; i < shapes.length; i++) {
shapes[i].render(i);
}
requestAnimationFrame(render);
}

render();

/********************
Event
********************/

function onResize() {
X = canvas.width = window.innerWidth;
Y = canvas.height = window.innerHeight;
}

window.addEventListener('resize', function() {
onResize();
});

window.addEventListener('mousemove', function(e) {
mouseX = e.clientX;
mouseY = e.clientY;
}, false);

});
})();

0 comments on commit 4e89d06

Please sign in to comment.