@@ -69,7 +69,7 @@ export const Features = (function () {
},
//WEBGL2: {
// isSupported: function(){
- // return gl instanceof WebGL2RenderingContext;
+ // return typeof WebGL2RenderingContext != 'undefined' && gl instanceof WebGL2RenderingContext;
// }
//},
precision: precision
@@ -281,7 +281,7 @@ class Shader {
}
// uniform blocks
- if(gl instanceof WebGL2RenderingContext){
+ if(typeof WebGL2RenderingContext != 'undefined' && gl instanceof WebGL2RenderingContext){
let numBlocks = gl.getProgramParameter(program, gl.ACTIVE_UNIFORM_BLOCKS);
for (let i = 0; i < numBlocks; i++) {
@@ -147,7 +147,7 @@ var texLoader = new THREE.TextureLoader()
- return gl instanceof WebGL2RenderingContext || gl.getExtension('EXT_frag_depth'); //shader中的GL_EXT_frag_depth需要判断一下detectIOS吗。。
+ return (typeof WebGL2RenderingContext != 'undefined' && gl instanceof WebGL2RenderingContext) || gl.getExtension('EXT_frag_depth'); //shader中的GL_EXT_frag_depth需要判断一下detectIOS吗。。
@@ -66,6 +66,7 @@ export function start(dom, mapDom, number ){ //t-Zvd3w0m
var panosLoadDone = function(){
+
viewer.images360.loadDone()
viewer.scene.add360Images(viewer.images360);
viewer.mapViewer.addListener(viewer.images360)