From 6b6ff93e90ef3671cae99235003683dbb7c09852 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Tue, 24 Mar 2026 14:13:02 -0400 Subject: [PATCH] refactor: remove _placeholderCanvas 404-fixer code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Delete the 12-line procedural canvas block that papered over a missing placeholder-texture.jpg. The texture was stored in loadedAssets but never retrieved anywhere — pure waste. Missing assets should surface as visible errors, not be silently swallowed. Fixes #427 --- app.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/app.js b/app.js index 7713964..d20cb70 100644 --- a/app.js +++ b/app.js @@ -32,19 +32,6 @@ loadingManager.onProgress = (url, itemsLoaded, itemsTotal) => { document.getElementById('loading-bar').style.width = `${progress}%`; }; -// Procedural placeholder texture — avoids 404 for missing placeholder-texture.jpg -const _placeholderCanvas = document.createElement('canvas'); -_placeholderCanvas.width = 64; -_placeholderCanvas.height = 64; -const _placeholderCtx = _placeholderCanvas.getContext('2d'); -_placeholderCtx.fillStyle = '#0a0a18'; -_placeholderCtx.fillRect(0, 0, 64, 64); -const placeholderTexture = new THREE.CanvasTexture(_placeholderCanvas); -loadedAssets.set('placeholder-texture', placeholderTexture); -// Notify loading manager so it still counts one asset -loadingManager.itemStart('placeholder-texture'); -loadingManager.itemEnd('placeholder-texture'); - // === MATRIX RAIN === // 2D canvas layer rendered behind the Three.js scene. const matrixCanvas = document.createElement('canvas'); -- 2.43.0