Replies: 1 comment
-
here's how we make the text along path algorithm: does it help? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Context
For a live (IRL) game I would like to use a specific animation to make some footprints appear on a 2D map on a predefined scenario.
If you want to have a quick look you can check "The marauder map" from Harry Potter, even if it's not exactly what I need.1
I think the best way to achieve this is to animate something along a
Path
.Postulate
Identified steps
Here are the steps I have identified
Path
total length (I didn't find any way to get it, Except imperatively using yourPathGeometry
class from a video tutorial, using non-documentated API. I've try to get aref
property on the react component but this is not available with TypeScript.).2.
except using your custom code imperatively.3.
create one "step SVG" offsetted by some pixels left or right (based on odd/even) from the point on the line. I've thought about doing something like creating an array of sizetotalLength % distanceBetweenPoints
using some kind ofuseMemo
aware of reanimated values.What do you think ?
I'm afraid of memory leak using this technique as footing are opacity 0 but remains.
Side notes
Thanks
Footnotes
Side note : could be a nice demo for "Can it be done in React Native" with skia ;) ↩
Beta Was this translation helpful? Give feedback.
All reactions