Jump to content
Search Community

Ivan Mocs

Members
  • Posts

    56
  • Joined

  • Last visited

Posts posted by Ivan Mocs

  1. 22 minutes ago, mvaneijgen said:

    Pernahkah Anda melihat demo yang saya tautkan ini? Ia melakukan apa yang Anda inginkan, tetapi ia juga berputar, jadi hapus saja rotasinya agar skalanya saja. 

     

    Perlu diingat: Hal terbaik yang harus dilakukan saat bekerja dengan ScrollTrigger adalah menghapusnya! Ini tampaknya berlawanan dengan intuisi, namun ScrollTrigger hanya menganimasikan sesuatu saat digulir, jadi fokus saja pada animasinya terlebih dahulu dan hanya jika Anda puas dengan animasinya, tambahkan ScrollTrigger kembali. Dengan cara ini Anda dapat fokus pada satu bagian pada satu waktu dan itu akan menghemat banyak sakit kepala saat debugging. 

     

     

     

    Yes, I have seen it, but how do I get the card position to start directly from the first card?

  2. 17 minutes ago, mvaneijgen said:

    Lihat postingan yang saya buat ini. Ini menunjukkan kepada Anda bagaimana Anda dapat menyiapkan CSS untuk membuat efek penumpukan kartu apa pun yang Anda inginkan dengan GSAP.

     

     

    Setelah membaca postingan, Anda mungkin ingin memberi perhatian khusus pada demo dari postingan ini. Semoga membantu dan selamat tweening! 

     

     

    Lihat Pena

    See the Pen MWxgQbV by mvaneijgen (@mvaneijgen) on CodePen

    oleh mvaneijgen ( @mvaneijgen ) di CodePen

     

    Wow, I didn't expect to be able to do it with such a simple code, thank you.

  3. 9 minutes ago, Ivan Mocs said:

     

    yep, like this! but the movement is inverted, when I swipe left, the object moves right, likewise when up, the object moves down,

     

    I changed + to - in this code and it seems to fix the mistake

     

    const myObserver = Observer.create({
      type: "wheel",
      wheelSpeed: 10,
      onChange(self) {
        xTo(getter("x") - self.deltaX);
        yTo(getter("y") - self.deltaY);
      }

    });

     

    a suggestion from me, maybe you can create a new option for draggables like the one at https://ilyashubin.github.io/scrollbooster/

    which is emulateScroll

     

    Thank you btw
     

    and this can lead to new problems, such as shifting without knowing the bounds.

    image 21.jpg

  4. 4 minutes ago, GreenSock said:

    Maybe this will help: 

     

     

     

    yep, like this! but the movement is inverted, when I swipe left, the object moves right, likewise when up, the object moves down,

     

    I changed + to - in this code and it seems to fix the mistake

     

    const myObserver = Observer.create({
      type: "wheel",
      wheelSpeed: 10,
      onChange(self) {
        xTo(getter("x") - self.deltaX);
        yTo(getter("y") - self.deltaY);
      }

    });

     

    a suggestion from me, maybe you can create a new option for draggables like the one at https://ilyashubin.github.io/scrollbooster/

    which is emulateScroll

     

    Thank you btw
     

  5. 7 minutes ago, GreenSock said:

    I'm not quite sure what you're trying to do, but here's a fork that shows the "wheel" events triggering the onChangeY() callback on the Observer when you wheel while over the box: 

     

     

     

    If you're trying to sense touchmove events, you can use type "touch", but if you're trying to do multi-touch detection and gestures, that's not really what Observer is for. 

    maybe like on this site, can be swiped with a trackpad : https://amie.so/recap

  6. 8 menit yang lalu, mvaneijgen berkata:

    Saya telah menambahkan beberapa JS ke penangan klik Anda yang memberikan kelas ke elemen tubuh .disable-scroll, yang mengatur overflow-y: hidden; melalui CSS dan ini akan mencegah gulir. Ini sebenarnya bukan masalah GSAP, saya hanya mencari di Google "bagaimana cara berhenti menggulir di belakang elemen" dan ini adalah posting pertama yang muncul https://alvarotrigo.com/blog/prevent-scroll-on-scrollable-element-js/ Semoga membantu dan selamat tweening!

     

     

     

    Yeah you right, adding overflow:hidden will stop the scroll function, but how can I make smoothScroll inside the current div, there I write "THIS IS SCROLLING CONTENT" but I can't scroll it.

    I can't use the id "#smooth-content" at the same time

    If I add "#smooth-content" to the popup div that is currently appearing then scroll only works on that div, not on the div below it.

    8 menit yang lalu, mvaneijgen berkata:
    const smoother = ScrollSmoother.create({
      smooth: 1.4,
      content: "#smooth-content", //How to toggle to ".new-section-container"
      wrapper: "#smooth-wrapper",
    });

     

  7. I'm confused about how to determine the start and height, I want each element that is selected by [data-scroll] to have its own end, I mean when one element exits the viewport first, the transform movement stops.

    See the Pen OJwBomP by adeivan (@adeivan) on CodePen



    When viewed from the inspector on the element with data-scroll="0.75", the transform value is still changing even though the position is out of the viewport area.

    I've tried to set the "end" but when one element exits the viewport, the other element's transform also stops.

     

    How to make each element have its own "start" and "end"

    Screenshot 2023-02-01 052559.jpg

  8. 1 hour ago, GSAP Helper said:

    Sorry, but it's very difficult for me to understand what you're asking. It looks like you're using a very old version of a basic ScrollSmoother that isn't full-featured. Is there a reason you're not using ScrollSmoother? We can't really support limited implementations like this one. 


    If you're still having trouble, please make sure you make it extremely clear what the problem is what what you want to have happen, like: 
     

    • A clear description of the expected result - "I am expecting the purple div to spin 360degrees"
    • A clear description of the issue -  "the purple div only spins 90deg"
    • A list of steps for someone else to recreate the issue - "Open the demo on mobile in IOS safari and scroll down to the grey container" 
    • A minimal demo - if possible, using no frameworks, with minimal styling, only include the code that's absolutely necessary to show the issue. Please don't include your whole project. Just some colored <div> elements is great.

     

    Sorry about that, I'm just trying to learn without using plugins, in the code I only want the scrolltrigger to run outside the  class OwnScroller or onLoad() code, therefore I am confused why the scrolltrigger cannot run perfectly like I put the scrolltriger code inside onLoad().

    Update : Solution found, thanks in advance

    • Like 1
×
×
  • Create New...