Open Thanzex opened 2 years ago
Hi @Thanzex, I would suggest you override prependTransform
: https://github.com/ShukantPal/pixi-essentials/blob/70a16f9befc9d3b7ee799b8cea4bd11c8454b26f/packages/transformer/src/Transformer.ts#L1407
It emits a transformchange
event already but if you want to change the applied transform itself, you would need to override it. Let me know if you need additional consulting services.
But prependTransform it private
Hi again! I will refer to movement/scale/rotation/skew as operations for brevity.
As of right now, the Transformer handles all inputs and operations by itself, but it would be nice to be able to handle some more interesting cases. Here are the main options i'm missing, forgive me if they are already present and I simply did not find them.
It would be very useful to have a callback after the changes are computed but before the actual transform is performed, to be able to handle some more interesting logic.
Some use cases that would be enabled are:
Ideally, one such callback would take as input the delta of the current frame and the delta since the beginning of the event and be able to make any change to the operation. Please excuse the very crude example.
Let me know what you think about it