Skip to content
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
Binary file added apps/web/public/static/components/0.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/web/public/static/components/0.png
Binary file not shown.
Binary file added apps/web/public/static/components/1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/web/public/static/components/1.png
Binary file not shown.
Binary file removed apps/web/public/static/components/10.png
Binary file not shown.
Binary file removed apps/web/public/static/components/11.png
Binary file not shown.
Binary file added apps/web/public/static/components/2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/web/public/static/components/2.png
Binary file not shown.
Binary file added apps/web/public/static/components/3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/web/public/static/components/3.png
Binary file not shown.
Binary file added apps/web/public/static/components/4.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/web/public/static/components/4.png
Binary file not shown.
Binary file removed apps/web/public/static/components/5.png
Binary file not shown.
Binary file removed apps/web/public/static/components/6.png
Binary file not shown.
Binary file removed apps/web/public/static/components/7.png
Binary file not shown.
Binary file removed apps/web/public/static/components/8.png
Binary file not shown.
Binary file removed apps/web/public/static/components/9.png
Binary file not shown.
Binary file removed apps/web/public/static/components/banner.jpg
Binary file not shown.
21 changes: 9 additions & 12 deletions apps/web/src/components/sections/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ import { Heading } from '@/components/heading';
import { Text } from '@/components/text';

// Dynamically import Tower component to avoid SSR issues with Three.js
const Tower = dynamic(
() => import('@/components/tower').then((mod) => mod.Tower),
{
ssr: false,
loading: () => (
<div className="w-full h-full flex items-center justify-center">
<div className="text-white/30">Loading...</div>
</div>
),
},
);
const Tower = dynamic(() => import('@/webgl/tower').then((mod) => mod.Tower), {
ssr: false,
loading: () => (
<div className="w-full h-full flex items-center justify-center">
<div className="text-white/30">Loading...</div>
</div>
),
});

const HeroSection = () => {
return (
Expand All @@ -33,7 +30,7 @@ const HeroSection = () => {
className="absolute inset-0 pointer-events-none"
style={{
background:
'radial-gradient(circle at center right, transparent 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.95) 60%, #000 80%), linear-gradient(175deg, transparent 60%, black 100%), linear-gradient(to bottom, rgba(0, 0, 0, .8) 5%, transparent 30%)',
'radial-gradient(circle at center right, transparent 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.95) 60%, #000 80%), linear-gradient(175deg, transparent 60%, black 97%), linear-gradient(to bottom, rgba(0, 0, 0, .8) 5%, transparent 30%)',
}}
/>
</div>
Expand Down
44 changes: 0 additions & 44 deletions apps/web/src/components/webgl/Banner.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions apps/web/src/components/webgl/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions apps/web/src/data/images.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/src/hooks/useCollageTexture.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from 'react';
import { getCanvasTexture } from '@/components/webgl/getCanvasTexture';
import { getCanvasTexture } from '@/webgl/getCanvasTexture';

interface CollageImage {
url: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function setupCylinderTextureMapping(texture, dimensions, radius, height) {
texture.offset.y = (1 - texture.repeat.y) / 2;
}

function Billboard({ texture, dimensions, radius = 5, ...props }) {
export function Billboard({ texture, dimensions, radius = 5, ...props }) {
const ref = useRef(null);

setupCylinderTextureMapping(texture, dimensions, radius, 2);
Expand All @@ -46,5 +46,3 @@ function Billboard({ texture, dimensions, radius = 5, ...props }) {
</mesh>
);
}

export default Billboard;
17 changes: 14 additions & 3 deletions apps/web/src/components/tower.tsx → apps/web/src/webgl/tower.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@ import { PerspectiveCamera } from '@react-three/drei';
import { useFrame, useThree } from '@react-three/fiber';
import { useEffect, useRef, useState } from 'react';
import type { Group } from 'three';
import { Billboard } from '@/components/webgl';
import images from '@/data/images';
import { useCollageTexture } from '@/hooks/useCollageTexture';
import { Billboard } from '@/webgl/Billboard';
import { View } from '@/webgl/View';

const COUNT = 12;
const GAP = 3.5;
const IMAGES = [
{ url: '/static/components/0.jpeg' },
{ url: '/static/components/1.jpeg' },
{ url: '/static/components/2.jpeg' },
{ url: '/static/components/3.jpeg' },
{ url: '/static/components/4.jpeg' },
{ url: '/static/components/0.jpeg' },
{ url: '/static/components/1.jpeg' },
{ url: '/static/components/2.jpeg' },
{ url: '/static/components/3.jpeg' },
{ url: '/static/components/4.jpeg' },
];

function Loader() {
return (
Expand Down Expand Up @@ -113,7 +124,7 @@ function SpinnableTower({ texture, dimensions }: any) {
}

export function Tower() {
const { texture, dimensions, isLoading } = useCollageTexture(images);
const { texture, dimensions, isLoading } = useCollageTexture(IMAGES);

if (isLoading) return <Loader />;

Expand Down
Loading