Skip to content
Permalink
Browse files

return object after add/replace

  • Loading branch information...
lautr3k committed Apr 12, 2016
1 parent 69b3175 commit 503f8d49b944512b42ca08538beadcd134432398
Showing with 2 additions and 0 deletions.
  1. +2 −0 js/slacer/viewer.js
@@ -103,11 +103,13 @@ var SLAcer = SLAcer || {};

Viewer.prototype.addObject = function(object) {
this.scene.add(object);
return object;
};

Viewer.prototype.replaceObject = function(oldObject, newObject) {
oldObject && this.removeObject(oldObject);
this.addObject(newObject);
return newObject;
};

// -------------------------------------------------------------------------

0 comments on commit 503f8d4

Please sign in to comment.
You can’t perform that action at this time.