-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Rotate and align objects easily #842
Conversation
|
2117576
to
c2d2adc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems mostly reasonable to me, though you know the math much better than I do. Biggest issue is variable naming and control flow makes this much harder to follow than it needs to be, so I would prefer those get fixed before merging.
const shouldBeVisible = | ||
((isFrozen && this.data.visible) || (!isFrozen && !this.data.visible)) && | ||
isWithinDistance && | ||
!AFRAME.scenes[0].systems["rotate-selected-object"].active; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this seems odd. I assume the primary intent is to hide the freeze menu on the object you are rotating? I feel like the rotate-button
component should just set a flag (enabled
?) on this component instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it actually less odd for the rotate button to be setting the visibility of the freeze menu? I thought the ideal situation be that the rotate button wouldn't know about the freeze menu and vice versa (e.g. visibility arbiter). Not sure if it's worth the effort to decomplect them like that, but seems like it's arbitrary whether visibility-while-frozen depends on rotate-button or vice versa.
You can now use the "rotate" and "align" buttons to reorient objects in the scene.