got self-hosted website working.
This commit is contained in:
parent
6bad869501
commit
bb5f76cd97
@ -1,5 +1,5 @@
|
||||
$(document).ready(function(){
|
||||
$('#starter,#watch').prop('disabled', 'disabled');
|
||||
$('#starter').prop('disabled', 'disabled');
|
||||
$("#error").hide();
|
||||
editor = ace.edit("editor");
|
||||
editor.setTheme("ace/theme/monokai");
|
||||
@ -26,21 +26,13 @@ $(document).ready(function(){
|
||||
|
||||
$('#starter').click(function() {
|
||||
$('#tabs a[href="#arena"]').tab('show');
|
||||
var url = "ws://{{ server.hostname }}:8666/ws/";
|
||||
gorobots.set_spectator(false);
|
||||
gorobots.set_server(
|
||||
url,
|
||||
"{{ game }}"
|
||||
);
|
||||
gorobots.set_server(wsurl(), getGameID());
|
||||
});
|
||||
$('#watch').click(function() {
|
||||
$('#tabs a[href="#arena"]').tab('show');
|
||||
var url = "ws://{{ server.hostname }}:8666/ws/";
|
||||
gorobots.set_spectator(true);
|
||||
gorobots.set_server(
|
||||
url,
|
||||
"{{ game }}"
|
||||
);
|
||||
gorobots.set_server(wsurl(), getGameID());
|
||||
});
|
||||
|
||||
$('#tabs a[href="#code"]').tab('show');
|
||||
@ -60,7 +52,7 @@ function loadCode() {
|
||||
editor.setValue(e);
|
||||
$("#editor").show();
|
||||
$("#fetch-area").hide();
|
||||
$('#starter,#watch').prop('disabled', function(i, v) { return !v; });
|
||||
$('#starter').prop('disabled', '');
|
||||
}).fail(function(e){
|
||||
var msg = "got a useless error message; is the remote server down?";
|
||||
if (e.statusText != "error") {
|
||||
@ -69,3 +61,11 @@ function loadCode() {
|
||||
$("#error").text(msg).show();
|
||||
});
|
||||
}
|
||||
|
||||
function wsurl() {
|
||||
return "ws://" + window.location.host + "/ws/";
|
||||
}
|
||||
|
||||
function getGameID() {
|
||||
return window.location.search.split("=")[1];
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ var gorobots_render_webgl = function(){
|
||||
my.robot_geom = new THREE.CubeGeometry(5,5,5);
|
||||
|
||||
var loader = new THREE.OBJLoader();
|
||||
loader.load( '/s/robot.obj', function ( object ) {
|
||||
loader.load( '/ui/obj/robot.obj', function ( object ) {
|
||||
object.position.x = 100;
|
||||
object.position.y = 100;
|
||||
object.position.z = 1;
|
||||
|
5537
ui/obj/robot.obj
Normal file
5537
ui/obj/robot.obj
Normal file
File diff suppressed because it is too large
Load Diff
191
ui/obj/rocket.obj
Normal file
191
ui/obj/rocket.obj
Normal file
@ -0,0 +1,191 @@
|
||||
# Blender v2.69 (sub 0) OBJ File: 'rocket.blend'
|
||||
# www.blender.org
|
||||
mtllib rocket.mtl
|
||||
o Cylinder_Cylinder.002
|
||||
v 0.094494 0.228129 -2.096091
|
||||
v 0.094494 0.228130 2.096091
|
||||
v 0.174603 0.174603 -2.096091
|
||||
v 0.174603 0.174603 2.096091
|
||||
v 0.228129 0.094494 -2.096091
|
||||
v 0.228129 0.094494 2.096091
|
||||
v 0.094494 0.228129 -1.832518
|
||||
v 0.094494 0.228129 -1.108436
|
||||
v 0.174603 0.174603 -1.108436
|
||||
v 0.174603 0.174603 -1.832518
|
||||
v 0.249110 0.047154 -1.108436
|
||||
v 0.249110 0.047154 -1.832518
|
||||
v 0.353101 0.666917 -1.832518
|
||||
v 0.353101 0.666917 -1.730601
|
||||
v 0.481025 0.581441 -1.730601
|
||||
v 0.481025 0.581441 -1.832518
|
||||
v 0.930706 0.050610 -1.744594
|
||||
v 0.930706 0.050610 -1.832518
|
||||
v 0.000000 0.246925 -2.096091
|
||||
v 0.000000 0.246926 2.096091
|
||||
v -0.094494 0.228129 -2.096091
|
||||
v -0.094494 0.228130 2.096091
|
||||
v -0.174603 0.174603 -2.096091
|
||||
v -0.174603 0.174603 2.096091
|
||||
v -0.228129 0.094494 -2.096091
|
||||
v -0.228129 0.094494 2.096091
|
||||
v -0.094494 0.228129 -1.832518
|
||||
v -0.094494 0.228129 -1.108436
|
||||
v 0.000000 0.246925 -1.108436
|
||||
v 0.000000 0.246925 -1.832518
|
||||
v -0.174603 0.174603 -1.108436
|
||||
v -0.174603 0.174603 -1.832518
|
||||
v -0.249110 0.047154 -1.108436
|
||||
v -0.249110 0.047154 -1.832518
|
||||
v -0.353101 0.666917 -1.832518
|
||||
v -0.353101 0.666917 -1.730601
|
||||
v -0.481025 0.581441 -1.730601
|
||||
v -0.481025 0.581441 -1.832518
|
||||
v -0.930706 0.050610 -1.744594
|
||||
v -0.930706 0.050610 -1.832518
|
||||
v 0.094494 -0.228130 -2.096091
|
||||
v 0.094494 -0.228129 2.096091
|
||||
v 0.174603 -0.174603 -2.096091
|
||||
v 0.174603 -0.174603 2.096091
|
||||
v 0.228129 -0.094494 -2.096091
|
||||
v 0.228129 -0.094494 2.096091
|
||||
v 0.246925 -0.000000 -2.096091
|
||||
v 0.246925 0.000000 2.096091
|
||||
v 0.094494 -0.228130 -1.832518
|
||||
v 0.094494 -0.228129 -1.108436
|
||||
v 0.174603 -0.174603 -1.108436
|
||||
v 0.174603 -0.174603 -1.832518
|
||||
v 0.249110 -0.047154 -1.108436
|
||||
v 0.249110 -0.047154 -1.832518
|
||||
v 0.246925 -0.000000 -1.108436
|
||||
v 0.246925 -0.000000 -1.832518
|
||||
v 0.353101 -0.666917 -1.832518
|
||||
v 0.353101 -0.666917 -1.730601
|
||||
v 0.481025 -0.581441 -1.730601
|
||||
v 0.481025 -0.581441 -1.832518
|
||||
v 0.930706 -0.050610 -1.744594
|
||||
v 0.930706 -0.050610 -1.832518
|
||||
v 0.927217 -0.000000 -1.744594
|
||||
v 0.927217 -0.000000 -1.832518
|
||||
v 0.000000 -0.246926 -2.096091
|
||||
v 0.000000 -0.246925 2.096091
|
||||
v -0.094494 -0.228130 -2.096091
|
||||
v -0.094494 -0.228129 2.096091
|
||||
v -0.174603 -0.174603 -2.096091
|
||||
v -0.174603 -0.174603 2.096091
|
||||
v -0.228129 -0.094494 -2.096091
|
||||
v -0.228129 -0.094494 2.096091
|
||||
v -0.246925 -0.000000 -2.096091
|
||||
v -0.246925 0.000000 2.096091
|
||||
v 0.000000 0.000000 4.552414
|
||||
v -0.094494 -0.228130 -1.832518
|
||||
v -0.094494 -0.228129 -1.108436
|
||||
v 0.000000 -0.246926 -1.108436
|
||||
v 0.000000 -0.246926 -1.832518
|
||||
v -0.174603 -0.174603 -1.108436
|
||||
v -0.174603 -0.174603 -1.832518
|
||||
v -0.249110 -0.047154 -1.108436
|
||||
v -0.249110 -0.047154 -1.832518
|
||||
v -0.246925 -0.000000 -1.108436
|
||||
v -0.246925 -0.000000 -1.832518
|
||||
v -0.353101 -0.666917 -1.832518
|
||||
v -0.353101 -0.666917 -1.730601
|
||||
v -0.481025 -0.581441 -1.730601
|
||||
v -0.481025 -0.581441 -1.832518
|
||||
v -0.930706 -0.050610 -1.744594
|
||||
v -0.930706 -0.050610 -1.832518
|
||||
v -0.927217 -0.000000 -1.744594
|
||||
v -0.927217 -0.000000 -1.832518
|
||||
usemtl None
|
||||
s off
|
||||
f 29 20 2 8
|
||||
f 8 2 4 9
|
||||
f 9 4 6 11
|
||||
f 11 6 48 55
|
||||
f 8 9 15 14
|
||||
f 1 7 10 3
|
||||
f 30 29 8 7
|
||||
f 19 30 7 1
|
||||
f 48 6 75
|
||||
f 6 4 75
|
||||
f 4 2 75
|
||||
f 2 20 75
|
||||
f 3 10 12 5
|
||||
f 10 9 11 12
|
||||
f 5 12 56 47
|
||||
f 11 55 63 17
|
||||
f 13 14 15 16
|
||||
f 10 7 13 16
|
||||
f 7 8 14 13
|
||||
f 9 10 16 15
|
||||
f 18 17 63 64
|
||||
f 56 12 18 64
|
||||
f 12 11 17 18
|
||||
f 29 28 22 20
|
||||
f 28 31 24 22
|
||||
f 31 33 26 24
|
||||
f 33 84 74 26
|
||||
f 28 36 37 31
|
||||
f 21 23 32 27
|
||||
f 30 27 28 29
|
||||
f 19 21 27 30
|
||||
f 74 75 26
|
||||
f 26 75 24
|
||||
f 24 75 22
|
||||
f 22 75 20
|
||||
f 23 25 34 32
|
||||
f 32 34 33 31
|
||||
f 25 73 85 34
|
||||
f 33 39 92 84
|
||||
f 35 38 37 36
|
||||
f 32 38 35 27
|
||||
f 27 35 36 28
|
||||
f 31 37 38 32
|
||||
f 40 93 92 39
|
||||
f 85 93 40 34
|
||||
f 34 40 39 33
|
||||
f 78 50 42 66
|
||||
f 50 51 44 42
|
||||
f 51 53 46 44
|
||||
f 53 55 48 46
|
||||
f 50 58 59 51
|
||||
f 41 43 52 49
|
||||
f 79 49 50 78
|
||||
f 65 41 49 79
|
||||
f 48 75 46
|
||||
f 46 75 44
|
||||
f 44 75 42
|
||||
f 42 75 66
|
||||
f 43 45 54 52
|
||||
f 52 54 53 51
|
||||
f 45 47 56 54
|
||||
f 53 61 63 55
|
||||
f 57 60 59 58
|
||||
f 52 60 57 49
|
||||
f 49 57 58 50
|
||||
f 51 59 60 52
|
||||
f 62 64 63 61
|
||||
f 56 64 62 54
|
||||
f 54 62 61 53
|
||||
f 78 66 68 77
|
||||
f 77 68 70 80
|
||||
f 80 70 72 82
|
||||
f 82 72 74 84
|
||||
f 77 80 88 87
|
||||
f 67 76 81 69
|
||||
f 79 78 77 76
|
||||
f 65 79 76 67
|
||||
f 74 72 75
|
||||
f 72 70 75
|
||||
f 70 68 75
|
||||
f 68 66 75
|
||||
f 69 81 83 71
|
||||
f 81 80 82 83
|
||||
f 71 83 85 73
|
||||
f 82 84 92 90
|
||||
f 86 87 88 89
|
||||
f 81 76 86 89
|
||||
f 76 77 87 86
|
||||
f 80 81 89 88
|
||||
f 91 90 92 93
|
||||
f 85 83 91 93
|
||||
f 83 82 90 91
|
Loading…
Reference in New Issue
Block a user