improving list of assets
Some checks failed
Frontend Build and Deploy / build (push) Failing after 49s
Some checks failed
Frontend Build and Deploy / build (push) Failing after 49s
This commit is contained in:
@@ -123,14 +123,12 @@ const MatrixBackground: React.FC = () => {
|
||||
});
|
||||
|
||||
// Check which dots are near the mouse
|
||||
let hoveredCount = 0;
|
||||
dots.forEach((dot, index) => {
|
||||
const dx = dot.x - mouseX;
|
||||
const dy = dot.y - mouseY;
|
||||
const distance = Math.sqrt(dx * dx + dy * dy);
|
||||
|
||||
if (distance < config.hoverRadius) {
|
||||
hoveredCount++;
|
||||
const intensity = 1 - (distance / config.hoverRadius);
|
||||
dot.targetBrightness = config.baseBrightness +
|
||||
(config.hoverBrightness - config.baseBrightness) * intensity;
|
||||
|
Reference in New Issue
Block a user