From 9f3ca2c7ffe79fd6193f9b193c544d75e27ec28b Mon Sep 17 00:00:00 2001 From: Pomax Date: Sat, 10 Nov 2012 12:05:17 +0000 Subject: [PATCH] renamed physics.js to game.js --- examples/arkanoid.html | 2 +- examples/pong.html | 2 +- js/{physics.js => game.js} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename js/{physics.js => game.js} (99%) diff --git a/examples/arkanoid.html b/examples/arkanoid.html index b69b68c..744db8f 100755 --- a/examples/arkanoid.html +++ b/examples/arkanoid.html @@ -379,7 +379,7 @@ ==================== --› ‹script src="../js/Box2dWeb-2.1.a.3.js"›‹/script› -‹script src="../js/physics.js"›‹/script› +‹script src="../js/game.js"›‹/script› diff --git a/examples/pong.html b/examples/pong.html index 6e92083..3dcd39f 100755 --- a/examples/pong.html +++ b/examples/pong.html @@ -249,7 +249,7 @@ ==================== --› ‹script src="../js/Box2dWeb-2.1.a.3.js"›‹/script› -‹script src="../js/physics.js"›‹/script› +‹script src="../js/game.js"›‹/script› diff --git a/js/physics.js b/js/game.js similarity index 99% rename from js/physics.js rename to js/game.js index c9effbf..6e6b23c 100755 --- a/js/physics.js +++ b/js/game.js @@ -542,7 +542,7 @@ function fromBox2DValue(v) { return BOX2D_PIXELS_PER_METER*v; } fixDef.density = element.getAttribute("data-density") || 0; fixDef.friction = element.getAttribute("data-friction") || 0; - fixDef.restitution = element.getAttribute("data-elasticity") || element.getAttribute("data-bounciness") || 1; + fixDef.restitution = element.getAttribute("data-bounciness") || 1; bodyDef.position.x = toBox2DValue(bbox.left - pbbox.left + bbox.width/2); bodyDef.position.y = toBox2DValue(bbox.top - pbbox.top + bbox.height/2);