Skip to content

Commit

Permalink
Fixed issue 15. Added methods to remove from two instance
Browse files Browse the repository at this point in the history
  • Loading branch information
jonobr1 committed May 14, 2013
1 parent f65eb3d commit a5c08c4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/two.js
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,29 @@

},

remove: function(o) {

var objects = o;
if (!_.isArray(o)) {
objects = _.toArray(arguments);
}

this.scene.remove(objects);

return this;

},

clear: function() {

_.each(this.scene.children, function(child) {
child.remove();
});

return this;

},

makeLine: function(x1, y1, x2, y2) {

var width = x2 - x1;
Expand Down

0 comments on commit a5c08c4

Please sign in to comment.