Permalink
Browse files
return object after add/replace
- Loading branch information...
Showing
with
2 additions
and
0 deletions.
-
+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