Skip to content

Commit

Permalink
Use less particles
Browse files Browse the repository at this point in the history
  • Loading branch information
midudev committed Feb 28, 2024
1 parent a3414fa commit c751c0d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/SmokeBackground.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
light: {
background: 0xeeeeee,
light: 0xffffff,
opacity: 0.2,
opacity: 0.1,
},
} as const

Expand All @@ -40,7 +40,7 @@
// camara 📹
// 75 -> ángulo de visión
const camera = new THREE.PerspectiveCamera(75, w / h, 1, 1000)
camera.position.z = 10
camera.position.z = 500
scene.add(camera)

// ▶️ renderizador
Expand Down Expand Up @@ -74,7 +74,8 @@
opacity: currentTheme.opacity,
})

const NUM_OF_PARTICLES = 300
const NUM_OF_PARTICLES = 100

for (let p = 0; p < NUM_OF_PARTICLES; p++) {
// crear la malla con la geometria y el material
const particle = new THREE.Mesh(smokeGeo, smokeMaterial)
Expand Down

0 comments on commit c751c0d

Please sign in to comment.