[Solved] Weird Matrix3D rotation/scale behavior

Hello! Lately I have been just messing around with the OpenGLView class in OpenFL and have successfully managed to render a cube.

When I try to rotate it using Matrix3D values around 2 axes, however, I’ve noticed that the scale of the cube slowly increases. I did my model matrix like so:

//begin
model = new Matrix3D();
model.prependScale(0.5, 0.5, 0.5);

//render loop
model.appendRotation(-90 * delta, Vector3D.X_AXIS.add(Vector3D.Y_AXIS);
GL.uniformMatrix4fv(GL.getUniformLocation(program, "model"), false, new Float32Array(model.rawData));

Upon decomposing and outputting the model’s scale vector, I managed to confirm that the matrix was indeed scaling up.

Here is a demo of the weird behavior in action. Looking at the output, you can see that the cube is indeed getting larger.

Is there something wrong with how I handled the rotation code for the Matrix3D class? Or are wrong values getting set somewhere in the class itself? I’m using openfl 3.0.2 and lime 2.3.2

I now realized what mistake I made, with that mistake being that I forgot to normalize the axis of rotation. It’s fixed now.