-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremote.js
More file actions
41 lines (33 loc) · 830 Bytes
/
remote.js
File metadata and controls
41 lines (33 loc) · 830 Bytes
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
var server = "http://localhost:6606";
var sio = io.connect(server);
var viewPlaced = false;
sio.on('accessResponse',function(data){
console.log("Access reponse",data);
if(!data.error) {
console.log(data);
callback();
if(viewPlaced == false) {
renderInBody();
viewPlaced = true;
}
receiveSceneData(data);
} else {
alert(data.error);
}
});
sio.on("update",function(data) {
console.log("The socket has spoken");
console.log(data);
if(viewPlaced == false) {
renderInBody();
viewPlaced = true;
}
receiveSceneData(data);
});
function connectToRoom(roomStr,callback) {
sio.emit("room",{room: roomStr});
}
function getModelPathFromServer(directory) {
//return "/models/" + directory + "/model.dae";
return 'https://odinvr.s3.us-east-2.amazonaws.com/public/models/' + directory + '/model.dae';
}