Skip to content

Commit

Permalink
fixed removed error with ConnectorHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave ten Have committed Jan 28, 2017
1 parent cdfef6f commit 33f5df3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/EagleLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,22 +278,22 @@ THREE.Connector.prototype.updateScene = function() {
THREE.ConnectorHelper = ( function () {

var markerGeometry = new THREE.SphereGeometry( 5, 16, 16 );
var color = 0x0000ff;

return function ( origin, params ) {

params = params || {};

THREE.Object3D.call( this );

if ( params.color === undefined ) {
color = 0xffff00;

if ( params.color !== undefined ) {
color = params.color;
}
if ( params.radius !== undefined ) {
markerGeometry = new THREE.SphereGeometry( params.radius, 16, 16 );
}

this.position.copy( origin );

this.marker = new THREE.Mesh(
markerGeometry,
new THREE.MeshBasicMaterial( { color: color } ) );
Expand Down
8 changes: 4 additions & 4 deletions lib/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,22 +278,22 @@ THREE.Connector.prototype.updateScene = function() {
THREE.ConnectorHelper = ( function () {

var markerGeometry = new THREE.SphereGeometry( 5, 16, 16 );
var color = 0x0000ff;

return function ( origin, params ) {

params = params || {};

THREE.Object3D.call( this );

if ( params.color === undefined ) {
color = 0xffff00;

if ( params.color !== undefined ) {
color = params.color;
}
if ( params.radius !== undefined ) {
markerGeometry = new THREE.SphereGeometry( params.radius, 16, 16 );
}

this.position.copy( origin );

this.marker = new THREE.Mesh(
markerGeometry,
new THREE.MeshBasicMaterial( { color: color } ) );
Expand Down

0 comments on commit 33f5df3

Please sign in to comment.