Jump to content
Search Community

ChazUK

Premium
  • Posts

    3
  • Joined

  • Last visited

About ChazUK

ChazUK's Achievements

  1. This might be a bit outside the expertise of the GSAP team, but I thought I'd ask here just in case anyone has ideas. I've built a workspace that uses Vite, Rollup and Typescript to create banners. Each banner has it's own project root, but can include files and assets from anywhere in the project making it easier to share files among banner projects. For instance I may need to create 20 versions using the same image and the same animation. Vite and Rollup lends itself really well to this as the preview server allows you to navigate to any folder with an index.html file and that will then load and compile all the lovely type safe JavaScript for development. And then when it comes to building, its very easy to create a script that iterates over a number of banners, sets the project root and build directory for each and outputs them with just the assets, css and js that is needed. Now my issue comes when compiling, obviously I need the banners to be as small as possible when finished, but my .js file has the full gsap minified code, which I want to add as a CDN link in the HTML. Is there a way to remove the import in Typescript whilst also keeping everything strongly typed?
  2. Hi Carl, I was looking into maybe adding in a function call at the "end" point of the main timeline (which would be right before the reset) and then pausing the timeline whilst counting myself how many times it repeated, but your example using `tweenFromTo` looks like it makes a lot more sense and is more readable! Thank you
  3. Hey, I'm trying to figure out a way I can setup a timeline to go from start to finish, run a reset timeline to make it perfectly loop and then repeat, but on the last repeat the reset timeline doesn't run. Here's a rudimentary timeline to show what I mean. start end pause reset start end pause reset start end pause reset |_____________|____________|______|_____________|____________|______|_____________|............/ I'm guessing this can only be achieved by starting new timelines when the previous timelines fires its onComplete function? It'd be great to see it in a full timeline so I can check the animations with the DevTools plugin!
×
×
  • Create New...