en en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en de en en fr en en ca en en en en en en pt en en pt en en ko en en en en en de en en en en en fa en en en en en en fi hbs_lat en en en en en en en en en de es en en en en en en en en sv fr de de fr fr fr en en en en en en en fr en en en en en de en en nb en en en fa en en en en en en en de en nb nb en en nb fr en en en en en en en en nb en en en en ceb en en en en en en en en en nb en en en en ceb en en en en en en sv lv ms nb en lv ms en en en en en en en en en en en en de en en en en en de en en en en en en en sv en en en en en en en en en en en fr en en en en en sv en ms nb en en ms pl en en en en en en en en en en sv en en en en en en en en en nb en en en en ja ms en en pl en en es en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en de en en en en en fr en en en en en sv en en en en en de en en sv fr de de fr fr fr en en en pt en es en de en en en es en it en en en en en en en en en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
Mapping through arrays - list items the react way, with conditional logic
Rodrigo replied to UnioninDesign's topic in GSAP
vscode how avoid the auto-import vscode IntelliSense
Rodrigo replied to jonForum's topic in GSAP
Indeed this is happening since the latest VSCode update and is more likely a VSCode thing and how intellisense (not too intelligent it seems? ) is working. One solution could be to define global variables in your workspace or change the settings. Much like you I've seen this behaviour when working with VSCode, lucky me, in the project I'm working right now I'm using webstorm, so I don't have to deal with this for the next weeks , but still you could start an issue in VSCode repo or look in stack overflow.
Troubles with range slider updating progress() method for timelineMax in React?
Rodrigo replied to UnioninDesign's topic in GSAP
kill kill animation, am not understand.
Rodrigo replied to jonForum's topic in GSAP
GSAP Draggable Inside a React Portal - Can't Get To Work
Rodrigo replied to danboyle8637's topic in GSAP
Allright, this was not a fun morning activity We're meeting once again with this issue: https://github.com/facebook/react/issues/13654 That issue stems from this particular thread in the forums: Now as you can see in this comment by Dan Abramov (from the React team) that this behaviour was change EXCEPT for portals: https://github.com/facebook/react/issues/13654#issuecomment-435150900 Adding this makes it work on your case: Draggable.create(this.dragSchedule, { type: "x", edgeResistance: 0.75, lockAxis: true, allowNativeTouchScrolling: false, dragResistance: 0.3, throwProps: true, snap: this.snapX, onClick: this.wasClicked, zIndexBoost: true, autoScroll: 1.5, dragClickables: false, bounds: window }); Why you may ask, because now the portal has the no-op handler associated to the click event so we need to counter that by doing the opposite of the previous behaviour: Still I'll summon our beloved master @GreenSock in order to see if He has something to add to this, but I believe you landed in an edge use case. Anyway, setting the dragClickables to false seems to fix the issue. Happy tweening!!
shaking while animation on chrome only - please help me
Rodrigo replied to yasserzakaria1993's topic in GSAP
I can see some shaking on Chrome in Win7 64. This basically has to do with the fact that your page is using a lot of CPU cycles probably for a lot of calculations. There are two aspects that caught my attention. One, you have this PNG file http://yasserzakaria.com/sauditimeline/images/tlBackground.png that is transparent. Transparent PNG files, specially big ones, can be very expensive. Try without it and see how it goes. Two, you are moving this element:                 That's 22500 px width, that's huge. This element is being constantly animated. Also you're animating another 22500px width element at the same time and finally you're animating a 2250px width element. All elements are being animated at the same time and that's causing a lot of calculations and repaints, and that's stressing a lot the CPU. In a smaller screen size performance is better. In terms of performance some layer updates are taking up to 35 milliseconds and the fps are dropping to 16 per second, that's definitely not good. My advice would be to try to move the card elements and not the entire wrappers/containers, especially that big, that could reduce the amount of calculations the CPU has to make. Also see if you can include either canvas or WebGL into the app, in order to improve performance. Finally, regardless of the performance issues, that is one good looking site, very appealing, intuitive, easy and fun to use, nice job!!! Happy Tweening!!
Rodrigo replied to MrDys's topic in GSAP
Hi and welcome to the GreenSock forums. What you can do is kill any previous animation affecting the wiggle target in the button click event and then create a new tween or even more simple, create a GSAP instance outside the click handler scope and restart it on every click: const wiggleTween = TweenLite.to(box, 0.5, { x: 5, ease: "myWiggle", paused: true }); myButton.addEventListener("click", function() { wiggleTween.restart(); }); As you can see in the live sample I'm using the second approach and regardless of how many times you click on the button the animation runs it's regular course, soto speak. Happy Tweening!!
update variables in an animation cycles
Rodrigo replied to kelvinxD21's topic in GSAP
Hi and welcome to the GreenSock forums. Is not quite clear what exactly you want to do, but I'm guessing that you want to update the opacity values of some instances after you have created the timeline? If that's the case the recommendation is to create a function that builds the timeline and when you call that function set the values you want: var animation; var myCondition = true; function createTimeline () { animation = new TimelineMax() .to(".O",.5,{opacity: myCondition ? 0 : 1}) .from(".create-r",.5,{y:100, opacity: myCondition ? 0 : 1}); }; Also if you can, please provide a reduced sample illustrating what your issue is. Take a look at the post and video @Carl made for that purpose: Happy Tweening!!
Rodrigo replied to Lacika1981's topic in GSAP
In that case you could try forcing he images elements to a opacity of 0 using the config object available in the .tween methods of TimelineMax. The sweet part of it is that GSAP has a killer overwrite manager that will detect any other lingering GSAP instance that affects the images, kill them and send them to garbage collection. You could try something like this: tl.tweenFromTo(t, "b", { onStart: function() { TweenMax.to(images, 0.1, {opacity: 0}); } }); That will tween the opacity to 0 very quickly on all the images when the timeline playhead starts moving to the "b" label. Happy Tweening!!
Did 2.1, immediateRender default behaviour changed?
Rodrigo replied to jesper.landberg's topic in GSAP
Another way is to create the timeline in reversed state: const tl = new TimelineLite().reversed(true);
Optimising / performance of "not-in-DOM" elements
Rodrigo replied to Nick_Rimer's topic in GSAP
Hi and welcome to the GreenSock forums. Actually you nailed it. Since you're adding the element to the DOM on a specific event, that event is the perfect moment to either play/unpause an existing GSAP instance targeting that particular element, or to create a live animation (that is not paused) targeting the element. Now in terms of performance, creating the GSAP instances, that is running the code that makes each Tween/Timeline is not expensive at all, unless you create thousands of them. If you run into a performance issue it most likely will be the rendering part of the animations. Finally keep in mind that in javascript creating a variable, adds a reference to a specific reference to a place in the device's memory while creating the TweenLite instance on the fly, without storing it will save some memory, again a tiny amount of bits, not much. On the same subject GSAP has a very good and reliable way of sending instances to garbage collection so there is a guarantee that there will be no memory leaks in the GSAP side of the app. Hopefully this sheds some light into your scenario ad helps you. Happy Tweening!!!
Rodrigo replied to Lacika1981's topic in GSAP
Can you make a regular codepen instead of a project? I took all the code and dependencies from the link you provided and made this codepen: https://codepen.io/rhernando/pen/KJYvwW But is not showing anything, since I don't know exactly what it should be doing. That will definitely help since the error you're reporting is not being thrown in the regular codepen, so that is a step in the right direction
Rodrigo replied to pfash's topic in GSAP
Hi, In order to add to Shaun's great advice and sample, please take a look at the documentation and video @Carl made in order to understand the position parameter in GSAP's timelines instances: https://greensock.com/position-parameter
Jest, Enzyme and GSAP
Rodrigo replied to Mahmoud16's topic in GSAP
Hi and welcome to the GreenSock forums. I'm not a big fan of testing this type of stuff in React, therefore I'm not in any way an expert in using Enzyme. I know my way around Jest, but I believe the issue is coming from the enzyme side of it. Right now I'm using React Testing Library for testing React apps and components. As I said I don't know how Enzyme works in terms of checking DOM nodes being present in the rendered side of the testing but basically when that specific method is running this.searchInput is null, whatever that is in your component. I assume that is pointing to a ref in the JSX part of your code and you're creating a reference in the component's constructor, something like this (an extremely over-simplified version of your component of course): class MyComponent extends Component { constructor(props){ super(props) this.searchInput = null; } render(){ return     this.searchInput = input} type="text" />  ; } If I was you I'd start by checking the component's ref object in order what's in there when running the tests and see how Enzyme deals with mocking and creating some sort of DOM representation when running the tests in order to do the tests and assertions to it. Finally I'd recommend going to Reactiflux's discord app and see the testing channel in order to get some support on how to proceed in this particular case and check what enzyme is putting there. When you have more insight on it, please report back, it will certainly be helpful for other users in the future. Happy Tweening!!
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
Check this on how to use bonus plugins/tools in your npm set up: https://greensock.com/docs/NPMUsage Scroll to the middle of the page. Also remember to add them to the .gitignore file, if you're uploading the source to a public repo. Happy Tweening!!
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
Well I don't know what to tell you, that code is working, but something you're doing is generating the error. Are you sure you have the scramble text plugin in your setup? Are you importing it or adding it to the HTML file using a script tag? It seems that could be the source of the error, since is being returned from the CSS Plugin.
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
Using the console or some debugging tool from the browser. What is the code you have for the GSAP instance? That would be a good starting point.
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
Bascally that means that you're passing an object to the Scramble Text plugin, when you should be passing a string. Check the value you're passing to the plugin in your GSAP config object.
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
A coupple of things. First check that the component's refs object indeed has a lawn2019 property in it. You can create a console.log() call to inspect the entire $refs object. Right now GSAP is complaining that the element is null right now. Be sure that in your template you actually add the ref to a specific DOM element like this:    Also there is no need to create and store a GSAP instance in memory if you're using it only in the mounted hook, in that case just create the Tweenlite instance right away: mounted: function () { TweenLite.to(this.$refs.lawn2019, 3, { scrambleText:"THIS IS NEW TEXT" }); }
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
Just helping a fellow GSAP user, besides this forums are open territory, right? If you think otherwise, bring it on buster!!!
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
Hi, I still have no idea what you're trying to achieve and what your issue is, but I updated a previous sample of a basic GSAP/VueJS app to use the Scramble Text plugin: https://codesandbox.io/s/l261n378km Feel free to fork it in order to use your own code. Happy Tweening!!
How to use ScrambleText in Vue
Rodrigo replied to wakeel@znsg.pk's topic in GSAP
Hi and welcome to the GreenSock forums. Unfortunately there is not much we can do with that code snippet you posted. Please create a reduced sample illustrating the issue you're having in codepen: Also you can use codesandbox: https://codesandbox.io Here you can get the scramble text plugin available to work with sandboxes: https://codepen.io/GreenSock/pen/OPqpRJ Happy tweening!!
Rodrigo replied to Matheus Verissimo's topic in GSAP
Ok, so I did some research on the subject and this whole typescript is quite beyond my area of knowledge. Lucky for me I got in touch with this awesome guy in Reactiflux discord app: Damien Erambert (Twitter - GitHub) and He pointed me in the right direction. Turns out that first of all you need to import the type definitions for gsap from this package: https://www.npmjs.com/package/@types/gsap And then define both the GSAP instance and the DOM ref as the return values of the GSAP instance and the ref. I've updated the stackblitz sample so you can check it. Happy Tweening!!
Page 3 of 71
“It's shocking the @w3c didn't use @greensock as a model of how to do animation via code. Did they even ask animators what they use?”
“@greensock it’s a great library that many people love, and I know you care deeply about performance :)”
“I am more and more amazed every day, and very glad that I decided to get a business license.”
“GSAP makes my job fun, because it allows me to focus on creating rich, engaging web experiences, while GSAP handles much of the implementation details behind the scenes.”
“The best thing about GSAP is that it just works, and it works well. On every single browser I’ve tested.”
“@greensock is just pure awesomeness. What more can be said?”
“No other animation library is as intuitive, rigorous, conceptually simple and well curated as GreenSock’s”
“GreenSock has encouraged me to play with the code, to dream up new and exciting things to do.”
“GSAP and CSS Transitions: I've done both, and its like comparing an F16 to a horse. Take like 10 minutes to try.”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.