Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/render/Render.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1504,6 +1506,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
*
Expand Down