Jump to content
GreenSock

Teymooor

Members
  • Posts

    9
  • Joined

  • Last visited

Teymooor's Achievements

  1. Unfortunately, due to the randomness of the radius and angle of the cubes, what is happening is not acceptable.
  2. yes i want to change radius only, but when i call setRadius() on onUpdate does not happen anythings I want the radius to change with animation when I click on the model I would be grateful if you could take the time to solve this problem
  3. here it is https://codepen.io/Teymoor/pen/ZEoyGQp when you click on fox model , the radius changes but without animation And again, when you click on anything other than the fox, it goes back to the first state
  4. thank you Rodrigo it works but without animation can you explain why? I put this line in a click event gsap.to(radiusNumber, { counts: 8, duration: 1, onUpdate: setRadius, onComplete: doLoop, });
  5. Hi this is a part o f my code function init() { const radiusNumber = { counts: 3 }; const setRadius = () => { const rad = radiusNumber.counts + Math.random() * 6; return rad; }; gsap.to(radiusNumber, { counts: 8, duration: 1, onUpdate: setRadius, }); for (var i = 1; i < count; i++) { let radius = setRadius(); ... .. . why my radius radiusNumber.counts = 3, don't change to 8 ?
  6. Teymooor

    Gsap target

    thank you dear Rodrigo
  7. Teymooor

    Gsap target

    https://codepen.io/Teymoor/pen/ZEoyGQp This is an example of what I mean As you can see console.log prints "clicked" when you click on the floor and graves I want the radius number to change when I click on the scene
  8. Teymooor

    Gsap target

    thank you dear Rodrigo it's so helpful for me const radiusNumber = { count: 5 }; gsap.to(radiusNumber, { count: 10, duration: 1, }); console.log(radiusNumber.count); console.log(radiusNumber); Why these two logs still show the number 5? This line of code is inside a for loop radius = myObj.count + math.random() * 2; but this line is outside const radiusNumber = { count: 5 }; how can i change just the number
  9. Teymooor

    Gsap target

    Hi, i want to ask can i animate just on single number? for example var count = 5 this number use in another var var radius = count + math.random * 2 i want this number change to 10 for example when click on button
×