Ver código fonte

Revert "Add test for external tile loading."

This reverts commit 076307ea55.
pull/881/head
Nico Höllerich 4 anos atrás
pai
commit
cca87dfa1d
2 arquivos alterados com 1 adições e 56 exclusões
  1. +0
    -11
      tests/run_tests.py
  2. +1
    -45
      tests/tests.html

+ 0
- 11
tests/run_tests.py Ver arquivo

@@ -183,17 +183,6 @@ class PannellumTester(object):
assert self.browser.execute_script("var hs = viewer.getConfig().hotSpots[0]; return Math.abs(hs.yaw) < 0.001 && Math.abs(hs.pitch) < 0.001")
print("PASS: hot spot dragging")

# Check multires with external tile loading
self.browser.execute_script("viewer.loadScene('multires-loader')")
time.sleep(5)
if create_ref:
self.take_screenshot("panorama", "tests/multires.png")
subprocess.call(["optipng", "-o7", "-strip", "all", "tests/multires.png"])
else:
reference = Image.open("tests/multires.png")
comparator = self.take_screenshot("panorama")
self.equal_images(reference, comparator, "multires with external tile loading")

self.httpd.server_close()

def get_browser(self, name=None):


+ 1
- 45
tests/tests.html Ver arquivo

@@ -90,51 +90,7 @@ viewer = pannellum.viewer('panorama', {
"dragHandlerFunc": console.log
}
]
},
"multires-loader": {
"title": "multires title",
"type": "multires",
"hfov": 85,
"multiRes": {
"basePath": "../examples/multires",
"path": "/%l/%s%x%y",
"fallbackPath": "/fallback/%s",
"extension": "png",
"tileResolution": 256,
"maxLevel": 4,
"cubeResolution": 2048,
"loader": function(node){
var resolver;
var rejector;
var promise = {};
promise.then = function(callback){
resolver = callback;
return promise;
}
promise.catch = function(callback){
rejector = callback;
return promise;
}
var img = document.createElement('img');
img.onload = function () {
if(resolver)
resolver(img);
}
img.onerror = function(err) {
if(rejector)
rejector(err);
}
img.src = node.uri;
return promise;
}
}
}
}
}
});
</script>


Carregando…
Cancelar
Salvar