![]() ![]() If you want the node to stay white for a certain amount of time you have to insert another step using either a WaitAnim or tTimeout().įadInAnimObj = LinearAnim(covernode, 'fillopacity', 1000, 0, 1, False, The the blink function could then look like this: def blink(self, node):įadeOutAnim = LinearAnim(covernode, 'fillopacity', 1000, 1, 0, False,įadInAnim= LinearAnim(covernode, 'fillopacity', 1000, 0, 1, False, So instead you should use the end callbacks that can be given to the animations to trigger one step after another. This means at the same time your function starts two animations and unlinks the node that should be animated. Instead of only returning after the animation is finished, it will return immediately and the animation will be executed concurrently. The problem is that anim.start() is non-blocking. Self.animObj = LinearAnim(covernode, 'fillopacity', 1000, 1, 0)Īny help is greatly appreciated, the libavg Reference isn't helping me much. Self.animObj = LinearAnim(covernode, 'fillopacity', 1000, 0, 1) Parent = self._parentNode, fillcolor="ffffff", I'm using the AVGApp class, and a list with RectNode id and how many times they are supposed to light up, like (id1, 2) def playAnim(self, animarr):Īnd my code for blink: def blink(self, node):Ĭovernode = avg.RectNode(pos=pos, size=size, fillopacity=0, Every time you click one of the nodes, the same animation should happen for that specific node. What I'm trying to do is play an animation that makes each node light up white for 2,5 seconds, and then fades back. I'm working on a project using libavg and a series of RectNodes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |