fix: only on tick
This commit is contained in:
parent
48a45533f5
commit
a58e1b6b89
|
@ -7,6 +7,7 @@ export default class Interpolator {
|
|||
accept(state) {
|
||||
const packet = state;
|
||||
if ('Tick' !== packet.type) {
|
||||
postMessage(packet);
|
||||
return;
|
||||
}
|
||||
this.penultimate = this.latest;
|
||||
|
@ -93,7 +94,7 @@ const interpolate = (now) => {
|
|||
|
||||
onmessage = async (event) => {
|
||||
interpolator.accept(event.data);
|
||||
if (interpolator.penultimate) {
|
||||
if (interpolator.penultimate && 'Tick' === event.data.type) {
|
||||
postMessage({
|
||||
type: 'Tick',
|
||||
payload: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user