Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fog animation #28

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions apps/site/src/app/(home)/sections/Landing/Landing.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
position: relative;
min-height: 100vh;
min-width: 100vw;
overflow-x: hidden;
}

.landingGroup {
Expand All @@ -15,3 +16,39 @@
transform: translate(-50%, -50%);
text-align: center;
}

.fogLeft,
.fogRight {
animation-delay: 0.5s;
animation-duration: 4s;
animation-fill-mode: forwards;
animation-timing-function: ease;
z-index: 1000;
}

.fogLeft {
animation-name: slideOutLeft;
}

.fogRight {
animation-name: slideOutRight;
}

@keyframes slideOutLeft {
from {
transform: none;
}

to {
transform: translate(-100%, 0);
}
}

@keyframes slideOutRight {
from {
transform: none;
}
to {
transform: translate(100%, 0);
}
}
13 changes: 10 additions & 3 deletions apps/site/src/app/(home)/sections/Landing/Landing.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
"use client";

import Button from "@/lib/components/Button/Button";
import styles from "./Landing.module.css";

import { Suspense } from "react";
import Image from "next/image";
import { PerspectiveCamera } from "@react-three/drei";

import { View } from "@/components/canvas/View";
import Button from "@/lib/components/Button/Button";
import Fireflies from "../../components/Fireflies";

import fogLeft from "@/assets/images/fog-left.png";
import fogRight from "@/assets/images/fog-right.png";

import styles from "./Landing.module.css";

const Landing = () => {
return (
<section className={styles.landingSection}>
Expand All @@ -17,6 +22,8 @@ const Landing = () => {
<PerspectiveCamera makeDefault position={[0.1, 0.1, 0.6]} />
</Suspense>
</View>
<Image src={fogLeft} alt="Fog" className={styles.fogLeft} fill />
<Image src={fogRight} alt="Fog" className={styles.fogRight} fill />
<div className={styles.landingGroup}>
<h1 className="font-display">IrvineHacks 2024</h1>
<p className="font-display">January 26&ndash;28</p>
Expand Down
Binary file added apps/site/src/assets/images/fog-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/site/src/assets/images/fog-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading