This is the code for calculating posmatrix in transform.js
const posMatrix = mat4.identity(new Float64Array(16)); mat4.translate(posMatrix, posMatrix, [unwrappedX