Skip to content

Commit 7c5d6c2

Browse files
committed
feat: new homepages
1 parent 5b20345 commit 7c5d6c2

File tree

3 files changed

+41
-11
lines changed

3 files changed

+41
-11
lines changed

src/pages/HomePage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { useVisualSettings } from '../context/VisualSettingsContext';
3-
import BrutalistHomePage from './homepage-views/BrutalistHomePage';
4-
import LuxeHomePage from './homepage-views/LuxeHomePage';
3+
import BrutalistHomePage from './brutalist-views/BrutalistHomePage';
4+
import LuxeHomePage from './luxe-views/LuxeHomePage';
55

66
const HomePage = () => {
77
const { fezcodexTheme } = useVisualSettings();
File renamed without changes.
Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,20 @@ const OmniverseHero = () => {
250250
rivers.push({ mesh: river, geo: riverGeo, mat: riverMat, speed: 0.02 + Math.random() * 0.05 });
251251
}
252252

253-
// 7. ASTEROID BELT
253+
// 7. ASTEROID BELT (Reduced)
254254
const asteroids = [];
255-
const asteroidGeo = new THREE.DodecahedronGeometry(0.4, 0); // Low poly rocks
255+
const asteroidGeo = new THREE.DodecahedronGeometry(0.4, 0);
256256
const asteroidMat = new THREE.MeshBasicMaterial({ color: 0x333333 });
257257

258-
for(let i=0; i<40; i++) {
258+
for(let i=0; i<15; i++) {
259259
const asteroid = new THREE.Mesh(asteroidGeo, asteroidMat);
260-
// Position in a rough belt/cloud
261260
const theta = Math.random() * Math.PI * 2;
262261
const r = 18 + Math.random() * 5;
263262
asteroid.position.x = r * Math.cos(theta);
264263
asteroid.position.z = r * Math.sin(theta);
265-
asteroid.position.y = (Math.random() - 0.5) * 6; // Spread vertically
266-
264+
asteroid.position.y = (Math.random() - 0.5) * 6;
267265
asteroid.rotation.x = Math.random() * Math.PI;
268266
asteroid.rotation.y = Math.random() * Math.PI;
269-
270267
scene.add(asteroid);
271268
asteroids.push({
272269
mesh: asteroid,
@@ -277,6 +274,31 @@ const OmniverseHero = () => {
277274
});
278275
}
279276

277+
// 7.5 DISTANT PLANETS
278+
const planets = [];
279+
const planetConfig = [
280+
{ size: 1.2, r: 45, speed: 0.0005, color: 0x8D4004, opacity: 0.4 }, // Soft Amber
281+
{ size: 0.8, r: 55, speed: -0.0003, color: 0x1A1A1A, opacity: 0.3 }, // Dark
282+
{ size: 1.5, r: 70, speed: 0.0002, color: 0xFFFFFF, opacity: 0.2 }, // White/Cloudy
283+
{ size: 0.5, r: 40, speed: 0.0008, color: 0x457B9D, opacity: 0.3 }, // Soft Blue
284+
];
285+
286+
planetConfig.forEach(conf => {
287+
const planetGeo = new THREE.SphereGeometry(conf.size, 32, 32);
288+
const planetMat = new THREE.MeshBasicMaterial({
289+
color: conf.color,
290+
transparent: true,
291+
opacity: conf.opacity
292+
});
293+
const planet = new THREE.Mesh(planetGeo, planetMat);
294+
const theta = Math.random() * Math.PI * 2;
295+
planet.position.x = conf.r * Math.cos(theta);
296+
planet.position.z = conf.r * Math.sin(theta);
297+
planet.position.y = (Math.random() - 0.5) * 20;
298+
scene.add(planet);
299+
planets.push({ mesh: planet, angle: theta, radius: conf.r, speed: conf.speed });
300+
});
301+
280302
// 8. SATELLITES (More complex shapes)
281303
const satellites = [];
282304
for(let i=0; i<8; i++) {
@@ -340,6 +362,13 @@ const OmniverseHero = () => {
340362
a.mesh.rotation.y += a.rotSpeed;
341363
});
342364

365+
// Planets
366+
planets.forEach(p => {
367+
p.angle += p.speed;
368+
p.mesh.position.x = p.radius * Math.cos(p.angle);
369+
p.mesh.position.z = p.radius * Math.sin(p.angle);
370+
});
371+
343372
// Satellites
344373
satellites.forEach(s => {
345374
s.angle += s.speed;
@@ -394,6 +423,7 @@ const OmniverseHero = () => {
394423
planeGeo.dispose(); planeMat.dispose();
395424
rivers.forEach(r => { r.geo.dispose(); r.mat.dispose(); });
396425
asteroidGeo.dispose(); asteroidMat.dispose();
426+
planets.forEach(p => { p.mesh.geometry.dispose(); p.mesh.material.dispose(); });
397427
satellites.forEach(s => {
398428
s.geo.dispose(); s.mat.dispose();
399429
s.geo2.dispose(); s.mat2.dispose();
@@ -412,7 +442,7 @@ const OmniverseHero = () => {
412442
<span className="font-mono text-[10px] uppercase tracking-[0.2em] text-black/80">Omniverse::Online</span>
413443
</div>
414444
<h1 className="font-playfairDisplay text-8xl md:text-[10rem] text-[#1A1A1A] leading-[0.8] mb-6 tracking-tighter mix-blend-overlay">
415-
FEZ<br/><span className="italic text-black/40">CODEX</span>
445+
<span className="italic">FEZ</span><br/><span className="text-black/40">CODEX</span>
416446
</h1>
417447
<p className="font-outfit text-sm uppercase tracking-widest text-black/60 max-w-md mx-auto">
418448
Exploring the infinite digital expanse.
@@ -505,4 +535,4 @@ const LuxeHomePage = () => {
505535
);
506536
};
507537

508-
export default LuxeHomePage;
538+
export default LuxeHomePage;

0 commit comments

Comments
 (0)