mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-09-30 08:07:38 +02:00
" -> '
This commit is contained in:
parent
e5660ac754
commit
7931da2475
@ -41,7 +41,7 @@ export default class Tile {
|
|||||||
this.model = model;
|
this.model = model;
|
||||||
this.scene.add(model);
|
this.scene.add(model);
|
||||||
|
|
||||||
//console.log("Added tile:", this.x, this.z);
|
//console.log('Added tile:', this.x, this.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ export default class Tile {
|
|||||||
this.model.geometry.dispose();
|
this.model.geometry.dispose();
|
||||||
delete this.model;
|
delete this.model;
|
||||||
|
|
||||||
//console.log("Removed tile:", this.x, this.z);
|
//console.log('Removed tile:', this.x, this.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ export default class TileManager {
|
|||||||
update() {
|
update() {
|
||||||
if (this.closed) return;
|
if (this.closed) return;
|
||||||
|
|
||||||
//free a loader so if there was an error loading a tile we don"t get stuck forever with the blocked loading process
|
// free a loader so if there was an error loading a tile we don't get stuck forever with the blocked loading process
|
||||||
this.currentlyLoading--;
|
this.currentlyLoading--;
|
||||||
if (this.currentlyLoading < 0) this.currentlyLoading = 0;
|
if (this.currentlyLoading < 0) this.currentlyLoading = 0;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ export default class Position {
|
|||||||
|
|
||||||
onBlueMapUpdateFrame = () => {
|
onBlueMapUpdateFrame = () => {
|
||||||
this.elementX.html(Math.floor(this.blueMap.controls.targetPosition.x));
|
this.elementX.html(Math.floor(this.blueMap.controls.targetPosition.x));
|
||||||
//this.elementY.html(this.blueMap.controls.targetPosition.y === 0 ? "-" : Math.floor(this.blueMap.controls.targetPosition.y));
|
//this.elementY.html(this.blueMap.controls.targetPosition.y === 0 ? '-' : Math.floor(this.blueMap.controls.targetPosition.y));
|
||||||
this.elementZ.html(Math.floor(this.blueMap.controls.targetPosition.z));
|
this.elementZ.html(Math.floor(this.blueMap.controls.targetPosition.z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ export default class Settings {
|
|||||||
onQualityClick = (event) => {
|
onQualityClick = (event) => {
|
||||||
const target = event.target
|
const target = event.target
|
||||||
const desc = $(target).html();
|
const desc = $(target).html();
|
||||||
this.blueMap.quality = parseFloat($(target).attr("quality"));
|
this.blueMap.quality = parseFloat($(target).attr('quality'));
|
||||||
|
|
||||||
this.elementQuality.find('li').show();
|
this.elementQuality.find('li').show();
|
||||||
this.elementQuality.find(`li[quality="${this.blueMap.quality}"]`).hide();
|
this.elementQuality.find(`li[quality="${this.blueMap.quality}"]`).hide();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Copyright (c) contributors
|
* Copyright (c) contributors
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the 'Software'), to deal
|
||||||
* in the Software without restriction, including without limitation the rights
|
* in the Software without restriction, including without limitation the rights
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
@ -14,7 +14,7 @@
|
|||||||
* The above copyright notice and this permission notice shall be included in
|
* The above copyright notice and this permission notice shall be included in
|
||||||
* all copies or substantial portions of the Software.
|
* all copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
@ -26,16 +26,16 @@
|
|||||||
import { Vector2, Vector3 } from 'three';
|
import { Vector2, Vector3 } from 'three';
|
||||||
|
|
||||||
export const stringToImage = string => {
|
export const stringToImage = string => {
|
||||||
let image = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
|
let image = document.createElementNS('http://www.w3.org/1999/xhtml', 'img');
|
||||||
image.src = string;
|
image.src = string;
|
||||||
return image;
|
return image;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const pathFromCoords = (x, z) => {
|
export const pathFromCoords = (x, z) => {
|
||||||
let path = "x";
|
let path = 'x';
|
||||||
path += splitNumberToPath(x);
|
path += splitNumberToPath(x);
|
||||||
|
|
||||||
path += "z";
|
path += 'z';
|
||||||
path += splitNumberToPath(z);
|
path += splitNumberToPath(z);
|
||||||
|
|
||||||
path = path.substring(0, path.length - 1);
|
path = path.substring(0, path.length - 1);
|
||||||
@ -44,17 +44,17 @@ export const pathFromCoords = (x, z) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const splitNumberToPath = num => {
|
export const splitNumberToPath = num => {
|
||||||
let path = "";
|
let path = '';
|
||||||
|
|
||||||
if (num < 0) {
|
if (num < 0) {
|
||||||
num = -num;
|
num = -num;
|
||||||
path += "-";
|
path += '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
let s = num.toString();
|
let s = num.toString();
|
||||||
|
|
||||||
for (let i = 0; i < s.length; i++) {
|
for (let i = 0; i < s.length; i++) {
|
||||||
path += s.charAt(i) + "/";
|
path += s.charAt(i) + '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
|
Loading…
Reference in New Issue
Block a user