mirror of
https://github.com/BlueMap-Minecraft/BlueMapWeb.git
synced 2024-11-28 04:45:13 +01:00
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>BlueMap Lib Test</title>
|
|
<link rel="shortcut icon" href="favicon.png">
|
|
</head>
|
|
<body style="margin: 0; padding: 0;">
|
|
<div id="map-container" style="position: absolute; width: 96%; height: 90%; margin: 2%;"></div>
|
|
|
|
<script type="text/javascript" src="js/three.js"></script>
|
|
<script type="text/javascript" src="js/hammer.js"></script>
|
|
<script type="text/javascript" src="js/bluemap.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
let bluemap = new BlueMap.MapViewer(document.getElementById("map-container"));
|
|
|
|
// show stats panel
|
|
bluemap.stats.showPanel(1);
|
|
|
|
// load map
|
|
let maps = [];
|
|
let markerManager = null;
|
|
BlueMap.loadMaps("data/", bluemap.events).then(loadedMaps => {
|
|
maps = loadedMaps;
|
|
bluemap.setMap(maps[0]);
|
|
|
|
markerManager = maps[0].createMarkerFileManager(bluemap.markerScene);
|
|
markerManager.update();
|
|
markerManager.setAutoUpdateInterval(1000 * 10);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |