I have an application that loads a model.
my server sends back response information about what axis to use for the right and up orientation in the following format:
I am using three js which uses the right hand coordinate system so i need to convert what ever the server says to this system.
upAxis and rightAxis is always returned and possible values are: x_positive, x_negative, y_positive, y_negative, z_positive, z_negative.
I created a starter code but i am not sure what else to do or what else needs to be done:
function rotate() {
var a = state.currentInfo; //stores the values for upAxis and rightAxis
//EXAMPLE FOR X axis
if (a.upAxis === "x_positive") {
//object itself
scene.rotation.x = -90 * Math.PI/180;
}
}
How can i set the upAxis and rightAxis depending on what the server says