Jump to content
GreenSock

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

Dipscom last won the day on April 28 2021

Dipscom had the most liked content!

Dipscom

Moderators
  • Posts

    1,610
  • Joined

  • Last visited

  • Days Won

    61

Dipscom last won the day on April 28 2021

Dipscom had the most liked content!

About Dipscom

Profile Information

  • Gender
    Not Telling
  • Location
    London

Recent Profile Visitors

13,117 profile views
  1. A long time ago I wrote this Gulp task: https://github.com/dipscom/zipping-task/blob/master/gulpfile.js Don't really remember the ins and outs of it but I do remember it worked back then.
  2. Glad to be of assistance. May you go forth and animate!
  3. Hey Shutt90, Is there a reason why you aren't using a timeline in this case? That's exactly what timelines are for, to queue tweens and control them easily. You can do so much with a simple timeline, you'd be amazed at the simplicity of it. See here an example of the many ways you could organise your code using a timeline based on the code you provided: const getProjects = document.querySelectorAll('.projects_container-outer'); function tweenIn (target) { const overlay = target.querySelector('.projects_container-overlay'); const text = target.querySelector('.text'); const tl = gsap.timeline({ paused: true }); tl.to(overlay, { width: '100%', opacity: 100, duration: 0.3, backgroundColor: 'rgba(94, 59, 83, 0.8)' }); tl.from(text, { opacity: 0, x: 150, duration: 0.3 }); return tl; } getProjects.forEach(project => { const animation = tweenIn(project); project.addEventListener('mouseenter', function(e) { animation.play(); }); project.addEventListener('mouseleave', function(e) { animation.reverse(); }); });
  4. Hi gl.tiengogmail, There are a few errors in your setup. You have a redundant `App.vue` on the root of your project that's causing codesandbox to throw errors. You haven't imported ScrollTrigger or registered it as a plugin. You say you have little experience. Have you read the documentation on how to install GSAP and its plugins via NPM? Have you read the scrollTrigger documentation as well? From what I can see from your setup, you are trying to implement it straight into a complex page. How about you have a go at creating a minimal example. Just a single box that moves when you scroll the page? Or recreate one of the more basic examples from the docs? That way, you will understand how the different pieces work together and will be able to spot the mistakes you make when you are working on bigger things.
  5. Hello adamsmith104064, Here's a simple example: https://codepen.io/GreenSock/pen/QgBpve/78ee40fe229c8a75df25848128db6ca5 And here's the relevant discussion in the forums: A lot of simple examples have been created over the years and are somewhere in the forum. All it needs is a bit of searching.
  6. Hi JONATHANMAYEA, I can see you have started up a new thread following Cassie's advice but this new thread has no new information that might help a potential freelancer gauge the work required and/or be able to provide you with an accurate estimate for the work or worse, even be able to judge whether they have the right skills for the job. I have looked the the website on the url you have provided but failed to see any significant animation. I understand you are looking for a professional to help you deliver and then, you hope to learn from the codebase you end up with. But, can you give any references to what is the end result? Can you show the exported Bodymovin animation? What do you expect GSAP to do? And THREE.js? These are three very different tools that CAN work together yet, at the same time, do not need to be together to work very well on their own.
  7. Fee-fi-fo-fum! I smell a nosy english one. Be them around, or be them offline, I'll grind them down to make my bread for stealing my thread!
  8. As to what pertains to your question. There are many unknowns. My gut reaction on reading your initial post is that there is something wrong on your setup. There is no reason a page would load work and the on reload not work. When you say your page works on load, do you mean, during your hot-reloading while it is in dev mode? Are there any errors on the console? Why are you using a loop to create an animation that is based on a component from its parent, while appearing to attempt to create one set of animations per instance of the component? Why not put that into the mounted lifecycle of the child component?
  9. Allow me to reiterate that: this is a public forum. Almost everyone that is replying to posts here is doing on their own time out of goodwill. Being a member of the Club Greensock does not change the level of help and support you get. If you want or need support from the makers of GSAP, they offer consultancy services. You can contact them directly and have a conversation about your needs. As for the requests for a demo, that is the minimum asked in the forums as you will be helping people help you to solve your question. As you stated, it takes a significant amount of time to set the environment up, then the conditions, then the logic. Imagine someone who's browsing the forums on their spare time having to do all of that for every question that is posted here.
  10. Hi JoaoJack, It does not need to be in CodePen, you can use Codesandbox, you should be able to set it up as a normal project. We ask for minimal demo so that we can see the context as there could be so many things influencing the situation that hours would be spent on only trying to figure out what the setup is. I, for one, cannot even imagine what could be causing your issue. Only that there's something wrong on how you are setting the code up.
  11. Right, I got something that might be worth you looking at. I assumed you wanted a shared timeline between the components that are driven by the scrollTrigger. There are some caveats because of component initialisation order and things existing or not on the DOM. The crutial bit is that I assumed you wanted to have each component be able to add to the timeline. For that they need to share a context, which does not happen unless you setup a store or you use getContext()/setContext(). https://svelte.dev/repl/d5226741fc304dbfbab2b35a7629c56f?version=3.38.2 I'm not too well versed on it to be honest, heck, I only had cause to use it today because of this question of yours. Hopefully I understood it correctly. In any case, have a look a the code, see if it makes sense. What I cannot guarantee is the order in which each of the tweens are going to be added to the timeline as I am not sure if the children components are instantiated in the order they are listed in the code or if it could be random. It should not matter in your case as everything is/should be dependent on the scroll position. ps: Also note you don't need to add imports to many packages in the RELP, it's smart enough to pull them automagically without the need to define script tags in the <svelte:head>
  12. Hello again! I have had a bit of a lookie. As mentioned, I have not had the chance to work with any of those things yet. Plenty of docs reading... The initial investigation has yielded that part of the reason is because smoothScroll is being initialized at the App.svelte level but the animation is being initialized inside the Hello.svelte. A quick and dirty workaround is to initialize them both at the same scope. I know this is not ideal, it's a first step. I would imagine one will have to set some sort of store to communicate between the components in order to have the smoothScroll at the top level and each component have is own isolated animation. For now I have to stop and "go to work". I'll try to find some time and play around with ScrollTrigger and this SmoothScroll at some point to see if I can work something out.
  13. Hello! No, I haven't had the chance to try any of that. It's a tad late now, let me get some sleep first. Tomorrow I'll have a fiddle around to see if I can work something out.
  14. I don't know enough about the inner workings of frameworks to utter an educated opinion on the matter. I'm not even versed enough on shadowDOM for that matter. All I can see in this discussion is that there are workarounds to the matter only people don't get a good enough grasp of the tools they use in order to be aware of them. If an option is wanted of me, I'd vote to ruminate on this idea a bit longer before making a decision.
×