humbletim / glm-js

JavaScript adaptation of the OpenGL Mathematics (GLM) C++ library interfaces. JavaScript adaptation of the OpenGL Mathematics (GLM) C++ library interfaces. (project currently inactive)
http://humbletim.github.io/glm-js/
Other
43 stars 5 forks source link

Incomplete matrix swizzle #3

Closed Beuc closed 7 years ago

Beuc commented 7 years ago

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.

    var mvp = ...
    var mvp2D = glm.mat3(mvp[0].xyw, mvp[1].xyw, mvp[3].xyw);

I had to manually expand it (see https://gitlab.com/wikibooks-opengl/modern-tutorials/blob/master/2d-webgl/sprites.html).

humbletim commented 7 years ago

addressed with #8