GSAP
GSAP copied to clipboard
String values for motionPath array in Typescript
Demo: https://codepen.io/7ingyu/pen/PoLgXKy
I'm currently using the MotionPathPlugin to animate some fish in a pond. (See above demo for sample code). I generate random paths for the fish the swim. I am currently using vh and vw values for the path array. It works fine in the codepen, but my application is in Typesccript and apparently Point2D and PathObject both require numbers.
Would it be possible to add string as an allowed value type, or would that be a bad idea?
Interesting, I never really anticipated someone using strings in that way, but I can update the TypeScript definition in the next release to accommodate it.