From c3309035c7467f36fba1076236e03eeb406efebe Mon Sep 17 00:00:00 2001 From: Stefan Hedman Date: Sun, 21 Jun 2015 19:50:30 +0200 Subject: [PATCH] removed unused functions and broken method World.prototype.clone, related to https://github.com/schteppe/p2.js/issues/165 --- src/world/World.js | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/world/World.js b/src/world/World.js index 4b1a132a..3325e7c1 100644 --- a/src/world/World.js +++ b/src/world/World.js @@ -1106,34 +1106,6 @@ World.prototype.enableBodyCollision = function(bodyA,bodyB){ } }; - -function v2a(v){ - if(!v){ - return v; - } - return [v[0],v[1]]; -} - -function extend(a,b){ - for(var key in b){ - a[key] = b[key]; - } -} - -function contactMaterialToJSON(cm){ - return { - id : cm.id, - materialA : cm.materialA.id, - materialB : cm.materialB.id, - friction : cm.friction, - restitution : cm.restitution, - stiffness : cm.stiffness, - relaxation : cm.relaxation, - frictionStiffness : cm.frictionStiffness, - frictionRelaxation : cm.frictionRelaxation, - }; -} - /** * Resets the World, removes all bodies, constraints and springs. * @@ -1176,17 +1148,6 @@ World.prototype.clear = function(){ World.apply(this); }; -/** - * Get a copy of this World instance - * @method clone - * @return {World} - */ -World.prototype.clone = function(){ - var world = new World(); - world.fromJSON(this.toJSON()); - return world; -}; - var hitTest_tmp1 = vec2.create(), hitTest_zero = vec2.fromValues(0,0), hitTest_tmp2 = vec2.fromValues(0,0);