Просмотр исходного кода

Editor: Removed distance parameter.

Mr.doob 4 месяцев назад
Родитель
Сommit
ca4f120ae8
3 измененных файлов с 2 добавлено и 33 удалено
  1. 2 4
      editor/js/Menubar.Add.js
  2. 0 23
      editor/js/Sidebar.Object.js
  3. 0 6
      editor/js/Strings.js

+ 2 - 4
editor/js/Menubar.Add.js

@@ -414,9 +414,8 @@ function MenubarAdd( editor ) {
 
 		const color = 0xffffff;
 		const intensity = 1;
-		const distance = 0;
 
-		const light = new THREE.PointLight( color, intensity, distance );
+		const light = new THREE.PointLight( color, intensity );
 		light.name = 'PointLight';
 
 		editor.execute( new AddObjectCommand( editor, light ) );
@@ -433,11 +432,10 @@ function MenubarAdd( editor ) {
 
 		const color = 0xffffff;
 		const intensity = 1;
-		const distance = 0;
 		const angle = Math.PI * 0.1;
 		const penumbra = 0;
 
-		const light = new THREE.SpotLight( color, intensity, distance, angle, penumbra );
+		const light = new THREE.SpotLight( color, intensity, 0, angle, penumbra );
 		light.name = 'SpotLight';
 		light.target.name = 'SpotLight Target';
 

+ 0 - 23
editor/js/Sidebar.Object.js

@@ -245,16 +245,6 @@ function SidebarObject( editor ) {
 
 	container.add( objectGroundColorRow );
 
-	// distance
-
-	const objectDistanceRow = new UIRow();
-	const objectDistance = new UINumber().setRange( 0, Infinity ).onChange( update );
-
-	objectDistanceRow.add( new UIText( strings.getKey( 'sidebar/object/distance' ) ).setClass( 'Label' ) );
-	objectDistanceRow.add( objectDistance );
-
-	container.add( objectDistanceRow );
-
 	// angle
 
 	const objectAngleRow = new UIRow();
@@ -535,12 +525,6 @@ function SidebarObject( editor ) {
 
 			}
 
-			if ( object.distance !== undefined && Math.abs( object.distance - objectDistance.getValue() ) >= 0.01 ) {
-
-				editor.execute( new SetValueCommand( editor, object, 'distance', objectDistance.getValue() ) );
-
-			}
-
 			if ( object.angle !== undefined && Math.abs( object.angle - objectAngle.getValue() ) >= 0.01 ) {
 
 				editor.execute( new SetValueCommand( editor, object, 'angle', objectAngle.getValue() ) );
@@ -650,7 +634,6 @@ function SidebarObject( editor ) {
 			'intensity': objectIntensityRow,
 			'color': objectColorRow,
 			'groundColor': objectGroundColorRow,
-			'distance': objectDistanceRow,
 			'angle': objectAngleRow,
 			'penumbra': objectPenumbraRow,
 			'decay': objectDecayRow,
@@ -825,12 +808,6 @@ function SidebarObject( editor ) {
 
 		}
 
-		if ( object.distance !== undefined ) {
-
-			objectDistance.setValue( object.distance );
-
-		}
-
 		if ( object.angle !== undefined ) {
 
 			objectAngle.setValue( object.angle );

+ 0 - 6
editor/js/Strings.js

@@ -137,7 +137,6 @@ function Strings( config ) {
 			'sidebar/object/intensity': 'شدت',
 			'sidebar/object/color': 'رنگ',
 			'sidebar/object/groundcolor': 'رنگ زمینه',
-			'sidebar/object/distance': 'مسافت',
 			'sidebar/object/angle': 'زاویه',
 			'sidebar/object/penumbra': 'نیم سایه',
 			'sidebar/object/decay': 'پوسیدگی',
@@ -539,7 +538,6 @@ function Strings( config ) {
 			'sidebar/object/intensity': 'Intensity',
 			'sidebar/object/color': 'Color',
 			'sidebar/object/groundcolor': 'Ground Color',
-			'sidebar/object/distance': 'Distance',
 			'sidebar/object/angle': 'Angle',
 			'sidebar/object/penumbra': 'Penumbra',
 			'sidebar/object/decay': 'Decay',
@@ -942,7 +940,6 @@ function Strings( config ) {
 			'sidebar/object/intensity': 'Intensité',
 			'sidebar/object/color': 'Couleur',
 			'sidebar/object/groundcolor': 'Couleur de fond',
-			'sidebar/object/distance': 'Distance',
 			'sidebar/object/angle': 'Angle',
 			'sidebar/object/penumbra': 'Pénombre',
 			'sidebar/object/decay': 'Affaiblissement',
@@ -1345,7 +1342,6 @@ function Strings( config ) {
 			'sidebar/object/intensity': '强度',
 			'sidebar/object/color': '颜色',
 			'sidebar/object/groundcolor': '基色',
-			'sidebar/object/distance': '距离',
 			'sidebar/object/angle': '角度',
 			'sidebar/object/penumbra': '边缘',
 			'sidebar/object/decay': '衰减',
@@ -1748,7 +1744,6 @@ function Strings( config ) {
 			'sidebar/object/intensity': '強度',
 			'sidebar/object/color': '色',
 			'sidebar/object/groundcolor': '地面の色',
-			'sidebar/object/distance': '距離',
 			'sidebar/object/angle': '角度',
 			'sidebar/object/penumbra': '半影',
 			'sidebar/object/decay': '減衰',
@@ -2150,7 +2145,6 @@ function Strings( config ) {
 			'sidebar/object/intensity': '강도',
 			'sidebar/object/color': '색',
 			'sidebar/object/groundcolor': '지면 색',
-			'sidebar/object/distance': '거리',
 			'sidebar/object/angle': '각도',
 			'sidebar/object/penumbra': '반음영',
 			'sidebar/object/decay': '감쇠',

粤ICP备19079148号