Add console diagnostics for tile loading
This commit is contained in:
1 parent
262d308a5a
commit
7c7c882aa1
1 file changed
+3
-1
Vendored
+3
-1
@@ -397,7 +397,8 @@ function drawTileAt(lng, perp, dx, dz, centerTileX, centerTileY) {
|
|||||||
mirrorLabel('x=' + tileX, canvasX + GROUND_TILE_SIZE - 12, canvasY + GROUND_TILE_SIZE - 12, 'left');
|
mirrorLabel('x=' + tileX, canvasX + GROUND_TILE_SIZE - 12, canvasY + GROUND_TILE_SIZE - 12, 'left');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}).catch(function() {
|
}).catch(function(err) {
|
||||||
|
console.warn('[clouds3d] tile fetch failed', tileX, tileY, err && err.message);
|
||||||
// On failure draw a neutral gray so the gap is at least
|
// On failure draw a neutral gray so the gap is at least
|
||||||
// not the bright fog colour
|
// not the bright fog colour
|
||||||
groundCtx.fillStyle = '#3a4458';
|
groundCtx.fillStyle = '#3a4458';
|
||||||
@@ -449,6 +450,7 @@ function rebuildGroundMosaic(centerTileX, centerTileY) {
|
|||||||
// smooth parallax within the loaded content.
|
// smooth parallax within the loaded content.
|
||||||
function refreshGroundMosaic() {
|
function refreshGroundMosaic() {
|
||||||
if (!groundCtx) return;
|
if (!groundCtx) return;
|
||||||
|
console.log('[clouds3d] refreshGroundMosaic center', groundCenterTile);
|
||||||
var fdx = (window.__flightDir && window.__flightDir.dx) || 0;
|
var fdx = (window.__flightDir && window.__flightDir.dx) || 0;
|
||||||
var fdz = (window.__flightDir && window.__flightDir.dz) || 1;
|
var fdz = (window.__flightDir && window.__flightDir.dz) || 1;
|
||||||
var camX = (fdx !== 0) ? groundCameraX * fdx : 0;
|
var camX = (fdx !== 0) ? groundCameraX * fdx : 0;
|
||||||
|
|||||||
Reference in new issue
Block a user