Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
renamed physics.js to game.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Pomax committed Nov 10, 2012
1 parent ab0b72c commit 9f3ca2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/arkanoid.html
Expand Up @@ -379,7 +379,7 @@
==================== -- ==================== --


‹script src="../js/Box2dWeb-2.1.a.3.js"›‹/script› ‹script src="../js/Box2dWeb-2.1.a.3.js"›‹/script›
‹script src="../js/physics.js"›‹/script› ‹script src="../js/game.js"›‹/script›
</script> </script>




Expand Down
2 changes: 1 addition & 1 deletion examples/pong.html
Expand Up @@ -249,7 +249,7 @@
==================== -- ==================== --


‹script src="../js/Box2dWeb-2.1.a.3.js"›‹/script› ‹script src="../js/Box2dWeb-2.1.a.3.js"›‹/script›
‹script src="../js/physics.js"›‹/script› ‹script src="../js/game.js"›‹/script›
</script> </script>




Expand Down
2 changes: 1 addition & 1 deletion js/physics.js → js/game.js
Expand Up @@ -542,7 +542,7 @@ function fromBox2DValue(v) { return BOX2D_PIXELS_PER_METER*v; }


fixDef.density = element.getAttribute("data-density") || 0; fixDef.density = element.getAttribute("data-density") || 0;
fixDef.friction = element.getAttribute("data-friction") || 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.x = toBox2DValue(bbox.left - pbbox.left + bbox.width/2);
bodyDef.position.y = toBox2DValue(bbox.top - pbbox.top + bbox.height/2); bodyDef.position.y = toBox2DValue(bbox.top - pbbox.top + bbox.height/2);
Expand Down

0 comments on commit 9f3ca2c

Please sign in to comment.