Permalink
Browse files

Now that box2d-web is performing roughly the same as box2d-js, remove…

… the latter and rename box2d-web to just 'js'.
  • Loading branch information...
1 parent 60d87eb commit 60a74069438925ce62d9d20e232a0e3eb9e8ec9e @joelgwebber committed Dec 9, 2011
Showing with 0 additions and 19,140 deletions.
  1. +0 −81 box2d-js/bench2d-render.html
  2. +0 −64 box2d-js/bench2d-render.js
  3. +0 −90 box2d-js/bench2d-run.html
  4. +0 −29 box2d-js/bench2d-run.js
  5. +0 −64 box2d-js/bench2d.js
  6. +0 −14 box2d-js/box2d-js/LICENSE.txt
  7. +0 −3 box2d-js/box2d-js/README.txt
  8. +0 −57 box2d-js/box2d-js/demos/compound.js
  9. +0 −69 box2d-js/box2d-js/demos/crank.js
  10. +0 −48 box2d-js/box2d-js/demos/demo_base.js
  11. +0 −49 box2d-js/box2d-js/demos/demos.js
  12. +0 −93 box2d-js/box2d-js/demos/draw_world.js
  13. +0 −20 box2d-js/box2d-js/demos/pendulum.js
  14. +0 −26 box2d-js/box2d-js/demos/stack.js
  15. +0 −42 box2d-js/box2d-js/demos/top.js
  16. +0 −213 box2d-js/box2d-js/index.html
  17. +0 −35 box2d-js/box2d-js/js/box2d/collision/ClipVertex.js
  18. +0 −61 box2d-js/box2d-js/js/box2d/collision/Features.js
  19. +0 −45 box2d-js/box2d-js/js/box2d/collision/b2AABB.js
  20. +0 −43 box2d-js/box2d-js/js/box2d/collision/b2Bound.js
  21. +0 −31 box2d-js/box2d-js/js/box2d/collision/b2BoundValues.js
  22. +0 −898 box2d-js/box2d-js/js/box2d/collision/b2BroadPhase.js
  23. +0 −26 box2d-js/box2d-js/js/box2d/collision/b2BufferedPair.js
  24. +0 −738 box2d-js/box2d-js/js/box2d/collision/b2Collision.js
  25. +0 −52 box2d-js/box2d-js/js/box2d/collision/b2ContactID.js
  26. +0 −35 box2d-js/box2d-js/js/box2d/collision/b2ContactPoint.js
  27. +0 −333 box2d-js/box2d-js/js/box2d/collision/b2Distance.js
  28. +0 −34 box2d-js/box2d-js/js/box2d/collision/b2Manifold.js
  29. +0 −34 box2d-js/box2d-js/js/box2d/collision/b2OBB.js
  30. +0 −60 box2d-js/box2d-js/js/box2d/collision/b2Pair.js
  31. +0 −34 box2d-js/box2d-js/js/box2d/collision/b2PairCallback.js
  32. +0 −386 box2d-js/box2d-js/js/box2d/collision/b2PairManager.js
  33. +0 −40 box2d-js/box2d-js/js/box2d/collision/b2Proxy.js
  34. +0 −49 box2d-js/box2d-js/js/box2d/collision/shapes/b2BoxDef.js
  35. +0 −49 box2d-js/box2d-js/js/box2d/collision/shapes/b2CircleDef.js
  36. +0 −198 box2d-js/box2d-js/js/box2d/collision/shapes/b2CircleShape.js
  37. +0 −36 box2d-js/box2d-js/js/box2d/collision/shapes/b2MassData.js
  38. +0 −58 box2d-js/box2d-js/js/box2d/collision/shapes/b2PolyDef.js
  39. +0 −492 box2d-js/box2d-js/js/box2d/collision/shapes/b2PolyShape.js
  40. +0 −339 box2d-js/box2d-js/js/box2d/collision/shapes/b2Shape.js
  41. +0 −109 box2d-js/box2d-js/js/box2d/collision/shapes/b2ShapeDef.js
  42. +0 −72 box2d-js/box2d-js/js/box2d/common/b2Settings.js
  43. +0 −130 box2d-js/box2d-js/js/box2d/common/math/b2Mat22.js
  44. +0 −218 box2d-js/box2d-js/js/box2d/common/math/b2Math.js
  45. +0 −131 box2d-js/box2d-js/js/box2d/common/math/b2Vec2.js
  46. +0 −469 box2d-js/box2d-js/js/box2d/dynamics/b2Body.js
  47. +0 −69 box2d-js/box2d-js/js/box2d/dynamics/b2BodyDef.js
  48. +0 −42 box2d-js/box2d-js/js/box2d/dynamics/b2CollisionFilter.js
  49. +0 −337 box2d-js/box2d-js/js/box2d/dynamics/b2ContactManager.js
  50. +0 −331 box2d-js/box2d-js/js/box2d/dynamics/b2Island.js
  51. +0 −27 box2d-js/box2d-js/js/box2d/dynamics/b2TimeStep.js
  52. +0 −522 box2d-js/box2d-js/js/box2d/dynamics/b2World.js
  53. +0 −52 box2d-js/box2d-js/js/box2d/dynamics/b2WorldListener.js
  54. +0 −102 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2CircleContact.js
  55. +0 −228 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2Conservative.js
  56. +0 −201 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2Contact.js
  57. +0 −45 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2ContactConstraint.js
  58. +0 −40 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2ContactConstraintPoint.js
  59. +0 −33 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2ContactNode.js
  60. +0 −30 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2ContactRegister.js
  61. +0 −537 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2ContactSolver.js
  62. +0 −65 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2NullContact.js
  63. +0 −103 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2PolyAndCircleContact.js
  64. +0 −163 box2d-js/box2d-js/js/box2d/dynamics/contacts/b2PolyContact.js
  65. +0 −264 box2d-js/box2d-js/js/box2d/dynamics/joints/b2DistanceJoint.js
  66. +0 −49 box2d-js/box2d-js/js/box2d/dynamics/joints/b2DistanceJointDef.js
  67. +0 −307 box2d-js/box2d-js/js/box2d/dynamics/joints/b2GearJoint.js
  68. +0 −50 box2d-js/box2d-js/js/box2d/dynamics/joints/b2GearJointDef.js
  69. +0 −49 box2d-js/box2d-js/js/box2d/dynamics/joints/b2Jacobian.js
  70. +0 −200 box2d-js/box2d-js/js/box2d/dynamics/joints/b2Joint.js
  71. +0 −40 box2d-js/box2d-js/js/box2d/dynamics/joints/b2JointDef.js
  72. +0 −33 box2d-js/box2d-js/js/box2d/dynamics/joints/b2JointNode.js
  73. +0 −234 box2d-js/box2d-js/js/box2d/dynamics/joints/b2MouseJoint.js
  74. +0 −53 box2d-js/box2d-js/js/box2d/dynamics/joints/b2MouseJointDef.js
  75. +0 −676 box2d-js/box2d-js/js/box2d/dynamics/joints/b2PrismaticJoint.js
  76. +0 −56 box2d-js/box2d-js/js/box2d/dynamics/joints/b2PrismaticJointDef.js
  77. +0 −618 box2d-js/box2d-js/js/box2d/dynamics/joints/b2PulleyJoint.js
  78. +0 −70 box2d-js/box2d-js/js/box2d/dynamics/joints/b2PulleyJointDef.js
  79. +0 −491 box2d-js/box2d-js/js/box2d/dynamics/joints/b2RevoluteJoint.js
  80. +0 −55 box2d-js/box2d-js/js/box2d/dynamics/joints/b2RevoluteJointDef.js
  81. +0 −10 box2d-js/box2d-js/lib/AUTHORS
  82. +0 −202 box2d-js/box2d-js/lib/COPYING
  83. +0 −22 box2d-js/box2d-js/lib/README
  84. +0 −19 box2d-js/box2d-js/lib/excanvas-compressed.js
  85. +0 −785 box2d-js/box2d-js/lib/excanvas.js
  86. +0 −4,221 box2d-js/box2d-js/lib/prototype-1.6.0.2.js
  87. +0 −61 box2d-js/box2d-js/style/box2d.css
  88. +0 −61 box2d-js/box2d-js/style/box2d.css~
  89. +0 −124 box2d-js/box2d-js/style/distant-planet.css
  90. BIN box2d-js/box2d-js/style/images/Distant-Planet_01.gif
  91. BIN box2d-js/box2d-js/style/images/Distant-Planet_02.gif
  92. BIN box2d-js/box2d-js/style/images/Distant-Planet_03.gif
  93. BIN box2d-js/box2d-js/style/images/Distant-Planet_04.gif
  94. BIN box2d-js/box2d-js/style/images/Distant-Planet_05.gif
  95. BIN box2d-js/box2d-js/style/images/Distant-Planet_06.gif
  96. BIN box2d-js/box2d-js/style/images/Distant-Planet_07.gif
  97. BIN box2d-js/box2d-js/style/images/Distant-Planet_08.gif
  98. BIN box2d-js/box2d-js/style/images/bodybox_bg.png
  99. +0 −27 box2d-js/box2d-js/style/prettify.css
  100. +0 −1,030 box2d-js/box2d-js/style/prettify.js
  101. +0 −142 box2d-js/prototype-shim.js
  102. +0 −67 box2d-js/run
  103. 0 {box2d-web → js}/Box2dWeb-2.1a.3/Box2dWeb-2.1.a.3.js
  104. 0 {box2d-web → js}/Box2dWeb-2.1a.3/Box2dWeb-2.1.a.3.min.js
  105. 0 {box2d-web → js}/Box2dWeb-2.1a.3/demo.html
  106. 0 {box2d-web → js}/Box2dWeb-2.1a.3/example.html
  107. 0 {box2d-web → js}/bench2d-render.html
  108. 0 {box2d-web → js}/bench2d-render.js
  109. 0 {box2d-web → js}/bench2d-run.html
  110. 0 {box2d-web → js}/bench2d-run.js
  111. 0 {box2d-web → js}/bench2d.js
  112. 0 box2d-web/run → js/run-d8
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head> <title>Bench2d</title> </head>
-
- <body>
- <canvas id="canvas" style='background-color:blue;' width='854' height='400'></canvas>
-
- <!-- prototype -->
- <script src="box2d-js/lib/prototype-1.6.0.2.js"></script>
-
- <!-- box2djs -->
- <script src='box2d-js/js/box2d/common/b2Settings.js'></script>
- <script src='box2d-js/js/box2d/common/math/b2Vec2.js'></script>
- <script src='box2d-js/js/box2d/common/math/b2Mat22.js'></script>
- <script src='box2d-js/js/box2d/common/math/b2Math.js'></script>
- <script src='box2d-js/js/box2d/collision/b2AABB.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Bound.js'></script>
- <script src='box2d-js/js/box2d/collision/b2BoundValues.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Pair.js'></script>
- <script src='box2d-js/js/box2d/collision/b2PairCallback.js'></script>
- <script src='box2d-js/js/box2d/collision/b2BufferedPair.js'></script>
- <script src='box2d-js/js/box2d/collision/b2PairManager.js'></script>
- <script src='box2d-js/js/box2d/collision/b2BroadPhase.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Collision.js'></script>
- <script src='box2d-js/js/box2d/collision/Features.js'></script>
- <script src='box2d-js/js/box2d/collision/b2ContactID.js'></script>
- <script src='box2d-js/js/box2d/collision/b2ContactPoint.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Distance.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Manifold.js'></script>
- <script src='box2d-js/js/box2d/collision/b2OBB.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Proxy.js'></script>
- <script src='box2d-js/js/box2d/collision/ClipVertex.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2Shape.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2ShapeDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2BoxDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2CircleDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2CircleShape.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2MassData.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2PolyDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2PolyShape.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2Body.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2BodyDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2CollisionFilter.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2Island.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2TimeStep.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactNode.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2Contact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactConstraint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactConstraintPoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactRegister.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactSolver.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2CircleContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2Conservative.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2NullContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2PolyAndCircleContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2PolyContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2ContactManager.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2World.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2WorldListener.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2JointNode.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2Joint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2JointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2DistanceJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2DistanceJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2Jacobian.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2GearJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2GearJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2MouseJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2MouseJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PrismaticJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PrismaticJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PulleyJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PulleyJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2RevoluteJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2RevoluteJointDef.js'></script>
-
- <script src='bench2d.js'></script>
- <script src='bench2d-render.js'></script>
- </body>
-</html>
-
View
@@ -1,64 +0,0 @@
-var canvas, ctx;
-
-function drawWorld(world, context) {
- context.save();
- context.transform(8, 0, 0, -8, 854/2, 400);
-
- for (var b = world.m_bodyList; b; b = b.m_next) {
- for (var s = b.GetShapeList(); s != null; s = s.GetNext()) {
- drawShape(s, context);
- }
- }
-
- context.restore();
-}
-
-function drawShape(shape, context) {
- context.fillStyle = '#ffffff';
- context.beginPath();
- switch (shape.m_type) {
- case b2Shape.e_circleShape: {
- var circle = shape;
- var pos = circle.m_position;
- var r = circle.m_radius;
- var segments = 16.0;
- var theta = 0.0;
- var dtheta = 2.0 * Math.PI / segments;
- // draw circle
- context.moveTo(pos.x + r, pos.y);
- for (var i = 0; i < segments; i++) {
- var d = new b2Vec2(r * Math.cos(theta), r * Math.sin(theta));
- var v = b2Math.AddVV(pos, d);
- context.lineTo(v.x, v.y);
- theta += dtheta;
- }
- context.lineTo(pos.x + r, pos.y);
- break;
- }
- case b2Shape.e_polyShape: {
- var poly = shape;
- var tV = b2Math.AddVV(poly.m_position, b2Math.b2MulMV(poly.m_R, poly.m_vertices[0]));
- context.moveTo(tV.x, tV.y);
- for (var i = 0; i < poly.m_vertexCount; i++) {
- var v = b2Math.AddVV(poly.m_position, b2Math.b2MulMV(poly.m_R, poly.m_vertices[i]));
- context.lineTo(v.x, v.y);
- }
- context.lineTo(tV.x, tV.y);
- break;
- }
- }
- context.fill();
-}
-
-function render() {
- canvas = $('canvas');
- ctx = canvas.getContext('2d');
- setInterval(function() {
- step();
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- drawWorld(world, ctx);
- }, 10);
-}
-
-render();
-
View
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head> <title>Bench2d</title> </head>
-
- <body>
- <div>This is going to take a while to warm up and run. Your browser window will be locked up while it does so.</div>
-
- <div id='echo'></div>
-
- <script>
- function print(msg) {
- var echo = document.getElementById('echo');
- echo.innerHTML += msg + '<br>';
- }
- </script>
-
- <!-- prototype -->
- <script src="box2d-js/lib/prototype-1.6.0.2.js"></script>
-
- <!-- box2djs -->
- <script src='box2d-js/js/box2d/common/b2Settings.js'></script>
- <script src='box2d-js/js/box2d/common/math/b2Vec2.js'></script>
- <script src='box2d-js/js/box2d/common/math/b2Mat22.js'></script>
- <script src='box2d-js/js/box2d/common/math/b2Math.js'></script>
- <script src='box2d-js/js/box2d/collision/b2AABB.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Bound.js'></script>
- <script src='box2d-js/js/box2d/collision/b2BoundValues.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Pair.js'></script>
- <script src='box2d-js/js/box2d/collision/b2PairCallback.js'></script>
- <script src='box2d-js/js/box2d/collision/b2BufferedPair.js'></script>
- <script src='box2d-js/js/box2d/collision/b2PairManager.js'></script>
- <script src='box2d-js/js/box2d/collision/b2BroadPhase.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Collision.js'></script>
- <script src='box2d-js/js/box2d/collision/Features.js'></script>
- <script src='box2d-js/js/box2d/collision/b2ContactID.js'></script>
- <script src='box2d-js/js/box2d/collision/b2ContactPoint.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Distance.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Manifold.js'></script>
- <script src='box2d-js/js/box2d/collision/b2OBB.js'></script>
- <script src='box2d-js/js/box2d/collision/b2Proxy.js'></script>
- <script src='box2d-js/js/box2d/collision/ClipVertex.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2Shape.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2ShapeDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2BoxDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2CircleDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2CircleShape.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2MassData.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2PolyDef.js'></script>
- <script src='box2d-js/js/box2d/collision/shapes/b2PolyShape.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2Body.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2BodyDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2CollisionFilter.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2Island.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2TimeStep.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactNode.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2Contact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactConstraint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactConstraintPoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactRegister.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2ContactSolver.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2CircleContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2Conservative.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2NullContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2PolyAndCircleContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/contacts/b2PolyContact.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2ContactManager.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2World.js'></script>
- <script src='box2d-js/js/box2d/dynamics/b2WorldListener.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2JointNode.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2Joint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2JointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2DistanceJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2DistanceJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2Jacobian.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2GearJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2GearJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2MouseJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2MouseJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PrismaticJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PrismaticJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PulleyJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2PulleyJointDef.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2RevoluteJoint.js'></script>
- <script src='box2d-js/js/box2d/dynamics/joints/b2RevoluteJointDef.js'></script>
-
- <script src='bench2d.js'></script>
- <script src='bench2d-run.js'></script>
- </body>
-</html>
-
View
@@ -1,29 +0,0 @@
-var WARMUP = 64;
-var FRAMES = 256;
-
-function warmup() {
- for (var i = 0; i < FRAMES; ++i) {
- step();
- }
-}
-
-function bench() {
- var times = [];
- for (var i = 0; i < FRAMES; ++i) {
- var begin = new Date().getTime();
- step();
- var end = new Date().getTime();
- times[i] = end - begin;
- print(times[i]);
- }
-
- var total = 0;
- for (var i = 0; i < FRAMES; ++i) {
- total += times[i];
- }
- print('Average: ' + (total / FRAMES));
-}
-
-warmup(FRAMES);
-bench();
-
View
@@ -1,64 +0,0 @@
-var world;
-var PYRAMID_SIZE = 40;
-
-function setAsBox(sd, hx, hy) {
- sd.vertexCount = 4;
- sd.vertices[0].Set(-hx, -hy);
- sd.vertices[1].Set(hx, -hy);
- sd.vertices[2].Set(hx, hy);
- sd.vertices[3].Set(-hx, hy);
-}
-
-function init() {
- var gravity = new b2Vec2(0, -10);
- var worldAABB = new b2AABB();
- worldAABB.minVertex.Set(-1000, -1000);
- worldAABB.maxVertex.Set(1000, 1000);
- world = new b2World(worldAABB, gravity, true);
-
- { // Floor
- var sd = new b2PolyDef();
- setAsBox(sd, 50.0, 10.0);
-
- var bd = new b2BodyDef();
- bd.AddShape(sd);
- bd.position = new b2Vec2(0.0, -10.0);
- world.CreateBody(bd);
- }
-
- {
- var a = .5;
- var shape = new b2PolyDef();
- shape.density = 1;
- shape.friction = 1;
- shape.restitution = 1;
- setAsBox(shape, a, a);
-
- var x = new b2Vec2(-7.0, 0.75);
- var y = new b2Vec2(0, 0);
- var deltaX = new b2Vec2(0.5625, 1);
- var deltaY = new b2Vec2(1.125, 0.0);
-
- for (var i = 0; i < PYRAMID_SIZE; ++i){
- y.Set(x.x, x.y);
-
- for (var j = i; j < PYRAMID_SIZE; ++j) {
- var bd = new b2BodyDef();
- bd.AddShape(shape);
- bd.position = new b2Vec2(y.x, y.y);
- bd.rotation = 0;
- var body = world.CreateBody(bd);
- y.Add(deltaY);
- }
-
- x.Add(deltaX);
- }
- }
-}
-
-function step() {
- world.Step(1.0/60, 3);
-}
-
-init();
-
@@ -1,14 +0,0 @@
-The zlib/libpng License
-
-Copyright (c) 2008 ANDO Yasushi
-
-This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
-
-Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source distribution.
-
@@ -1,3 +0,0 @@
-How to use
-1. put js/ and lib/ in your app dir
-2. add script tags refering the header of index.html
Oops, something went wrong.

0 comments on commit 60a7406

Please sign in to comment.