Mikael Sand
Mikael Sand
Same way as in any other svg https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform#Matrix ```svg ``` I don't see the problem, you know how to multiply two matrices no? https://en.wikipedia.org/wiki/Matrix_multiplication#Definition
This only works on react-native-svg, as it comes from the svg spec. Would have to do profiling to check performance. Quite likely, natively animated/computed logic would be more performant than...
and style={{transform: [{matrix: something}]}} should certainly work in both react-native and react-native-svg
There's also this happy chap i tried to help once, might be useful for you as well: https://github.com/react-native-community/react-native-svg/issues/1064
But, when I think about it, seems you don't need to accumulate any state at all, you just need to keep track of where the pointers were when the number...
Ah, yes, when the gesture ends you should accumulate the transform for sure, was just thinking about individual gestures on top of the current state. So the initial transform is...
Alternatively you can have four different transforms, one for each primitive, and accumulate those, will need to consider interactions between translations and scale-rotate in the gestures a bit more carefully...
But yeah, to clarify the native aspect, if you add animations, it'll probably just feel more disconnected from the gesture, you want to minimize the number of cycles from the...
This one use-case would probably deserve its own tailor-made performance / use-case optimized package, something like react-native-pan-zoom-rotate / react-native-zoomable perhaps, pull requests to zoomable-svg for a native mode would be...
And yeah, if you have the transform as one matrix, you don't need to split it up, just start with the initial A and B matrix as identity, when the...