vcyborg Posted December 30, 2016 Share Posted December 30, 2016 Hi! I'm using a drawn rectangle as a mask and I need to delete it after a tween, so I'm using onComplete and then in the callback function 'this.mask.clear()'. Seems to work fine in WebGL, but testing in some browsers using canvas it seems the mask is still there after the animation (other stuff in the function is working, just clear() not working on the mask). Is there any workaround for this? Or any other way to get rid of a mask? Any help is appreciated, thank you. Link to comment Share on other sites More sharing options...
carlosnufe Posted December 30, 2016 Share Posted December 30, 2016 Show us your code, or do an online example by jsfiddle, codepen, whatever.. Link to comment Share on other sites More sharing options...
vcyborg Posted December 30, 2016 Author Share Posted December 30, 2016 Hi Carlos! Here's a codepen: https://codepen.io/vcyborg/pen/oYKOZV Link to comment Share on other sites More sharing options...
vcyborg Posted December 30, 2016 Author Share Posted December 30, 2016 Ok, solved!! I just have to disable the mask first, by making the property null. I updated the codepen with the solution. Link to comment Share on other sites More sharing options...
Recommended Posts