setFromVec3(vector) {
        const ax = vector.x * 0.5;
        const ay = vector.y * 0.5;
        const az = vector.z * 0.5;

        const cosx = Math.cos(ax);
        const cosy = Math.cos(ay);
        const cosz = Math.cos(az);
        const sinx = Math.sin(ax);
        const siny = Math.sin(ay);
        const sinz = Math.sin(az);

        // XYZ order
        if(this.axisOrder === "XYZ") {
            this.elements[0] = sinx * cosy * cosz + cosx * siny * sinz;
            this.elements[1] = cosx * siny * cosz - sinx * cosy * sinz;
            this.elements[2] = cosx * cosy * sinz + sinx * siny * cosz;
            this.elements[3] = cosx * cosy * cosz - sinx * siny * sinz;
        }
        else if(this.axisOrder === "YXZ") {
            this.elements[0] = sinx * cosy * cosz + cosx * siny * sinz;
            this.elements[1] = cosx * siny * cosz - sinx * cosy * sinz;
            this.elements[2] = cosx * cosy * sinz - sinx * siny * cosz;
            this.elements[3] = cosx * cosy * cosz + sinx * siny * sinz;
        }
        else if(this.axisOrder === "ZXY") {
            this.elements[0] = sinx * cosy * cosz - cosx * siny * sinz;
            this.elements[1] = cosx * siny * cosz + sinx * cosy * sinz;
            this.elements[2] = cosx * cosy * sinz + sinx * siny * cosz;
            this.elements[3] = cosx * cosy * cosz - sinx * siny * sinz;
        }
        else if(this.axisOrder === "ZYX") {
            this.elements[0] = sinx * cosy * cosz - cosx * siny * sinz;
            this.elements[1] = cosx * siny * cosz + sinx * cosy * sinz;
            this.elements[2] = cosx * cosy * sinz - sinx * siny * cosz;
            this.elements[3] = cosx * cosy * cosz + sinx * siny * sinz;
        }
        else if(this.axisOrder === "YZX") {
            this.elements[0] = sinx * cosy * cosz + cosx * siny * sinz;
            this.elements[1] = cosx * siny * cosz + sinx * cosy * sinz;
            this.elements[2] = cosx * cosy * sinz - sinx * siny * cosz;
            this.elements[3] = cosx * cosy * cosz - sinx * siny * sinz;
        }
        else if(this.axisOrder === "XZY") {
            this.elements[0] = sinx * cosy * cosz - cosx * siny * sinz;
            this.elements[1] = cosx * siny * cosz - sinx * cosy * sinz;
            this.elements[2] = cosx * cosy * sinz + sinx * siny * cosz;
            this.elements[3] = cosx * cosy * cosz + sinx * siny * sinz;
        }

        return this;
    }
Sets a rotation quaternion using Euler angles and its axis order

     params:
     @vector (Vec3 class object): rotation vector to set our quaternion from

     returns :
     @this (Quat class object): quaternion after having applied the rotation
*