Skip to content

Commit

Permalink
fix merged layer relation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
syt123450 committed Nov 20, 2018
1 parent 57adbe4 commit a10dc3f
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions src/elements/MergedLineGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ MergedLineGroup.prototype = {

}

let forward = false;

for ( let i = 0; i < curveElements.length; i ++ ) {

let startPos = lineStartPos;
Expand Down Expand Up @@ -113,28 +111,20 @@ MergedLineGroup.prototype = {

let points = curve.getPoints( 50 );

if ( forward ) {

for ( let i = 0; i < points.length; i ++ ) {
for ( let i = 0; i < points.length; i ++ ) {

curveLineVertices.push( points[ i ] );
curveLineColors.push( new THREE.Color( this.color ) );
curveLineVertices.push( points[ i ] );
curveLineColors.push( new THREE.Color( this.color ) );

}

} else {

for ( let i = points.length - 1; i >= 0; i -- ) {
}

curveLineVertices.push( points[ i ] );
curveLineColors.push( new THREE.Color( this.color ) );
for ( let i = points.length - 1; i >= 0; i -- ) {

}
curveLineVertices.push( points[ i ] );
curveLineColors.push( new THREE.Color( this.color ) );

}

forward = !forward;

}

return {
Expand Down

0 comments on commit a10dc3f

Please # to comment.