mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Inlined the depth sort
This commit is contained in:
parent
61769526d4
commit
8632fe5410
1 changed files with 9 additions and 1 deletions
|
@ -27,6 +27,8 @@ var Systems = new Class({
|
|||
this.config = config;
|
||||
this.settings = Settings.create(config);
|
||||
|
||||
this.renderList = [];
|
||||
|
||||
this.sortChildrenFlag = false;
|
||||
|
||||
// Set by the GlobalSceneManager
|
||||
|
@ -151,7 +153,13 @@ var Systems = new Class({
|
|||
return;
|
||||
}
|
||||
|
||||
this.depthSort();
|
||||
// inlined to avoid branching
|
||||
if (this.sortChildrenFlag)
|
||||
{
|
||||
StableSort.inplace(this.displayList.list, this.sortZ);
|
||||
|
||||
this.sortChildrenFlag = false;
|
||||
}
|
||||
|
||||
this.cameras.render(renderer, this.displayList, interpolation);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue