Browse Source

Editor: More layout tweaks.

Mr.doob 13 years ago
parent
commit
da0dfeee17

+ 4 - 4
editor/js/ui/Sidebar.Properties.Geometry.js

@@ -32,7 +32,7 @@ Sidebar.Properties.Geometry = function ( signals ) {
 	// name
 	// name
 
 
 	var geometryNameRow = new UI.Panel();
 	var geometryNameRow = new UI.Panel();
-	var geometryName = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var geometryName = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	geometryNameRow.add( new UI.Text().setValue( 'Name' ).setColor( '#666' ) );
 	geometryNameRow.add( new UI.Text().setValue( 'Name' ).setColor( '#666' ) );
 	geometryNameRow.add( geometryName );
 	geometryNameRow.add( geometryName );
@@ -42,7 +42,7 @@ Sidebar.Properties.Geometry = function ( signals ) {
 	// class
 	// class
 
 
 	var geometryClassRow = new UI.Panel();
 	var geometryClassRow = new UI.Panel();
-	var geometryClass = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var geometryClass = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	geometryClassRow.add( new UI.Text().setValue( 'Class' ).setColor( '#666' ) );
 	geometryClassRow.add( new UI.Text().setValue( 'Class' ).setColor( '#666' ) );
 	geometryClassRow.add( geometryClass );
 	geometryClassRow.add( geometryClass );
@@ -52,7 +52,7 @@ Sidebar.Properties.Geometry = function ( signals ) {
 	// vertices
 	// vertices
 
 
 	var geometryVerticesRow = new UI.Panel();
 	var geometryVerticesRow = new UI.Panel();
-	var geometryVertices = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var geometryVertices = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	geometryVerticesRow.add( new UI.Text().setValue( 'Vertices' ).setColor( '#666' ) );
 	geometryVerticesRow.add( new UI.Text().setValue( 'Vertices' ).setColor( '#666' ) );
 	geometryVerticesRow.add( geometryVertices );
 	geometryVerticesRow.add( geometryVertices );
@@ -62,7 +62,7 @@ Sidebar.Properties.Geometry = function ( signals ) {
 	// faces
 	// faces
 
 
 	var geometryFacesRow = new UI.Panel();
 	var geometryFacesRow = new UI.Panel();
-	var geometryFaces = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var geometryFaces = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	geometryFacesRow.add( new UI.Text().setValue( 'Faces' ).setColor( '#666' ) );
 	geometryFacesRow.add( new UI.Text().setValue( 'Faces' ).setColor( '#666' ) );
 	geometryFacesRow.add( geometryFaces );
 	geometryFacesRow.add( geometryFaces );

+ 28 - 16
editor/js/ui/Sidebar.Properties.Material.js

@@ -26,7 +26,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// name
 	// name
 
 
 	var materialNameRow = new UI.Panel();
 	var materialNameRow = new UI.Panel();
-	var materialName = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var materialName = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	materialNameRow.add( new UI.Text().setValue( 'Name' ).setColor( '#666' ) );
 	materialNameRow.add( new UI.Text().setValue( 'Name' ).setColor( '#666' ) );
 	materialNameRow.add( materialName );
 	materialNameRow.add( materialName );
@@ -46,7 +46,7 @@ Sidebar.Properties.Material = function ( signals ) {
 		'MeshNormalMaterial': 'MeshNormalMaterial',
 		'MeshNormalMaterial': 'MeshNormalMaterial',
 		'MeshPhongMaterial': 'MeshPhongMaterial'
 		'MeshPhongMaterial': 'MeshPhongMaterial'
 
 
-	} ).setLeft( '90px' ).setWidth( '180px' ).setColor( '#444' ).setFontSize( '12px' ).onChange( update );
+	} ).setLeft( '100px' ).setWidth( '180px' ).setColor( '#444' ).setFontSize( '12px' ).onChange( update );
 
 
 	materialClassRow.add( new UI.Text().setValue( 'Class' ).setColor( '#666' ) );
 	materialClassRow.add( new UI.Text().setValue( 'Class' ).setColor( '#666' ) );
 	materialClassRow.add( materialClass );
 	materialClassRow.add( materialClass );
@@ -56,7 +56,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// color
 	// color
 
 
 	var materialColorRow = new UI.Panel();
 	var materialColorRow = new UI.Panel();
-	var materialColor = new UI.Color( 'absolute' ).setLeft( '90px' ).onChange( update );
+	var materialColor = new UI.Color( 'absolute' ).setLeft( '100px' ).onChange( update );
 
 
 	materialColorRow.add( new UI.Text().setValue( 'Color' ).setColor( '#666' ) );
 	materialColorRow.add( new UI.Text().setValue( 'Color' ).setColor( '#666' ) );
 	materialColorRow.add( materialColor );
 	materialColorRow.add( materialColor );
@@ -66,7 +66,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// ambient
 	// ambient
 
 
 	var materialAmbientRow = new UI.Panel();
 	var materialAmbientRow = new UI.Panel();
-	var materialAmbient = new UI.Color( 'absolute' ).setLeft( '90px' ).onChange( update );
+	var materialAmbient = new UI.Color( 'absolute' ).setLeft( '100px' ).onChange( update );
 
 
 	materialAmbientRow.add( new UI.Text().setValue( 'Ambient' ).setColor( '#666' ) );
 	materialAmbientRow.add( new UI.Text().setValue( 'Ambient' ).setColor( '#666' ) );
 	materialAmbientRow.add( materialAmbient );
 	materialAmbientRow.add( materialAmbient );
@@ -76,7 +76,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// emissive
 	// emissive
 
 
 	var materialEmissiveRow = new UI.Panel();
 	var materialEmissiveRow = new UI.Panel();
-	var materialEmissive = new UI.Color( 'absolute' ).setLeft( '90px' ).onChange( update );
+	var materialEmissive = new UI.Color( 'absolute' ).setLeft( '100px' ).onChange( update );
 
 
 	materialEmissiveRow.add( new UI.Text().setValue( 'Emissive' ).setColor( '#666' ) );
 	materialEmissiveRow.add( new UI.Text().setValue( 'Emissive' ).setColor( '#666' ) );
 	materialEmissiveRow.add( materialEmissive );
 	materialEmissiveRow.add( materialEmissive );
@@ -86,7 +86,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// specular
 	// specular
 
 
 	var materialSpecularRow = new UI.Panel();
 	var materialSpecularRow = new UI.Panel();
-	var materialSpecular = new UI.Color( 'absolute' ).setLeft( '90px' ).onChange( update );
+	var materialSpecular = new UI.Color( 'absolute' ).setLeft( '100px' ).onChange( update );
 
 
 	materialSpecularRow.add( new UI.Text().setValue( 'Specular' ).setColor( '#666' ) );
 	materialSpecularRow.add( new UI.Text().setValue( 'Specular' ).setColor( '#666' ) );
 	materialSpecularRow.add( materialSpecular );
 	materialSpecularRow.add( materialSpecular );
@@ -96,7 +96,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// shininess
 	// shininess
 
 
 	var materialShininessRow = new UI.Panel();
 	var materialShininessRow = new UI.Panel();
-	var materialShininess = new UI.Number( 'absolute' ).setValue( 30 ).setLeft( '90px' ).onChange( update );
+	var materialShininess = new UI.Number( 'absolute' ).setValue( 30 ).setLeft( '100px' ).onChange( update );
 
 
 	materialShininessRow.add( new UI.Text().setValue( 'Shininess' ).setColor( '#666' ) );
 	materialShininessRow.add( new UI.Text().setValue( 'Shininess' ).setColor( '#666' ) );
 	materialShininessRow.add( materialShininess );
 	materialShininessRow.add( materialShininess );
@@ -106,9 +106,11 @@ Sidebar.Properties.Material = function ( signals ) {
 	// map
 	// map
 
 
 	var materialMapRow = new UI.Panel();
 	var materialMapRow = new UI.Panel();
-	var materialMap = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var materialMapEnabled = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
+	var materialMap = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	materialMapRow.add( new UI.Text().setValue( 'Map' ).setColor( '#666' ) );
 	materialMapRow.add( new UI.Text().setValue( 'Map' ).setColor( '#666' ) );
+	materialMapRow.add( materialMapEnabled );
 	materialMapRow.add( materialMap );
 	materialMapRow.add( materialMap );
 
 
 	container.add( materialMapRow );
 	container.add( materialMapRow );
@@ -116,9 +118,11 @@ Sidebar.Properties.Material = function ( signals ) {
 	// light map
 	// light map
 
 
 	var materialLightMapRow = new UI.Panel();
 	var materialLightMapRow = new UI.Panel();
-	var materialLightMap = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var materialLightMapEnabled = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
+	var materialLightMap = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	materialLightMapRow.add( new UI.Text().setValue( 'Light Map' ).setColor( '#666' ) );
 	materialLightMapRow.add( new UI.Text().setValue( 'Light Map' ).setColor( '#666' ) );
+	materialLightMapRow.add( materialLightMapEnabled );
 	materialLightMapRow.add( materialLightMap );
 	materialLightMapRow.add( materialLightMap );
 
 
 	container.add( materialLightMapRow );
 	container.add( materialLightMapRow );
@@ -126,9 +130,11 @@ Sidebar.Properties.Material = function ( signals ) {
 	// bump map
 	// bump map
 
 
 	var materialBumpMapRow = new UI.Panel();
 	var materialBumpMapRow = new UI.Panel();
-	var materialBumpMap = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var materialBumpMapEnabled = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
+	var materialBumpMap = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	materialBumpMapRow.add( new UI.Text().setValue( 'Bump Map' ).setColor( '#666' ) );
 	materialBumpMapRow.add( new UI.Text().setValue( 'Bump Map' ).setColor( '#666' ) );
+	materialBumpMapRow.add( materialBumpMapEnabled );
 	materialBumpMapRow.add( materialBumpMap );
 	materialBumpMapRow.add( materialBumpMap );
 
 
 	container.add( materialBumpMapRow );
 	container.add( materialBumpMapRow );
@@ -136,9 +142,11 @@ Sidebar.Properties.Material = function ( signals ) {
 	// normal map
 	// normal map
 
 
 	var materialNormalMapRow = new UI.Panel();
 	var materialNormalMapRow = new UI.Panel();
-	var materialNormalMap = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var materialNormalMapEnabled = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
+	var materialNormalMap = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	materialNormalMapRow.add( new UI.Text().setValue( 'Normal Map' ).setColor( '#666' ) );
 	materialNormalMapRow.add( new UI.Text().setValue( 'Normal Map' ).setColor( '#666' ) );
+	materialNormalMapRow.add( materialNormalMapEnabled );
 	materialNormalMapRow.add( materialNormalMap );
 	materialNormalMapRow.add( materialNormalMap );
 
 
 	container.add( materialNormalMapRow );
 	container.add( materialNormalMapRow );
@@ -146,9 +154,11 @@ Sidebar.Properties.Material = function ( signals ) {
 	// specular map
 	// specular map
 
 
 	var materialSpecularMapRow = new UI.Panel();
 	var materialSpecularMapRow = new UI.Panel();
-	var materialSpecularMap = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var materialSpecularMapEnabled = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
+	var materialSpecularMap = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	materialSpecularMapRow.add( new UI.Text().setValue( 'Specular Map' ).setColor( '#666' ) );
 	materialSpecularMapRow.add( new UI.Text().setValue( 'Specular Map' ).setColor( '#666' ) );
+	materialSpecularMapRow.add( materialSpecularMapEnabled );
 	materialSpecularMapRow.add( materialSpecularMap );
 	materialSpecularMapRow.add( materialSpecularMap );
 
 
 	container.add( materialSpecularMapRow );
 	container.add( materialSpecularMapRow );
@@ -156,9 +166,11 @@ Sidebar.Properties.Material = function ( signals ) {
 	// env map
 	// env map
 
 
 	var materialEnvMapRow = new UI.Panel();
 	var materialEnvMapRow = new UI.Panel();
-	var materialEnvMap = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' ).setFontSize( '12px' );
+	var materialEnvMapEnabled = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
+	var materialEnvMap = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' ).setFontSize( '12px' );
 
 
 	materialEnvMapRow.add( new UI.Text().setValue( 'Env Map' ).setColor( '#666' ) );
 	materialEnvMapRow.add( new UI.Text().setValue( 'Env Map' ).setColor( '#666' ) );
+	materialEnvMapRow.add( materialEnvMapEnabled );
 	materialEnvMapRow.add( materialEnvMap );
 	materialEnvMapRow.add( materialEnvMap );
 
 
 	container.add( materialEnvMapRow );
 	container.add( materialEnvMapRow );
@@ -166,7 +178,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// opacity
 	// opacity
 
 
 	var materialOpacityRow = new UI.Panel();
 	var materialOpacityRow = new UI.Panel();
-	var materialOpacity = new UI.Number( 'absolute' ).setLeft( '90px' ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
+	var materialOpacity = new UI.Number( 'absolute' ).setLeft( '100px' ).setWidth( '60px' ).setRange( 0, 1 ).onChange( update );
 
 
 	materialOpacityRow.add( new UI.Text().setValue( 'Opacity' ).setColor( '#666' ) );
 	materialOpacityRow.add( new UI.Text().setValue( 'Opacity' ).setColor( '#666' ) );
 	materialOpacityRow.add( materialOpacity );
 	materialOpacityRow.add( materialOpacity );
@@ -176,7 +188,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// transparent
 	// transparent
 
 
 	var materialTransparentRow = new UI.Panel();
 	var materialTransparentRow = new UI.Panel();
-	var materialTransparent = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '90px' ).onChange( update );
+	var materialTransparent = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
 
 
 	materialTransparentRow.add( new UI.Text().setValue( 'Transparent' ).setColor( '#666' ) );
 	materialTransparentRow.add( new UI.Text().setValue( 'Transparent' ).setColor( '#666' ) );
 	materialTransparentRow.add( materialTransparent );
 	materialTransparentRow.add( materialTransparent );
@@ -186,7 +198,7 @@ Sidebar.Properties.Material = function ( signals ) {
 	// wireframe
 	// wireframe
 
 
 	var materialWireframeRow = new UI.Panel();
 	var materialWireframeRow = new UI.Panel();
-	var materialWireframe = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '90px' ).onChange( update );
+	var materialWireframe = new UI.Checkbox( 'absolute' ).setValue( false ).setLeft( '100px' ).onChange( update );
 	var materialWireframeLinewidth = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '120px' ).setRange( 0, 100 ).onChange( update );
 	var materialWireframeLinewidth = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '120px' ).setRange( 0, 100 ).onChange( update );
 
 
 	materialWireframeRow.add( new UI.Text().setValue( 'Wireframe' ).setColor( '#666' ) );
 	materialWireframeRow.add( new UI.Text().setValue( 'Wireframe' ).setColor( '#666' ) );

+ 11 - 11
editor/js/ui/Sidebar.Properties.Object3D.js

@@ -20,7 +20,7 @@ Sidebar.Properties.Object3D = function ( signals ) {
 	// name
 	// name
 
 
 	var objectNameRow = new UI.Panel();
 	var objectNameRow = new UI.Panel();
-	var objectName = new UI.Text( 'absolute' ).setLeft( '90px' ).setColor( '#444' );
+	var objectName = new UI.Text( 'absolute' ).setLeft( '100px' ).setColor( '#444' );
 
 
 	objectNameRow.add( new UI.Text().setValue( 'Name' ).setColor( '#666' ) );
 	objectNameRow.add( new UI.Text().setValue( 'Name' ).setColor( '#666' ) );
 	objectNameRow.add( objectName );
 	objectNameRow.add( objectName );
@@ -30,9 +30,9 @@ Sidebar.Properties.Object3D = function ( signals ) {
 	// position
 	// position
 
 
 	var objectPositionRow = new UI.Panel();
 	var objectPositionRow = new UI.Panel();
-	var objectPositionX = new UI.Number( 'absolute' ).setLeft( '90px' ).setWidth( '50px' ).onChange( update );
-	var objectPositionY = new UI.Number( 'absolute' ).setLeft( '150px' ).setWidth( '50px' ).onChange( update );
-	var objectPositionZ = new UI.Number( 'absolute' ).setLeft( '210px' ).setWidth( '50px' ).onChange( update );
+	var objectPositionX = new UI.Number( 'absolute' ).setLeft( '100px' ).setWidth( '50px' ).onChange( update );
+	var objectPositionY = new UI.Number( 'absolute' ).setLeft( '160px' ).setWidth( '50px' ).onChange( update );
+	var objectPositionZ = new UI.Number( 'absolute' ).setLeft( '220px' ).setWidth( '50px' ).onChange( update );
 
 
 	objectPositionRow.add( new UI.Text().setValue( 'Position' ).setColor( '#666' ) );
 	objectPositionRow.add( new UI.Text().setValue( 'Position' ).setColor( '#666' ) );
 	objectPositionRow.add( objectPositionX, objectPositionY, objectPositionZ );
 	objectPositionRow.add( objectPositionX, objectPositionY, objectPositionZ );
@@ -42,9 +42,9 @@ Sidebar.Properties.Object3D = function ( signals ) {
 	// rotation
 	// rotation
 
 
 	var objectRotationRow = new UI.Panel();
 	var objectRotationRow = new UI.Panel();
-	var objectRotationX = new UI.Number( 'absolute' ).setLeft( '90px' ).setWidth( '50px' ).onChange( update );
-	var objectRotationY = new UI.Number( 'absolute' ).setLeft( '150px' ).setWidth( '50px' ).onChange( update );
-	var objectRotationZ = new UI.Number( 'absolute' ).setLeft( '210px' ).setWidth( '50px' ).onChange( update );
+	var objectRotationX = new UI.Number( 'absolute' ).setLeft( '100px' ).setWidth( '50px' ).onChange( update );
+	var objectRotationY = new UI.Number( 'absolute' ).setLeft( '160px' ).setWidth( '50px' ).onChange( update );
+	var objectRotationZ = new UI.Number( 'absolute' ).setLeft( '220px' ).setWidth( '50px' ).onChange( update );
 
 
 	objectRotationRow.add( new UI.Text().setValue( 'Rotation' ).setColor( '#666' ) );
 	objectRotationRow.add( new UI.Text().setValue( 'Rotation' ).setColor( '#666' ) );
 	objectRotationRow.add( objectRotationX, objectRotationY, objectRotationZ );
 	objectRotationRow.add( objectRotationX, objectRotationY, objectRotationZ );
@@ -54,9 +54,9 @@ Sidebar.Properties.Object3D = function ( signals ) {
 	// scale
 	// scale
 
 
 	var objectScaleRow = new UI.Panel();
 	var objectScaleRow = new UI.Panel();
-	var objectScaleX = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '90px' ).setWidth( '50px' ).onChange( update );
-	var objectScaleY = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '150px' ).setWidth( '50px' ).onChange( update );
-	var objectScaleZ = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '210px' ).setWidth( '50px' ).onChange( update );
+	var objectScaleX = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '100px' ).setWidth( '50px' ).onChange( update );
+	var objectScaleY = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '160px' ).setWidth( '50px' ).onChange( update );
+	var objectScaleZ = new UI.Number( 'absolute' ).setValue( 1 ).setLeft( '220px' ).setWidth( '50px' ).onChange( update );
 
 
 	objectScaleRow.add( new UI.Text().setValue( 'Scale' ).setColor( '#666' ) );
 	objectScaleRow.add( new UI.Text().setValue( 'Scale' ).setColor( '#666' ) );
 	objectScaleRow.add( objectScaleX, objectScaleY, objectScaleZ );
 	objectScaleRow.add( objectScaleX, objectScaleY, objectScaleZ );
@@ -66,7 +66,7 @@ Sidebar.Properties.Object3D = function ( signals ) {
 	// visible
 	// visible
 
 
 	var objectVisibleRow = new UI.Panel();
 	var objectVisibleRow = new UI.Panel();
-	var objectVisible = new UI.Checkbox( 'absolute' ).setLeft( '90px' ).onChange( update );
+	var objectVisible = new UI.Checkbox( 'absolute' ).setLeft( '100px' ).onChange( update );
 
 
 	objectVisibleRow.add( new UI.Text().setValue( 'Visible' ).setColor( '#666' ) );
 	objectVisibleRow.add( new UI.Text().setValue( 'Visible' ).setColor( '#666' ) );
 	objectVisibleRow.add( objectVisible );
 	objectVisibleRow.add( objectVisible );