Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

GreenSock last won the day on July 24 2019

GreenSock had the most liked content!


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by GreenSock

  1. No worries. There haven't been many requests for PathEditor since this thread, so I'm not planning to release it publicly anytime soon.
  2. @swampthang why do you ask? I just don't want to get into a situation where anyone is expecting official support or updates on PathEditor at this point. Questions like this put me in an awkward spot.
  3. Welcome to the forums, @Hamadi. I don't really understand your question. Did you have something related to GSAP that we can help you with? Unfortunately we just don't have the resources to provide free general consulting for teaching people how to create advanced sliders, but we'd be happy to help with any GSAP-specific questions.
  4. GreenSock

    Moving images

    Sure, you'd just animate the x, y, and scale properties of that image element. If you need more help, please provide a codepen with the assets in place and we'd be happy to take a peek and show you how it's done.
  5. Welcome to the forums, @babycheeses. This sounds like more of a Google Maps API question than a GSAP question. Unfortunately I don't have time to research all the ins and outs of how to build maps and markers. Have you reached out to the Google Maps community? My suggestion would be to just focus on manually changing the position of a marker (after creating it) so that you understand the API properly, and THEN start trying to animate it with GSAP. Once you know how to update/alter the x/y (position) of the marker(s), that'll probably make it very easy to wire up GSAP to actually animate it. After all, GSAP is just a super-fast property updater
  6. 1) There isn't anything built into GSAP that'll do that for you, no, but you can certainly wire it up yourself. ScrollMagic might be useful as well (that's not something we authored - it's a 3rd party tool that some people use to trigger things based on scroll). 2) I already provided a list above of the things that I think are most CPU-intensive (gradients, clipping paths, and strokes). Again, none of that has anything to do with GSAP - it's just about the browser rendering resolution-independent graphics. Moving to canvas or using something like PIXI.js might really help. Oh, this is very minor, but you don't have to specify units for rotation if it's the default of 'degrees'>. In other words, rotation:"50deg" can simply be rotation:50. That'll save a tiny amount of CPU cycles interpreting the units
  7. Filters and things like drop-shadow are notoriously CPU hogs. If I were you, I'd probably just create a PNG raster image of just the blur, and drop that behind the SVG. That way, there are no filters at all - it's just a plain image that can even be GPU-accelerated.
  8. Great questions, @Orasmus. Don't worry - we really try to make our licensing simple. Your usage would of course require the "Business Green" license (which it sounds like you were planning on getting already - great). Your license covers an unlimited number of your Work Products while it’s active. The only caveat is that it covers your unedited work, meaning that if your clients/customers want to make any changes, they’d need to get their own license. Otherwise, it’d make it easy for a huge company to circumvent the license by hiring a freelancer to start a project and then take it in-house and piggy-back on that single-developer license without getting their own license for their numerous developers. See what I mean? But again, all of the work you do is covered as long as it’s not edited by others outside your organization. So in your case, if your end users are building things directly in your application (and they're not editing GSAP-related code), they don't need to get their own licenses. Just make sure you get the appropriate license for your organization, covering the correct number of developers on your end. Our entire licensing model (which you can read about at http://greensock.com/why-license/) is based on the honor system and a simple number-of-developers pricing structure. We don’t require that you “register" each person or project on our site, nor do we inject “phone home” scripts that report usage or suddenly cause things to stop working if your license expires. We extend respect to our users and trust that it'll be reciprocated. Does that answer your question(s) adequately? Hope to see you on the membership roster soon. Let us know if you have any other questions or concerns. Happy tweening!
  9. GreenSock

    Moving images

    I read your question a few times, but I still don't quite understand what you're asking. Is there a GSAP-related question in there? If you're asking whether or not GSAP can animate things to different positions and scales, yes, absolutely. And the JavaScript version of GSAP uses pretty much the same API as the Flash version did. Let us know if you have any other questions. We'd love to help.
  10. It's a bit difficult to decipher because there's soooo much going on in that live page, but I suspect the problem has to do with this line: var oldGS=window.GreenSockGlobals,oldGSQueue=window._gsQueue,oldGSDefine=window._gsDefine;window._gsDefine=null;delete(window._gsDefine);var gwGS=window.GreenSockGlobals={}; That's basically forcing any GreenSock files after that to load into a special object instead of the global namespace. I'm not exactly sure why you're doing that. Also, it looks like you've got a bunch of redundant GreenSock files being loaded. A super old version of TweenMax (1.11.2), plus the latest version, plus TweenLite (which is already in both of those). You just need one TweenMax.min.js file, plus Draggable and ThrowPropsPlugin.
  11. Like @ZachSaucier said, it's very difficult to troubleshoot blind so if you can provide a public link that'd be best. This seems to be veering into more of a WordPress question rather than a GSAP question, and we really try to keep these forums focused on GSAP as much as possible. We just don't have the expertise or the resources to offer free general consulting for other technologies, but we'll do our best to chime in with suggestions when we can. Based on the markup, you may need to target each <li> in that menu, like #menu-item-40, etc. Just a guess.
  12. Thanks for renewing your membership! I'm not a WordPress expert, so I may not be able to help much, but I can say that you should NOT be putting your animation code in the <head> because the browser executes that before it even knows what's in the DOM (the stuff you're trying to animate wouldn't exist yet). It's fine to load GSAP and SplitText in your <head>, but you wouldn't want to put your animation code there - put that toward the bottom of your <body>. And yes, you'd put the SplitText.min.js file on your server and pull it in from there - it's not on our CDN (for obvious reasons).
  13. Alright, this was a fun challenge, so I forked your codepen and created this: https://codepen.io/GreenSock/pen/LomEvN?editors=0010 If I understood your goal, it covers all the bases. I wrote a function for you that you can just feed an array of URLs into and it'll distribute them around the edge of the circle evenly, and counter-rotate them. I wired up the Draggable so that its rotation simply updates the main timeline that's doing the circle and image rotations, so it's very performant (no need to keep re-creating tweens or setting new values each time). I even made the original spin resume after the throw completes, but it gradually speeds up to normal over the course of a second (so that it wasn't jarring). Fun! Does that help?
  14. Welcome to the forums, @arfdev. It's tough to troubleshoot blind, but it sounds to me like maybe the assets aren't fully loaded when GSAP starts trying to animate them. That would certainly explain why it seems to default to the origin being in the very top left corner. In order to figure out what transformOrigin:"50% 50%" actually is, it needs to getBBox() on the SVG element...and that won't report accurate sizes if the asset isn't even loaded yet. The width and height would be 0 at that point. See what I mean? I'd also recommend being careful about animating <use> elements, as certain browsers treat them oddly. I'm not saying you can't - GSAP will do whatever it can to work around browser issues, but sometimes it's simply impossible, so I'd recommend doing a lot of testing. If you're still having trouble, please post a reduced test case (it doesn't need to be your actual project - in fact, it's better if it's just a simplified version) in codepen or jsfiddle or something like that, and we'd be happy to take a peek. Have a great weekend.
  15. Welcome to the forums, @BigMattKush. And thanks for being a Club GreenSock member! The link you provided to the codepen appears to be invalid (404 error), so I'm not quite sure how to answer your question. Can you provide a valid link so we can see what's going on?
  16. Nah, you don't need MorphSVGPlugin unless you're actually morphing something or if you need to convert an existing <path> into motion path data for BezierPlugin. But you're just animating in a circular shape which is totally possible without a motion path at all - you could just use transformOrigin and rotation.
  17. This was actually quite interesting. I noticed that in @swampthang's first demo, it always broke on the 21st time I hit "next" which corresponded to exactly 0.7 seconds into the timeline. Hmm... The way GSAP distributes the animations in the staggerTo() is by figuring out the total amount of time to distribute among the staggers (in this case it's the individual "stagger" amount, 1 / 30, multiplied by 76 because you've got 77 elements and the first one starts at 0, so there are 76 staggers...thus the total amount is 76 * 0.03333333333 = 2.5333333333333), then distributes that accordingly. Thus the math for the 21st one would look like: 2.5333333333333333 * (21 / 76); //0.7000000000000001 Kinda weird, right? Technically it should be 0.7 but due to the way floating point math works in computers, it's 0.7000000000000001. So if we have a tween placed at a time of 0.7000000000000001 and you put the playhead at 0.7, it's BEFORE that tween, hence the visibility doesn't get set to "visible". Your staggers that control setting visibility to "hidden" were offset by a whole frame, thus the rounding for those hits one set later, therefore you get these TINY slivers of time (like literally 0.0000000000001, and only in very particular/rare cases) where there's a gap. I wouldn't call it a "bug" in GSAP, but an interesting anomaly in extremely rare cases like this. I think I can work around it by doing some rounding under the hood for all the values. Here's a preview of the next release (uncompressed) that has the rounding in place: https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/TweenMax-latest-beta.js If you had chosen a different value for your "frame" that doesn't trip the floating point issues, like 1/32 instead of 1/30, you wouldn't see any of this. Does that make any sense?
  18. Yeah, pretty much. You could even just tap into classList.add() and classList.remove() methods. https://developer.mozilla.org/en-US/docs/Web/API/Element/classList Good luck!
  19. I don't notice any glitches, but maybe my machine is too fast. As for changing classes, you could use a callback to do something like that (in the callback, you'd apply the class yourself using vanilla javascript or jQuery or whatever). It'd be super simple to do if you only need to go forward, but if you need it to work in reverse as well, it's just a bit more tricky. Another option is to create your own plugin to do this sort of thing (a little more hassle up front, but then you just load it and you can reuse it as much as you want across all your animations).
  20. Note: This page was created for GSAP version 2. We have since released GSAP 3 with many improvements. While it is backward compatible with most GSAP 2 features, some parts may need to be updated to work properly. Please see the GSAP 3 release notes for details. You may be surprised by how much work GSAP does under the hood to make animating transforms intuitive and performant. This video explains the top 10 reasons you should be using GSAP to animate transform-related values like scale, rotation, x, y, etc. Watch the video Independent control of each component (x, y, scaleX, scaleY, rotation, etc.) Physics-based animations and dragging, plus advanced easing like Elastic and Bounce Snap to any increment or set of values Query values anytime with _gsTransform Relative values ("+=" and "-=") Directional rotation (clockwise, counter-clockwise, or shortest) Two different skew types ("compensated" and "simple") Consistency across browsers, especially with SVG Animate along a path Sequencing and on-the-fly controls All of these features are baked into CSSPlugin (which is included inside TweenMax). See the docs for more information. Happy tweening!
  21. I really don't recommend doing className tweens (and remember, a set() is just a zero-duration tween) because it literally must rip through every...single CSS property, compare the starting and ending values (before and after adding/removing the class) and find the differences and then animate them accordingly. It's just a lot of work. You could pre-render that stuff (do the work up front) by forcing the playhead on that timeline to the end and then back to the beginning, before you ever actually need to run it. Here's a fork that shows how: https://codepen.io/GreenSock/pen/fcb8f34ac3a3f1e5e54a5618a9019390 Oh, and just so you know, there's no need to wrap your targets in "$()" (jQuery) - you can just pass in the selector text and GSAP will use document.querySelectorAll() by default. Does that help at all?
  22. A few thoughts... If you want to have the rocket start at the bottom, you don't even need to mess with any of the bezier values - you could simply set the progress to 0.5 immediately (basically make the animation jump to its halfway-done position). Easy peasy Second, I'd be very careful about following Zach's non-GSAP approach because animating transforms on SVG elements (especially with transform-origin) can get odd results in various browsers, especially Firefox. Using GSAP ensures that you don't have to worry about all that garbage. See my CSS-Tricks article here: https://css-tricks.com/svg-animation-on-css-transforms/ I agree with @PointC that it'd be much easier if everything is in the same SVG file. But if you can't do that, here's another approach: https://codepen.io/GreenSock/pen/5cbf7b7e89dc30b03919387df42be69e?editors=0010 I noticed that the rocket SVG had some really strong transforms and the sizing was odd (to me at least), so I cleaned that up. I rotated that <g> inside the rocket, and then set the transform-origin of the <svg> to the center of the earth, and then just rotated it. No need for any bezier paths. I hope that helps. ?
  23. Looks like setting start:0 and taperStart:0 improves things, right @mikel?
  24. Oddly enough, I think it's actually doing precisely what it's supposed to be doing. Whenever GSAP senses an HSL value, it switches to animate in HSL so that it can keep those values "pure" (if you animate HSL values in an RGB way, it looks very different and is typically undesirable). But of course those animate around the color wheel differently (it's NOT just taking the red, green, and blue and animating those linearly). Again, this is all by design. Here's a demo that shows the HSL values and then their converted RGB counterparts: https://codepen.io/GreenSock/pen/67ccc31471f41af5a36d3a7b9d209a75?editors=0010 (Crack open the console to see). It's using ModifiersPlugin to just intercept things just before they're applied. See what's happening? The HSL values are indeed animating exactly as they should, and then the browser converts them back to RGB which is fine. Again, this is merely a side effect of how HSL values animate compared to RGB. Does that clear things up? If you don't want to animate things in HSL, you could convert them into RGB before feeding them into the tween. This page might be useful: https://css-tricks.com/converting-color-spaces-in-javascript/
  25. I don't really have time to pull it all apart, but I don't see anything obviously "wrong". You might want to try removing the canvas stuff (just for testing), especially the globalCompositeOperation = 'lighter'. It also looke like you've got a bunch of calls to particleTwo() and some drawing stuff that might be slightly problematic (not sure). I'd be curious about removing your calls to drawTwo() just to see how that affects things.