manic.blood1993 Posted November 8, 2016 Share Posted November 8, 2016 Hey there everyone. Using Panda Im wondering how to slow down the default FPS in Animations. Currently i use loop to animate sprites. For(i=0, i<W1Height,i++){ W1.scale+0.1; W1.addTo(this.stage); Will run about 32 times, how to slow? Just use a smaller number than 0.1? Any ideas... Quote Link to comment Share on other sites More sharing options...
Stephan Posted November 13, 2016 Share Posted November 13, 2016 What version of panda are you using? I'm not sure if this is the answer you are looking for but in version 1 animations works like so: game.module( 'game.main' ) .body(function() { game.addAsset('anim1/skeleton-animation0.jpg', 'prop0'); game.addAsset('anim1/skeleton-animation1.jpg', 'prop1'); game.addAsset('anim1/skeleton-animation2.jpg', 'prop2'); game.addAsset('anim1/skeleton-animation3.jpg', 'prop3'); game.addAsset('anim1/skeleton-animation4.jpg', 'prop4'); game.addAsset('anim1/skeleton-animation5.jpg', 'prop5'); game.createScene('Main', { backgroundColor: 0xeeeeee, init: function() { this.propeller = new game.Animation( 'prop0', 'prop1', 'prop2', 'prop3', 'prop4', 'prop5' ); this.propeller.animationSpeed = 0.3; this.propeller.play(); this.propeller.position.set(230, 350); this.propeller.anchor.set(0,1); game.scene.stage.addChild(this.propeller); } }); }); So you just have to adjust the animation speed with: this.propeller.animationSpeed = 0.3; Quote Link to comment Share on other sites More sharing options...
manic.blood1993 Posted November 13, 2016 Author Share Posted November 13, 2016 Thanks very much. Been making animated intro for website. Back on track now cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.