fix: change ticking last to avoid jitters

This commit is contained in:
cha0s 2019-04-16 13:32:12 -05:00
parent 20de4fcf30
commit 49baa6c02a

View File

@ -96,9 +96,10 @@ export class Informed extends decorate(Trait) {
const index = steps.indexOf(entityRemoval);
steps.splice(index, 1);
const pathOverrides = [
['existent', 'state', 'isTicking'],
['physical', 'state', 'addedToPhysics'],
['visible', 'state', 'isVisible'],
// Ticking change last.
['existent', 'state', 'isTicking'],
]
for (const pathOverride of pathOverrides) {
steps.push({
@ -142,9 +143,10 @@ export class Informed extends decorate(Trait) {
steps.splice(index, 1);
steps.push(...fullAddSteps);
const pathOverrides = [
['existent', 'state', 'isTicking'],
['physical', 'state', 'addedToPhysics'],
['visible', 'state', 'isVisible'],
// Ticking change last.
['existent', 'state', 'isTicking'],
]
for (const pathOverride of pathOverrides) {
steps.push({