mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-24 13:29:01 -05:00
show debug stats in dev demo
This commit is contained in:
parent
c5028d5029
commit
2f14ec5eb6
1 changed files with 6 additions and 2 deletions
|
@ -40,8 +40,6 @@ var demo = function(examples, isDev) {
|
|||
document.body.appendChild(demo.dom.root);
|
||||
document.title = 'Matter.js Demo' + (isDev ? ' ・ Dev' : '');
|
||||
|
||||
MatterTools.Demo.start(demo);
|
||||
|
||||
if (isDev) {
|
||||
var buttonSource = demo.dom.buttonSource;
|
||||
var buttonCompare = buttonSource.cloneNode(true);
|
||||
|
@ -55,7 +53,13 @@ var demo = function(examples, isDev) {
|
|||
event.preventDefault();
|
||||
});
|
||||
buttonSource.parentNode.insertBefore(buttonCompare, buttonSource.nextSibling);
|
||||
|
||||
Matter.before('Render.create', function(renderOptions) {
|
||||
renderOptions.options.showDebug = true;
|
||||
});
|
||||
}
|
||||
|
||||
MatterTools.Demo.start(demo);
|
||||
};
|
||||
|
||||
module.exports = { demo: demo };
|
||||
|
|
Loading…
Reference in a new issue