diff --git a/frontend/src/components/react/PearlShell.tsx b/frontend/src/components/react/PearlShell.tsx index 21a03592..df912385 100644 --- a/frontend/src/components/react/PearlShell.tsx +++ b/frontend/src/components/react/PearlShell.tsx @@ -148,7 +148,6 @@ export default function PearlShell({ const upperShellRef = useRef(null); const lowerShellRef = useRef(null); - const pearlRef = useRef(null); const photoGroupRef = useRef(null); const shellGroupRef = useRef(null); const targetShellRotationRef = useRef({ x: 0, y: 0 }); @@ -243,33 +242,6 @@ export default function PearlShell({ scene.add(shellGroup); shellGroupRef.current = shellGroup; - // Pearl - const pearlGeo = new THREE.SphereGeometry(1.5, 64, 64); - const pearlMat = new THREE.MeshPhysicalMaterial({ - color: 0xfff5ee, - emissive: 0x22110a, - roughness: 0.1, - metalness: 0.1, - clearcoat: 1.0, - clearcoatRoughness: 0.1, - iridescence: 1.0, - iridescenceIOR: 1.5, - iridescenceThicknessRange: [100, 400], - transparent: true, - opacity: 1, - }); - const pearl = new THREE.Mesh(pearlGeo, pearlMat); - pearl.position.set(0, -2, 0); - shellGroup.add(pearl); - pearlRef.current = pearl; - - const pearlLight = new THREE.PointLight(0xffaa55, 2, 20); - pearlLight.position.copy(pearl.position); - shellGroup.add(pearlLight); - - const pearlLightRef = { current: pearlLight }; - const pearlMatRef = { current: pearlMat }; - // Shells const particleCount = 8000; const scaleGeo = new THREE.PlaneGeometry(0.15, 0.15); @@ -402,12 +374,6 @@ export default function PearlShell({ controls.update(); } - if (pearlLightRef.current && pearlMatRef.current) { - const pulse = stateRef.current.bloomIntensity; - pearlLightRef.current.intensity = 2 + pulse * 2; - pearlMatRef.current.emissiveIntensity = 1 + pulse; - } - shellMat.uniforms.time.value = time; shellMat.uniforms.scatterProgress.value = stateRef.current.scatterProgress; @@ -605,21 +571,12 @@ export default function PearlShell({ if (newState === 'CLOSED') { const photosVisible = prevState === 'OPEN' || prevState === 'PHOTO_ZOOM'; - const fromScattered = prevState === 'SCATTERED'; const shellDelay = photosVisible ? 1.5 : 0; - const pearlDelay = fromScattered ? 2 : shellDelay; gsap.to(state, { shellOpenAngle: 0, duration: 1.5, delay: shellDelay, ease: 'power2.inOut' }); gsap.to(state, { scatterProgress: 0, duration: 2, ease: 'power2.inOut' }); gsap.to(state, { bloomIntensity: 0.2, duration: 1, delay: shellDelay }); - if (pearlRef.current) { - gsap.killTweensOf(pearlRef.current.material, 'opacity'); - pearlRef.current.visible = true; - (pearlRef.current.material as THREE.MeshPhysicalMaterial).opacity = 0; - gsap.to(pearlRef.current.material, { opacity: 1, duration: 1.5, delay: pearlDelay }); - } - if (photoGroupRef.current) { photoGroupRef.current.children.forEach((child) => { const mat = (child as THREE.Mesh).material; @@ -641,16 +598,6 @@ export default function PearlShell({ gsap.to(state, { scatterProgress: 0, duration: 2, ease: 'power2.inOut' }); gsap.to(state, { bloomIntensity: 0.8, duration: 2 }); - if (pearlRef.current) { - gsap.killTweensOf(pearlRef.current.material, 'opacity'); - gsap.to(pearlRef.current.material, { - opacity: 0, duration: 1.5, - onComplete: () => { - if (pearlRef.current) pearlRef.current.visible = false; - }, - }); - } - if (photoGroupRef.current) { photoGroupRef.current.children.forEach((child) => { gsap.to((child as THREE.Mesh).material, { opacity: 1, duration: 2, delay: 1.5 }); @@ -661,12 +608,6 @@ export default function PearlShell({ gsap.to(state, { scatterProgress: 1, duration: 3, ease: 'power2.inOut' }); gsap.to(state, { bloomIntensity: 0.3, duration: 2 }); - if (pearlRef.current) { - gsap.killTweensOf(pearlRef.current.material, 'opacity'); - (pearlRef.current.material as THREE.MeshPhysicalMaterial).opacity = 0; - pearlRef.current.visible = false; - } - if (photoGroupRef.current) { photoGroupRef.current.children.forEach((child) => { gsap.to((child as THREE.Mesh).material, { opacity: 0, duration: 1.5 });