 g.animate([
          {x: 100},
          {x: 900},
          {x: 100},
        ], {
          duration: duration * 20,
          iterations: Infinity,
          easing: 'ease-in-out',
          fill: 'both',
        });

        g.animate([
          {rotate: 30, scale: [1, 1]},
          {rotate: -30, scale: [-1, 1]},
          {rotate: 30, scale: [1, 1]},
        ], {
          duration: duration * 20,
          iterations: Infinity,
          easing: 'step-end',
          fill: 'both',
        });

   