some more hardcore network testing

This commit is contained in:
logsol 2012-06-17 00:42:28 +02:00
parent 5a3d3d0764
commit 26aa471b14
7 changed files with 123 additions and 31 deletions

View file

@ -2,7 +2,7 @@ var bodiesNum = 3;
var world;
var xport = 8003;
var xhost = '127.0.0.1';
var xhost = 'fuuuuu.de';
var b2Vec2 = Box2D.Common.Math.b2Vec2,
b2AABB = Box2D.Collision.b2AABB,
@ -22,8 +22,8 @@ function setupWorld() {
var fixDef = new b2FixtureDef;
fixDef.density = 1.0;
fixDef.friction = 0.5;
fixDef.restitution = 0.2;
fixDef.friction = 0.99;
fixDef.restitution = 0.01;
var bodyDef = new b2BodyDef;
@ -56,7 +56,9 @@ function setupWorld() {
bodyDef.position.x = (i + 1) * 4;
bodyDef.position.y = 3;
bodyDef.userData = {"bodyId" : parseInt(i) };
bodyDef.userData = {
'bodyId': i + ''
};
world.CreateBody(bodyDef).CreateFixture(fixDef);
}