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:
|
export function rotate(out, a, rad, axis) { |
as well as extra helpers for rotations around the standard axes:
|
export function rotateX(out, a, rad) { |
|
export function rotateY(out, a, rad) { |
|
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.
|
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.
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
mat4having features, that are missing in themat3implementation, leading to some weird workarounds being needed like here of rotating amat4, then stripping it down to amat3for use in a shader.So it would be great if for the
4.0release, we could standardize function behavior and feature set across all dimensions.One of these things is rotation.
mat4hasrotate(), where you can specify an axis:gl-matrix/src/mat4.js
Line 612 in 2534c9d
as well as extra helpers for rotations around the standard axes:
gl-matrix/src/mat4.js
Line 694 in 2534c9d
gl-matrix/src/mat4.js
Line 738 in 2534c9d
gl-matrix/src/mat4.js
Line 782 in 2534c9d
mat3does haverotate()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.gl-matrix/src/mat3.js
Line 380 in 2534c9d
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 fromcglmI 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.