diff --git a/galaxy-react/src/pages/galaxy.tsx b/galaxy-react/src/pages/galaxy.tsx index f0e4774..167234e 100644 --- a/galaxy-react/src/pages/galaxy.tsx +++ b/galaxy-react/src/pages/galaxy.tsx @@ -53,13 +53,13 @@ export function Galaxy(props: JSX.IntrinsicElements['group']) { return [positions, colors] }, [nodes]) - //const starTexture = useLoader(THREE.TextureLoader, '/star.png') + // slowly rotate the galaxy useFrame(({ clock }) => { ref.current.rotation.z = clock.getElapsedTime() / 2 // zoom in and out - ref.current.scale.setScalar(Math.sin(clock.getElapsedTime() / 2) + 1.5) + ref.current.scale.setScalar(Math.sin(clock.getElapsedTime() / 2) + 1.2) }) // make particles glow @@ -90,6 +90,7 @@ export function Galaxy(props: JSX.IntrinsicElements['group']) { lights={[galaxyCenterLightRef]} /> + ) } @@ -100,11 +101,10 @@ export const ThreeFiberGalaxy = () => { return ( - - +