can support 【set transformMatrix(Matrix4 value)】 for Transform2D
Problem to solve
When set position or zoom will notifyListeners immediately,But I want to be more flexible with Matrix4, Please support 【set transformMatrix(Matrix4 value)】 for Transform2D
Proposal
set transformMatrix(Matrix4 value) { _transformMatrix = value.clone(); notifyListeners(); }
More information
No response
Other
- [ ] Are you interested in working on a PR for this?
Sounds good Matrix4.setFrom should be used though so that it doesn't need to create a new object. Do you want to provide a PR for this?
Sure, Thanks you . PR in https://github.com/flame-engine/flame/pull/3233 . Now, I can easily implement this interaction:
https://github.com/user-attachments/assets/f68e5f6e-cf4e-4cab-9cc3-f6484c76dc94
oh, You should change this filed when set transformMatrix. This is difficult for me, so please handle it by your self ~
Hi, I've taken an interest in this issue and I'd like to be assigned to it if that's alright.
Seems like adding set transformMatrix would be usefull, but the need to update some attributes like _position results in listeners being notified a few times which undermines part of the issue.
This could be solved by adding a new boolean into the class which is only set to true when set transformMatrix is updating these variables and doesn't let _markAsModified run notifyListeners during that time. I'd understand if this solution feels too encroaching though.