-
Notifications
You must be signed in to change notification settings - Fork 726
Description
I'm a huge fan of this library and it was an important part in my recent project (https://github.com/FrostKiwi/Mirrorball), specifically credited gl-matrix in the credits^^
I migrated to this project when porting my code to WebApps, away from https://github.com/recp/cglm
One of the things I came across is mat4 having features, that are missing in the mat3 implementation, leading to some weird workarounds being needed like here of rotating a mat4, then stripping it down to a mat3 for use in a shader.
So it would be great if for the 4.0 release, we could standardize function behavior and feature set across all dimensions.
One of these things is rotation. mat4 has rotate(), where you can specify an axis:
Line 612 in 2534c9d
| export function rotate(out, a, rad, axis) { |
as well as extra helpers for rotations around the standard axes:
Line 694 in 2534c9d
| export function rotateX(out, a, rad) { |
Line 738 in 2534c9d
| export function rotateY(out, a, rad) { |
Line 782 in 2534c9d
| export function rotateZ(out, a, rad) { |
mat3 does have rotate() function, but it has no input for which axis it should be rotated around. It just assumes the Z-Axis and there are also no helpers for the other axes.
Line 380 in 2534c9d
| export function rotate(out, a, rad) { |
It's one of the things that are different across dimensions in gl-matrix. This is my one of my feature requests for 4.0. Coming from cglm I also miss some functions for simple cases like here: https://cglm.readthedocs.io/en/latest/affine-mat.html, but that's outside the scope of this issue.