Hi all, is there a Coffeescript equivalent to autoAlpha, which dynamically toggles visibility based on whenever opacity enters or exits 0?
To improve performance with lots of hidden objects, and to be confident that if I previously hid something, it won’t interfere with my currently visible objects, I frequently find myself adding lines of code around my opacity instructions that toggles the visibility of an object, or when animating opacity to 0, adding an event listener that follows opacity animation (see image).
autoAlpha does this in one step (and without an event listener). For example autoAlpha:1 first toggles visible to true, then animates the object to opacity 1. Conversely, autoAlpha:0 animates an object’s opacity to 0, then once finished, it automatically toggles visibility to false.