Create 2D games in JavaScript, made easier · By Cedric Stoquer
Is there an alternative to Unity’s Time.deltaTime or Godots delta?
There is no delta-time by default. Here is how you can implement it:
var previousTime = Date.now(); module.exports = function () { var now = Date.now(); var deltaTime = now - previousTime; previousTime = now; // ... }
Thank you!