Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Pano.prototype.composeFromTile = function(x, y, texture) {
// Complete this section of the frame
this._ctx.drawImage(texture, x * 512, y * 512);
this._count++;
var p = Math.round(this._count * 100 / this._total);
this.emit('progress', p);
// If finished
if (this._count === this._total) {
// Done loading
this._loaded = true;
// Trigger complete event
this.emit('complete', this);
// Remove all events
eventEmitter.alloff(this);
}
};