JoeH Posted October 12, 2020 Share Posted October 12, 2020 I haven't had this problem with other plugins apart from Draw SVG, I'm not sure what I am doing wrong, the import directory is correct and the code I am using has worked on other projects. It seems to be out of scope because the line - import drawSVG from "gsap/dist/DrawSVGPlugin"; is not highlighting, it remains greyed out. And of course the animation is not working. I have taken a screenshot Link to comment Share on other sites More sharing options...
elegantseagulls Posted October 12, 2020 Share Posted October 12, 2020 More info here: https://greensock.com/docs/v3/Installation/?checked=core,drawSVG ... import { DrawSVGPlugin } from "gsap/dist/DrawSVGPlugin"; ... useEffect(() => { gsap.registerPlugin(DrawSVGPlugin); ... }, []); 2 Link to comment Share on other sites More sharing options...
JoeH Posted October 12, 2020 Author Share Posted October 12, 2020 Thanks a lot, I've been getting stressed out with work today and you just saved my day! 1 Link to comment Share on other sites More sharing options...
Parivesh Posted October 16, 2022 Share Posted October 16, 2022 Why is this happening when the module is present.😥 Link to comment Share on other sites More sharing options...
Rodrigo Posted October 16, 2022 Share Posted October 16, 2022 Hi @Parivesh and welcome to the GreenSock forums! Draw SVG Plugin is a Club GreenSock bonus plugin and should be installed following the instructions in this page: https://greensock.com/docs/v3/Installation/ You can also test all the Club GreenSock bonus plugins and tools using the GSAP Trial package on localhost and Codesandbox. Just install it running this: npm install --save gsap-trial Then you can import and use them: import { gsap } from "gsap-trial/dist/gsap"; import { DrawSVGPlugin } from "gsap-trial/dist/DrawSVGPlugin"; gsap.registerPlugin(DrawSVGPlugin); Let us know if you have any other questions. If you keep having issues, please provide a simple minimal demo in order to see what could be the problem. Happy Tweening! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now