Compare commits
3 Commits
55bc694e64
...
5424cc92c2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5424cc92c2 | ||
| baa18484ca | |||
| 7586133152 |
22
frontend/pnpm-lock.yaml
generated
22
frontend/pnpm-lock.yaml
generated
@ -29,7 +29,7 @@ importers:
|
|||||||
version: 9.39.1
|
version: 9.39.1
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^24.10.1
|
specifier: ^24.10.1
|
||||||
version: 24.10.1
|
version: 24.10.2
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: ^19.2.7
|
specifier: ^19.2.7
|
||||||
version: 19.2.7
|
version: 19.2.7
|
||||||
@ -38,7 +38,7 @@ importers:
|
|||||||
version: 19.2.3(@types/react@19.2.7)
|
version: 19.2.3(@types/react@19.2.7)
|
||||||
'@vitejs/plugin-react':
|
'@vitejs/plugin-react':
|
||||||
specifier: ^5.1.2
|
specifier: ^5.1.2
|
||||||
version: 5.1.2(rolldown-vite@7.2.5(@types/node@24.10.1))
|
version: 5.1.2(rolldown-vite@7.2.5(@types/node@24.10.2))
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.39.1
|
specifier: ^9.39.1
|
||||||
version: 9.39.1
|
version: 9.39.1
|
||||||
@ -62,7 +62,7 @@ importers:
|
|||||||
version: 8.48.1(eslint@9.39.1)(typescript@5.9.3)
|
version: 8.48.1(eslint@9.39.1)(typescript@5.9.3)
|
||||||
vite:
|
vite:
|
||||||
specifier: npm:rolldown-vite@7.2.5
|
specifier: npm:rolldown-vite@7.2.5
|
||||||
version: rolldown-vite@7.2.5(@types/node@24.10.1)
|
version: rolldown-vite@7.2.5(@types/node@24.10.2)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@ -351,8 +351,8 @@ packages:
|
|||||||
'@types/json-schema@7.0.15':
|
'@types/json-schema@7.0.15':
|
||||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||||
|
|
||||||
'@types/node@24.10.1':
|
'@types/node@24.10.2':
|
||||||
resolution: {integrity: sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==}
|
resolution: {integrity: sha512-WOhQTZ4G8xZ1tjJTvKOpyEVSGgOTvJAfDK3FNFgELyaTpzhdgHVHeqW8V+UJvzF5BT+/B54T/1S2K6gd9c7bbA==}
|
||||||
|
|
||||||
'@types/react-dom@19.2.3':
|
'@types/react-dom@19.2.3':
|
||||||
resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==}
|
resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==}
|
||||||
@ -425,7 +425,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ==}
|
resolution: {integrity: sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
|
vite: npm:rolldown-vite@7.2.5
|
||||||
|
|
||||||
acorn-jsx@5.3.2:
|
acorn-jsx@5.3.2:
|
||||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||||
@ -1350,7 +1350,7 @@ snapshots:
|
|||||||
|
|
||||||
'@types/json-schema@7.0.15': {}
|
'@types/json-schema@7.0.15': {}
|
||||||
|
|
||||||
'@types/node@24.10.1':
|
'@types/node@24.10.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 7.16.0
|
undici-types: 7.16.0
|
||||||
|
|
||||||
@ -1454,7 +1454,7 @@ snapshots:
|
|||||||
'@typescript-eslint/types': 8.48.1
|
'@typescript-eslint/types': 8.48.1
|
||||||
eslint-visitor-keys: 4.2.1
|
eslint-visitor-keys: 4.2.1
|
||||||
|
|
||||||
'@vitejs/plugin-react@5.1.2(rolldown-vite@7.2.5(@types/node@24.10.1))':
|
'@vitejs/plugin-react@5.1.2(rolldown-vite@7.2.5(@types/node@24.10.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.5
|
'@babel/core': 7.28.5
|
||||||
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5)
|
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5)
|
||||||
@ -1462,7 +1462,7 @@ snapshots:
|
|||||||
'@rolldown/pluginutils': 1.0.0-beta.53
|
'@rolldown/pluginutils': 1.0.0-beta.53
|
||||||
'@types/babel__core': 7.20.5
|
'@types/babel__core': 7.20.5
|
||||||
react-refresh: 0.18.0
|
react-refresh: 0.18.0
|
||||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)
|
vite: rolldown-vite@7.2.5(@types/node@24.10.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@ -1870,7 +1870,7 @@ snapshots:
|
|||||||
|
|
||||||
resolve-from@4.0.0: {}
|
resolve-from@4.0.0: {}
|
||||||
|
|
||||||
rolldown-vite@7.2.5(@types/node@24.10.1):
|
rolldown-vite@7.2.5(@types/node@24.10.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@oxc-project/runtime': 0.97.0
|
'@oxc-project/runtime': 0.97.0
|
||||||
fdir: 6.5.0(picomatch@4.0.3)
|
fdir: 6.5.0(picomatch@4.0.3)
|
||||||
@ -1880,7 +1880,7 @@ snapshots:
|
|||||||
rolldown: 1.0.0-beta.50
|
rolldown: 1.0.0-beta.50
|
||||||
tinyglobby: 0.2.15
|
tinyglobby: 0.2.15
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/node': 24.10.1
|
'@types/node': 24.10.2
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
|
|
||||||
rolldown@1.0.0-beta.50:
|
rolldown@1.0.0-beta.50:
|
||||||
|
|||||||
@ -17,15 +17,12 @@ function App() {
|
|||||||
localStorage.getItem("token") || ""
|
localStorage.getItem("token") || ""
|
||||||
);
|
);
|
||||||
const [theme, setTheme] = useState<string>("default");
|
const [theme, setTheme] = useState<string>("default");
|
||||||
const [isShaderTheme, setIsShaderTheme] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (theme !== "default") {
|
if (theme !== "default") {
|
||||||
document.body.classList.add("shader-theme");
|
document.body.classList.add("shader-theme");
|
||||||
setIsShaderTheme(true);
|
|
||||||
} else {
|
} else {
|
||||||
document.body.classList.remove("shader-theme");
|
document.body.classList.remove("shader-theme");
|
||||||
setIsShaderTheme(false);
|
|
||||||
}
|
}
|
||||||
}, [theme]);
|
}, [theme]);
|
||||||
|
|
||||||
@ -88,7 +85,7 @@ function App() {
|
|||||||
<option value="clouds">Clouds Theme</option>
|
<option value="clouds">Clouds Theme</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{isShaderTheme && <ShaderBackground theme= {theme} />}
|
<ShaderBackground theme= {theme} />
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<PersonList people={people} />} />
|
<Route path="/" element={<PersonList people={people} />} />
|
||||||
<Route path="/games" element={<GameList />} />
|
<Route path="/games" element={<GameList />} />
|
||||||
|
|||||||
@ -154,7 +154,6 @@ export const ShaderBackground: React.FC<ShaderBackgroundProps> = ({
|
|||||||
shader_code = CLOUDS_SHADER_CODE;
|
shader_code = CLOUDS_SHADER_CODE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.error("Unknown shader theme:", theme);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,8 +9,8 @@ out vec4 FragColor;
|
|||||||
|
|
||||||
float orb(vec3 p) {
|
float orb(vec3 p) {
|
||||||
// orb time
|
// orb time
|
||||||
float t = T * 4.;
|
float t = T * 4.f;
|
||||||
return length(p - vec3(sin(sin(t * .2) + t * .4) * 6., 1. + sin(sin(t * .5) + t * .2) * 4., 12. + T + cos(t * .3) * 8.));
|
return length(p - vec3(sin(sin(t * .2f) + t * .4f) * 6.f, 1.f + sin(sin(t * .5f) + t * .2f) * 4.f, 12.f + T + cos(t * .3f) * 8.f));
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainImage(out vec4 o, vec2 u) {
|
void mainImage(out vec4 o, vec2 u) {
|
||||||
@ -21,42 +21,41 @@ void mainImage(out vec4 o, vec2 u) {
|
|||||||
u = (u + u - p.xy) / p.y;
|
u = (u + u - p.xy) / p.y;
|
||||||
|
|
||||||
// camera movement
|
// camera movement
|
||||||
u += vec2(cos(t * .1) * .3, cos(t * .3) * .1);
|
u += vec2(cos(t * .1f) * .3f, cos(t * .3f) * .1f);
|
||||||
|
|
||||||
for(o *= i; i++ < 128.;
|
for(o *= i; i++ < 128.f;
|
||||||
|
|
||||||
// accumulate distance
|
// accumulate distance
|
||||||
d += s = min(.03 + .2 * abs(s), e = max(.5 * e, .01)),
|
d += s = min(.03f + .2f * abs(s), e = max(.5f * e, .01f)),
|
||||||
|
|
||||||
// grayscale color and orb light
|
// grayscale color and orb light
|
||||||
o += 1. / (s + e * 3.))
|
o += 1.f / (s + e * 3.f))
|
||||||
|
|
||||||
// noise loop start, march
|
// noise loop start, march
|
||||||
for(p = vec3(u * d, d + t), // p = ro + rd *d, p.z + t;
|
for(p = vec3(u * d, d + t), // p = ro + rd *d, p.z + t;
|
||||||
|
|
||||||
// entity (orb)
|
// entity (orb)
|
||||||
e = orb(p) - .1,
|
e = orb(p) - .1f,
|
||||||
|
|
||||||
// spin by t, twist by p.z
|
// spin by t, twist by p.z
|
||||||
p.xy *= mat2(cos(.1 * t + p.z / 8. + vec4(0, 33, 11, 0))),
|
p.xy *= mat2(cos(.1f * t + p.z / 8.f + vec4(0, 33, 11, 0))),
|
||||||
|
|
||||||
// mirrored planes 4 units apart
|
// mirrored planes 4 units apart
|
||||||
s = 4. - abs(p.y),
|
s = 4.f - abs(p.y),
|
||||||
|
|
||||||
// noise starts at .8 up to 32., grow by a+=a
|
// noise starts at .8 up to 32., grow by a+=a
|
||||||
a = .8; a < 32.; a += a)
|
a = .8f; a < 32.f; a += a)
|
||||||
|
|
||||||
// apply turbulence
|
// apply turbulence
|
||||||
p += cos(.7 * t + p.yzx) * .2,
|
p += cos(.7f * t + p.yzx) * .2f,
|
||||||
|
|
||||||
// apply noise
|
// apply noise
|
||||||
s -= abs(dot(sin(.1 * t + p * a), .6 + p - p)) / a;
|
s -= abs(dot(sin(.1f * t + p * a), .6f + p - p)) / a;
|
||||||
|
|
||||||
// tanh tonemap, brightness, light off-screen
|
// tanh tonemap, brightness, light off-screen
|
||||||
o = tanh(o / 1e1);
|
o = tanh(o / 1e1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
mainImage(FragColor, gl_FragCoord.xy);
|
mainImage(FragColor, gl_FragCoord.xy);
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user