Jump to content
Search Community

Victor Work

Members
  • Posts

    127
  • Joined

  • Last visited

Posts posted by Victor Work

  1. Hello Sahil, thank you very much, it worked perfectly. :-)
    Now, taking advantage of not having to open another topic, I would like a light, I'm learning to use Draggable, I'd like to do something like this: Draggable with Snap in the center of the screen, and I can work with a timeline. Example: https://richard.gs/work
    Is there a aglum code pen similar to this so I can study? I searched the GST YT videos but did not find anything on this level.
     

    @OSUblake @Carl @GreenSock @PointC

  2. Hello GSAP'ers

     

    I'm using Vue-Cli / Webpack template and I already managed to import ScrollMagic, but when running TimelineMax with setTween

    I get this error:
     

    "(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js"

     


    My webpack.base.config.js is configured like this:

     

    var $ = require("jquery");
    var ScrollMagic = require("scrollmagic");
    var ScrollGsap = require('scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap');
    var gsap = require("gsap");
    
    module.exports = {
    
    ...
      resolve: {
        extensions: ['.js', '.vue', '.json'],
        alias: {
          "TweenLite": Path.resolve('node_modules', 'gsap/src/uncompressed/TweenLite.js'),
          "TweenMax": Path.resolve('node_modules', 'gsap/src/uncompressed/TweenMax.js'),
          "TimelineLite": Path.resolve('node_modules', 'gsap/src/uncompressed/TimelineLite.js'),
          "TimelineMax": Path.resolve('node_modules', 'gsap/src/uncompressed/TimelineMax.js'),
          "ScrollMagic": Path.resolve('node_modules', 'scrollmagic/scrollmagic/uncompressed/ScrollMagic.js'),
          "animation.gsap": Path.resolve('node_modules', 'scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js'),
          "debug.addIndicators": Path.resolve('node_modules', 'scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators.js')
        }

     

    And my Component.vue is like this:
    <script>
    import { TweenMax, TimelineMax } from 'gsap'
    import $ from 'jquery'
    import ScrollMagic from 'scrollmagic'
    import gsap from 'scrollmagic'
    
    
    export default { mounted () { 
        TweenMax.from('#red', 5, {width: 0});
    
        const tlVueGsap = new TimelineMax()
        .from('#blue', 5, {width: 0})
        .to('#blue', 5, {x: 400})
    
    const controller = new ScrollMagic.Controller();
    
    const scene = new ScrollMagic.Scene({
            triggerElement: "#red"
        })
        .setTween(tlVueGsap)
        .addTo(controller);
        
        } //Close Mounted
                    
    } //Close Export Defautl
    </script>

     

    ScrollMagic is working, just the gsap.animation plugin that is not being imported

     

     

    Any idea how to solve it?

    Link of Github Project:

    https://github.com/Efetivos/vue_init/blob/master/src/components/GsapTest.vue

     

    Thanks Folk

     

  3. @Dipscom

     

    Hello,

    Sorry, I was using the translator, I'm Brazilian.
    I already managed to do what I wanted, in my case it was to have an animation of entrance and to have another animation of exit.
    Now I would like to have a way for the timeline to reverse through all the tweens and stop at the required action.
    Example: https://www.reed.be/

     

     

    Ai click on one of the names, it does a reverse but for the timeline at the exact point

  4. Hello GSAPers,
    I  need a very important help.
    I'd like to know the best way to make alternate transitions between Timelines. Example: I click on the Go Red button to run the red timeline, and when I click on the Go Yellow button it will reverse the current timeline and start the required timeline.

    Is there a way to do this only with one Timeline?

    See the Pen zzdJGY by Noturnoo (@Noturnoo) on CodePen

  5. Hello @Carl or anyone who can help me rs.
    I'm trying to add Timeline interaction in scroll event, I want the animation to occur only when the element enters the display. I'm using ScrollMagic, but it's animating all at once. Does anyone know how to solve it?

     

    See the Pen BRGxLy by anon (@anon) on CodePen

     

  6. Thanks @Carl, every step of the way I admire GSAP more, for tools and especially for the support you give.

    Taking advantage of the topic, I would like to know if you have in codepen some example of Draggable effect equal to this site, which has Axis / SNAP and scrolls only horizontally.

     


    • Like 1
  7. Sorry for english, I'm using the translator.

    Thanks @Carl for the support in the animation, but the rest of my question was about what will be the best code to nest this animation with the percentage of the page scrolled. I was using ScrollMagic, but it is inconsistent I am opting to use Jquery

×
×
  • Create New...