In right handed coordinate system (three js) How can i swap the y axis with z axis?

I have a function rotate(). This will check if the user has set axisUp to ‘Y’ or ‘Z’. if the user has set the axis to Y then we dont do anything because in both left and right handed y is up. but if they choose the z axis for up then i need to rotate the scene. I am not sure if the following code is correct.

Some feeedback would be great. Is the code correct? will it be enough to rotate to z? will i need to do anything else after rotating the scene object?

thank you in advance.

my code:

    //if axisUp === y then do nothing as already y up in right handed
    if (axis.axisUp === "z_positive") {
        scene.rotation.x = -90 * Math.PI/180;
    } else {
         console.warn( 'WARNING: Not supported');

As my reply to your other post, you can set it on each individual object or mesh with myObject.up.set(0.0, 0.0, 1.0) or on THREE.Object3D.DefaultUp before any object is created.

I cant set it on object creation. the purpose of this is to rotate the scene after it has been created.

i tried : scene.up.set(0.0, 0.0, 1.0); but nothing happens. the vector gets set but the model doesnt change.

Use this
THREE.Object3D.DefaultUp.set(0, 0, 1);