Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
ThreeJS alfa en puntosmaterial

He creado un "campo de estrellas" en la geometría de puntos. Estoy tratando de aplicar una textura con transparencia a los puntos, para que no se vean como círculos blancos.

Creé esta textura ingrese la descripción de la imagen aquí

y esta imagen en escala de grises para ser un mapa alfa ingrese la descripción de la imagen aquí

Y creo cada estrella así:

 createStar = () => { const starTexture = new THREE.TextureLoader().load('/assets/images/homepage/star.png'); const starAlphaTexture = new THREE.TextureLoader().load('/assets/images/homepage/star-alpha.png'); const starMaterial = new THREE.PointsMaterial({ alphaTest: 0.5, size: 1, depthTest: false, transparent: true, alphaMap: starAlphaTexture, sizeAttenuation: true, opacity: 1, blending: THREE.AdditiveBlending }); const star = new THREE.Points(geometry, starMaterial); const [x, y, z] = Array(3) .fill(undefined) .map(() => THREE.MathUtils.randFloatSpread(100)); star.position.set(x, y, z); return star; };

Esto es mecanografiado, FWIW. Tengo otra función que hace el grupo de estrellas. Como dije, los puntos se crean como se esperaba, pero no se ven como diamantes como esperaba. Son todos blancos o se ven así:

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!