You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
The text was updated successfully, but these errors were encountered:
from World.js
/**
*/
World.prototype.addSpring = function(spring){
this.springs.push(spring);
var evt = this.addSpringEvent;
evt.spring = spring;
this.emit(evt);
evt.spring = null;
};
/**
*/
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.
The text was updated successfully, but these errors were encountered: