Effect problem

updateEffects (codepen.io)
why? don't move in wiggle mode if I don't add Ticker.add(function(){})
why? updateEffects() no effects

1 Like

Hi @Yan,

The updateEffect() updates the cache on the object. It was not updating the cache on the object used as the alphaMask (the container with the tile that was being animated). So adding an updateCache() to that in the animateCall worked.

We had intended to also update the object used as an alphaMask but had the code in ZIM wrong. So that has been patched in ZIM 016 and now the updateEffects updates the cache on both parts - the object with the effect and the object used for the alphaMask.

The wiggle was not showing because the container used for the alphaMask is not on the stage and we have a check for that in the wiggle() that is not in the animate(). That is tricky, because we can't just check to see of the object is used for an alphaMask because it is the parent that is being used. So, I think the best solution is to add the container but set its vis(false)

var maskC = new Container(size,size).addTo().vis(false)
1 Like