0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50:52 -05:00

deprecate Engine.run alias replaced by Runner.run

This commit is contained in:
liabru 2021-04-14 23:59:56 +01:00
parent 9303119629
commit 5817046eee
2 changed files with 6 additions and 1 deletions

View file

@ -305,7 +305,8 @@ var Body = require('../body/Body');
};
/**
* An alias for `Runner.run`, see `Matter.Runner` for more information.
* A deprecated alias for `Runner.run`, use `Matter.Runner.run(engine)` instead and see `Matter.Runner` for more information.
* @deprecated use Matter.Runner.run(engine) instead
* @method run
* @param {engine} engine
*/

View file

@ -28,3 +28,7 @@ Matter.Svg = require('../geometry/Svg');
Matter.Vector = require('../geometry/Vector');
Matter.Vertices = require('../geometry/Vertices');
Matter.World = require('../body/World');
// temporary back compatibility
Matter.Engine.run = Matter.Runner.run;
Matter.Common.deprecated(Matter.Engine, 'run', 'Engine.run ➤ use Matter.Runner.run(engine) instead');