aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/lib/rdge/materials/mandel-material.js12
-rwxr-xr-xjs/lib/rdge/materials/material.js8
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js2
-rwxr-xr-xjs/models/materials-model.js2
4 files changed, 10 insertions, 14 deletions
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() {
14 this._name = "MandelMaterial"; 14 this._name = "MandelMaterial";
15 this._shaderName = "mandel"; 15 this._shaderName = "mandel";
16 16
17 this._defaultTexMap = 'assets/images/rocky-normal.jpg';
18
19 this._time = 0.0; 17 this._time = 0.0;
20 this._dTime = 0.01; 18 this._dTime = 0.01;
21 19
@@ -27,12 +25,11 @@ var MandelMaterial = function MandelMaterial() {
27 /////////////////////////////////////////////////////////////////////// 25 ///////////////////////////////////////////////////////////////////////
28 // Material Property Accessors 26 // Material Property Accessors
29 /////////////////////////////////////////////////////////////////////// 27 ///////////////////////////////////////////////////////////////////////
30 var u_tex0_index = 0, u_speed_index = 1; 28 var u_speed_index = 0;
31 this._propNames = ["u_tex0", "u_speed" ]; 29 this._propNames = [ "u_speed" ];
32 this._propLabels = ["Texture map", "Speed" ]; 30 this._propLabels = [ "Speed" ];
33 this._propTypes = ["file", "float" ]; 31 this._propTypes = [ "float" ];
34 this._propValues = []; 32 this._propValues = [];
35 this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0);
36 this._propValues[this._propNames[u_speed_index]] = 1.0; 33 this._propValues[this._propNames[u_speed_index]] = 1.0;
37 34
38 /////////////////////////////////////////////////////////////////////// 35 ///////////////////////////////////////////////////////////////////////
@@ -97,7 +94,6 @@ var MandelMaterialDef =
97 // parameters 94 // parameters
98 'params' : 95 'params' :
99 { 96 {
100 'u_tex0': { 'type' : 'tex2d' },
101 'u_time' : { 'type' : 'float' }, 97 'u_time' : { 'type' : 'float' },
102 'u_speed' : { 'type' : 'float' }, 98 'u_speed' : { 'type' : 'float' },
103 'u_resolution' : { 'type' : 'vec2' }, 99 '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 ) {
220 console.log( "setting invalid material property: " + prop + ", value: " + value ); 220 console.log( "setting invalid material property: " + prop + ", value: " + value );
221 } 221 }
222 222
223 if (!rtnVal && (prop != 'color')) { 223// if (!rtnVal && (prop != 'color')) {
224 console.log( "invalid material property: " + prop + " : " + value ); 224// console.log( "invalid material property: " + prop + " : " + value );
225 } 225// }
226 226
227 return rtnVal; 227 return rtnVal;
228 }; 228 };
@@ -231,7 +231,7 @@ var Material = function GLMaterial( world ) {
231 { 231 {
232 var ok = this.validateProperty( prop, value ); 232 var ok = this.validateProperty( prop, value );
233 if (!ok && (prop != 'color')) { 233 if (!ok && (prop != 'color')) {
234 console.log( "invalid property in Material:" + prop + " : " + value ); 234 //console.log( "invalid property in Material:" + prop + " : " + value );
235 return; 235 return;
236 } 236 }
237 237
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() {
183 this.updateAmbientColor = function () { 183 this.updateAmbientColor = function () {
184 this._ambientColor = this._propValues['ambientColor'].slice(0); 184 this._ambientColor = this._propValues['ambientColor'].slice(0);
185 var material = this._materialNode; 185 var material = this._materialNode;
186 console.log( "ambient color: " + this._ambientColor ); 186 //console.log( "ambient color: " + this._ambientColor );
187 if (material) { 187 if (material) {
188 var technique = material.shaderProgram.defaultTechnique; 188 var technique = material.shaderProgram.defaultTechnique;
189 technique.u_ambientColor.set(this._ambientColor); 189 technique.u_ambientColor.set(this._ambientColor);
diff --git a/js/models/materials-model.js b/js/models/materials-model.js
index 0f214356..f18f086e 100755
--- a/js/models/materials-model.js
+++ b/js/models/materials-model.js
@@ -71,9 +71,9 @@ exports.MaterialsModel = Montage.create(Component, {
71 this.addMaterial(new TunnelMaterial()); 71 this.addMaterial(new TunnelMaterial());
72 this.addMaterial(new TwistMaterial()); 72 this.addMaterial(new TwistMaterial());
73 this.addMaterial(new TwistVertMaterial()); 73 this.addMaterial(new TwistVertMaterial());
74 this.addMaterial(new UberMaterial());
74 this.addMaterial(new WaterMaterial()); 75 this.addMaterial(new WaterMaterial());
75 this.addMaterial(new ZInvertMaterial()); 76 this.addMaterial(new ZInvertMaterial());
76 this.addMaterial(new UberMaterial());
77 } 77 }
78 }, 78 },
79 79