Hello! Is it possible to easily set scope without storing additional variables?
For example in pixi.js I can do:
target.on('event', this.func, this); // this code inside the class. Last argument is scope (instance of class).
target.off('event', this.func, this); // no need to set id or store additional variables. Just also specify scope.
given that there is a lot of code in classes and often you need to specify the context, I think it's really more convenient, than:
tween = gsap.delayedCall(1, this.func.bind(this)); gsap.killTweensOf(tween) // need to store a variable
gsap.delayedCall(1, this.func.bind(this)).vars.id = 'id'; gsap.killTweensOf('id') // need to come up with id
I would like to see:
gsap.delayedCall(1, this.func, this);
gsap.killTweensOf(this.func, this);
Thanks for help:)