Skip to content

Commit 9a3386b

Browse files
add link to structure demo
1 parent ebde28b commit 9a3386b

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

index.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,22 @@ <h3 class="center indigo-text darken-1">Recipes</h3>
512512
</div>
513513
<br/>
514514
<br/>
515+
<div class="section" id="structures">
516+
<div class="row">
517+
<div class="col s2"></div>
518+
<div class="col s8">
519+
<h3 class="center indigo-text darken-1">Structures/Schematics</h3>
520+
521+
<div class="row center">
522+
<a href="/test/structure.html" target="_blank" class="btn waves-effect waves-light indigo lighten-1">Demo</a>
523+
</div>
524+
</div>
525+
<div class="col s2">
526+
</div>
527+
</div>
528+
</div>
529+
<br/>
530+
<br/>
515531
<div class="divider"></div>
516532
<div class="section" id="resourcepacks">
517533
<div class="row">
@@ -921,4 +937,4 @@ <h5>JavaScript</h5>
921937
</script>
922938
<script src="https://cdn.jsdelivr.net/gh/InventivetalentDev/DonationPopup@master/DonationPopup.min.js"></script>
923939
</body>
924-
</html>
940+
</html>

test/structure.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
3131
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/96/three.min.js" ></script>
32-
<script src="../dist/model.js"></script>
32+
<script src="https://cdn.jsdelivr.net/gh/InventivetalentDev/MineRender@1.2.0/dist/model.min.js"></script>
3333
<script>
3434
(function () {
3535

@@ -75,10 +75,16 @@
7575
// }
7676
// });
7777

78+
let urlBase = "https://assets.mcasset.cloud/1.15.2/data/minecraft/structures/";
79+
let url = urlBase+ "pillager_outpost/watchtower.nbt";
80+
81+
if (location.hash.length > 4) {
82+
url = urlBase + location.hash.substring(1)+".nbt";
83+
}
7884

7985
let modelConverter = new ModelConverter();
8086
modelConverter.structureToModels({
81-
url:"https://assets.mcasset.cloud/1.15.2/data/minecraft/structures/pillager_outpost/watchtower.nbt"
87+
url:url
8288
},function (models) {
8389
console.log(models)
8490
modelRender.render(models,function () {

0 commit comments

Comments
 (0)