取消entitylist双缓冲区 使用分帧优化大数量实体时卡顿问题
This commit is contained in:
@@ -10,8 +10,18 @@ module samples {
|
||||
moonEntity.addComponent(new es.SpriteRenderer(moonTexture));
|
||||
|
||||
this.camera.entity.addComponent(new es.FollowCamera(moonEntity));
|
||||
});
|
||||
|
||||
this.entities.frameAllocate = true;
|
||||
this.entities.maxAllocate = 10;
|
||||
for (let i = 0; i < 10000; i ++){
|
||||
this.createEntity("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public update(){
|
||||
super.update();
|
||||
console.log(this.entities.buffer.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user