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

406
Views
¿Cómo puedo rotar una malla 90 grados en ThreeJS?

Tengo una malla que quiero rotar 90 grados dentro de Three JS. Aquí está la imagen de la situación actual:ingrese la descripción de la imagen aquí

Quiero que la malla seleccionada se gire paralelamente a la malla grande. He intentado rotar la matriz de esta manera:

 matrix = new THREE.Matrix4().makeRotationX(1.57)

Pero la malla entra en extrañas rotaciones. ¿Hay alguna manera más fácil de rotarlo 90 grados?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

La rotación threejs usa radianes (como sabrás)

puedes usar esto

 mesh.rotation.x = Math.PI / 2;

o

 mesh.rotation.set(new THREE.Vector3( 0, 0, Math.PI / 2));
over 4 years ago · Santiago Trujillo Report

0

Puede rotar un objeto usando esta función:

 function rotateObject(object, degreeX=0, degreeY=0, degreeZ=0) { object.rotateX(THREE.Math.degToRad(degreeX)); object.rotateY(THREE.Math.degToRad(degreeY)); object.rotateZ(THREE.Math.degToRad(degreeZ)); } // usage: rotateObject(myPlane, 40, 30, 20);
over 4 years ago · Santiago Trujillo Report

0

Digamos que meshToRotate debe girarse 90 grados en el eje X. Luego haz lo siguiente.

 var meshToRotate = new THREE.Mesh( geometry, material ); //Rotating mesh by 90 degree in X axis. meshToRotate.rotateX( Math.PI / 2 );
over 4 years ago · Santiago Trujillo 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!