From 3ac34987127d93c7064e616b63825bb04ac30b9e Mon Sep 17 00:00:00 2001 From: liabru Date: Mon, 22 Mar 2021 23:32:55 +0000 Subject: [PATCH] changed Example.views to use render events --- examples/views.js | 4 ++-- src/core/Runner.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/views.js b/examples/views.js index 3e6ca593..2ede02e0 100644 --- a/examples/views.js +++ b/examples/views.js @@ -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; diff --git a/src/core/Runner.js b/src/core/Runner.js index 51a6d7de..05d0293d 100644 --- a/src/core/Runner.js +++ b/src/core/Runner.js @@ -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