Browse Source

Fixed removing balls, and the text

master
Joshua Moerman 12 years ago
parent
commit
62a37a55f2
  1. 19
      index.html

19
index.html

@ -7,13 +7,15 @@
<title>WebSocket Test</title> <title>WebSocket Test</title>
<style type="text/css"> <style type="text/css">
body { body {
color: #fff;
background: #000;
font-size: 16pt; font-size: 16pt;
margin: 0px; margin: 0px;
overflow: hidden; overflow: hidden;
height: 100%; height: 100%;
} }
#ballscreen { #ballscreen {
position: absolute; position: relative;
background-color: rgba(0.0, 0.0, 0.0, 0.0); background-color: rgba(0.0, 0.0, 0.0, 0.0);
width: 320px; width: 320px;
height: 480px; height: 480px;
@ -33,7 +35,6 @@
background-color: #f00; background-color: #f00;
} }
#svgscreen { #svgscreen {
background-color: #adf;
position: absolute; position: absolute;
width: 320px; width: 320px;
height: 480px; height: 480px;
@ -81,8 +82,8 @@
var balls = ret.balls; var balls = ret.balls;
var lines = ret.lines; var lines = ret.lines;
for(ball in balls_online){ for(i in balls_online){
ball.should_remove = true; balls_online[i].should_remove = true;
} }
for (var i = balls.length - 1; i >= 0; i--) { for (var i = balls.length - 1; i >= 0; i--) {
var ball = document.getElementById(balls[i].information); var ball = document.getElementById(balls[i].information);
@ -170,11 +171,13 @@
</head> </head>
<body ontouchmove="prevent_scrolling(event);"> <body ontouchmove="prevent_scrolling(event);">
<p>My name is: <span id="myName"></span></p> <svg id="svgscreen" xmlns="http://www.w3.org/2000/svg" version="1.1">
<p>Status: <span id="status">CONNECTING...</span></p> <rect width="100%" height="100%" style="fill:rgb(255, 255, 255); opacity:0.1; stroke-width:1; stroke:rgb(0,0,0)"/>
</svg>
<svg id="svgscreen" xmlns="http://www.w3.org/2000/svg" version="1.1"></svg>
<div id="ballscreen"></div> <div id="ballscreen"></div>
My name is: <span id="myName"></span><br/>
Status: <span id="status">CONNECTING...</span>
</body> </body>
</html> </html>