Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotating square has issues with different canvas dimensions #1

Open
lesnitsky opened this issue Jul 14, 2019 · 2 comments
Open

rotating square has issues with different canvas dimensions #1

lesnitsky opened this issue Jul 14, 2019 · 2 comments

Comments

@lesnitsky
Copy link
Owner

No description provided.

@jankohlbach
Copy link

jankohlbach commented Oct 17, 2021

I don't know if that's what this issue is about, but I figured out width and height have to be switched here:
instead of
...createRect(canvas.width / 2 - 100, canvas.height / 2 - 100, 200, 200, 0),
I think it should be
...createRect(canvas.height / 2 - 100, canvas.width / 2 - 100, 200, 200, 0),

here https://github.com/lesnitsky/webgl-month/blob/dev/README.md?plain=1#L4360 and in the following occurances
the first value is top, so it would make more sense to use the height, then it's centered

@lesnitsky
Copy link
Owner Author

feel free to submit a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants