function updatePositionsPhpAndJavsFromControlsAxes(){

    //--------- translate_x ---------------
    if (transform_controls.object.position.x!= gui_controls_funs.dg_tx){
        gui_controls_funs.dg_tx = transform_controls.object.position.x;

        // Auto-save
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }

    //--------- translate_y ---------------
    if (transform_controls.object.position.y!= gui_controls_funs.dg_ty){
        gui_controls_funs.dg_ty = transform_controls.object.position.y;

        // Auto-save
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }

    //--------- translate_z ---------------
    if (transform_controls.object.position.z!= gui_controls_funs.dg_tz){
        gui_controls_funs.dg_tz = transform_controls.object.position.z;

        // Auto-save
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }

    //--------- rotate_x ----------------------
    if (transform_controls.object.rotation._x*180/Math.PI != gui_controls_funs.dg_rx){
        gui_controls_funs.dg_rx = transform_controls.object.rotation._x * 180/Math.PI;

        // Auto-save
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }

    //---------rotate_y -------------------------------
    if (transform_controls.object.rotation._y*180/Math.PI != this.dg_ry){
        gui_controls_funs.dg_ry = transform_controls.object.rotation._y * 180/Math.PI;

//        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }

    //---------rotate_z -------------------------------
    if (transform_controls.object.rotation._z*180/Math.PI != gui_controls_funs.dg_rz){
        gui_controls_funs.dg_rz = transform_controls.object.rotation._z * 180/Math.PI;

        //envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }

    //---------scale by TransformTools-------------------------------
    var val = 0;

    if (transform_controls.object.scale.x != gui_controls_funs.dg_scale){
        val = transform_controls.object.scale.x;
    } else if (transform_controls.object.scale.y != gui_controls_funs.dg_scale){
        val = transform_controls.object.scale.y
    } else if (transform_controls.object.scale.z != gui_controls_funs.dg_scale){
        val = transform_controls.object.scale.z
    }

    //console.log("val", val);

    if (val > 0) {
        gui_controls_funs.dg_scale = val;
        transform_controls.object.scale.set( val, val, val);

        var dims = findDimensions(transform_controls.object);

        gui_controls_funs.dg_dim_x = dims[0];
        gui_controls_funs.dg_dim_y = dims[1];
        gui_controls_funs.dg_dim_z = dims[2];

        // Auto-save
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }
    //--------- end of scale ------------------------
}
/**
 *  When you change trs from axes controls then automatically the dat.gui and the php form are updated
 */
When you change trs from axes controls then automatically the dat.gui and the php form are updated
When you change trs from axes controls then automatically the dat . gui and the php form are updated
function updatePositionsPhpAndJavsFromControlsAxes(){
    if (transform_controls.object.position.x!= gui_controls_funs.dg_tx){
        gui_controls_funs.dg_tx = transform_controls.object.position.x;
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }
    if (transform_controls.object.position.y!= gui_controls_funs.dg_ty){
        gui_controls_funs.dg_ty = transform_controls.object.position.y;
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }
    if (transform_controls.object.position.z!= gui_controls_funs.dg_tz){
        gui_controls_funs.dg_tz = transform_controls.object.position.z;
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }
    if (transform_controls.object.rotation._x*180/Math.PI != gui_controls_funs.dg_rx){
        gui_controls_funs.dg_rx = transform_controls.object.rotation._x * 180/Math.PI;
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }
    if (transform_controls.object.rotation._y*180/Math.PI != this.dg_ry){
        gui_controls_funs.dg_ry = transform_controls.object.rotation._y * 180/Math.PI;
    }
    if (transform_controls.object.rotation._z*180/Math.PI != gui_controls_funs.dg_rz){
        gui_controls_funs.dg_rz = transform_controls.object.rotation._z * 180/Math.PI;
    }
    var val = 0;
    if (transform_controls.object.scale.x != gui_controls_funs.dg_scale){
        val = transform_controls.object.scale.x;
    } else if (transform_controls.object.scale.y != gui_controls_funs.dg_scale){
        val = transform_controls.object.scale.y
    } else if (transform_controls.object.scale.z != gui_controls_funs.dg_scale){
        val = transform_controls.object.scale.z
    }
    if (val > 0) {
        gui_controls_funs.dg_scale = val;
        transform_controls.object.scale.set( val, val, val);
        var dims = findDimensions(transform_controls.object);
        gui_controls_funs.dg_dim_x = dims[0];
        gui_controls_funs.dg_dim_y = dims[1];
        gui_controls_funs.dg_dim_z = dims[2];
        envir.scene.dispatchEvent({type:"modificationPendingSave"});
    }
}
function updatePositionsPhpAndJavsFromControlsAxes ( ) { if ( transform_controls . object . position . x != gui_controls_funs . dg_tx ) { gui_controls_funs . dg_tx = transform_controls . object . position . x ; envir . scene . dispatchEvent ( { type : "modificationPendingSave" } ) ; } if ( transform_controls . object . position . y != gui_controls_funs . dg_ty ) { gui_controls_funs . dg_ty = transform_controls . object . position . y ; envir . scene . dispatchEvent ( { type : "modificationPendingSave" } ) ; } if ( transform_controls . object . position . z != gui_controls_funs . dg_tz ) { gui_controls_funs . dg_tz = transform_controls . object . position . z ; envir . scene . dispatchEvent ( { type : "modificationPendingSave" } ) ; } if ( transform_controls . object . rotation . _x * 180 / Math . PI != gui_controls_funs . dg_rx ) { gui_controls_funs . dg_rx = transform_controls . object . rotation . _x * 180 / Math . PI ; envir . scene . dispatchEvent ( { type : "modificationPendingSave" } ) ; } if ( transform_controls . object . rotation . _y * 180 / Math . PI != this . dg_ry ) { gui_controls_funs . dg_ry = transform_controls . object . rotation . _y * 180 / Math . PI ; } if ( transform_controls . object . rotation . _z * 180 / Math . PI != gui_controls_funs . dg_rz ) { gui_controls_funs . dg_rz = transform_controls . object . rotation . _z * 180 / Math . PI ; } var val = 0 ; if ( transform_controls . object . scale . x != gui_controls_funs . dg_scale ) { val = transform_controls . object . scale . x ; } else if ( transform_controls . object . scale . y != gui_controls_funs . dg_scale ) { val = transform_controls . object . scale . y } else if ( transform_controls . object . scale . z != gui_controls_funs . dg_scale ) { val = transform_controls . object . scale . z } if ( val > 0 ) { gui_controls_funs . dg_scale = val ; transform_controls . object . scale . set ( val , val , val ) ; var dims = findDimensions ( transform_controls . object ) ; gui_controls_funs . dg_dim_x = dims [ 0 ] ; gui_controls_funs . dg_dim_y = dims [ 1 ] ; gui_controls_funs . dg_dim_z = dims [ 2 ] ; envir . scene . dispatchEvent ( { type : "modificationPendingSave" } ) ; } }
When you change trs from axes controls then automatically the dat.gui and the php form are updated
When you change trs from axes controls then automatically the dat . gui and the php form are updated
//--------- translate_x --------------- // Auto-save //--------- translate_y --------------- // Auto-save //--------- translate_z --------------- // Auto-save //--------- rotate_x ---------------------- // Auto-save //---------rotate_y ------------------------------- //        envir.scene.dispatchEvent({type:"modificationPendingSave"}); //---------rotate_z ------------------------------- //envir.scene.dispatchEvent({type:"modificationPendingSave"}); //---------scale by TransformTools------------------------------- //console.log("val", val); // Auto-save //--------- end of scale ------------------------