Skip to content

Commit

Permalink
model responsiveness fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AB10110F committed Nov 20, 2023
1 parent baa316e commit f0ffad3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
15 changes: 7 additions & 8 deletions src/components/Dots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand All @@ -96,7 +96,6 @@ const Dots = () => {
}
}


if (typeof window !== 'undefined') {
const p5 = require('p5');
new p5(sketch, sketchRef.current);
Expand All @@ -106,4 +105,4 @@ const Dots = () => {
return <div className={styles.background} ref={sketchRef} />;
};

export default Dots;
export default Dots;
4 changes: 2 additions & 2 deletions src/css/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
::-webkit-scrollbar-thumb{background:#fdfdfd; border-radius: 0px;}

html{ background-color: black; }

html,
body {
max-width: 100vw;
Expand All @@ -19,4 +19,4 @@ body {
a {
color: inherit;
text-decoration: none;
}
}
4 changes: 3 additions & 1 deletion src/css/terminal.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.terminal
.terminal
{
animation: bottom 1s ease;
width: 65%;
Expand Down Expand Up @@ -64,6 +64,7 @@
font-size: 125%;
width: 100%;
height: 135%;
animation: none;
}
.terminal__prompt input
{
Expand All @@ -77,6 +78,7 @@
{
width: 100%;
height: 100%;
animation: none;
}

.terminal__history
Expand Down

0 comments on commit f0ffad3

Please sign in to comment.