raana
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by raana
-
-
On 9/2/2022 at 6:52 PM, GSAP Helper said:
It's pretty tough to troubleshoot without a minimal demo - the issue could be caused by CSS, markup, a third party library, your browser, an external script that's totally unrelated to GSAP, etc. Would you please provide a very simple CodePen or CodeSandbox that demonstrates the issue?
Please don't include your whole project. Just some colored
<div>
elements and the GSAP code is best (avoid frameworks if possible). See if you can recreate the issue with as few dependancies as possible. If not, incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, then at least we have a reduced test case which greatly increases your chances of getting a relevant answer.Here's a starter CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo:
If you're using something like React/Next/Nuxt/Gatsby or some other framework, you may find CodeSandbox easier to use.
Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions.
Hi, I put my code in codesandbox but although it works in my local system, it doesn't work here at all, I hope you can help me.
https://codesandbox.io/s/busy-dewdney-u7h30r?file=/src/App.js:3706-3718
-
I have an array that changes as the page scrolls in order of svg shapes, I need the first shape to be displayed on page load. Therefore, I entered the first path d manually and statically.
When I scroll to the end of the page and then go back to the beginning, it does not display the first page. Therefore, I returned the first shape to the array, but now the first shape is displayed twice in a row, and I want each one to be displayed only once.
I read the DOC, but I didn't get anything, maybe I didn't read it correctlyfor(let i = 0 ; i < heroSlides.length ; i++){ tl.to("#Tear",{ delay: 0.3, duration: 0.5, attr:{d:heroSlides[i].path,}}) .to("#rect",{attr:{style:`fill:${heroSlides[i].fill}`}, delay:0.75, },"-=0.3") .call(changeBoxes, [i],"-=0.4"); } const scroll = ScrollTrigger.create({ trigger: ".module", pin: true, scrub: true, start: 'top top', end: "max", animation: tl, // markers: true, pinReparent: true, fastScrollEnd: false, }); scroll.scroll();
-
1 hour ago, mvaneijgen said:
Have you looked at the position parameter? With it you can set tweens to start with the previous tween, at a specific time or 0.3 seconds after the previous tween has started '-=0.3' and more! (See the doc)
A minimal demo would really help to show you how it would work, so if it is not clear please include one.
Thank you very much, it worked.
Sometimes the colors were not displayed correctly.
I changed the set()s to to() and set Absolute time.
-
I wrote the following code to change the shape of svg, but this code has a problem. I want the color of #rect to change at the same time every time atr changes.
Is it possible to do the same code with another solution?var tl = gsap.timeline({}); //2 tl.to("#Tear", { attr: { d: First } }); //3 tl.set("#rect", { attr: { style: "fill:#FB7185" } }).to("#Tear", { attr: { d: Second } }); //4 tl.set("#rect", { attr: { style: "fill: #38BDF8" } }).to("#Tear", { attr: { d: Third } }); //5 tl.set("#rect", { attr: { style: "fill: #A78BFA" } }).to("#Tear", { attr: { d: Fourth } }); const scroll = ScrollTrigger.create({ trigger: ".J02ig", pin: true, scrub: 0.5, start: "top top", end: "max", animation: tl // onToggle: self => console.log("toggled, isActive:", self.isActive), // onUpdate: self => console.log("direction:", self.direction) }); scroll.scroll();
-
I tried to make this slide in Rickett to learn:
I get a TypeError error: _toArray is not a function.
My code:https://codesandbox.io/s/optimistic-grass-w3wwt1?file=/src/App.js
See the Pen OJgNyVm by creativeocean (@creativeocean) on CodePen
-
Thank you very much, this helps a lot.
Do you think it can be change right to left? -
-
Yes, I want the element to be curved when turn. gsap has no solution?
-
Hello
I'm going to make a digital book like a flipbook. By looking at the tutorials, I was able to make a typical right-to-left example, but the pages are not as soft as the pages of a real book.https://codesandbox.io/s/flipbook-rtl-k8w8f?file=/src/App.js:845-849
-
-
Thank you a lot 💐
-
@PointC
Thank you very much, I did not know it needs to be on before, I wrote according to the tutorials and examples Dagstart. 😁
-
-
Thanks, I used onClick and startDrag, The click event runs correctly but not startDrag! Is there a way to run the gopage function when dragging instead of moving?
https://codesandbox.io/s/test-drag-g9bkc
-
Hi, I want to learn how to make book pages. With what I have learned so far, I was only able to show the divs one after the other, but this is not enough at all and it has many problems. I want the pages to change and drag smoothly after dragging.
my cod in codesandbox and https://codesandbox.io/s/test-drag-g9bkc
-
I had previously installed with npm install gsap but today I downloaded GSAP 3 with Shockingly Green bonus files (3.8.0) from my dashboard and installed it with npm install ./gsap-bonus.tgz than I try to run npm install gsap@npm:@gsap/shockingly .
Do I have to install libraries separately?
COPY TO CLIPBOARD
1 hour ago, Cassie said:Hey @raana,
Have you included scrollTrigger?
Here's an installation guide - happy to provide pointers if you can give me more information about your project setup.
https://greensock.com/docs/v3/Installation -
Hi, I just started with GSAP and yesterday I upgraded my account and reinstalled GSAP but also when using
gsap.registerPlugin (ScrollTrigger);
I get the following error:
QuoteReferenceError: ScrollTrigger is not defined
Draggable - TypeError: Cannot read properties of undefined (reading 'style')
in GSAP
Posted
hi
All I did was add the following two lines of code and I got this error.