this.imageMimeType = this.format === 'jpg' ? 'image/jpeg' : 'image/png';
this._needSeparateTextures = [];
this.loadbalancing = false;
+ this._loadbalancingServerURL = [];
}
FluidbookLoader.prototype = {
if (!this.loadbalancing) {
return url;
}
- let server = this.loadbalancing[Math.floor(Math.random() * this.loadbalancing.length)];
- return 'https://' + server + '/' + this.fluidbook.settings.id + '_' + this.fluidbook.settings.hash + '/' + url;
+ if(this._loadbalancingServerURL[url]===undefined){
+ this._loadbalancingServerURL[url]=this.loadbalancing[Math.floor(Math.random() * this.loadbalancing.length)];
+ }
+ return 'https://' + this._loadbalancingServerURL[url] + '/' + this.fluidbook.settings.id + '_' + this.fluidbook.settings.hash + '/' + url;
},
getTexture: function (page, callback, enter) {