perf: preload 3D assets and fix mesh material hex code formatting in HeroBackground3D

This commit is contained in:
sazzadulalambd
2026-06-23 00:36:43 +06:00
parent 241c10fe29
commit a78ba9b343

View File

@@ -14,6 +14,9 @@ import {
import * as THREE from 'three'; import * as THREE from 'three';
import { OBJLoader } from 'three-stdlib'; import { OBJLoader } from 'three-stdlib';
useLoader.preload(OBJLoader, '/aerox.obj');
useLoader.preload(THREE.TextureLoader, '/jaiben.png');
const ACCENT = '#00bc84'; const ACCENT = '#00bc84';
const ACCENT_BRIGHT = '#10b981'; const ACCENT_BRIGHT = '#10b981';
@@ -138,7 +141,7 @@ function Battery({ position, scale = 1, rotation = [0, 0, 0] }: { position: [num
{/* Handle */} {/* Handle */}
<mesh position={[0, 0.70, 0]} castShadow receiveShadow> <mesh position={[0, 0.70, 0]} castShadow receiveShadow>
<torusGeometry args={[0.15, 0.04, 16, 32, Math.PI]} /> <torusGeometry args={[0.15, 0.04, 16, 32, Math.PI]} />
<meshStandardMaterial color="#0d7a33ff" roughness={0.2} metalness={0.9} /> <meshStandardMaterial color="#0d7a33" roughness={0.2} metalness={0.9} />
</mesh> </mesh>
{/* Glowing Indicator Light */} {/* Glowing Indicator Light */}