JavaScript adaptation of the OpenGL Mathematics (GLM) C++ library interfaces. JavaScript adaptation of the OpenGL Mathematics (GLM) C++ library interfaces. (project currently inactive)
I noticed that the matrix swizzle is incomplete.
For instance I wanted to use .xyw, which is missing, when converting a 3D transformation matrix to a 2D one.
var mvp = ...
var mvp2D = glm.mat3(mvp[0].xyw, mvp[1].xyw, mvp[3].xyw);
Hi,
I noticed that the matrix swizzle is incomplete. For instance I wanted to use .xyw, which is missing, when converting a 3D transformation matrix to a 2D one.
I had to manually expand it (see https://gitlab.com/wikibooks-opengl/modern-tutorials/blob/master/2d-webgl/sprites.html).