Jump to content
Search Community

mediaMatch() and when to write a new animation vs passing context conditions?

NickWoodward test
Moderator Tag

Recommended Posts

Just struggling slightly with when to use context conditions to alter an animation via a ternary statement (as in the introduction video) and when to just write another animation.

For example, I've 3 cards that are horizontal @ larger sizes. The animation has a stagger and ScrollTrigger on the .card class, which is fine when they're all horizontal, but @ smaller screen sizes they're stacked vertically (so each card needs to have its own ScrollTrigger). I think the two requirements are too dissimilar to try and do anything but write two separate animations, but I'm not really sure.

Is there a clever way to do this?

---------------------

Also, just thought I'd mention that I'm really liking the last couple of introductory videos I've watched. Not sure if it's because I'm improving so can follow along, or that Cassie's doing a great job, probably both, but I thought I'd mention it got me looking at a club greensock membership last night (which says a lot because I can't really justify it yet!)

Just as another aside, in case it helps, I do think that the pricing section is a *little* bit ambiguous RE a commercial license, this bit:image.png.c0805ae26af4e7685072ede211695acb.png I can sell gsap in products commercially, as long as they aren't in templates or similar, right?

See the Pen MWBmEow by nwoodward (@nwoodward) on CodePen

Link to comment
Share on other sites

Hi,

 

I'll go through each part of your thread.

 

Indeed is better to just create a completely different animation depending on the screen size, especially since one animation will require a stagger for each card at the same element and the other will need either looping through the cards creating a new animation for each. I've been around the forums over 11 years and I've seen so many users (myself included) struggle because we try to overcomplicate stuff by making the code look super nice and complex and trying to accommodate everything in just a few methods. Sometimes is better to start with the simplest approach and then reduce the code of it when it makes sense. Sometimes is better to keep it as simple as possible because future you will look at this in 6 months and say: "What the hell...??!!"

 

Thanks for the kind words and considering a Club GreenSock membership. The commercial or business license is there when two or more developers are using the Bonus plugins and/or you're selling anything that uses GSAP, regardless if it uses the bonus plugins. Of course it makes sense to offer a product that uses the bonus stuff, considering all the amazing things you can do with them. So if you sell a template of any kind for any available UI framework that uses, say a menu, accordion and modal that uses GSAP, then yeah, you need a commercial license. If you have a site or product that uses GSAP and your product requires a fee for users to login and use it, then you need a commercial license. If you are a single freelancer that creates web pages/apps for clients on a per-project base, then you just need a single license (Shockingly Green for example) so you can use all the bonus plugins in every project you work on. Is worth noticing that we don't add phone-home code in the scripts, so when/if your license expires, every project that uses the bonus stuff will still work. You won't be able to use the latest versions of the bonus plugins or any new bonus tool that comes after that date.

 

Hopefully this clear things up. If you have any specific question regarding license be sure to follow up in this thread or create a new one if you want.

 

Happy Tweening!

  • Like 2
Link to comment
Share on other sites

Hi Rodrigo,

Yeah, I thought that was probably the case, I just thought it was pretty likely I might have overlooked some sort of clever property that allowed me to combine the two. You're right about over complicating things though, I definitely have that "what the hell" feeling fairly frequently!

 

7 minutes ago, Rodrigo said:

So if you sell a template of any kind for any available UI framework that uses, say a menu, accordion and modal that uses GSAP, then yeah, you need a commercial license. If you have a site or product that uses GSAP and your product requires a fee for users to login and use it, then you need a commercial license. If you are a single freelancer that creates web pages/apps for clients on a per-project base, then you just need a single license


That's what I ended up thinking, but thought I'd ask both for clarification and as a suggestion, because I do think "Commercial license (sell products that use GSAP to multiple clients)" is easily confused with freelance projects, which are often referred to as commercial. It's going to sound picky as hell, but if it said 'sell a product to multiple clients' it feels like it would be more accurate. 1 product to multiple users wouldn't be covered by a single licence, but many custom products to many individual clients would be, right?

Either way, I don't mean this as a criticism, just trying to help :)

 

20 minutes ago, Rodrigo said:

Is worth noticing that we don't add phone-home code in the scripts, so when/if your license expires, every project that uses the bonus stuff will still work

 

I did know this, but had forgotten, so thanks! I probably will pick it up in the next week or so now  :)

 

32 minutes ago, Rodrigo said:

Thanks for the kind words

You guys and this forum make it easy, I'm sure you know it but just wanted to make sure you were getting feedback that it does lead to sales!
 

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...