perf: avoid iterator
This commit is contained in:
parent
987ae715d5
commit
a01b03b622
|
@ -191,7 +191,9 @@ export class Informed extends decorate(Trait) {
|
|||
const areaToInform = this.entity.areaToInform;
|
||||
const room = this.entity.room;
|
||||
// Write over entity list for every layer.
|
||||
for (const {index, layer} of room.layers) {
|
||||
const layers = room.layers.layers;
|
||||
for (const index in layers) {
|
||||
const layer = layers[index];
|
||||
const visibleEntities = layer.visibleEntities(areaToInform);
|
||||
const reduceEntityListRaw = {};
|
||||
for (let i = 0; i < visibleEntities.length; ++i) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user