Upgrade eslint to v10 & uppy to v6
Deploy Livetrail / deploy (push) Failing after 11s

This commit is contained in:
2026-08-27 21:20:16 +02:00
parent 4ae0e46a7d
commit 506c8bd946
4 changed files with 1144 additions and 125 deletions
+1132 -107
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1,10 +1,10 @@
{ {
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.19.0", "@eslint/js": "^10.0.1",
"@vitejs/plugin-vue": "^6.0.8", "@vitejs/plugin-vue": "^6.0.8",
"eslint": "^9.19.0", "eslint": "^10.9.1",
"eslint-plugin-vue": "^9.32.0", "eslint-plugin-vue": "^10.10.0",
"globals": "^15.14.0", "globals": "^17.11.0",
"vite": "^8.1.5" "vite": "^8.1.5"
}, },
"name": "livetrail", "name": "livetrail",
@@ -23,8 +23,8 @@
"@fortawesome/fontawesome-svg-core": "^7.2.0", "@fortawesome/fontawesome-svg-core": "^7.2.0",
"@fortawesome/free-solid-svg-icons": "^7.2.0", "@fortawesome/free-solid-svg-icons": "^7.2.0",
"@fortawesome/vue-fontawesome": "^3.2.0", "@fortawesome/vue-fontawesome": "^3.2.0",
"@uppy/core": "^5.2.0", "@uppy/core": "^6.0.0",
"@uppy/xhr-upload": "^5.2.0", "@uppy/xhr-upload": "^6.0.0",
"autosize": "^6.0.1", "autosize": "^6.0.1",
"maplibre-gl": "^6.0.0", "maplibre-gl": "^6.0.0",
"sass": "^1.97.2", "sass": "^1.97.2",
+5 -11
View File
@@ -155,6 +155,10 @@ export default {
addTerrain() { addTerrain() {
// MapLibre terrain's fog matrix is only implemented for Mercator. // MapLibre terrain's fog matrix is only implemented for Mercator.
this.map.setProjection({type: 'mercator'}); this.map.setProjection({type: 'mercator'});
//One shared raster-dem source feeds both the 3D elevation mesh
//(setTerrain) and the hillshade layer below - they used to be two
//separate sources pointed at the identical tile URL, which meant
//every DEM tile was downloaded and decoded twice per viewport.
if(!this.map.getSource('terrain-dem')) { if(!this.map.getSource('terrain-dem')) {
this.map.addSource('terrain-dem', { this.map.addSource('terrain-dem', {
type: 'raster-dem', type: 'raster-dem',
@@ -164,20 +168,11 @@ export default {
encoding: 'terrarium' encoding: 'terrarium'
}); });
} }
if(!this.map.getSource('hillshade-dem')) {
this.map.addSource('hillshade-dem', {
type: 'raster-dem',
tiles: ['https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png'],
tileSize: 256,
maxzoom: 13,
encoding: 'terrarium'
});
}
if(!this.map.getLayer('terrain-hillshade')) { if(!this.map.getLayer('terrain-hillshade')) {
this.map.addLayer({ this.map.addLayer({
id: 'terrain-hillshade', id: 'terrain-hillshade',
type: 'hillshade', type: 'hillshade',
source: 'hillshade-dem', source: 'terrain-dem',
paint: { paint: {
'hillshade-exaggeration': 0.35, 'hillshade-exaggeration': 0.35,
'hillshade-shadow-color': '#2d342b', 'hillshade-shadow-color': '#2d342b',
@@ -191,7 +186,6 @@ export default {
if(!this.map) return; if(!this.map) return;
if(this.map.getTerrain()) this.map.setTerrain(null); if(this.map.getTerrain()) this.map.setTerrain(null);
if(this.map.getLayer('terrain-hillshade')) this.map.removeLayer('terrain-hillshade'); if(this.map.getLayer('terrain-hillshade')) this.map.removeLayer('terrain-hillshade');
if(this.map.getSource('hillshade-dem')) this.map.removeSource('hillshade-dem');
if(this.map.getSource('terrain-dem')) this.map.removeSource('terrain-dem'); if(this.map.getSource('terrain-dem')) this.map.removeSource('terrain-dem');
this.map.setProjection({type: 'globe'}); this.map.setProjection({type: 'globe'});
}, },
+1 -1
View File
@@ -75,7 +75,7 @@ export default class Projects {
iElevDrop += Math.min(iElevDelta, 0); iElevDrop += Math.min(iElevDelta, 0);
iElevGain += Math.max(iElevDelta, 0); iElevGain += Math.max(iElevDelta, 0);
let iSpeedCorrecRatio = 0; let iSpeedCorrecRatio;
const iAngle = iElevDelta / iSegDistance; const iAngle = iElevDelta / iSegDistance;
if(iAngle < -1) iSpeedCorrecRatio = 0.5; if(iAngle < -1) iSpeedCorrecRatio = 0.5;
else if(iAngle < -0.2) iSpeedCorrecRatio = 1.25; else if(iAngle < -0.2) iSpeedCorrecRatio = 1.25;