var p = dojox.gfx3d.lighting; pigment = p.toStdColor(pigment); normal  = p.faceforward(p.normalize(normal), this.incident); var v = p.scale(-1, 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 specular; if("phong" in finish){ specular = p.scaleColor(shadow * finish.Ks * finish.phong, p.phong(normal, v, finish.phong_size, this.lights)); }else{ specular = p.scaleColor(shadow * finish.Ks, p.specular(normal, v, finish.roughness, this.lights)); } var color = p.scaleColor(pigment.a, p.addColor(p.multiplyColor(pigment, p.addColor(ambient, diffuse)), p.multiplyColor(this.specular, specular))); 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 v = lite.scale(-1, this.incident), specular, color, 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)); if("phong" in finish){ specular = lite.scaleColor(shadow * finish.Ks * finish.phong, lite.phong(normal, v, finish.phong_size, this.lights)); }else{ specular = lite.scaleColor(shadow * finish.Ks, lite.specular(normal, v, finish.roughness, this.lights)); } color = lite.scaleColor(pigment.a, lite.addColor(lite.multiplyColor(pigment, lite.addColor(ambient, diffuse)), lite.multiplyColor(this.specular, specular))); color.a = pigment.a; return lite.fromStdColor(lite.saturateColor(color)); }, 
	plastic: function(normal, finish, pigment){		var p = dojox.gfx3d.lighting;		pigment = p.toStdColor(pigment);		normal  = p.faceforward(p.normalize(normal), this.incident);		var v = p.scale(-1, 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 specular;		if("phong" in finish){			specular = p.scaleColor(shadow * finish.Ks * finish.phong, p.phong(normal, v, finish.phong_size, this.lights));		}else{			specular = p.scaleColor(shadow * finish.Ks, p.specular(normal, v, finish.roughness, this.lights));		}		var color = p.scaleColor(pigment.a, p.addColor(p.multiplyColor(pigment, p.addColor(ambient, diffuse)), p.multiplyColor(this.specular, specular)));		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