After a few times of removing and embedding krpano. I get the same error message "WARNING: Too many active WebGL contexts. Oldest context will be lost."
I'm using Angular too. But I don't think it has anything to do with Angular.
here's some code:
$scope.$on('$destroy', function() {
removepano("krpanoSWFObject");
});
//region - - - - - - - - - - - - - - - - - - - - - - - - - - - - - embedPano
function embedPano(scene){
pano = document.documentElement.querySelector('#pano');
removepano("krpanoSWFObject");
embedpano({swf:"/uploads/vtour/tour.swf", xml:"/uploads/vtour/tour.xml", target:"pano", html5:"prefer", id:"krpanoSWFObject"});
setTimeout(function(){
krpano().call("loadscene('" + scene + "', null, MERGE, BLEND(0.5));");
}, 400);
}
//endregion
Alles anzeigen