render: only run system_update_world_transforms for scenes that were modified
This commit is contained in:
parent
25aa902e02
commit
3c73e1d7e2
|
@ -466,8 +466,10 @@ impl Renderer for BasicRenderer {
|
||||||
|
|
||||||
if let Some((scene_han, scene_epoch)) = scene_pair {
|
if let Some((scene_han, scene_epoch)) = scene_pair {
|
||||||
if let Some(scene) = scene_han.data_ref() {
|
if let Some(scene) = scene_han.data_ref() {
|
||||||
let view = scene.world().view::<(Entities, &mut WorldTransform, &Transform, Not<Has<RelationOriginComponent<ChildOf>>>)>();
|
if scene_epoch == last_epoch {
|
||||||
lyra_scene::system_update_world_transforms(scene.world(), view).unwrap();
|
let view = scene.world().view::<(Entities, &mut WorldTransform, &Transform, Not<Has<RelationOriginComponent<ChildOf>>>)>();
|
||||||
|
lyra_scene::system_update_world_transforms(scene.world(), view).unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
let interpo_pos = self.interpolate_transforms(now_inst, last_epoch, entity, &transform, transform_epoch);
|
let interpo_pos = self.interpolate_transforms(now_inst, last_epoch, entity, &transform, transform_epoch);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue