Anders and Briegel in Python
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
481B

  1. var ws;
  2. function connect_to_server() {
  3. ws = new WebSocket("ws://localhost:5001");
  4. ws.onopen = function()
  5. {
  6. console.log("Connected to server.");
  7. };
  8. ws.onmessage = function (evt)
  9. {
  10. var new_state = JSON.parse(evt.data);
  11. vops = new_state.vops;
  12. ngbh = new_state.ngbh;
  13. meta = new_state.meta;
  14. updateScene();
  15. };
  16. ws.onclose = function()
  17. {
  18. console.log("Connection was closed.");
  19. };
  20. }