-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
116 lines (113 loc) · 4.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2E561F2422"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-2E561F2422');
</script>
<!--
************************************************
The script above is for google analytics.
You'll want to remove that if you use this page.
************************************************
-->
<title>Minecraft Glazed Terracotta Pattern Generator</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;500&display=swap">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="names.js"></script>
</head>
<body>
<div id="imageCache" style="display: none">
</div>
<h1>Minecraft <a href="https://minecraft.wiki/w/Glazed_Terracotta">Glazed Terracotta</a> Pattern Generato<span onclick="javascript:toggleImprovedTextures()">r</span></h1>
<div id="page">
<hr>
<div id="containerButtons">
<div id="buttons">
<h2>Template</h2>
<p class="helper">Choose options to generate a template:</p>
Colour:
<br>
<select id="userColour"></select>
<br>
Regular Templates:
<br>
<input type="button" value="1x1" onclick="generateRegularSequence(1, 1)">
<input type="button" value="1x2" onclick="generateRegularSequence(1, 2)">
<input type="button" value="2x1" onclick="generateRegularSequence(2, 1)">
<input type="button" value="2x2" onclick="generateRegularSequence(2, 2)">
<input type="button" value="2x4" onclick="generateRegularSequenceAlternating(2, 4)">
<input type="button" value="4x2" onclick="generateRegularSequenceAlternating(4, 2)">
<input type="button" value="4x4" onclick="generateRegularSequenceAlternating(4, 4)">
<br>
Chaotic Templates:
<br>
<input type="button" value="Chosen Colour" onclick="generateChaoticSequenceSameColour()">
<input type="button" value="Two Colours" onclick="generateChaoticSequenceTwoColours()">
<input type="button" value="Any Colours" onclick="generateChaoticSequenceAnyColours()">
<!--<input type="button" value="Mess" onclick="generateMess()">-->
<p class="helper">Generated template:</p>
<div id="boxTemplate">
<div id="template">
<canvas id="outputTemplateCanvas"></canvas>
<img id="outputTemplateImage" src="output.png" alt="Template">
</div>
</div>
</div>
</div>
<hr>
<div id="containerBoxPattern">
<div id="boxPattern">
<h2>Pattern</h2>
<p class="helper">When the template is repeated,<br>it would make this pattern:</p>
<div id="output">
<canvas id="outputPatternCanvas"></canvas>
<img id="outputPatternImage" src="output.png" alt="Pattern">
</div>
</div>
</div>
<hr>
<div id="containerBoxBuildingGuide">
<div id="boxBuildingGuide">
<h2>Building Guide</h2>
<p id="buildHelpShow">
<input type="button" value="Help" onclick="showBuildHelp()">
</p>
<p id="buildHelp" style="display: none">
The grid below matches the "Generated template" grid on the left. To make the template on the ground:
<br><br>
1. Decide where you want to draw the template.
<br>
2. When you are facing the direction you want to view the template, that is the equivalent of the up arrow below.
<br>
3. Place each block, whilst looking in the direction of the arrow below.
</p>
<table id="buildingGuide">
</table>
</div>
</div>
<hr>
</div>
<div id="containerFooter">
<div id="footer">
<p>
You can use the current URL to share/bookmark this pattern.
</p>
<p>
<a href="https://github.com/Robson/Minecraft-Glazed-Terracotta-Pattern-Generator">Code</a> by <a href="https://robson.plus">Robson</a>.
</p>
</div>
</div>
<script src="page.js"></script>
</body>
</html>