|
@@ -96901,7 +96901,13 @@ ENDSEC
|
|
|
this.canvas.width = img.width;
|
|
|
this.canvas.height = img.height;
|
|
|
this.context.drawImage(img, 0, 0);
|
|
|
- let data = this.context.getImageData(0, 0, img.width , img.height ).data; //getImageData 1px时 : pc chrome 耗时0.01毫秒左右(排除第一次的50) , 但firefox: 4。但换贴图之后就多达5甚至几十
|
|
|
+ let o = this.context.getImageData(0, 0, img.width , img.height );
|
|
|
+ let data = o && o.data; //getImageData 1px时 : pc chrome 耗时0.01毫秒左右(排除第一次的50) , 但firefox: 4。但换贴图之后就多达5甚至几十
|
|
|
+ if(!data){
|
|
|
+ console.error('getImageData 得不到?!why!');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
//console.log('changeImg',pano.id )
|
|
|
//this.img = img
|
|
|
|
|
@@ -98665,7 +98671,7 @@ ENDSEC
|
|
|
this.depthSampler.updateNearPanos(panos);
|
|
|
|
|
|
let maxWaitDur = browser.isMobile() ? 30 : 60;
|
|
|
- let changeCount = 0, maxChangeTex = browser.isMobile() ? 2 : 4, getCount = 0;
|
|
|
+ let changeCount = 0, maxChangeTex = browser.isMobile() ? 1 : 4, getCount = 0;
|
|
|
let changeTexCount = ()=>{
|
|
|
changeCount ++;
|
|
|
};
|