-
Notifications
You must be signed in to change notification settings - Fork 180
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
Rotation with different axis does not work #106
Comments
Hi @JulianBroudy , thanks for you detailed bug report. I tested your code and I believe there's a bug in Pts here: https://github.com/williamngan/pts/blob/master/src/Num.ts#L368 I'll try to patch it in the next few days. Thank you again! |
@williamngan hi, |
Hi @JulianBroudy - Sorry about the delay. I've been so busy these days! The bug should be fixed and patched in 0.9.2. I tested with your sample code and it seemed to work. Please give it a try and see if it works for you. Thank you for reporting this bug and thanks for upgrading from Pt to Pts :D |
Hi, Does the Demo Editor include the fixed version? I am getting some weird behavior, I am not sure if I am missing something maybe you could see it right away? When enabling the following line:
(with Z point enabled) I instantly get this result: Also, enabling only XZ plane seems to rotate points until they reach this stage and it stops there: What am I doing wrong? |
Hi again @JulianBroudy - sorry it's my fault. I forgot about the array index here (8093b23) It should be fixed now (version 0.9.4). I didn't test your code but I wrote some unit tests and it's working as expected. See if it works for you. Thanks! |
Hi, |
Hello,
I am trying to migrate my code from the old Pt to this new library (Pts) and I am having some trouble.
More specifically, with the Pt's rotate2D or the Geom's rotate2D functions.
Good to know: before I illustrate the problem, I would like to add that since I was using the standalone file, in order to eliminate some possibilities I copied the standalone version that is currently public on the old repo and replaced it with my working pt.min.js and the Canvas didn't even load.
Conclusion: my version is different also from the currently released old one.
Here is a link to a gist with my version: pt.min.js.
Sample to replicate: (Tested in my own environment as well as in a demo editor)
To be clear, in the previous code, I am only trying to rotate it in 1 plane out of the 3 possibilities.
Expected result is what I have now with the old code and old pt.min.js:
Rotation on 2 planes at once

Rotation on YZ plane

Here is my current code with the old library and the pt.min.js I mentioned at the beginning.
I think the
Const.xy
don't get registered in the new library, possible?Thank you.
The text was updated successfully, but these errors were encountered: