Transformation order reversed in glMatrix?
<p><a href="https://i.stack.imgur.com/LQtiX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LQtiX.png" alt="enter image description here"></a></p>

<p>In both scenes the transformations have to be swapped in glMatrix. </p>

<p>i.e. to achieve 1) in glMatrix:</p>

<pre><code>mat4.translate(modelViewMatrix, modelViewMatrix, [0.6, 0.0, 0.0]);
mat4.rotateZ(modelViewMatrix, modelViewMatrix, degToRad(45));
</code></pre>

<p>Why is the transformation order reversed? </p>