lib/Oimo.js
function(rigidBody){
        var remove=rigidBody;
        if(remove.parent!==this)return;
        remove.awake();
        var js=remove.jointLink;
        while(js!=null){
	        var joint=js.joint;
	        js=js.next;
	        this.removeJoint(joint);
        }
        for(var shape=rigidBody.shapes; shape!==null; shape=shape.next){
            this.removeShape(shape);
        }
        var prev=remove.prev;
        var next=remove.next;
        if(prev!==null) prev.next=next;
        if(next!==null) next.prev=prev;
        if(this.rigidBodies==remove) this.rigidBodies=next;
        remove.prev=null;
        remove.next=null;
        remove.parent=null;
        this.numRigidBodies--;
    }
function(rigidBody){
        var remove=rigidBody;
        if(remove.parent!==this)return;
        remove.awake();
        var js=remove.jointLink;
        while(js!=null){
	        var joint=js.joint;
	        js=js.next;
	        this.removeJoint(joint);
        }
        for(var shape=rigidBody.shapes; shape!==null; shape=shape.next){
            this.removeShape(shape);
        }
        var prev=remove.prev;
        var next=remove.next;
        if(prev!==null) prev.next=next;
        if(next!==null) next.prev=prev;
        if(this.rigidBodies==remove) this.rigidBodies=next;
        remove.prev=null;
        remove.next=null;
        remove.parent=null;
        this.numRigidBodies--;
    }
function ( rigidBody ) { var remove = rigidBody ; if ( remove . parent !== this ) return ; remove . awake ( ) ; var js = remove . jointLink ; while ( js != null ) { var joint = js . joint ; js = js . next ; this . removeJoint ( joint ) ; } for ( var shape = rigidBody . shapes ; shape !== null ; shape = shape . next ) { this . removeShape ( shape ) ; } var prev = remove . prev ; var next = remove . next ; if ( prev !== null ) prev . next = next ; if ( next !== null ) next . prev = prev ; if ( this . rigidBodies == remove ) this . rigidBodies = next ; remove . prev = null ; remove . next = null ; remove . parent = null ; this . numRigidBodies -- ; }
I will remove the rigid body from the world.
Rigid body that has been deleted is excluded from the calculation on a step-by-step basis.
@param  rigidBody  Rigid body to be removed
I will remove the rigid body from the world . Rigid body that has been deleted is excluded from the calculation on a step - by - step basis .