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

UI: support simple layout alignment logic for 2D layer #127

Open
kikonen opened this issue Jan 17, 2025 · 0 comments
Open

UI: support simple layout alignment logic for 2D layer #127

kikonen opened this issue Jan 17, 2025 · 0 comments

Comments

@kikonen
Copy link
Owner

kikonen commented Jan 17, 2025

Orthographics "ui" layer needs some logic to allow aligning things against specific placement on viewport.

Ex. "align bottom, right", which should align mesh pivot agains given point. In viewporrt "bottom right" is not truly defined by [1, -1], since aspect ratio varies, thus when viewport changes will need to adjust somehow position (and size) of mesh, but retain aspect ratio.

Simple trick doing this is to enforce orthographic viewport to be in non-aspect-ratio scale, but this pushes problem in meshes, since then it' possible to use pivot [1, -1], but aspect ratio of mesh is invalid.

=> perhaps aspect ratio correction could be automatically applied in the scale of mesh?!? I.e. this could be a bit easier to manage (not sure) than adjusting position (and possibly more easy to understand layout when debugging or such).

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

No branches or pull requests

1 participant