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

275
Views
No se puede cambiar el color de un material con gui en tres js

Creé un nuevo meshPhysicalMaterial con

 var carMaterial = new THREE.MeshPhysicalMaterial({}); carMaterial.name= "blackPaint" carMaterial.color=0x131316

Luego, con gui, estoy tratando de acceder a la propiedad de color para cambiarla dinámicamente.

 var params = { color: 0xff00ff } const materialFolder = gui.addFolder('Customize carbody') materialFolder.addColor(params, 'color').onChange(function(){carMaterial.color.set(params.color)})

Pero cuando elijo un nuevo color, la consola siempre dice

index.js:324 TypeError no detectado: carMaterial.color.set no es una función en ColorController.__onChange (index.js:324:86) en ColorController.setValue (Controller.js:92:23) en ColorController.setValue (common. js:57:27) en setSV (ColorController.js:242:13) en HTMLDivElement.fieldDown (ColorController.js:160:27)

Nota: estoy usando la versión 142 de three.js

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!