Skip to content

Commit

Permalink
deprecate Engine.run alias replaced by Runner.run
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Apr 14, 2021
1 parent 9303119 commit 5817046
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
4 changes: 4 additions & 0 deletions src/module/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

0 comments on commit 5817046

Please sign in to comment.