feat: Adiciona a estrutura inicial do portfólio com componentes para experiência, hero, sobre, habilidades, projetos, modalidades de trabalho e contato.
This commit is contained in:
1 parent
65dd049963
commit
77956223b3
12 files changed
+576
-470
No files matched your search
@@ -134,14 +134,14 @@ const Particles: React.FC<ParticlesProps> = ({
|
||||
resize();
|
||||
|
||||
const handleMouseMove = (e: MouseEvent) => {
|
||||
const rect = container.getBoundingClientRect();
|
||||
const x = ((e.clientX - rect.left) / rect.width) * 2 - 1;
|
||||
const y = -(((e.clientY - rect.top) / rect.height) * 2 - 1);
|
||||
// Use window dimensions since the canvas is fixed full screen
|
||||
const x = (e.clientX / window.innerWidth) * 2 - 1;
|
||||
const y = -((e.clientY / window.innerHeight) * 2 - 1);
|
||||
mouseRef.current = { x, y };
|
||||
};
|
||||
|
||||
if (moveParticlesOnHover) {
|
||||
container.addEventListener("mousemove", handleMouseMove);
|
||||
window.addEventListener("mousemove", handleMouseMove);
|
||||
}
|
||||
|
||||
const count = particleCount;
|
||||
@@ -227,7 +227,7 @@ const Particles: React.FC<ParticlesProps> = ({
|
||||
return () => {
|
||||
window.removeEventListener("resize", resize);
|
||||
if (moveParticlesOnHover) {
|
||||
container.removeEventListener("mousemove", handleMouseMove);
|
||||
window.removeEventListener("mousemove", handleMouseMove);
|
||||
}
|
||||
cancelAnimationFrame(animationFrameId);
|
||||
if (container.contains(gl.canvas)) {
|
||||
|
||||
Reference in new issue
Block a user