added mining game
259
src/mining.html
Normal file
@@ -0,0 +1,259 @@
|
||||
<!--
|
||||
METADATA:{
|
||||
"title": "Prison Mine - Litruv",
|
||||
"metaDescription": "Infinite isometric prison mining game.",
|
||||
"csp": "script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://cdn.jsdelivr.net;",
|
||||
"ogTitle": "Prison Mine - Litruv",
|
||||
"ogDescription": "Dig deep in this infinite isometric mining game.",
|
||||
"ogUrl": "https://lit.ruv.wtf/mining.html",
|
||||
"twitterTitle": "Prison Mine - Litruv",
|
||||
"twitterDescription": "Dig deep in this infinite isometric mining game.",
|
||||
"twitterUrl": "https://lit.ruv.wtf/mining.html",
|
||||
"useCommonHeader": true,
|
||||
"useCommonFooter": true
|
||||
}
|
||||
-->
|
||||
<!-- START_STYLES -->
|
||||
<style>
|
||||
.mining-container {
|
||||
width: min(100%, 80vh);
|
||||
aspect-ratio: 1;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #000;
|
||||
border: 2px solid var(--post-border);
|
||||
box-shadow: 4px 6px 0 var(--shadow-light);
|
||||
}
|
||||
|
||||
#game-canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mining-ui {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
color: white;
|
||||
font-family: 'Minecraft', monospace; /* Fallback */
|
||||
pointer-events: none;
|
||||
text-shadow: 2px 2px 0 #000;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.mining-stat {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.inventory-container {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.inventory-slot {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: 2px solid #555;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.inventory-slot img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
.inventory-count {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 2px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
text-shadow: 1px 1px 0 #000;
|
||||
}
|
||||
|
||||
.crafting-container {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 10px;
|
||||
transform: translateY(-50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
pointer-events: auto; /* Allow clicking */
|
||||
}
|
||||
.crafting-slot {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: 2px solid #555;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.crafting-slot:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
.crafting-slot.can-craft {
|
||||
border-color: #79C05A;
|
||||
background: rgba(121, 192, 90, 0.2);
|
||||
}
|
||||
.crafting-slot img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
.crafting-tooltip {
|
||||
position: absolute;
|
||||
right: 100%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
display: none;
|
||||
margin-right: 10px;
|
||||
pointer-events: none;
|
||||
z-index: 20;
|
||||
}
|
||||
.crafting-slot:hover .crafting-tooltip {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.shop-btn {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
background: #4CAF50;
|
||||
color: white;
|
||||
border: 2px solid #388E3C;
|
||||
padding: 5px 10px;
|
||||
font-family: 'Minecraft', monospace;
|
||||
cursor: pointer;
|
||||
z-index: 20;
|
||||
}
|
||||
.shop-container {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
border: 2px solid #555;
|
||||
padding: 20px;
|
||||
color: white;
|
||||
font-family: 'Minecraft', monospace;
|
||||
display: none;
|
||||
z-index: 30;
|
||||
min-width: 300px;
|
||||
}
|
||||
.shop-section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.shop-section h3 {
|
||||
border-bottom: 1px solid #555;
|
||||
padding-bottom: 5px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.shop-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
.shop-item button {
|
||||
background: #333;
|
||||
color: white;
|
||||
border: 1px solid #555;
|
||||
padding: 2px 5px;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
}
|
||||
.shop-item button:hover {
|
||||
background: #555;
|
||||
}
|
||||
.close-shop {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
background: none;
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* Override for buttons inside shop */
|
||||
.shop-container .shop-btn {
|
||||
position: static;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 5px;
|
||||
background: #333;
|
||||
text-align: left;
|
||||
}
|
||||
.shop-container .shop-btn:hover {
|
||||
background: #555;
|
||||
}
|
||||
.shop-container .close-btn {
|
||||
text-align: center;
|
||||
background: #d32f2f;
|
||||
border-color: #b71c1c;
|
||||
}
|
||||
.shop-container .close-btn:hover {
|
||||
background: #f44336;
|
||||
}
|
||||
</style>
|
||||
<!-- END_STYLES -->
|
||||
|
||||
<!-- START_SCRIPTS_DEFER -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/shaders/CopyShader.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/shaders/SSAOShader.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/postprocessing/EffectComposer.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/postprocessing/RenderPass.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/postprocessing/ShaderPass.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/postprocessing/SSAOPass.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/shaders/GammaCorrectionShader.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.128.0/examples/js/math/SimplexNoise.js" defer></script>
|
||||
<script src="mining.js" defer></script>
|
||||
<!-- END_SCRIPTS_DEFER -->
|
||||
|
||||
<div class="mining-container">
|
||||
<div class="mining-ui">
|
||||
<div class="mining-stat">Depth: <span id="depth-counter">0</span></div>
|
||||
<div class="mining-stat">Score: <span id="score-counter">0</span></div>
|
||||
</div>
|
||||
<button id="shop-btn" class="shop-btn" onclick="toggleShop()">Shop</button>
|
||||
<div id="shop-modal" class="shop-container" style="display:none; flex-direction:column; max-height: 80vh; overflow-y: auto;">
|
||||
<div id="shop-content"></div>
|
||||
</div>
|
||||
<div id="inventory-display" class="inventory-container">
|
||||
<!-- Slots will be added here dynamically -->
|
||||
</div>
|
||||
<div id="crafting-display" class="crafting-container">
|
||||
<!-- Crafting slots will be added here dynamically -->
|
||||
</div>
|
||||
<canvas id="game-canvas"></canvas>
|
||||
</div>
|
||||
@@ -27,5 +27,6 @@
|
||||
<a href="https://lit.ruv.wtf/materials/" target="_blank">UE Material Snippets</a>
|
||||
<a href="https://lit.ruv.wtf/docs/" target="_blank">Documentation</a>
|
||||
<a href="https://lit.ruv.wtf/numbermatch/">Number Match</a>
|
||||
<a href="https://lit.ruv.wtf/mining/">Mining Game</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<meta name="description" content="<!-- ::META_DESCRIPTION:: -->">
|
||||
<meta name="author" content="Litruv">
|
||||
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; worker-src 'self' blob:; <!-- ::PAGE_CSP_OTHER_DIRECTIVES:: -->">
|
||||
<meta http-equiv="Content-Security-Policy" content="<!-- ::PAGE_CSP:: -->">
|
||||
|
||||
<meta property="og:title" content="<!-- ::OG_TITLE:: -->">
|
||||
<meta property="og:description" content="<!-- ::OG_DESCRIPTION:: -->">
|
||||
|
||||
BIN
website/blocks/anvil_base.png
Normal file
|
After Width: | Height: | Size: 379 B |
BIN
website/blocks/anvil_top_damaged_0.png
Normal file
|
After Width: | Height: | Size: 310 B |
BIN
website/blocks/anvil_top_damaged_1.png
Normal file
|
After Width: | Height: | Size: 367 B |
BIN
website/blocks/anvil_top_damaged_2.png
Normal file
|
After Width: | Height: | Size: 406 B |
BIN
website/blocks/beacon.png
Normal file
|
After Width: | Height: | Size: 208 B |
BIN
website/blocks/bed_feet_end.png
Normal file
|
After Width: | Height: | Size: 470 B |
BIN
website/blocks/bed_feet_side.png
Normal file
|
After Width: | Height: | Size: 438 B |
BIN
website/blocks/bed_feet_top.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
website/blocks/bed_head_end.png
Normal file
|
After Width: | Height: | Size: 476 B |
BIN
website/blocks/bed_head_side.png
Normal file
|
After Width: | Height: | Size: 462 B |
BIN
website/blocks/bed_head_top.png
Normal file
|
After Width: | Height: | Size: 958 B |
BIN
website/blocks/bedrock.png
Normal file
|
After Width: | Height: | Size: 225 B |
BIN
website/blocks/bookshelf.png
Normal file
|
After Width: | Height: | Size: 375 B |
BIN
website/blocks/brewing_stand.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
website/blocks/brewing_stand_base.png
Normal file
|
After Width: | Height: | Size: 513 B |
BIN
website/blocks/brick.png
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
website/blocks/cactus_bottom.png
Normal file
|
After Width: | Height: | Size: 273 B |
BIN
website/blocks/cactus_side.png
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
website/blocks/cactus_top.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
website/blocks/cake_bottom.png
Normal file
|
After Width: | Height: | Size: 144 B |
BIN
website/blocks/cake_inner.png
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
website/blocks/cake_side.png
Normal file
|
After Width: | Height: | Size: 154 B |
BIN
website/blocks/cake_top.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
website/blocks/carrots_stage_0.png
Normal file
|
After Width: | Height: | Size: 108 B |
BIN
website/blocks/carrots_stage_1.png
Normal file
|
After Width: | Height: | Size: 128 B |
BIN
website/blocks/carrots_stage_2.png
Normal file
|
After Width: | Height: | Size: 187 B |
BIN
website/blocks/carrots_stage_3.png
Normal file
|
After Width: | Height: | Size: 306 B |
BIN
website/blocks/cauldron_bottom.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
website/blocks/cauldron_inner.png
Normal file
|
After Width: | Height: | Size: 364 B |
BIN
website/blocks/cauldron_side.png
Normal file
|
After Width: | Height: | Size: 534 B |
BIN
website/blocks/cauldron_top.png
Normal file
|
After Width: | Height: | Size: 414 B |
BIN
website/blocks/clay.png
Normal file
|
After Width: | Height: | Size: 584 B |
BIN
website/blocks/coal_block.png
Normal file
|
After Width: | Height: | Size: 368 B |
BIN
website/blocks/coal_ore.png
Normal file
|
After Width: | Height: | Size: 257 B |
BIN
website/blocks/coarse_dirt.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
website/blocks/cobblestone.png
Normal file
|
After Width: | Height: | Size: 568 B |
BIN
website/blocks/cobblestone_mossy.png
Normal file
|
After Width: | Height: | Size: 632 B |
BIN
website/blocks/cocoa_stage_0.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
website/blocks/cocoa_stage_1.png
Normal file
|
After Width: | Height: | Size: 405 B |
BIN
website/blocks/cocoa_stage_2.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
website/blocks/command_block.png
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
website/blocks/comparator_off.png
Normal file
|
After Width: | Height: | Size: 675 B |
BIN
website/blocks/comparator_on.png
Normal file
|
After Width: | Height: | Size: 696 B |
BIN
website/blocks/crafting_table_front.png
Normal file
|
After Width: | Height: | Size: 407 B |
BIN
website/blocks/crafting_table_side.png
Normal file
|
After Width: | Height: | Size: 386 B |
BIN
website/blocks/crafting_table_top.png
Normal file
|
After Width: | Height: | Size: 550 B |
BIN
website/blocks/daylight_detector_inverted_top.png
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
website/blocks/daylight_detector_side.png
Normal file
|
After Width: | Height: | Size: 206 B |
BIN
website/blocks/daylight_detector_top.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
website/blocks/deadbush.png
Normal file
|
After Width: | Height: | Size: 168 B |
BIN
website/blocks/destroy_stage_0.png
Normal file
|
After Width: | Height: | Size: 102 B |
BIN
website/blocks/destroy_stage_1.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
website/blocks/destroy_stage_2.png
Normal file
|
After Width: | Height: | Size: 123 B |
BIN
website/blocks/destroy_stage_3.png
Normal file
|
After Width: | Height: | Size: 140 B |
BIN
website/blocks/destroy_stage_4.png
Normal file
|
After Width: | Height: | Size: 143 B |
BIN
website/blocks/destroy_stage_5.png
Normal file
|
After Width: | Height: | Size: 159 B |
BIN
website/blocks/destroy_stage_6.png
Normal file
|
After Width: | Height: | Size: 160 B |
BIN
website/blocks/destroy_stage_7.png
Normal file
|
After Width: | Height: | Size: 174 B |
BIN
website/blocks/destroy_stage_8.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
website/blocks/destroy_stage_9.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
website/blocks/diamond_block.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
website/blocks/diamond_ore.png
Normal file
|
After Width: | Height: | Size: 262 B |
BIN
website/blocks/dirt.png
Normal file
|
After Width: | Height: | Size: 266 B |
BIN
website/blocks/dirt_podzol_side.png
Normal file
|
After Width: | Height: | Size: 740 B |
BIN
website/blocks/dirt_podzol_top.png
Normal file
|
After Width: | Height: | Size: 823 B |
BIN
website/blocks/dispenser_front_horizontal.png
Normal file
|
After Width: | Height: | Size: 495 B |
BIN
website/blocks/dispenser_front_vertical.png
Normal file
|
After Width: | Height: | Size: 749 B |
BIN
website/blocks/door_acacia_lower.png
Normal file
|
After Width: | Height: | Size: 660 B |
BIN
website/blocks/door_acacia_upper.png
Normal file
|
After Width: | Height: | Size: 629 B |
BIN
website/blocks/door_birch_lower.png
Normal file
|
After Width: | Height: | Size: 666 B |
BIN
website/blocks/door_birch_upper.png
Normal file
|
After Width: | Height: | Size: 707 B |
BIN
website/blocks/door_dark_oak_lower.png
Normal file
|
After Width: | Height: | Size: 639 B |
BIN
website/blocks/door_dark_oak_upper.png
Normal file
|
After Width: | Height: | Size: 626 B |
BIN
website/blocks/door_iron_lower.png
Normal file
|
After Width: | Height: | Size: 551 B |
BIN
website/blocks/door_iron_upper.png
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
website/blocks/door_jungle_lower.png
Normal file
|
After Width: | Height: | Size: 472 B |
BIN
website/blocks/door_jungle_upper.png
Normal file
|
After Width: | Height: | Size: 465 B |
BIN
website/blocks/door_spruce_lower.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
website/blocks/door_spruce_upper.png
Normal file
|
After Width: | Height: | Size: 398 B |
BIN
website/blocks/door_wood_lower.png
Normal file
|
After Width: | Height: | Size: 399 B |
BIN
website/blocks/door_wood_upper.png
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
website/blocks/double_plant_fern_bottom.png
Normal file
|
After Width: | Height: | Size: 706 B |
BIN
website/blocks/double_plant_fern_top.png
Normal file
|
After Width: | Height: | Size: 670 B |
BIN
website/blocks/double_plant_grass_bottom.png
Normal file
|
After Width: | Height: | Size: 715 B |
BIN
website/blocks/double_plant_grass_top.png
Normal file
|
After Width: | Height: | Size: 717 B |
BIN
website/blocks/double_plant_paeonia_bottom.png
Normal file
|
After Width: | Height: | Size: 665 B |
BIN
website/blocks/double_plant_paeonia_top.png
Normal file
|
After Width: | Height: | Size: 727 B |
BIN
website/blocks/double_plant_rose_bottom.png
Normal file
|
After Width: | Height: | Size: 698 B |
BIN
website/blocks/double_plant_rose_top.png
Normal file
|
After Width: | Height: | Size: 637 B |
BIN
website/blocks/double_plant_sunflower_back.png
Normal file
|
After Width: | Height: | Size: 427 B |
BIN
website/blocks/double_plant_sunflower_bottom.png
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
website/blocks/double_plant_sunflower_front.png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
website/blocks/double_plant_sunflower_top.png
Normal file
|
After Width: | Height: | Size: 576 B |
BIN
website/blocks/double_plant_syringa_bottom.png
Normal file
|
After Width: | Height: | Size: 695 B |
BIN
website/blocks/double_plant_syringa_top.png
Normal file
|
After Width: | Height: | Size: 671 B |
BIN
website/blocks/dragon_egg.png
Normal file
|
After Width: | Height: | Size: 193 B |
BIN
website/blocks/dropper_front_horizontal.png
Normal file
|
After Width: | Height: | Size: 713 B |