function deselectPiece(){
        if(!selectedPiece){
            return;
        }

        selectedPiece.obj.position.set(selectedPiece.origPosition.x, selectedPiece.origPosition.y, selectedPiece.origPosition.z);
        //selectedPiece.obj.children[0].position.y = 0;

        selectedPiece = null;
    }
/**
     * Deselects selectedPiece and resets original position.
     */
Deselects selectedPiece and resets original position.
Deselects selectedPiece and resets original position .
function deselectPiece(){
        if(!selectedPiece){
            return;
        }
        selectedPiece.obj.position.set(selectedPiece.origPosition.x, selectedPiece.origPosition.y, selectedPiece.origPosition.z);
        selectedPiece = null;
    }
function deselectPiece ( ) { if ( ! selectedPiece ) { return ; } selectedPiece . obj . position . set ( selectedPiece . origPosition . x , selectedPiece . origPosition . y , selectedPiece . origPosition . z ) ; selectedPiece = null ; }
Deselects selectedPiece and resets original position.
Deselects selectedPiece and resets original position .
//selectedPiece.obj.children[0].position.y = 0;