Skip to content

Commit

Permalink
changed Example.views to use render events
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Mar 22, 2021
1 parent b74e400 commit 3ac3498
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ Example.views = function() {
y: 1
};

// use the engine tick event to control our view
Events.on(engine, 'beforeTick', function() {
// use a render event to control our view
Events.on(render, 'beforeRender', function() {
var world = engine.world,
mouse = mouseConstraint.mouse,
translate;
Expand Down
1 change: 0 additions & 1 deletion src/core/Runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ var Common = require('./Common');
/**
* A game loop utility that updates the engine and renderer by one step (a 'tick').
* Features delta smoothing, time correction and fixed or dynamic timing.
* Triggers `beforeTick`, `tick` and `afterTick` events on the engine.
* Consider just `Engine.update(engine, delta)` if you're using your own loop.
* @method tick
* @param {runner} runner
Expand Down

0 comments on commit 3ac3498

Please sign in to comment.