-
Notifications
You must be signed in to change notification settings - Fork 7
Add transform_encoder crate #74
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
base: main
Are you sure you want to change the base?
Conversation
|
This isn't yet tested and I'll need to add those but feedback on the API would be good |
waywardmonkeys
left a comment
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.
Getting started on looking at this ... I think @xorgy should take a look as well.
| /// bounds if configured. | ||
| pub fn set_pan_by_view(&mut self, pan: Vec2) { | ||
| self.pan = pan; | ||
| self.clamp_to_bounds(); |
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.
I think this needs to self.rebuild_transforms();
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.
so should the pan_by_view method also call self.rebuild_transforms()?
|
|
||
| /// Translation operations | ||
| /// | ||
| /// Note: Factor inputs should NOT be used with Pan operations since multiplicative |
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.
The use of "Factor" here requires that someone has read the docs for TransformAction, I think.
Also, with "Pan" ... either leave it caps for an identifier and link it, or use lowercase.
3d6b908 to
e9f8e20
Compare
e9f8e20 to
99b3c0b
Compare
Add a new transform encoder crate for mapping of ui events to transform actions.
The focus of this is to have a fully typed safe API for creating the mappings.