Skip to content

Commit

Permalink
Merge pull request mrdoob#15816 from Temdog007/feature/TensionTubeGeo…
Browse files Browse the repository at this point in the history
…metry

THREE JS Editor: Tube Geometry Parameter
  • Loading branch information
mrdoob authored Feb 21, 2019
2 parents 696ecee + 1e746c2 commit b863277
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/js/Sidebar.Geometry.TubeGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Sidebar.Geometry.TubeGeometry = function ( editor, object ) {

// tension

var tensionRow = new UI.Row();
var tensionRow = new UI.Row().setDisplay( curveType.getValue() == 'catmullrom' ? '' : 'none' );
var tension = new UI.Number( parameters.path.tension ).setStep( 0.01 ).onChange( update );

tensionRow.add( new UI.Text( strings.getKey( 'sidebar/geometry/tube_geometry/tension' ) ).setWidth( '90px' ), tension );
Expand All @@ -133,6 +133,8 @@ Sidebar.Geometry.TubeGeometry = function ( editor, object ) {

}

tensionRow.setDisplay( curveType.getValue() == 'catmullrom' ? '' : 'none' );

editor.execute( new SetGeometryCommand( object, new THREE[ geometry.type ](
new THREE.CatmullRomCurve3( points, closed.getValue(), curveType.getValue(), tension.getValue() ),
tubularSegments.getValue(),
Expand Down

0 comments on commit b863277

Please sign in to comment.