From 57551209e1571da92801d5718b358dee1b4163d7 Mon Sep 17 00:00:00 2001 From: Megham Garg Date: Wed, 29 May 2024 19:19:02 +0530 Subject: [PATCH] chore: folder restructure --- src/components/background.jsx | 2 +- src/components/projects.jsx | 2 +- .../fragment.glsl} | 0 .../index.jsx} | 6 +++--- .../index.module.css} | 0 .../vertex.glsl} | 0 .../project-summary.jsx => project-summary/index.jsx} | 2 +- .../index.module.css} | 0 8 files changed, 6 insertions(+), 6 deletions(-) rename src/ui/{three/displacement-sphere-fragment.glsl => displacement-sphere/fragment.glsl} (100%) rename src/ui/{three/displacement-sphere.jsx => displacement-sphere/index.jsx} (96%) rename src/ui/{three/displacement-sphere.module.css => displacement-sphere/index.module.css} (100%) rename src/ui/{three/displacement-sphere-vertex.glsl => displacement-sphere/vertex.glsl} (100%) rename src/ui/{three/project-summary.jsx => project-summary/index.jsx} (99%) rename src/ui/{three/project-summary.module.css => project-summary/index.module.css} (100%) diff --git a/src/components/background.jsx b/src/components/background.jsx index fe31446..891d8e6 100644 --- a/src/components/background.jsx +++ b/src/components/background.jsx @@ -4,7 +4,7 @@ import React, { lazy, Suspense } from "react"; import { useHydrated } from "@/hooks/useHydrated"; const DisplacementSphere = lazy(() => - import("@/ui/three/displacement-sphere").then((module) => ({ + import("@/ui/displacement-sphere/index").then((module) => ({ default: module.DisplacementSphere, })) ); diff --git a/src/components/projects.jsx b/src/components/projects.jsx index b2df136..f42dd14 100644 --- a/src/components/projects.jsx +++ b/src/components/projects.jsx @@ -1,7 +1,7 @@ "use client"; import React, { forwardRef } from "react"; -import ProjectSummary from "@/ui/three/project-summary"; +import ProjectSummary from "@/ui/project-summary/index"; const Projects = forwardRef(({ visible }, ref) => { console.info("Projects component loaded", visible, ref); diff --git a/src/ui/three/displacement-sphere-fragment.glsl b/src/ui/displacement-sphere/fragment.glsl similarity index 100% rename from src/ui/three/displacement-sphere-fragment.glsl rename to src/ui/displacement-sphere/fragment.glsl diff --git a/src/ui/three/displacement-sphere.jsx b/src/ui/displacement-sphere/index.jsx similarity index 96% rename from src/ui/three/displacement-sphere.jsx rename to src/ui/displacement-sphere/index.jsx index faeaeec..29819d3 100644 --- a/src/ui/three/displacement-sphere.jsx +++ b/src/ui/displacement-sphere/index.jsx @@ -18,9 +18,9 @@ import { import { media } from "@/utils/style"; import { throttle } from "@/utils/throttle"; import { cleanRenderer, cleanScene, removeLights } from "@/utils/three"; -import fragmentShader from "./displacement-sphere-fragment.glsl?raw"; -import vertexShader from "./displacement-sphere-vertex.glsl?raw"; -import styles from "./displacement-sphere.module.css"; +import fragmentShader from "./fragment.glsl?raw"; +import vertexShader from "./vertex.glsl?raw"; +import styles from "./index.module.css"; const springConfig = { stiffness: 30, diff --git a/src/ui/three/displacement-sphere.module.css b/src/ui/displacement-sphere/index.module.css similarity index 100% rename from src/ui/three/displacement-sphere.module.css rename to src/ui/displacement-sphere/index.module.css diff --git a/src/ui/three/displacement-sphere-vertex.glsl b/src/ui/displacement-sphere/vertex.glsl similarity index 100% rename from src/ui/three/displacement-sphere-vertex.glsl rename to src/ui/displacement-sphere/vertex.glsl diff --git a/src/ui/three/project-summary.jsx b/src/ui/project-summary/index.jsx similarity index 99% rename from src/ui/three/project-summary.jsx rename to src/ui/project-summary/index.jsx index eb6df41..8cde374 100644 --- a/src/ui/three/project-summary.jsx +++ b/src/ui/project-summary/index.jsx @@ -12,7 +12,7 @@ import { Suspense, lazy, useState } from "react"; import { cssProps, media } from "@/utils/style"; import { useHydrated } from "@/hooks/useHydrated"; import { Highlight } from "@/ui/aceternity/hero-highlight"; -import styles from "./project-summary.module.css"; +import styles from "./index.module.css"; const Model = lazy(() => import("@/ui/model").then((module) => ({ default: module.Model })) diff --git a/src/ui/three/project-summary.module.css b/src/ui/project-summary/index.module.css similarity index 100% rename from src/ui/three/project-summary.module.css rename to src/ui/project-summary/index.module.css