去掉setting log
This commit is contained in:
@@ -125,26 +125,26 @@ const app = createApp({
|
||||
},
|
||||
getMapX(coords) {
|
||||
if (!coords || !this.mapMeta) {
|
||||
console.log('[getMapX] mapMeta not loaded, returning default 50');
|
||||
//console.log('[getMapX] mapMeta not loaded, returning default 50');
|
||||
return 50
|
||||
}
|
||||
const [x, y, yaw] = coords
|
||||
const { resolution, origin, width } = this.mapMeta
|
||||
const px = (x - origin[0]) / (resolution * width) * 100
|
||||
const result = Math.max(0, Math.min(100, px));
|
||||
console.log('[getMapX]', coords, '→ px%:', result);
|
||||
//console.log('[getMapX]', coords, '→ px%:', result);
|
||||
return result
|
||||
},
|
||||
getMapY(coords) {
|
||||
if (!coords || !this.mapMeta) {
|
||||
console.log('[getMapY] mapMeta not loaded, returning default 50');
|
||||
//console.log('[getMapY] mapMeta not loaded, returning default 50');
|
||||
return 50
|
||||
}
|
||||
const [x, y, yaw] = coords
|
||||
const { resolution, origin, height } = this.mapMeta
|
||||
const py = (y - origin[1]) / (resolution * height) * 100
|
||||
const result = Math.max(0, Math.min(100, 100 - py));
|
||||
console.log('[getMapY]', coords, '→ py%:', result);
|
||||
//console.log('[getMapY]', coords, '→ py%:', result);
|
||||
return result
|
||||
},
|
||||
async saveMap() {
|
||||
|
||||
Reference in New Issue
Block a user