function composeMatrixQuat(translation, quaternion, scale, dst) {
dst = dst || Array(16);
dst = dst;
let x = quaternion[0];
let y = quaternion[1];
let z = quaternion[2];
let w = quaternion[3];
const quatMag = Math.sqrt( x * x + y * y + z * z + w * w);
x = quaternion[0] / quatMag;
y = quaternion[1] / quatMag;
z = quaternion[2] / quatMag;
w = quaternion[3] / quatMag;
const x2 = x + x;
const y2 = y + y;
const z2 = z + z;
const xx = x * x2;
const xy = x * y2;
const xz = x * z2;
const yy = y * y2;
const yz = y * z2;
const zz = z * z2;
const wx = w * x2;
const wy = w * y2;
const wz = w * z2;
const sx = scale[0];
const sy = scale[1];
const sz = scale[2];
dst[0] = (1 - (yy + zz)) * sx;
dst[1] = (xy + wz) * sx;
dst[2] = (xz - wy) * sx;
dst[3] = 0;
dst[4] = (xy - wz) * sy;
dst[5] = (1 - (xx + zz)) * sy;
dst[6] = (yz + wx) * sy;
dst[7] = 0;
dst[ 8] = (xz + wy) * sz;
dst[ 9] = (yz - wx) * sz;
dst[10] = (1 - (xx + yy)) * sz;
dst[11] = 0;
dst[12] = translation[0];
dst[13] = translation[1];
dst[14] = translation[2];
dst[15] = 1;
return dst;
}