Skip to content

Commit

Permalink
update: convert images to webp
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshd332 committed Jun 23, 2024
1 parent 01e0ed1 commit 9595d86
Show file tree
Hide file tree
Showing 30 changed files with 14 additions and 10 deletions.
Binary file removed public/textures/waternormals.jpg
Binary file not shown.
Binary file added public/textures/waternormals.webp
Binary file not shown.
Binary file removed src/assets/about-bg.jpg
Binary file not shown.
Binary file added src/assets/about-bg.webp
Binary file not shown.
Binary file removed src/assets/arrows.png
Binary file not shown.
Binary file added src/assets/arrows.webp
Binary file not shown.
Binary file removed src/assets/delta.jpg
Binary file not shown.
Binary file modified src/assets/delta.webp
Binary file not shown.
Binary file modified src/assets/dwoc.webp
Binary file not shown.
Binary file removed src/assets/f.png
Binary file not shown.
Binary file added src/assets/f.webp
Binary file not shown.
Binary file removed src/assets/grey-bg.png
Binary file not shown.
Binary file removed src/assets/grey-mountains.png
Binary file not shown.
Binary file added src/assets/grey-mountains.webp
Binary file not shown.
Binary file modified src/assets/projects-bg.webp
Binary file not shown.
Binary file removed src/assets/r.png
Binary file not shown.
Binary file added src/assets/r.webp
Binary file not shown.
Binary file added src/assets/radar.webp
Binary file not shown.
Binary file removed src/assets/react-icon.png
Binary file not shown.
Binary file added src/assets/react-icon.webp
Binary file not shown.
Binary file removed src/assets/upArrow.png
Binary file not shown.
Binary file added src/assets/upArrow.webp
Binary file not shown.
Binary file removed src/assets/wasd.png
Binary file not shown.
Binary file added src/assets/wasd.webp
Binary file not shown.
3 changes: 3 additions & 0 deletions src/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ registerRoute(
url.pathname.endsWith(".gltf") ||
url.pathname.endsWith(".bin") ||
url.pathname.endsWith(".jpg") ||
url.pathname.endsWith(".json") ||
url.pathname.endsWith(".woff") ||
url.pathname.endsWith(".woff2") ||
url.pathname.endsWith(".jpeg")),
// Customize this strategy as needed, e.g., by changing to CacheFirst.
new StaleWhileRevalidate({
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/About/About.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.aboutBgWrapper {
background-image: url("../../../assets/about-bg.jpg");
background-image: url("../../../assets/about-bg.webp");
background-size: 100% 100%;
height: 100%;
width: 100%;
Expand Down
5 changes: 3 additions & 2 deletions src/ui/components/Experience/Experience.module.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.experienceWrapper {
width: 100%;
min-height: 100vh;
background-color: #000000;
background-image: url("../../../assets/grey-mountains.png");
background-color: #0a0a0a;
background-image: url("../../../assets/grey-mountains.webp");
background-size: cover;
display: flex;
flex-direction: column;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import reactIcon from "../../../assets/react-icon.png";
import reactIcon from "../../../assets/react-icon.webp";
import threeIcon from "../../../assets/threejs.svg";
import styles from "./Footer.module.css";

Expand Down
10 changes: 5 additions & 5 deletions src/ui/components/WorldUI/WorldUI.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useNavigate } from "react-router-dom";
import styles from "./WorldUI.module.css";
import wasd from "../../../assets/wasd.png";
import arrows from "../../../assets/arrows.png";
import rkey from "../../../assets/r.png";
import fkey from "../../../assets/f.png";
import uparrow from "../../../assets/upArrow.png";
import wasd from "../../../assets/wasd.webp";
import arrows from "../../../assets/arrows.webp";
import rkey from "../../../assets/r.webp";
import fkey from "../../../assets/f.webp";
import uparrow from "../../../assets/upArrow.webp";

const WorldUI = (): JSX.Element => {
const navigate = useNavigate();
Expand Down
2 changes: 1 addition & 1 deletion src/world/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default async function init(setLoaded: (loaded: boolean) => void) {
textureWidth: 512,
textureHeight: 512,
waterNormals: new THREE.TextureLoader().load(
"textures/waternormals.jpg",
"textures/waternormals.webp",
function (texture) {
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
}
Expand Down

0 comments on commit 9595d86

Please sign in to comment.