From bcb0266bb6f9a578d033ad5b7b9869074e4f98a1 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 14 Jun 2012 13:55:32 -0700 Subject: Fixed alphabetization of material names. Removed console output. Removed texture map field from Mandel material editor. --- js/lib/rdge/materials/mandel-material.js | 12 ++++-------- js/lib/rdge/materials/material.js | 8 ++++---- js/lib/rdge/materials/uber-material.js | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) (limited to 'js/lib') diff --git a/js/lib/rdge/materials/mandel-material.js b/js/lib/rdge/materials/mandel-material.js index e1c19145..af477f2b 100644 --- a/js/lib/rdge/materials/mandel-material.js +++ b/js/lib/rdge/materials/mandel-material.js @@ -14,8 +14,6 @@ var MandelMaterial = function MandelMaterial() { this._name = "MandelMaterial"; this._shaderName = "mandel"; - this._defaultTexMap = 'assets/images/rocky-normal.jpg'; - this._time = 0.0; this._dTime = 0.01; @@ -27,12 +25,11 @@ var MandelMaterial = function MandelMaterial() { /////////////////////////////////////////////////////////////////////// // Material Property Accessors /////////////////////////////////////////////////////////////////////// - var u_tex0_index = 0, u_speed_index = 1; - this._propNames = ["u_tex0", "u_speed" ]; - this._propLabels = ["Texture map", "Speed" ]; - this._propTypes = ["file", "float" ]; + var u_speed_index = 0; + this._propNames = [ "u_speed" ]; + this._propLabels = [ "Speed" ]; + this._propTypes = [ "float" ]; this._propValues = []; - this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); this._propValues[this._propNames[u_speed_index]] = 1.0; /////////////////////////////////////////////////////////////////////// @@ -97,7 +94,6 @@ var MandelMaterialDef = // parameters 'params' : { - 'u_tex0': { 'type' : 'tex2d' }, 'u_time' : { 'type' : 'float' }, 'u_speed' : { 'type' : 'float' }, 'u_resolution' : { 'type' : 'vec2' }, diff --git a/js/lib/rdge/materials/material.js b/js/lib/rdge/materials/material.js index 34529e6b..65448c0c 100755 --- a/js/lib/rdge/materials/material.js +++ b/js/lib/rdge/materials/material.js @@ -220,9 +220,9 @@ var Material = function GLMaterial( world ) { console.log( "setting invalid material property: " + prop + ", value: " + value ); } - if (!rtnVal && (prop != 'color')) { - console.log( "invalid material property: " + prop + " : " + value ); - } +// if (!rtnVal && (prop != 'color')) { +// console.log( "invalid material property: " + prop + " : " + value ); +// } return rtnVal; }; @@ -231,7 +231,7 @@ var Material = function GLMaterial( world ) { { var ok = this.validateProperty( prop, value ); if (!ok && (prop != 'color')) { - console.log( "invalid property in Material:" + prop + " : " + value ); + //console.log( "invalid property in Material:" + prop + " : " + value ); return; } diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js index 9aa0f7ea..3dffb238 100755 --- a/js/lib/rdge/materials/uber-material.js +++ b/js/lib/rdge/materials/uber-material.js @@ -183,7 +183,7 @@ var UberMaterial = function UberMaterial() { this.updateAmbientColor = function () { this._ambientColor = this._propValues['ambientColor'].slice(0); var material = this._materialNode; - console.log( "ambient color: " + this._ambientColor ); + //console.log( "ambient color: " + this._ambientColor ); if (material) { var technique = material.shaderProgram.defaultTechnique; technique.u_ambientColor.set(this._ambientColor); -- cgit v1.2.3