BufferGeometry & Particle Setup
To achieve high 60fps performance across mobile and desktop, utilize THREE.BufferGeometry and single-draw point clouds.
const particleCount = 1500;
const geometry = new THREE.BufferGeometry();
const positions = new Float32Array(particleCount * 3);
for (let i = 0; i < particleCount * 3; i++) {
positions[i] = (Math.random() - 0.5) * 60;
}
geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
const material = new THREE.PointsMaterial({
color: 0xff003c,
size: 0.15,
transparent: true,
opacity: 0.8
});
const particleSystem = new THREE.Points(geometry, material);
scene.add(particleSystem);