diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index 0fe0d6f..0e89814 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -282,7 +282,9 @@ function init(canvas) { // 1 world unit = 1 tile at zoom 11 (~13 km). The shader maps // (hitPoint - uGroundCenter) / uGroundSize + 0.5 to UV, so the // mosaic centre always corresponds to UV (0.5, 0.5). -var GROUND_TILE_URL = 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/'; +// Tile source: Carto basemaps Voyager style (with place names). +// Free, CORS-enabled, OSM-derived. URL format {z}/{x}/{y}.png. +var GROUND_TILE_URL = 'https://a.basemaps.cartocdn.com/voyager/'; var GROUND_TILE_Z = 11; var GROUND_TILE_SIZE = 256; // Fetch direction: which way the tile corridor is oriented. @@ -316,7 +318,8 @@ function fetchTileImage(tileX, tileY) { img.crossOrigin = 'anonymous'; img.onload = function() { resolve(img); }; img.onerror = function() { reject(new Error('tile fetch failed')); }; - img.src = GROUND_TILE_URL + GROUND_TILE_Z + '/' + tileY + '/' + tileX; + // Carto/OSM-style format: {z}/{x}/{y}.png + img.src = GROUND_TILE_URL + GROUND_TILE_Z + '/' + tileX + '/' + tileY; }); }