function quatFromEulerYXZ (out, x, y, z) {
    const c1 = Math.cos(x/2);
    const c2 = Math.cos(y/2);
    const c3 = Math.cos(z/2);

    const s1 = Math.sin(x/2);
    const s2 = Math.sin(y/2);
    const s3 = Math.sin(z/2);

    out[0] = s1*c2*c3 + c1*s2*s3;
    out[1] = c1*s2*c3 - s1*c2*s3;
    out[2] = c1*c2*s3 - s1*s2*c3;
    out[3] = c1*c2*c3 + s1*s2*s3;
}
/**
 * Function to convert a Euler in YXZ order to a quaternion
 */
Function to convert a Euler in YXZ order to a quaternion
Function to convert a Euler in YXZ order to a quaternion
function quatFromEulerYXZ (out, x, y, z) {
    const c1 = Math.cos(x/2);
    const c2 = Math.cos(y/2);
    const c3 = Math.cos(z/2);
    const s1 = Math.sin(x/2);
    const s2 = Math.sin(y/2);
    const s3 = Math.sin(z/2);
    out[0] = s1*c2*c3 + c1*s2*s3;
    out[1] = c1*s2*c3 - s1*c2*s3;
    out[2] = c1*c2*s3 - s1*s2*c3;
    out[3] = c1*c2*c3 + s1*s2*s3;
}
function quatFromEulerYXZ ( out , x , y , z ) { const c1 = Math . cos ( x / 2 ) ; const c2 = Math . cos ( y / 2 ) ; const c3 = Math . cos ( z / 2 ) ; const s1 = Math . sin ( x / 2 ) ; const s2 = Math . sin ( y / 2 ) ; const s3 = Math . sin ( z / 2 ) ; out [ 0 ] = s1 * c2 * c3 + c1 * s2 * s3 ; out [ 1 ] = c1 * s2 * c3 - s1 * c2 * s3 ; out [ 2 ] = c1 * c2 * s3 - s1 * s2 * c3 ; out [ 3 ] = c1 * c2 * c3 + s1 * s2 * s3 ; }
Function to convert a Euler in YXZ order to a quaternion
Function to convert a Euler in YXZ order to a quaternion