svyar Posted January 14, 2020 Share Posted January 14, 2020 data(){ return{ value: { total: 0 } } }, mounted(){ gsap.to(this.value,1, { total: 1000 }); }, This contruction now not working. Error: Converting circular structure to JSON --> starting at object with constructor 'Object' | property '_gsap' -> object with constructor 'GSCache' --- property 'target' closes the circle Link to comment Share on other sites More sharing options...
ZachSaucier Posted January 14, 2020 Share Posted January 14, 2020 Hey svyar and welcome. You can tween an object's properties by just referring to the object and setting the property value that you want to tween to: const foo = {bar: 0}; gsap.to(foo, {bar: 1000}); Evidently whatever this is is not what you think it is If this refers to that object it should animate, all else correct. 2 Link to comment Share on other sites More sharing options...
svyar Posted January 15, 2020 Author Share Posted January 15, 2020 Oh, ok. It's worked, thanks! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now