I've noticed that when you update the pano location in quick succession (i.e. anything which results in two composePanorama() calls before the first one completes) the images from the first one can overwrite the second one, causing a nasty shearing effect between the two locations.
The fix is simple: just add a request number to each pano, so that we can drop ones which are not relevant any more.
Variables:
In the lamda for compsePanorama:
(function (x, y, iRequest) {
var img = new Image();
img.requestNum = iRequest;
img.addEventListener('load', function () {
self.composeFromTile(x, y, this);
});
img.crossOrigin = '';
img.src = url;
})(x, y, _requestNumber);
At the top of composeFromTile:
// Do we need to drop this request (i.e. it is for an old pano).
if (texture.requestNum != _requestNumber)
{
console.log("(EE) Pano image request number out of sync. Dropping draw request.");
return;
}
Impressive library, thanks for sharing. 👍
John
I've noticed that when you update the pano location in quick succession (i.e. anything which results in two composePanorama() calls before the first one completes) the images from the first one can overwrite the second one, causing a nasty shearing effect between the two locations.
The fix is simple: just add a request number to each pano, so that we can drop ones which are not relevant any more.
Variables:
In the lamda for compsePanorama:
At the top of composeFromTile:
Impressive library, thanks for sharing. 👍
John