Jump to content
Search Community

abernier

Members
  • Posts

    4
  • Joined

  • Last visited

abernier's Achievements

  1. alright, thank you A last thing: I have a TS warning about calling .kill() on my instance however, gsDevTools is typed: how to avoid this warning?
  2. I'd like to use GSDevTools in a React (18) project with HRM enabled (with Vite). Using the new gsap.context(), I tried `.create()`ing it inside: // src/App.js function App() { useEffect(() => { const ctx = gsap.context(() => { const gsDevTools = GSDevTools.create(); // HERE gsap.fromTo(...); }); return () => ctx.revert(); }, []) return (<>...</>) } but once HRM reloads, I got 2 (or more) GSDevTools one over the other. I've contacted the support and quickly got a quick answer from @Cassie: What I understand from this, is I have to "manually" cleanup (without the help of `ctx.revert()`) my gsDevTools instance. Here is my try: // src/App.js function App() { // GSDevTools instance useEffect(() => { const gsDevTools = GSDevTools.create(); return () => gsDevTools.kill(); }, []) // Tweens useEffect(() => { const ctx = gsap.context(() => { gsap.fromTo(...); // other tweens... }); return () => ctx.revert(); }, []) return (<>...</>) } @Cassie am I correct? Is this the correct way of properly handle GSDevTools ? As you can see, I have instantiated it in its own `useEffect`: is it something recommended? Ultimately and to be sure, why GSDevTools is not "auto-cleaned" with `gsap.context()`? Is this something that could come in a next release? (or no, this is intentional) Thank you
  3. Re-encoding myvid.mp4 into myvid2.mp4 with a key for each frame(larger size, but fastest seek time): ffmpeg -i myvid.mp4 -c:v libx264 -x264-params keyint=1:min-keyint=1 myvid2.mp4 ref: https://trac.ffmpeg.org/wiki/Encode/H.264
  4. Thx, I've added a case-control (with only one tween) to compare to the one with has 3 tweens: it's ok, they are in sync! Here is the pen: http://codepen.io/abernier/pen/ONRwoO
×
×
  • Create New...