Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>See:</p> <p><a href="https://github.com/mrdoob/three.js/issues/642" rel="nofollow noreferrer">https://github.com/mrdoob/three.js/issues/642</a></p> <p><a href="https://stackoverflow.com/questions/8195602/is-wanting-to-control-the-fps-of-my-animation-a-good-reason-to-continue-using-se">Is wanting to control the FPS of my animation a good reason to continue using setTimeout in stead of requestAnimationFrame?</a></p> <p><a href="https://stackoverflow.com/questions/9308257/requestanimationframe-at-a-limited-framerate">requestAnimationFrame at a limited framerate</a></p> <p>You're basically looking at having to over-ride the built-in requestAnimationFrame functionality (which is made to make animations as fast as possible), and creating timers instead, but currently, no functionality built into kineticjs to set framerate for an animation. </p> <p>You can go into the .js file you download from the kineticjs site and mess with this code: </p> <pre><code>Kinetic.Animation._animationLoop = function() { var that = this; if(this.animations.length &gt; 0) { this._runFrames(); Kinetic.Animation.requestAnimFrame(function() { that._animationLoop(); }); } else { this.animRunning = false; } }; Kinetic.Animation._handleAnimation = function() { var that = this; if(!this.animRunning) { this.animRunning = true; that._animationLoop(); } }; RAF = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || Kinetic.Animation.fixedRequestAnimFrame; })(); Kinetic.Animation.requestAnimFrame = function(callback) { var raf = Kinetic.DD &amp;&amp; Kinetic.DD.moving ? this.fixedRequestAnimFrame : RAF; raf(callback); }; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload