From 6d2595e3a6ce7d230b1a8f1319f13f008d66baf6 Mon Sep 17 00:00:00 2001 From: marwin Date: Fri, 2 May 2025 08:33:45 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20update=20neural=20network?= =?UTF-8?q?=20background=20logic=20for=20improved=20performance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/neural-network-background.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static/neural-network-background.js b/static/neural-network-background.js index 2cc56c2..fccd097 100644 --- a/static/neural-network-background.js +++ b/static/neural-network-background.js @@ -1,12 +1,11 @@ /** - * Neural Network Background Animation - * Modern, darker, mystical theme using WebGL - * Subtle flowing network aesthetic + * Vereinfachter Neuronales Netzwerk Hintergrund + * Verwendet Canvas 2D anstelle von WebGL für bessere Leistung */ class NeuralNetworkBackground { constructor() { - // Canvas setup + // Canvas einrichten this.canvas = document.createElement('canvas'); this.canvas.id = 'neural-network-background'; this.canvas.style.position = 'fixed'; @@ -14,17 +13,18 @@ class NeuralNetworkBackground { this.canvas.style.left = '0'; this.canvas.style.width = '100%'; this.canvas.style.height = '100%'; - this.canvas.style.zIndex = '-10'; // Ensure it's behind content but visible + this.canvas.style.zIndex = '-10'; this.canvas.style.pointerEvents = 'none'; - this.canvas.style.opacity = '1'; // Force visibility - this.canvas.style.transition = 'opacity 3.5s ease-in-out'; // Längere Übergangsanimation (von 1.5s auf 3.5s) + this.canvas.style.opacity = '1'; + this.canvas.style.transition = 'opacity 3.5s ease-in-out'; - // If canvas already exists, remove it first + // Falls Canvas bereits existiert, entfernen const existingCanvas = document.getElementById('neural-network-background'); if (existingCanvas) { existingCanvas.remove(); } + // An body anhängen als erstes Kind // Append to body as first child to ensure it's behind everything if (document.body.firstChild) { document.body.insertBefore(this.canvas, document.body.firstChild);