You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added delta property to engine update event
Added delta argument to various internal functions
Changed timeScale argument to use delta instead on various internal functions
Fixed issues when using an engine update delta of 0
Improved time independence for friction, air friction, restitution, sleeping, collisions, constraints
Removed optional correction argument from Engine.update
Removed correction and timeScale from Body.update and Matter.Runner
@@ -880,7 +883,7 @@ var Axes = require('../geometry/Axes');
880
883
/**
881
884
* A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only.
882
885
* If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration).
883
-
*
886
+
*
884
887
* @readOnly
885
888
* @property velocity
886
889
* @type vector
@@ -1109,6 +1112,16 @@ var Axes = require('../geometry/Axes');
1109
1112
* @default 1
1110
1113
*/
1111
1114
1115
+
/**
1116
+
* A `Number` that records the last delta time value used to update this body.
1117
+
* This is automatically updated by the engine inside of `Body.update`.
1118
+
*
1119
+
* @readOnly
1120
+
* @property deltaTime
1121
+
* @type number
1122
+
* @default null
1123
+
*/
1124
+
1112
1125
/**
1113
1126
* An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.
0 commit comments