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

300
Views
¿Puede establecer el color de fondo de un objeto Three.js TextGeometry?

Tengo un objeto básico THREE.js TextGeometry en mi escena:

 const loader = new THREE.FontLoader(); const linkToFont ='link-to-font'; let textGeo; const self = this; loader.load(linkToFont, function (font) { textGeo = new THREE.TextGeometry('Hello three.js!', { font, size: 0.3, height: 0.01, }); textGeo.computeBoundingBox(); const textMaterial = new THREE.MeshBasicMaterial({ color: 0xff0000 }); const textMesh = new THREE.Mesh(textGeo, textMaterial); textMesh.position.set(-100, 0, 0); textMesh.updateMatrixWorld(); self.addToScene(textMesh); });

Esto muestra el texto en rojo en mi escena. ¿Es posible dar al texto en esta área un "color de fondo"? ¿Es decir, un color sólido rectangular detrás del texto mismo?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tienes 2 opciones:

  1. Si desea cubrir todo el lienzo con un solo color, use scene.background para cubrir todo el lienzo scene.background = new THREE.Color(0x9900ff) .
  2. Si desea limitar el área que cubre el color de fondo, simplemente cree un plano detrás del texto con el color que desee en MeshBasicMaterial .
about 4 years ago · Juan Pablo Isaza Report
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!