Jump to content
GreenSock

Teymooor

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by Teymooor

  1. Teymooor

    gsap value

    The problem is solved, guys. Thank you for your time.
  2. Teymooor

    gsap value

    yes exactly Its variable as well
  3. Teymooor

    gsap value

    It is part of a project and it is difficult to create a codepen for it. I hope the explanation is enough
  4. Teymooor

    gsap value

    The number indicates the location of the camera. (threejs) This value is changing, But its number (x,y,z) is always known, the value of 'pos.x' is always less than 20. I want to create a variable number that will always be 20 when added to the value of 'pos.x'. For example, if 'pos.x' is 12, 8 should be added to it to get 20. k is 8 in this situation.
  5. Teymooor

    gsap value

    Hi, pos : (x,y,z) k : a random value I want pos.x + k = 20 "k" must be the value that is added to the value of the pos.x to return the value of 20. Is it possible with gsap?
  6. Unfortunately, due to the randomness of the radius and angle of the cubes, what is happening is not acceptable.
  7. 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
  8. 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
  9. 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, });
  10. 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 ?
  11. Teymooor

    Gsap target

    thank you dear Rodrigo
  12. 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
  13. 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
  14. 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
×