onSnapshot(position, timestamp) {
      const snapshot = positionShapshots[positionShapshotIndex];
      snapshot.position.copy(position);
      snapshot.timestamp = timestamp;

      positionShapshotIndex = (positionShapshotIndex + 1) % positionShapshots.length;
    },
    getFirstPosition() {
      return positionShapshots[positionShapshotIndex];
    },
    getLastPosition() {
      let index = positionShapshotIndex - 1;
      if (index < 0) {
        index += positionShapshots.length;
      }
      retur