Browse Source

Added copy and clone methods

WestLangley 6 years ago
parent
commit
b52044b257
1 changed files with 15 additions and 0 deletions
  1. 15 0
      src/helpers/BoxHelper.js

+ 15 - 0
src/helpers/BoxHelper.js

@@ -101,5 +101,20 @@ BoxHelper.prototype.setFromObject = function ( object ) {
 
 };
 
+BoxHelper.prototype.copy = function ( source ) {
+
+	LineSegments.prototype.copy.call( this, source );
+
+	this.object = source.object;
+
+	return this;
+
+};
+
+BoxHelper.prototype.clone = function () {
+
+	return new this.constructor().copy( this );
+
+};
 
 export { BoxHelper };