fix: hero neural UX improvements
1. Mouse move listener now on document (not just hero section) 2. Removed hover effect on outer cards, kept only for center กำไร card 3. Bigger text: card-tag 20px, card-desc 16px 4. Hero overflow visible on desktop (cards can extend left) 5. Hero overflow clip on mobile (normal containment)
This commit is contained in:
@@ -277,7 +277,7 @@ if (heroNeural && neuralScene && canvas && ctx && nodes.length > 0) {
|
||||
}
|
||||
|
||||
// Mouse move handler
|
||||
heroNeural.addEventListener('mousemove', (e) => {
|
||||
document.addEventListener('mousemove', (e) => {
|
||||
const rect = heroNeural.getBoundingClientRect();
|
||||
const x = (e.clientX - rect.left) / rect.width;
|
||||
const y = (e.clientY - rect.top) / rect.height;
|
||||
@@ -286,7 +286,7 @@ if (heroNeural && neuralScene && canvas && ctx && nodes.length > 0) {
|
||||
targetRotateX = (y - 0.5) * -30;
|
||||
});
|
||||
|
||||
heroNeural.addEventListener('mouseleave', () => {
|
||||
document.addEventListener('mouseleave', () => {
|
||||
targetRotateX = 0;
|
||||
targetRotateY = 0;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user