Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

GreatHawkeye

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

3 Newbie

About GreatHawkeye

  • Rank
    Newbie
  1. Hey guys, sorry to bump up this thread again but I want to build my animations functions a little bit different now. I've created a AnimationsManager.js where I put my eyesAnimations function : import { TweenMax, yoyo} from 'gsap'; export function eyesAnimation( target ) { console.log(target) //controls if Bill will look to left or right let rotation = Math.floor(Math.random()*2) == 1 ? 7 : -7 //controls rotation velocity let animationSpeed = Math.floor(Math.random() * .8 ) + .25 //controls the delay after a yoyo effect let delaySpeed = Math.floor(Ma
  2. @OSUblake, I was battling with my code for like 4 hours and you solved it in 10minutes, it works perfectly, thanks
  3. Hey guys, First of all I'm using GSAP with React, it seems important to be told. Here is the code : eyesAnimation(target) { //will give either 12 or -12 let rotation = Math.floor(Math.random()*2) == 1 ? 12 : -12 //will give random value from .5 to 2 let speed = Math.floor(Math.random() * 2 ) + .5 console.log(rotation) TweenMax.to(target, speed, { rotationZ: rotation, delay: 3, repeatDelay: 3, yoyo: true, repeat: -1, onRepeat: this.eyesAnimation, onRepeatParams:["{self}"] }) } this.eyesAnimation( this.eyes )
×