greggman / wgpu-matrix

Fast WebGPU 3d math library
https://wgpu-matrix.org
MIT License
311 stars 16 forks source link

mat4.lookAt should probably be renamed #2

Closed magcius closed 5 months ago

magcius commented 2 years ago

I know the confusion around mat4.lookAt and gl-matrix, but I think a lot of people are still used to gluLookAt which generate a view matrix. To help clear up confusion, I suggest using a different name entirely.

shrekshao commented 1 year ago

+1, just stepped on this one. A different name will help users look up in the doc and avoids unknown bugs.

greggman commented 1 year ago

ok. will rename. Will break current users :(

shrekshao commented 1 year ago

what about using deprecated? 😂 There seems to be jsdoc and vscode support https://stackoverflow.com/questions/60755711/is-it-possible-to-mark-something-as-deprecated-in-typescript

greggman commented 1 year ago

maybe best to rip off the band-aid now and just break people. new people then won't run into the issue

greggman commented 1 year ago

ok, pushed v2.0.0

mat4.lookAt is the more common view matrix style. Hopefully that will cause less grief to new users. Sorry of the grief to existing users

mat4.aim is similar to the old mat4.lookAt though it aims down positive Z