|
@@ -292,7 +292,7 @@ function Renderer(container, context) { |
|
|
faceImg.onload = onLoad; |
|
|
faceImg.onload = onLoad; |
|
|
faceImg.onerror = incLoaded; // ignore missing face to support partial fallback image |
|
|
faceImg.onerror = incLoaded; // ignore missing face to support partial fallback image |
|
|
if (imageType == 'multires') { |
|
|
if (imageType == 'multires') { |
|
|
faceImg.src = path.replace('%s', fallbackSides[s]) + '.' + image.extension; |
|
|
|
|
|
|
|
|
faceImg.src = path.replace('%s', fallbackSides[s]) + (image.extension ? '.' + image.extension : ''); |
|
|
} else { |
|
|
} else { |
|
|
faceImg.src = image[s].src; |
|
|
faceImg.src = image[s].src; |
|
|
} |
|
|
} |
|
@@ -1453,7 +1453,7 @@ function Renderer(container, context) { |
|
|
* @param {MultiresNode} node - Input node. |
|
|
* @param {MultiresNode} node - Input node. |
|
|
*/ |
|
|
*/ |
|
|
function processNextTileFallback(node) { |
|
|
function processNextTileFallback(node) { |
|
|
loadTexture(node, node.path + '.' + image.extension, function(texture, loaded) { |
|
|
|
|
|
|
|
|
loadTexture(node, node.path + (image.extension ? '.' + image.extension : ''), function(texture, loaded) { |
|
|
node.texture = texture; |
|
|
node.texture = texture; |
|
|
node.textureLoaded = loaded ? 2 : 1; |
|
|
node.textureLoaded = loaded ? 2 : 1; |
|
|
}, globalParams.crossOrigin); |
|
|
}, globalParams.crossOrigin); |
|
@@ -1505,7 +1505,7 @@ function Renderer(container, context) { |
|
|
}; |
|
|
}; |
|
|
processNextTile = function(node) { |
|
|
processNextTile = function(node) { |
|
|
// Since web worker is created from a Blob, we need the absolute URL |
|
|
// Since web worker is created from a Blob, we need the absolute URL |
|
|
var path = new URL(node.path + '.' + image.extension, window.location).href; |
|
|
|
|
|
|
|
|
var path = new URL(node.path + (image.extension ? '.' + image.extension : ''), window.location).href; |
|
|
texturesLoading[path] = node; |
|
|
texturesLoading[path] = node; |
|
|
worker.postMessage([path, globalParams.crossOrigin]); |
|
|
worker.postMessage([path, globalParams.crossOrigin]); |
|
|
}; |
|
|
}; |
|
|