From f0ffad36c3009ce5ba1445484fed7c209a235647 Mon Sep 17 00:00:00 2001 From: "A. Bryant" Date: Sun, 19 Nov 2023 23:03:20 -0600 Subject: [PATCH] model responsiveness fixed --- src/components/Dots.tsx | 15 +++++++-------- src/css/globals.css | 4 ++-- src/css/terminal.module.css | 4 +++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/Dots.tsx b/src/components/Dots.tsx index 33912cf..290e9ad 100644 --- a/src/components/Dots.tsx +++ b/src/components/Dots.tsx @@ -45,9 +45,9 @@ const Dots = () => { const createDots = () => { dots = []; - for (let i = 0; i < p.width; i += spacing) + for (let i = 0; i < p.width; i += spacing) { - for (let j = 0; j < p.height; j += spacing) + for (let j = 0; j < p.height; j += spacing) { let dot = new Dot(i + spacing / 2, j + spacing / 2, dotSize); dots.push(dot); @@ -79,12 +79,12 @@ const Dots = () => { let distance = Math.sqrt( Math.pow(mouseX - this.x, 2) + Math.pow(mouseY - this.y, 2) ); - - if (mouseIsMoving && distance < areaAffected) + + if (mouseIsMoving && distance < areaAffected) { this.transparency = 255; - } - else + } + else { this.transparency = Math.max(minTvalue, this.transparency - 10); } @@ -96,7 +96,6 @@ const Dots = () => { } } - if (typeof window !== 'undefined') { const p5 = require('p5'); new p5(sketch, sketchRef.current); @@ -106,4 +105,4 @@ const Dots = () => { return
; }; -export default Dots; \ No newline at end of file +export default Dots; diff --git a/src/css/globals.css b/src/css/globals.css index 85ad18a..5572efe 100644 --- a/src/css/globals.css +++ b/src/css/globals.css @@ -9,7 +9,7 @@ ::-webkit-scrollbar-thumb{background:#fdfdfd; border-radius: 0px;} html{ background-color: black; } - + html, body { max-width: 100vw; @@ -19,4 +19,4 @@ body { a { color: inherit; text-decoration: none; -} \ No newline at end of file +} diff --git a/src/css/terminal.module.css b/src/css/terminal.module.css index fca79ad..67b0b26 100644 --- a/src/css/terminal.module.css +++ b/src/css/terminal.module.css @@ -1,4 +1,4 @@ -.terminal +.terminal { animation: bottom 1s ease; width: 65%; @@ -64,6 +64,7 @@ font-size: 125%; width: 100%; height: 135%; + animation: none; } .terminal__prompt input { @@ -77,6 +78,7 @@ { width: 100%; height: 100%; + animation: none; } .terminal__history