You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i was going off your example on pan/zoom on your q&a page
When i tried it, I have it drawing a square centered at 0,0. Instead of seeing a square in the center of the screen tho, i got a stretched diagonal rectangle that extended from the top/left to the bottom/right of the screen. when i swapped the tx/ty values to the new positions in translation, the square appeared normally thru various zoom operations. Maybe im doing something wrong, i dunno. That fixed it for me tho. Im not using twgl tho, I just doing plain js for the webgl stuff, and m3 to do the 3x3 matrix math
translation ended up giving me massively skewed projections when doing 2d transforms.
translate does:
1 0 0
0 1 0
tx ty 1
it needs to do:
1 0 tx
0 1 ty
0 0 1
function translation(tx, ty, dst) {
dst = dst || new MatType(9);
}
The text was updated successfully, but these errors were encountered: