forked from ThinkInvis/BRSerker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
115 lines (114 loc) · 6.13 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
<meta charset="UTF-8">
<html>
<head>
<!--after creating a new generator in /generators/, add a script tag at the bottom of this file. TODO: automatic solution-->
<link rel="stylesheet" type="text/css" href="./main.css">
<link rel="stylesheet" type="text/css" href="./inputs.css">
<link rel="stylesheet" type="text/css" href="./statusticket.css">
<script src="./lib/jquery-3.4.1.min.js"></script>
<script src="./lib/three.min.js"></script>
<script src="./lib/three-OBJLoader.js"></script>
<script src="./lib/three-MTLLoader.js"></script>
<script src="./lib/three-OrbitNoModule.js"></script>
<script src="./lib/stats.min.js"></script>
<script src="./lib/colour.js"></script>
<script src="./lib/brs.js"></script>
<script src="./lib/perlin.js"></script>
<script src="./lib/seedrandom.min.js"></script>
<script>
window.TextEncoder = window.TextDecoder = null;
</script>
<script src="./lib/encoding-indexes.js"></script>
<script src="./lib/encoding.js"></script>
<script src="./util.js"></script>
<script src="./statusticket.js"></script>
<script src="./brickdata.js"></script>
<script src="./StagedBrickGenerator.js"></script>
</head>
<body>
<div id="main-container">
<div id="panel-controls">
<div id="controls-buildinfo" class="controls-subpanel">
<div class="controls-subpanel-title">Build Info</div>
<span id="label-brickcount" class="opt-1-1">0 bricks in memory</span>
<span id="label-bounds" class="opt-1-1">Size: N/A</span>
<span id="label-cog" class="opt-1-1">CoG: N/A</span>
</div>
<div id="controls-buildtools" class="controls-subpanel">
<div class="controls-subpanel-title">Build Tools</div>
<button id="btn-clear" class="opt-1-1 gen-lock">Clear</button>
<input type="number" id="shiftx" step=1 valNoCache=0 class="opt-1-4 opt-input"></input>
<input type="number" id="shifty" step=1 valNoCache=0 class="opt-1-4 opt-input"></input>
<input type="number" id="shiftz" step=1 valNoCache=0 class="opt-1-4 opt-input"></input>
<button id="btn-shift" class="opt-1-4 gen-lock">Shift</button>
</div>
<div id="controls-generator" class="controls-subpanel">
<div class="controls-subpanel-title">Generation</div>
<select id="generator-type" class="opt-3-4 opt-input gen-lock">
<option value="None">None</option>
</select>
<span class="opt-1-4" style="position:relative;">
<button id="btn-generate" style="width:100%;position:absolute;display:inline;left:0">Generate</button>
<button id="btn-cancel" style="width:100%;position:absolute;right:0;display:none" disabled=true>Cancel</button></span>
<span class="cb-container opt-input opt-1-1">Generate at Shift location<input type="checkbox" id="opt-genautoshift" valNoCache=true></input></span>
<div id="generator-descr" style="width:100%"></div>
</div>
<div id="controls-gendynamic" class="controls-subpanel">
<div class="controls-subpanel-title">Generator Options</div>
</div>
<div id="controls-preview" class="controls-subpanel">
<div class="controls-subpanel-title">Preview Options</div>
<button id="btn-bake" class="opt-1-1 gen-lock">Rebake Model</button>
<span class="cb-container opt-input opt-1-2">Autobake<input type="checkbox" id="opt-autobake" valNoCache=true></input></span>
<span class="cb-container opt-input opt-1-2">Live Preview<input type="checkbox" id="opt-livepreview" valNoCache=true></input></span>
<span class="cb-container opt-input opt-1-2" style="display:none">Grid at Cursor<input type="checkbox" id="opt-previewgrid" valNoCache=false></input></span> <!--TODO: option nonfunctional (raycasting was broken by InstancedBufferGeometry, need to set up GPU raycasting)-->
<span class="opt-1-2">Light Pitch</span>
<span class="opt-1-2"><input type="range" id="opt-lightpitch" min=-1.5706 max=1.5706 step=0.001 class="opt-input" valNoCache=0.528></input></span>
<span class="opt-1-2">Light Azimuth</span>
<span class="opt-1-2"><input type="range" id="opt-lightyaw" min=0 max=6.2830 step=0.001 class="opt-input" valNoCache=0.785></input></span>
<span class="opt-1-2">Light Intensity (2^n)</span>
<input type="number" id="opt-lightintensity" min=-4 max=4 step=0.1 value=0 class="opt-1-2 opt-input" valNoCache=0.5></input>
</div>
<div class="controls-footer">
<span style="font-weight:600">BRSerker</span>: it erks BRS files<br>
(Brickadia/Blockland procedural build generator)<br>
<a href="https://github.com/ThinkInvis/BRSerker">Source on GitHub</a>
</div>
</div>
<div id="panel-preview">
<div id="status-container"></div>
</div>
</div>
<script src="./previewer.js"></script>
<script>
//definitively stop browsers from caching non-default input values on page refresh by manually setting them back to the defaults at the end of page load
//screw your cache >:(
var chEvt = new Event('change');
var allNoCache = $('input[valNoCache]');
allNoCache.filter('[type="checkbox"]').each(function(ind, elem) {
$(this).prop("checked", ($(this).attr("valNoCache") == "true") ? "checked" : "");
this.dispatchEvent(chEvt);
});
allNoCache.filter('[type="range"], [type="number"]').each(function(ind, elem) {
$(this).val($(this).attr("valNoCache"));
this.dispatchEvent(chEvt);
});
</script>
<script src="./generators-master.js"></script>
<script src="./generators/common/octree.js"></script>
<script src="./generators/internal/MeshBaker.js"></script>
<script src="./generators/internal/BrickShifter.js"></script>
<script src="./generators/cobblewall.js"></script>
<script src="./generators/brs-reader.js"></script>
<script src="./generators/brs-writer.js"></script>
<script src="./generators/bls-reader.js"></script>
<script src="./generators/bls-writer.js"></script>
<script src="./generators/obj-reader.js"></script>
<script src="./generators/dae-reader.js"></script>
<script src="./generators/simple-image-reader.js"></script>
<script src="./generators/terrain-octree.js"></script>
<script src="./generators/quantizer.js"></script>
<script src="./generators/flagstone.js"></script>
<script src="./generators/DOCS-EXAMPLE-stresstest.js"></script>
</body>
</html>