|
@@ -32,8 +32,10 @@ function ArrowHelper( dir, origin, length, color, headLength, headWidth ) {
|
|
|
|
|
|
Object3D.call( this );
|
|
|
|
|
|
- if ( color === undefined ) color = 0xffff00;
|
|
|
+ if ( dir === undefined ) dir = new THREE.Vector3( 0, 0, 1 );
|
|
|
+ if ( origin === undefined ) origin = new THREE.Vector3( 0, 0, 0 );
|
|
|
if ( length === undefined ) length = 1;
|
|
|
+ if ( color === undefined ) color = 0xffff00;
|
|
|
if ( headLength === undefined ) headLength = 0.2 * length;
|
|
|
if ( headWidth === undefined ) headWidth = 0.2 * headLength;
|
|
|
|
|
@@ -117,5 +119,21 @@ ArrowHelper.prototype.setColor = function ( color ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
+ArrowHelper.prototype.copy = function ( source ) {
|
|
|
+
|
|
|
+ Object3D.prototype.copy.call( this, source, false );
|
|
|
+
|
|
|
+ this.line.copy( source.line );
|
|
|
+ this.cone.copy( source.cone );
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
+ArrowHelper.prototype.clone = function () {
|
|
|
+
|
|
|
+ return new this.constructor().copy( this );
|
|
|
+
|
|
|
+};
|
|
|
|
|
|
export { ArrowHelper };
|