소스 검색

Only display tenions of catmullrom is selected

Temdog007 6 년 전
부모
커밋
1e746c22fd
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      editor/js/Sidebar.Geometry.TubeGeometry.js

+ 3 - 1
editor/js/Sidebar.Geometry.TubeGeometry.js

@@ -107,7 +107,7 @@ Sidebar.Geometry.TubeGeometry = function ( editor, object ) {
 
 
 	// tension
 	// 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 );
 	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 );
 	tensionRow.add( new UI.Text( strings.getKey( 'sidebar/geometry/tube_geometry/tension' ) ).setWidth( '90px' ), tension );
@@ -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 ](
 		editor.execute( new SetGeometryCommand( object, new THREE[ geometry.type ](
 			new THREE.CatmullRomCurve3( points, closed.getValue(), curveType.getValue(), tension.getValue() ),
 			new THREE.CatmullRomCurve3( points, closed.getValue(), curveType.getValue(), tension.getValue() ),
 			tubularSegments.getValue(),
 			tubularSegments.getValue(),