Jump to content

pixi-action


yava
 Share

Recommended Posts

Hi, I use pixi and pixi-action for animate my sprites on stage.

If I use scale 

function mandalaOver () {
    var action_move = new PIXI.action.ScaleTo(1,1, 1);
   
    
    // run the action with actionManager.
   if(animation!=null) PIXI.actionManager.cancelAction(animation);

    animation = PIXI.actionManager.runAction(mandala, action_move);
    

  
}

mandala.on('pointerout', mandalaOut);

function mandalaOut () {
     var action_move = new PIXI.action.ScaleTo(0.8,0.8, 1);
    // run the action with actionManager.
    if(animation!=null) PIXI.actionManager.cancelAction(animation);

    
    animation = PIXI.actionManager.runAction(mandala, action_move);
    
   

}

It's Ok. It's work smoothly, but if i use

function mandalaOver () {
 
   if(animation_r!=null) PIXI.actionManager.cancelAction(animation_r);
 
    
    var action_rotate = new PIXI.action.RotateTo(0.26, 0.3);
    animation_r = PIXI.actionManager.runAction(mandala, action_rotate);
    
     
}

mandala.on('pointerout', mandalaOut);

function mandalaOut () {
    
     if(animation_r!=null) PIXI.actionManager.cancelAction(animation_r);
 
    
     var action_rotate = new PIXI.action.RotateTo(0, 0.3);
     
    PIXI.actionManager.runAction(mandala, action_rotate);
    

}

It's work not smoothly, if I many times move to object. I see 
trembling. How do it smoothly, as scale.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...