Skip to content

Commit

Permalink
Displays credit text while page loads (which helps get the font loade…
Browse files Browse the repository at this point in the history
…d before the map is rendered)
  • Loading branch information
Treer committed Mar 11, 2015
1 parent f5c4c68 commit 6780113
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var LocationType = {
Dragon: {iconIndex: 36, name: "", href: ""}, // No default href as dragon symbol could be used for many things, stronghold, "Here be dragons" etc
SeaMonster: {iconIndex: 46, name: "", href: ""},
Ship: {iconIndex: 38, name: "", href: ""}, // No default href as ship is probably used for map decoration
IcePlainsSpikes: {iconIndex: 47, name: "Ice plains spikes", href: "http://minecraft.gamepedia.com/Biome/Ice_Plains_Spikes"},
IcePlainsSpikes: {iconIndex: 47, name: "Ice plains spikes", href: "http://minecraft.gamepedia.com/Ice_Plains_Spikes"},

Spawn: {iconIndex: 40, name: "Spawn", href: ""},
PlayerStructure: {iconIndex: 8, name: "", href: ""},
Expand Down
2 changes: 1 addition & 1 deletion www/example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PlayerHouse , 84 , -903 , "Small \nLighthouse " , lex86
PlayerCastle , 86 , 610 , "Outpost Exile" , SoulessExile , "https://imgur.com/a/3wkKN" ,
PlayerHouse , 1017 , 324 , "Dr.Frankenstone's \nhovel" , Dr.Frankenstone
PlayerHouse ,-800 , -1800 , "Dr.Frankenstone's\nmountain lair" , Dr.Frankenstone , ,31
IcePlainsSpikes ,-1643 , 1810 , "Dr.Frankenstone's\nwinter resort" , Dr.Frankenstone
IcePlainsSpikes ,-1643 , 1810 , "Dr.Frankenstone's\nwinter resort" , Dr.Frankenstone , -
PlayerHouse ,-1048 , 687 , , Crovexius , "https://imgur.com/a/2coEH"
PlayerStructure , 1480 , -1186 , "Seaspray City" , WebSeer , "https://imgur.com/a/tfp5R" ,
PlayerStructure ,-1667 , 781 , "Ender Cathedral" , Crovexius ,
Expand Down
21 changes: 16 additions & 5 deletions www/iframeable.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,29 @@
</head>
<body style="font-family: sans-serif; padding: 0; margin: 0;">

<div style="position: absolute; left: 50%;">
<div id="loading" style="position:relative; top: 50px; left: -50%; text-align: center; z-index: 40">
<div id="loading" style="position: absolute; left: 50%;">
<div style="position:relative; top: 50px; left: -50%; text-align: center; z-index: 40">
<img src="img/clock_10ms.gif" width="64" height="64" style="image-rendering:-moz-crisp-edges; image-rendering: -o-crisp-edges; image-rendering:-webkit-optimize-contrast; -ms-interpolation-mode:nearest-neighbor;" /><br/>
<i><b>Mining locations...</b></i>
</div>
</div>
<div id="loading_credittext" style="position: absolute; bottom: 5px; left: 50%;">
<span class="credittext" style="position:relative; bottom: 0px; left: -50%; white-space: nowrap">
<!-- Take advantage of this tiny text to include the fonts in the document
so that $(document).ready() isn't triggered before they are loaded. -->
<a href="http://buildwithblocks.info" target="_parent" style="color: #404040;">Map system from buildwithblocks.info</a>
</span>
</div>


<div style="position: absolute; left: 50%;">
<div id="hoverFrame" class="hidden-hoverFrame" style="position:relative; top: -25px; left: -50%; text-align: center; z-index: 30; pointer-events:none;">
<div id="hoverFrame" class="hidden-hoverFrame" style="position:relative; top: -25px; left: -50%; text-align: center; z-index: 30; pointer-events: none;">
<div id="locationDesc"></div>
</div>
</div>

<main>
<div class="map-viewport large-viewport" style="margin-top: 20px" >
<div class="map-viewport large-viewport mouse-passthrough" style="margin-top: 20px" >
<div id="map-1">
<div id="zoomlevel1" class="current-level level" ></div>
<div id="zoomlevel2" class="level" ></div>
Expand All @@ -57,7 +66,7 @@
</div>
</main>

<div class="resources" style="position: absolute; visibility: hidden; left: 0;">
<div class="resources" style="position: absolute; visibility: hidden;">
<img id="map-background" src="img/map64.png"/>
<img id="map-tileset" src="img/glyphs.png"/>
</div>
Expand Down Expand Up @@ -152,7 +161,9 @@
});

// hide the loading screen
$('.map-viewport').removeClass('mouse-passthrough'); // passthrough was only to enable credittext to have a lower z-order and still be clickable.
$('#loading').hide();
$('#loading_credittext').hide();
}
}
);
Expand Down
2 changes: 1 addition & 1 deletion www/js/minecraftmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ var LocationType = {
Dragon: {iconIndex: 36, name: "", href: ""}, // No default href as dragon symbol could be used for many things, stronghold, "Here be dragons" etc
SeaMonster: {iconIndex: 46, name: "", href: ""},
Ship: {iconIndex: 38, name: "", href: ""}, // No default href as ship is probably used for map decoration
IcePlainsSpikes: {iconIndex: 47, name: "Ice plains spikes", href: "http://minecraft.gamepedia.com/Biome/Ice_Plains_Spikes"},
IcePlainsSpikes: {iconIndex: 47, name: "Ice plains spikes", href: "http://minecraft.gamepedia.com/Ice_Plains_Spikes"},

Spawn: {iconIndex: 40, name: "Spawn", href: ""},
PlayerStructure: {iconIndex: 8, name: "", href: ""},
Expand Down
2 changes: 1 addition & 1 deletion www/js/minecraftmap.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions www/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.large-viewport{ width:800px; height:800px; }
.level{ position:absolute; left:0; top:0; z-index:10; visibility: hidden}
.current-level{ z-index:20; visibility: visible }
.mouse-passthrough { pointer-events: none }

#map-1{ position:absolute; left:0; top:0; }
img{ border:0; }
Expand Down

0 comments on commit 6780113

Please sign in to comment.