mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-21 17:14:38 -05:00
Added beginRender lifecycle event.
This commit is contained in:
parent
e909b0466c
commit
531aa34acc
1 changed files with 12 additions and 0 deletions
|
@ -348,6 +348,8 @@ var Mouse = require('../core/Mouse');
|
|||
context.fillRect(0, 0, canvas.width, canvas.height);
|
||||
context.globalCompositeOperation = 'source-over';
|
||||
|
||||
Events.trigger(render, "beginRender", event);
|
||||
|
||||
// handle bounds
|
||||
if (options.hasBounds) {
|
||||
// filter out bodies that are not in view
|
||||
|
@ -1546,6 +1548,16 @@ var Mouse = require('../core/Mouse');
|
|||
* @param {} event.name The name of the event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired at the beginning of rendering after canvas is cleared
|
||||
*
|
||||
* @event beginRender
|
||||
* @param {} event An event object
|
||||
* @param {number} event.timestamp The engine.timing.timestamp of the event
|
||||
* @param {} event.source The source object of the event
|
||||
* @param {} event.name The name of the event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired after rendering
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue