var p = dojox.gfx3d.lighting; pigment = p.toStdColor(pigment); normal  = p.faceforward(p.normalize(normal), this.incident); var ambient  = p.scaleColor(finish.Ka, this.ambient); var shadow   = p.saturate(-4 * p.dot(normal, this.incident)); var diffuse  = p.scaleColor(shadow * finish.Kd, p.diffuse(normal, this.lights)); var color = p.scaleColor(pigment.a, p.multiplyColor(pigment, p.addColor(ambient, diffuse))); var cool = p.addColor(this.npr_cool, p.scaleColor(this.npr_alpha, color)); var warm = p.addColor(this.npr_warm, p.scaleColor(this.npr_beta,  color)); var d = (1 + p.dot(this.incident, normal)) / 2; var color = p.scaleColor(this.npr_scale, p.addColor(color, p.mixColor(cool, warm, d))); color.a = pigment.a; return p.fromStdColor(p.saturateColor(color)); } 
if(typeof finish == "string"){ finish = lite.finish[finish]; } pigment = lite.toStdColor(pigment); normal  = lite.faceforward(lite.normalize(normal), this.incident); var ambient  = lite.scaleColor(finish.Ka, this.ambient), shadow   = lite.saturate(-4 * lite.dot(normal, this.incident)), diffuse  = lite.scaleColor(shadow * finish.Kd, lite.diffuse(normal, this.lights)), color = lite.scaleColor(pigment.a, lite.multiplyColor(pigment, lite.addColor(ambient, diffuse))), cool = lite.addColor(this.npr_cool, lite.scaleColor(this.npr_alpha, color)), warm = lite.addColor(this.npr_warm, lite.scaleColor(this.npr_beta,  color)), d = (1 + lite.dot(this.incident, normal)) / 2, color = lite.scaleColor(this.npr_scale, lite.addColor(color, lite.mixColor(cool, warm, d))); color.a = pigment.a; return lite.fromStdColor(lite.saturateColor(color)); } 
	npr: function(normal, finish, pigment){		var p = dojox.gfx3d.lighting;		pigment = p.toStdColor(pigment);		normal  = p.faceforward(p.normalize(normal), this.incident);		var ambient  = p.scaleColor(finish.Ka, this.ambient);		var shadow   = p.saturate(-4 * p.dot(normal, this.incident));		var diffuse  = p.scaleColor(shadow * finish.Kd, p.diffuse(normal, this.lights));		var color = p.scaleColor(pigment.a, p.multiplyColor(pigment, p.addColor(ambient, diffuse)));		var cool = p.addColor(this.npr_cool, p.scaleColor(this.npr_alpha, color));		var warm = p.addColor(this.npr_warm, p.scaleColor(this.npr_beta,  color));		var d = (1 + p.dot(this.incident, normal)) / 2;		var color = p.scaleColor(this.npr_scale, p.addColor(color, p.mixColor(cool, warm, d)));		color.a = pigment.a;		return p.fromStdColor(p.saturateColor(color));	}
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/c7d2075e077f52d30bb22fd290f5cbb6f2dca879/lighting.js/clean/gfx3d/lighting.js