Jump to content
Search Community

Jeanno

Members
  • Posts

    3
  • Joined

  • Last visited

Jeanno's Achievements

  1. Hello guys, Thanks for your answers. I should have also stated that the value of X is stored as a string in a JSON file. So none of the answers above really helps. Edit: For now I've copied the _replaceRandom method from GSAP that does just that.
  2. Hello everyone ! I want to manipulate the rotation of a 3d object (using threejs). So in order to do that, I'm able to use: gsap.to(myObject.rotation, { duration: 1, x: "random(0,30)" }); The issue is that the rotation property of threejs object is in radians. So I need to convert it to degrees. I can use the util method from threejs: THREE.Math.degToRad(myValue) but it needs a number, not a string. So I would like to know if there is a way to "compile" the random value in string format to a number ? Of course I can make a parser to convert the string to the appropriate value. But I just wanted to know if there was a more vanilla way to do it? Thanks !
×
×
  • Create New...