I’m really excited about the new reactive programming features in Krpano—great work! 😊
I was especially looking forward to the ondestroy event for layers and hotspots, as it seems like a great fit for addressing certain challenges.
For example, I often create tween animations with the donecall parameter for infinite loops. However, when changing scenes, warnings like “unknown action” appear because all layers or hotspots from the previous scene are destroyed. To avoid these warnings, I’ve been adding onremovepano actions to every scene that includes tween animations.
If the new ondestroy event could serve as an alternative to my current solution, it would be a perfect fit given its name, “ONDESTROY.” It feels like this event could be the most intuitive and practical way to handle such scenarios.
Here’s a simple example of what I mean:
<layer url="abc.jpg"
ongoup="tween(y, 10,,, ongodown() )"
ongodown="tween(y, -10,,, ongoup() )"
onloaded="ongoup();"
ondestroy="stoptween(y)"
/>
I’m really looking forward to seeing improvements to the ondestroy event in the near future.
Also, could you share some guidance on the best practices for using ondestroy as it was intended? That would be incredibly helpful!
This version reads more polished and positive while clearly expressing your points. Let me know if you’d like further adjustments! 😊