@param {Spring} spring
*/
World.prototype.addSpring = function(spring){
this.springs.push(spring);
var evt = this.addSpringEvent;
evt.spring = spring;
this.emit(evt);
evt.spring = null;
};
/**
Remove a spring
@method removeSpring
@param {Spring} spring
*/
World.prototype.removeSpring = function(spring){
var idx = this.springs.indexOf(spring);
if(idx !== -1){
Utils.splice(this.springs,idx,1);
}
};
Noticed while playing with the p2.renderer as that depend on the addSpring and removeSpring events. Removing springs does not remove them from the renderer.
from World.js
/**
/**
Noticed while playing with the p2.renderer as that depend on the addSpring and removeSpring events. Removing springs does not remove them from the renderer.