Skip to content

Conversation

@jrmoulton
Copy link
Contributor

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.

@jrmoulton
Copy link
Contributor Author

This isn't yet tested and I'll need to add those but feedback on the API would be good

Copy link
Contributor

@waywardmonkeys waywardmonkeys left a 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();
Copy link
Contributor

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();

Copy link
Contributor Author

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
Copy link
Contributor

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.

@jrmoulton jrmoulton force-pushed the transform-encoder branch 2 times, most recently from 3d6b908 to e9f8e20 Compare December 10, 2025 10:32
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

Successfully merging this pull request may close these issues.

2 participants