-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit abd46fc
Showing
23 changed files
with
3,436 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Metal Gear Solid Scene made with React Three Fiber and Theatre.js | ||
|
||
## Installation | ||
|
||
Install dependencies: | ||
|
||
``` | ||
yarn | ||
``` | ||
|
||
Compile the code for development and start a local server: | ||
|
||
``` | ||
yarn dev | ||
``` | ||
|
||
Create the build: | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
*, | ||
*::after, | ||
*::before { | ||
box-sizing: border-box; | ||
} | ||
|
||
:root { | ||
font-size: 14px; | ||
--color-text: #fff; | ||
--color-bg: #000; | ||
--color-link: #fff; | ||
--color-link-hover: #fff; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
color: var(--color-text); | ||
background-color: var(--color-bg); | ||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, | ||
sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
font-weight: 500; | ||
} | ||
|
||
html { | ||
overflow: scroll; | ||
overflow-x: hidden; | ||
} | ||
::-webkit-scrollbar { | ||
width: 0; /* Remove scrollbar space */ | ||
background: transparent; /* Optional: just make scrollbar invisible */ | ||
} | ||
/* Optional: show position indicator in red */ | ||
::-webkit-scrollbar-thumb { | ||
background: #ff0000; | ||
} | ||
|
||
/* Page Loader */ | ||
.js .loading::before, | ||
.js .loading::after { | ||
content: ""; | ||
position: fixed; | ||
z-index: 1000; | ||
} | ||
|
||
.js .loading::before { | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: var(--color-bg); | ||
} | ||
|
||
.js .loading::after { | ||
top: 50%; | ||
left: 50%; | ||
width: 60px; | ||
height: 60px; | ||
margin: -30px 0 0 -30px; | ||
border-radius: 50%; | ||
opacity: 0.4; | ||
background: var(--color-link); | ||
animation: loaderAnim 0.7s linear infinite alternate forwards; | ||
} | ||
|
||
@keyframes loaderAnim { | ||
to { | ||
opacity: 1; | ||
transform: scale3d(0.5, 0.5, 1); | ||
} | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
color: var(--color-link); | ||
outline: none; | ||
cursor: pointer; | ||
} | ||
|
||
a:hover { | ||
color: var(--color-link-hover); | ||
outline: none; | ||
} | ||
|
||
/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */ | ||
a:focus { | ||
/* Provide a fallback style for browsers | ||
that don't support :focus-visible */ | ||
outline: none; | ||
background: lightgrey; | ||
} | ||
|
||
a:focus:not(:focus-visible) { | ||
/* Remove the focus indicator on mouse-focus for browsers | ||
that do support :focus-visible */ | ||
background: transparent; | ||
} | ||
|
||
a:focus-visible { | ||
/* Draw a very noticeable focus style for | ||
keyboard-focus on browsers that do support | ||
:focus-visible */ | ||
outline: 2px solid red; | ||
background: transparent; | ||
} | ||
|
||
.unbutton { | ||
background: none; | ||
border: 0; | ||
padding: 0; | ||
margin: 0; | ||
font: inherit; | ||
cursor: pointer; | ||
} | ||
|
||
.unbutton:focus { | ||
outline: none; | ||
} | ||
|
||
.frame { | ||
position: fixed; | ||
top: 0rem; | ||
left: 1rem; | ||
right: 1rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
align-items: start; | ||
color: var(--color-title); | ||
padding: 1rem 2rem; | ||
z-index: 10; | ||
background: rgba(255, 255, 255, 0.24); | ||
border-radius: 0 0 10px 10px; | ||
box-shadow: 1px 4px 7px rgba(0, 0, 0, 0.05); | ||
} | ||
|
||
.frame a:not(.frame__title-back) { | ||
white-space: nowrap; | ||
overflow: hidden; | ||
position: relative; | ||
} | ||
|
||
.frame a:not(.frame__title-back)::before { | ||
content: ""; | ||
height: 1px; | ||
width: 100%; | ||
background: currentColor; | ||
position: absolute; | ||
top: 90%; | ||
transition: transform 0.3s; | ||
transform-origin: 0% 50%; | ||
} | ||
|
||
.frame a:not(.frame__title-back):hover::before { | ||
transform: scaleX(0); | ||
transform-origin: 100% 50%; | ||
} | ||
|
||
.frame__title { | ||
grid-area: title; | ||
display: flex; | ||
} | ||
|
||
.frame__title-main { | ||
font-size: 1rem; | ||
margin: 0; | ||
font-weight: inherit; | ||
} | ||
|
||
.frame__title-back { | ||
position: relative; | ||
display: flex; | ||
align-items: flex-end; | ||
} | ||
|
||
.frame__title-back span { | ||
display: none; | ||
} | ||
|
||
.frame__title-back svg { | ||
fill: currentColor; | ||
} | ||
|
||
.frame__prev { | ||
grid-area: prev; | ||
} | ||
|
||
@media screen and (min-width: 53em) { | ||
.frame { | ||
display: grid; | ||
grid-template-columns: auto auto 1fr; | ||
grid-template-rows: auto; | ||
grid-template-areas: "title prev sponsor"; | ||
justify-content: start; | ||
grid-gap: 5vw; | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="no-js"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>MGS - Experience</title> | ||
<meta name="description" | ||
content="Metal Gear Solid Scrollable Environment made with React Three Fiber and Theatre.js by Sadman Yasar Sayem, freelancer on Upwork" /> | ||
<meta name="keywords" content="theatre.js, fly-through, 3d, react three fiber, Upwork" /> | ||
<meta name="author" content="Sadman Yasar Sayem" /> | ||
<link rel="shortcut icon" href="favicon.ico" /> | ||
<link rel="stylesheet" type="text/css" href="css/base.css" /> | ||
<script> | ||
document.documentElement.className = "js"; | ||
var supportsCssVars = function () { | ||
var e, | ||
t = document.createElement("style"); | ||
return ( | ||
(t.innerHTML = "root: { --tmp-var: bold; }"), | ||
document.head.appendChild(t), | ||
(e = !!( | ||
window.CSS && | ||
window.CSS.supports && | ||
window.CSS.supports("font-weight", "var(--tmp-var)") | ||
)), | ||
t.parentNode.removeChild(t), | ||
e | ||
); | ||
}; | ||
supportsCssVars() || | ||
alert( | ||
"Please view this demo in a modern browser that supports CSS Variables." | ||
); | ||
</script> | ||
</head> | ||
|
||
<body class="demo-1"> | ||
<main> | ||
<div id="root"></div> | ||
</main> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "camera-animation", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@react-three/drei": "^9.56.20", | ||
"@react-three/fiber": "^8.11.0", | ||
"@theatre/core": "^0.6.0", | ||
"@theatre/r3f": "^0.6.0", | ||
"@theatre/studio": "^0.6.0", | ||
"@types/lodash": "^4.14.195", | ||
"lodash": "^4.17.21", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"three": "^0.149.0" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-react": "^3.1.0", | ||
"autoprefixer": "^10.4.14", | ||
"postcss": "^8.4.27", | ||
"tailwindcss": "^3.3.3", | ||
"typescript": "^4.9.3", | ||
"vite": "^4.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.