refactor: ticking change snaps position
This commit is contained in:
parent
d09da37dc7
commit
9353a91012
|
@ -96,6 +96,11 @@ class PositionedBase extends Trait {
|
|||
listeners() {
|
||||
return {
|
||||
|
||||
isTickingChanged: () => {
|
||||
// Snap position on ticking change.
|
||||
this._position = this.serverPosition;
|
||||
},
|
||||
|
||||
tick: (elapsed) => {
|
||||
if (!this.serverPositionDirty) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user