aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/material.js')
-rwxr-xr-xjs/lib/rdge/materials/material.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/lib/rdge/materials/material.js b/js/lib/rdge/materials/material.js
index c273611b..7e1f2ec5 100755
--- a/js/lib/rdge/materials/material.js
+++ b/js/lib/rdge/materials/material.js
@@ -103,7 +103,7 @@ var Material = function GLMaterial( world ) {
103 return this._materialNode; 103 return this._materialNode;
104 }; 104 };
105 105
106 // a material can be animated or not. default is not. 106 // a material can be animated or not. default is not.
107 // Any material needing continuous rendering should override this method 107 // Any material needing continuous rendering should override this method
108 this.isAnimated = function() { 108 this.isAnimated = function() {
109 return false; 109 return false;
@@ -187,7 +187,7 @@ var Material = function GLMaterial( world ) {
187 // get the current values; 187 // get the current values;
188 var propNames = [], propValues = [], propTypes = [], propLabels = []; 188 var propNames = [], propValues = [], propTypes = [], propLabels = [];
189 this.getAllProperties(propNames, propValues, propTypes, propLabels); 189 this.getAllProperties(propNames, propValues, propTypes, propLabels);
190 190
191 // allocate a new material 191 // allocate a new material
192 var MaterialLibrary = require("js/models/materials-model").MaterialsModel; 192 var MaterialLibrary = require("js/models/materials-model").MaterialsModel;
193 var newMat = MaterialLibrary.createMaterialByShaderName( this.getShaderName() ); 193 var newMat = MaterialLibrary.createMaterialByShaderName( this.getShaderName() );
@@ -221,7 +221,7 @@ var Material = function GLMaterial( world ) {
221 case "vector2d": 221 case "vector2d":
222 rtnVal = ((valType == "object") && (value.length >= 2)); 222 rtnVal = ((valType == "object") && (value.length >= 2));
223 break; 223 break;
224 224
225 case "vector3d": 225 case "vector3d":
226 rtnVal = ((valType == "object") && (value.length >= 3)); 226 rtnVal = ((valType == "object") && (value.length >= 3));
227 break; 227 break;
@@ -243,7 +243,7 @@ var Material = function GLMaterial( world ) {
243 catch(e) { 243 catch(e) {
244 console.log( "setting invalid material property: " + prop + ", value: " + value ); 244 console.log( "setting invalid material property: " + prop + ", value: " + value );
245 } 245 }
246 246
247// if (!rtnVal && (prop != 'color')) { 247// if (!rtnVal && (prop != 'color')) {
248// console.log( "invalid material property: " + prop + " : " + value ); 248// console.log( "invalid material property: " + prop + " : " + value );
249// } 249// }
@@ -360,7 +360,7 @@ var Material = function GLMaterial( world ) {
360 360
361 return jObj; 361 return jObj;
362 }; 362 };
363 363
364 this.importJSON = function (jObj) { 364 this.importJSON = function (jObj) {
365 if (this.getShaderName() != jObj.material) throw new Error("ill-formed material"); 365 if (this.getShaderName() != jObj.material) throw new Error("ill-formed material");
366 this.setName(jObj.name); 366 this.setName(jObj.name);
@@ -382,7 +382,7 @@ var Material = function GLMaterial( world ) {
382 }; 382 };
383 383
384 /////////////////////////////////////////////////////////////////////// 384 ///////////////////////////////////////////////////////////////////////
385 385
386 /////////////////////////////////////////////////////////////////////// 386 ///////////////////////////////////////////////////////////////////////
387 // Methods 387 // Methods
388 /////////////////////////////////////////////////////////////////////// 388 ///////////////////////////////////////////////////////////////////////