mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-31 18:14:55 -05:00
changed Example.views to use render events
This commit is contained in:
parent
b74e40024b
commit
3ac3498712
2 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue