forked from runvnc/MC-Chunk-Loader
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.js
35 lines (28 loc) · 886 Bytes
/
main.js
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
var viewer;
var options = { renderType: 'points' };
function main() {
viewer = new Viewer(window.location);
$(document).keydown(function(event) {
if (event.keyCode == '87') {
posMatrix = posMatrix.x(Matrix.Translation($V([0.0, 0.0, 0.1])).ensure4x4());
}
});
$('#load').click(function() {
minx = new Number($('#xmin').val());
minz = new Number($('#zmin').val());
maxx = new Number($('#xmax').val());
maxz = new Number($('#zmax').val());
ymin = new Number($('#ymin').val());
theworld.pos.x = new Number(minx);
theworld.pos.z = new Number(minz);
viewer.world.loadArea();
});
viewer.init();
}
window.onload = function() {
document.getElementById('glcanvas').onselectstart = function() {
return false;
}; // ie
document.getElementById('glcanvas').onmousedown = function() {return false;}; // mozilla
};
main();