去掉setting log

This commit is contained in:
ywb
2026-05-15 21:30:33 +08:00
parent 1dbcdd44c3
commit 03a6e87730
+4 -4
View File
@@ -125,26 +125,26 @@ const app = createApp({
}, },
getMapX(coords) { getMapX(coords) {
if (!coords || !this.mapMeta) { if (!coords || !this.mapMeta) {
console.log('[getMapX] mapMeta not loaded, returning default 50'); //console.log('[getMapX] mapMeta not loaded, returning default 50');
return 50 return 50
} }
const [x, y, yaw] = coords const [x, y, yaw] = coords
const { resolution, origin, width } = this.mapMeta const { resolution, origin, width } = this.mapMeta
const px = (x - origin[0]) / (resolution * width) * 100 const px = (x - origin[0]) / (resolution * width) * 100
const result = Math.max(0, Math.min(100, px)); const result = Math.max(0, Math.min(100, px));
console.log('[getMapX]', coords, '→ px%:', result); //console.log('[getMapX]', coords, '→ px%:', result);
return result return result
}, },
getMapY(coords) { getMapY(coords) {
if (!coords || !this.mapMeta) { if (!coords || !this.mapMeta) {
console.log('[getMapY] mapMeta not loaded, returning default 50'); //console.log('[getMapY] mapMeta not loaded, returning default 50');
return 50 return 50
} }
const [x, y, yaw] = coords const [x, y, yaw] = coords
const { resolution, origin, height } = this.mapMeta const { resolution, origin, height } = this.mapMeta
const py = (y - origin[1]) / (resolution * height) * 100 const py = (y - origin[1]) / (resolution * height) * 100
const result = Math.max(0, Math.min(100, 100 - py)); const result = Math.max(0, Math.min(100, 100 - py));
console.log('[getMapY]', coords, '→ py%:', result); //console.log('[getMapY]', coords, '→ py%:', result);
return result return result
}, },
async saveMap() { async saveMap() {