Sha256: 6455b85266ba800006d5802728b54daae488e8b70676c958e14cfc7b6d543487

Contents?: true

Size: 1.69 KB

Versions: 19

Compression:

Stored size: 1.69 KB

Contents

const AnimatePies = () => {

  $(Site.pies.list).map((index,value) => {

    const tl    = gsap.timeline({ repeat : -1, repeatDelay : 3 }),
          item  = value.children,
          speed = 0.4;

    $(item).map((index,value) => {

      const pcent  = $(value).children(Site.pies.pcent).children('span'),
            wrap   = $(value).children(Site.pies.wrap),
            title  = $(value).children(Site.pies.title),
            data   = wrap.children(Site.pies.data),
            update = $(pcent).text(),
            prev   = { val : 0 };

      const UpdateVal = () => {
        let jump = gsap.utils.snap(1,prev.val);
        pcent.text(jump);
      }

      tl
      .to(prev,{
        val : update,
        duration : speed * 6,
        onUpdate : UpdateVal
      },"start")
      .from(title,{
        duration : speed * 3,
        scrambleText : {
          chars : Site.scramble.chars,
          speed : Site.scramble.speed
        }
      },"start");

      data.map((index,value) => {

        let target = $('g#data',value);

        if (index == 0) {
          tl
          .from(target,{
            duration : speed,
            opacity  : 0
          },"start")
          .from(target,{
            duration : speed * 3,
            rotation : -180,
            transformOrigin : "center"
          },"start");
        } else if (index > 0) {
          tl
          .from(target,{
            duration : speed * 3,
            rotation : -90,
            transformOrigin : "center",
            delay : speed * 1.5
          },"start")
          .from(target,{
            duration : speed,
            opacity  : 0,
            delay    : speed * 1.5
          },"start");
        }

      });

    });

  });

}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
futuro-1.1.8 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.7 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.6 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.5 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.4 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.3 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.2 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.1 assets/js/footer/custom/5_Animate.pies.js
futuro-1.1.0 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.9 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.8 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.7 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.6 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.5 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.4 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.3 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.2 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.1 assets/js/footer/custom/5_Animate.pies.js
futuro-1.0.0 assets/js/footer/custom/5_Animate.pies.js