From f0bbd7688bcf2c6b8f749c7c6061ac09640ab08c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Mon, 4 Jun 2012 11:35:17 -0700 Subject: Avoid throwing shader errors in the console for 'color' property at a base class level. --- js/lib/rdge/materials/material.js | 2 +- js/lib/rdge/materials/pulse-material.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/lib/rdge/materials/material.js b/js/lib/rdge/materials/material.js index b9de9988..856513e2 100755 --- a/js/lib/rdge/materials/material.js +++ b/js/lib/rdge/materials/material.js @@ -210,7 +210,7 @@ var Material = function GLMaterial( world ) { console.log( "setting invalid material property: " + prop + ", value: " + value ); } - if (!rtnVal) { + if (!rtnVal && (prop != 'color')) { console.log( "invalid material property: " + prop + " : " + value ); } diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js index 28f3ee5e..374a5eae 100644 --- a/js/lib/rdge/materials/pulse-material.js +++ b/js/lib/rdge/materials/pulse-material.js @@ -61,8 +61,8 @@ var PulseMaterial = function PulseMaterial() this.setProperty = function( prop, value ) { // make sure we have legitimate imput var ok = this.validateProperty( prop, value ); - if (!ok) { - console.log( "invalid property in Radial Gradient Material:" + prop + " : " + value ); + if (!ok && (prop != 'color')) { + console.log( "invalid property in Material:" + prop + " : " + value ); } switch (prop) -- cgit v1.2.3