提交 046f7809 编写于 作者: M Mr.doob

Editor: Set default emissive and specular color.

上级 75dea170
......@@ -114,7 +114,7 @@ Sidebar.Material = function ( editor ) {
// emissive
var materialEmissiveRow = new UI.Panel();
var materialEmissive = new UI.Color().onChange( update );
var materialEmissive = new UI.Color().setHexValue( 0x000000 ).onChange( update );
materialEmissiveRow.add( new UI.Text( 'Emissive' ).setWidth( '90px' ) );
materialEmissiveRow.add( materialEmissive );
......@@ -124,7 +124,7 @@ Sidebar.Material = function ( editor ) {
// specular
var materialSpecularRow = new UI.Panel();
var materialSpecular = new UI.Color().onChange( update );
var materialSpecular = new UI.Color().setHexValue( 0x111111 ).onChange( update );
materialSpecularRow.add( new UI.Text( 'Specular' ).setWidth( '90px' ) );
materialSpecularRow.add( materialSpecular );
......@@ -376,8 +376,10 @@ Sidebar.Material = function ( editor ) {
function update() {
var object = editor.selected;
var geometry = object.geometry;
var material = object.material;
var textureWarning = false;
var objectHasUvs = false;
......
......@@ -735,7 +735,7 @@ UI.Color.prototype.setValue = function ( value ) {
UI.Color.prototype.setHexValue = function ( hex ) {
this.dom.value = "#" + ( '000000' + hex.toString( 16 ) ).slice( -6 );
this.dom.value = '#' + ( '000000' + hex.toString( 16 ) ).slice( -6 );
return this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册